	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_preinit                    ## -- Begin function ide_preinit
	.p2align	4, 0x90
_ide_preinit:                           ## @ide_preinit
	.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	_CONFIG_SYS_IDE_MAXDEVICE@GOTPCREL(%rip), %r15
	cmpl	$0, (%r15)
	jle	LBB0_3
## %bb.1:
	movq	_disk_present@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	xorl	%ecx, %ecx
	.p2align	4, 0x90
LBB0_2:                                 ## =>This Inner Loop Header: Depth=1
	movl	$1, (%rax,%rcx,4)
	incq	%rcx
	movslq	(%r15), %rdx
	cmpq	%rdx, %rcx
	jl	LBB0_2
LBB0_3:
	movq	_SYS_CTRL_RST_SATA@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	movl	$1, %esi
	callq	_reset_block
	movq	_SYS_CTRL_RST_SATA_LINK@GOTPCREL(%rip), %r12
	movl	(%r12), %edi
	movl	$1, %esi
	callq	_reset_block
	movq	_SYS_CTRL_RST_SATA_PHY@GOTPCREL(%rip), %rbx
	movl	(%rbx), %edi
	movl	$1, %esi
	callq	_reset_block
	movq	_SYS_CTRL_RST_SGDMA@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	movl	$1, %esi
	callq	_reset_block
	movq	_SYS_CTRL_CLK_SATA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_enable_clock
	movq	_SYS_CTRL_CLK_DMA@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_enable_clock
	movl	$5000, %edi                     ## imm = 0x1388
	callq	_udelay
	movl	(%rbx), %edi
	xorl	%ebx, %ebx
	xorl	%esi, %esi
	callq	_reset_block
	movl	$50, %edi
	callq	_udelay
	movl	(%r14), %edi
	xorl	%esi, %esi
	callq	_reset_block
	movl	(%r12), %edi
	xorl	%esi, %esi
	callq	_reset_block
	movl	$50, %edi
	callq	_udelay
	movl	(%r13), %edi
	xorl	%esi, %esi
	callq	_reset_block
	movl	$100, %edi
	callq	_udelay
	xorl	%eax, %eax
	callq	_workaround5458
	movl	$10000, %edi                    ## imm = 0x2710
	callq	_udelay
	movq	_SATA_HOST_REGS_BASE@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rdx
	movq	_SATA_INT_ENABLE_CLR_OFF@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	$-1, (%rdx,%rax,8)
	movq	(%rcx), %rdx
	movq	_SATA_INT_CLR_OFF@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	$-1, (%rdx,%rcx,8)
	cmpl	$0, (%r15)
	jle	LBB0_14
## %bb.4:
	movq	_sata_regs_base@GOTPCREL(%rip), %r12
	movq	_disk_present@GOTPCREL(%rip), %r13
	movq	_SATA_SCR_STATUS@GOTPCREL(%rip), %r14
	xorl	%ebx, %ebx
	movl	$0, -44(%rbp)                   ## 4-byte Folded Spill
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rdx
	movq	(%rdx,%rbx,8), %rdx
	cltq
	movq	$-1, (%rdx,%rax,8)
	movslq	%ecx, %rax
	movq	$-1, (%rdx,%rax,8)
	movq	_ATA_PORT_NSECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	callq	_ide_outb
	movl	%ebx, %edi
	callq	_phy_reset
	testl	%eax, %eax
	je	LBB0_6
## %bb.15:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edi
	callq	_wait_FIS
	testl	%eax, %eax
	je	LBB0_16
LBB0_19:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_scr_read
	andl	$15, %eax
	cmpl	$3, %eax
	jne	LBB0_23
## %bb.20:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edi
	movl	$30, %esi
	callq	_wait_not_busy
	testq	%rax, %rax
	je	LBB0_22
