	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7251_set_format
_ov7251_set_format:                     ## @ov7251_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
	movq	%rdx, %r14
	movq	%rsi, %r12
	callq	_to_ov7251
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_mutex_lock
	movl	32(%r14), %ecx
	movl	36(%r14), %edx
	movq	%r15, %rdi
	movq	%r12, %rsi
	callq	___ov7251_get_pad_crop
	movq	%rax, %r13
	movq	_ov7251_mode_info_data@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%ebx, %edi
	callq	_ARRAY_SIZE
	movq	_width@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	_height@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	24(%r14), %r9d
	movl	28(%r14), %r8d
	movl	%ebx, %edi
	movq	%r15, %rbx
	movl	%eax, %esi
	callq	_v4l2_find_nearest_size
	movq	%rax, %r15
	movl	20(%rax), %eax
	movl	%eax, 4(%r13)
	movl	16(%r15), %eax
	movl	%eax, (%r13)
	movl	32(%r14), %ecx
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rdx
	xorl	%eax, %eax
	cmpl	(%rdx), %ecx
	jne	LBB0_7
## %bb.1:
	movl	28(%rbx), %edi
	movl	12(%r15), %esi
	callq	___v4l2_ctrl_s_ctrl_int64
	testl	%eax, %eax
	js	LBB0_12
## %bb.2:
	movl	24(%rbx), %edi
	movl	(%r15), %esi
	callq	___v4l2_ctrl_s_ctrl
	testl	%eax, %eax
	js	LBB0_12
## %bb.3:
	movl	20(%rbx), %edi
	movl	4(%r15), %r8d
	movl	8(%r15), %edx
	movl	$1, %esi
	movl	$1, %ecx
	callq	___v4l2_ctrl_modify_range
	testl	%eax, %eax
	js	LBB0_12
## %bb.4:
	movl	20(%rbx), %edi
	movl	4(%r15), %esi
	callq	___v4l2_ctrl_s_ctrl
	testl	%eax, %eax
	js	LBB0_12
## %bb.5:
	movl	16(%rbx), %edi
	movl	$16, %esi
	callq	___v4l2_ctrl_s_ctrl
	testl	%eax, %eax
	js	LBB0_12
## %bb.6:
	movq	%r15, 8(%rbx)
	movl	32(%r14), %ecx
LBB0_7:
	movl	%eax, %r15d
	movl	36(%r14), %edx
	movq	%rbx, %rdi
	movq	%r12, %rsi
	callq	___ov7251_get_pad_format
	movq	%rbx, %r12
	movq	%rax, %rbx
	movl	4(%r13), %eax
	movl	%eax, 28(%rbx)
	movl	(%r13), %eax
	movl	%eax, 24(%rbx)
	movq	_MEDIA_BUS_FMT_Y10_1X10@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 20(%rbx)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 16(%rbx)
	movq	_V4L2_COLORSPACE_SRGB@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	%edi, (%rbx)
	callq	_V4L2_MAP_YCBCR_ENC_DEFAULT
	movl	%eax, 8(%rbx)
	movl	(%rbx), %esi
	movl	$1, %edi
	movl	%eax, %edx
	callq	_V4L2_MAP_QUANTIZATION_DEFAULT
	movl	%eax, 12(%rbx)
	movl	(%rbx), %edi
	callq	_V4L2_MAP_XFER_FUNC_DEFAULT
	movl	%eax, 4(%rbx)
	movups	16(%rbx), %xmm0
	movups	%xmm0, 16(%r14)
	movups	(%rbx), %xmm0
	movq	%r12, %rbx
	movups	%xmm0, (%r14)
	jmp	LBB0_13
LBB0_12:
	movl	%eax, %r15d
LBB0_13:
	movq	%rbx, %rdi
	callq	_mutex_unlock
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ov7251_mode_info_data,4,2      ## @ov7251_mode_info_data
	.comm	_width,4,2                      ## @width
	.comm	_height,4,2                     ## @height
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ## @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_MEDIA_BUS_FMT_Y10_1X10,4,2     ## @MEDIA_BUS_FMT_Y10_1X10
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ## @V4L2_COLORSPACE_SRGB
	.no_dead_strip	_ov7251_set_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7251_set_format
