	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function i2c_sirfsoc_xfer
LCPI0_0:
	.space	16
	.section	__TEXT,__text,regular,pure_instructions
	.p2align	4, 0x90
_i2c_sirfsoc_xfer:                      ## @i2c_sirfsoc_xfer
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movq	%rsi, %r15
	movq	(%rdi), %rbx
	movl	8(%rbx), %edi
	callq	_clk_enable
	testl	%r14d, %r14d
	jle	LBB0_6
## %bb.1:
	leaq	16(%rbx), %r12
	leal	-1(%r14), %eax
	movq	%r14, -48(%rbp)                 ## 8-byte Spill
	movl	%r14d, %ecx
	shlq	$2, %rax
	leaq	(%rax,%rax,2), %rax
	movq	%rax, -56(%rbp)                 ## 8-byte Spill
	shlq	$2, %rcx
	leaq	(%rcx,%rcx,2), %r14
	xorl	%r13d, %r13d
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	leaq	(%r15,%r13), %rsi
	movl	8(%r15,%r13), %eax
	movl	%eax, 44(%rbx)
	movl	4(%r15,%r13), %eax
	movl	%eax, 40(%rbx)
	movq	_I2C_M_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%ecx, %ecx
	andl	(%r15,%r13), %eax
	setne	%cl
	movl	%ecx, (%rbx)
	xorl	%eax, %eax
	cmpq	%r13, -56(%rbp)                 ## 8-byte Folded Reload
	sete	%al
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r12)
	movq	$0, 16(%r12)
	movl	%eax, 4(%rbx)
	movq	%rbx, %rdi
	callq	_i2c_sirfsoc_xfer_msg
	testl	%eax, %eax
	jne	LBB0_5
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	addq	$12, %r13
	cmpq	%r13, %r14
	jne	LBB0_2
## %bb.4:
	movq	-48(%rbp), %r14                 ## 8-byte Reload
	jmp	LBB0_6
LBB0_5:
	movl	%eax, %r14d
LBB0_6:
	movl	8(%rbx), %edi
	callq	_clk_disable
	movl	%r14d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_M_RD,4,2                   ## @I2C_M_RD
	.no_dead_strip	_i2c_sirfsoc_xfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function i2c_sirfsoc_xfer
_i2c_sirfsoc_xfer:                      ; @i2c_sirfsoc_xfer
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x2
	mov	x21, x1
	ldr	x20, [x0]
	ldr	w0, [x20, #8]
	bl	_clk_enable
	subs	w22, w19, #1
	b.lt	LBB0_5
; %bb.1:
	add	x23, x20, #16
	mov	w24, w19
Lloh0:
	adrp	x25, _I2C_M_RD@GOTPAGE
Lloh1:
	ldr	x25, [x25, _I2C_M_RD@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldur	d0, [x21, #4]
	str	d0, [x20, #40]
	ldr	w8, [x21]
	ldr	w9, [x25]
	tst	w9, w8
	cset	w8, ne
	cmp	x22, #0
	cset	w9, eq
	stp	xzr, xzr, [x23, #8]
	str	xzr, [x23]
	stp	w8, w9, [x20]
	mov	x0, x20
	mov	x1, x21
	bl	_i2c_sirfsoc_xfer_msg
	cbnz	w0, LBB0_4
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	x22, x22, #1
	add	x21, x21, #12
	subs	x24, x24, #1
	b.ne	LBB0_2
	b	LBB0_5
LBB0_4:
	mov	x19, x0
LBB0_5:
	ldr	w0, [x20, #8]
	bl	_clk_disable
	mov	x0, x19
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_M_RD,4,2                   ; @I2C_M_RD
	.no_dead_strip	_i2c_sirfsoc_xfer
.subsections_via_symbols
