	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function sata_pmp_init_links
_sata_pmp_init_links:                   ## @sata_pmp_init_links
	.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	%esi, %ebx
	movq	(%rdi), %r12
	testq	%r12, %r12
	je	LBB0_1
## %bb.6:
	testl	%ebx, %ebx
	jle	LBB0_7
LBB0_8:
	movl	%ebx, %ecx
	shlq	$4, %rcx
	xorl	%eax, %eax
	movq	_ATA_ALL_DEVICES@GOTPCREL(%rip), %rdx
	movq	_ATA_EH_RESET@GOTPCREL(%rip), %rsi
	xorl	%edi, %edi
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	$0, (%r12,%rdi)
	movl	(%rdx), %ebx
	orl	%ebx, 12(%r12,%rdi)
	movl	(%rsi), %ebx
	orl	%ebx, 8(%r12,%rdi)
	addq	$16, %rdi
	cmpq	%rdi, %rcx
	jne	LBB0_9
	jmp	LBB0_10
LBB0_1:
	movq	%rdi, %r15
	movq	_SATA_PMP_MAX_PORTS@GOTPCREL(%rip), %r14
	movl	(%r14), %edi
	shll	$4, %edi
	movq	_GFP_NOIO@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_11
## %bb.2:
	movq	%rax, %r12
	movl	%ebx, -44(%rbp)                 ## 4-byte Spill
	cmpl	$0, (%r14)
	jle	LBB0_5
## %bb.3:
	xorl	%ebx, %ebx
	movq	%r12, %r13
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%r15, %rdi
	movq	%r13, %rsi
	movl	%ebx, %edx
	callq	_ata_link_init
	incq	%rbx
	movslq	(%r14), %rax
	addq	$16, %r13
	cmpq	%rax, %rbx
	jl	LBB0_4
LBB0_5:
	movq	%r12, (%r15)
	movl	-44(%rbp), %ebx                 ## 4-byte Reload
	testl	%ebx, %ebx
	jg	LBB0_8
LBB0_7:
	xorl	%eax, %eax
	jmp	LBB0_10
LBB0_11:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_10:
                                        ## kill: def $eax killed $eax killed $rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_SATA_PMP_MAX_PORTS,4,2         ## @SATA_PMP_MAX_PORTS
	.comm	_GFP_NOIO,4,2                   ## @GFP_NOIO
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_ATA_ALL_DEVICES,4,2            ## @ATA_ALL_DEVICES
	.comm	_ATA_EH_RESET,4,2               ## @ATA_EH_RESET
	.no_dead_strip	_sata_pmp_init_links
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function sata_pmp_init_links
_sata_pmp_init_links:                   ; @sata_pmp_init_links
	.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	x19, x1
	ldr	x21, [x0]
	cbz	x21, LBB0_2
; %bb.1:
	cmp	w19, #1
	b.ge	LBB0_7
	b	LBB0_9
LBB0_2:
	mov	x20, x0
Lloh0:
	adrp	x24, _SATA_PMP_MAX_PORTS@GOTPAGE
Lloh1:
	ldr	x24, [x24, _SATA_PMP_MAX_PORTS@GOTPAGEOFF]
	ldr	w8, [x24]
	lsl	w0, w8, #4
Lloh2:
	adrp	x8, _GFP_NOIO@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_NOIO@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_kzalloc
	cbz	x0, LBB0_11
; %bb.3:
	mov	x21, x0
	ldr	w8, [x24]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	mov	x22, #0
	mov	x23, x21
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x20
	mov	x1, x23
	mov	x2, x22
	bl	_ata_link_init
	add	x22, x22, #1
	ldrsw	x8, [x24]
	add	x23, x23, #16
	cmp	x22, x8
	b.lt	LBB0_5
LBB0_6:
	str	x21, [x20]
	cmp	w19, #1
	b.lt	LBB0_9
LBB0_7:
	add	x8, x21, #12
Lloh5:
	adrp	x9, _ATA_ALL_DEVICES@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ATA_ALL_DEVICES@GOTPAGEOFF]
Lloh7:
	adrp	x10, _ATA_EH_RESET@GOTPAGE
Lloh8:
	ldr	x10, [x10, _ATA_EH_RESET@GOTPAGEOFF]
	mov	w11, w19
LBB0_8:                                 ; =>This Inner Loop Header: Depth=1
	stur	xzr, [x8, #-12]
	ldr	w12, [x9]
	ldr	w13, [x8]
	orr	w12, w13, w12
	str	w12, [x8]
	ldr	w12, [x10]
	ldur	w13, [x8, #-4]
	orr	w12, w13, w12
	stur	w12, [x8, #-4]
	add	x8, x8, #16
	subs	x11, x11, #1
	b.ne	LBB0_8
LBB0_9:
	mov	w0, #0
LBB0_10:
	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
LBB0_11:
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_10
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGot	Lloh7, Lloh8
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_SATA_PMP_MAX_PORTS,4,2         ; @SATA_PMP_MAX_PORTS
	.comm	_GFP_NOIO,4,2                   ; @GFP_NOIO
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_ATA_ALL_DEVICES,4,2            ; @ATA_ALL_DEVICES
	.comm	_ATA_EH_RESET,4,2               ; @ATA_EH_RESET
	.no_dead_strip	_sata_pmp_init_links
.subsections_via_symbols
