	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function genh_read_packet
_genh_read_packet:                      ## @genh_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
	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	%rdi, %rbx
	movq	8(%rdi), %r12
	movq	16(%rdi), %rax
	movq	(%rax), %rax
	movq	(%rax), %r15
	cmpl	$1, (%r12)
	movq	(%r15), %rax
	movq	%rsi, -56(%rbp)                 ## 8-byte Spill
	jne	LBB0_13
## %bb.1:
	movq	_AV_CODEC_ID_ADPCM_THP@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_13
## %bb.2:
	cmpl	$2, 8(%r15)
	jl	LBB0_13
## %bb.3:
	movl	(%rbx), %edi
	callq	_avio_feof
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	jmp	LBB0_19
LBB0_13:
	movq	_AV_CODEC_ID_SDX2_DPCM@GOTPCREL(%rip), %rcx
	movl	(%rbx), %edi
	movl	12(%r15), %edx
	cmpq	(%rcx), %rax
	je	LBB0_16
## %bb.14:
	testl	%edx, %edx
	jne	LBB0_17
## %bb.15:
	movl	8(%r15), %edx
LBB0_16:
	shll	$10, %edx
LBB0_17:
	movq	%r14, %rsi
	callq	_av_get_packet
	movl	%eax, %ecx
LBB0_18:
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movq	$0, (%rax)
LBB0_19:
	movl	%ecx, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	movl	8(%r15), %esi
	shll	$3, %esi
	movq	%r14, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_6
## %bb.7:
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%r15, -64(%rbp)                 ## 8-byte Spill
	movq	%r12, -72(%rbp)                 ## 8-byte Spill
	movl	4(%r12), %r8d
	xorl	%ecx, %ecx
	movl	$8, %eax
	xorl	%edx, %edx
	idivl	%r8d
	testl	%eax, %eax
	jle	LBB0_18
## %bb.8:
	movq	-64(%rbp), %rax                 ## 8-byte Reload
	movl	8(%rax), %edi
	xorl	%eax, %eax
	movq	-56(%rbp), %r13                 ## 8-byte Reload
	movq	-72(%rbp), %r12                 ## 8-byte Reload
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_9 Depth=1
	incl	%ebx
	xorl	%ecx, %ecx
	movl	$8, %eax
	xorl	%edx, %edx
	idivl	%r8d
	cmpl	%eax, %ebx
	movl	%ebx, %eax
	jge	LBB0_18
LBB0_9:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_11 Depth 2
	testl	%edi, %edi
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movl	%eax, %ebx
	jle	LBB0_12
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	xorl	%r15d, %r15d
	movl	$1, %r14d
	.p2align	4, 0x90
LBB0_11:                                ##   Parent Loop BB0_9 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movl	(%rdx), %edi
	callq	_avio_r8
	movq	8(%r13), %rcx
	movl	4(%r12), %edx
	imull	%ebx, %edx
	addl	%r14d, %edx
	decl	%edx
	movslq	%edx, %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	callq	_avio_r8
	movq	8(%r13), %rcx
	movl	4(%r12), %r8d
	movl	%ebx, %edx
	imull	%r8d, %edx
	addl	%r14d, %edx
	movslq	%edx, %rdx
	movq	%rax, (%rcx,%rdx,8)
	movq	-48(%rbp), %rdx                 ## 8-byte Reload
	movq	-64(%rbp), %rcx                 ## 8-byte Reload
	incl	%r15d
	movl	8(%rcx), %edi
	addl	$8, %r14d
	cmpl	%edi, %r15d
	jl	LBB0_11
	jmp	LBB0_12
LBB0_6:
	movl	%eax, %ecx
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_ID_ADPCM_THP,8,3      ## @AV_CODEC_ID_ADPCM_THP
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AV_CODEC_ID_SDX2_DPCM,8,3      ## @AV_CODEC_ID_SDX2_DPCM
	.no_dead_strip	_genh_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function genh_read_packet
_genh_read_packet:                      ; @genh_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
	ldp	x22, x8, [x0, #8]
	ldr	x8, [x8]
	ldr	x21, [x8]
	ldr	w9, [x22]
	ldr	x8, [x21]
Lloh0:
	adrp	x10, _AV_CODEC_ID_ADPCM_THP@GOTPAGE
Lloh1:
	ldr	x10, [x10, _AV_CODEC_ID_ADPCM_THP@GOTPAGEOFF]
Lloh2:
	ldr	x10, [x10]
	cmp	w9, #1
	ccmp	x8, x10, #0, eq
	b.ne	LBB0_4
; %bb.1:
	ldr	w9, [x21, #8]
	cmp	w9, #2
	b.lt	LBB0_4
; %bb.2:
	ldr	w0, [x20]
	bl	_avio_feof
	cbz	x0, LBB0_11
; %bb.3:
Lloh3:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
Lloh5:
	ldr	w0, [x8]
	b	LBB0_10
LBB0_4:
Lloh6:
	adrp	x9, _AV_CODEC_ID_SDX2_DPCM@GOTPAGE
Lloh7:
	ldr	x9, [x9, _AV_CODEC_ID_SDX2_DPCM@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	ldr	w0, [x20]
	ldr	w2, [x21, #12]
	cmp	x8, x9
	b.ne	LBB0_6
; %bb.5:
	lsl	w2, w2, #10
	b	LBB0_8
LBB0_6:
	cbnz	w2, LBB0_8
; %bb.7:
	ldr	w8, [x21, #8]
	lsl	w2, w8, #10
LBB0_8:
	mov	x1, x19
	bl	_av_get_packet
LBB0_9:
	str	xzr, [x19]
LBB0_10:
	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_11:
	ldr	w8, [x21, #8]
	lsl	w1, w8, #3
	mov	x0, x19
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_10
; %bb.12:
	ldr	w8, [x22, #4]
	mov	w23, #8
	sdiv	w9, w23, w8
	cmp	w9, #1
	b.lt	LBB0_18
; %bb.13:
	mov	w24, #0
	ldr	w9, [x21, #8]
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_15 Depth=1
	add	w24, w24, #1
	sdiv	w10, w23, w8
	cmp	w24, w10
	b.ge	LBB0_18
LBB0_15:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_17 Depth 2
	cmp	w9, #1
	b.lt	LBB0_14
; %bb.16:                               ;   in Loop: Header=BB0_15 Depth=1
	mov	w25, #0
	mov	w26, #1
LBB0_17:                                ;   Parent Loop BB0_15 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	ldr	w0, [x20]
	bl	_avio_r8
	ldr	x8, [x19, #8]
	ldr	w9, [x22, #4]
	madd	w9, w24, w9, w26
	sub	w9, w9, #1
	str	x0, [x8, w9, sxtw #3]
	ldr	w0, [x20]
	bl	_avio_r8
	ldr	x9, [x19, #8]
	ldr	w8, [x22, #4]
	madd	w10, w24, w8, w26
	str	x0, [x9, w10, sxtw #3]
	add	w25, w25, #1
	ldr	w9, [x21, #8]
	add	w26, w26, #8
	cmp	w25, w9
	b.lt	LBB0_17
	b	LBB0_14
LBB0_18:
	mov	w0, #0
	b	LBB0_9
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_ID_ADPCM_THP,8,3      ; @AV_CODEC_ID_ADPCM_THP
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AV_CODEC_ID_SDX2_DPCM,8,3      ; @AV_CODEC_ID_SDX2_DPCM
	.no_dead_strip	_genh_read_packet
.subsections_via_symbols
