diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jccolext-avx2.asm libjpeg-turbo-3.0.2-new/simd/i386/jccolext-avx2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jccolext-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jccolext-avx2.asm	2024-02-07 09:20:50.851275262 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_avx2)
 
 EXTN(jsimd_rgb_ycc_convert_avx2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jccolext-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jccolext-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jccolext-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jccolext-mmx.asm	2024-02-07 09:20:50.851275262 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_mmx)
 
 EXTN(jsimd_rgb_ycc_convert_mmx):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jccolext-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jccolext-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jccolext-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jccolext-sse2.asm	2024-02-07 09:20:50.852275261 +0100
@@ -41,6 +41,7 @@
     GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_sse2)
 
 EXTN(jsimd_rgb_ycc_convert_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jcgryext-avx2.asm libjpeg-turbo-3.0.2-new/simd/i386/jcgryext-avx2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jcgryext-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jcgryext-avx2.asm	2024-02-07 09:20:50.852275261 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_rgb_gray_convert_avx2)
 
 EXTN(jsimd_rgb_gray_convert_avx2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jcgryext-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jcgryext-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jcgryext-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jcgryext-mmx.asm	2024-02-07 09:20:50.852275261 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_rgb_gray_convert_mmx)
 
 EXTN(jsimd_rgb_gray_convert_mmx):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jcgryext-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jcgryext-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jcgryext-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jcgryext-sse2.asm	2024-02-07 09:20:50.852275261 +0100
