	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xlr_i2c_rx
_xlr_i2c_rx:                            ## @xlr_i2c_rx
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%ecx, %r14d
	movq	%rdx, -72(%rbp)                 ## 8-byte Spill
	movl	%esi, %ebx
	movq	%rdi, %r13
	movl	8(%rdi), %edi
	movq	_XLR_I2C_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XLR_I2C_CFG_NOADDR@GOTPCREL(%rip), %rax
	movq	24(%r13), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_xlr_i2c_wreg
	movl	8(%r13), %edi
	movq	_XLR_I2C_BYTECNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
	leal	-1(%rbx), %edx
	callq	_xlr_i2c_wreg
	movl	8(%r13), %edi
	movq	_XLR_I2C_DEVADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_xlr_i2c_wreg
	movq	$0, 16(%r13)
	movq	_XLR_I2C_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	%rax, %r12
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	%rax, -64(%rbp)                 ## 8-byte Spill
	addq	(%rcx), %r12
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
LBB0_1:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_3 Depth 2
	movl	8(%r13), %edi
	movq	_XLR_I2C_STARTXFR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XLR_I2C_STARTXFR_RD@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_xlr_i2c_wreg
	cmpq	$0, (%r13)
	jg	LBB0_16
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ##   Parent Loop BB0_1 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%ebx, %ebx
	jne	LBB0_10
## %bb.4:                               ##   in Loop: Header=BB0_3 Depth=2
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r14
	movl	8(%r13), %edi
	movq	_XLR_I2C_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_xlr_i2c_rdreg
	movq	%rax, %r15
	movq	_XLR_I2C_RXRDY@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_8
## %bb.5:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	cmpl	-56(%rbp), %ebx                 ## 4-byte Folded Reload
	jge	LBB0_6
## %bb.7:                               ##   in Loop: Header=BB0_3 Depth=2
	movl	8(%r13), %edi
	movq	_XLR_I2C_DATAIN@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_xlr_i2c_rdreg
	movslq	%ebx, %rcx
	incl	%ebx
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	movq	-72(%rbp), %rdx                 ## 8-byte Reload
	movq	%rax, (%rdx,%rcx,8)
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	addq	-64(%rbp), %r12                 ## 8-byte Folded Reload
LBB0_8:                                 ##   in Loop: Header=BB0_3 Depth=2
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_time_after
	movl	%eax, %ebx
	movq	_XLR_I2C_ARB_STARTERR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_9
## %bb.12:                              ##   in Loop: Header=BB0_3 Depth=2
	movq	_XLR_I2C_ACK_ERR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_6
## %bb.13:                              ##   in Loop: Header=BB0_3 Depth=2
	movq	%r13, %rdi
	movl	%r15d, %esi
	callq	_xlr_i2c_busy
	testl	%eax, %eax
	jne	LBB0_3
	jmp	LBB0_14
	.p2align	4, 0x90
LBB0_9:                                 ##   in Loop: Header=BB0_1 Depth=1
	testl	%ebx, %ebx
	je	LBB0_1
LBB0_10:
	addq	$32, %r13
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_11
LBB0_6:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_11:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_15
LBB0_14:
	xorl	%eax, %eax
