	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function submit_packet
_submit_packet:                         ## @submit_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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	56(%rdi), %r14
	movq	8(%r14), %r12
	cmpl	$0, (%rdx)
	jne	LBB0_2
## %bb.1:
	movq	16(%r13), %rax
	movq	32(%rax), %rax
	movq	_AV_CODEC_CAP_DELAY@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%ecx, (%rax)
	je	LBB0_29
LBB0_2:
	movq	%rdx, -64(%rbp)                 ## 8-byte Spill
	leaq	40(%r13), %r15
	movq	%r15, %rdi
	callq	_pthread_mutex_lock
	movq	16(%r13), %rdi
	movq	%rbx, %rsi
	callq	_update_context_from_user
	testl	%eax, %eax
	je	LBB0_4
LBB0_3:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_pthread_mutex_unlock
	jmp	LBB0_30
LBB0_4:
	movq	16(%r13), %rax
	movq	_FF_DEBUG_THREADS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	xorl	%esi, %esi
	andl	(%rax), %ecx
	leaq	52(%r13), %rdi
	setne	%sil
	movq	_memory_order_relaxed@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_atomic_store_explicit
	movq	%r13, %rdi
	callq	_release_delayed_buffers
	testq	%r12, %r12
	je	LBB0_11
## %bb.5:
	movq	%r15, -56(%rbp)                 ## 8-byte Spill
	leaq	8(%r12), %rbx
	movq	%rbx, %rdi
	callq	_atomic_load
	movq	_STATE_SETTING_UP@GOTPCREL(%rip), %r15
	cmpq	(%r15), %rax
	jne	LBB0_10
## %bb.6:
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, %rdi
	callq	_pthread_mutex_lock
	movq	%rbx, %rdi
	callq	_atomic_load
	cmpq	(%r15), %rax
	jne	LBB0_9
## %bb.7:
	leaq	4(%r12), %r14
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_pthread_cond_wait
	movq	%rbx, %rdi
	callq	_atomic_load
	cmpq	(%r15), %rax
	je	LBB0_8
LBB0_9:
	movq	%r12, %rdi
	callq	_pthread_mutex_unlock
	movq	-48(%rbp), %r14                 ## 8-byte Reload
LBB0_10:
	movq	16(%r13), %rdi
	movq	16(%r12), %rsi
	xorl	%edx, %edx
	callq	_update_context_from_thread
	testl	%eax, %eax
	movq	-56(%rbp), %r15                 ## 8-byte Reload
	jne	LBB0_3
LBB0_11:
	leaq	48(%r13), %rbx
	movq	%rbx, %rdi
	callq	_av_packet_unref
	movq	%rbx, %rdi
	movq	-64(%rbp), %rsi                 ## 8-byte Reload
	callq	_av_packet_ref
	testl	%eax, %eax
	js	LBB0_12
## %bb.13:
	movq	%r14, %r12
	leaq	8(%r13), %r14
	movq	_STATE_SETTING_UP@GOTPCREL(%rip), %rbx
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_atomic_store
	leaq	44(%r13), %rdi
	callq	_pthread_cond_signal
	movq	%r15, %rdi
	callq	_pthread_mutex_unlock
	movq	16(%r13), %rax
	cmpl	$0, 24(%rax)
	je	LBB0_14
LBB0_28:
	movq	%r13, 8(%r12)
	incl	(%r12)
LBB0_29:
	xorl	%ebx, %ebx
	jmp	LBB0_30
LBB0_12:
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_pthread_mutex_unlock
	movq	16(%r13), %rdi
	movq	_AV_LOG_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	callq	_av_log
LBB0_30:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movq	8(%rax), %rcx
	movq	_avcodec_default_get_format@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_16
## %bb.15:
	movq	16(%rax), %rax
	movq	_avcodec_default_get_buffer2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_28
LBB0_16:
	movq	%r14, %rdi
	callq	_atomic_load
	movq	_STATE_SETUP_FINISHED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_28
