	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function quirk_nvidia_hda
_quirk_nvidia_hda:                      ## @quirk_nvidia_hda
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	subq	$16, %rsp
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	(%rdi), %rax
	movq	_PCI_DEVICE_ID_NVIDIA_GEFORCE_320M@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jl	LBB0_3
## %bb.1:
	movq	%rdi, %rbx
	leaq	-20(%rbp), %rdx
	movl	$1160, %esi                     ## imm = 0x488
	callq	_pci_read_config_dword
	movl	-20(%rbp), %r14d
	movl	$25, %edi
	callq	_BIT
	testl	%r14d, %eax
	jne	LBB0_3
## %bb.2:
	leaq	L_.str(%rip), %rsi
	movq	%rbx, %rdi
	callq	_pci_info
	movl	-20(%rbp), %r14d
	movl	$25, %edi
	callq	_BIT
	orl	%eax, %r14d
	movq	%rbx, %rdi
	movl	$1160, %esi                     ## imm = 0x488
	movl	%r14d, %edx
	callq	_pci_write_config_dword
	movq	_PCI_HEADER_TYPE@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	leaq	-24(%rbp), %rdx
	movq	%rbx, %rdi
	callq	_pci_read_config_byte
	movl	-24(%rbp), %eax
	shrl	$7, %eax
	andl	$1, %eax
	movl	%eax, 8(%rbx)
LBB0_3:
	addq	$16, %rsp
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_PCI_DEVICE_ID_NVIDIA_GEFORCE_320M,8,3 ## @PCI_DEVICE_ID_NVIDIA_GEFORCE_320M
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"Enabling HDA controller\n"

	.comm	_PCI_HEADER_TYPE,4,2            ## @PCI_HEADER_TYPE
	.no_dead_strip	_quirk_nvidia_hda
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function quirk_nvidia_hda
_quirk_nvidia_hda:                      ; @quirk_nvidia_hda
	.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
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _PCI_DEVICE_ID_NVIDIA_GEFORCE_320M@GOTPAGE
Lloh1:
	ldr	x9, [x9, _PCI_DEVICE_ID_NVIDIA_GEFORCE_320M@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.lt	LBB0_3
; %bb.1:
	mov	x19, x0
	add	x2, sp, #8
	mov	w1, #1160
	bl	_pci_read_config_dword
	ldr	w20, [sp, #8]
	mov	w0, #25
	bl	_BIT
	tst	w0, w20
	b.ne	LBB0_3
; %bb.2:
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_pci_info
	ldr	w20, [sp, #8]
	mov	w0, #25
	bl	_BIT
	orr	w2, w0, w20
	mov	x0, x19
	mov	w1, #1160
	bl	_pci_write_config_dword
Lloh5:
	adrp	x8, _PCI_HEADER_TYPE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PCI_HEADER_TYPE@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	add	x2, sp, #12
	mov	x0, x19
	bl	_pci_read_config_byte
	ldr	w8, [sp, #12]
	ubfx	w8, w8, #7, #1
	str	w8, [x19, #8]
LBB0_3:
	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 AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_PCI_DEVICE_ID_NVIDIA_GEFORCE_320M,8,3 ; @PCI_DEVICE_ID_NVIDIA_GEFORCE_320M
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"Enabling HDA controller\n"

	.comm	_PCI_HEADER_TYPE,4,2            ; @PCI_HEADER_TYPE
	.no_dead_strip	_quirk_nvidia_hda
.subsections_via_symbols
