	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jpeg_resync_to_restart         ## -- Begin function jpeg_resync_to_restart
	.p2align	4, 0x90
_jpeg_resync_to_restart:                ## @jpeg_resync_to_restart
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r15d
	movq	%rdi, %r14
	movl	(%rdi), %ebx
	movq	_JWRN_MUST_RESYNC@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edx
	movl	%r15d, %ecx
	callq	_WARNMS2
	leal	1(%r15), %eax
	andl	$7, %eax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	leal	2(%r15), %r13d
	andl	$7, %r13d
	leal	-1(%r15), %r12d
	andl	$7, %r12d
	addl	$6, %r15d
	andl	$7, %r15d
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movq	_M_SOF0@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jl	LBB0_9
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_M_RST0@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	cmpl	%eax, %ebx
	jl	LBB0_12
## %bb.3:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	_M_RST7@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %ebx
	jg	LBB0_12
## %bb.4:                               ##   in Loop: Header=BB0_1 Depth=1
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	addl	%eax, %ecx
	cmpl	%ecx, %ebx
	je	LBB0_12
## %bb.5:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	(%rax,%r13), %ecx
	cmpl	%ecx, %ebx
	je	LBB0_12
## %bb.6:                               ##   in Loop: Header=BB0_1 Depth=1
	leal	(%r12,%rax), %ecx
	cmpl	%ecx, %ebx
	je	LBB0_9
## %bb.7:                               ##   in Loop: Header=BB0_1 Depth=1
	addl	%r15d, %eax
	cmpl	%eax, %ebx
	jne	LBB0_8
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	movq	_JTRC_RECOVERY_ACTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	movl	%ebx, %ecx
	movl	$2, %r8d
	callq	_TRACEMS2
	movq	%r14, %rdi
	callq	_next_marker
	testl	%eax, %eax
	je	LBB0_10
## %bb.11:                              ##   in Loop: Header=BB0_1 Depth=1
	movl	(%r14), %ebx
	jmp	LBB0_1
LBB0_10:
	movq	_FALSE@GOTPCREL(%rip), %rax
	jmp	LBB0_14
LBB0_12:
	movq	_JTRC_RECOVERY_ACTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	movl	%ebx, %ecx
	movl	$3, %r8d
	callq	_TRACEMS2
	jmp	LBB0_13
LBB0_8:
	movq	_JTRC_RECOVERY_ACTION@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r14, %rdi
	movl	$4, %esi
	movl	%ebx, %ecx
	movl	$1, %r8d
	callq	_TRACEMS2
	movl	$0, (%r14)
LBB0_13:
	movq	_TRUE@GOTPCREL(%rip), %rax
LBB0_14:
	movl	(%rax), %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_JWRN_MUST_RESYNC,4,2           ## @JWRN_MUST_RESYNC
	.comm	_M_SOF0,8,3                     ## @M_SOF0
	.comm	_M_RST0,8,3                     ## @M_RST0
	.comm	_M_RST7,8,3                     ## @M_RST7
	.comm	_JTRC_RECOVERY_ACTION,4,2       ## @JTRC_RECOVERY_ACTION
	.comm	_TRUE,4,2                       ## @TRUE
	.comm	_FALSE,4,2                      ## @FALSE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jpeg_resync_to_restart         ; -- Begin function jpeg_resync_to_restart
	.p2align	2
_jpeg_resync_to_restart:                ; @jpeg_resync_to_restart
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	.cfi_offset w21, -40
	.cfi_offset w22, -48
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x21, x1
	mov	x19, x0
	ldr	w20, [x0]
Lloh0:
	adrp	x8, _JWRN_MUST_RESYNC@GOTPAGE
Lloh1:
	ldr	x8, [x8, _JWRN_MUST_RESYNC@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x2, x20
	mov	x3, x21
	bl	_WARNMS2
	add	w8, w21, #1
	and	w22, w8, #0x7
	add	w8, w21, #2
	and	w23, w8, #0x7
	sub	w8, w21, #1
	and	w24, w8, #0x7
	add	w8, w21, #6
	and	w26, w8, #0x7
Lloh3:
	adrp	x27, _M_SOF0@GOTPAGE
Lloh4:
	ldr	x27, [x27, _M_SOF0@GOTPAGEOFF]
Lloh5:
	adrp	x25, _JTRC_RECOVERY_ACTION@GOTPAGE
Lloh6:
	ldr	x25, [x25, _JTRC_RECOVERY_ACTION@GOTPAGEOFF]
Lloh7:
	adrp	x28, _M_RST0@GOTPAGE
Lloh8:
	ldr	x28, [x28, _M_RST0@GOTPAGEOFF]
Lloh9:
	adrp	x21, _M_RST7@GOTPAGE
Lloh10:
	ldr	x21, [x21, _M_RST7@GOTPAGEOFF]
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x27]
	cmp	w20, w8
	b.lt	LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w8, [x28]
	ldr	w9, [x21]
	add	w10, w22, w8
	add	w11, w23, w8
	cmp	w20, w8
	ccmp	w20, w9, #0, ge
	ccmp	w20, w10, #4, le
	ccmp	w20, w11, #4, ne
	b.eq	LBB0_7
; %bb.3:                                ;   in Loop: Header=BB0_1 Depth=1
	add	w9, w26, w8
	add	w8, w24, w8
	cmp	w20, w8
	ccmp	w20, w9, #4, ne
	b.ne	LBB0_8
LBB0_4:                                 ;   in Loop: Header=BB0_1 Depth=1
	ldr	w2, [x25]
	mov	x0, x19
	mov	w1, #4
	mov	x3, x20
	mov	w4, #2
	bl	_TRACEMS2
	mov	x0, x19
	bl	_next_marker
	cbz	w0, LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_1 Depth=1
	ldr	w20, [x19]
	b	LBB0_1
LBB0_6:
Lloh11:
	adrp	x8, _FALSE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _FALSE@GOTPAGEOFF]
	b	LBB0_10
LBB0_7:
	ldr	w2, [x25]
	mov	x0, x19
	mov	w1, #4
	mov	x3, x20
	mov	w4, #3
	bl	_TRACEMS2
	b	LBB0_9
LBB0_8:
	ldr	w2, [x25]
	mov	x0, x19
	mov	w1, #4
	mov	x3, x20
	mov	w4, #1
	bl	_TRACEMS2
	str	wzr, [x19]
LBB0_9:
Lloh13:
	adrp	x8, _TRUE@GOTPAGE
Lloh14:
	ldr	x8, [x8, _TRUE@GOTPAGEOFF]
LBB0_10:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_JWRN_MUST_RESYNC,4,2           ; @JWRN_MUST_RESYNC
	.comm	_M_SOF0,8,3                     ; @M_SOF0
	.comm	_M_RST0,8,3                     ; @M_RST0
	.comm	_M_RST7,8,3                     ; @M_RST7
	.comm	_JTRC_RECOVERY_ACTION,4,2       ; @JTRC_RECOVERY_ACTION
	.comm	_TRUE,4,2                       ; @TRUE
	.comm	_FALSE,4,2                      ; @FALSE
.subsections_via_symbols
