	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5640_set_fmt
_ov5640_set_fmt:                        ## @ov5640_set_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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movq	%rsi, %r12
	movq	%rdi, %rbx
	callq	_to_ov5640_dev
	cmpq	$0, (%r15)
	je	LBB0_2
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_13
LBB0_2:
	movq	%rax, %r13
	leaq	8(%rax), %rdi
	movq	%rdi, -56(%rbp)                 ## 8-byte Spill
	callq	_mutex_lock
	cmpq	$0, 40(%r13)
	je	LBB0_4
## %bb.3:
	movq	_EBUSY@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_12
LBB0_4:
	leaq	16(%r15), %rsi
	movl	32(%r13), %edx
	leaq	-64(%rbp), %rcx
	movq	%rbx, %rdi
	movq	%rsi, -48(%rbp)                 ## 8-byte Spill
	callq	_ov5640_try_fmt_internal
	movl	%eax, %r14d
	testl	%eax, %eax
	jne	LBB0_12
## %bb.5:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	movq	8(%r15), %rax
	movq	_V4L2_SUBDEV_FORMAT_TRY@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_7
## %bb.6:
	movq	%rbx, %rdi
	movq	%r12, %rsi
	xorl	%edx, %edx
	callq	_v4l2_subdev_get_try_format
	jmp	LBB0_8
LBB0_7:
	movq	%r13, %rax
	addq	$16, %rax
LBB0_8:
	movq	(%r14), %rcx
	movq	%rcx, (%rax)
	movq	-64(%rbp), %rax
	cmpq	24(%r13), %rax
	je	LBB0_10
## %bb.9:
	movq	%rax, 24(%r13)
	movl	$1, (%r13)
LBB0_10:
	movq	(%r14), %rax
	xorl	%r14d, %r14d
	cmpq	16(%r13), %rax
	je	LBB0_12
## %bb.11:
	movl	$1, 4(%r13)
LBB0_12:
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	callq	_mutex_unlock
LBB0_13:
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_EBUSY,4,2                      ## @EBUSY
	.comm	_V4L2_SUBDEV_FORMAT_TRY,8,3     ## @V4L2_SUBDEV_FORMAT_TRY
	.no_dead_strip	_ov5640_set_fmt
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5640_set_fmt
_ov5640_set_fmt:                        ; @ov5640_set_fmt
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x24, x2
	mov	x22, x1
	mov	x23, x0
	bl	_to_ov5640_dev
	mov	x21, x24
	ldr	x8, [x21], #16
	cbz	x8, LBB0_2
; %bb.1:
Lloh0:
	adrp	x8, _EINVAL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_14
LBB0_2:
	mov	x20, x0
	add	x19, x0, #8
	mov	x0, x19
	bl	_mutex_lock
	ldr	x8, [x20, #40]
	cbz	x8, LBB0_4
; %bb.3:
Lloh3:
	adrp	x8, _EBUSY@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EBUSY@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	neg	w25, w8
	b	LBB0_13
LBB0_4:
	ldr	w2, [x20, #32]
	add	x3, sp, #8
	mov	x0, x23
	mov	x1, x21
	bl	_ov5640_try_fmt_internal
	mov	x25, x0
	cbnz	w0, LBB0_13
; %bb.5:
	ldr	x8, [x24, #8]
Lloh6:
	adrp	x9, _V4L2_SUBDEV_FORMAT_TRY@GOTPAGE
Lloh7:
	ldr	x9, [x9, _V4L2_SUBDEV_FORMAT_TRY@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_7
; %bb.6:
	mov	x0, x23
	mov	x1, x22
	mov	w2, #0
	bl	_v4l2_subdev_get_try_format
	b	LBB0_8
LBB0_7:
	add	x0, x20, #16
LBB0_8:
	ldr	x8, [x21]
	str	x8, [x0]
	ldr	x8, [sp, #8]
	ldr	x9, [x20, #24]
	cmp	x8, x9
	b.eq	LBB0_10
; %bb.9:
	str	x8, [x20, #24]
	mov	w8, #1
	str	w8, [x20]
LBB0_10:
	ldr	x8, [x21]
	ldr	x9, [x20, #16]
	cmp	x8, x9
	b.ne	LBB0_12
; %bb.11:
	mov	w25, #0
	b	LBB0_13
LBB0_12:
	mov	w25, #0
	mov	w8, #1
	str	w8, [x20, #4]
LBB0_13:
	mov	x0, x19
	bl	_mutex_unlock
LBB0_14:
	mov	x0, x25
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_EBUSY,4,2                      ; @EBUSY
	.comm	_V4L2_SUBDEV_FORMAT_TRY,8,3     ; @V4L2_SUBDEV_FORMAT_TRY
	.no_dead_strip	_ov5640_set_fmt
.subsections_via_symbols
