	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function fdp1_set_format
_fdp1_set_format:                       ## @fdp1_set_format
	.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
	movl	%edx, %r12d
	movq	%rsi, %r15
	movq	%rdi, %r14
	movl	%edx, %esi
	callq	_get_q_data
	movq	%rax, %rbx
	movq	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPCREL(%rip), %r13
	cmpl	%r12d, (%r13)
	jne	LBB0_2
## %bb.1:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_fdp1_try_fmt_output
	jmp	LBB0_3
LBB0_2:
	leaq	-48(%rbp), %rsi
	movq	%r14, %rdi
	movq	%r15, %rdx
	callq	_fdp1_try_fmt_capture
LBB0_3:
	movq	-48(%rbp), %rax
	movq	%rax, 40(%rbx)
	movups	(%r15), %xmm0
	movups	%xmm0, 16(%rbx)
	movq	16(%r15), %rax
	movq	%rax, 32(%rbx)
	movl	(%r15), %ecx
	movl	%ecx, (%rbx)
	movq	8(%r15), %rax
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rdi
	cmpq	(%rdi), %rax
	je	LBB0_5
## %bb.4:
	movl	%ecx, %edx
	shrl	$31, %edx
	addl	%ecx, %edx
	sarl	%edx
	movl	%edx, (%rbx)
LBB0_5:
	movq	16(%r15), %rcx
	movl	(%rcx), %edx
	movl	%edx, 4(%rbx)
	movl	4(%rcx), %ecx
	movl	%ecx, 8(%rbx)
	movq	_V4L2_FIELD_INTERLACED@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	je	LBB0_8
## %bb.6:
	movq	_V4L2_FIELD_INTERLACED_TB@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	je	LBB0_8
## %bb.7:
	movq	_V4L2_FIELD_INTERLACED_BT@GOTPCREL(%rip), %rsi
	cmpq	(%rsi), %rax
	jne	LBB0_9
LBB0_8:
	addl	%edx, %edx
	movl	%edx, 4(%rbx)
	addl	%ecx, %ecx
	movl	%ecx, 8(%rbx)
LBB0_9:
	cmpl	%r12d, (%r13)
	jne	LBB0_13
## %bb.10:
	addq	$16, %rbx
	leaq	16(%r14), %r12
	movups	(%rbx), %xmm0
	movups	%xmm0, 16(%r14)
	movq	%rdi, %r13
	movq	16(%rbx), %rdi
	movq	%rdi, 32(%r14)
	xorl	%esi, %esi
	movl	$8, %edx
	callq	_memset
	movq	(%r13), %rax
	movq	%rax, 24(%r14)
	movq	8(%r15), %rax
	movq	_V4L2_FIELD_ALTERNATE@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_12
## %bb.11:
	shll	(%r12)
LBB0_12:
	leaq	40(%r14), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	callq	_fdp1_try_fmt_capture
	movl	16(%r14), %eax
	movl	%eax, (%r14)
	movq	32(%r14), %rax
	movl	(%rax), %ecx
	movl	%ecx, 4(%r14)
	movl	4(%rax), %eax
	movl	%eax, 8(%r14)
LBB0_13:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ## @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_V4L2_FIELD_NONE,8,3            ## @V4L2_FIELD_NONE
	.comm	_V4L2_FIELD_INTERLACED,8,3      ## @V4L2_FIELD_INTERLACED
	.comm	_V4L2_FIELD_INTERLACED_TB,8,3   ## @V4L2_FIELD_INTERLACED_TB
	.comm	_V4L2_FIELD_INTERLACED_BT,8,3   ## @V4L2_FIELD_INTERLACED_BT
	.comm	_V4L2_FIELD_ALTERNATE,8,3       ## @V4L2_FIELD_ALTERNATE
	.no_dead_strip	_fdp1_set_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function fdp1_set_format
_fdp1_set_format:                       ; @fdp1_set_format
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	mov	x1, x2
	bl	_get_q_data
	mov	x22, x0
Lloh0:
	adrp	x23, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGE
Lloh1:
	ldr	x23, [x23, _V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE@GOTPAGEOFF]
	ldr	w8, [x23]
	add	x1, sp, #8
	mov	x0, x19
	mov	x2, x20
	cmp	w8, w21
	b.ne	LBB0_2
