	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_bios_shadow_prom
_nouveau_bios_shadow_prom:              ## @nouveau_bios_shadow_prom
	.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), %rax
	movq	_NV_50@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	movl	$6224, %eax                     ## imm = 0x1850
	movl	$557136, %r14d                  ## imm = 0x88050
	cmovll	%eax, %r14d
	movq	%r12, %rdi
	movl	%r14d, %esi
	movl	$1, %edx
	xorl	%ecx, %ecx
	callq	_nv_mask
	movl	%eax, %r15d
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.1:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.2:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.3:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.4:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.5:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.6:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.7:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.8:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.9:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.10:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.11:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.12:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.13:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.14:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.15:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_17
## %bb.16:
	movq	%r12, %rdi
	movl	$3145728, %esi                  ## imm = 0x300000
	callq	_nv_rd08
	cmpl	$85, %eax
	je	LBB0_27
LBB0_17:
	movq	%r12, %rdi
	movl	$3145729, %esi                  ## imm = 0x300001
	callq	_nv_rd08
	cmpl	$170, %eax
	jne	LBB0_27
## %bb.18:
	movq	%r12, %rdi
	movl	$3145752, %esi                  ## imm = 0x300018
	callq	_nv_rd08
	movl	%eax, %r13d
	movq	%r12, %rdi
	movl	$3145753, %esi                  ## imm = 0x300019
	callq	_nv_rd08
	movl	%eax, %ebx
	shll	$8, %ebx
	orl	%r13d, %ebx
	leal	3145728(%rbx), %esi
	movq	%r12, %rdi
	callq	_nv_rd08
	cmpl	$80, %eax
	jne	LBB0_27
## %bb.19:
	leal	3145729(%rbx), %esi
	movq	%r12, %rdi
	callq	_nv_rd08
	cmpl	$67, %eax
	jne	LBB0_27
## %bb.20:
	leal	3145730(%rbx), %esi
	movq	%r12, %rdi
	callq	_nv_rd08
	cmpl	$73, %eax
	jne	LBB0_27
## %bb.21:
	addl	$3145731, %ebx                  ## imm = 0x300003
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_nv_rd08
	cmpl	$82, %eax
	jne	LBB0_27
## %bb.22:
	movq	%r12, %rdi
	movl	$3145730, %esi                  ## imm = 0x300002
	callq	_nv_rd08
	movl	%eax, %edi
	shll	$9, %edi
	movl	%edi, (%r12)
	testl	%eax, %eax
	je	LBB0_27
## %bb.23:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_kmalloc
	movq	%rax, 8(%r12)
	testq	%rax, %rax
	je	LBB0_27
## %bb.24:
	cmpl	$0, (%r12)
	jle	LBB0_27
## %bb.25:
	xorl	%ebx, %ebx
	.p2align	4, 0x90
LBB0_26:                                ## =>This Inner Loop Header: Depth=1
	leal	3145728(%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_26
LBB0_27:
	movq	%r12, %rdi
	movl	%r14d, %esi
	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_prom
.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_prom
_nouveau_bios_shadow_prom:              ; @nouveau_bios_shadow_prom
	.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
Lloh0:
	adrp	x8, _NV_50@GOTPAGE
Lloh1:
	ldr	x8, [x8, _NV_50@GOTPAGEOFF]
	ldr	x9, [x0]
Lloh2:
	ldr	x8, [x8]
	cmp	x9, x8
	mov	w8, #32848
	movk	w8, #8, lsl #16
	mov	w9, #6224
	csel	w20, w9, w8, lt
	mov	x0, x19
	mov	x1, x20
	mov	w2, #1
	mov	w3, #0
	bl	_nv_mask
	mov	x21, x0
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.1:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.2:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.3:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.4:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.5:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.6:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.7:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.8:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.9:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.10:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.11:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.12:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.13:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.14:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.15:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_17
; %bb.16:
	mov	x0, x19
	mov	w1, #3145728
	bl	_nv_rd08
	cmp	w0, #85
	b.eq	LBB0_27
LBB0_17:
	mov	w23, #1
	movk	w23, #48, lsl #16
	mov	x0, x19
	mov	w1, #1
	movk	w1, #48, lsl #16
	bl	_nv_rd08
	cmp	w0, #170
	b.ne	LBB0_27
; %bb.18:
	add	w1, w23, #23
	mov	x0, x19
	bl	_nv_rd08
	mov	x22, x0
	add	w1, w23, #24
	mov	x0, x19
	bl	_nv_rd08
	orr	w22, w22, w0, lsl #8
	add	w1, w22, #768, lsl #12          ; =3145728
	mov	x0, x19
	bl	_nv_rd08
	cmp	w0, #80
	b.ne	LBB0_27
; %bb.19:
	add	w1, w22, w23
	mov	x0, x19
	bl	_nv_rd08
	cmp	w0, #67
	b.ne	LBB0_27
; %bb.20:
	add	w22, w23, w22
	add	w1, w22, #1
	mov	x0, x19
	bl	_nv_rd08
	cmp	w0, #73
	b.ne	LBB0_27
; %bb.21:
	add	w1, w22, #2
	mov	x0, x19
	bl	_nv_rd08
	cmp	w0, #82
	b.ne	LBB0_27
; %bb.22:
	add	w1, w23, #1
	mov	x0, x19
	bl	_nv_rd08
	mov	x8, x0
	lsl	w0, w0, #9
	str	w0, [x19]
	cbz	w8, LBB0_27
; %bb.23:
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	bl	_kmalloc
	str	x0, [x19, #8]
	cbz	x0, LBB0_27
; %bb.24:
	ldr	w8, [x19]
	cmp	w8, #1
	b.lt	LBB0_27
; %bb.25:
	mov	w22, #0
LBB0_26:                                ; =>This Inner Loop Header: Depth=1
	add	w1, w22, #768, lsl #12          ; =3145728
	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_26
LBB0_27:
	mov	x0, x19
	mov	x1, x20
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_NV_50,8,3                      ; @NV_50
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_nouveau_bios_shadow_prom
.subsections_via_symbols
