	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ti_sn_aux_transfer
_ti_sn_aux_transfer:                    ## @ti_sn_aux_transfer
	.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
	movq	%rsi, %r13
	callq	_aux_to_ti_sn_bridge
	movq	%rax, %r14
	movl	(%r13), %r12d
	movq	_DP_AUX_I2C_MOT@GOTPCREL(%rip), %rax
	movl	(%rax), %ebx
	movl	%r12d, %edi
	callq	_AUX_CMD_REQ
	movl	4(%r13), %edx
	movq	_SN_AUX_MAX_PAYLOAD_BYTES@GOTPCREL(%rip), %rcx
	cmpl	(%rcx), %edx
	jg	LBB0_1
## %bb.3:
	notl	%ebx
	andl	%ebx, %r12d
	movl	%r12d, %ecx
	andl	$-4, %ecx
	cmpl	$128, %ecx
	jne	LBB0_1
## %bb.4:
	movq	16(%r13), %r15
	movl	(%r14), %edi
	movq	_SN_AUX_CMD_REG@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movl	%eax, -52(%rbp)                 ## 4-byte Spill
	movl	%eax, %edx
	callq	_regmap_write
	movl	(%r14), %edi
	movq	_SN_AUX_ADDR_19_16_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzwl	10(%r13), %edx
	andl	$15, %edx
	callq	_regmap_write
	movl	(%r14), %edi
	movq	_SN_AUX_ADDR_15_8_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	9(%r13), %edx
	callq	_regmap_write
	movl	(%r14), %edi
	movq	_SN_AUX_ADDR_7_0_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movzbl	8(%r13), %edx
	callq	_regmap_write
	movl	(%r14), %edi
	movq	_SN_AUX_LENGTH_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	4(%r13), %edx
	callq	_regmap_write
	andl	$-3, %r12d
	movl	%r12d, -48(%rbp)                ## 4-byte Spill
	cmpl	$128, %r12d
	jne	LBB0_8
## %bb.5:
	cmpl	$0, 4(%r13)
	jle	LBB0_8
## %bb.6:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_7:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %r12d
	movl	%ebx, %edi
	callq	_SN_AUX_WDATA_REG
	movl	(%r15,%rbx,4), %edx
	movl	%r12d, %edi
	movl	%eax, %esi
	callq	_regmap_write
	incq	%rbx
	movslq	4(%r13), %rax
	cmpq	%rax, %rbx
	jl	LBB0_7
LBB0_8:
	movq	%r15, %r12
	movl	(%r14), %edi
	movq	_SN_AUX_CMD_REG@GOTPCREL(%rip), %rbx
	movl	(%rbx), %esi
	movq	_AUX_CMD_SEND@GOTPCREL(%rip), %rax
	movl	-52(%rbp), %edx                 ## 4-byte Reload
	orl	(%rax), %edx
	callq	_regmap_write
	movl	(%r14), %edi
	movl	(%rbx), %esi
	movl	$1, %ecx
	movl	$200, %r8d
	movl	$50000, %r9d                    ## imm = 0xC350
	callq	_regmap_read_poll_timeout
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jne	LBB0_19
## %bb.9:
	movl	(%r14), %edi
	movq	_SN_AUX_CMD_STATUS_REG@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-56(%rbp), %rdx
	callq	_regmap_read
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jne	LBB0_19
## %bb.10:
	movl	-56(%rbp), %eax
	movq	_AUX_IRQ_STATUS_NAT_I2C_FAIL@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_13
## %bb.11:
	movq	_AUX_IRQ_STATUS_AUX_RPLY_TOUT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	jne	LBB0_13
## %bb.12:
	movq	_AUX_IRQ_STATUS_AUX_SHORT@GOTPCREL(%rip), %rcx
	testl	%eax, (%rcx)
	je	LBB0_14
LBB0_13:
	movq	_ENXIO@GOTPCREL(%rip), %rcx
	jmp	LBB0_2
LBB0_1:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
LBB0_2:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_19:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	4(%r13), %eax
	cmpl	$128, -48(%rbp)                 ## 4-byte Folded Reload
	je	LBB0_19
## %bb.15:
	testl	%eax, %eax
	jle	LBB0_19
## %bb.16:
	xorl	%r15d, %r15d