@@ -41,6 +41,7 @@
     GLOBAL_FUNCTION(jsimd_rgb_gray_convert_sse2)
 
 EXTN(jsimd_rgb_gray_convert_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jchuff-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jchuff-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jchuff-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jchuff-sse2.asm	2024-02-07 09:20:50.853275259 +0100
@@ -350,6 +350,7 @@ times 1 << 14 db 15
     GLOBAL_FUNCTION(jsimd_huff_encode_one_block_sse2)
 
 EXTN(jsimd_huff_encode_one_block_sse2):
+    _endbr32
 
 %assign stack_offset      0
 %define arg_state         4 + stack_offset
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jcphuff-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jcphuff-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jcphuff-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jcphuff-sse2.asm	2024-02-07 09:20:50.853275259 +0100
@@ -281,6 +281,7 @@
     GLOBAL_FUNCTION(jsimd_encode_mcu_AC_first_prepare_sse2)
 
 EXTN(jsimd_encode_mcu_AC_first_prepare_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
@@ -460,6 +461,7 @@ EXTN(jsimd_encode_mcu_AC_first_prepare_s
     GLOBAL_FUNCTION(jsimd_encode_mcu_AC_refine_prepare_sse2)
 
 EXTN(jsimd_encode_mcu_AC_refine_prepare_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jcsample-avx2.asm libjpeg-turbo-3.0.2-new/simd/i386/jcsample-avx2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jcsample-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jcsample-avx2.asm	2024-02-07 09:20:50.853275259 +0100
@@ -43,6 +43,7 @@
     GLOBAL_FUNCTION(jsimd_h2v1_downsample_avx2)
 
 EXTN(jsimd_h2v1_downsample_avx2):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
@@ -216,6 +217,7 @@ EXTN(jsimd_h2v1_downsample_avx2):
     GLOBAL_FUNCTION(jsimd_h2v2_downsample_avx2)
 
 EXTN(jsimd_h2v2_downsample_avx2):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jcsample-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jcsample-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jcsample-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jcsample-mmx.asm	2024-02-07 09:20:50.853275259 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_h2v1_downsample_mmx)
 
 EXTN(jsimd_h2v1_downsample_mmx):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
@@ -185,6 +186,7 @@ EXTN(jsimd_h2v1_downsample_mmx):
     GLOBAL_FUNCTION(jsimd_h2v2_downsample_mmx)
 
 EXTN(jsimd_h2v2_downsample_mmx):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jcsample-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jcsample-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jcsample-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jcsample-sse2.asm	2024-02-07 09:20:50.853275259 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_h2v1_downsample_sse2)
 
 EXTN(jsimd_h2v1_downsample_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
@@ -198,6 +199,7 @@ EXTN(jsimd_h2v1_downsample_sse2):
     GLOBAL_FUNCTION(jsimd_h2v2_downsample_sse2)
 
 EXTN(jsimd_h2v2_downsample_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jdcolext-avx2.asm libjpeg-turbo-3.0.2-new/simd/i386/jdcolext-avx2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jdcolext-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jdcolext-avx2.asm	2024-02-07 09:20:50.853275259 +0100
@@ -43,6 +43,7 @@
     GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_avx2)
 
 EXTN(jsimd_ycc_rgb_convert_avx2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jdcolext-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jdcolext-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jdcolext-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jdcolext-mmx.asm	2024-02-07 09:20:50.854275258 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_mmx)
 
 EXTN(jsimd_ycc_rgb_convert_mmx):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jdcolext-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jdcolext-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jdcolext-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jdcolext-sse2.asm	2024-02-07 09:20:50.854275258 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_sse2)
 
 EXTN(jsimd_ycc_rgb_convert_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jdmrgext-avx2.asm libjpeg-turbo-3.0.2-new/simd/i386/jdmrgext-avx2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jdmrgext-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jdmrgext-avx2.asm	2024-02-07 09:20:50.854275258 +0100
@@ -43,6 +43,7 @@
     GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_avx2)
 
 EXTN(jsimd_h2v1_merged_upsample_avx2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
@@ -523,6 +524,7 @@ EXTN(jsimd_h2v1_merged_upsample_avx2):
     GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_avx2)
 
 EXTN(jsimd_h2v2_merged_upsample_avx2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jdmrgext-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jdmrgext-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jdmrgext-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jdmrgext-mmx.asm	2024-02-07 09:20:50.854275258 +0100
@@ -40,6 +40,7 @@
     GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_mmx)
 
 EXTN(jsimd_h2v1_merged_upsample_mmx):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
@@ -408,6 +409,7 @@ EXTN(jsimd_h2v1_merged_upsample_mmx):
     GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_mmx)
 
 EXTN(jsimd_h2v2_merged_upsample_mmx):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jdmrgext-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jdmrgext-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jdmrgext-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jdmrgext-sse2.asm	2024-02-07 09:20:50.855275256 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_sse2)
 
 EXTN(jsimd_h2v1_merged_upsample_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
@@ -465,6 +466,7 @@ EXTN(jsimd_h2v1_merged_upsample_sse2):
     GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_sse2)
 
 EXTN(jsimd_h2v2_merged_upsample_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jdsample-avx2.asm libjpeg-turbo-3.0.2-new/simd/i386/jdsample-avx2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jdsample-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jdsample-avx2.asm	2024-02-07 09:20:50.855275256 +0100
@@ -60,6 +60,7 @@ PW_EIGHT times 16 dw 8
     GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_avx2)
 
 EXTN(jsimd_h2v1_fancy_upsample_avx2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     pushpic     ebx
@@ -227,6 +228,7 @@ EXTN(jsimd_h2v1_fancy_upsample_avx2):
     GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_avx2)
 
 EXTN(jsimd_h2v2_fancy_upsample_avx2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
@@ -570,6 +572,7 @@ EXTN(jsimd_h2v2_fancy_upsample_avx2):
     GLOBAL_FUNCTION(jsimd_h2v1_upsample_avx2)
 
 EXTN(jsimd_h2v1_upsample_avx2):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
@@ -669,6 +672,7 @@ EXTN(jsimd_h2v1_upsample_avx2):
     GLOBAL_FUNCTION(jsimd_h2v2_upsample_avx2)
 
 EXTN(jsimd_h2v2_upsample_avx2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jdsample-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jdsample-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jdsample-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jdsample-mmx.asm	2024-02-07 09:20:50.855275256 +0100
@@ -59,6 +59,7 @@ PW_EIGHT times 4 dw 8
     GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_mmx)
 
 EXTN(jsimd_h2v1_fancy_upsample_mmx):
+    _endbr32
     push        ebp
     mov         ebp, esp
     pushpic     ebx
@@ -217,6 +218,7 @@ EXTN(jsimd_h2v1_fancy_upsample_mmx):
     GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_mmx)
 
 EXTN(jsimd_h2v2_fancy_upsample_mmx):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
@@ -541,6 +543,7 @@ EXTN(jsimd_h2v2_fancy_upsample_mmx):
     GLOBAL_FUNCTION(jsimd_h2v1_upsample_mmx)
 
 EXTN(jsimd_h2v1_upsample_mmx):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
@@ -640,6 +643,7 @@ EXTN(jsimd_h2v1_upsample_mmx):
     GLOBAL_FUNCTION(jsimd_h2v2_upsample_mmx)
 
 EXTN(jsimd_h2v2_upsample_mmx):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jdsample-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jdsample-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jdsample-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jdsample-sse2.asm	2024-02-07 09:20:50.877275221 +0100
