	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function __vpe_s_fmt
___vpe_s_fmt:                           ## @__vpe_s_fmt
	.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
	subq	$16, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r12
	movq	%rdi, %r14
	movl	4(%rdi), %edi
	movl	(%rsi), %esi
	callq	_v4l2_m2m_get_vq
	testq	%rax, %rax
	je	LBB0_1
## %bb.3:
	movq	%rax, %rdi
	callq	_vb2_is_busy
	testq	%rax, %rax
	je	LBB0_5
## %bb.4:
	movl	(%r14), %edi
	leaq	L_.str(%rip), %rsi
	callq	_vpe_err
	movq	_EBUSY@GOTPCREL(%rip), %rax
	jmp	LBB0_2
LBB0_5:
	movl	(%r12), %esi
	movq	%r14, %rdi
	callq	_get_q_data
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	movq	%rax, %r15
	movq	%r12, %rdi
	callq	_find_format
	movq	%rax, 32(%r15)
	movl	44(%r12), %ecx
	movl	%ecx, 40(%r15)
	movl	8(%r12), %r8d
	movl	%r8d, (%r15)
	movl	40(%r12), %edx
	movl	%edx, 80(%r15)
	movq	16(%r12), %r9
	movq	%r9, 8(%r15)
	movl	24(%r12), %edx
	movl	%edx, 16(%r15)
	testl	%edx, %edx
	jle	LBB0_10
## %bb.7:
	movq	32(%r12), %rcx
	movq	24(%r15), %rsi
	movq	72(%r15), %rdi
	xorl	%edx, %edx
	.p2align	4, 0x90
LBB0_8:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%rcx,%rdx,8), %ebx
	movl	%ebx, (%rsi,%rdx,4)
	movl	(%rcx,%rdx,8), %ebx
	movl	%ebx, (%rdi,%rdx,4)
	incq	%rdx
	movslq	24(%r12), %rbx
	cmpq	%rbx, %rdx
	jl	LBB0_8
## %bb.9:
	movl	(%r15), %r8d
	movl	40(%r15), %ecx
LBB0_10:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 56(%r15)
	movl	%ecx, 52(%r15)
	movl	%r8d, 48(%r15)
	movq	_V4L2_FIELD_ALTERNATE@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %r9
	jne	LBB0_13
## %bb.11:
	movq	_Q_DATA_INTERLACED_ALTERNATE@GOTPCREL(%rip), %rsi
	jmp	LBB0_12
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
LBB0_2:
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_20:
	movl	%ebx, %eax
	addq	$16, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	_V4L2_FIELD_SEQ_TB@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %r9
	jne	LBB0_15
## %bb.14:
	movq	_Q_DATA_INTERLACED_SEQ_TB@GOTPCREL(%rip), %rsi
LBB0_12:
	movl	20(%r15), %edx
	orl	(%rsi), %edx
	jmp	LBB0_16
LBB0_15:
	movq	_Q_IS_INTERLACED@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	notl	%edx
	andl	20(%r15), %edx
LBB0_16:
	movl	%edx, 20(%r15)
	movq	_Q_DATA_INTERLACED_SEQ_TB@GOTPCREL(%rip), %rsi
	testl	%edx, (%rsi)
	je	LBB0_18
## %bb.17:
	movl	%r8d, %edx
	shrl	$31, %edx
	addl	%r8d, %edx
	sarl	%edx
	movl	%edx, 48(%r15)
LBB0_18:
	movl	(%r14), %edi
	movl	(%r12), %edx
	movl	(%rax), %r9d
	movq	24(%r15), %rax
	movq	_VPE_LUMA@GOTPCREL(%rip), %rsi
	movq	(%rsi), %rsi
	movl	(%rax,%rsi,4), %eax
	movl	%eax, (%rsp)
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_vpe_dbg
	cmpl	$2, 16(%r15)
	jne	LBB0_20
