	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov7670_s_config
_ov7670_s_config:                       ## @ov7670_s_config
	.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	%r12
	pushq	%rbx
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movq	%rdi, %r14
	callq	_v4l2_get_subdevdata
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_to_state
	movq	%rax, %r12
	movl	$30, (%rax)
	testq	%rbx, %rbx
	je	LBB0_3
## %bb.1:
	movl	12(%rbx), %eax
	movl	%eax, 32(%r12)
	movl	8(%rbx), %eax
	movl	%eax, 28(%r12)
	movl	4(%rbx), %eax
	movl	%eax, 24(%r12)
	movl	(%rbx), %eax
	testl	%eax, %eax
	je	LBB0_3
## %bb.2:
	movl	%eax, (%r12)
LBB0_3:
	movq	%r14, %rdi
	callq	_ov7670_detect
	movl	%eax, %r14d
	testl	%eax, %eax
	je	LBB0_5
## %bb.4:
	movq	_debug@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	(%r15), %r8d
	addl	%r8d, %r8d
	movq	8(%r15), %rax
	movl	(%rax), %r9d
	leaq	L_.str(%rip), %rcx
	movl	$1, %edi
	movq	%r15, %rdx
	callq	_v4l_dbg
	movq	%r12, %rdi
	callq	_kfree
	jmp	LBB0_6
LBB0_5:
	movl	(%r15), %edx
	addl	%edx, %edx
	movq	8(%r15), %rax
	movl	(%rax), %ecx
	leaq	L_.str.1(%rip), %rsi
	movq	%r15, %rdi
	callq	_v4l_info
	movq	_ov7670_formats@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, 16(%r12)
	movl	$128, 4(%r12)
	movslq	(%r12), %rax
	imulq	$-2004318071, %rax, %rcx        ## imm = 0x88888889
	shrq	$32, %rcx
	addl	%eax, %ecx
	movl	%ecx, %eax
	shrl	$31, %eax
	sarl	$4, %ecx
	addl	%eax, %ecx
	movl	%ecx, 8(%r12)
LBB0_6:
	movl	%r14d, %eax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"chip found @ 0x%x (%s) is not an ov7670 chip.\n"

L_.str.1:                               ## @.str.1
	.asciz	"chip found @ 0x%02x (%s)\n"

	.comm	_ov7670_formats,8,3             ## @ov7670_formats
	.no_dead_strip	_ov7670_s_config
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov7670_s_config
_ov7670_s_config:                       ; @ov7670_s_config
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x22, x2
	mov	x20, x0
	bl	_v4l2_get_subdevdata
	mov	x21, x0
	mov	x0, x20
	bl	_to_state
	mov	x19, x0
	mov	w8, #30
	str	w8, [x0]
	cbz	x22, LBB0_3
; %bb.1:
	ldr	w8, [x22, #12]
	str	w8, [x19, #32]
	ldur	d0, [x22, #4]
	str	d0, [x19, #24]
	ldr	w8, [x22]
	cbz	w8, LBB0_3
; %bb.2:
	str	w8, [x19]
LBB0_3:
	mov	x0, x20
	bl	_ov7670_detect
	mov	x20, x0
	cbz	w0, LBB0_5
; %bb.4:
Lloh0:
	adrp	x8, _debug@GOTPAGE
Lloh1:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	ldr	w8, [x21]
	lsl	w4, w8, #1
	ldr	x8, [x21, #8]
	ldr	w5, [x8]
Lloh3:
	adrp	x3, l_.str@PAGE
Lloh4:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #1
	mov	x2, x21
	bl	_v4l_dbg
	mov	x0, x19
	bl	_kfree
	b	LBB0_6
LBB0_5:
	ldr	w8, [x21]
	lsl	w2, w8, #1
	ldr	x8, [x21, #8]
	ldr	w3, [x8]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_v4l_info
Lloh7:
	adrp	x8, _ov7670_formats@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ov7670_formats@GOTPAGEOFF]
Lloh9:
	ldr	x8, [x8]
	str	x8, [x19, #16]
	mov	w8, #128
	ldrsw	x9, [x19]
	mov	x10, #-30583
	movk	x10, #34952, lsl #16
	mul	x10, x9, x10
	lsr	x10, x10, #32
	add	w9, w10, w9
	asr	w10, w9, #4
	add	w9, w10, w9, lsr #31
	stp	w8, w9, [x19, #4]
LBB0_6:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpAdd	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"chip found @ 0x%x (%s) is not an ov7670 chip.\n"

l_.str.1:                               ; @.str.1
	.asciz	"chip found @ 0x%02x (%s)\n"

	.comm	_ov7670_formats,8,3             ; @ov7670_formats
	.no_dead_strip	_ov7670_s_config
.subsections_via_symbols
