	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sata_oxnas_post_reset_init
_sata_oxnas_post_reset_init:            ## @sata_oxnas_post_reset_init
	.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
	movq	%rdi, %r12
	movl	12(%rdi), %edi
	xorl	%esi, %esi
	cmpl	$0, 8(%r12)
	sete	%sil
	xorl	%edx, %edx
	callq	_sata_oxnas_reset_ucode
	movq	%r12, %rdi
	movl	$12, %esi
	movl	$196611, %edx                   ## imm = 0x30003
	callq	_sata_oxnas_link_write
	movq	_SCR_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$-1, %edx
	callq	_sata_oxnas_scr_write_port
	movq	_SERROR_IRQ_MASK@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$67043327, %edx                 ## imm = 0x3FEFFFF
	callq	_sata_oxnas_scr_write_port
	movq	_SCR_ACTIVE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$-67174401, %edx                ## imm = 0xFBFEFFFF
	callq	_sata_oxnas_scr_write_port
	movq	%r12, %rdi
	callq	_sata_oxnas_irq_on
	movq	_ATA_MAX_DEVICES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	xorl	%ebx, %ebx
	movq	_ATA_DEV_ATA@GOTPCREL(%rip), %r13
	movq	_jiffies@GOTPCREL(%rip), %r14
	movq	_HZ@GOTPCREL(%rip), %r15
	jmp	LBB0_2
	.p2align	4, 0x90
LBB0_4:                                 ##   in Loop: Header=BB0_2 Depth=1
	incq	%rbx
	cmpq	%rax, %rbx
	jae	LBB0_5
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rcx
	cmpq	(%r13), %rcx
	jne	LBB0_4
## %bb.3:                               ##   in Loop: Header=BB0_2 Depth=1
	movq	(%r15), %rdx
	addq	(%r14), %rdx
	movq	%r12, %rdi
	xorl	%esi, %esi
	callq	_sata_std_hardreset
	leaq	(,%rbx,8), %rdi
	addq	(%r12), %rdi
	callq	_sata_oxnas_dev_config
	movq	_ATA_MAX_DEVICES@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	jmp	LBB0_4
LBB0_5:
	movq	_SCR_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r12, %rdi
	movl	$-1, %edx
	callq	_sata_oxnas_scr_write_port
	leaq	L_.str(%rip), %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_VPRINTK                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_SCR_ERROR,4,2                  ## @SCR_ERROR
	.comm	_SERROR_IRQ_MASK,4,2            ## @SERROR_IRQ_MASK
	.comm	_SCR_ACTIVE,4,2                 ## @SCR_ACTIVE
	.comm	_ATA_MAX_DEVICES,8,3            ## @ATA_MAX_DEVICES
	.comm	_ATA_DEV_ATA,8,3                ## @ATA_DEV_ATA
	.comm	_jiffies,8,3                    ## @jiffies
	.comm	_HZ,8,3                         ## @HZ
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"done\n"

	.no_dead_strip	_sata_oxnas_post_reset_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sata_oxnas_post_reset_init
_sata_oxnas_post_reset_init:            ; @sata_oxnas_post_reset_init
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	mov	x19, x0
	ldr	w0, [x0, #12]
	ldr	w8, [x19, #8]
	cmp	w8, #0
	cset	w1, eq
	mov	w2, #0
	bl	_sata_oxnas_reset_ucode
	mov	x0, x19
	mov	w1, #12
	mov	w2, #196611
	bl	_sata_oxnas_link_write
Lloh0:
	adrp	x20, _SCR_ERROR@GOTPAGE
Lloh1:
	ldr	x20, [x20, _SCR_ERROR@GOTPAGEOFF]
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #-1
	bl	_sata_oxnas_scr_write_port
Lloh2:
	adrp	x8, _SERROR_IRQ_MASK@GOTPAGE
Lloh3:
	ldr	x8, [x8, _SERROR_IRQ_MASK@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #67043327
	bl	_sata_oxnas_scr_write_port
Lloh5:
	adrp	x8, _SCR_ACTIVE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _SCR_ACTIVE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	mov	x0, x19
	mov	w2, #-67174401
	bl	_sata_oxnas_scr_write_port
	mov	x0, x19
	bl	_sata_oxnas_irq_on
Lloh8:
	adrp	x21, _ATA_MAX_DEVICES@GOTPAGE
Lloh9:
	ldr	x21, [x21, _ATA_MAX_DEVICES@GOTPAGEOFF]
	ldr	x8, [x21]
	cbz	x8, LBB0_5
; %bb.1:
	mov	x22, #0
Lloh10:
	adrp	x23, _ATA_DEV_ATA@GOTPAGE
Lloh11:
	ldr	x23, [x23, _ATA_DEV_ATA@GOTPAGEOFF]
Lloh12:
	adrp	x24, _jiffies@GOTPAGE
Lloh13:
	ldr	x24, [x24, _jiffies@GOTPAGEOFF]
Lloh14:
	adrp	x25, _HZ@GOTPAGE
Lloh15:
	ldr	x25, [x25, _HZ@GOTPAGEOFF]
	b	LBB0_3
LBB0_2:                                 ;   in Loop: Header=BB0_3 Depth=1
	add	x22, x22, #1
	cmp	x22, x8
	b.hs	LBB0_5
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x19]
	ldr	x9, [x9, x22, lsl #3]
	ldr	x10, [x23]
	cmp	x9, x10
	b.ne	LBB0_2
; %bb.4:                                ;   in Loop: Header=BB0_3 Depth=1
	ldr	x8, [x24]
	ldr	x9, [x25]
	add	x2, x9, x8
	mov	x0, x19
	mov	x1, #0
	bl	_sata_std_hardreset
	ldr	x8, [x19]
	add	x0, x8, x22, lsl #3
	bl	_sata_oxnas_dev_config
	ldr	x8, [x21]
	b	LBB0_2
LBB0_5:
	ldr	w1, [x20]
	mov	x0, x19
	mov	w2, #-1
	bl	_sata_oxnas_scr_write_port
Lloh16:
	adrp	x0, l_.str@PAGE
Lloh17:
	add	x0, x0, l_.str@PAGEOFF
	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
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_VPRINTK
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_SCR_ERROR,4,2                  ; @SCR_ERROR
	.comm	_SERROR_IRQ_MASK,4,2            ; @SERROR_IRQ_MASK
	.comm	_SCR_ACTIVE,4,2                 ; @SCR_ACTIVE
	.comm	_ATA_MAX_DEVICES,8,3            ; @ATA_MAX_DEVICES
	.comm	_ATA_DEV_ATA,8,3                ; @ATA_DEV_ATA
	.comm	_jiffies,8,3                    ; @jiffies
	.comm	_HZ,8,3                         ; @HZ
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"done\n"

	.no_dead_strip	_sata_oxnas_post_reset_init
.subsections_via_symbols
