	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_next_header
_get_next_header:                       ## @get_next_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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r12d
	movq	%rsi, -64(%rbp)                 ## 8-byte Spill
	movq	(%rsi), %r15
	leaq	16(%rdi), %rax
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	movq	_VB2_BUF_STATE_DONE@GOTPCREL(%rip), %rax
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	movl	(%rdi), %esi
	testq	%rsi, %rsi
	je	LBB0_1
## %bb.11:
	movl	(%rax), %eax
	cmpl	$3, %esi
	ja	LBB0_14
## %bb.12:
	movl	%eax, %ebx
	movl	$4, %ecx
	subq	%rsi, %rcx
	movslq	%r12d, %rdx
	cmpq	%rcx, %rdx
	cmovgel	%ecx, %r12d
	movq	-72(%rbp), %rax                 ## 8-byte Reload
	leaq	(%rax,%rsi,4), %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movl	%ebx, %eax
	movslq	%r12d, %rcx
	leaq	(%r15,%rcx,4), %r15
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	addl	(%r14), %ecx
	jmp	LBB0_13
LBB0_1:
	movq	_VB2_BUF_STATE_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%r12d, %r12d
	jle	LBB0_2
## %bb.3:
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movslq	%r12d, %rcx
	leaq	(%r15,%rcx,4), %rdx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	8(%r14), %rax
	leaq	_get_next_header.magic(%rip), %r12
	shlq	$2, %rcx
	movq	%rcx, -80(%rbp)                 ## 8-byte Spill
	movq	-80(%rbp), %r13                 ## 8-byte Reload
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r12,%rax,4), %esi
	subq	%r15, %rdx
	shrq	$2, %rdx
	movq	%r15, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memchr
	testq	%rax, %rax
	je	LBB0_5
## %bb.6:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%rax, %r15
	movq	8(%r14), %rax
	movl	$32, %ecx
	subl	%eax, %ecx
	movq	-64(%rbp), %rdx                 ## 8-byte Reload
	movq	(%rdx), %rdx
	addq	%r13, %rdx
	subq	%r15, %rdx
	sarq	$2, %rdx
	movslq	%ecx, %r12
	cmpq	%r12, %rdx
	cmovll	%edx, %r12d
	movq	-72(%rbp), %rcx                 ## 8-byte Reload
	leaq	(%rcx,%rax,4), %rdi
	movq	%r15, %rsi
	movl	%r12d, %edx
	callq	_memcpy
	movslq	%r12d, %rbx
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	movq	8(%r14), %rdx
	addq	%rbx, %rdx
	movq	%rdx, 8(%r14)
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	leaq	_get_next_header.magic(%rip), %rsi
	movq	%rsi, %r12
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_memcmp
	testl	%eax, %eax
	je	LBB0_7
## %bb.8:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	$0, 8(%r14)
	addq	$4, %r15
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rdx
	addq	%r13, %rdx
	movl	$0, %eax
	cmpq	%rdx, %r15
	jb	LBB0_4
	jmp	LBB0_9