LBB0_15:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	movq	_XLR_I2C_TIMEOUT@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	movq	%r13, %rdi
                                        ## kill: def $esi killed $esi killed $rsi
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_xlr_i2c_wait                   ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_XLR_I2C_CFG,4,2                ## @XLR_I2C_CFG
	.comm	_XLR_I2C_CFG_NOADDR,4,2         ## @XLR_I2C_CFG_NOADDR
	.comm	_XLR_I2C_BYTECNT,4,2            ## @XLR_I2C_BYTECNT
	.comm	_XLR_I2C_DEVADDR,4,2            ## @XLR_I2C_DEVADDR
	.comm	_XLR_I2C_TIMEOUT,4,2            ## @XLR_I2C_TIMEOUT
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_XLR_I2C_STARTXFR,4,2           ## @XLR_I2C_STARTXFR
	.comm	_XLR_I2C_STARTXFR_RD,4,2        ## @XLR_I2C_STARTXFR_RD
	.comm	_XLR_I2C_STATUS,4,2             ## @XLR_I2C_STATUS
	.comm	_XLR_I2C_RXRDY,4,2              ## @XLR_I2C_RXRDY
	.comm	_EIO,4,2                        ## @EIO
	.comm	_XLR_I2C_DATAIN,4,2             ## @XLR_I2C_DATAIN
	.comm	_XLR_I2C_ARB_STARTERR,4,2       ## @XLR_I2C_ARB_STARTERR
	.comm	_XLR_I2C_ACK_ERR,4,2            ## @XLR_I2C_ACK_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C receive timeout\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
	.no_dead_strip	_xlr_i2c_rx
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xlr_i2c_rx
_xlr_i2c_rx:                            ; @xlr_i2c_rx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
	mov	x22, x3
	str	x2, [sp, #8]                    ; 8-byte Folded Spill
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
Lloh0:
	adrp	x8, _XLR_I2C_CFG@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XLR_I2C_CFG@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
Lloh3:
	adrp	x8, _XLR_I2C_CFG_NOADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XLR_I2C_CFG_NOADDR@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	x9, [x19, #24]
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_xlr_i2c_wreg
	ldr	w0, [x19, #8]
Lloh6:
	adrp	x8, _XLR_I2C_BYTECNT@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XLR_I2C_BYTECNT@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	sub	w2, w20, #1
	bl	_xlr_i2c_wreg
	ldr	w0, [x19, #8]
Lloh9:
	adrp	x8, _XLR_I2C_DEVADDR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XLR_I2C_DEVADDR@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	mov	x2, x22
	bl	_xlr_i2c_wreg
	str	xzr, [x19, #16]
Lloh12:
	adrp	x8, _XLR_I2C_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _XLR_I2C_TIMEOUT@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
	mov	x22, x0
	mov	w28, #0
Lloh15:
	adrp	x27, _jiffies@GOTPAGE
Lloh16:
	ldr	x27, [x27, _jiffies@GOTPAGEOFF]
	ldr	x8, [x27]
	add	x23, x8, x0
Lloh17:
	adrp	x26, _XLR_I2C_STATUS@GOTPAGE
Lloh18:
	ldr	x26, [x26, _XLR_I2C_STATUS@GOTPAGEOFF]
Lloh19:
	adrp	x21, _XLR_I2C_RXRDY@GOTPAGE
Lloh20:
	ldr	x21, [x21, _XLR_I2C_RXRDY@GOTPAGEOFF]
LBB0_1:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_3 Depth 2
	ldr	w0, [x19, #8]
Lloh21:
	adrp	x8, _XLR_I2C_STARTXFR@GOTPAGE
Lloh22:
	ldr	x8, [x8, _XLR_I2C_STARTXFR@GOTPAGEOFF]
Lloh23:
	ldr	w1, [x8]
Lloh24:
	adrp	x8, _XLR_I2C_STARTXFR_RD@GOTPAGE
Lloh25:
	ldr	x8, [x8, _XLR_I2C_STARTXFR_RD@GOTPAGEOFF]
Lloh26:
	ldr	w2, [x8]
	bl	_xlr_i2c_wreg
	ldr	x8, [x19]
	cmp	x8, #0
	b.gt	LBB0_15
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w25, #0
LBB0_3:                                 ;   Parent Loop BB0_1 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbnz	w25, LBB0_11
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	x25, [x27]
	ldr	w0, [x19, #8]
	ldr	w1, [x26]
	bl	_xlr_i2c_rdreg
	mov	x24, x0
	ldr	w8, [x21]
	tst	w8, w24
	b.eq	LBB0_7
; %bb.5:                                ;   in Loop: Header=BB0_3 Depth=2
	cmp	w28, w20
	b.ge	LBB0_12
; %bb.6:                                ;   in Loop: Header=BB0_3 Depth=2
	ldr	w0, [x19, #8]
Lloh27:
	adrp	x8, _XLR_I2C_DATAIN@GOTPAGE
Lloh28:
	ldr	x8, [x8, _XLR_I2C_DATAIN@GOTPAGEOFF]
Lloh29:
	ldr	w1, [x8]
	bl	_xlr_i2c_rdreg
	ldr	x8, [sp, #8]                    ; 8-byte Folded Reload
	str	x0, [x8, w28, sxtw #3]
	add	w28, w28, #1
	ldr	x8, [x27]
	add	x23, x8, x22
LBB0_7:                                 ;   in Loop: Header=BB0_3 Depth=2
	mov	x0, x25
	mov	x1, x23
	bl	_time_after
	mov	x25, x0
Lloh30:
	adrp	x8, _XLR_I2C_ARB_STARTERR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _XLR_I2C_ARB_STARTERR@GOTPAGEOFF]
Lloh32:
	ldr	w8, [x8]
	tst	w8, w24
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_3 Depth=2
Lloh33:
	adrp	x8, _XLR_I2C_ACK_ERR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _XLR_I2C_ACK_ERR@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w24
	b.ne	LBB0_12
; %bb.9:                                ;   in Loop: Header=BB0_3 Depth=2
	mov	x0, x19
	mov	x1, x24
	bl	_xlr_i2c_busy
	cbnz	w0, LBB0_3
	b	LBB0_14
LBB0_10:                                ;   in Loop: Header=BB0_1 Depth=1
	cbz	w25, LBB0_1
LBB0_11:
	add	x0, x19, #32
Lloh36:
	adrp	x1, l_.str@PAGE
Lloh37:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh38:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh39:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh40:
	adrp	x8, _EIO@GOTPAGE
Lloh41:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
LBB0_15:
Lloh42:
	adrp	x8, _XLR_I2C_TIMEOUT@GOTPAGE
Lloh43:
	ldr	x8, [x8, _XLR_I2C_TIMEOUT@GOTPAGEOFF]
Lloh44:
	ldr	w8, [x8]
	mul	w1, w8, w20
	mov	x0, x19
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	b	_xlr_i2c_wait
	.loh AdrpLdrGot	Lloh19, Lloh20
	.loh AdrpLdrGot	Lloh17, Lloh18
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh24, Lloh25, Lloh26
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.loh AdrpLdrGotLdr	Lloh27, Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGot	Lloh38, Lloh39
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.comm	_XLR_I2C_CFG,4,2                ; @XLR_I2C_CFG
	.comm	_XLR_I2C_CFG_NOADDR,4,2         ; @XLR_I2C_CFG_NOADDR
	.comm	_XLR_I2C_BYTECNT,4,2            ; @XLR_I2C_BYTECNT
	.comm	_XLR_I2C_DEVADDR,4,2            ; @XLR_I2C_DEVADDR
	.comm	_XLR_I2C_TIMEOUT,4,2            ; @XLR_I2C_TIMEOUT
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_XLR_I2C_STARTXFR,4,2           ; @XLR_I2C_STARTXFR
	.comm	_XLR_I2C_STARTXFR_RD,4,2        ; @XLR_I2C_STARTXFR_RD
	.comm	_XLR_I2C_STATUS,4,2             ; @XLR_I2C_STATUS
	.comm	_XLR_I2C_RXRDY,4,2              ; @XLR_I2C_RXRDY
	.comm	_EIO,4,2                        ; @EIO
	.comm	_XLR_I2C_DATAIN,4,2             ; @XLR_I2C_DATAIN
	.comm	_XLR_I2C_ARB_STARTERR,4,2       ; @XLR_I2C_ARB_STARTERR
	.comm	_XLR_I2C_ACK_ERR,4,2            ; @XLR_I2C_ACK_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C receive timeout\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
	.no_dead_strip	_xlr_i2c_rx
.subsections_via_symbols
