	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov2659_read
_ov2659_read:                           ## @ov2659_read
	.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
	subq	$80, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r14
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	%esi, %eax
	sarl	$8, %eax
	movl	%eax, -104(%rbp)
	movzbl	%r15b, %eax
	movl	%eax, -100(%rbp)
	movl	12(%rdi), %eax
	movl	%eax, -76(%rbp)
	movl	(%rdi), %ecx
	movl	%ecx, -96(%rbp)
	leaq	-104(%rbp), %rdx
	movq	%rdx, -88(%rbp)
	movl	$8, -80(%rbp)
	movl	%eax, -52(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	orl	(%rax), %ecx
	movl	%ecx, -72(%rbp)
	movq	%rdx, -64(%rbp)
	movl	$1, -56(%rbp)
	movl	8(%rdi), %edi
	leaq	-96(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	testl	%eax, %eax
	js	LBB0_2
## %bb.1:
	movl	-104(%rbp), %eax
	movl	%eax, (%r14)
	xorl	%r12d, %r12d
	jmp	LBB0_3
LBB0_2:
	movl	%eax, %r12d
	addq	$4, %rbx
	movl	(%r14), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	movl	%r15d, %edx
	callq	_dev_dbg
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-40(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	movl	%r12d, %eax
	addq	$80, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ov2659 read reg(0x%x val:0x%x) failed !\n"

	.no_dead_strip	_ov2659_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov2659_read
_ov2659_read:                           ; @ov2659_read
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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	x20, x2
	mov	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-40]
	asr	w8, w1, #8
	and	w9, w1, #0xff
	stp	w8, w9, [sp]
	ldr	w8, [x0]
	str	w8, [sp, #8]
	mov	w9, #8
	ldp	w0, w10, [x0, #8]
	stp	w9, w10, [sp, #24]
Lloh3:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	orr	w8, w9, w8
	mov	x9, sp
	str	x9, [sp, #16]
	str	w8, [sp, #32]
	str	x9, [sp, #40]
	mov	w8, #1
	stp	w8, w10, [sp, #48]
	add	x1, sp, #8
	mov	w2, #2
	bl	_i2c_transfer
	tbnz	w0, #31, LBB0_2
; %bb.1:
	mov	w22, #0
	ldr	w8, [sp]
	str	w8, [x20]
	b	LBB0_3
LBB0_2:
	mov	x22, x0
	add	x0, x21, #4
	ldr	w3, [x20]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x19
	bl	_dev_dbg
LBB0_3:
	ldur	x8, [x29, #-40]
Lloh8:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh9:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	mov	x0, x22
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ov2659 read reg(0x%x val:0x%x) failed !\n"

	.no_dead_strip	_ov2659_read
.subsections_via_symbols