LBB0_17:                                ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %ebx
	movl	%r15d, %edi
	callq	_SN_AUX_RDATA_REG
	movl	%ebx, %edi
	movl	%eax, %esi
	leaq	-44(%rbp), %rdx
	callq	_regmap_read
                                        ## kill: def $eax killed $eax def $rax
	testl	%eax, %eax
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_17 Depth=1
	movl	-44(%rbp), %edi
	movl	$-256, %eax
	andl	%eax, %edi
	callq	_WARN_ON
	movzbl	-44(%rbp), %eax
	movl	%eax, (%r12,%r15,4)
	incq	%r15
	movslq	4(%r13), %rax
	cmpq	%rax, %r15
	jl	LBB0_17
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_DP_AUX_I2C_MOT,4,2             ## @DP_AUX_I2C_MOT
	.comm	_SN_AUX_MAX_PAYLOAD_BYTES,4,2   ## @SN_AUX_MAX_PAYLOAD_BYTES
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_SN_AUX_CMD_REG,4,2             ## @SN_AUX_CMD_REG
	.comm	_SN_AUX_ADDR_19_16_REG,4,2      ## @SN_AUX_ADDR_19_16_REG
	.comm	_SN_AUX_ADDR_15_8_REG,4,2       ## @SN_AUX_ADDR_15_8_REG
	.comm	_SN_AUX_ADDR_7_0_REG,4,2        ## @SN_AUX_ADDR_7_0_REG
	.comm	_SN_AUX_LENGTH_REG,4,2          ## @SN_AUX_LENGTH_REG
	.comm	_AUX_CMD_SEND,4,2               ## @AUX_CMD_SEND
	.comm	_SN_AUX_CMD_STATUS_REG,4,2      ## @SN_AUX_CMD_STATUS_REG
	.comm	_AUX_IRQ_STATUS_NAT_I2C_FAIL,4,2 ## @AUX_IRQ_STATUS_NAT_I2C_FAIL
	.comm	_AUX_IRQ_STATUS_AUX_RPLY_TOUT,4,2 ## @AUX_IRQ_STATUS_AUX_RPLY_TOUT
	.comm	_AUX_IRQ_STATUS_AUX_SHORT,4,2   ## @AUX_IRQ_STATUS_AUX_SHORT
	.comm	_ENXIO,4,2                      ## @ENXIO
	.no_dead_strip	_ti_sn_aux_transfer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ti_sn_aux_transfer
_ti_sn_aux_transfer:                    ; @ti_sn_aux_transfer
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.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
	mov	x19, x1
	bl	_aux_to_ti_sn_bridge
	mov	x20, x0
	ldr	w22, [x19]
Lloh0:
	adrp	x8, _DP_AUX_I2C_MOT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _DP_AUX_I2C_MOT@GOTPAGEOFF]