## %bb.17:
	leaq	4(%r13), %r15
	jmp	LBB0_18
LBB0_25:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	16(%r13), %rdi
	movl	12(%r13), %esi
	callq	_ff_get_format
	movl	%eax, 24(%r13)
LBB0_26:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	(%rbx), %rsi
	movq	%r14, %rdi
	callq	_atomic_store
	movq	%r15, %rdi
	callq	_pthread_cond_signal
LBB0_27:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, %rdi
	callq	_pthread_mutex_unlock
	movq	%r14, %rdi
	callq	_atomic_load
	movq	_STATE_SETUP_FINISHED@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_28
LBB0_18:                                ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_21 Depth 2
	movq	%r14, %rdi
	callq	_atomic_load
	movq	_STATE_INPUT_READY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	je	LBB0_28
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	%r13, %rdi
	callq	_pthread_mutex_lock
	.p2align	4, 0x90
LBB0_21:                                ##   Parent Loop BB0_18 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	movq	%r14, %rdi
	callq	_atomic_load
	cmpq	(%rbx), %rax
	jne	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_21 Depth=2
	movq	%r15, %rdi
	movq	%r13, %rsi
	callq	_pthread_cond_wait
	jmp	LBB0_21
	.p2align	4, 0x90
LBB0_22:                                ##   in Loop: Header=BB0_18 Depth=1
	movq	_memory_order_acquire@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	_atomic_load_explicit
	cmpl	$128, %eax
	je	LBB0_25
## %bb.23:                              ##   in Loop: Header=BB0_18 Depth=1
	cmpl	$129, %eax
	jne	LBB0_27
