	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nv1a_fb_vram_init
_nv1a_fb_vram_init:                     ## @nv1a_fb_vram_init
	.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	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r14
	xorl	%ebx, %ebx
	xorl	%edi, %edi
	movl	$1, %esi
	callq	_PCI_DEVFN
	xorl	%edi, %edi
	movl	%eax, %esi
	callq	_pci_get_bus_and_slot
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	movq	%r14, %rdi
	callq	_nv_device
	cmpl	$26, (%rax)
	jne	LBB0_4
## %bb.3:
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	$124, %esi
	callq	_pci_read_config_dword
	movl	-28(%rbp), %eax
	shrl	$6, %eax
	andl	$31, %eax
	jmp	LBB0_5
LBB0_1:
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	callq	_nv_fatal
	movq	_ENODEV@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
	jmp	LBB0_6
LBB0_4:
	leaq	-28(%rbp), %rdx
	movq	%r15, %rdi
	movl	$132, %esi
	callq	_pci_read_config_dword
	movl	-28(%rbp), %eax
	shrl	$4, %eax
	andl	$127, %eax
LBB0_5:
	movq	_NV_MEM_TYPE_STOLEN@GOTPCREL(%rip), %rcx
	movl	(%rcx), %ecx
	movl	%ecx, 4(%r14)
	shll	$20, %eax
	addl	$1048576, %eax                  ## imm = 0x100000
	movl	%eax, (%r14)
	xorl	%ebx, %ebx
LBB0_6:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no bridge device\n"

	.comm	_ENODEV,4,2                     ## @ENODEV
	.comm	_NV_MEM_TYPE_STOLEN,4,2         ## @NV_MEM_TYPE_STOLEN
	.no_dead_strip	_nv1a_fb_vram_init
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nv1a_fb_vram_init
_nv1a_fb_vram_init:                     ; @nv1a_fb_vram_init
	.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
	mov	w0, #0
	mov	w1, #1
	bl	_PCI_DEVFN
	mov	x1, x0
	mov	w0, #0
	bl	_pci_get_bus_and_slot
	cbz	x0, LBB0_3
; %bb.1:
	mov	x20, x0
	mov	x0, x19
	bl	_nv_device
	ldr	w8, [x0]
	add	x2, sp, #12
	mov	x0, x20
	cmp	w8, #26
	b.ne	LBB0_4
; %bb.2:
	mov	w1, #124
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	ubfx	w8, w8, #6, #5
	b	LBB0_5
LBB0_3:
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x19
	bl	_nv_fatal
Lloh2:
	adrp	x8, _ENODEV@GOTPAGE
Lloh3:
	ldr	x8, [x8, _ENODEV@GOTPAGEOFF]
Lloh4:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_6
LBB0_4:
	mov	w1, #132
	bl	_pci_read_config_dword
	ldr	w8, [sp, #12]
	ubfx	w8, w8, #4, #7
LBB0_5:
	mov	w0, #0
Lloh5:
	adrp	x9, _NV_MEM_TYPE_STOLEN@GOTPAGE
Lloh6:
	ldr	x9, [x9, _NV_MEM_TYPE_STOLEN@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	lsl	w8, w8, #20
	add	w8, w8, #256, lsl #12           ; =1048576
	stp	w8, w9, [x19]
LBB0_6:
	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	Lloh2, Lloh3, Lloh4
	.loh AdrpAdd	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no bridge device\n"

	.comm	_ENODEV,4,2                     ; @ENODEV
	.comm	_NV_MEM_TYPE_STOLEN,4,2         ; @NV_MEM_TYPE_STOLEN
	.no_dead_strip	_nv1a_fb_vram_init
.subsections_via_symbols