## %bb.19:
	movl	(%r14), %edi
	movq	24(%r15), %rax
	movq	_VPE_CHROMA@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rcx,4), %edx
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	xorl	%eax, %eax
	callq	_vpe_dbg
	jmp	LBB0_20
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"queue busy\n"

	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_FIELD_ALTERNATE,8,3       ## @V4L2_FIELD_ALTERNATE
	.comm	_Q_DATA_INTERLACED_ALTERNATE,4,2 ## @Q_DATA_INTERLACED_ALTERNATE
	.comm	_V4L2_FIELD_SEQ_TB,8,3          ## @V4L2_FIELD_SEQ_TB
	.comm	_Q_DATA_INTERLACED_SEQ_TB,4,2   ## @Q_DATA_INTERLACED_SEQ_TB
	.comm	_Q_IS_INTERLACED,4,2            ## @Q_IS_INTERLACED
L_.str.1:                               ## @.str.1
	.asciz	"Setting format for type %d, wxh: %dx%d, fmt: %d bpl_y %d"

	.comm	_VPE_LUMA,8,3                   ## @VPE_LUMA
L_.str.2:                               ## @.str.2
	.asciz	" bpl_uv %d\n"

	.comm	_VPE_CHROMA,8,3                 ## @VPE_CHROMA
	.no_dead_strip	___vpe_s_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function __vpe_s_fmt
___vpe_s_fmt:                           ; @__vpe_s_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #4]
	ldr	w1, [x1]
	bl	_v4l2_m2m_get_vq
	cbz	x0, LBB0_10
; %bb.1:
	bl	_vb2_is_busy
	cbz	x0, LBB0_3
; %bb.2:
	ldr	w0, [x19]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	bl	_vpe_err
Lloh2:
	adrp	x8, _EBUSY@GOTPAGE
Lloh3:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
	b	LBB0_11
LBB0_3:
	ldr	w1, [x20]
	mov	x0, x19
	bl	_get_q_data
	cbz	x0, LBB0_10