## %bb.24:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	16(%r13), %rdi
	movl	32(%r13), %esi
	movl	28(%r13), %edx
	callq	_ff_get_buffer
	movl	%eax, 36(%r13)
	jmp	LBB0_26
	.cfi_endproc
                                        ## -- End function
	.comm	_AV_CODEC_CAP_DELAY,4,2         ## @AV_CODEC_CAP_DELAY
	.comm	_FF_DEBUG_THREADS,4,2           ## @FF_DEBUG_THREADS
	.comm	_memory_order_relaxed,4,2       ## @memory_order_relaxed
	.comm	_STATE_SETTING_UP,8,3           ## @STATE_SETTING_UP
	.comm	_AV_LOG_ERROR,4,2               ## @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"av_packet_ref() failed in submit_packet()\n"

	.comm	_avcodec_default_get_format,8,3 ## @avcodec_default_get_format
	.comm	_avcodec_default_get_buffer2,8,3 ## @avcodec_default_get_buffer2
	.comm	_STATE_SETUP_FINISHED,8,3       ## @STATE_SETUP_FINISHED
	.comm	_STATE_INPUT_READY,8,3          ## @STATE_INPUT_READY
	.comm	_memory_order_acquire,4,2       ## @memory_order_acquire
	.no_dead_strip	_submit_packet
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function submit_packet
_submit_packet:                         ; @submit_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	x20, x2
	mov	x23, x1
	mov	x19, x0
	ldr	x25, [x0, #56]
	ldr	x22, [x25, #8]
	ldr	w8, [x2]
	cbnz	w8, LBB0_2
; %bb.1:
	ldr	x8, [x19, #16]
	ldr	x8, [x8, #32]
	ldr	w8, [x8]
Lloh0:
	adrp	x9, _AV_CODEC_CAP_DELAY@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AV_CODEC_CAP_DELAY@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
LBB0_2:
	add	x21, x19, #40
	mov	x0, x21
	bl	_pthread_mutex_lock
	ldr	x0, [x19, #16]
	mov	x1, x23
	bl	_update_context_from_user
	cbz	w0, LBB0_5
LBB0_3:
	mov	x23, x0
	mov	x0, x21
	bl	_pthread_mutex_unlock
LBB0_4:
	mov	x0, x23
	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_5:
	add	x0, x19, #52
	ldr	x8, [x19, #16]
	ldr	w8, [x8]
Lloh3:
	adrp	x9, _FF_DEBUG_THREADS@GOTPAGE
Lloh4:
	ldr	x9, [x9, _FF_DEBUG_THREADS@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	cset	w1, ne
Lloh6:
	adrp	x8, _memory_order_relaxed@GOTPAGE
Lloh7:
	ldr	x8, [x8, _memory_order_relaxed@GOTPAGEOFF]
Lloh8:
	ldr	w2, [x8]
	bl	_atomic_store_explicit
	mov	x0, x19
	bl	_release_delayed_buffers
Lloh9:
	adrp	x26, _STATE_SETTING_UP@GOTPAGE
Lloh10:
	ldr	x26, [x26, _STATE_SETTING_UP@GOTPAGEOFF]
	cbz	x22, LBB0_12
; %bb.6:
	add	x23, x22, #8
	mov	x0, x23
	bl	_atomic_load
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_11
; %bb.7:
	mov	x0, x22
	bl	_pthread_mutex_lock
	mov	x0, x23
	bl	_atomic_load
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_10
; %bb.8:
	add	x24, x22, #4
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x24
	mov	x1, x22
	bl	_pthread_cond_wait
	mov	x0, x23
	bl	_atomic_load
	ldr	x8, [x26]
	cmp	x0, x8
	b.eq	LBB0_9
LBB0_10:
	mov	x0, x22
	bl	_pthread_mutex_unlock
LBB0_11:
	ldr	x0, [x19, #16]
	ldr	x1, [x22, #16]
	mov	w2, #0
	bl	_update_context_from_thread
	cbnz	w0, LBB0_3
LBB0_12:
	add	x22, x19, #48
	mov	x0, x22
	bl	_av_packet_unref
	mov	x0, x22
	mov	x1, x20
	bl	_av_packet_ref
	tbnz	w0, #31, LBB0_16
; %bb.13:
	add	x20, x19, #8
	ldr	x1, [x26]
	mov	x0, x20
	bl	_atomic_store
	add	x0, x19, #44
	bl	_pthread_cond_signal
	mov	x0, x21
	bl	_pthread_mutex_unlock
	ldr	x8, [x19, #16]
	ldr	w9, [x8, #24]
	cbz	w9, LBB0_17
LBB0_14:
	mov	w23, #0
	str	x19, [x25, #8]
	ldr	w8, [x25]
	add	w8, w8, #1
	str	w8, [x25]
	b	LBB0_4
LBB0_15:
	mov	w23, #0
	b	LBB0_4
LBB0_16:
	mov	x23, x0
	mov	x0, x21
	bl	_pthread_mutex_unlock
	ldr	x0, [x19, #16]
Lloh11:
	adrp	x8, _AV_LOG_ERROR@GOTPAGE
Lloh12:
	ldr	x8, [x8, _AV_LOG_ERROR@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
Lloh14:
	adrp	x2, l_.str@PAGE
Lloh15:
	add	x2, x2, l_.str@PAGEOFF
	bl	_av_log
	b	LBB0_4
LBB0_17:
	ldr	x9, [x8, #8]
Lloh16:
	adrp	x10, _avcodec_default_get_format@GOTPAGE
Lloh17:
	ldr	x10, [x10, _avcodec_default_get_format@GOTPAGEOFF]
Lloh18:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_19
; %bb.18:
	ldr	x8, [x8, #16]
Lloh19:
	adrp	x9, _avcodec_default_get_buffer2@GOTPAGE
Lloh20:
	ldr	x9, [x9, _avcodec_default_get_buffer2@GOTPAGEOFF]
Lloh21:
	ldr	x9, [x9]
	cmp	x8, x9
	b.eq	LBB0_14
LBB0_19:
	mov	x0, x20
	bl	_atomic_load
Lloh22:
	adrp	x22, _STATE_SETUP_FINISHED@GOTPAGE
Lloh23:
	ldr	x22, [x22, _STATE_SETUP_FINISHED@GOTPAGEOFF]
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_14
; %bb.20:
	add	x21, x19, #4
Lloh24:
	adrp	x23, _STATE_INPUT_READY@GOTPAGE
Lloh25:
	ldr	x23, [x23, _STATE_INPUT_READY@GOTPAGEOFF]
Lloh26:
	adrp	x24, _memory_order_acquire@GOTPAGE
Lloh27:
	ldr	x24, [x24, _memory_order_acquire@GOTPAGEOFF]
	b	LBB0_24
LBB0_21:                                ;   in Loop: Header=BB0_24 Depth=1
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #12]
	bl	_ff_get_format
	str	w0, [x19, #24]
LBB0_22:                                ;   in Loop: Header=BB0_24 Depth=1
	ldr	x1, [x26]
	mov	x0, x20
	bl	_atomic_store
	mov	x0, x21
	bl	_pthread_cond_signal
LBB0_23:                                ;   in Loop: Header=BB0_24 Depth=1
	mov	x0, x19
	bl	_pthread_mutex_unlock
	mov	x0, x20
	bl	_atomic_load
	ldr	x8, [x22]
	cmp	x0, x8
	b.eq	LBB0_14
LBB0_24:                                ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_26 Depth 2
	mov	x0, x20
	bl	_atomic_load
	ldr	x8, [x23]
	cmp	x0, x8
	b.eq	LBB0_14
; %bb.25:                               ;   in Loop: Header=BB0_24 Depth=1
	mov	x0, x19
	bl	_pthread_mutex_lock
LBB0_26:                                ;   Parent Loop BB0_24 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	mov	x0, x20
	bl	_atomic_load
	ldr	x8, [x26]
	cmp	x0, x8
	b.ne	LBB0_28
; %bb.27:                               ;   in Loop: Header=BB0_26 Depth=2
	mov	x0, x21
	mov	x1, x19
	bl	_pthread_cond_wait
	b	LBB0_26
LBB0_28:                                ;   in Loop: Header=BB0_24 Depth=1
	ldr	w1, [x24]
	mov	x0, x20
	bl	_atomic_load_explicit
	cmp	w0, #128
	b.eq	LBB0_21
; %bb.29:                               ;   in Loop: Header=BB0_24 Depth=1
	cmp	w0, #129
	b.ne	LBB0_23
; %bb.30:                               ;   in Loop: Header=BB0_24 Depth=1
	ldr	x0, [x19, #16]
	ldp	w2, w1, [x19, #28]
	bl	_ff_get_buffer
	str	w0, [x19, #36]
	b	LBB0_22
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.loh AdrpLdrGotLdr	Lloh19, Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.cfi_endproc
                                        ; -- End function
	.comm	_AV_CODEC_CAP_DELAY,4,2         ; @AV_CODEC_CAP_DELAY
	.comm	_FF_DEBUG_THREADS,4,2           ; @FF_DEBUG_THREADS
	.comm	_memory_order_relaxed,4,2       ; @memory_order_relaxed
	.comm	_STATE_SETTING_UP,8,3           ; @STATE_SETTING_UP
	.comm	_AV_LOG_ERROR,4,2               ; @AV_LOG_ERROR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"av_packet_ref() failed in submit_packet()\n"

	.comm	_avcodec_default_get_format,8,3 ; @avcodec_default_get_format
	.comm	_avcodec_default_get_buffer2,8,3 ; @avcodec_default_get_buffer2
	.comm	_STATE_SETUP_FINISHED,8,3       ; @STATE_SETUP_FINISHED
	.comm	_STATE_INPUT_READY,8,3          ; @STATE_INPUT_READY
	.comm	_memory_order_acquire,4,2       ; @memory_order_acquire
	.no_dead_strip	_submit_packet
.subsections_via_symbols
