	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvbios_imagen
_nvbios_imagen:                         ## @nvbios_imagen
	.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
	subq	$40, %rsp
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r14
	movq	16(%rsi), %rsi
	callq	_nvbios_rd16
	cmpl	$20054, %eax                    ## imm = 0x4E56
	je	LBB0_4
## %bb.1:
	cmpl	$43605, %eax                    ## imm = 0xAA55
	je	LBB0_4
## %bb.2:
	cmpl	$47991, %eax                    ## imm = 0xBB77
	jne	LBB0_3
LBB0_4:
	movq	16(%rbx), %rsi
	leaq	-56(%rbp), %rdx
	leaq	-52(%rbp), %rcx
	leaq	-48(%rbp), %r8
	movq	%r14, %rdi
	callq	_nvbios_pcirTp
	testl	%eax, %eax
	je	LBB0_5
## %bb.6:
	movl	-40(%rbp), %eax
	movl	%eax, 8(%rbx)
	movl	-48(%rbp), %ecx
	movl	%ecx, (%rbx)
	movl	-44(%rbp), %eax
	movl	%eax, 4(%rbx)
	movl	$1, %r15d
	movl	$1, %eax
	cmpl	$112, %ecx
	je	LBB0_10
## %bb.7:
	movq	16(%rbx), %rsi
	leaq	-32(%rbp), %rdx
	movq	%r14, %rdi
	callq	_nvbios_npdeTp
	testl	%eax, %eax
	je	LBB0_8
## %bb.9:
	movl	-28(%rbp), %eax
	movl	%eax, 8(%rbx)
	movl	-32(%rbp), %eax
LBB0_10:
	movl	%eax, 4(%rbx)
	jmp	LBB0_11
LBB0_5:
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_3:
	movq	16(%rbx), %rdx
	leaq	L_.str(%rip), %rsi
	movq	%r14, %rdi
	movl	%eax, %ecx
	callq	_nvkm_debug
	xorl	%r15d, %r15d
	jmp	LBB0_11
LBB0_8:
	movl	$1, %r15d
LBB0_11:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"%08x: ROM signature (%04x) unknown\n"

	.no_dead_strip	_nvbios_imagen
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvbios_imagen
_nvbios_imagen:                         ; @nvbios_imagen
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #64
	.cfi_def_cfa_offset 64
	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
	mov	x19, x1
	mov	x20, x0
	ldr	x1, [x1, #16]
	bl	_nvbios_rd16
	mov	w8, #20054
	cmp	w0, w8
	mov	w8, #43605
	ccmp	w0, w8, #4, ne
	mov	w8, #47991
	ccmp	w0, w8, #4, ne
	b.ne	LBB0_4
; %bb.1:
	ldr	x1, [x19, #16]
	add	x2, sp, #4
	mov	x3, sp
	add	x4, sp, #16
	mov	x0, x20
	bl	_nvbios_pcirTp
	cbz	w0, LBB0_9
; %bb.2:
	ldr	w8, [sp, #24]
	str	w8, [x19, #8]
	ldr	d0, [sp, #16]
	str	d0, [x19]
	fmov	w8, s0
	cmp	w8, #112
	b.ne	LBB0_5
; %bb.3:
	mov	w8, #1
	b	LBB0_7
LBB0_4:
	mov	x3, x0
	ldr	x2, [x19, #16]
Lloh0:
	adrp	x1, l_.str@PAGE
Lloh1:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x20
	bl	_nvkm_debug
	mov	w0, #0
	b	LBB0_9
LBB0_5:
	ldr	x1, [x19, #16]
	add	x2, sp, #8
	mov	x0, x20
	bl	_nvbios_npdeTp
	cbz	w0, LBB0_8
; %bb.6:
	ldp	w8, w9, [sp, #8]
	str	w9, [x19, #8]
LBB0_7:
	str	w8, [x19, #4]
LBB0_8:
	mov	w0, #1
LBB0_9:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #64
	ret
	.loh AdrpAdd	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"%08x: ROM signature (%04x) unknown\n"

	.no_dead_strip	_nvbios_imagen
.subsections_via_symbols