## %bb.21:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r14d, %r14d
	leaq	L_.str.2(%rip), %rdi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_23:                                ##   in Loop: Header=BB0_5 Depth=1
	movl	(%r14), %esi
	movl	%ebx, %edi
	callq	_scr_read
	xorl	%r14d, %r14d
	leaq	L_.str.3(%rip), %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_printf
	jmp	LBB0_24
	.p2align	4, 0x90
LBB0_16:                                ##   in Loop: Header=BB0_5 Depth=1
	leaq	L_.str.1(%rip), %rdi
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_printf
	movq	_ATA_PORT_NSECT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	xorl	%edx, %edx
	callq	_ide_outb
	movl	%ebx, %edi
	callq	_phy_reset
	testl	%eax, %eax
	je	LBB0_6
## %bb.17:                              ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %edi
	callq	_wait_FIS
	testl	%eax, %eax
	jne	LBB0_19
## %bb.18:                              ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r14d, %r14d
	leaq	L_.str.1(%rip), %rdi
	jmp	LBB0_7
	.p2align	4, 0x90
LBB0_6:                                 ##   in Loop: Header=BB0_5 Depth=1
	xorl	%r14d, %r14d
	leaq	L_.str(%rip), %rdi
LBB0_7:                                 ##   in Loop: Header=BB0_5 Depth=1
	movl	%ebx, %esi
	xorl	%eax, %eax
	callq	_printf
LBB0_24:                                ##   in Loop: Header=BB0_5 Depth=1
	movq	(%r13), %rax
	movl	%r14d, (%rax,%rbx,4)
	incq	%rbx
	movslq	(%r15), %rax
	cmpq	%rax, %rbx
	jge	LBB0_8
## %bb.25:                              ##   in Loop: Header=BB0_5 Depth=1
	movq	_SATA_INT_ENABLE_CLR_OFF@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	_SATA_INT_CLR_OFF@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movq	_SATA_SCR_STATUS@GOTPCREL(%rip), %r14
	jmp	LBB0_5
LBB0_22:                                ##   in Loop: Header=BB0_5 Depth=1
	incl	-44(%rbp)                       ## 4-byte Folded Spill
	movl	$1, %r14d
	jmp	LBB0_24
LBB0_8:
	testl	%eax, %eax
	jle	LBB0_13
## %bb.9:
	xorl	%ebx, %ebx
	movq	_SATA_CONTROL_OFF@GOTPCREL(%rip), %r14
	jmp	LBB0_10
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_10 Depth=1
	incq	%rbx
	movslq	%eax, %rcx
	cmpq	%rcx, %rbx
	jge	LBB0_13
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	movq	(%r13), %rcx
	cmpl	$0, (%rcx,%rbx,4)
	je	LBB0_12
## %bb.11:                              ##   in Loop: Header=BB0_10 Depth=1
	movq	(%r12), %rax
	movq	(%rax,%rbx,8), %rax
	movq	_SATA_DRIVE_CONTROL_OFF@GOTPCREL(%rip), %rcx
	movslq	(%rcx), %rcx
	movq	$0, (%rax,%rcx,8)
	movq	_SATA_SCR_ERROR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	movl	$-1, %edx
	callq	_scr_write
	movq	_SATA_SCTL_CLR_ERR@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%r12), %rcx
	movq	(%rcx,%rbx,8), %rcx
	movslq	(%r14), %rdx
	orq	%rax, (%rcx,%rdx,8)
	movq	_SATA_INT_CLR_OFF@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	movq	$-1, (%rcx,%rax,8)
	movl	(%r15), %eax
	jmp	LBB0_12
