	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function anx9805_aux_lnk_ctl
_anx9805_aux_lnk_ctl:                   ## @anx9805_aux_lnk_ctl
	.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
	movl	%ecx, -44(%rbp)                 ## 4-byte Spill
	movl	%edx, %r12d
	movl	%esi, %ebx
	xorl	%r15d, %r15d
	testl	%ecx, %ecx
	setne	%r15b
	callq	_anx9805_aux
	movq	%rax, %r14
	movq	8(%rax), %rax
	movq	(%rax), %r13
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%ebx, %edx
	movl	%r12d, %ecx
	movl	-44(%rbp), %r8d                 ## 4-byte Reload
	callq	_AUX_DBG
	movl	4(%r14), %esi
	movq	%r13, %rdi
	movl	$160, %edx
	movl	%r12d, %ecx
	callq	_nvkm_wri2cr
	movl	4(%r14), %esi
	shll	$7, %r15d
	orl	%ebx, %r15d
	movq	%r13, %rdi
	movl	$161, %edx
	movl	%r15d, %ecx
	callq	_nvkm_wri2cr
	movl	4(%r14), %esi
	movq	%r13, %rdi
	movl	$162, %edx
	movl	$1, %ecx
	callq	_nvkm_wri2cr
	movl	4(%r14), %esi
	movq	%r13, %rdi
	movl	$168, %edx
	movl	$1, %ecx
	callq	_nvkm_wri2cr
	movl	$101, %ebx
	movq	_ETIMEDOUT@GOTPCREL(%rip), %r12
	leaq	L_.str.1(%rip), %r15
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	4(%r14), %esi
	movq	%r13, %rdi
	movl	$168, %edx
	callq	_nvkm_rdi2cr
	testb	$1, %al
	je	LBB0_3
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$5, %edi
	callq	_mdelay
	decl	%ebx
	jne	LBB0_1
	jmp	LBB0_5
LBB0_3:
	testb	$112, %al
	je	LBB0_7
## %bb.4:
	movq	_EIO@GOTPCREL(%rip), %r12
	leaq	L_.str.2(%rip), %r15
LBB0_5:
	movq	%r14, %rdi
	movq	%r15, %rsi
	callq	_AUX_ERR
	xorl	%eax, %eax
	subl	(%r12), %eax
	jmp	LBB0_6
LBB0_7:
	xorl	%eax, %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ANX9805 train %d %02x %d"

L_.str.1:                               ## @.str.1
	.asciz	"link training timeout"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.2:                               ## @.str.2
	.asciz	"link training failed"

	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_anx9805_aux_lnk_ctl
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function anx9805_aux_lnk_ctl
_anx9805_aux_lnk_ctl:                   ; @anx9805_aux_lnk_ctl
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	mov	x21, x3
	mov	x22, x2
	mov	x23, x1
	cmp	w3, #0
	cset	w24, ne
	bl	_anx9805_aux
	mov	x19, x0
	ldr	x8, [x0, #8]
	ldr	x20, [x8]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x2, x23
	mov	x3, x22
	mov	x4, x21
	bl	_AUX_DBG
	ldr	w1, [x19, #4]
	mov	x0, x20
	mov	w2, #160
	mov	x3, x22
	bl	_nvkm_wri2cr
	ldr	w1, [x19, #4]
	orr	w3, w23, w24, lsl #7
	mov	x0, x20
	mov	w2, #161
	bl	_nvkm_wri2cr
	ldr	w1, [x19, #4]
	mov	x0, x20
	mov	w2, #162
	mov	w3, #1
	bl	_nvkm_wri2cr
	ldr	w1, [x19, #4]
	mov	x0, x20
	mov	w2, #168
	mov	w3, #1
	bl	_nvkm_wri2cr
	mov	w23, #101
Lloh2:
	adrp	x22, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x22, [x22, _ETIMEDOUT@GOTPAGEOFF]
Lloh4:
	adrp	x21, l_.str.1@PAGE
Lloh5:
	add	x21, x21, l_.str.1@PAGEOFF
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19, #4]
	mov	x0, x20
	mov	w2, #168
	bl	_nvkm_rdi2cr
	tbz	w0, #0, LBB0_3
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #5
	bl	_mdelay
	subs	w23, w23, #1
	b.ne	LBB0_1
	b	LBB0_5
LBB0_3:
	tst	w0, #0x70
	b.eq	LBB0_6
; %bb.4:
Lloh6:
	adrp	x22, _EIO@GOTPAGE
Lloh7:
	ldr	x22, [x22, _EIO@GOTPAGEOFF]
Lloh8:
	adrp	x21, l_.str.2@PAGE
Lloh9:
	add	x21, x21, l_.str.2@PAGEOFF
LBB0_5:
	mov	x0, x19
	mov	x1, x21
	bl	_AUX_ERR
	ldr	w8, [x22]
	neg	w0, w8
	b	LBB0_7
LBB0_6:
	mov	w0, #0
LBB0_7:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpAdd	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ANX9805 train %d %02x %d"

l_.str.1:                               ; @.str.1
	.asciz	"link training timeout"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.2:                               ; @.str.2
	.asciz	"link training failed"

	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_anx9805_aux_lnk_ctl
.subsections_via_symbols
