	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_delta_mjpeg_read_header        ## -- Begin function delta_mjpeg_read_header
	.p2align	4, 0x90
_delta_mjpeg_read_header:               ## @delta_mjpeg_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	%r15
	pushq	%r14
	pushq	%r13
	pushq	%r12
	pushq	%rbx
	subq	$216, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%r8, %r12
	movl	%edx, %r8d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r13
	cmpl	$2, %edx
	jae	LBB0_5
LBB0_1:
	movl	(%r13), %edi
	movl	(%r15), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movl	%r8d, %ecx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_ENODATA@GOTPCREL(%rip), %rax
LBB0_2:
	subl	(%rax), %ebx
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_15
## %bb.4:
	movl	%ebx, %eax
	addq	$216, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movq	%rcx, %r14
	cmpl	$4, %r8d
	movl	$3, %edx
	cmovael	%r8d, %edx
	addl	$-2, %edx
	xorl	%eax, %eax
	movq	_MJPEG_MARKER@GOTPCREL(%rip), %rdi
	xorl	%ebx, %ebx
	jmp	LBB0_8
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_8 Depth=1
	movl	%eax, (%r12)
	movl	$1, %ebx
LBB0_7:                                 ##   in Loop: Header=BB0_8 Depth=1
	incq	%rax
	cmpq	%rax, %rdx
	je	LBB0_1
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movzbl	(%rsi,%rax), %ecx
	cmpb	(%rdi), %cl
	jne	LBB0_7
## %bb.9:                               ##   in Loop: Header=BB0_8 Depth=1
	movzbl	1(%rsi,%rax), %ecx
	cmpb	$-128, %cl
	je	LBB0_6
## %bb.10:                              ##   in Loop: Header=BB0_8 Depth=1
	addb	$127, %cl
	cmpb	$2, %cl
	jae	LBB0_7
## %bb.11:
	testl	%ebx, %ebx
	je	LBB0_14
## %bb.12:
	addq	%rax, %rsi
	addq	$2, %rsi
	subl	%eax, %r8d
	addl	$-2, %r8d
	movq	%r15, %rdi
	movl	%r8d, %edx
	movq	%r14, %rcx
	callq	_delta_mjpeg_read_sof
	movl	%eax, %ebx
	testl	%eax, %eax
	jne	LBB0_3
## %bb.13:
	movl	(%r13), %ebx
	movl	(%r15), %r15d
	movl	(%r12), %r12d
	leaq	-256(%rbp), %rsi
	movq	%r14, %rdi
	movl	$200, %edx
	callq	_header_str
	leaq	L_.str.1(%rip), %rsi
	movl	%ebx, %edi
	movl	%r15d, %edx
	movl	%r12d, %ecx
	movl	%eax, %r8d
	callq	_dev_dbg
	xorl	%ebx, %ebx
	jmp	LBB0_3
LBB0_14:
	movl	(%r13), %edi
	movl	(%r15), %edx
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_dev_err
	movq	_EINVAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_15:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_MJPEG_MARKER,1,0               ## @MJPEG_MARKER
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%s   wrong sequence, got SOF while SOI not seen\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.1:                               ## @.str.1
	.asciz	"%s   found header @ offset %d:\n%s"

L_.str.2:                               ## @.str.2
	.asciz	"%s   no header found within %d bytes input stream\n"

	.comm	_ENODATA,4,2                    ## @ENODATA
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_delta_mjpeg_read_header        ; -- Begin function delta_mjpeg_read_header
	.p2align	2
_delta_mjpeg_read_header:               ; @delta_mjpeg_read_header
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #288
	.cfi_def_cfa_offset 288
	stp	x28, x27, [sp, #224]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #240]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #256]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #272]            ; 16-byte Folded Spill
	add	x29, sp, #272
	.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 w27, -56
	.cfi_offset w28, -64
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	ldr	x22, [x0, #8]
	cmp	w2, #2
	b.hs	LBB0_5
LBB0_1:
	ldr	w0, [x22]
	ldr	w8, [x21]
	str	x2, [sp]
Lloh3:
	adrp	x1, l_.str.2@PAGE
Lloh4:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x2, x8
	bl	_dev_err
Lloh5:
	adrp	x8, _ENODATA@GOTPAGE
Lloh6:
	ldr	x8, [x8, _ENODATA@GOTPAGEOFF]
LBB0_2:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_3:
	ldur	x8, [x29, #-56]
Lloh7:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh8:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh9:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_15
; %bb.4:
	ldp	x29, x30, [sp, #272]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #256]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #240]            ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #224]            ; 16-byte Folded Reload
	add	sp, sp, #288
	ret
LBB0_5:
	mov	x20, x4
	mov	x19, x3
	mov	x8, #0
	mov	w9, #0
	mov	w10, #3
	cmp	w2, #3
	csel	w10, w2, w10, hi
	sub	w10, w10, #2
Lloh10:
	adrp	x11, _MJPEG_MARKER@GOTPAGE
Lloh11:
	ldr	x11, [x11, _MJPEG_MARKER@GOTPAGEOFF]
	b	LBB0_8
LBB0_6:                                 ;   in Loop: Header=BB0_8 Depth=1
	str	w8, [x20]
	mov	w9, #1
LBB0_7:                                 ;   in Loop: Header=BB0_8 Depth=1
	add	x8, x8, #1
	cmp	x10, x8
	b.eq	LBB0_1
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	ldrb	w12, [x1, x8]
	ldrb	w13, [x11]
	cmp	w12, w13
	b.ne	LBB0_7
; %bb.9:                                ;   in Loop: Header=BB0_8 Depth=1
	add	x12, x1, x8
	ldrb	w12, [x12, #1]
	cmp	w12, #128
	b.eq	LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_8 Depth=1
	sub	w12, w12, #129
	cmp	w12, #2
	b.hs	LBB0_7
; %bb.11:
	cbz	w9, LBB0_14
; %bb.12:
	add	x9, x1, x8
	add	x1, x9, #2
	sub	w8, w2, w8
	sub	w2, w8, #2
	mov	x0, x21
	mov	x3, x19
	bl	_delta_mjpeg_read_sof
	cbnz	w0, LBB0_3
; %bb.13:
	ldr	w22, [x22]
	ldr	w21, [x21]
	ldr	w20, [x20]
	add	x1, sp, #16
	mov	x0, x19
	mov	w2, #200
	bl	_header_str
	mov	x4, x0
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	bl	_dev_dbg
	mov	w0, #0
	b	LBB0_3
LBB0_14:
	ldr	w0, [x22]
	ldr	w2, [x21]
Lloh14:
	adrp	x1, l_.str@PAGE
Lloh15:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh16:
	adrp	x8, _EINVAL@GOTPAGE
Lloh17:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_2
LBB0_15:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpAdd	Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_MJPEG_MARKER,1,0               ; @MJPEG_MARKER
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%s   wrong sequence, got SOF while SOI not seen\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.1:                               ; @.str.1
	.asciz	"%s   found header @ offset %d:\n%s"

l_.str.2:                               ; @.str.2
	.asciz	"%s   no header found within %d bytes input stream\n"

	.comm	_ENODATA,4,2                    ; @ENODATA
.subsections_via_symbols
