	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function coda_buf_queue
_coda_buf_queue:                        ## @coda_buf_queue
	.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	%rdi, %r14
	callq	_to_vb2_v4l2_buffer
	movq	%rax, %r15
	movq	(%r14), %rdi
	callq	_vb2_get_drv_priv
	movq	%rax, %r13
	movq	(%r14), %rbx
	movq	(%rbx), %rsi
	movq	%rax, %rdi
	callq	_get_q_data
	cmpq	$0, 64(%r13)
	je	LBB0_15
## %bb.1:
	movq	%rax, %r12
	movq	(%rbx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_15
## %bb.2:
	movq	%r14, %rdi
	xorl	%esi, %esi
	callq	_vb2_get_plane_payload
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movq	%r13, %rdi
	callq	_coda_bit_stream_end_flag
LBB0_4:
	movq	(%r12), %rax
	movq	_V4L2_PIX_FMT_H264@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.5:
	cmpl	$0, 56(%r13)
	jne	LBB0_7
## %bb.6:
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_coda_sps_parse_profile
	movl	52(%r13), %edx
	movl	56(%r13), %esi
	movq	%r13, %rdi
	callq	_coda_update_profile_level_ctrls
LBB0_7:
	leaq	48(%r13), %r12
	movq	%r12, %rdi
	callq	_mutex_lock
	movl	8(%r13), %edi
	movq	%r15, %rsi
	callq	_v4l2_m2m_buf_queue
	movq	(%r14), %rdi
	callq	_vb2_is_streaming
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	%r13, %rdi
	xorl	%esi, %esi
	callq	_coda_fill_bitstream
LBB0_9:
	movq	%r12, %rdi
	callq	_mutex_unlock
	cmpq	$0, 16(%r13)
	je	LBB0_10
LBB0_19:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	(%r13), %rax
	movq	_CODA_INST_ENCODER@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.16:
	movq	(%rbx), %rax
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_18
## %bb.17:
	movslq	12(%r13), %rax
	leal	1(%rax), %ecx
	movl	%ecx, 12(%r13)
	movq	%rax, (%r15)
LBB0_18:
	movl	8(%r13), %edi
	movq	%r15, %rsi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_v4l2_m2m_buf_queue             ## TAILCALL
LBB0_10:
	movq	(%r14), %rdi
	callq	_vb2_is_streaming
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	movq	40(%r13), %rax
	cmpq	$0, (%rax)
	je	LBB0_13
## %bb.12:
	movq	32(%r13), %rax
	movl	(%rax), %edi
	movq	%r13, %r14
	addq	$24, %r14
	movq	%r14, %rsi
	callq	_queue_work
	movq	%r14, %rdi
	callq	_flush_work
LBB0_13:
	cmpq	$0, 16(%r13)
	je	LBB0_19
## %bb.14:
	movq	%r13, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_coda_queue_source_change_event ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_V4L2_PIX_FMT_H264,8,3          ## @V4L2_PIX_FMT_H264
	.comm	_CODA_INST_ENCODER,8,3          ## @CODA_INST_ENCODER
	.no_dead_strip	_coda_buf_queue
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function coda_buf_queue
_coda_buf_queue:                        ; @coda_buf_queue
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x20, x0
	bl	_to_vb2_v4l2_buffer
	mov	x21, x0
	ldr	x0, [x20]
	bl	_vb2_get_drv_priv
	mov	x19, x0
	ldr	x23, [x20]
	ldr	x1, [x23]
	bl	_get_q_data
	ldr	x8, [x19, #64]
	cbz	x8, LBB0_11
; %bb.1:
	ldr	x8, [x23]
Lloh0:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh1:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_11
; %bb.2:
	mov	x22, x0
	mov	x0, x20
	mov	w1, #0
	bl	_vb2_get_plane_payload
	cbnz	x0, LBB0_4
; %bb.3:
	mov	x0, x19
	bl	_coda_bit_stream_end_flag
LBB0_4:
	ldr	x8, [x22]
Lloh3:
	adrp	x9, _V4L2_PIX_FMT_H264@GOTPAGE
Lloh4:
	ldr	x9, [x9, _V4L2_PIX_FMT_H264@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.5:
	ldr	w8, [x19, #56]
	cbnz	w8, LBB0_7
; %bb.6:
	mov	x0, x19
	mov	x1, x20
	bl	_coda_sps_parse_profile
	ldp	w2, w1, [x19, #52]
	mov	x0, x19
	bl	_coda_update_profile_level_ctrls
LBB0_7:
	add	x22, x19, #48
	mov	x0, x22
	bl	_mutex_lock
	ldr	w0, [x19, #8]
	mov	x1, x21
	bl	_v4l2_m2m_buf_queue
	ldr	x0, [x20]
	bl	_vb2_is_streaming
	cbz	x0, LBB0_9
; %bb.8:
	mov	x0, x19
	mov	x1, #0
	bl	_coda_fill_bitstream
LBB0_9:
	mov	x0, x22
	bl	_mutex_unlock
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_15
LBB0_10:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
LBB0_11:
	ldr	x8, [x19]
Lloh6:
	adrp	x9, _CODA_INST_ENCODER@GOTPAGE
Lloh7:
	ldr	x9, [x9, _CODA_INST_ENCODER@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:
	ldr	x8, [x23]
Lloh9:
	adrp	x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGE
Lloh10:
	ldr	x9, [x9, _V4L2_BUF_TYPE_VIDEO_OUTPUT@GOTPAGEOFF]
Lloh11:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.13:
	ldrsw	x8, [x19, #12]
	add	w9, w8, #1
	str	w9, [x19, #12]
	str	x8, [x21]
LBB0_14:
	ldr	w0, [x19, #8]
	mov	x1, x21
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_v4l2_m2m_buf_queue
LBB0_15:
	ldr	x0, [x20]
	bl	_vb2_is_streaming
	cbz	x0, LBB0_18
; %bb.16:
	ldr	x8, [x19, #40]
	ldr	x8, [x8]
	cbz	x8, LBB0_18
; %bb.17:
	ldr	x8, [x19, #32]
	ldr	w0, [x8]
	add	x20, x19, #24
	mov	x1, x20
	bl	_queue_work
	mov	x0, x20
	bl	_flush_work
LBB0_18:
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_10
; %bb.19:
	mov	x0, x19
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	b	_coda_queue_source_change_event
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT,8,3 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT
	.comm	_V4L2_PIX_FMT_H264,8,3          ; @V4L2_PIX_FMT_H264
	.comm	_CODA_INST_ENCODER,8,3          ; @CODA_INST_ENCODER
	.no_dead_strip	_coda_buf_queue
.subsections_via_symbols
