	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov_hires_configure
_ov_hires_configure:                    ## @ov_hires_configure
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	(%rdi), %rax
	movq	_BRIDGE_OVFX2@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_9
## %bb.1:
	movq	%rdi, %rbx
	movq	_D_PROBE@GOTPCREL(%rip), %r15
	movl	(%r15), %edi
	leaq	L_.str.1(%rip), %rsi
	callq	_PDEBUG
	movq	%rbx, %rdi
	movl	$10, %esi
	callq	_i2c_r
	movl	%eax, %r14d
	movq	%rbx, %rdi
	movl	$11, %esi
	callq	_i2c_r
	cmpl	$150, %r14d
	jne	LBB0_5
## %bb.2:
	cmpl	$64, %eax
	jne	LBB0_5
## %bb.3:
	movl	(%r15), %edi
	leaq	L_.str.2(%rip), %rsi
	callq	_PDEBUG
	movq	_SEN_OV2610@GOTPCREL(%rip), %rax
	jmp	LBB0_4
LBB0_9:
	leaq	L_.str(%rip), %rdi
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_err                            ## TAILCALL
LBB0_5:
	cmpl	$54, %r14d
	jne	LBB0_8
## %bb.6:
	movl	%eax, %ecx
	andl	$15, %ecx
	jne	LBB0_8
## %bb.7:
	movl	(%r15), %edi
	leaq	L_.str.3(%rip), %rsi
	callq	_PDEBUG
	movq	_SEN_OV3610@GOTPCREL(%rip), %rax
LBB0_4:
	movl	(%rax), %eax
	movl	%eax, 8(%rbx)
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	leaq	L_.str.4(%rip), %rdi
	movl	%r14d, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_err                            ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_BRIDGE_OVFX2,8,3               ## @BRIDGE_OVFX2
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"error hires sensors only supported with ovfx2"

	.comm	_D_PROBE,4,2                    ## @D_PROBE
L_.str.1:                               ## @.str.1
	.asciz	"starting ov hires configuration"

L_.str.2:                               ## @.str.2
	.asciz	"Sensor is an OV2610"

	.comm	_SEN_OV2610,4,2                 ## @SEN_OV2610
L_.str.3:                               ## @.str.3
	.asciz	"Sensor is an OV3610"

	.comm	_SEN_OV3610,4,2                 ## @SEN_OV3610
L_.str.4:                               ## @.str.4
	.asciz	"Error unknown sensor type: %02x%02x"

	.no_dead_strip	_ov_hires_configure
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov_hires_configure
_ov_hires_configure:                    ; @ov_hires_configure
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _BRIDGE_OVFX2@GOTPAGE
Lloh1:
	ldr	x9, [x9, _BRIDGE_OVFX2@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_4
; %bb.1:
	mov	x19, x0
Lloh3:
	adrp	x21, _D_PROBE@GOTPAGE
Lloh4:
	ldr	x21, [x21, _D_PROBE@GOTPAGEOFF]
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_PDEBUG
	mov	x0, x19
	mov	w1, #10
	bl	_i2c_r
	mov	x20, x0
	mov	x0, x19
	mov	w1, #11
	bl	_i2c_r
                                        ; kill: def $w0 killed $w0 def $x0
	cmp	w20, #150
	b.ne	LBB0_5
; %bb.2:
	cmp	w0, #64
	b.ne	LBB0_5
; %bb.3:
	ldr	w0, [x21]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	bl	_PDEBUG
Lloh9:
	adrp	x8, _SEN_OV2610@GOTPAGE
Lloh10:
	ldr	x8, [x8, _SEN_OV2610@GOTPAGEOFF]
	b	LBB0_8
LBB0_4:
Lloh11:
	adrp	x0, l_.str@PAGE
Lloh12:
	add	x0, x0, l_.str@PAGEOFF
	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
	add	sp, sp, #64
	b	_err
LBB0_5:
	cmp	w20, #54
	b.ne	LBB0_9
; %bb.6:
	and	w8, w0, #0xf
	cbnz	w8, LBB0_9
; %bb.7:
	ldr	w0, [x21]
Lloh13:
	adrp	x1, l_.str.3@PAGE
Lloh14:
	add	x1, x1, l_.str.3@PAGEOFF
	bl	_PDEBUG
Lloh15:
	adrp	x8, _SEN_OV3610@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SEN_OV3610@GOTPAGEOFF]
LBB0_8:
	ldr	w8, [x8]
	str	w8, [x19, #8]
	b	LBB0_10
LBB0_9:
	stp	x20, x0, [sp]
Lloh17:
	adrp	x0, l_.str.4@PAGE
Lloh18:
	add	x0, x0, l_.str.4@PAGEOFF
	bl	_err
LBB0_10:
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpAdd	Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_BRIDGE_OVFX2,8,3               ; @BRIDGE_OVFX2
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"error hires sensors only supported with ovfx2"

	.comm	_D_PROBE,4,2                    ; @D_PROBE
l_.str.1:                               ; @.str.1
	.asciz	"starting ov hires configuration"

l_.str.2:                               ; @.str.2
	.asciz	"Sensor is an OV2610"

	.comm	_SEN_OV2610,4,2                 ; @SEN_OV2610
l_.str.3:                               ; @.str.3
	.asciz	"Sensor is an OV3610"

	.comm	_SEN_OV3610,4,2                 ; @SEN_OV3610
l_.str.4:                               ; @.str.4
	.asciz	"Error unknown sensor type: %02x%02x"

	.no_dead_strip	_ov_hires_configure
.subsections_via_symbols
