	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function xlr_i2c_tx
_xlr_i2c_tx:                            ## @xlr_i2c_tx
	.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, %r12
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	(%rdx), %edx
	movl	16(%rdi), %edi
	movq	_XLR_I2C_ADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_xlr_i2c_wreg
	movl	16(%rbx), %edi
	movq	_XLR_I2C_DEVADDR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%r14d, %edx
	callq	_xlr_i2c_wreg
	movl	16(%rbx), %edi
	movq	_XLR_I2C_CFG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	_XLR_I2C_CFG_ADDR@GOTPCREL(%rip), %rax
	movq	24(%rbx), %rcx
	movl	(%rcx), %edx
	orl	(%rax), %edx
	callq	_xlr_i2c_wreg
	movq	_XLR_I2C_TIMEOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_msecs_to_jiffies
	movq	_jiffies@GOTPCREL(%rip), %rcx
	movq	(%rcx), %r14
	movq	%rax, -72(%rbp)                 ## 8-byte Spill
	addq	%rax, %r14
	movl	16(%rbx), %edi
	movq	_XLR_I2C_BYTECNT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	cmpl	$1, %r15d
	movq	%r15, -48(%rbp)                 ## 8-byte Spill
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	jne	LBB0_2
## %bb.1:
	xorl	%edx, %edx
	callq	_xlr_i2c_wreg
	movq	_XLR_I2C_STARTXFR_ND@GOTPCREL(%rip), %rax
	movl	$1, %r13d
	jmp	LBB0_3
LBB0_2:
	leal	-2(%r15), %edx
	callq	_xlr_i2c_wreg
	movl	16(%rbx), %edi
	movq	_XLR_I2C_DATAOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r12), %edx
	callq	_xlr_i2c_wreg
	movq	_XLR_I2C_STARTXFR_WR@GOTPCREL(%rip), %rax
	movl	$2, %r13d
LBB0_3:
	movl	(%rax), %eax
	movl	%eax, -60(%rbp)                 ## 4-byte Spill
	movl	%r13d, (%rbx)
	movq	%rbx, -56(%rbp)                 ## 8-byte Spill
LBB0_4:                                 ## =>This Loop Header: Depth=1
                                        ##     Child Loop BB0_6 Depth 2
	movl	16(%rbx), %edi
	movq	_XLR_I2C_STARTXFR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	-60(%rbp), %edx                 ## 4-byte Reload
	callq	_xlr_i2c_wreg
	cmpq	$0, 8(%rbx)
	jg	LBB0_22
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_6:                                 ##   Parent Loop BB0_4 Depth=1
                                        ## =>  This Inner Loop Header: Depth=2
	testl	%ebx, %ebx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	jne	LBB0_17
## %bb.7:                               ##   in Loop: Header=BB0_6 Depth=2
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %r12
	movl	16(%rbx), %edi
	movq	_XLR_I2C_STATUS@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_xlr_i2c_rdreg
	movl	%eax, %r15d
	movq	_XLR_I2C_SDOEMPTY@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	je	LBB0_11
## %bb.8:                               ##   in Loop: Header=BB0_6 Depth=2
	cmpl	-48(%rbp), %r13d                ## 4-byte Folded Reload
	jge	LBB0_11
## %bb.9:                               ##   in Loop: Header=BB0_6 Depth=2
	movl	16(%rbx), %edi
	movq	_XLR_I2C_DATAOUT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movslq	%r13d, %rax
	incl	%r13d
	movq	-80(%rbp), %rcx                 ## 8-byte Reload
	movl	(%rcx,%rax,4), %edx
	callq	_xlr_i2c_wreg
	movq	_jiffies@GOTPCREL(%rip), %rax
	movq	(%rax), %rsi
	addq	-72(%rbp), %rsi                 ## 8-byte Folded Reload
	jmp	LBB0_12
	.p2align	4, 0x90
LBB0_11:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%r14, %rsi
LBB0_12:                                ##   in Loop: Header=BB0_6 Depth=2
	movq	%r12, %rdi
	movq	%rsi, %r14
	callq	_time_after
	movl	%eax, %ebx
	movq	_XLR_I2C_ARB_STARTERR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_16