LBB0_2:
	movq	-56(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_10
LBB0_5:
	movq	$0, 8(%r14)
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movq	-80(%rbp), %r15                 ## 8-byte Reload
	addq	(%rax), %r15
LBB0_9:
	movl	-44(%rbp), %eax                 ## 4-byte Reload
	jmp	LBB0_10
LBB0_7:
	leaq	(%r15,%rbx,4), %r15
	movq	_VB2_BUF_STATE_DONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
LBB0_10:
	movl	$32, %ecx
	cmpq	$32, 8(%r14)
	jb	LBB0_14
LBB0_13:
	movl	%ecx, (%r14)
LBB0_14:
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	movq	%r15, (%rcx)
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__const
	.p2align	4                               ## @get_next_header.magic
_get_next_header.magic:
	.long	79                              ## 0x4f
	.long	79                              ## 0x4f
	.long	79                              ## 0x4f
	.long	79                              ## 0x4f
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff
	.long	255                             ## 0xff

	.comm	_VB2_BUF_STATE_DONE,4,2         ## @VB2_BUF_STATE_DONE
	.comm	_VB2_BUF_STATE_ERROR,4,2        ## @VB2_BUF_STATE_ERROR
	.no_dead_strip	_get_next_header
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_next_header
_get_next_header:                       ; @get_next_header
	.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
                                        ; kill: def $w2 killed $w2 def $x2
	mov	x19, x1
	mov	x20, x0
	ldr	x22, [x1]
	mov	x23, x0
	ldr	w8, [x23], #16
Lloh0:
	adrp	x26, _VB2_BUF_STATE_DONE@GOTPAGE
Lloh1:
	ldr	x26, [x26, _VB2_BUF_STATE_DONE@GOTPAGEOFF]
	cbz	w8, LBB0_3
; %bb.1:
	ldr	w21, [x26]
	cmp	w8, #3
	b.hi	LBB0_13
; %bb.2:
	mov	w9, #4
	mov	x10, x2
	sxtw	x10, w10
	sub	x9, x9, x8
	cmp	x10, x9
	csel	w24, w2, w9, lt
	add	x0, x23, x8, lsl #2
	mov	x1, x22
	mov	x2, x24
	bl	_memcpy
	add	x22, x22, w24, sxtw #2
	ldr	w8, [x20]
	add	w8, w24, w8
	b	LBB0_12
LBB0_3:
Lloh2:
	adrp	x8, _VB2_BUF_STATE_ERROR@GOTPAGE
Lloh3:
	ldr	x8, [x8, _VB2_BUF_STATE_ERROR@GOTPAGEOFF]
Lloh4:
	ldr	w21, [x8]
	cmp	w2, #1
	b.lt	LBB0_10
; %bb.4:
	sxtw	x27, w2
	add	x9, x22, x27, lsl #2
	ldr	x8, [x20, #8]
Lloh5:
	adrp	x24, _get_next_header.magic@PAGE
Lloh6:
	add	x24, x24, _get_next_header.magic@PAGEOFF
	mov	w28, #32
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x24, x8, lsl #2]
	sub	x8, x9, x22
	lsr	x2, x8, #2
	mov	x0, x22
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memchr
	cbz	x0, LBB0_8
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x22, x0
	ldr	x8, [x20, #8]
	sub	w9, w28, w8
	ldr	x10, [x19]
	add	x10, x10, x27, lsl #2
	sub	x10, x10, x0
	asr	x10, x10, #2
	cmp	x10, w9, sxtw
	csel	w25, w10, w9, lt
	add	x0, x23, x8, lsl #2
	mov	x1, x22
	mov	x2, x25
	bl	_memcpy
	sxtw	x25, w25
	ldr	x8, [x20, #8]
	add	x2, x8, x25
	str	x2, [x20, #8]
	mov	x0, x23
	mov	x1, x24
                                        ; kill: def $w2 killed $w2 killed $x2
	bl	_memcmp
	cbz	w0, LBB0_9
; %bb.7:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x8, #0
	str	xzr, [x20, #8]
	add	x22, x22, #4
	ldr	x9, [x19]
	add	x9, x9, x27, lsl #2
	cmp	x22, x9
	b.lo	LBB0_5
	b	LBB0_10
LBB0_8:
	str	xzr, [x20, #8]
	ldr	x8, [x19]
	add	x22, x8, x27, lsl #2
	b	LBB0_10
LBB0_9:
	add	x22, x22, x25, lsl #2
	ldr	w21, [x26]
LBB0_10:
	ldr	x8, [x20, #8]
	cmp	x8, #32
	b.lo	LBB0_13
; %bb.11:
	mov	w8, #32
LBB0_12:
	str	w8, [x20]
LBB0_13:
	str	x22, [x19]
	mov	x0, x21
	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	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__const
	.p2align	2                               ; @get_next_header.magic
_get_next_header.magic:
	.long	79                              ; 0x4f
	.long	79                              ; 0x4f
	.long	79                              ; 0x4f
	.long	79                              ; 0x4f
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff
	.long	255                             ; 0xff

	.comm	_VB2_BUF_STATE_DONE,4,2         ; @VB2_BUF_STATE_DONE
	.comm	_VB2_BUF_STATE_ERROR,4,2        ; @VB2_BUF_STATE_ERROR
	.no_dead_strip	_get_next_header
.subsections_via_symbols