; %bb.1:
	bl	_fdp1_try_fmt_output
	b	LBB0_3
LBB0_2:
	bl	_fdp1_try_fmt_capture
LBB0_3:
	ldr	x8, [sp, #8]
	str	x8, [x22, #40]
	ldr	x8, [x20, #16]
	ldr	q0, [x20]
	str	q0, [x22, #16]
	str	x8, [x22, #32]
	ldr	w9, [x20]
	str	w9, [x22]
	ldr	x8, [x20, #8]
Lloh2:
	adrp	x24, _V4L2_FIELD_NONE@GOTPAGE
Lloh3:
	ldr	x24, [x24, _V4L2_FIELD_NONE@GOTPAGEOFF]
	ldr	x10, [x24]
	cmp	x8, x10
	b.eq	LBB0_5
; %bb.4:
	cmp	w9, #0
	cinc	w9, w9, lt
	asr	w9, w9, #1
	str	w9, [x22]
LBB0_5:
	ldr	x10, [x20, #16]
	ldp	w9, w10, [x10]
	stp	w9, w10, [x22, #4]
Lloh4:
	adrp	x11, _V4L2_FIELD_INTERLACED@GOTPAGE
Lloh5:
	ldr	x11, [x11, _V4L2_FIELD_INTERLACED@GOTPAGEOFF]
Lloh6:
	ldr	x11, [x11]
	cmp	x8, x11
	b.eq	LBB0_8
; %bb.6:
Lloh7:
	adrp	x11, _V4L2_FIELD_INTERLACED_TB@GOTPAGE
Lloh8:
	ldr	x11, [x11, _V4L2_FIELD_INTERLACED_TB@GOTPAGEOFF]
Lloh9:
	ldr	x11, [x11]
	cmp	x8, x11
	b.eq	LBB0_8
; %bb.7:
Lloh10:
	adrp	x11, _V4L2_FIELD_INTERLACED_BT@GOTPAGE
Lloh11:
	ldr	x11, [x11, _V4L2_FIELD_INTERLACED_BT@GOTPAGEOFF]
Lloh12:
	ldr	x11, [x11]
	cmp	x8, x11
	b.ne	LBB0_9
LBB0_8:
	lsl	w8, w9, #1
	lsl	w9, w10, #1
	stp	w8, w9, [x22, #4]
LBB0_9:
	ldr	w8, [x23]
	cmp	w8, w21
	b.ne	LBB0_13
; %bb.10:
	add	x8, x22, #16
	add	x21, x19, #16
	ldr	x0, [x8, #16]
	ldr	q0, [x8]
	str	q0, [x19, #16]
	str	x0, [x19, #32]
	mov	w1, #0
	mov	w2, #8
	bl	_memset
	ldr	x8, [x24]
	str	x8, [x19, #24]
	ldr	x8, [x20, #8]
Lloh13:
	adrp	x9, _V4L2_FIELD_ALTERNATE@GOTPAGE
Lloh14:
	ldr	x9, [x9, _V4L2_FIELD_ALTERNATE@GOTPAGEOFF]
Lloh15:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	ldr	w8, [x21]
	lsl	w8, w8, #1
	str	w8, [x21]
LBB0_12:
	add	x1, x19, #40
	mov	x0, x19
	mov	x2, x21
	bl	_fdp1_try_fmt_capture
	ldr	w8, [x19, #16]
	str	w8, [x19]
	ldr	x8, [x19, #32]
	ldr	d0, [x8]
	stur	d0, [x19, #4]
LBB0_13:
	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
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.cfi_endproc
                                        ; -- End function
	.comm	_V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE,4,2 ; @V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE
	.comm	_V4L2_FIELD_NONE,8,3            ; @V4L2_FIELD_NONE
	.comm	_V4L2_FIELD_INTERLACED,8,3      ; @V4L2_FIELD_INTERLACED
	.comm	_V4L2_FIELD_INTERLACED_TB,8,3   ; @V4L2_FIELD_INTERLACED_TB
	.comm	_V4L2_FIELD_INTERLACED_BT,8,3   ; @V4L2_FIELD_INTERLACED_BT
	.comm	_V4L2_FIELD_ALTERNATE,8,3       ; @V4L2_FIELD_ALTERNATE
	.no_dead_strip	_fdp1_set_format
.subsections_via_symbols