Lloh2:
	ldr	w23, [x8]
	mov	x0, x22
	bl	_AUX_CMD_REQ
	ldr	w8, [x19, #4]
Lloh3:
	adrp	x9, _SN_AUX_MAX_PAYLOAD_BYTES@GOTPAGE
Lloh4:
	ldr	x9, [x9, _SN_AUX_MAX_PAYLOAD_BYTES@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	cmp	w8, w9
	b.gt	LBB0_12
; %bb.1:
	bic	w22, w22, w23
	and	w8, w22, #0xfffffffc
	cmp	w8, #128
	b.ne	LBB0_12
; %bb.2:
	mov	x21, x0
	ldr	x24, [x19, #16]
	ldr	w0, [x20]
Lloh6:
	adrp	x26, _SN_AUX_CMD_REG@GOTPAGE
Lloh7:
	ldr	x26, [x26, _SN_AUX_CMD_REG@GOTPAGEOFF]
	ldr	w1, [x26]
	mov	x2, x21
	bl	_regmap_write
	ldr	w0, [x20]
Lloh8:
	adrp	x8, _SN_AUX_ADDR_19_16_REG@GOTPAGE
Lloh9:
	ldr	x8, [x8, _SN_AUX_ADDR_19_16_REG@GOTPAGEOFF]
Lloh10:
	ldr	w1, [x8]
	ldrh	w8, [x19, #10]
	and	w2, w8, #0xf
	bl	_regmap_write
	ldr	w0, [x20]
Lloh11:
	adrp	x8, _SN_AUX_ADDR_15_8_REG@GOTPAGE
Lloh12:
	ldr	x8, [x8, _SN_AUX_ADDR_15_8_REG@GOTPAGEOFF]
Lloh13:
	ldr	w1, [x8]
	ldrb	w2, [x19, #9]
	bl	_regmap_write
	ldr	w0, [x20]
Lloh14:
	adrp	x8, _SN_AUX_ADDR_7_0_REG@GOTPAGE
Lloh15:
	ldr	x8, [x8, _SN_AUX_ADDR_7_0_REG@GOTPAGEOFF]
Lloh16:
	ldr	w1, [x8]
	ldrb	w2, [x19, #8]
	bl	_regmap_write
	ldr	w0, [x20]
Lloh17:
	adrp	x8, _SN_AUX_LENGTH_REG@GOTPAGE
Lloh18:
	ldr	x8, [x8, _SN_AUX_LENGTH_REG@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
	ldr	w2, [x19, #4]
	bl	_regmap_write
	and	w25, w22, #0xfffffffd
	cmp	w25, #128
	b.ne	LBB0_6
; %bb.3:
	ldr	w8, [x19, #4]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x22, #0
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w23, [x20]
	mov	x0, x22
	bl	_SN_AUX_WDATA_REG
	mov	x1, x0
	ldr	w2, [x24, x22, lsl #2]
	mov	x0, x23
	bl	_regmap_write
	add	x22, x22, #1
	ldrsw	x8, [x19, #4]
	cmp	x22, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	w0, [x20]
	ldr	w1, [x26]
Lloh20:
	adrp	x8, _AUX_CMD_SEND@GOTPAGE
Lloh21:
	ldr	x8, [x8, _AUX_CMD_SEND@GOTPAGEOFF]
Lloh22:
	ldr	w8, [x8]
	orr	w2, w8, w21
	bl	_regmap_write
	ldr	w0, [x20]
	ldr	w1, [x26]
	mov	w3, #1
	mov	w4, #200
	mov	w5, #50000
	bl	_regmap_read_poll_timeout
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_14
; %bb.7:
	ldr	w0, [x20]
Lloh23:
	adrp	x8, _SN_AUX_CMD_STATUS_REG@GOTPAGE
Lloh24:
	ldr	x8, [x8, _SN_AUX_CMD_STATUS_REG@GOTPAGEOFF]
Lloh25:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_regmap_read
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_14
; %bb.8:
	ldr	w8, [sp, #12]
Lloh26:
	adrp	x9, _AUX_IRQ_STATUS_NAT_I2C_FAIL@GOTPAGE
Lloh27:
	ldr	x9, [x9, _AUX_IRQ_STATUS_NAT_I2C_FAIL@GOTPAGEOFF]
Lloh28:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_11
; %bb.9:
Lloh29:
	adrp	x9, _AUX_IRQ_STATUS_AUX_RPLY_TOUT@GOTPAGE
Lloh30:
	ldr	x9, [x9, _AUX_IRQ_STATUS_AUX_RPLY_TOUT@GOTPAGEOFF]
Lloh31:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_11
; %bb.10:
Lloh32:
	adrp	x9, _AUX_IRQ_STATUS_AUX_SHORT@GOTPAGE
Lloh33:
	ldr	x9, [x9, _AUX_IRQ_STATUS_AUX_SHORT@GOTPAGEOFF]
Lloh34:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
LBB0_11:
Lloh35:
	adrp	x8, _ENXIO@GOTPAGE
Lloh36:
	ldr	x8, [x8, _ENXIO@GOTPAGEOFF]
	b	LBB0_13
LBB0_12:
Lloh37:
	adrp	x8, _EINVAL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
LBB0_13:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
                                        ; kill: def $w0 killed $w0 killed $x0
	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
	add	sp, sp, #96
	ret
LBB0_15:
	ldr	w0, [x19, #4]
	cmp	w25, #128
	b.eq	LBB0_14
; %bb.16:
	cmp	w0, #1
	b.lt	LBB0_14
; %bb.17:
	mov	x21, #0
LBB0_18:                                ; =>This Inner Loop Header: Depth=1
	ldr	w22, [x20]
	mov	x0, x21
	bl	_SN_AUX_RDATA_REG
	mov	x1, x0
	add	x2, sp, #8
	mov	x0, x22
	bl	_regmap_read
                                        ; kill: def $w0 killed $w0 def $x0
	cbnz	w0, LBB0_14
; %bb.19:                               ;   in Loop: Header=BB0_18 Depth=1
	ldr	w8, [sp, #8]
	and	w0, w8, #0xffffff00
	bl	_WARN_ON
	ldrb	w8, [sp, #8]
	str	w8, [x24, x21, lsl #2]
	add	x21, x21, #1
	ldrsw	x0, [x19, #4]
	cmp	x21, x0
	b.lt	LBB0_18
	b	LBB0_14
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.loh AdrpLdrGot	Lloh35, Lloh36
	.loh AdrpLdrGot	Lloh37, Lloh38
	.cfi_endproc
                                        ; -- End function
	.comm	_DP_AUX_I2C_MOT,4,2             ; @DP_AUX_I2C_MOT
	.comm	_SN_AUX_MAX_PAYLOAD_BYTES,4,2   ; @SN_AUX_MAX_PAYLOAD_BYTES
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_SN_AUX_CMD_REG,4,2             ; @SN_AUX_CMD_REG
	.comm	_SN_AUX_ADDR_19_16_REG,4,2      ; @SN_AUX_ADDR_19_16_REG
	.comm	_SN_AUX_ADDR_15_8_REG,4,2       ; @SN_AUX_ADDR_15_8_REG
	.comm	_SN_AUX_ADDR_7_0_REG,4,2        ; @SN_AUX_ADDR_7_0_REG
	.comm	_SN_AUX_LENGTH_REG,4,2          ; @SN_AUX_LENGTH_REG
	.comm	_AUX_CMD_SEND,4,2               ; @AUX_CMD_SEND
	.comm	_SN_AUX_CMD_STATUS_REG,4,2      ; @SN_AUX_CMD_STATUS_REG
	.comm	_AUX_IRQ_STATUS_NAT_I2C_FAIL,4,2 ; @AUX_IRQ_STATUS_NAT_I2C_FAIL
	.comm	_AUX_IRQ_STATUS_AUX_RPLY_TOUT,4,2 ; @AUX_IRQ_STATUS_AUX_RPLY_TOUT
	.comm	_AUX_IRQ_STATUS_AUX_SHORT,4,2   ; @AUX_IRQ_STATUS_AUX_SHORT
	.comm	_ENXIO,4,2                      ; @ENXIO
	.no_dead_strip	_ti_sn_aux_transfer
.subsections_via_symbols
