	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_acpi_on_devcfg             ## -- Begin function ata_acpi_on_devcfg
	.p2align	4, 0x90
_ata_acpi_on_devcfg:                    ## @ata_acpi_on_devcfg
	.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	16(%rdi), %rax
	movq	(%rax), %r12
	movl	(%r12), %ecx
	movq	_ATA_FLAG_ACPI_SATA@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	$0, -44(%rbp)
	xorl	%r14d, %r14d
	cmpq	$0, 8(%rdi)
	je	LBB0_20
## %bb.1:
	movq	%rdi, %rbx
	andl	%ecx, %eax
	movq	_ATA_DFLAG_ACPI_PENDING@GOTPCREL(%rip), %r13
	movl	(%r13), %ecx
	testl	%ecx, (%rdi)
	je	LBB0_2
## %bb.4:
	testl	%eax, %eax
	jne	LBB0_5
	jmp	LBB0_7
LBB0_2:
	testl	%eax, %eax
	je	LBB0_20
## %bb.3:
	movq	_ATA_EHI_DID_HARDRESET@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 8(%r12)
	je	LBB0_20
LBB0_5:
	movq	%rbx, %rdi
	callq	_ata_acpi_push_id
	testl	%eax, %eax
	je	LBB0_7
## %bb.6:
	movl	%eax, %r15d
	xorl	%eax, %eax
	jmp	LBB0_9