_ov7251_set_format:                     ; @ov7251_set_format
	.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, x2
	mov	x21, x1
	bl	_to_ov7251
	mov	x19, x0
	bl	_mutex_lock
	ldp	w3, w2, [x20, #32]
	mov	x0, x19
	mov	x1, x21
	bl	___ov7251_get_pad_crop
	mov	x22, x0
Lloh0:
	adrp	x8, _ov7251_mode_info_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ov7251_mode_info_data@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	mov	x0, x23
	bl	_ARRAY_SIZE
	mov	x1, x0
Lloh3:
	adrp	x8, _width@GOTPAGE
Lloh4:
	ldr	x8, [x8, _width@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _height@GOTPAGE
Lloh7:
	ldr	x8, [x8, _height@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
	ldp	w5, w4, [x20, #24]
	mov	x0, x23
	bl	_v4l2_find_nearest_size
	ldr	d0, [x0, #16]
	str	d0, [x22]
	ldr	w3, [x20, #32]
Lloh9:
	adrp	x8, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGE
Lloh10:
	ldr	x8, [x8, _V4L2_SUBDEV_FORMAT_ACTIVE@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	cmp	w3, w8
	b.ne	LBB0_7
; %bb.1:
	mov	x24, x0
	ldr	w0, [x19, #28]
	ldr	w1, [x24, #12]
	bl	___v4l2_ctrl_s_ctrl_int64
	tbnz	w0, #31, LBB0_9
; %bb.2:
	ldr	w0, [x19, #24]
	ldr	w1, [x24]
	bl	___v4l2_ctrl_s_ctrl
	tbnz	w0, #31, LBB0_9
; %bb.3:
	ldr	w0, [x19, #20]
	ldp	w4, w2, [x24, #4]
	mov	w1, #1
	mov	w3, #1
	bl	___v4l2_ctrl_modify_range
	tbnz	w0, #31, LBB0_9
; %bb.4:
	ldr	w0, [x19, #20]
	ldr	w1, [x24, #4]
	bl	___v4l2_ctrl_s_ctrl
	tbnz	w0, #31, LBB0_9
; %bb.5:
	ldr	w0, [x19, #16]
	mov	w1, #16
	bl	___v4l2_ctrl_s_ctrl
	mov	x23, x0
	tbnz	w0, #31, LBB0_10
; %bb.6:
	str	x24, [x19, #8]
	ldr	w3, [x20, #32]
	b	LBB0_8
LBB0_7:
	mov	w23, #0
LBB0_8:
	ldr	w2, [x20, #36]
	mov	x0, x19
	mov	x1, x21
	bl	___ov7251_get_pad_format
	mov	x21, x0
	ldr	d0, [x22]
	str	d0, [x0, #24]
Lloh12:
	adrp	x8, _MEDIA_BUS_FMT_Y10_1X10@GOTPAGE
Lloh13:
	ldr	x8, [x8, _MEDIA_BUS_FMT_Y10_1X10@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
Lloh15:
	adrp	x9, _V4L2_FIELD_NONE@GOTPAGE
Lloh16:
	ldr	x9, [x9, _V4L2_FIELD_NONE@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	stp	w9, w8, [x0, #16]
Lloh18:
	adrp	x8, _V4L2_COLORSPACE_SRGB@GOTPAGE
Lloh19:
	ldr	x8, [x8, _V4L2_COLORSPACE_SRGB@GOTPAGEOFF]
Lloh20:
	ldr	w0, [x8]
	str	w0, [x21]
	bl	_V4L2_MAP_YCBCR_ENC_DEFAULT
	mov	x2, x0
	str	w0, [x21, #8]
	ldr	w1, [x21]
	mov	w0, #1
	bl	_V4L2_MAP_QUANTIZATION_DEFAULT
	str	w0, [x21, #12]
	ldr	w0, [x21]
	bl	_V4L2_MAP_XFER_FUNC_DEFAULT
	str	w0, [x21, #4]
	ldp	q1, q0, [x21]
	stp	q1, q0, [x20]
	b	LBB0_10
LBB0_9:
	mov	x23, x0
LBB0_10:
	mov	x0, x19
	bl	_mutex_unlock
	mov	x0, x23
	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 AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_ov7251_mode_info_data,4,2      ; @ov7251_mode_info_data
	.comm	_width,4,2                      ; @width
	.comm	_height,4,2                     ; @height
	.comm	_V4L2_SUBDEV_FORMAT_ACTIVE,4,2  ; @V4L2_SUBDEV_FORMAT_ACTIVE
	.comm	_MEDIA_BUS_FMT_Y10_1X10,4,2     ; @MEDIA_BUS_FMT_Y10_1X10
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ; @V4L2_COLORSPACE_SRGB
	.no_dead_strip	_ov7251_set_format
.subsections_via_symbols
