	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function jpeg2000_decode_packets
_jpeg2000_decode_packets:               ## @jpeg2000_decode_packets
	.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
	movq	%rsi, %r14
	movq	_AVERROR_BUG@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	$0, -44(%rbp)
	movl	$8, (%rdi)
	cmpl	$0, 8(%rsi)
	movq	%rdi, -72(%rbp)                 ## 8-byte Spill
	je	LBB0_5
## %bb.1:
	jle	LBB0_6
## %bb.2:
	movl	$20, %r15d
	xorl	%r12d, %r12d
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r14), %rax
	movq	16(%r14), %r13
	movl	(%r13,%r15), %ecx
	movl	%ecx, -60(%rbp)                 ## 4-byte Spill
	movl	-8(%r13,%r15), %edi
	movl	-4(%r13,%r15), %ecx
	movl	%ecx, -56(%rbp)                 ## 4-byte Spill
	movl	4(%rax), %esi
	callq	_FFMIN
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	-20(%r13,%r15), %eax
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	-12(%r13,%r15), %edi
	movq	%r14, %rbx
	movq	-72(%rbp), %r14                 ## 8-byte Reload
	movl	8(%r14), %esi
	callq	_FFMIN
                                        ## kill: def $eax killed $eax def $rax
	movl	-16(%r13,%r15), %r10d
	subq	$8, %rsp
	movq	%r14, %rdi
	movq	%rbx, %r14
	movq	%rbx, %rsi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	movl	-56(%rbp), %ecx                 ## 4-byte Reload
	movl	-52(%rbp), %r8d                 ## 4-byte Reload
	movl	-48(%rbp), %r9d                 ## 4-byte Reload
	leaq	-44(%rbp), %rbx
	pushq	%rbx
	pushq	%r10
	pushq	%rax
	callq	_jpeg2000_decode_packets_po_iteration
	addq	$32, %rsp
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_7
## %bb.3:                               ##   in Loop: Header=BB0_4 Depth=1
	incq	%r12
	movslq	8(%r14), %rax
	addq	$24, %r15
	cmpq	%rax, %r12
	jl	LBB0_4
	jmp	LBB0_6
LBB0_5:
	movq	(%r14), %rax
	movl	(%rax), %r11d
	movl	4(%rax), %r8d
	movl	8(%rdi), %eax
	subq	$8, %rsp
	leaq	-44(%rbp), %r10
	movq	%r14, %rsi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	movl	$33, %r9d
	pushq	%r10
	pushq	%r11
	pushq	%rax
	callq	_jpeg2000_decode_packets_po_iteration
	addq	$32, %rsp
	movl	%eax, %ebx
LBB0_6:
	movq	-72(%rbp), %rdi                 ## 8-byte Reload
	addq	$4, %rdi
	movl	$2, %esi
	callq	_bytestream2_skip
LBB0_7:
	movl	%ebx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_BUG,4,2                ## @AVERROR_BUG
	.no_dead_strip	_jpeg2000_decode_packets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function jpeg2000_decode_packets
_jpeg2000_decode_packets:               ; @jpeg2000_decode_packets
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _AVERROR_BUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_BUG@GOTPAGEOFF]
Lloh2:
	ldr	w21, [x8]
	str	wzr, [sp, #12]
	mov	w8, #8
	str	w8, [x0]
	ldr	w8, [x1, #8]
	cbz	w8, LBB0_5
; %bb.1:
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.2:
	mov	x25, #0
	mov	x26, #0
	add	x27, sp, #12
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #16]
	add	x28, x8, x25
	ldp	w22, w21, [x28, #16]
	ldr	w0, [x28, #12]
	ldr	x8, [x20]
	ldr	w1, [x8, #4]
	bl	_FFMIN
	mov	x23, x0
	ldr	w24, [x28]
	ldr	w0, [x28, #8]
	ldr	w1, [x19, #8]
	bl	_FFMIN
	mov	x6, x0
	ldr	w7, [x28, #4]
	str	x27, [sp]
	mov	x0, x19
	mov	x1, x20
	mov	x2, x21
	mov	x3, x22
	mov	x4, x23
	mov	x5, x24
	bl	_jpeg2000_decode_packets_po_iteration
	mov	x21, x0
	tbnz	w0, #31, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	add	x26, x26, #1
	ldrsw	x8, [x20, #8]
	add	x25, x25, #24
	cmp	x26, x8
	b.lt	LBB0_3
	b	LBB0_6
LBB0_5:
	ldr	x8, [x20]
	ldr	w6, [x19, #8]
	ldp	w7, w4, [x8]
	add	x8, sp, #12
	str	x8, [sp]
	mov	x0, x19
	mov	x1, x20
	mov	w2, #0
	mov	w3, #0
	mov	w5, #33
	bl	_jpeg2000_decode_packets_po_iteration
	mov	x21, x0
LBB0_6:
	add	x0, x19, #4
	mov	w1, #2
	bl	_bytestream2_skip
LBB0_7:
	mov	x0, x21
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_BUG,4,2                ; @AVERROR_BUG
	.no_dead_strip	_jpeg2000_decode_packets
.subsections_via_symbols