LBB0_7:
	leaq	-44(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ata_acpi_exec_tfs
	testl	%eax, %eax
	je	LBB0_14
## %bb.8:
	movl	%eax, %r15d
	cmpl	$0, -44(%rbp)
	setne	%al
LBB0_9:
	movq	_EINVAL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	addl	%r15d, %ecx
	jne	LBB0_12
## %bb.10:
	testb	%al, %al
	jne	LBB0_12
## %bb.11:
	movq	_ATA_PFLAG_FROZEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	je	LBB0_20
LBB0_12:
	movl	(%rbx), %eax
	movq	_ATA_DFLAG_ACPI_FAILED@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	testl	%eax, %ecx
	je	LBB0_13
## %bb.17:
	movq	_KERN_WARNING@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str.1(%rip), %rdx
	movq	%rbx, %rdi
	callq	_ata_dev_printk
	movq	$0, 8(%rbx)
	cmpl	$0, -44(%rbp)
	jne	LBB0_19
## %bb.18:
	movq	_ATA_PFLAG_FROZEN@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	testl	%eax, 4(%r12)
	jne	LBB0_19
	jmp	LBB0_20
LBB0_13:
	orl	%eax, %ecx
	movl	%ecx, (%rbx)
LBB0_19:
	movl	%r15d, %r14d
LBB0_20:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_14:
	movl	(%r13), %eax
	notl	%eax
	andl	%eax, (%rbx)
	cmpl	$0, -44(%rbp)
	je	LBB0_20
## %bb.15:
	xorl	%r14d, %r14d
	movq	%rbx, %rdi
	xorl	%esi, %esi
	callq	_ata_dev_reread_id
	testl	%eax, %eax
	jns	LBB0_20
## %bb.16:
	movl	%eax, %r15d
	movq	_KERN_ERR@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	L_.str(%rip), %rdx
	movq	%rbx, %rdi
	callq	_ata_dev_printk
	jmp	LBB0_19
	.cfi_endproc
                                        ## -- End function
	.comm	_ATA_FLAG_ACPI_SATA,4,2         ## @ATA_FLAG_ACPI_SATA
	.comm	_ATA_DFLAG_ACPI_PENDING,4,2     ## @ATA_DFLAG_ACPI_PENDING
	.comm	_ATA_EHI_DID_HARDRESET,4,2      ## @ATA_EHI_DID_HARDRESET
	.comm	_KERN_ERR,4,2                   ## @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"failed to IDENTIFY after ACPI commands\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_ATA_PFLAG_FROZEN,4,2           ## @ATA_PFLAG_FROZEN
	.comm	_ATA_DFLAG_ACPI_FAILED,4,2      ## @ATA_DFLAG_ACPI_FAILED
	.comm	_KERN_WARNING,4,2               ## @KERN_WARNING
L_.str.1:                               ## @.str.1
	.asciz	"ACPI: failed the second time, disabled\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ata_acpi_on_devcfg             ; -- Begin function ata_acpi_on_devcfg
	.p2align	2
_ata_acpi_on_devcfg:                    ; @ata_acpi_on_devcfg
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.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
	ldp	x10, x8, [x0, #8]
	ldr	x21, [x8]
	ldr	w8, [x21]
Lloh0:
	adrp	x9, _ATA_FLAG_ACPI_SATA@GOTPAGE
Lloh1:
	ldr	x9, [x9, _ATA_FLAG_ACPI_SATA@GOTPAGEOFF]
Lloh2:
	ldr	w9, [x9]
	str	wzr, [sp, #12]
	cbz	x10, LBB0_19
; %bb.1:
	mov	x19, x0
	and	w8, w9, w8
	ldr	w9, [x0]
Lloh3:
	adrp	x22, _ATA_DFLAG_ACPI_PENDING@GOTPAGE
Lloh4:
	ldr	x22, [x22, _ATA_DFLAG_ACPI_PENDING@GOTPAGEOFF]
	ldr	w10, [x22]
	tst	w10, w9
	b.eq	LBB0_3
; %bb.2:
	cbnz	w8, LBB0_5
	b	LBB0_7
LBB0_3:
	cbz	w8, LBB0_19
; %bb.4:
	ldr	w8, [x21, #8]
Lloh5:
	adrp	x9, _ATA_EHI_DID_HARDRESET@GOTPAGE
Lloh6:
	ldr	x9, [x9, _ATA_EHI_DID_HARDRESET@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
LBB0_5:
	mov	x0, x19
	bl	_ata_acpi_push_id
	cbz	w0, LBB0_7
; %bb.6:
	mov	x20, x0
	mov	w8, #0
	b	LBB0_9
LBB0_7:
	add	x1, sp, #12
	mov	x0, x19
	bl	_ata_acpi_exec_tfs
	cbz	w0, LBB0_16
; %bb.8:
	mov	x20, x0
	ldr	w8, [sp, #12]
	cmp	w8, #0
	cset	w8, ne
LBB0_9:
Lloh8:
	adrp	x9, _EINVAL@GOTPAGE
Lloh9:
	ldr	x9, [x9, _EINVAL@GOTPAGEOFF]
Lloh10:
	ldr	w9, [x9]
	cmn	w20, w9
	b.ne	LBB0_12
; %bb.10:
	tbnz	w8, #0, LBB0_12
; %bb.11:
	ldr	w8, [x21, #4]
Lloh11:
	adrp	x9, _ATA_PFLAG_FROZEN@GOTPAGE
Lloh12:
	ldr	x9, [x9, _ATA_PFLAG_FROZEN@GOTPAGEOFF]
Lloh13:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_19
LBB0_12:
	ldr	w8, [x19]
Lloh14:
	adrp	x9, _ATA_DFLAG_ACPI_FAILED@GOTPAGE
Lloh15:
	ldr	x9, [x9, _ATA_DFLAG_ACPI_FAILED@GOTPAGEOFF]
Lloh16:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_15
; %bb.13:
Lloh17:
	adrp	x8, _KERN_WARNING@GOTPAGE
Lloh18:
	ldr	x8, [x8, _KERN_WARNING@GOTPAGEOFF]
Lloh19:
	ldr	w1, [x8]
Lloh20:
	adrp	x2, l_.str.1@PAGE
Lloh21:
	add	x2, x2, l_.str.1@PAGEOFF
	mov	x0, x19
	bl	_ata_dev_printk
	str	xzr, [x19, #8]
	ldr	w8, [sp, #12]
	cbnz	w8, LBB0_20
; %bb.14:
	ldr	w8, [x21, #4]
Lloh22:
	adrp	x9, _ATA_PFLAG_FROZEN@GOTPAGE
Lloh23:
	ldr	x9, [x9, _ATA_PFLAG_FROZEN@GOTPAGEOFF]
Lloh24:
	ldr	w9, [x9]
	tst	w9, w8
	b.ne	LBB0_20
	b	LBB0_19
LBB0_15:
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_20
LBB0_16:
	ldr	w8, [x22]
	ldr	w9, [x19]
	bic	w8, w9, w8
	str	w8, [x19]
	ldr	w8, [sp, #12]
	cbz	w8, LBB0_19
; %bb.17:
	mov	x0, x19
	mov	w1, #0
	bl	_ata_dev_reread_id
	mov	w20, #0
	tbz	w0, #31, LBB0_20
; %bb.18:
	mov	x21, x0
Lloh25:
	adrp	x8, _KERN_ERR@GOTPAGE
Lloh26:
	ldr	x8, [x8, _KERN_ERR@GOTPAGEOFF]
Lloh27:
	ldr	w1, [x8]
Lloh28:
	adrp	x2, l_.str@PAGE
Lloh29:
	add	x2, x2, l_.str@PAGEOFF
	mov	x0, x19
	bl	_ata_dev_printk
	mov	x20, x21
	b	LBB0_20
LBB0_19:
	mov	w20, #0
LBB0_20:
	mov	x0, x20
	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
	add	sp, sp, #64
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.loh AdrpLdrGotLdr	Lloh11, Lloh12, Lloh13
	.loh AdrpLdrGotLdr	Lloh14, Lloh15, Lloh16
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGotLdr	Lloh25, Lloh26, Lloh27
	.cfi_endproc
                                        ; -- End function
	.comm	_ATA_FLAG_ACPI_SATA,4,2         ; @ATA_FLAG_ACPI_SATA
	.comm	_ATA_DFLAG_ACPI_PENDING,4,2     ; @ATA_DFLAG_ACPI_PENDING
	.comm	_ATA_EHI_DID_HARDRESET,4,2      ; @ATA_EHI_DID_HARDRESET
	.comm	_KERN_ERR,4,2                   ; @KERN_ERR
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"failed to IDENTIFY after ACPI commands\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_ATA_PFLAG_FROZEN,4,2           ; @ATA_PFLAG_FROZEN
	.comm	_ATA_DFLAG_ACPI_FAILED,4,2      ; @ATA_DFLAG_ACPI_FAILED
	.comm	_KERN_WARNING,4,2               ; @KERN_WARNING
l_.str.1:                               ; @.str.1
	.asciz	"ACPI: failed the second time, disabled\n"

.subsections_via_symbols
