	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function read_packet_gme
_read_packet_gme:                       ## @read_packet_gme
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	(%rdi), %rbx
	movq	_AUDIO_PKT_SIZE@GOTPCREL(%rip), %r14
	movl	(%r14), %r12d
	movl	(%rbx), %edi
	callq	_gme_track_ended
	testq	%rax, %rax
	je	LBB0_4
## %bb.1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
LBB0_2:
	movl	(%rax), %eax
LBB0_3:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_4:
	movl	(%r14), %esi
	movq	%r15, %rdi
	callq	_av_new_packet
	testl	%eax, %eax
	js	LBB0_3
## %bb.5:
	movl	%r12d, %esi
	shrl	$31, %esi
	addl	%r12d, %esi
	sarl	%esi
	movl	(%rbx), %edi
	movq	8(%r15), %rdx
	callq	_gme_play
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	movq	_AVERROR_EXTERNAL@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_7:
	movl	(%r14), %eax
	movl	%eax, (%r15)
	xorl	%eax, %eax
	jmp	LBB0_3
	.cfi_endproc
                                        ## -- End function
	.comm	_AUDIO_PKT_SIZE,4,2             ## @AUDIO_PKT_SIZE
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.comm	_AVERROR_EXTERNAL,4,2           ## @AVERROR_EXTERNAL
	.no_dead_strip	_read_packet_gme
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function read_packet_gme
_read_packet_gme:                       ; @read_packet_gme
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x1
	ldr	x21, [x0]
Lloh0:
	adrp	x20, _AUDIO_PKT_SIZE@GOTPAGE
Lloh1:
	ldr	x20, [x20, _AUDIO_PKT_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #0
	cinc	w22, w8, lt
	ldr	w0, [x21]
	bl	_gme_track_ended
	cbz	x0, LBB0_4
; %bb.1:
Lloh2:
	adrp	x8, _AVERROR_EOF@GOTPAGE
Lloh3:
	ldr	x8, [x8, _AVERROR_EOF@GOTPAGEOFF]
LBB0_2:
	ldr	w0, [x8]
LBB0_3:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
LBB0_4:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_av_new_packet
	tbnz	w0, #31, LBB0_3
; %bb.5:
	asr	w1, w22, #1
	ldr	w0, [x21]
	ldr	x2, [x19, #8]
	bl	_gme_play
	cbz	x0, LBB0_7
; %bb.6:
Lloh4:
	adrp	x8, _AVERROR_EXTERNAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _AVERROR_EXTERNAL@GOTPAGEOFF]
	b	LBB0_2
LBB0_7:
	ldr	w8, [x20]
	str	w8, [x19]
	b	LBB0_3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_AUDIO_PKT_SIZE,4,2             ; @AUDIO_PKT_SIZE
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.comm	_AVERROR_EXTERNAL,4,2           ; @AVERROR_EXTERNAL
	.no_dead_strip	_read_packet_gme
.subsections_via_symbols