## %bb.13:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	_XLR_I2C_ACK_ERR@GOTPCREL(%rip), %rax
	testl	%r15d, (%rax)
	jne	LBB0_18
## %bb.14:                              ##   in Loop: Header=BB0_6 Depth=2
	movq	-56(%rbp), %rdi                 ## 8-byte Reload
	movl	%r15d, %esi
	callq	_xlr_i2c_busy
	testl	%eax, %eax
	jne	LBB0_6
## %bb.15:                              ##   in Loop: Header=BB0_6 Depth=2
	cmpl	-48(%rbp), %r13d                ## 4-byte Folded Reload
	jl	LBB0_6
	jmp	LBB0_20
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_4 Depth=1
	testl	%ebx, %ebx
	movq	-56(%rbp), %rbx                 ## 8-byte Reload
	je	LBB0_4
LBB0_17:
	addq	$32, %rbx
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_dev_err
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rcx
	jmp	LBB0_19
LBB0_18:
	movq	_EIO@GOTPCREL(%rip), %rcx
LBB0_19:
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_21
LBB0_20:
	xorl	%eax, %eax
LBB0_21:
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_22:
	movq	-48(%rbp), %rsi                 ## 8-byte Reload
	movq	_XLR_I2C_TIMEOUT@GOTPCREL(%rip), %rax
	imull	(%rax), %esi
	movq	%rbx, %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_ADDR,4,2               ## @XLR_I2C_ADDR
	.comm	_XLR_I2C_DEVADDR,4,2            ## @XLR_I2C_DEVADDR
	.comm	_XLR_I2C_CFG,4,2                ## @XLR_I2C_CFG
	.comm	_XLR_I2C_CFG_ADDR,4,2           ## @XLR_I2C_CFG_ADDR
	.comm	_XLR_I2C_TIMEOUT,4,2            ## @XLR_I2C_TIMEOUT
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_XLR_I2C_BYTECNT,4,2            ## @XLR_I2C_BYTECNT
	.comm	_XLR_I2C_STARTXFR_ND,4,2        ## @XLR_I2C_STARTXFR_ND
	.comm	_XLR_I2C_DATAOUT,4,2            ## @XLR_I2C_DATAOUT
	.comm	_XLR_I2C_STARTXFR_WR,4,2        ## @XLR_I2C_STARTXFR_WR
	.comm	_XLR_I2C_STARTXFR,4,2           ## @XLR_I2C_STARTXFR
	.comm	_XLR_I2C_STATUS,4,2             ## @XLR_I2C_STATUS
	.comm	_XLR_I2C_SDOEMPTY,4,2           ## @XLR_I2C_SDOEMPTY
	.comm	_XLR_I2C_ARB_STARTERR,4,2       ## @XLR_I2C_ARB_STARTERR
	.comm	_XLR_I2C_ACK_ERR,4,2            ## @XLR_I2C_ACK_ERR
	.comm	_EIO,4,2                        ## @EIO
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"I2C transmit timeout\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function xlr_i2c_tx
_xlr_i2c_tx:                            ; @xlr_i2c_tx
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #128
	.cfi_def_cfa_offset 128
	stp	x28, x27, [sp, #32]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #48]             ; 16-byte Folded Spill
	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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x22, x3
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w2, [x2]
	ldr	w0, [x0, #16]
Lloh0:
	adrp	x8, _XLR_I2C_ADDR@GOTPAGE
Lloh1:
	ldr	x8, [x8, _XLR_I2C_ADDR@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	bl	_xlr_i2c_wreg
	ldr	w0, [x19, #16]
Lloh3:
	adrp	x8, _XLR_I2C_DEVADDR@GOTPAGE
Lloh4:
	ldr	x8, [x8, _XLR_I2C_DEVADDR@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x2, x22
	bl	_xlr_i2c_wreg
	ldr	w0, [x19, #16]
Lloh6:
	adrp	x8, _XLR_I2C_CFG@GOTPAGE
Lloh7:
	ldr	x8, [x8, _XLR_I2C_CFG@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
Lloh9:
	adrp	x8, _XLR_I2C_CFG_ADDR@GOTPAGE
Lloh10:
	ldr	x8, [x8, _XLR_I2C_CFG_ADDR@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	x9, [x19, #24]
	ldr	w9, [x9]
	orr	w2, w9, w8
	bl	_xlr_i2c_wreg
Lloh12:
	adrp	x8, _XLR_I2C_TIMEOUT@GOTPAGE
Lloh13:
	ldr	x8, [x8, _XLR_I2C_TIMEOUT@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_msecs_to_jiffies
Lloh15:
	adrp	x28, _jiffies@GOTPAGE
Lloh16:
	ldr	x28, [x28, _jiffies@GOTPAGEOFF]
	ldr	x8, [x28]
	str	x0, [sp, #16]                   ; 8-byte Folded Spill
	add	x23, x8, x0
	ldr	w0, [x19, #16]
Lloh17:
	adrp	x8, _XLR_I2C_BYTECNT@GOTPAGE
Lloh18:
	ldr	x8, [x8, _XLR_I2C_BYTECNT@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x24, _XLR_I2C_DATAOUT@GOTPAGE
Lloh21:
	ldr	x24, [x24, _XLR_I2C_DATAOUT@GOTPAGEOFF]
	cmp	w20, #1
	str	x21, [sp, #24]                  ; 8-byte Folded Spill
	b.ne	LBB0_2
; %bb.1:
	mov	w2, #0
	bl	_xlr_i2c_wreg
Lloh22:
	adrp	x8, _XLR_I2C_STARTXFR_ND@GOTPAGE
Lloh23:
	ldr	x8, [x8, _XLR_I2C_STARTXFR_ND@GOTPAGEOFF]
	mov	w27, #1
	b	LBB0_3
LBB0_2:
	sub	w2, w20, #2
	bl	_xlr_i2c_wreg
	ldr	w0, [x19, #16]
	ldr	w1, [x24]
	ldr	w2, [x21, #4]
	bl	_xlr_i2c_wreg
Lloh24:
	adrp	x8, _XLR_I2C_STARTXFR_WR@GOTPAGE
Lloh25:
	ldr	x8, [x8, _XLR_I2C_STARTXFR_WR@GOTPAGEOFF]
	mov	w27, #2
LBB0_3:
	ldr	w8, [x8]
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	str	w27, [x19]
Lloh26:
	adrp	x21, _XLR_I2C_STATUS@GOTPAGE
Lloh27:
	ldr	x21, [x21, _XLR_I2C_STATUS@GOTPAGEOFF]
Lloh28:
	adrp	x22, _XLR_I2C_SDOEMPTY@GOTPAGE
Lloh29:
	ldr	x22, [x22, _XLR_I2C_SDOEMPTY@GOTPAGEOFF]
LBB0_4:                                 ; =>This Loop Header: Depth=1
                                        ;     Child Loop BB0_6 Depth 2
	ldr	w0, [x19, #16]
Lloh30:
	adrp	x8, _XLR_I2C_STARTXFR@GOTPAGE
Lloh31:
	ldr	x8, [x8, _XLR_I2C_STARTXFR@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x8]
	ldr	w2, [sp, #12]                   ; 4-byte Folded Reload
	bl	_xlr_i2c_wreg
	ldr	x8, [x19, #8]
	cmp	x8, #0
	b.gt	LBB0_18
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	w26, #0
LBB0_6:                                 ;   Parent Loop BB0_4 Depth=1
                                        ; =>  This Inner Loop Header: Depth=2
	cbnz	w26, LBB0_13
; %bb.7:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	x26, [x28]
	ldr	w0, [x19, #16]
	ldr	w1, [x21]
	bl	_xlr_i2c_rdreg
	mov	x25, x0
	ldr	w8, [x22]
	and	w8, w8, w0
	cmp	w8, #0
	ccmp	w27, w20, #0, ne
	b.ge	LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_6 Depth=2
	ldr	w0, [x19, #16]
	ldr	w1, [x24]
	mov	x23, x22
	mov	x22, x21
	mov	x21, x24
	add	w24, w27, #1
	ldr	x8, [sp, #24]                   ; 8-byte Folded Reload
	ldr	w2, [x8, w27, sxtw #2]
	bl	_xlr_i2c_wreg
	ldr	x8, [x28]
	ldr	x9, [sp, #16]                   ; 8-byte Folded Reload
	add	x8, x8, x9
	mov	x27, x24
	mov	x24, x21
	mov	x21, x22
	mov	x22, x23
	mov	x23, x8
LBB0_9:                                 ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x26
	mov	x1, x23
	bl	_time_after
	mov	x26, x0
Lloh33:
	adrp	x8, _XLR_I2C_ARB_STARTERR@GOTPAGE
Lloh34:
	ldr	x8, [x8, _XLR_I2C_ARB_STARTERR@GOTPAGEOFF]
Lloh35:
	ldr	w8, [x8]
	tst	w8, w25
	b.ne	LBB0_12
; %bb.10:                               ;   in Loop: Header=BB0_6 Depth=2
Lloh36:
	adrp	x8, _XLR_I2C_ACK_ERR@GOTPAGE
Lloh37:
	ldr	x8, [x8, _XLR_I2C_ACK_ERR@GOTPAGEOFF]
Lloh38:
	ldr	w8, [x8]
	tst	w8, w25
	b.ne	LBB0_14
; %bb.11:                               ;   in Loop: Header=BB0_6 Depth=2
	mov	x0, x19
	mov	x1, x25
	bl	_xlr_i2c_busy
	cmp	w0, #0
	ccmp	w27, w20, #8, eq
	b.lt	LBB0_6
	b	LBB0_16
LBB0_12:                                ;   in Loop: Header=BB0_4 Depth=1
	cbz	w26, LBB0_4
LBB0_13:
	add	x0, x19, #32
Lloh39:
	adrp	x1, l_.str@PAGE
Lloh40:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh41:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh42:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_15
LBB0_14:
Lloh43:
	adrp	x8, _EIO@GOTPAGE
Lloh44:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_15:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_17
LBB0_16:
	mov	w0, #0
LBB0_17:
	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
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	ret
LBB0_18:
Lloh45:
	adrp	x8, _XLR_I2C_TIMEOUT@GOTPAGE
Lloh46:
	ldr	x8, [x8, _XLR_I2C_TIMEOUT@GOTPAGEOFF]
Lloh47:
	ldr	w8, [x8]
	mul	w1, w8, w20
	mov	x0, x19
	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
	ldp	x26, x25, [sp, #48]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #128
	b	_xlr_i2c_wait
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.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 AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh36, Lloh37, Lloh38
	.loh AdrpLdrGot	Lloh41, Lloh42
	.loh AdrpAdd	Lloh39, Lloh40
	.loh AdrpLdrGot	Lloh43, Lloh44
	.loh AdrpLdrGotLdr	Lloh45, Lloh46, Lloh47
	.cfi_endproc
                                        ; -- End function
	.comm	_XLR_I2C_ADDR,4,2               ; @XLR_I2C_ADDR
	.comm	_XLR_I2C_DEVADDR,4,2            ; @XLR_I2C_DEVADDR
	.comm	_XLR_I2C_CFG,4,2                ; @XLR_I2C_CFG
	.comm	_XLR_I2C_CFG_ADDR,4,2           ; @XLR_I2C_CFG_ADDR
	.comm	_XLR_I2C_TIMEOUT,4,2            ; @XLR_I2C_TIMEOUT
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_XLR_I2C_BYTECNT,4,2            ; @XLR_I2C_BYTECNT
	.comm	_XLR_I2C_STARTXFR_ND,4,2        ; @XLR_I2C_STARTXFR_ND
	.comm	_XLR_I2C_DATAOUT,4,2            ; @XLR_I2C_DATAOUT
	.comm	_XLR_I2C_STARTXFR_WR,4,2        ; @XLR_I2C_STARTXFR_WR
	.comm	_XLR_I2C_STARTXFR,4,2           ; @XLR_I2C_STARTXFR
	.comm	_XLR_I2C_STATUS,4,2             ; @XLR_I2C_STATUS
	.comm	_XLR_I2C_SDOEMPTY,4,2           ; @XLR_I2C_SDOEMPTY
	.comm	_XLR_I2C_ARB_STARTERR,4,2       ; @XLR_I2C_ARB_STARTERR
	.comm	_XLR_I2C_ACK_ERR,4,2            ; @XLR_I2C_ACK_ERR
	.comm	_EIO,4,2                        ; @EIO
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"I2C transmit timeout\n"

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