	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jpeg_read_header               ## -- Begin function jpeg_read_header
	.p2align	4, 0x90
_jpeg_read_header:                      ## @jpeg_read_header
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	(%rdi), %rdx
	movq	_DSTATE_START@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_3
## %bb.1:
	movq	_DSTATE_INHEADER@GOTPCREL(%rip), %rax
	cmpq	(%rax), %rdx
	je	LBB0_3
## %bb.2:
	movq	_JERR_BAD_STATE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ERREXIT1
LBB0_3:
	movq	%rbx, %rdi
	callq	_jpeg_consume_input
	cmpl	$130, %eax
	je	LBB0_6
## %bb.4:
	cmpl	$129, %eax
	jne	LBB0_10
## %bb.5:
	movq	_JPEG_HEADER_OK@GOTPCREL(%rip), %rax
	jmp	LBB0_9
LBB0_6:
	testl	%r14d, %r14d
	je	LBB0_8
## %bb.7:
	movq	_JERR_NO_IMAGE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, %rdi
	callq	_ERREXIT
LBB0_8:
	movl	%ebx, %edi
	callq	_jpeg_abort
	movq	_JPEG_HEADER_TABLES_ONLY@GOTPCREL(%rip), %rax
LBB0_9:
	movl	(%rax), %eax
LBB0_10:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_DSTATE_START,8,3               ## @DSTATE_START
	.comm	_DSTATE_INHEADER,8,3            ## @DSTATE_INHEADER
	.comm	_JERR_BAD_STATE,4,2             ## @JERR_BAD_STATE
	.comm	_JPEG_HEADER_OK,4,2             ## @JPEG_HEADER_OK
	.comm	_JERR_NO_IMAGE,4,2              ## @JERR_NO_IMAGE
	.comm	_JPEG_HEADER_TABLES_ONLY,4,2    ## @JPEG_HEADER_TABLES_ONLY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_jpeg_read_header               ; -- Begin function jpeg_read_header
	.p2align	2
_jpeg_read_header:                      ; @jpeg_read_header
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
	mov	x20, x1
	mov	x19, x0
	ldr	x2, [x0]
Lloh0:
	adrp	x8, _DSTATE_START@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DSTATE_START@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x9, _DSTATE_INHEADER@GOTPAGE
Lloh4:
	ldr	x9, [x9, _DSTATE_INHEADER@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x2, x8
	ccmp	x2, x9, #4, ne
	b.eq	LBB0_2
; %bb.1:
Lloh6:
	adrp	x8, _JERR_BAD_STATE@GOTPAGE
Lloh7:
	ldr	x8, [x8, _JERR_BAD_STATE@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ERREXIT1
LBB0_2:
	mov	x0, x19
	bl	_jpeg_consume_input
	cmp	w0, #130
	b.eq	LBB0_5
; %bb.3:
	cmp	w0, #129
	b.ne	LBB0_9
; %bb.4:
Lloh9:
	adrp	x8, _JPEG_HEADER_OK@GOTPAGE
Lloh10:
	ldr	x8, [x8, _JPEG_HEADER_OK@GOTPAGEOFF]
	b	LBB0_8
LBB0_5:
	cbz	w20, LBB0_7
; %bb.6:
Lloh11:
	adrp	x8, _JERR_NO_IMAGE@GOTPAGE
Lloh12:
	ldr	x8, [x8, _JERR_NO_IMAGE@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	mov	x0, x19
	bl	_ERREXIT
LBB0_7:
	mov	x0, x19
	bl	_jpeg_abort
Lloh14:
	adrp	x8, _JPEG_HEADER_TABLES_ONLY@GOTPAGE
Lloh15:
	ldr	x8, [x8, _JPEG_HEADER_TABLES_ONLY@GOTPAGEOFF]
LBB0_8:
	ldr	w0, [x8]
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_DSTATE_START,8,3               ; @DSTATE_START
	.comm	_DSTATE_INHEADER,8,3            ; @DSTATE_INHEADER
	.comm	_JERR_BAD_STATE,4,2             ; @JERR_BAD_STATE
	.comm	_JPEG_HEADER_OK,4,2             ; @JPEG_HEADER_OK
	.comm	_JERR_NO_IMAGE,4,2              ; @JERR_NO_IMAGE
	.comm	_JPEG_HEADER_TABLES_ONLY,4,2    ; @JPEG_HEADER_TABLES_ONLY
.subsections_via_symbols
