	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ov5695_read_reg
_ov5695_read_reg:                       ## @ov5695_read_reg
	.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
	subq	$88, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rcx, %r14
	movl	%edx, %ebx
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -32(%rbp)
	movq	$0, -112(%rbp)
	movl	%esi, %edi
	callq	_cpu_to_be16
	movl	%eax, -100(%rbp)
	cmpl	$5, %ebx
	jb	LBB0_3
## %bb.1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_3:
	movl	4(%r15), %eax
	movl	%eax, -72(%rbp)
	movq	$0, -80(%rbp)
	movl	$2, -96(%rbp)
	leaq	-100(%rbp), %rcx
	movq	%rcx, -88(%rbp)
	movl	%eax, -40(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movl	%ebx, -64(%rbp)
	movl	$4, %eax
	subl	%ebx, %eax
	leaq	-112(,%rax,4), %rax
	addq	%rbp, %rax
	movq	%rax, -56(%rbp)
	movl	(%r15), %ebx
	leaq	-96(%rbp), %r15
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	movl	%ebx, %edi
	movq	%r15, %rsi
	movl	%eax, %edx
	callq	_i2c_transfer
	movl	%eax, %ebx
	movq	%r15, %rdi
	callq	_ARRAY_SIZE
	cmpl	%eax, %ebx
	jne	LBB0_4
## %bb.5:
	movq	-112(%rbp), %rdi
	callq	_be32_to_cpu
	movl	%eax, (%r14)
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_4:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-32(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	addq	$88, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ov5695_read_reg
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ov5695_read_reg
_ov5695_read_reg:                       ; @ov5695_read_reg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #144
	.cfi_def_cfa_offset 144
	stp	x22, x21, [sp, #96]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #112]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #128]            ; 16-byte Folded Spill
	add	x29, sp, #128
	.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	x19, x3
	mov	x20, x2
	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]
	str	xzr, [sp, #16]
	mov	x0, x1
	bl	_cpu_to_be16
	str	w0, [sp, #12]
	cmp	w20, #5
	b.lo	LBB0_2
; %bb.1:
Lloh3:
	adrp	x8, _EINVAL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
	b	LBB0_5
LBB0_2:
	mov	w8, #2
	str	w8, [sp, #24]
	add	x8, sp, #12
	stp	x8, xzr, [sp, #32]
	ldp	w21, w8, [x21]
	str	w8, [sp, #80]
Lloh5:
	adrp	x9, _I2C_M_RD@GOTPAGE
Lloh6:
	ldr	x9, [x9, _I2C_M_RD@GOTPAGEOFF]
Lloh7:
	ldr	x9, [x9]
	str	w8, [sp, #48]
	str	w20, [sp, #56]
	mov	w8, #4
	sub	w8, w8, w20
	add	x10, sp, #16
	add	x8, x10, w8, uxtw #2
	stp	x8, x9, [sp, #64]
	add	x0, sp, #24
	bl	_ARRAY_SIZE
	mov	x2, x0
	add	x1, sp, #24
	mov	x0, x21
	bl	_i2c_transfer
	mov	x20, x0
	add	x0, sp, #24
	bl	_ARRAY_SIZE
	cmp	w20, w0
	b.ne	LBB0_4
; %bb.3:
	ldr	x0, [sp, #16]
	bl	_be32_to_cpu
	mov	x8, x0
	mov	w0, #0
	str	w8, [x19]
	b	LBB0_6
LBB0_4:
Lloh8:
	adrp	x8, _EIO@GOTPAGE
Lloh9:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_5:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldur	x8, [x29, #-40]
Lloh10:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh11:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh12:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	ldp	x29, x30, [sp, #128]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #112]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #96]             ; 16-byte Folded Reload
	add	sp, sp, #144
	ret
LBB0_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ov5695_read_reg
.subsections_via_symbols
