	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sii8620_read_buf
_sii8620_read_buf:                      ## @sii8620_read_buf
	.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	%r13
	pushq	%r12
	pushq	%rbx
	subq	$72, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %ebx
	movq	%rdx, %r13
	movl	%esi, %r14d
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %r12
	movq	%r12, %rdi
	callq	_to_i2c_client
	movl	%r14d, -104(%rbp)
	movl	(%rax), %ecx
	movl	%ecx, -96(%rbp)
	movl	$1, -92(%rbp)
	leaq	-104(%rbp), %rdx
	movq	%rdx, -88(%rbp)
	movq	_sii8620_i2c_page@GOTPCREL(%rip), %rdx
	movq	(%rdx), %rdx
	movl	%r14d, %esi
	sarl	$8, %esi
	movslq	%esi, %rsi
	movq	_I2C_M_RD@GOTPCREL(%rip), %rdi
	orl	(%rdi), %ecx
	movl	(%rdx,%rsi,4), %edi
	movl	%edi, -80(%rbp)
	movl	%ecx, -72(%rbp)
	movl	%ebx, -100(%rbp)                ## 4-byte Spill
	movl	%ebx, -68(%rbp)
	movq	%r13, -64(%rbp)
	movl	(%rdx,%rsi,4), %ecx
	movl	%ecx, -56(%rbp)
	cmpl	$0, (%r15)
	jne	LBB0_3
## %bb.1:
	movl	4(%rax), %edi
	leaq	-96(%rbp), %rsi
	movl	$2, %edx
	callq	_i2c_transfer
	movl	%eax, %ebx
	leaq	L_.str(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	movl	-100(%rbp), %ecx                ## 4-byte Reload
	movq	%r13, %r8
	movl	%eax, %r9d
	callq	_dev_dbg
	cmpl	$2, %ebx
	je	LBB0_3
## %bb.2:
	leaq	L_.str.1(%rip), %rsi
	movq	%r12, %rdi
	movl	%r14d, %edx
	movl	-100(%rbp), %ecx                ## 4-byte Reload
	movl	%ebx, %r8d
	callq	_dev_err
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ecx, %ecx
	subl	(%rax), %ecx
	testl	%ebx, %ebx
	cmovsl	%ebx, %ecx
	movl	%ecx, (%r15)
LBB0_3:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_5
## %bb.4:
	addq	$72, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_5:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_sii8620_i2c_page,8,3           ## @sii8620_i2c_page
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"read at %04x: %*ph, %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"Read at %#06x of %d bytes failed with code %d.\n"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_sii8620_read_buf
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sii8620_read_buf
_sii8620_read_buf:                      ; @sii8620_read_buf
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x24, x23, [sp, #64]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #80]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #96]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #112]            ; 16-byte Folded Spill
	add	x29, sp, #112
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	mov	x20, x3
	mov	x23, x2
	mov	x21, x1
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #56]
	ldr	x22, [x0, #8]
	mov	x0, x22
	bl	_to_i2c_client
	str	w21, [sp, #4]
	ldr	w8, [x0]
	mov	w9, #1
	stp	w8, w9, [sp, #8]
	add	x9, sp, #4
Lloh3:
	adrp	x10, _sii8620_i2c_page@GOTPAGE
Lloh4:
	ldr	x10, [x10, _sii8620_i2c_page@GOTPAGEOFF]
	str	x9, [sp, #16]
Lloh5:
	ldr	x9, [x10]
	asr	w10, w21, #8
	sbfiz	x10, x10, #2, #32
Lloh6:
	adrp	x11, _I2C_M_RD@GOTPAGE
Lloh7:
	ldr	x11, [x11, _I2C_M_RD@GOTPAGEOFF]
Lloh8:
	ldr	w11, [x11]
	orr	w8, w11, w8
	ldr	w11, [x9, x10]
	str	w11, [sp, #24]
	stp	w8, w20, [sp, #32]
	str	x23, [sp, #40]
	ldr	w8, [x9, x10]
	str	w8, [sp, #48]
	ldr	w8, [x19]
	cbnz	w8, LBB0_3
; %bb.1:
	ldr	w0, [x0, #4]
	add	x1, sp, #8
	mov	w2, #2
	bl	_i2c_transfer
	mov	x24, x0
Lloh9:
	adrp	x1, l_.str@PAGE
Lloh10:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x23
	mov	x5, x24
	bl	_dev_dbg
	cmp	w24, #2
	b.eq	LBB0_3
; %bb.2:
Lloh11:
	adrp	x1, l_.str.1@PAGE
Lloh12:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x22
	mov	x2, x21
	mov	x3, x20
	mov	x4, x24
	bl	_dev_err
Lloh13:
	adrp	x8, _EIO@GOTPAGE
Lloh14:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh15:
	ldr	w8, [x8]
	cmp	w24, #0
	csneg	w8, w24, w8, lt
	str	w8, [x19]
LBB0_3:
	ldr	x8, [sp, #56]
Lloh16:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh17:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh18:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_5
; %bb.4:
	ldp	x29, x30, [sp, #112]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #96]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #80]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #64]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_5:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh13, Lloh14, Lloh15
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_sii8620_i2c_page,8,3           ; @sii8620_i2c_page
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"read at %04x: %*ph, %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"Read at %#06x of %d bytes failed with code %d.\n"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_sii8620_read_buf
.subsections_via_symbols
