	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ingenient_read_packet
_ingenient_read_packet:                 ## @ingenient_read_packet
	.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
	movq	%rsi, %r13
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_avio_rl32
	movl	%eax, %r15d
	movl	$77, %edi
	movl	$74, %esi
	movl	$80, %edx
	movl	$71, %ecx
	callq	_MKTAG
	cmpl	%eax, %r15d
	jne	LBB0_4
## %bb.1:
	movl	(%rbx), %edi
	callq	_avio_rl32
	movl	%eax, %r15d
	movl	(%rbx), %edi
	callq	_avio_rl16
	movl	%eax, -48(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %edi
	callq	_avio_rl16
	movl	%eax, -44(%rbp)                 ## 4-byte Spill
	movl	(%rbx), %edi
	movl	$8, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	movl	$2, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	callq	_avio_rl16
	movl	%eax, %r12d
	movl	(%rbx), %edi
	callq	_avio_rl16
	movl	%eax, %r14d
	movl	(%rbx), %edi
	movl	$22, %esi
	callq	_avio_skip
	movq	_AV_LOG_DEBUG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	movl	%r15d, %ecx
	movl	-48(%rbp), %r8d                 ## 4-byte Reload
	movl	-44(%rbp), %r9d                 ## 4-byte Reload
	pushq	%r14
	pushq	%r12
	callq	_av_log
	addq	$16, %rsp
	movl	(%rbx), %edi
	movq	%r13, %rsi
	movl	%r15d, %edx
	callq	_av_get_packet
	testl	%eax, %eax
	js	LBB0_3
## %bb.2:
	movq	$0, (%r13)
LBB0_3:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_EIO,4,2                        ## @EIO
	.comm	_AV_LOG_DEBUG,4,2               ## @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Ingenient packet: size=%d, width=%d, height=%d, unk1=%d unk2=%d\n"

	.no_dead_strip	_ingenient_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ingenient_read_packet
_ingenient_read_packet:                 ; @ingenient_read_packet
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	w0, [x0]
	bl	_avio_rl32
	mov	x21, x0
	mov	w0, #77
	mov	w1, #74
	mov	w2, #80
	mov	w3, #71
	bl	_MKTAG
	cmp	w21, w0
	b.ne	LBB0_4
; %bb.1:
	ldr	w0, [x20]
	bl	_avio_rl32
	mov	x21, x0
	ldr	w0, [x20]
	bl	_avio_rl16
	mov	x22, x0
	ldr	w0, [x20]
	bl	_avio_rl16
	mov	x23, x0
	ldr	w0, [x20]
	mov	w1, #8
	bl	_avio_skip
	ldr	w0, [x20]
	mov	w1, #2
	bl	_avio_skip
	ldr	w0, [x20]
	bl	_avio_rl16
	mov	x24, x0
	ldr	w0, [x20]
	bl	_avio_rl16
	mov	x25, x0
	ldr	w0, [x20]
	mov	w1, #22
	bl	_avio_skip
Lloh0:
	adrp	x8, _AV_LOG_DEBUG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AV_LOG_DEBUG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x2, l_.str@PAGE
Lloh4:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x20
	mov	x3, x21
	mov	x4, x22
	mov	x5, x23
	mov	x6, x24
	mov	x7, x25
	bl	_av_log
	ldr	w0, [x20]
	mov	x1, x19
	mov	x2, x21
	bl	_av_get_packet
	tbnz	w0, #31, LBB0_3
; %bb.2:
	str	xzr, [x19]
LBB0_3:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_4:
Lloh5:
	adrp	x8, _EIO@GOTPAGE
Lloh6:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh7:
	ldr	w0, [x8]
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_AVERROR
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.comm	_EIO,4,2                        ; @EIO
	.comm	_AV_LOG_DEBUG,4,2               ; @AV_LOG_DEBUG
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Ingenient packet: size=%d, width=%d, height=%d, unk1=%d unk2=%d\n"

	.no_dead_strip	_ingenient_read_packet
.subsections_via_symbols
