	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_pci_new_                  ## -- Begin function nvkm_pci_new_
	.p2align	4, 0x90
_nvkm_pci_new_:                         ## @nvkm_pci_new_
	.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	%rcx, %r14
	movl	%edx, %r13d
	movq	%rsi, %r12
	movq	%rdi, %r15
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$40, %edi
	callq	_kzalloc
	movq	%rax, (%r14)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	movq	%rax, %r14
	addq	$8, %r14
	movq	_nvkm_pci_func@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	movl	%r13d, %edx
	movq	%r14, %rcx
	callq	_nvkm_subdev_ctor
	movq	%r15, 32(%rbx)
	movq	16(%r12), %rax
	movq	%r12, %rdi
	callq	*(%rax)
	movq	(%rax), %rax
	movq	%rax, 16(%rbx)
	movl	$-1, (%rbx)
	movq	$-1, 24(%rbx)
	movq	(%r12), %rcx
	movq	_NVKM_DEVICE_AGP@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rcx
	jne	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	_nvkm_agp_ctor
	movq	16(%rbx), %rax
LBB0_4:
	movl	$4080, %ecx                     ## imm = 0xFF0
	andl	(%rax), %ecx
	cmpl	$240, %ecx
	je	LBB0_8
## %bb.5:
	cmpl	$736, %ecx                      ## imm = 0x2E0
	je	LBB0_8
## %bb.6:
	cmpl	$170, 12(%r12)
	je	LBB0_8
## %bb.7:
	movl	$1, 4(%rbx)
LBB0_8:
	movl	8(%r12), %edi
	movl	4(%rbx), %edx
	leaq	L_.str(%rip), %rsi
	callq	_nvkm_boolopt
	movl	%eax, 4(%rbx)
	testl	%eax, %eax
	je	LBB0_12
## %bb.9:
	cmpq	$0, (%r15)
	je	LBB0_12
## %bb.10:
	movq	16(%rbx), %rdi
	callq	_pci_enable_msi
	xorl	%r15d, %r15d
	xorl	%ecx, %ecx
	testq	%rax, %rax
	sete	%cl
	movl	%ecx, 4(%rbx)
	jne	LBB0_13
## %bb.11:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	callq	_nvkm_debug
	jmp	LBB0_13
LBB0_12:
	movl	$0, 4(%rbx)
	xorl	%r15d, %r15d
	jmp	LBB0_13
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r15d, %r15d
	subl	(%rax), %r15d
LBB0_13:
	movl	%r15d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nvkm_pci_func,4,2              ## @nvkm_pci_func
	.comm	_NVKM_DEVICE_AGP,8,3            ## @NVKM_DEVICE_AGP
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NvMSI"

L_.str.1:                               ## @.str.1
	.asciz	"MSI enabled\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_pci_new_                  ; -- Begin function nvkm_pci_new_
	.p2align	2
_nvkm_pci_new_:                         ; @nvkm_pci_new_
	.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	x20, x3
	mov	x23, x2
	mov	x22, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #40
	bl	_kzalloc
	str	x0, [x20]
	cbz	x0, LBB0_13
; %bb.1:
	mov	x19, x0
	add	x20, x0, #8
Lloh3:
	adrp	x0, _nvkm_pci_func@GOTPAGE
Lloh4:
	ldr	x0, [x0, _nvkm_pci_func@GOTPAGEOFF]
	mov	x1, x22
	mov	x2, x23
	mov	x3, x20
	bl	_nvkm_subdev_ctor
	str	x21, [x19, #32]
	ldr	x8, [x22, #16]
	ldr	x8, [x8]
	mov	x0, x22
	blr	x8
	ldr	x8, [x0]
	str	x8, [x19, #16]
	mov	w9, #-1
	str	w9, [x19]
	movi.2d	v0, #0xffffffffffffffff
	str	d0, [x19, #24]
	ldr	x9, [x22]
Lloh5:
	adrp	x10, _NVKM_DEVICE_AGP@GOTPAGE
Lloh6:
	ldr	x10, [x10, _NVKM_DEVICE_AGP@GOTPAGEOFF]
Lloh7:
	ldr	x10, [x10]
	cmp	x9, x10
	b.ne	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_nvkm_agp_ctor
	ldr	x8, [x19, #16]
LBB0_3:
	ldr	w8, [x8]
	and	w8, w8, #0xff0
	cmp	w8, #240
	b.eq	LBB0_7
; %bb.4:
	cmp	w8, #736
	b.eq	LBB0_7
; %bb.5:
	ldr	w8, [x22, #12]
	cmp	w8, #170
	b.eq	LBB0_7
; %bb.6:
	mov	w8, #1
	str	w8, [x19, #4]
LBB0_7:
	ldr	w0, [x22, #8]
	ldr	w2, [x19, #4]
Lloh8:
	adrp	x1, l_.str@PAGE
Lloh9:
	add	x1, x1, l_.str@PAGEOFF
	bl	_nvkm_boolopt
	str	w0, [x19, #4]
	cbz	w0, LBB0_12
; %bb.8:
	ldr	x8, [x21]
	cbz	x8, LBB0_12
; %bb.9:
	ldr	x0, [x19, #16]
	bl	_pci_enable_msi
	cmp	x0, #0
	cset	w8, eq
	str	w8, [x19, #4]
	cbnz	x0, LBB0_11
; %bb.10:
Lloh10:
	adrp	x1, l_.str.1@PAGE
Lloh11:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_nvkm_debug
LBB0_11:
	mov	w0, #0
	b	LBB0_14
LBB0_12:
	mov	w0, #0
	str	wzr, [x19, #4]
	b	LBB0_14
LBB0_13:
Lloh12:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh14:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_14:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpAdd	Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nvkm_pci_func,4,2              ; @nvkm_pci_func
	.comm	_NVKM_DEVICE_AGP,8,3            ; @NVKM_DEVICE_AGP
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NvMSI"

l_.str.1:                               ; @.str.1
	.asciz	"MSI enabled\n"

.subsections_via_symbols