; %bb.4:
	mov	x21, x0
	mov	x0, x20
	bl	_find_format
	str	x0, [x21, #32]
	ldp	w8, w9, [x20, #40]
	str	w9, [x21, #40]
	ldr	w10, [x20, #8]
	str	w10, [x21]
	str	w8, [x21, #80]
	ldr	x8, [x20, #16]
	str	x8, [x21, #8]
	ldr	w11, [x20, #24]
	str	w11, [x21, #16]
	cmp	w11, #1
	b.lt	LBB0_8
; %bb.5:
	mov	x9, #0
	ldr	x12, [x20, #32]
	ldr	x10, [x21, #24]
	ldr	x11, [x21, #72]
	add	x12, x12, #4
LBB0_6:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w13, [x12]
	lsl	x14, x9, #2
	str	w13, [x10, x14]
	ldur	w13, [x12, #-4]
	str	w13, [x11, x14]
	add	x9, x9, #1
	ldrsw	x13, [x20, #24]
	add	x12, x12, #8
	cmp	x9, x13
	b.lt	LBB0_6
; %bb.7:
	ldr	w9, [x21, #40]
	ldr	w10, [x21]
LBB0_8:
	stp	xzr, xzr, [x21, #56]
	stp	w10, w9, [x21, #48]
Lloh4:
	adrp	x11, _V4L2_FIELD_ALTERNATE@GOTPAGE
Lloh5:
	ldr	x11, [x11, _V4L2_FIELD_ALTERNATE@GOTPAGEOFF]
Lloh6:
	ldr	x12, [x11]
Lloh7:
	adrp	x11, _Q_DATA_INTERLACED_SEQ_TB@GOTPAGE
Lloh8:
	ldr	x11, [x11, _Q_DATA_INTERLACED_SEQ_TB@GOTPAGEOFF]
	cmp	x8, x12
	b.ne	LBB0_13
; %bb.9:
Lloh9:
	adrp	x8, _Q_DATA_INTERLACED_ALTERNATE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _Q_DATA_INTERLACED_ALTERNATE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	b	LBB0_15
LBB0_10:
Lloh12:
	adrp	x8, _EINVAL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_11:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_12:
	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
	add	sp, sp, #80
	ret
LBB0_13:
Lloh14:
	adrp	x12, _V4L2_FIELD_SEQ_TB@GOTPAGE
Lloh15:
	ldr	x12, [x12, _V4L2_FIELD_SEQ_TB@GOTPAGEOFF]
Lloh16:
	ldr	x12, [x12]
	cmp	x8, x12
	b.ne	LBB0_16
; %bb.14:
	ldr	w8, [x11]
LBB0_15:
	ldr	w12, [x21, #20]
	orr	w8, w12, w8
	b	LBB0_17
LBB0_16:
Lloh17:
	adrp	x8, _Q_IS_INTERLACED@GOTPAGE
Lloh18:
	ldr	x8, [x8, _Q_IS_INTERLACED@GOTPAGEOFF]
Lloh19:
	ldr	w8, [x8]
	ldr	w12, [x21, #20]
	bic	w8, w12, w8
LBB0_17:
	str	w8, [x21, #20]
	ldr	w11, [x11]
	tst	w11, w8
	b.eq	LBB0_19
; %bb.18:
	cmp	w10, #0
	cinc	w8, w10, lt
	asr	w8, w8, #1
	str	w8, [x21, #48]
LBB0_19:
	ldr	w8, [x19]
	ldr	w2, [x20]
	ldr	x11, [x21, #24]
Lloh20:
	adrp	x12, _VPE_LUMA@GOTPAGE
Lloh21:
	ldr	x12, [x12, _VPE_LUMA@GOTPAGEOFF]
Lloh22:
	ldr	x12, [x12]
	ldr	w11, [x11, x12, lsl #2]
	ldr	w12, [x0]
	stp	x12, x11, [sp, #16]
	stp	x9, x10, [sp]
Lloh23:
	adrp	x1, l_.str.1@PAGE
Lloh24:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x8
	bl	_vpe_dbg
	ldr	w8, [x21, #16]
	cmp	w8, #2
	b.ne	LBB0_21
; %bb.20:
	ldr	w0, [x19]
	ldr	x8, [x21, #24]
Lloh25:
	adrp	x9, _VPE_CHROMA@GOTPAGE
Lloh26:
	ldr	x9, [x9, _VPE_CHROMA@GOTPAGEOFF]
Lloh27:
	ldr	x9, [x9]
	ldr	w2, [x8, x9, lsl #2]
Lloh28:
	adrp	x1, l_.str.2@PAGE
Lloh29:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_vpe_dbg
LBB0_21:
	mov	w0, #0
	b	LBB0_12
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"queue busy\n"

	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_FIELD_ALTERNATE,8,3       ; @V4L2_FIELD_ALTERNATE
	.comm	_Q_DATA_INTERLACED_ALTERNATE,4,2 ; @Q_DATA_INTERLACED_ALTERNATE
	.comm	_V4L2_FIELD_SEQ_TB,8,3          ; @V4L2_FIELD_SEQ_TB
	.comm	_Q_DATA_INTERLACED_SEQ_TB,4,2   ; @Q_DATA_INTERLACED_SEQ_TB
	.comm	_Q_IS_INTERLACED,4,2            ; @Q_IS_INTERLACED
l_.str.1:                               ; @.str.1
	.asciz	"Setting format for type %d, wxh: %dx%d, fmt: %d bpl_y %d"

	.comm	_VPE_LUMA,8,3                   ; @VPE_LUMA
l_.str.2:                               ; @.str.2
	.asciz	" bpl_uv %d\n"

	.comm	_VPE_CHROMA,8,3                 ; @VPE_CHROMA
	.no_dead_strip	___vpe_s_fmt
.subsections_via_symbols
