	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function vidioc_s_fmt_vid_cap
_vidioc_s_fmt_vid_cap:                  ## @vidioc_s_fmt_vid_cap
	.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	%rdx, %r13
	movq	%rsi, %r15
	movq	%rdi, %rbx
	callq	_video_drvdata
	movq	%rax, %r12
	movq	24(%rax), %r14
	movq	%rbx, %rdi
	movq	%r15, %rsi
	movq	%r13, %rdx
	callq	_cx25821_vidioc_try_fmt_vid_cap
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_5
## %bb.1:
	movq	(%r13), %rdi
	callq	_cx25821_format_by_fourcc
	movl	%eax, 20(%r12)
	movl	16(%r13), %eax
	movl	%eax, 16(%r12)
	movl	8(%r13), %eax
	movl	%eax, (%r12)
	movl	12(%r13), %eax
	movl	%eax, 12(%r12)
	movq	(%r13), %rax
	movq	_V4L2_PIX_FMT_Y41P@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_2
## %bb.3:
	movq	_PIXEL_FRMT_411@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_2:
	movq	_PIXEL_FRMT_422@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %edx
	movq	_SRAM_CH00@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	%r14, %rdi
	callq	_cx25821_set_pixel_format
	movl	(%r12), %esi
	leal	-320(%rsi), %eax
	xorl	%ecx, %ecx
	testl	$-33, %eax
	sete	%cl
	movl	%ecx, 4(%r12)
	movl	%esi, 8(%r12)
	movl	(%rbx), %edx
	movq	%r14, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	callq	_medusa_set_resolution
LBB0_5:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PIXEL_FRMT_422,4,2             ## @PIXEL_FRMT_422
	.comm	_V4L2_PIX_FMT_Y41P,8,3          ## @V4L2_PIX_FMT_Y41P
	.comm	_PIXEL_FRMT_411,4,2             ## @PIXEL_FRMT_411
	.comm	_SRAM_CH00,4,2                  ## @SRAM_CH00
	.no_dead_strip	_vidioc_s_fmt_vid_cap
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function vidioc_s_fmt_vid_cap
_vidioc_s_fmt_vid_cap:                  ; @vidioc_s_fmt_vid_cap
	.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	x22, x2
	mov	x20, x1
	mov	x23, x0
	bl	_video_drvdata
	mov	x21, x0
	ldr	x19, [x0, #24]
	mov	x0, x23
	mov	x1, x20
	mov	x2, x22
	bl	_cx25821_vidioc_try_fmt_vid_cap
	mov	x20, x0
	cbnz	w0, LBB0_2
; %bb.1:
	ldr	x0, [x22]
	bl	_cx25821_format_by_fourcc
	str	w0, [x21, #20]
	ldr	w8, [x22, #8]
	str	w8, [x21]
	ldur	d0, [x22, #12]
	stur	d0, [x21, #12]
Lloh0:
	adrp	x8, _V4L2_PIX_FMT_Y41P@GOTPAGE
Lloh1:
	ldr	x8, [x8, _V4L2_PIX_FMT_Y41P@GOTPAGEOFF]
	ldr	x9, [x22]
Lloh2:
	ldr	x8, [x8]
Lloh3:
	adrp	x10, _PIXEL_FRMT_411@GOTPAGE
Lloh4:
	ldr	x10, [x10, _PIXEL_FRMT_411@GOTPAGEOFF]
Lloh5:
	adrp	x11, _PIXEL_FRMT_422@GOTPAGE
Lloh6:
	ldr	x11, [x11, _PIXEL_FRMT_422@GOTPAGEOFF]
	cmp	x9, x8
	csel	x8, x10, x11, eq
	ldr	w2, [x8]
Lloh7:
	adrp	x22, _SRAM_CH00@GOTPAGE
Lloh8:
	ldr	x22, [x22, _SRAM_CH00@GOTPAGEOFF]
	ldr	w1, [x22]
	mov	x0, x19
	bl	_cx25821_set_pixel_format
	ldr	w1, [x21]
	sub	w8, w1, #320
	tst	w8, #0xffffffdf
	cset	w8, eq
	stp	w8, w1, [x21, #4]
	ldr	w2, [x22]
	mov	x0, x19
	bl	_medusa_set_resolution
LBB0_2:
	mov	x0, x20
	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
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_PIXEL_FRMT_422,4,2             ; @PIXEL_FRMT_422
	.comm	_V4L2_PIX_FMT_Y41P,8,3          ; @V4L2_PIX_FMT_Y41P
	.comm	_PIXEL_FRMT_411,4,2             ; @PIXEL_FRMT_411
	.comm	_SRAM_CH00,4,2                  ; @SRAM_CH00
	.no_dead_strip	_vidioc_s_fmt_vid_cap
.subsections_via_symbols
