	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ata_acpi_associate_ide_port
_ata_acpi_associate_ide_port:           ## @ata_acpi_associate_ide_port
	.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, %r14
	movq	32(%rdi), %rax
	movq	(%rax), %rdi
	movl	(%r14), %esi
	callq	_acpi_get_child
	movq	%rax, 16(%r14)
	testq	%rax, %rax
	je	LBB0_6
## %bb.1:
	movq	_ATA_FLAG_SLAVE_POSS@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ebx
	xorl	%r12d, %r12d
	andl	4(%r14), %ebx
	sete	%r15b
	movq	24(%r14), %r13
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_acpi_get_child
	movq	%rax, (%r13)
	testl	%ebx, %ebx
	je	LBB0_4
## %bb.2:
	movb	%r15b, %r12b
	movl	$2, %r15d
	subq	%r12, %r15
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%r14), %rdi
	movq	24(%r14), %r12
	movl	%ebx, %esi
	callq	_acpi_get_child
	movq	%rax, (%r12,%rbx,8)
	incq	%rbx
	cmpq	%rbx, %r15
	jne	LBB0_3
LBB0_4:
	leaq	12(%r14), %rsi
	movq	%r14, %rdi
	callq	_ata_acpi_gtm
	testq	%rax, %rax
	jne	LBB0_6
## %bb.5:
	movq	_ATA_PFLAG_INIT_GTM_VALID@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, 8(%r14)
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_FLAG_SLAVE_POSS,4,2        ## @ATA_FLAG_SLAVE_POSS
	.comm	_ATA_PFLAG_INIT_GTM_VALID,4,2   ## @ATA_PFLAG_INIT_GTM_VALID
	.no_dead_strip	_ata_acpi_associate_ide_port
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ata_acpi_associate_ide_port
_ata_acpi_associate_ide_port:           ; @ata_acpi_associate_ide_port
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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
	mov	x19, x0
	ldr	x8, [x0, #32]
	ldr	x0, [x8]
	ldr	w1, [x19]
	bl	_acpi_get_child
	str	x0, [x19, #16]
	cbz	x0, LBB0_6
; %bb.1:
Lloh0:
	adrp	x8, _ATA_FLAG_SLAVE_POSS@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ATA_FLAG_SLAVE_POSS@GOTPAGEOFF]
	ldr	w9, [x19, #4]
Lloh2:
	ldr	w8, [x8]
	ands	w20, w8, w9
	mov	w8, #1
	cinc	x21, x8, ne
	ldr	x22, [x19, #24]
	mov	w1, #0
	bl	_acpi_get_child
	str	x0, [x22]
	cbz	w20, LBB0_4
; %bb.2:
	mov	w20, #1
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldp	x0, x22, [x19, #16]
	mov	x1, x20
	bl	_acpi_get_child
	str	x0, [x22, x20, lsl #3]
	add	x20, x20, #1
	cmp	x21, x20
	b.ne	LBB0_3
LBB0_4:
	add	x1, x19, #12
	mov	x0, x19
	bl	_ata_acpi_gtm
	cbnz	x0, LBB0_6
; %bb.5:
Lloh3:
	adrp	x8, _ATA_PFLAG_INIT_GTM_VALID@GOTPAGE
Lloh4:
	ldr	x8, [x8, _ATA_PFLAG_INIT_GTM_VALID@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	ldr	w9, [x19, #8]
	orr	w8, w9, w8
	str	w8, [x19, #8]
LBB0_6:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_FLAG_SLAVE_POSS,4,2        ; @ATA_FLAG_SLAVE_POSS
	.comm	_ATA_PFLAG_INIT_GTM_VALID,4,2   ; @ATA_PFLAG_INIT_GTM_VALID
	.no_dead_strip	_ata_acpi_associate_ide_port
.subsections_via_symbols
