	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sdr2_read_packet
_sdr2_read_packet:                      ## @sdr2_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, %r12
	movq	%rdi, %rbx
	movl	(%rdi), %edi
	callq	_avio_tell
	movq	%rax, %r14
	movl	(%rbx), %edi
	callq	_avio_rl32
	movq	%rax, %r15
	movl	(%rbx), %edi
	movl	$4, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	callq	_avio_rl32
	movq	%rax, %r13
	cmpl	$52, %r13d
	ja	LBB0_2
## %bb.1:
	movq	_AVERROR_INVALIDDATA@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	jmp	LBB0_10
LBB0_2:
	movl	(%rbx), %edi
	movl	$6, %esi
	callq	_avio_skip
	movl	(%rbx), %edi
	callq	_avio_rl32
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movl	(%rbx), %edi
	movl	$30, %esi
	callq	_avio_skip
	movq	_FIRST@GOTPCREL(%rip), %rax
	cmpq	(%rax), %r14
	jne	LBB0_7
## %bb.3:
	leal	-28(%r13), %esi
	movq	%r12, %rdi
	callq	_av_new_packet
	testq	%rax, %rax
	js	LBB0_11
## %bb.4:
	addl	$-52, %r13d
	movq	16(%r12), %rdi
	movq	_header@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edx
	callq	_memcpy
	movl	(%rbx), %edi
	movq	16(%r12), %rsi
	addq	$24, %rsi
	movl	%r13d, %edx
	callq	_avio_read
	movl	%eax, %ebx
	testl	%eax, %eax
	js	LBB0_5
## %bb.6:
	movl	%ebx, %esi
	addl	$24, %esi
	movq	%r12, %rdi
	callq	_av_shrink_packet
	jmp	LBB0_8
LBB0_7:
	movl	(%rbx), %edi
	addl	$-52, %r13d
	movq	%r12, %rsi
	movl	%r13d, %edx
	callq	_av_get_packet
	movl	%eax, %ebx
LBB0_8:
	xorl	%eax, %eax
	cmpl	$0, -48(%rbp)                   ## 4-byte Folded Reload
	setne	%al
	movl	%eax, (%r12)
	movq	%r14, 8(%r12)
	testl	$4096, %r15d                    ## imm = 0x1000
	je	LBB0_10
## %bb.9:
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 4(%r12)
	jmp	LBB0_10
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_AVERROR                        ## TAILCALL
LBB0_5:
	movq	%r12, %rdi
	callq	_av_packet_unref
LBB0_10:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ## @AVERROR_INVALIDDATA
	.comm	_FIRST,8,3                      ## @FIRST
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_header,4,2                     ## @header
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.no_dead_strip	_sdr2_read_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sdr2_read_packet
_sdr2_read_packet:                      ; @sdr2_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	x22, x0
	ldr	w0, [x0]
	bl	_avio_tell
	mov	x20, x0
	ldr	w0, [x22]
	bl	_avio_rl32
	mov	x21, x0
	ldr	w0, [x22]
	mov	w1, #4
	bl	_avio_skip
	ldr	w0, [x22]
	bl	_avio_rl32
	mov	x25, x0
	subs	w24, w25, #52
	b.hi	LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _AVERROR_INVALIDDATA@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AVERROR_INVALIDDATA@GOTPAGEOFF]
Lloh2:
	ldr	w22, [x8]
	b	LBB0_11
LBB0_2:
	ldr	w0, [x22]
	mov	w1, #6
	bl	_avio_skip
	ldr	w0, [x22]
	bl	_avio_rl32
	mov	x23, x0
	ldr	w0, [x22]
	mov	w1, #30
	bl	_avio_skip
Lloh3:
	adrp	x8, _FIRST@GOTPAGE
Lloh4:
	ldr	x8, [x8, _FIRST@GOTPAGEOFF]
Lloh5:
	ldr	x8, [x8]
	cmp	x20, x8
	b.ne	LBB0_6
; %bb.3:
	sub	w1, w25, #28
	mov	x0, x19
	bl	_av_new_packet
	tbnz	x0, #63, LBB0_9
; %bb.4:
	ldr	x0, [x19, #16]
Lloh6:
	adrp	x8, _header@GOTPAGE
Lloh7:
	ldr	x8, [x8, _header@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	mov	w2, #24
	bl	_memcpy
	ldr	w0, [x22]
	ldr	x8, [x19, #16]
	add	x1, x8, #24
	mov	x2, x24
	bl	_avio_read
	mov	x22, x0
	tbnz	w0, #31, LBB0_10
; %bb.5:
	add	w1, w22, #24
	mov	x0, x19
	bl	_av_shrink_packet
	b	LBB0_7
LBB0_6:
	ldr	w0, [x22]
	mov	x1, x19
	mov	x2, x24
	bl	_av_get_packet
	mov	x22, x0
LBB0_7:
	cmp	w23, #0
	cset	w8, ne
	str	w8, [x19]
	str	x20, [x19, #8]
	tbz	w21, #12, LBB0_11
; %bb.8:
Lloh9:
	adrp	x8, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh10:
	ldr	x8, [x8, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x19, #4]
	orr	w8, w9, w8
	str	w8, [x19, #4]
	b	LBB0_11
LBB0_9:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	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
LBB0_10:
	mov	x0, x19
	bl	_av_packet_unref
LBB0_11:
	mov	x0, x22
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_AVERROR_INVALIDDATA,4,2        ; @AVERROR_INVALIDDATA
	.comm	_FIRST,8,3                      ; @FIRST
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_header,4,2                     ; @header
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.no_dead_strip	_sdr2_read_packet
.subsections_via_symbols
