	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function get_packets
_get_packets:                           ## @get_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	$24, %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), %r13
	leaq	-56(%rbp), %rbx
	movq	%rbx, %rdi
	callq	_av_init_packet
	movl	4(%r13), %edi
	movq	%rbx, %rsi
	callq	_avcodec_receive_packet
	movl	%eax, %ebx
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	cmpl	%eax, %ebx
	je	LBB0_9
## %bb.1:
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	je	LBB0_9
## %bb.2:
	leaq	-56(%rbp), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	testl	%ebx, %ebx
	jns	LBB0_5
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=1
	leaq	L_.str(%rip), %rdi
	callq	_hb_log
LBB0_5:                                 ##   in Loop: Header=BB0_3 Depth=1
	movl	-52(%rbp), %edi
	callq	_hb_buffer_init
	movq	%rax, %rbx
	movl	40(%rax), %edx
	movl	44(%rax), %edi
	movl	-44(%rbp), %esi
	callq	_memcpy
	movl	-52(%rbp), %eax
	movl	-48(%rbp), %r15d
	movl	%eax, 40(%rbx)
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_get_frame_start
	movl	%eax, 32(%rbx)
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_get_frame_duration
	movq	%rax, 16(%rbx)
	addq	%rax, 24(%rbx)
	movq	_HB_FLAG_FRAMETYPE_REF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	movq	$0, 8(%rbx)
	movq	_AV_PKT_FLAG_KEY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, -56(%rbp)
	je	LBB0_7
## %bb.6:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_HB_FLAG_FRAMETYPE_KEY@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, (%rbx)
	movl	(%r13), %edi
	movq	%rbx, %rsi
	callq	_hb_chapter_dequeue
LBB0_7:                                 ##   in Loop: Header=BB0_3 Depth=1
	movq	%r13, %rdi
	movq	%rbx, %rsi
	callq	_process_delay_list
	movq	%r14, %rdi
	movq	%rax, %rsi
	callq	_hb_buffer_list_append
	movq	%r12, %rdi
	callq	_av_packet_unref
	movq	%r12, %rdi
	callq	_av_init_packet
	movl	4(%r13), %edi
	movq	%r12, %rsi
	callq	_avcodec_receive_packet
	movl	%eax, %ebx
	movq	_EAGAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_AVERROR
	cmpl	%eax, %ebx
	je	LBB0_9
## %bb.8:                               ##   in Loop: Header=BB0_3 Depth=1
	movq	_AVERROR_EOF@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ebx
	jne	LBB0_3
LBB0_9:
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EAGAIN,4,2                     ## @EAGAIN
	.comm	_AVERROR_EOF,4,2                ## @AVERROR_EOF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"encavcodec: avcodec_receive_packet failed"

	.comm	_HB_FLAG_FRAMETYPE_REF,4,2      ## @HB_FLAG_FRAMETYPE_REF
	.comm	_AV_PKT_FLAG_KEY,4,2            ## @AV_PKT_FLAG_KEY
	.comm	_HB_FLAG_FRAMETYPE_KEY,4,2      ## @HB_FLAG_FRAMETYPE_KEY
	.no_dead_strip	_get_packets
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function get_packets
_get_packets:                           ; @get_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	x19, x1
	ldr	x20, [x0]
	mov	x0, sp
	bl	_av_init_packet
	ldr	w0, [x20, #4]
	mov	x1, sp
	bl	_avcodec_receive_packet
	mov	x22, x0
Lloh0:
	adrp	x24, _EAGAIN@GOTPAGE
Lloh1:
	ldr	x24, [x24, _EAGAIN@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_AVERROR
Lloh2:
	adrp	x25, _AVERROR_EOF@GOTPAGE
Lloh3:
	ldr	x25, [x25, _AVERROR_EOF@GOTPAGEOFF]
	ldr	w8, [x25]
	cmp	w22, w0
	ccmp	w22, w8, #4, ne
	b.eq	LBB0_8
; %bb.1:
Lloh4:
	adrp	x21, l_.str@PAGE
Lloh5:
	add	x21, x21, l_.str@PAGEOFF
Lloh6:
	adrp	x26, _HB_FLAG_FRAMETYPE_REF@GOTPAGE
Lloh7:
	ldr	x26, [x26, _HB_FLAG_FRAMETYPE_REF@GOTPAGEOFF]
Lloh8:
	adrp	x27, _AV_PKT_FLAG_KEY@GOTPAGE
Lloh9:
	ldr	x27, [x27, _AV_PKT_FLAG_KEY@GOTPAGEOFF]
Lloh10:
	adrp	x28, _HB_FLAG_FRAMETYPE_KEY@GOTPAGE
Lloh11:
	ldr	x28, [x28, _HB_FLAG_FRAMETYPE_KEY@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	tbz	w22, #31, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x21
	bl	_hb_log
LBB0_4:                                 ;   in Loop: Header=BB0_2 Depth=1
	ldr	w0, [sp, #4]
	bl	_hb_buffer_init
	mov	x22, x0
	ldr	w1, [sp, #12]
	ldr	w0, [x0, #44]
	ldr	w2, [x22, #40]
	bl	_memcpy
	ldp	w8, w23, [sp, #4]
	str	w8, [x22, #40]
	mov	x0, x20
	mov	x1, x23
	bl	_get_frame_start
	str	w0, [x22, #32]
	mov	x0, x20
	mov	x1, x23
	bl	_get_frame_duration
	ldr	x8, [x22, #24]
	add	x8, x8, x0
	stp	x0, x8, [x22, #16]
	ldr	w8, [x26]
	str	w8, [x22]
	str	xzr, [x22, #8]
	ldr	w9, [sp]
	ldr	w10, [x27]
	tst	w10, w9
	b.eq	LBB0_6
; %bb.5:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w9, [x28]
	orr	w8, w9, w8
	str	w8, [x22]
	ldr	w0, [x20]
	mov	x1, x22
	bl	_hb_chapter_dequeue
LBB0_6:                                 ;   in Loop: Header=BB0_2 Depth=1
	mov	x0, x20
	mov	x1, x22
	bl	_process_delay_list
	mov	x1, x0
	mov	x0, x19
	bl	_hb_buffer_list_append
	mov	x0, sp
	bl	_av_packet_unref
	mov	x0, sp
	bl	_av_init_packet
	ldr	w0, [x20, #4]
	mov	x1, sp
	bl	_avcodec_receive_packet
	mov	x22, x0
	ldr	w0, [x24]
	bl	_AVERROR
	cmp	w22, w0
	b.eq	LBB0_8
; %bb.7:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	cmp	w22, w8
	b.ne	LBB0_2
LBB0_8:
	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 AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_EAGAIN,4,2                     ; @EAGAIN
	.comm	_AVERROR_EOF,4,2                ; @AVERROR_EOF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"encavcodec: avcodec_receive_packet failed"

	.comm	_HB_FLAG_FRAMETYPE_REF,4,2      ; @HB_FLAG_FRAMETYPE_REF
	.comm	_AV_PKT_FLAG_KEY,4,2            ; @AV_PKT_FLAG_KEY
	.comm	_HB_FLAG_FRAMETYPE_KEY,4,2      ; @HB_FLAG_FRAMETYPE_KEY
	.no_dead_strip	_get_packets
.subsections_via_symbols
