	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5645_set_format
_ov5645_set_format:                     ## @ov5645_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, %r13
	movq	%rsi, %r14
	callq	_to_ov5645
	movq	%rax, %r15
	movl	20(%r13), %ecx
	movl	24(%r13), %edx
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	___ov5645_get_pad_crop
	movq	%rax, %r12
	movq	_ov5645_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	12(%r13), %r9d
	movl	16(%r13), %r8d
	movl	%ebx, %edi
	movl	%eax, %esi
	callq	_v4l2_find_nearest_size
	movq	%rax, %rbx
	movl	12(%rax), %eax
	movl	%eax, 4(%r12)
	movl	8(%rbx), %eax
	movl	%eax, (%r12)
	movl	20(%r13), %ecx
	movq	_V4L2_SUBDEV_FORMAT_ACTIVE@GOTPCREL(%rip), %rax
	cmpl	(%rax), %ecx
	jne	LBB0_4
## %bb.1:
	movl	12(%r15), %edi
	movl	4(%rbx), %esi
	callq	_v4l2_ctrl_s_ctrl_int64
	testl	%eax, %eax
	js	LBB0_5
## %bb.2:
	movl	8(%r15), %edi
	movl	(%rbx), %esi
	callq	_v4l2_ctrl_s_ctrl
	testl	%eax, %eax
	js	LBB0_5
## %bb.3:
	movq	%rbx, (%r15)
	movl	20(%r13), %ecx
LBB0_4:
	movl	24(%r13), %edx
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	___ov5645_get_pad_format
	movl	4(%r12), %ecx
	movl	%ecx, 16(%rax)
	movl	(%r12), %edx
	movl	%edx, 12(%rax)
	movq	_MEDIA_BUS_FMT_UYVY8_2X8@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 8(%rax)
	movq	_V4L2_FIELD_NONE@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, 4(%rax)
	movq	_V4L2_COLORSPACE_SRGB@GOTPCREL(%rip), %rdx
	movl	(%rdx), %edx
	movl	%edx, (%rax)
	movl	%ecx, 16(%r13)
	movups	(%rax), %xmm0
	movups	%xmm0, (%r13)
	xorl	%eax, %eax
LBB0_5:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ov5645_mode_info_data,4,2      ## @ov5645_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_UYVY8_2X8,4,2    ## @MEDIA_BUS_FMT_UYVY8_2X8
	.comm	_V4L2_FIELD_NONE,4,2            ## @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ## @V4L2_COLORSPACE_SRGB
	.no_dead_strip	_ov5645_set_format
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5645_set_format
_ov5645_set_format:                     ; @ov5645_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	x19, x2
	mov	x20, x1
	bl	_to_ov5645
	mov	x21, x0
	ldp	w3, w2, [x19, #20]
	mov	x1, x20
	bl	___ov5645_get_pad_crop
	mov	x22, x0
Lloh0:
	adrp	x8, _ov5645_mode_info_data@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ov5645_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, [x19, #12]
	mov	x0, x23
	bl	_v4l2_find_nearest_size
	ldr	d0, [x0, #8]
	str	d0, [x22]
	ldr	w3, [x19, #20]
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_4
; %bb.1:
	mov	x23, x0
	ldr	w0, [x21, #12]
	ldr	w1, [x23, #4]
	bl	_v4l2_ctrl_s_ctrl_int64
	tbnz	w0, #31, LBB0_5
; %bb.2:
	ldr	w0, [x21, #8]
	ldr	w1, [x23]
	bl	_v4l2_ctrl_s_ctrl
	tbnz	w0, #31, LBB0_5
; %bb.3:
	str	x23, [x21]
	ldr	w3, [x19, #20]
LBB0_4:
	ldr	w2, [x19, #24]
	mov	x0, x21
	mov	x1, x20
	bl	___ov5645_get_pad_format
	mov	x8, x0
	mov	w0, #0
	ldr	d0, [x22]
Lloh12:
	adrp	x9, _MEDIA_BUS_FMT_UYVY8_2X8@GOTPAGE
Lloh13:
	ldr	x9, [x9, _MEDIA_BUS_FMT_UYVY8_2X8@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
Lloh15:
	adrp	x10, _V4L2_FIELD_NONE@GOTPAGE
Lloh16:
	ldr	x10, [x10, _V4L2_FIELD_NONE@GOTPAGEOFF]
	str	w9, [x8, #8]
Lloh17:
	ldr	w9, [x10]
Lloh18:
	adrp	x10, _V4L2_COLORSPACE_SRGB@GOTPAGE
Lloh19:
	ldr	x10, [x10, _V4L2_COLORSPACE_SRGB@GOTPAGEOFF]
Lloh20:
	ldr	w10, [x10]
	stp	w10, w9, [x8]
	stur	d0, [x8, #12]
	ldr	q0, [x8]
	ldr	w8, [x8, #16]
	str	w8, [x19, #16]
	str	q0, [x19]
LBB0_5:
	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	_ov5645_mode_info_data,4,2      ; @ov5645_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_UYVY8_2X8,4,2    ; @MEDIA_BUS_FMT_UYVY8_2X8
	.comm	_V4L2_FIELD_NONE,4,2            ; @V4L2_FIELD_NONE
	.comm	_V4L2_COLORSPACE_SRGB,4,2       ; @V4L2_COLORSPACE_SRGB
	.no_dead_strip	_ov5645_set_format
.subsections_via_symbols
