	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function s5k4ecgx_i2c_read
_s5k4ecgx_i2c_read:                     ## @s5k4ecgx_i2c_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	$96, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %r15
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movl	%esi, %eax
	sarl	$8, %eax
	movl	%eax, -48(%rbp)
	movzbl	%r14b, %eax
	movl	%eax, -44(%rbp)
	movl	4(%rdi), %eax
	movl	%eax, -88(%rbp)
	movq	$0, -96(%rbp)
	movl	$2, -112(%rbp)
	leaq	-48(%rbp), %rcx
	movq	%rcx, -104(%rbp)
	movl	%eax, -56(%rbp)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -64(%rbp)
	movl	$2, -80(%rbp)
	leaq	-120(%rbp), %rax
	movq	%rax, -72(%rbp)
	movl	(%rdi), %edi
	leaq	-112(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	movl	%eax, %ebx
	movl	-120(%rbp), %edi
	callq	_be16_to_cpu
	movl	%eax, (%r15)
	movq	_debug@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	leaq	L_.str(%rip), %rcx
	movl	$4, %edi
	movq	%r12, %rdx
	movl	%r14d, %r8d
	movl	%eax, %r9d
	callq	_v4l2_dbg
	xorl	%eax, %eax
	cmpl	$2, %ebx
	cmovnel	%ebx, %eax
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_2
## %bb.1:
	addq	$96, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_2:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,8,3                   ## @I2C_M_RD
	.comm	_debug,4,2                      ## @debug
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"i2c_read: 0x%04X : 0x%04x\n"

	.no_dead_strip	_s5k4ecgx_i2c_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function s5k4ecgx_i2c_read
_s5k4ecgx_i2c_read:                     ; @s5k4ecgx_i2c_read
	.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, x2
	mov	x20, 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, [x29, #-48]
	mov	w8, #2
	str	w8, [sp, #16]
	sub	x9, x29, #48
	stp	x9, xzr, [sp, #24]
	ldp	w0, w9, [x0]
	str	w9, [sp, #72]
Lloh3:
	adrp	x10, _I2C_M_RD@GOTPAGE
Lloh4:
	ldr	x10, [x10, _I2C_M_RD@GOTPAGEOFF]
Lloh5:
	ldr	x10, [x10]
	str	w9, [sp, #40]
	str	w8, [sp, #48]
	add	x8, sp, #8
	stp	x8, x10, [sp, #56]
	add	x1, sp, #16
	mov	w2, #2
	bl	_i2c_transfer
	mov	x22, x0
	ldr	w0, [sp, #8]
	bl	_be16_to_cpu
	mov	x5, x0
	str	w0, [x19]
Lloh6:
	adrp	x8, _debug@GOTPAGE
Lloh7:
	ldr	x8, [x8, _debug@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x3, l_.str@PAGE
Lloh10:
	add	x3, x3, l_.str@PAGEOFF
	mov	w0, #4
	mov	x2, x21
	mov	x4, x20
	bl	_v4l2_dbg
	cmp	w22, #2
	csel	w0, wzr, w22, eq
	ldur	x8, [x29, #-40]
Lloh11:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh12:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh13:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_2
; %bb.1:
	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_2:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,8,3                   ; @I2C_M_RD
	.comm	_debug,4,2                      ; @debug
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"i2c_read: 0x%04X : 0x%04x\n"

	.no_dead_strip	_s5k4ecgx_i2c_read
.subsections_via_symbols