LBB0_13:
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
LBB0_14:
	xorl	%eax, %eax
	testl	%ebx, %ebx
	sete	%al
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_CONFIG_SYS_IDE_MAXDEVICE,4,2   ## @CONFIG_SYS_IDE_MAXDEVICE
	.comm	_disk_present,8,3               ## @disk_present
	.comm	_SYS_CTRL_RST_SATA,4,2          ## @SYS_CTRL_RST_SATA
	.comm	_SYS_CTRL_RST_SATA_LINK,4,2     ## @SYS_CTRL_RST_SATA_LINK
	.comm	_SYS_CTRL_RST_SATA_PHY,4,2      ## @SYS_CTRL_RST_SATA_PHY
	.comm	_SYS_CTRL_RST_SGDMA,4,2         ## @SYS_CTRL_RST_SGDMA
	.comm	_SYS_CTRL_CLK_SATA,4,2          ## @SYS_CTRL_CLK_SATA
	.comm	_SYS_CTRL_CLK_DMA,4,2           ## @SYS_CTRL_CLK_DMA
	.comm	_SATA_HOST_REGS_BASE,8,3        ## @SATA_HOST_REGS_BASE
	.comm	_SATA_INT_ENABLE_CLR_OFF,4,2    ## @SATA_INT_ENABLE_CLR_OFF
	.comm	_SATA_INT_CLR_OFF,4,2           ## @SATA_INT_CLR_OFF
	.comm	_sata_regs_base,8,3             ## @sata_regs_base
	.comm	_ATA_PORT_NSECT,4,2             ## @ATA_PORT_NSECT
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"SATA PHY not ready for device %d\n"

L_.str.1:                               ## @.str.1
	.asciz	"No FIS received from device %d\n"

	.comm	_SATA_SCR_STATUS,4,2            ## @SATA_SCR_STATUS
L_.str.2:                               ## @.str.2
	.asciz	"Timed out of wait for SATA device %d to have BUSY clear\n"

L_.str.3:                               ## @.str.3
	.asciz	"No SATA device %d found, PHY status = 0x%08x\n"

	.comm	_SATA_DRIVE_CONTROL_OFF,4,2     ## @SATA_DRIVE_CONTROL_OFF
	.comm	_SATA_SCR_ERROR,4,2             ## @SATA_SCR_ERROR
	.comm	_SATA_SCTL_CLR_ERR,8,3          ## @SATA_SCTL_CLR_ERR
	.comm	_SATA_CONTROL_OFF,4,2           ## @SATA_CONTROL_OFF
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ide_preinit                    ; -- Begin function ide_preinit
	.p2align	2
