	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function quirk_amd_ide_mode
_quirk_amd_ide_mode:                    ## @quirk_amd_ide_mode
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -24
	movq	%rdi, %rbx
	movq	_PCI_CLASS_DEVICE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-12(%rbp), %rdx
	callq	_pci_read_config_byte
	cmpl	$1, -12(%rbp)
	jne	LBB0_2
## %bb.1:
	leaq	-12(%rbp), %rdx
	movq	%rbx, %rdi
	movl	$64, %esi
	callq	_pci_read_config_byte
	movl	-12(%rbp), %edx
	orl	$1, %edx
	movq	%rbx, %rdi
	movl	$64, %esi
	callq	_pci_write_config_byte
	movq	%rbx, %rdi
	movl	$9, %esi
	movl	$1, %edx
	callq	_pci_write_config_byte
	movq	%rbx, %rdi
	movl	$10, %esi
	movl	$6, %edx
	callq	_pci_write_config_byte
	movl	-12(%rbp), %edx
	movq	%rbx, %rdi
	movl	$64, %esi
	callq	_pci_write_config_byte
	movq	_PCI_CLASS_STORAGE_SATA_AHCI@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, (%rbx)
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_info
LBB0_2:
	addq	$8, %rsp
	popq	%rbx
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_CLASS_DEVICE,4,2           ## @PCI_CLASS_DEVICE
	.comm	_PCI_CLASS_STORAGE_SATA_AHCI,4,2 ## @PCI_CLASS_STORAGE_SATA_AHCI
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"set SATA to AHCI mode\n"

	.no_dead_strip	_quirk_amd_ide_mode
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quirk_amd_ide_mode
_quirk_amd_ide_mode:                    ; @quirk_amd_ide_mode
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #48
	.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
	mov	x19, x0
Lloh0:
	adrp	x8, _PCI_CLASS_DEVICE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PCI_CLASS_DEVICE@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	add	x2, sp, #12
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	cmp	w8, #1
	b.ne	LBB0_2
; %bb.1:
	add	x2, sp, #12
	mov	x0, x19
	mov	w1, #64
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	orr	w2, w8, #0x1
	mov	x0, x19
	mov	w1, #64
	bl	_pci_write_config_byte
	mov	x0, x19
	mov	w1, #9
	mov	w2, #1
	bl	_pci_write_config_byte
	mov	x0, x19
	mov	w1, #10
	mov	w2, #6
	bl	_pci_write_config_byte
	ldr	w2, [sp, #12]
	mov	x0, x19
	mov	w1, #64
	bl	_pci_write_config_byte
Lloh3:
	adrp	x8, _PCI_CLASS_STORAGE_SATA_AHCI@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PCI_CLASS_STORAGE_SATA_AHCI@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x19]
Lloh6:
	adrp	x1, l_.str@PAGE
Lloh7:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pci_info
LBB0_2:
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #48
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpAdd	Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_CLASS_DEVICE,4,2           ; @PCI_CLASS_DEVICE
	.comm	_PCI_CLASS_STORAGE_SATA_AHCI,4,2 ; @PCI_CLASS_STORAGE_SATA_AHCI
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"set SATA to AHCI mode\n"

	.no_dead_strip	_quirk_amd_ide_mode
.subsections_via_symbols
