	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_bios_shadow_pramin
_nouveau_bios_shadow_pramin:            ## @nouveau_bios_shadow_pramin
	.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	%rdi, %r12
	callq	_nv_device
	movq	%rax, %r14
	movq	(%rax), %rax
	movq	_NV_50@GOTPCREL(%rip), %r13
	xorl	%r15d, %r15d
	cmpq	(%r13), %rax
	jl	LBB0_4
## %bb.1:
	movq	%r12, %rdi
	movl	$6397700, %esi                  ## imm = 0x619F04
	callq	_nv_rd32
	shll	$8, %eax
	andl	$-65536, %eax                   ## imm = 0xFFFF0000
	jne	LBB0_3
## %bb.2:
	movq	%r12, %rdi
	movl	$5888, %esi                     ## imm = 0x1700
	callq	_nv_rd32
	shll	$16, %eax
	addl	$983040, %eax                   ## imm = 0xF0000
LBB0_3:
	sarl	$16, %eax
	movq	%r12, %rdi
	movl	$5888, %esi                     ## imm = 0x1700
	movl	$-1, %edx
	movl	%eax, %ecx
	callq	_nv_mask
	movl	%eax, %r15d
LBB0_4:
	movq	%r12, %rdi
	movl	$7340032, %esi                  ## imm = 0x700000
	callq	_nv_rd08
	cmpl	$85, %eax
	jne	LBB0_11
## %bb.5:
	movq	%r12, %rdi
	movl	$7340033, %esi                  ## imm = 0x700001
	callq	_nv_rd08
	cmpl	$170, %eax
	jne	LBB0_11
## %bb.6:
	movq	%r12, %rdi
	movl	$7340034, %esi                  ## imm = 0x700002
	callq	_nv_rd08
	movl	%eax, %edi
	shll	$9, %edi
	movl	%edi, (%r12)
	testl	%eax, %eax
	je	LBB0_11
## %bb.7:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_11
## %bb.8:
	cmpl	$0, (%r12)
	jle	LBB0_11
## %bb.9:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_10:                                ## =>This Inner Loop Header: Depth=1
	leal	7340032(%rbx), %esi
	movq	%r12, %rdi
	callq	_nv_rd08
	movq	%r12, %rdi
	movl	%ebx, %esi
	movl	%eax, %edx
	callq	_nv_wo08
	incl	%ebx
	cmpl	(%r12), %ebx
	jl	LBB0_10
LBB0_11:
	movq	(%r14), %rax
	cmpq	(%r13), %rax
	jge	LBB0_13
## %bb.12:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_13:
	movq	%r12, %rdi
	movl	$5888, %esi                     ## imm = 0x1700
	movl	%r15d, %edx
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_nv_wr32                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_NV_50,8,3                      ## @NV_50
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_nouveau_bios_shadow_pramin
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nouveau_bios_shadow_pramin
_nouveau_bios_shadow_pramin:            ; @nouveau_bios_shadow_pramin
	.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	x19, x0
	bl	_nv_device
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x23, _NV_50@GOTPAGE
Lloh1:
	ldr	x23, [x23, _NV_50@GOTPAGEOFF]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ge	LBB0_2
; %bb.1:
	mov	w21, #0
	b	LBB0_5
LBB0_2:
	mov	x0, x19
	mov	w1, #40708
	movk	w1, #97, lsl #16
	bl	_nv_rd32
	lsl	w8, w0, #8
	ands	w8, w8, #0xffff0000
	b.ne	LBB0_4
; %bb.3:
	mov	x0, x19
	mov	w1, #5888
	bl	_nv_rd32
	lsl	w8, w0, #16
	add	w8, w8, #240, lsl #12           ; =983040
LBB0_4:
	asr	w3, w8, #16
	mov	x0, x19
	mov	w1, #5888
	mov	w2, #-1
	bl	_nv_mask
	mov	x21, x0
LBB0_5:
	mov	x0, x19
	mov	w1, #7340032
	bl	_nv_rd08
	cmp	w0, #85
	b.ne	LBB0_12
; %bb.6:
	mov	w22, #1
	movk	w22, #112, lsl #16
	mov	x0, x19
	mov	w1, #1
	movk	w1, #112, lsl #16
	bl	_nv_rd08
	cmp	w0, #170
	b.ne	LBB0_12
; %bb.7:
	add	w1, w22, #1
	mov	x0, x19
	bl	_nv_rd08
	mov	x8, x0
	lsl	w0, w0, #9
	str	w0, [x19]
	cbz	w8, LBB0_12
; %bb.8:
Lloh2:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh3:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh4:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_12
; %bb.9:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_12
; %bb.10:
	mov	w22, #0
LBB0_11:                                ; =>This Inner Loop Header: Depth=1
	add	w1, w22, #1792, lsl #12         ; =7340032
	mov	x0, x19
	bl	_nv_rd08
	mov	x2, x0
	mov	x0, x19
	mov	x1, x22
	bl	_nv_wo08
	add	w22, w22, #1
	ldr	w8, [x19]
	cmp	w22, w8
	b.lt	LBB0_11
LBB0_12:
	ldr	x8, [x20]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ge	LBB0_14
; %bb.13:
	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
LBB0_14:
	mov	x0, x19
	mov	w1, #5888
	mov	x2, x21
	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
	b	_nv_wr32
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_50,8,3                      ; @NV_50
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_nouveau_bios_shadow_pramin
.subsections_via_symbols