_ide_preinit:                           ; @ide_preinit
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #112
	.cfi_def_cfa_offset 112
	stp	x28, x27, [sp, #16]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #32]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #48]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #64]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #80]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #96]             ; 16-byte Folded Spill
	add	x29, sp, #96
	.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
Lloh0:
	adrp	x24, _CONFIG_SYS_IDE_MAXDEVICE@GOTPAGE
Lloh1:
	ldr	x24, [x24, _CONFIG_SYS_IDE_MAXDEVICE@GOTPAGEOFF]
	ldr	w8, [x24]
Lloh2:
	adrp	x25, _disk_present@GOTPAGE
Lloh3:
	ldr	x25, [x25, _disk_present@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_3
; %bb.1:
	mov	x8, #0
	ldr	x9, [x25]
	mov	w10, #1
LBB0_2:                                 ; =>This Inner Loop Header: Depth=1
	str	w10, [x9, x8, lsl #2]
	add	x8, x8, #1
	ldrsw	x11, [x24]
	cmp	x8, x11
	b.lt	LBB0_2
LBB0_3:
Lloh4:
	adrp	x19, _SYS_CTRL_RST_SATA@GOTPAGE
Lloh5:
	ldr	x19, [x19, _SYS_CTRL_RST_SATA@GOTPAGEOFF]
	ldr	w0, [x19]
	mov	w1, #1
	bl	_reset_block
Lloh6:
	adrp	x20, _SYS_CTRL_RST_SATA_LINK@GOTPAGE
Lloh7:
	ldr	x20, [x20, _SYS_CTRL_RST_SATA_LINK@GOTPAGEOFF]
	ldr	w0, [x20]
	mov	w1, #1
	bl	_reset_block
Lloh8:
	adrp	x21, _SYS_CTRL_RST_SATA_PHY@GOTPAGE
Lloh9:
	ldr	x21, [x21, _SYS_CTRL_RST_SATA_PHY@GOTPAGEOFF]
	ldr	w0, [x21]
	mov	w1, #1
	bl	_reset_block
Lloh10:
	adrp	x22, _SYS_CTRL_RST_SGDMA@GOTPAGE
Lloh11:
	ldr	x22, [x22, _SYS_CTRL_RST_SGDMA@GOTPAGEOFF]
	ldr	w0, [x22]
	mov	w1, #1
	bl	_reset_block
Lloh12:
	adrp	x8, _SYS_CTRL_CLK_SATA@GOTPAGE
Lloh13:
	ldr	x8, [x8, _SYS_CTRL_CLK_SATA@GOTPAGEOFF]
Lloh14:
	ldr	w0, [x8]
	bl	_enable_clock
Lloh15:
	adrp	x8, _SYS_CTRL_CLK_DMA@GOTPAGE
Lloh16:
	ldr	x8, [x8, _SYS_CTRL_CLK_DMA@GOTPAGEOFF]
Lloh17:
	ldr	w0, [x8]
	bl	_enable_clock
	mov	w0, #5000
	bl	_udelay
	ldr	w0, [x21]
	mov	w1, #0
	bl	_reset_block
	mov	w0, #50
	bl	_udelay
	ldr	w0, [x19]
	mov	w1, #0
	bl	_reset_block
	ldr	w0, [x20]
	mov	w1, #0
	bl	_reset_block
	mov	w0, #50
	bl	_udelay
	ldr	w0, [x22]
	mov	w1, #0
	bl	_reset_block
	mov	w0, #100
	bl	_udelay
	bl	_workaround5458
	mov	w0, #10000
	bl	_udelay
Lloh18:
	adrp	x9, _SATA_HOST_REGS_BASE@GOTPAGE
Lloh19:
	ldr	x9, [x9, _SATA_HOST_REGS_BASE@GOTPAGEOFF]
	ldr	x10, [x9]
Lloh20:
	adrp	x22, _SATA_INT_ENABLE_CLR_OFF@GOTPAGE
Lloh21:
	ldr	x22, [x22, _SATA_INT_ENABLE_CLR_OFF@GOTPAGEOFF]
	ldrsw	x8, [x22]
	mov	x23, #-1
	str	x23, [x10, x8, lsl #3]
Lloh22:
	adrp	x27, _SATA_INT_CLR_OFF@GOTPAGE
Lloh23:
	ldr	x27, [x27, _SATA_INT_CLR_OFF@GOTPAGEOFF]
	ldr	x10, [x9]
	ldrsw	x9, [x27]
	str	x23, [x10, x9, lsl #3]
	ldr	w10, [x24]
	cmp	w10, #1
	b.lt	LBB0_25
; %bb.4:
	mov	x19, #0
	str	wzr, [sp, #12]                  ; 4-byte Folded Spill
Lloh24:
	adrp	x28, _sata_regs_base@GOTPAGE
Lloh25:
	ldr	x28, [x28, _sata_regs_base@GOTPAGEOFF]
Lloh26:
	adrp	x21, _ATA_PORT_NSECT@GOTPAGE
Lloh27:
	ldr	x21, [x21, _ATA_PORT_NSECT@GOTPAGEOFF]
Lloh28:
	adrp	x20, l_.str@PAGE
Lloh29:
	add	x20, x20, l_.str@PAGEOFF
Lloh30:
	adrp	x26, _SATA_SCR_STATUS@GOTPAGE
Lloh31:
	ldr	x26, [x26, _SATA_SCR_STATUS@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x10, [x28]
	ldr	x10, [x10, x19, lsl #3]
	str	x23, [x10, w8, sxtw #3]
	str	x23, [x10, w9, sxtw #3]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_ide_outb
	mov	x0, x19
	bl	_phy_reset
	cbz	w0, LBB0_14
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_wait_FIS
	cbz	w0, LBB0_11
LBB0_7:                                 ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	bl	_scr_read
	and	w8, w0, #0xf
	cmp	w8, #3
	b.ne	LBB0_10
; %bb.8:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	mov	w1, #30
	bl	_wait_not_busy
	cbz	x0, LBB0_18
; %bb.9:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh32:
	adrp	x0, l_.str.2@PAGE
Lloh33:
	add	x0, x0, l_.str.2@PAGEOFF
	b	LBB0_15
LBB0_10:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w1, [x26]
	mov	x0, x19
	bl	_scr_read
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh34:
	adrp	x0, l_.str.3@PAGE
Lloh35:
	add	x0, x0, l_.str.3@PAGEOFF
	b	LBB0_15
LBB0_11:                                ;   in Loop: Header=BB0_5 Depth=1
Lloh36:
	adrp	x0, l_.str.1@PAGE
Lloh37:
	add	x0, x0, l_.str.1@PAGEOFF
	mov	x1, x19
	bl	_printf
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #0
	bl	_ide_outb
	mov	x0, x19
	bl	_phy_reset
	cbz	w0, LBB0_14
; %bb.12:                               ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x19
	bl	_wait_FIS
	cbnz	w0, LBB0_7
; %bb.13:                               ;   in Loop: Header=BB0_5 Depth=1
Lloh38:
	adrp	x0, l_.str.1@PAGE
Lloh39:
	add	x0, x0, l_.str.1@PAGEOFF
	b	LBB0_15
LBB0_14:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x20
LBB0_15:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x1, x19
	bl	_printf
	mov	w8, #0
LBB0_16:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	x9, [x25]
	str	w8, [x9, x19, lsl #2]
	add	x19, x19, #1
	ldrsw	x8, [x24]
	cmp	x19, x8
	b.ge	LBB0_19
; %bb.17:                               ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [x22]
	ldr	w9, [x27]
	b	LBB0_5
LBB0_18:                                ;   in Loop: Header=BB0_5 Depth=1
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	add	w8, w8, #1
	str	w8, [sp, #12]                   ; 4-byte Folded Spill
	mov	w8, #1
	b	LBB0_16
LBB0_19:
	cmp	w8, #1
	b.lt	LBB0_24
; %bb.20:
	mov	x19, #0
Lloh40:
	adrp	x21, _SATA_SCR_ERROR@GOTPAGE
Lloh41:
	ldr	x21, [x21, _SATA_SCR_ERROR@GOTPAGEOFF]
Lloh42:
	adrp	x22, _SATA_SCTL_CLR_ERR@GOTPAGE
Lloh43:
	ldr	x22, [x22, _SATA_SCTL_CLR_ERR@GOTPAGEOFF]
	mov	x23, #-1
Lloh44:
	adrp	x26, _SATA_CONTROL_OFF@GOTPAGE
Lloh45:
	ldr	x26, [x26, _SATA_CONTROL_OFF@GOTPAGEOFF]
	b	LBB0_22
LBB0_21:                                ;   in Loop: Header=BB0_22 Depth=1
	add	x19, x19, #1
	cmp	x19, w8, sxtw
	b.ge	LBB0_24
LBB0_22:                                ; =>This Inner Loop Header: Depth=1
	ldr	x9, [x25]
	ldr	w9, [x9, x19, lsl #2]
	cbz	w9, LBB0_21
; %bb.23:                               ;   in Loop: Header=BB0_22 Depth=1
	ldr	x8, [x28]
	mov	x20, x27
	mov	x27, x25
	lsl	x25, x19, #3
	ldr	x8, [x8, x25]
Lloh46:
	adrp	x9, _SATA_DRIVE_CONTROL_OFF@GOTPAGE
Lloh47:
	ldr	x9, [x9, _SATA_DRIVE_CONTROL_OFF@GOTPAGEOFF]
Lloh48:
	ldrsw	x9, [x9]
	str	xzr, [x8, x9, lsl #3]
	ldr	w1, [x21]
	mov	x0, x19
	mov	w2, #-1
	bl	_scr_write
	ldr	x8, [x28]
	ldr	x8, [x8, x25]
	mov	x25, x27
	mov	x27, x20
	ldr	x9, [x22]
	ldrsw	x10, [x26]
	lsl	x10, x10, #3
	ldr	x11, [x8, x10]
	orr	x9, x11, x9
	str	x9, [x8, x10]
	ldrsw	x9, [x20]
	str	x23, [x8, x9, lsl #3]
	ldr	w8, [x24]
	b	LBB0_21
LBB0_24:
	ldr	w8, [sp, #12]                   ; 4-byte Folded Reload
	b	LBB0_26
LBB0_25:
	mov	w8, #0
LBB0_26:
	cmp	w8, #0
	cset	w0, eq
	ldp	x29, x30, [sp, #96]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #80]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #64]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #48]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #32]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #112
	ret
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpLdrGot	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh4, Lloh5
	.loh AdrpLdrGot	Lloh30, Lloh31
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGot	Lloh24, Lloh25
	.loh AdrpAdd	Lloh32, Lloh33
	.loh AdrpAdd	Lloh34, Lloh35
	.loh AdrpAdd	Lloh36, Lloh37
	.loh AdrpAdd	Lloh38, Lloh39
	.loh AdrpLdrGot	Lloh44, Lloh45
	.loh AdrpLdrGot	Lloh42, Lloh43
	.loh AdrpLdrGot	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh46, Lloh47, Lloh48
	.cfi_endproc
                                        ; -- End function
	.comm	_CONFIG_SYS_IDE_MAXDEVICE,4,2   ; @CONFIG_SYS_IDE_MAXDEVICE
	.comm	_disk_present,8,3               ; @disk_present
	.comm	_SYS_CTRL_RST_SATA,4,2          ; @SYS_CTRL_RST_SATA
	.comm	_SYS_CTRL_RST_SATA_LINK,4,2     ; @SYS_CTRL_RST_SATA_LINK
	.comm	_SYS_CTRL_RST_SATA_PHY,4,2      ; @SYS_CTRL_RST_SATA_PHY
	.comm	_SYS_CTRL_RST_SGDMA,4,2         ; @SYS_CTRL_RST_SGDMA
	.comm	_SYS_CTRL_CLK_SATA,4,2          ; @SYS_CTRL_CLK_SATA
	.comm	_SYS_CTRL_CLK_DMA,4,2           ; @SYS_CTRL_CLK_DMA
	.comm	_SATA_HOST_REGS_BASE,8,3        ; @SATA_HOST_REGS_BASE
	.comm	_SATA_INT_ENABLE_CLR_OFF,4,2    ; @SATA_INT_ENABLE_CLR_OFF
	.comm	_SATA_INT_CLR_OFF,4,2           ; @SATA_INT_CLR_OFF
	.comm	_sata_regs_base,8,3             ; @sata_regs_base
	.comm	_ATA_PORT_NSECT,4,2             ; @ATA_PORT_NSECT
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"SATA PHY not ready for device %d\n"

l_.str.1:                               ; @.str.1
	.asciz	"No FIS received from device %d\n"

	.comm	_SATA_SCR_STATUS,4,2            ; @SATA_SCR_STATUS
l_.str.2:                               ; @.str.2
	.asciz	"Timed out of wait for SATA device %d to have BUSY clear\n"

l_.str.3:                               ; @.str.3
	.asciz	"No SATA device %d found, PHY status = 0x%08x\n"

	.comm	_SATA_DRIVE_CONTROL_OFF,4,2     ; @SATA_DRIVE_CONTROL_OFF
	.comm	_SATA_SCR_ERROR,4,2             ; @SATA_SCR_ERROR
	.comm	_SATA_SCTL_CLR_ERR,8,3          ; @SATA_SCTL_CLR_ERR
	.comm	_SATA_CONTROL_OFF,4,2           ; @SATA_CONTROL_OFF
.subsections_via_symbols