@@ -59,6 +59,7 @@ PW_EIGHT times 8 dw 8
     GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_sse2)
 
 EXTN(jsimd_h2v1_fancy_upsample_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     pushpic     ebx
@@ -216,6 +217,7 @@ EXTN(jsimd_h2v1_fancy_upsample_sse2):
     GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_sse2)
 
 EXTN(jsimd_h2v2_fancy_upsample_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
@@ -538,6 +540,7 @@ EXTN(jsimd_h2v2_fancy_upsample_sse2):
     GLOBAL_FUNCTION(jsimd_h2v1_upsample_sse2)
 
 EXTN(jsimd_h2v1_upsample_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
@@ -635,6 +638,7 @@ EXTN(jsimd_h2v1_upsample_sse2):
     GLOBAL_FUNCTION(jsimd_h2v2_upsample_sse2)
 
 EXTN(jsimd_h2v2_upsample_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jfdctflt-3dn.asm libjpeg-turbo-3.0.2-new/simd/i386/jfdctflt-3dn.asm
--- libjpeg-turbo-3.0.2/simd/i386/jfdctflt-3dn.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jfdctflt-3dn.asm	2024-02-07 09:20:50.877275221 +0100
@@ -56,6 +56,7 @@ PD_1_306 times 2 dd 1.306562964876376527
     GLOBAL_FUNCTION(jsimd_fdct_float_3dnow)
 
 EXTN(jsimd_fdct_float_3dnow):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jfdctflt-sse.asm libjpeg-turbo-3.0.2-new/simd/i386/jfdctflt-sse.asm
--- libjpeg-turbo-3.0.2/simd/i386/jfdctflt-sse.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jfdctflt-sse.asm	2024-02-07 09:20:50.877275221 +0100
@@ -67,6 +67,7 @@ PD_1_306 times 4 dd 1.306562964876376527
     GLOBAL_FUNCTION(jsimd_fdct_float_sse)
 
 EXTN(jsimd_fdct_float_sse):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jfdctfst-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jfdctfst-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jfdctfst-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jfdctfst-mmx.asm	2024-02-07 09:20:50.878275219 +0100
@@ -81,6 +81,7 @@ PW_F1306 times 4 dw F_1_306 << CONST_SHI
     GLOBAL_FUNCTION(jsimd_fdct_ifast_mmx)
 
 EXTN(jsimd_fdct_ifast_mmx):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jfdctfst-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jfdctfst-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jfdctfst-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jfdctfst-sse2.asm	2024-02-07 09:20:50.878275219 +0100
@@ -82,6 +82,7 @@ PW_F1306 times 8 dw F_1_306 << CONST_SHI
     GLOBAL_FUNCTION(jsimd_fdct_ifast_sse2)
 
 EXTN(jsimd_fdct_ifast_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jfdctint-avx2.asm libjpeg-turbo-3.0.2-new/simd/i386/jfdctint-avx2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jfdctint-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jfdctint-avx2.asm	2024-02-07 09:20:50.878275219 +0100
@@ -260,6 +260,7 @@ PW_1_NEG1                  times 8  dw
     GLOBAL_FUNCTION(jsimd_fdct_islow_avx2)
 
 EXTN(jsimd_fdct_islow_avx2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     pushpic     ebx
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jfdctint-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jfdctint-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jfdctint-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jfdctint-mmx.asm	2024-02-07 09:20:50.878275219 +0100
@@ -102,6 +102,7 @@ PW_DESCALE_P2X times 4 dw  1 << (PASS1_B
     GLOBAL_FUNCTION(jsimd_fdct_islow_mmx)
 
 EXTN(jsimd_fdct_islow_mmx):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jfdctint-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jfdctint-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jfdctint-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jfdctint-sse2.asm	2024-02-07 09:20:50.878275219 +0100
@@ -103,6 +103,7 @@ PW_DESCALE_P2X times 8 dw  1 << (PASS1_B
     GLOBAL_FUNCTION(jsimd_fdct_islow_sse2)
 
 EXTN(jsimd_fdct_islow_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jidctflt-3dn.asm libjpeg-turbo-3.0.2-new/simd/i386/jidctflt-3dn.asm
--- libjpeg-turbo-3.0.2/simd/i386/jidctflt-3dn.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jidctflt-3dn.asm	2024-02-07 09:20:50.879275218 +0100
@@ -65,6 +65,7 @@ PB_CENTERJSAMP  times 8 db CENTERJSAMPLE
     GLOBAL_FUNCTION(jsimd_idct_float_3dnow)
 
 EXTN(jsimd_idct_float_3dnow):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jidctflt-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jidctflt-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jidctflt-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jidctflt-sse2.asm	2024-02-07 09:20:50.879275218 +0100
@@ -75,6 +75,7 @@ PB_CENTERJSAMP  times 16 db  CENTERJSAMP
     GLOBAL_FUNCTION(jsimd_idct_float_sse2)
 
 EXTN(jsimd_idct_float_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jidctflt-sse.asm libjpeg-turbo-3.0.2-new/simd/i386/jidctflt-sse.asm
--- libjpeg-turbo-3.0.2/simd/i386/jidctflt-sse.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jidctflt-sse.asm	2024-02-07 09:20:50.879275218 +0100
@@ -75,6 +75,7 @@ PB_CENTERJSAMP times 8 db  CENTERJSAMPLE
     GLOBAL_FUNCTION(jsimd_idct_float_sse)
 
 EXTN(jsimd_idct_float_sse):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jidctfst-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jidctfst-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jidctfst-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jidctfst-mmx.asm	2024-02-07 09:20:50.879275218 +0100
@@ -96,6 +96,7 @@ PB_CENTERJSAMP times 8 db  CENTERJSAMPLE
     GLOBAL_FUNCTION(jsimd_idct_ifast_mmx)
 
 EXTN(jsimd_idct_ifast_mmx):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jidctfst-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jidctfst-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jidctfst-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jidctfst-sse2.asm	2024-02-07 09:20:50.880275217 +0100
@@ -94,6 +94,7 @@ PB_CENTERJSAMP times 16 db  CENTERJSAMPL
     GLOBAL_FUNCTION(jsimd_idct_ifast_sse2)
 
 EXTN(jsimd_idct_ifast_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jidctint-avx2.asm libjpeg-turbo-3.0.2-new/simd/i386/jidctint-avx2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jidctint-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jidctint-avx2.asm	2024-02-07 09:20:50.880275217 +0100
@@ -296,6 +296,7 @@ PW_1_NEG1                  times 8  dw
     GLOBAL_FUNCTION(jsimd_idct_islow_avx2)
 
 EXTN(jsimd_idct_islow_avx2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jidctint-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jidctint-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jidctint-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jidctint-mmx.asm	2024-02-07 09:20:50.880275217 +0100
@@ -109,6 +109,7 @@ PB_CENTERJSAMP times 8 db  CENTERJSAMPLE
     GLOBAL_FUNCTION(jsimd_idct_islow_mmx)
 
 EXTN(jsimd_idct_islow_mmx):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jidctint-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jidctint-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jidctint-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jidctint-sse2.asm	2024-02-07 09:20:50.880275217 +0100
@@ -107,6 +107,7 @@ PB_CENTERJSAMP times 16 db  CENTERJSAMPL
     GLOBAL_FUNCTION(jsimd_idct_islow_sse2)
 
 EXTN(jsimd_idct_islow_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jidctred-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jidctred-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jidctred-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jidctred-mmx.asm	2024-02-07 09:20:50.880275217 +0100
@@ -117,6 +117,7 @@ PB_CENTERJSAMP  times 8 db  CENTERJSAMPL
     GLOBAL_FUNCTION(jsimd_idct_4x4_mmx)
 
 EXTN(jsimd_idct_4x4_mmx):
+    _endbr32
     push        ebp
     mov         eax, esp                    ; eax = original ebp
     sub         esp, byte 4
@@ -504,6 +505,7 @@ EXTN(jsimd_idct_4x4_mmx):
     GLOBAL_FUNCTION(jsimd_idct_2x2_mmx)
 
 EXTN(jsimd_idct_2x2_mmx):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jidctred-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jidctred-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jidctred-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jidctred-sse2.asm	2024-02-07 09:20:50.881275215 +0100
@@ -115,6 +115,7 @@ PB_CENTERJSAMP  times 16 db  CENTERJSAMP
     GLOBAL_FUNCTION(jsimd_idct_4x4_sse2)
 
 EXTN(jsimd_idct_4x4_sse2):
+    _endbr32
     push        ebp
     mov         eax, esp                     ; eax = original ebp
     sub         esp, byte 4
@@ -425,6 +426,7 @@ EXTN(jsimd_idct_4x4_sse2):
     GLOBAL_FUNCTION(jsimd_idct_2x2_sse2)
 
 EXTN(jsimd_idct_2x2_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jquant-3dn.asm libjpeg-turbo-3.0.2-new/simd/i386/jquant-3dn.asm
--- libjpeg-turbo-3.0.2/simd/i386/jquant-3dn.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jquant-3dn.asm	2024-02-07 09:20:50.881275215 +0100
@@ -36,6 +36,7 @@
     GLOBAL_FUNCTION(jsimd_convsamp_float_3dnow)
 
 EXTN(jsimd_convsamp_float_3dnow):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
@@ -138,6 +139,7 @@ EXTN(jsimd_convsamp_float_3dnow):
     GLOBAL_FUNCTION(jsimd_quantize_float_3dnow)
 
 EXTN(jsimd_quantize_float_3dnow):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jquantf-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jquantf-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jquantf-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jquantf-sse2.asm	2024-02-07 09:20:50.881275215 +0100
@@ -36,6 +36,7 @@
     GLOBAL_FUNCTION(jsimd_convsamp_float_sse2)
 
 EXTN(jsimd_convsamp_float_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
@@ -115,6 +116,7 @@ EXTN(jsimd_convsamp_float_sse2):
     GLOBAL_FUNCTION(jsimd_quantize_float_sse2)
 
 EXTN(jsimd_quantize_float_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jquanti-avx2.asm libjpeg-turbo-3.0.2-new/simd/i386/jquanti-avx2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jquanti-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jquanti-avx2.asm	2024-02-07 09:20:50.882275213 +0100
@@ -37,6 +37,7 @@
     GLOBAL_FUNCTION(jsimd_convsamp_avx2)
 
 EXTN(jsimd_convsamp_avx2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
@@ -130,6 +131,7 @@ EXTN(jsimd_convsamp_avx2):
     GLOBAL_FUNCTION(jsimd_quantize_avx2)
 
 EXTN(jsimd_quantize_avx2):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jquanti-sse2.asm libjpeg-turbo-3.0.2-new/simd/i386/jquanti-sse2.asm
--- libjpeg-turbo-3.0.2/simd/i386/jquanti-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jquanti-sse2.asm	2024-02-07 09:20:50.882275213 +0100
@@ -36,6 +36,7 @@
     GLOBAL_FUNCTION(jsimd_convsamp_sse2)
 
 EXTN(jsimd_convsamp_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
@@ -121,6 +122,7 @@ EXTN(jsimd_convsamp_sse2):
     GLOBAL_FUNCTION(jsimd_quantize_sse2)
 
 EXTN(jsimd_quantize_sse2):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jquant-mmx.asm libjpeg-turbo-3.0.2-new/simd/i386/jquant-mmx.asm
--- libjpeg-turbo-3.0.2/simd/i386/jquant-mmx.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jquant-mmx.asm	2024-02-07 09:20:50.881275215 +0100
@@ -36,6 +36,7 @@
     GLOBAL_FUNCTION(jsimd_convsamp_mmx)
 
 EXTN(jsimd_convsamp_mmx):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
@@ -145,6 +146,7 @@ EXTN(jsimd_convsamp_mmx):
     GLOBAL_FUNCTION(jsimd_quantize_mmx)
 
 EXTN(jsimd_quantize_mmx):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/i386/jquant-sse.asm libjpeg-turbo-3.0.2-new/simd/i386/jquant-sse.asm
--- libjpeg-turbo-3.0.2/simd/i386/jquant-sse.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/i386/jquant-sse.asm	2024-02-07 09:20:50.881275215 +0100
@@ -36,6 +36,7 @@
     GLOBAL_FUNCTION(jsimd_convsamp_float_sse)
 
 EXTN(jsimd_convsamp_float_sse):
+    _endbr32
     push        ebp
     mov         ebp, esp
     push        ebx
@@ -138,6 +139,7 @@ EXTN(jsimd_convsamp_float_sse):
     GLOBAL_FUNCTION(jsimd_quantize_float_sse)
 
 EXTN(jsimd_quantize_float_sse):
+    _endbr32
     push        ebp
     mov         ebp, esp
 ;   push        ebx                     ; unused
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/nasm/jsimdext.inc libjpeg-turbo-3.0.2-new/simd/nasm/jsimdext.inc
--- libjpeg-turbo-3.0.2/simd/nasm/jsimdext.inc	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/nasm/jsimdext.inc	2024-02-07 09:20:50.882275213 +0100
@@ -513,6 +513,14 @@ const_base:
 
 %endif
 
+%imacro _endbr32 0
+    dd 0xfb1e0ff3
+%endmacro
+
+%imacro _endbr64 0
+    dd 0xfa1e0ff3
+%endmacro
+
 ; --------------------------------------------------------------------------
 ;  Defines picked up from the C headers
 ;
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jccolext-avx2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jccolext-avx2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jccolext-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jccolext-avx2.asm	2024-02-07 09:20:50.882275213 +0100
@@ -41,6 +41,7 @@
     GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_avx2)
 
 EXTN(jsimd_rgb_ycc_convert_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jccolext-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jccolext-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jccolext-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jccolext-sse2.asm	2024-02-07 09:20:50.882275213 +0100
@@ -40,6 +40,7 @@
     GLOBAL_FUNCTION(jsimd_rgb_ycc_convert_sse2)
 
 EXTN(jsimd_rgb_ycc_convert_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jcgryext-avx2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jcgryext-avx2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jcgryext-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jcgryext-avx2.asm	2024-02-07 09:20:50.882275213 +0100
@@ -41,6 +41,7 @@
     GLOBAL_FUNCTION(jsimd_rgb_gray_convert_avx2)
 
 EXTN(jsimd_rgb_gray_convert_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jcgryext-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jcgryext-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jcgryext-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jcgryext-sse2.asm	2024-02-07 09:20:50.883275212 +0100
@@ -40,6 +40,7 @@
     GLOBAL_FUNCTION(jsimd_rgb_gray_convert_sse2)
 
 EXTN(jsimd_rgb_gray_convert_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jchuff-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jchuff-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jchuff-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jchuff-sse2.asm	2024-02-07 09:20:50.883275212 +0100
@@ -261,6 +261,7 @@ times 1 << 15 db 16
     GLOBAL_FUNCTION(jsimd_huff_encode_one_block_sse2)
 
 EXTN(jsimd_huff_encode_one_block_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
 
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jcphuff-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jcphuff-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jcphuff-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jcphuff-sse2.asm	2024-02-07 09:20:50.883275212 +0100
@@ -282,6 +282,7 @@
     GLOBAL_FUNCTION(jsimd_encode_mcu_AC_first_prepare_sse2)
 
 EXTN(jsimd_encode_mcu_AC_first_prepare_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     and         rsp, byte (-SIZEOF_XMMWORD)  ; align to 128 bits
@@ -445,6 +446,7 @@ EXTN(jsimd_encode_mcu_AC_first_prepare_s
     GLOBAL_FUNCTION(jsimd_encode_mcu_AC_refine_prepare_sse2)
 
 EXTN(jsimd_encode_mcu_AC_refine_prepare_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     and         rsp, byte (-SIZEOF_XMMWORD)  ; align to 128 bits
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jcsample-avx2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jcsample-avx2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jcsample-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jcsample-avx2.asm	2024-02-07 09:20:50.883275212 +0100
@@ -44,6 +44,7 @@
     GLOBAL_FUNCTION(jsimd_h2v1_downsample_avx2)
 
 EXTN(jsimd_h2v1_downsample_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 6
@@ -205,6 +206,7 @@ EXTN(jsimd_h2v1_downsample_avx2):
     GLOBAL_FUNCTION(jsimd_h2v2_downsample_avx2)
 
 EXTN(jsimd_h2v2_downsample_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 6
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jcsample-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jcsample-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jcsample-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jcsample-sse2.asm	2024-02-07 09:20:50.883275212 +0100
@@ -43,6 +43,7 @@
     GLOBAL_FUNCTION(jsimd_h2v1_downsample_sse2)
 
 EXTN(jsimd_h2v1_downsample_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 6
@@ -187,6 +188,7 @@ EXTN(jsimd_h2v1_downsample_sse2):
     GLOBAL_FUNCTION(jsimd_h2v2_downsample_sse2)
 
 EXTN(jsimd_h2v2_downsample_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 6
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jdcolext-avx2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jdcolext-avx2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jdcolext-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jdcolext-avx2.asm	2024-02-07 09:20:50.884275210 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_avx2)
 
 EXTN(jsimd_ycc_rgb_convert_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jdcolext-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jdcolext-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jdcolext-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jdcolext-sse2.asm	2024-02-07 09:20:50.884275210 +0100
@@ -41,6 +41,7 @@
     GLOBAL_FUNCTION(jsimd_ycc_rgb_convert_sse2)
 
 EXTN(jsimd_ycc_rgb_convert_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jdmrgext-avx2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jdmrgext-avx2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jdmrgext-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jdmrgext-avx2.asm	2024-02-07 09:20:50.884275210 +0100
@@ -42,6 +42,7 @@
     GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_avx2)
 
 EXTN(jsimd_h2v1_merged_upsample_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
@@ -506,6 +507,7 @@ EXTN(jsimd_h2v1_merged_upsample_avx2):
     GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_avx2)
 
 EXTN(jsimd_h2v2_merged_upsample_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jdmrgext-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jdmrgext-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jdmrgext-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jdmrgext-sse2.asm	2024-02-07 09:20:50.884275210 +0100
@@ -41,6 +41,7 @@
     GLOBAL_FUNCTION(jsimd_h2v1_merged_upsample_sse2)
 
 EXTN(jsimd_h2v1_merged_upsample_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
@@ -448,6 +449,7 @@ EXTN(jsimd_h2v1_merged_upsample_sse2):
     GLOBAL_FUNCTION(jsimd_h2v2_merged_upsample_sse2)
 
 EXTN(jsimd_h2v2_merged_upsample_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jdsample-avx2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jdsample-avx2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jdsample-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jdsample-avx2.asm	2024-02-07 09:20:50.884275210 +0100
@@ -62,6 +62,7 @@ PW_EIGHT times 16 dw 8
     GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_avx2)
 
 EXTN(jsimd_h2v1_fancy_upsample_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push_xmm    3
@@ -215,6 +216,7 @@ EXTN(jsimd_h2v1_fancy_upsample_avx2):
     GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_avx2)
 
 EXTN(jsimd_h2v2_fancy_upsample_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
@@ -524,6 +526,7 @@ EXTN(jsimd_h2v2_fancy_upsample_avx2):
     GLOBAL_FUNCTION(jsimd_h2v1_upsample_avx2)
 
 EXTN(jsimd_h2v1_upsample_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 4
@@ -612,6 +615,7 @@ EXTN(jsimd_h2v1_upsample_avx2):
     GLOBAL_FUNCTION(jsimd_h2v2_upsample_avx2)
 
 EXTN(jsimd_h2v2_upsample_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jdsample-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jdsample-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jdsample-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jdsample-sse2.asm	2024-02-07 09:20:50.885275209 +0100
@@ -61,6 +61,7 @@ PW_EIGHT times 8 dw 8
     GLOBAL_FUNCTION(jsimd_h2v1_fancy_upsample_sse2)
 
 EXTN(jsimd_h2v1_fancy_upsample_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 4
@@ -202,6 +203,7 @@ EXTN(jsimd_h2v1_fancy_upsample_sse2):
     GLOBAL_FUNCTION(jsimd_h2v2_fancy_upsample_sse2)
 
 EXTN(jsimd_h2v2_fancy_upsample_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
@@ -497,6 +499,7 @@ EXTN(jsimd_h2v2_fancy_upsample_sse2):
     GLOBAL_FUNCTION(jsimd_h2v1_upsample_sse2)
 
 EXTN(jsimd_h2v1_upsample_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 4
@@ -583,6 +586,7 @@ EXTN(jsimd_h2v1_upsample_sse2):
     GLOBAL_FUNCTION(jsimd_h2v2_upsample_sse2)
 
 EXTN(jsimd_h2v2_upsample_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jfdctflt-sse.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jfdctflt-sse.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jfdctflt-sse.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jfdctflt-sse.asm	2024-02-07 09:20:50.885275209 +0100
@@ -66,6 +66,7 @@ PD_1_306 times 4 dd 1.306562964876376527
     GLOBAL_FUNCTION(jsimd_fdct_float_sse)
 
 EXTN(jsimd_fdct_float_sse):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jfdctfst-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jfdctfst-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jfdctfst-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jfdctfst-sse2.asm	2024-02-07 09:20:50.885275209 +0100
@@ -81,6 +81,7 @@ PW_F1306 times 8 dw F_1_306 << CONST_SHI
     GLOBAL_FUNCTION(jsimd_fdct_ifast_sse2)
 
 EXTN(jsimd_fdct_ifast_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jfdctint-avx2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jfdctint-avx2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jfdctint-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jfdctint-avx2.asm	2024-02-07 09:20:50.885275209 +0100
@@ -260,6 +260,7 @@ PW_1_NEG1                  times 8  dw
     GLOBAL_FUNCTION(jsimd_fdct_islow_avx2)
 
 EXTN(jsimd_fdct_islow_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 1
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jfdctint-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jfdctint-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jfdctint-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jfdctint-sse2.asm	2024-02-07 09:20:50.886275207 +0100
@@ -102,6 +102,7 @@ PW_DESCALE_P2X times 8 dw  1 << (PASS1_B
     GLOBAL_FUNCTION(jsimd_fdct_islow_sse2)
 
 EXTN(jsimd_fdct_islow_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jidctflt-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jidctflt-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jidctflt-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jidctflt-sse2.asm	2024-02-07 09:20:50.886275207 +0100
@@ -76,6 +76,7 @@ PB_CENTERJSAMP  times 16 db  CENTERJSAMP
     GLOBAL_FUNCTION(jsimd_idct_float_sse2)
 
 EXTN(jsimd_idct_float_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jidctfst-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jidctfst-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jidctfst-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jidctfst-sse2.asm	2024-02-07 09:20:50.886275207 +0100
@@ -95,6 +95,7 @@ PB_CENTERJSAMP times 16 db  CENTERJSAMPL
     GLOBAL_FUNCTION(jsimd_idct_ifast_sse2)
 
 EXTN(jsimd_idct_ifast_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jidctint-avx2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jidctint-avx2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jidctint-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jidctint-avx2.asm	2024-02-07 09:20:50.886275207 +0100
@@ -282,6 +282,7 @@ PW_1_NEG1                  times 8  dw
     GLOBAL_FUNCTION(jsimd_idct_islow_avx2)
 
 EXTN(jsimd_idct_islow_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp                     ; rbp = aligned rbp
     push_xmm    4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jidctint-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jidctint-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jidctint-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jidctint-sse2.asm	2024-02-07 09:20:50.886275207 +0100
@@ -108,6 +108,7 @@ PB_CENTERJSAMP times 16 db  CENTERJSAMPL
     GLOBAL_FUNCTION(jsimd_idct_islow_sse2)
 
 EXTN(jsimd_idct_islow_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jidctred-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jidctred-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jidctred-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jidctred-sse2.asm	2024-02-07 09:20:50.887275206 +0100
@@ -116,6 +116,7 @@ PB_CENTERJSAMP  times 16 db  CENTERJSAMP
     GLOBAL_FUNCTION(jsimd_idct_4x4_sse2)
 
 EXTN(jsimd_idct_4x4_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     push        r15
@@ -413,6 +414,7 @@ EXTN(jsimd_idct_4x4_sse2):
     GLOBAL_FUNCTION(jsimd_idct_2x2_sse2)
 
 EXTN(jsimd_idct_2x2_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 4
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jquantf-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jquantf-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jquantf-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jquantf-sse2.asm	2024-02-07 09:20:50.887275206 +0100
@@ -37,6 +37,7 @@
     GLOBAL_FUNCTION(jsimd_convsamp_float_sse2)
 
 EXTN(jsimd_convsamp_float_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 3
@@ -109,6 +110,7 @@ EXTN(jsimd_convsamp_float_sse2):
     GLOBAL_FUNCTION(jsimd_quantize_float_sse2)
 
 EXTN(jsimd_quantize_float_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 3
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jquanti-avx2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jquanti-avx2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jquanti-avx2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jquanti-avx2.asm	2024-02-07 09:20:50.887275206 +0100
@@ -38,6 +38,7 @@
     GLOBAL_FUNCTION(jsimd_convsamp_avx2)
 
 EXTN(jsimd_convsamp_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 3
@@ -115,6 +116,7 @@ EXTN(jsimd_convsamp_avx2):
     GLOBAL_FUNCTION(jsimd_quantize_avx2)
 
 EXTN(jsimd_quantize_avx2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 3
diff -rupN --no-dereference libjpeg-turbo-3.0.2/simd/x86_64/jquanti-sse2.asm libjpeg-turbo-3.0.2-new/simd/x86_64/jquanti-sse2.asm
--- libjpeg-turbo-3.0.2/simd/x86_64/jquanti-sse2.asm	2024-01-23 23:35:53.000000000 +0100
+++ libjpeg-turbo-3.0.2-new/simd/x86_64/jquanti-sse2.asm	2024-02-07 09:20:50.887275206 +0100
@@ -37,6 +37,7 @@
     GLOBAL_FUNCTION(jsimd_convsamp_sse2)
 
 EXTN(jsimd_convsamp_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 3
@@ -115,6 +116,7 @@ EXTN(jsimd_convsamp_sse2):
     GLOBAL_FUNCTION(jsimd_quantize_sse2)
 
 EXTN(jsimd_quantize_sse2):
+    _endbr64
     push        rbp
     mov         rbp, rsp
     collect_args 3
