	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function anx9805_train
_anx9805_train:                         ## @anx9805_train
	.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	%edx, %r12d
	movl	%esi, %ebx
	movq	%rdi, %r14
	xorl	%r15d, %r15d
	testl	%ecx, %ecx
	setne	%r15b
	callq	_nv_object
	movq	(%rax), %r13
	movl	(%r14), %esi
	movq	%r13, %rdi
	movl	$160, %edx
	movl	%r12d, %ecx
	callq	_nv_wri2cr
	movl	(%r14), %esi
	shll	$7, %r15d
	orl	%ebx, %r15d
	movq	%r13, %rdi
	movl	$161, %edx
	movl	%r15d, %ecx
	callq	_nv_wri2cr
	movl	(%r14), %esi
	movq	%r13, %rdi
	movl	$162, %edx
	movl	$1, %ecx
	callq	_nv_wri2cr
	movl	(%r14), %esi
	movq	%r13, %rdi
	movl	$168, %edx
	movl	$1, %ecx
	callq	_nv_wri2cr
	movl	$101, %ebx
	.p2align	4, 0x90
LBB0_1:                                 ## =>This Inner Loop Header: Depth=1
	movl	(%r14), %esi
	movq	%r13, %rdi
	movl	$168, %edx
	callq	_nv_rdi2cr
	testb	$1, %al
	je	LBB0_4
## %bb.2:                               ##   in Loop: Header=BB0_1 Depth=1
	movl	$5, %edi
	callq	_mdelay
	decl	%ebx
	jne	LBB0_1
## %bb.3:
	leaq	L_.str(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_nv_error
	movq	_ETIMEDOUT@GOTPCREL(%rip), %rax
	jmp	LBB0_7
LBB0_4:
	testb	$112, %al
	je	LBB0_5
## %bb.6:
	leaq	L_.str.1(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_nv_error
	movq	_EIO@GOTPCREL(%rip), %rax
LBB0_7:
	subl	(%rax), %ebx
	jmp	LBB0_8
LBB0_5:
	movl	$1, %ebx
LBB0_8:
	movl	%ebx, %eax
	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	"link training timed out\n"

	.comm	_ETIMEDOUT,4,2                  ## @ETIMEDOUT
L_.str.1:                               ## @.str.1
	.asciz	"link training failed: 0x%02x\n"

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

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function anx9805_train
_anx9805_train:                         ; @anx9805_train
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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, x2
	mov	x22, x1
	mov	x19, x0
	cmp	w3, #0
	cset	w23, ne
	bl	_nv_object
	ldr	x20, [x0]
	ldr	w1, [x19]
	mov	x0, x20
	mov	w2, #160
	mov	x3, x21
	bl	_nv_wri2cr
	ldr	w1, [x19]
	orr	w3, w22, w23, lsl #7
	mov	x0, x20
	mov	w2, #161
	bl	_nv_wri2cr
	ldr	w1, [x19]
	mov	x0, x20
	mov	w2, #162
	mov	w3, #1
	bl	_nv_wri2cr
	ldr	w1, [x19]
	mov	x0, x20
	mov	w2, #168
	mov	w3, #1
	bl	_nv_wri2cr
	mov	w21, #101
LBB0_1:                                 ; =>This Inner Loop Header: Depth=1
	ldr	w1, [x19]
	mov	x0, x20
	mov	w2, #168
	bl	_nv_rdi2cr
                                        ; kill: def $w0 killed $w0 def $x0
	tbz	w0, #0, LBB0_4
; %bb.2:                                ;   in Loop: Header=BB0_1 Depth=1
	mov	w0, #5
	bl	_mdelay
	subs	w21, w21, #1
	b.ne	LBB0_1
; %bb.3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nv_error
Lloh2:
	adrp	x8, _ETIMEDOUT@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ETIMEDOUT@GOTPAGEOFF]
	b	LBB0_6
LBB0_4:
	tst	w0, #0x70
	b.eq	LBB0_7
; %bb.5:
	str	x0, [sp]
Lloh4:
	adrp	x1, l_.str.1@PAGE
Lloh5:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_nv_error
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_8
LBB0_7:
	mov	w0, #1
LBB0_8:
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #80
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpAdd	Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"link training timed out\n"

	.comm	_ETIMEDOUT,4,2                  ; @ETIMEDOUT
l_.str.1:                               ; @.str.1
	.asciz	"link training failed: 0x%02x\n"

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