	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xfer_read
_xfer_read:                             ## @xfer_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testl	%edx, %edx
	je	LBB0_8
## %bb.1:
	movq	%rsi, %rbx
	movq	%rdi, -48(%rbp)                 ## 8-byte Spill
	movzbl	(%rsi), %r12d
	movl	%edx, %r13d
	xorl	%r15d, %r15d
	movq	_I2C_DATACMD@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	_I2C_STATUS_TFNF@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_poll_status
	testl	%eax, %eax
	je	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_2 Depth=1
	leaq	(%r12,%r15), %rdi
	movq	_I2C_DATACMD_WRITE@GOTPCREL(%rip), %rax
	orl	(%rax), %edi
	movl	(%r14), %esi
                                        ## kill: def $edi killed $edi killed $rdi
	callq	_writel
	movq	_I2C_DATACMD_READ@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	movl	(%r14), %esi
	callq	_writel
	movq	_I2C_STATUS_RFNE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_poll_status
	testl	%eax, %eax
	je	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_2 Depth=1
	movl	(%r14), %edi
	callq	_readl
	movq	_I2C_DATACMD_DAT_MASK@GOTPCREL(%rip), %rcx
	andb	(%rcx), %al
	movb	%al, (%rbx,%r15)
	incq	%r15
	cmpl	%r15d, %r13d
	jne	LBB0_2
LBB0_8:
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_3:
	leaq	L_.str(%rip), %rsi
	jmp	LBB0_4
LBB0_6:
	leaq	L_.str.1(%rip), %rsi
LBB0_4:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_dev_dbg
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_9:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_I2C_STATUS_TFNF,4,2            ## @I2C_STATUS_TFNF
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Tx FIFO Not Full timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.comm	_I2C_DATACMD_WRITE,4,2          ## @I2C_DATACMD_WRITE
	.comm	_I2C_DATACMD,4,2                ## @I2C_DATACMD
	.comm	_I2C_DATACMD_READ,4,2           ## @I2C_DATACMD_READ
	.comm	_I2C_STATUS_RFNE,4,2            ## @I2C_STATUS_RFNE
L_.str.1:                               ## @.str.1
	.asciz	"RXRDY timeout\n"

	.comm	_I2C_DATACMD_DAT_MASK,1,0       ## @I2C_DATACMD_DAT_MASK
	.no_dead_strip	_xfer_read
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xfer_read
_xfer_read:                             ; @xfer_read
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-96]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	cbz	w2, LBB0_5
; %bb.1:
	mov	x21, x2
	mov	x22, x1
	mov	x19, x0
	ldrb	w23, [x1]
Lloh0:
	adrp	x24, _I2C_STATUS_TFNF@GOTPAGE
Lloh1:
	ldr	x24, [x24, _I2C_STATUS_TFNF@GOTPAGEOFF]
Lloh2:
	adrp	x25, _I2C_DATACMD_WRITE@GOTPAGE
Lloh3:
	ldr	x25, [x25, _I2C_DATACMD_WRITE@GOTPAGEOFF]
Lloh4:
	adrp	x26, _I2C_DATACMD@GOTPAGE
Lloh5:
	ldr	x26, [x26, _I2C_DATACMD@GOTPAGEOFF]
Lloh6:
	adrp	x28, _I2C_DATACMD_READ@GOTPAGE
Lloh7:
	ldr	x28, [x28, _I2C_DATACMD_READ@GOTPAGEOFF]
Lloh8:
	adrp	x27, _I2C_STATUS_RFNE@GOTPAGE
Lloh9:
	ldr	x27, [x27, _I2C_STATUS_RFNE@GOTPAGEOFF]
Lloh10:
	adrp	x20, _I2C_DATACMD_DAT_MASK@GOTPAGE
Lloh11:
	ldr	x20, [x20, _I2C_DATACMD_DAT_MASK@GOTPAGEOFF]
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w0, [x24]
	bl	_poll_status
	cbz	w0, LBB0_6
; %bb.3:                                ;   in Loop: Header=BB0_2 Depth=1
	ldr	w8, [x25]
	orr	w0, w8, w23
	ldr	w1, [x26]
	bl	_writel
	ldr	w0, [x28]
	ldr	w1, [x26]
	bl	_writel
	ldr	w0, [x27]
	bl	_poll_status
	cbz	w0, LBB0_7
; %bb.4:                                ;   in Loop: Header=BB0_2 Depth=1
	sub	w21, w21, #1
	add	w23, w23, #1
	ldr	w0, [x26]
	bl	_readl
	ldrb	w8, [x20]
	and	w8, w8, w0
	strb	w8, [x22], #1
	cbnz	w21, LBB0_2
LBB0_5:
	mov	w0, #0
	b	LBB0_9
LBB0_6:
Lloh12:
	adrp	x1, l_.str@PAGE
Lloh13:
	add	x1, x1, l_.str@PAGEOFF
	b	LBB0_8
LBB0_7:
Lloh14:
	adrp	x1, l_.str.1@PAGE
Lloh15:
	add	x1, x1, l_.str.1@PAGEOFF
LBB0_8:
	mov	x0, x19
	bl	_dev_dbg
Lloh16:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh17:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
Lloh18:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #96             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh16, Lloh17, Lloh18
	.cfi_endproc
                                        ; -- End function
	.comm	_I2C_STATUS_TFNF,4,2            ; @I2C_STATUS_TFNF
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Tx FIFO Not Full timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.comm	_I2C_DATACMD_WRITE,4,2          ; @I2C_DATACMD_WRITE
	.comm	_I2C_DATACMD,4,2                ; @I2C_DATACMD
	.comm	_I2C_DATACMD_READ,4,2           ; @I2C_DATACMD_READ
	.comm	_I2C_STATUS_RFNE,4,2            ; @I2C_STATUS_RFNE
l_.str.1:                               ; @.str.1
	.asciz	"RXRDY timeout\n"

	.comm	_I2C_DATACMD_DAT_MASK,1,0       ; @I2C_DATACMD_DAT_MASK
	.no_dead_strip	_xfer_read
.subsections_via_symbols
