	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvbios_shadow                  ## -- Begin function nvbios_shadow
	.p2align	4, 0x90
_nvbios_shadow:                         ## @nvbios_shadow
	.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
	subq	$472, %rsp                      ## imm = 0x1D8
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r15
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	16(%rdi), %r14
	movq	16(%rdi), %rbx
	leaq	l___const.nvbios_shadow.mthds(%rip), %rsi
	leaq	-496(%rbp), %r13
	movl	$448, %edx                      ## imm = 0x1C0
	movq	%r13, %rdi
	callq	_memcpy
	movl	(%rbx), %edi
	leaq	L_.str(%rip), %rsi
	leaq	-500(%rbp), %rdx
	callq	_nvkm_stropt
	testq	%rax, %rax
	je	LBB0_5
## %bb.1:
	movl	-500(%rbp), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	callq	_kstrndup
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, %r12
	movq	_shadow_fw@GOTPCREL(%rip), %rax
	movq	%rax, -456(%rbp)
	movq	%r15, %rdi
	movq	%r13, %rsi
	movq	%r12, %rdx
	callq	_shadow_method
	movq	$0, -456(%rbp)
	cmpq	$0, -488(%rbp)
	jne	LBB0_15
## %bb.3:
	leaq	L_.str.1(%rip), %rsi
	movq	%r14, %rdi
	movq	%r12, %rdx
	xorl	%eax, %eax
	callq	_nvkm_error
	movq	%r12, %rdi
	callq	_kfree
	cmpq	$0, -488(%rbp)
	jne	LBB0_14
LBB0_5:
	cmpq	$0, -456(%rbp)
	je	LBB0_14
## %bb.6:
	leaq	-496(%rbp), %r13
	xorl	%r12d, %r12d
	movq	%r13, %rbx
	jmp	LBB0_9
	.p2align	4, 0x90
LBB0_7:                                 ##   in Loop: Header=BB0_9 Depth=1
	movq	%rax, %r13
LBB0_8:                                 ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, 96(%rbx)
	leaq	56(%rbx), %rbx
	je	LBB0_15
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	16(%rbx), %rax
	testq	%rax, %rax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	%rax, 8(%r13)
	jge	LBB0_8
LBB0_11:                                ##   in Loop: Header=BB0_9 Depth=1
	movq	%r15, %rdi
	movq	%rbx, %rsi
	xorl	%edx, %edx
	callq	_shadow_method
	testq	%rax, %rax
	je	LBB0_8
## %bb.12:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	8(%rbx), %rcx
	movq	%rbx, %rax
	cmpq	8(%r13), %rcx
	jg	LBB0_7
## %bb.13:                              ##   in Loop: Header=BB0_9 Depth=1
	movq	%r13, %rax
	jmp	LBB0_7
LBB0_14:
	xorl	%r12d, %r12d
LBB0_15:
	cmpq	$0, -456(%rbp)
	je	LBB0_20
## %bb.16:
	leaq	-496(%rbp), %rbx
	jmp	LBB0_18
	.p2align	4, 0x90
LBB0_17:                                ##   in Loop: Header=BB0_18 Depth=1
	cmpq	$0, 96(%rbx)
	leaq	56(%rbx), %rbx
	je	LBB0_20
LBB0_18:                                ## =>This Inner Loop Header: Depth=1
	cmpq	%r13, %rbx
	je	LBB0_17
## %bb.19:                              ##   in Loop: Header=BB0_18 Depth=1
	movq	24(%rbx), %rdi
	callq	_kfree
	jmp	LBB0_17
LBB0_20:
	cmpq	$0, 8(%r13)
	je	LBB0_24
## %bb.21:
	movq	40(%r13), %rax
	movq	%r12, %rdx
	testq	%rax, %rax
	je	LBB0_23
## %bb.22:
	movq	(%rax), %rdx
LBB0_23:
	leaq	L_.str.3(%rip), %rsi
	movq	%r14, %rdi
	callq	_nvkm_debug
	movq	24(%r13), %rax
	movq	%rax, (%r15)
	movl	32(%r13), %eax
	movl	%eax, 8(%r15)
	movq	%r12, %rdi
	callq	_kfree
	xorl	%ebx, %ebx
	jmp	LBB0_25
LBB0_24:
	leaq	L_.str.2(%rip), %rsi
	xorl	%ebx, %ebx
	movq	%r14, %rdi
	xorl	%eax, %eax
	callq	_nvkm_error
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %ebx
LBB0_25:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_27
## %bb.26:
	movl	%ebx, %eax
	addq	$472, %rsp                      ## imm = 0x1D8
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_27:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_nvbios_of,4,2                  ## @nvbios_of
	.comm	_nvbios_ramin,4,2               ## @nvbios_ramin
	.comm	_nvbios_rom,4,2                 ## @nvbios_rom
	.comm	_nvbios_acpi_fast,4,2           ## @nvbios_acpi_fast
	.comm	_nvbios_acpi_slow,4,2           ## @nvbios_acpi_slow
	.comm	_nvbios_pcirom,4,2              ## @nvbios_pcirom
	.comm	_nvbios_platform,4,2            ## @nvbios_platform
	.section	__DATA,__const
	.p2align	4                               ## @__const.nvbios_shadow.mthds
l___const.nvbios_shadow.mthds:
	.long	0                               ## 0x0
	.space	4
	.quad	_nvbios_of
	.quad	0                               ## 0x0
	.quad	0
	.long	0                               ## 0x0
	.space	4
	.quad	0
	.quad	0
	.long	0                               ## 0x0
	.space	4
	.quad	_nvbios_ramin
	.quad	0                               ## 0x0
	.quad	0
	.long	0                               ## 0x0
	.space	4
	.quad	0
	.quad	0
	.long	0                               ## 0x0
	.space	4
	.quad	_nvbios_rom
	.quad	0                               ## 0x0
	.quad	0
	.long	0                               ## 0x0
	.space	4
	.quad	0
	.quad	0
	.long	0                               ## 0x0
	.space	4
	.quad	_nvbios_acpi_fast
	.quad	0                               ## 0x0
	.quad	0
	.long	0                               ## 0x0
	.space	4
	.quad	0
	.quad	0
	.long	4                               ## 0x4
	.space	4
	.quad	_nvbios_acpi_slow
	.quad	0                               ## 0x0
	.quad	0
	.long	0                               ## 0x0
	.space	4
	.quad	0
	.quad	0
	.long	1                               ## 0x1
	.space	4
	.quad	_nvbios_pcirom
	.quad	0                               ## 0x0
	.quad	0
	.long	0                               ## 0x0
	.space	4
	.quad	0
	.quad	0
	.long	1                               ## 0x1
	.space	4
	.quad	_nvbios_platform
	.quad	0                               ## 0x0
	.quad	0
	.long	0                               ## 0x0
	.space	4
	.quad	0
	.quad	0
	.space	56

	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"NvBios"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_shadow_fw,8,3                  ## @shadow_fw
L_.str.1:                               ## @.str.1
	.asciz	"%s invalid\n"

L_.str.2:                               ## @.str.2
	.asciz	"unable to locate usable image\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"using image from %s\n"

.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvbios_shadow                  ; -- Begin function nvbios_shadow
	.p2align	2
_nvbios_shadow:                         ; @nvbios_shadow
	.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
	sub	sp, sp, #480
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	stur	x8, [x29, #-56]
	mov	x20, x0
	ldr	x21, [x20, #16]!
Lloh3:
	adrp	x1, l___const.nvbios_shadow.mthds@PAGE
Lloh4:
	add	x1, x1, l___const.nvbios_shadow.mthds@PAGEOFF
	add	x0, sp, #24
	mov	w2, #448
	bl	_memcpy
	ldr	w0, [x21]
Lloh5:
	adrp	x1, l_.str@PAGE
Lloh6:
	add	x1, x1, l_.str@PAGEOFF
	add	x2, sp, #20
	bl	_nvkm_stropt
	cbz	x0, LBB0_4
; %bb.1:
	ldr	w1, [sp, #20]
Lloh7:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh8:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh9:
	ldr	w2, [x8]
	bl	_kstrndup
	cbz	x0, LBB0_4
; %bb.2:
	mov	x21, x0
	add	x22, sp, #24
Lloh10:
	adrp	x8, _shadow_fw@GOTPAGE
Lloh11:
	ldr	x8, [x8, _shadow_fw@GOTPAGEOFF]
	str	x8, [sp, #64]
	add	x1, sp, #24
	mov	x0, x19
	mov	x2, x21
	bl	_shadow_method
	str	xzr, [sp, #64]
	ldr	x8, [sp, #32]
	cbnz	x8, LBB0_12
; %bb.3:
	str	x21, [sp]
Lloh12:
	adrp	x1, l_.str.1@PAGE
Lloh13:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x20
	bl	_nvkm_error
	mov	x0, x21
	bl	_kfree
	ldr	x8, [sp, #32]
	cbnz	x8, LBB0_13
LBB0_4:
	ldr	x8, [sp, #64]
	cbz	x8, LBB0_13
; %bb.5:
	add	x22, sp, #24
	add	x21, sp, #24
	b	LBB0_7
LBB0_6:                                 ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21, #96]
	add	x21, x21, #56
	cbz	x8, LBB0_11
LBB0_7:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21, #16]
	cbz	x8, LBB0_9
; %bb.8:                                ;   in Loop: Header=BB0_7 Depth=1
	ldr	x9, [x22, #8]
	cmp	x9, x8
	b.ge	LBB0_6
LBB0_9:                                 ;   in Loop: Header=BB0_7 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, #0
	bl	_shadow_method
	cbz	x0, LBB0_6
; %bb.10:                               ;   in Loop: Header=BB0_7 Depth=1
	ldr	x8, [x21, #8]
	ldr	x9, [x22, #8]
	cmp	x8, x9
	csel	x22, x21, x22, gt
	b	LBB0_6
LBB0_11:
	mov	x21, #0
LBB0_12:
	ldr	x8, [sp, #64]
	cbnz	x8, LBB0_14
	b	LBB0_18
LBB0_13:
	mov	x21, #0
	add	x22, sp, #24
	ldr	x8, [sp, #64]
	cbz	x8, LBB0_18
LBB0_14:
	add	x23, sp, #24
	b	LBB0_16
LBB0_15:                                ;   in Loop: Header=BB0_16 Depth=1
	ldr	x8, [x23, #96]
	add	x23, x23, #56
	cbz	x8, LBB0_18
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	cmp	x23, x22
	b.eq	LBB0_15
; %bb.17:                               ;   in Loop: Header=BB0_16 Depth=1
	ldr	x0, [x23, #24]
	bl	_kfree
	b	LBB0_15
LBB0_18:
	ldr	x8, [x22, #8]
	cbz	x8, LBB0_22
; %bb.19:
	ldr	x8, [x22, #40]
	mov	x2, x21
	cbz	x8, LBB0_21
; %bb.20:
	ldr	x2, [x8]
LBB0_21:
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x20
	bl	_nvkm_debug
	ldr	x8, [x22, #24]
	str	x8, [x19]
	ldr	w8, [x22, #32]
	str	w8, [x19, #8]
	mov	x0, x21
	bl	_kfree
	mov	w0, #0
	b	LBB0_23
LBB0_22:
Lloh16:
	adrp	x1, l_.str.2@PAGE
Lloh17:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x20
	bl	_nvkm_error
Lloh18:
	adrp	x8, _EINVAL@GOTPAGE
Lloh19:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh20:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_23:
	ldur	x8, [x29, #-56]
Lloh21:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh22:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh23:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_25
; %bb.24:
	add	sp, sp, #480
	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_25:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.loh AdrpAdd	Lloh12, Lloh13
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.loh AdrpAdd	Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh21, Lloh22, Lloh23
	.cfi_endproc
                                        ; -- End function
	.comm	_nvbios_of,4,2                  ; @nvbios_of
	.comm	_nvbios_ramin,4,2               ; @nvbios_ramin
	.comm	_nvbios_rom,4,2                 ; @nvbios_rom
	.comm	_nvbios_acpi_fast,4,2           ; @nvbios_acpi_fast
	.comm	_nvbios_acpi_slow,4,2           ; @nvbios_acpi_slow
	.comm	_nvbios_pcirom,4,2              ; @nvbios_pcirom
	.comm	_nvbios_platform,4,2            ; @nvbios_platform
	.section	__DATA,__const
	.p2align	3                               ; @__const.nvbios_shadow.mthds
l___const.nvbios_shadow.mthds:
	.long	0                               ; 0x0
	.space	4
	.quad	_nvbios_of
	.quad	0                               ; 0x0
	.quad	0
	.long	0                               ; 0x0
	.space	4
	.quad	0
	.quad	0
	.long	0                               ; 0x0
	.space	4
	.quad	_nvbios_ramin
	.quad	0                               ; 0x0
	.quad	0
	.long	0                               ; 0x0
	.space	4
	.quad	0
	.quad	0
	.long	0                               ; 0x0
	.space	4
	.quad	_nvbios_rom
	.quad	0                               ; 0x0
	.quad	0
	.long	0                               ; 0x0
	.space	4
	.quad	0
	.quad	0
	.long	0                               ; 0x0
	.space	4
	.quad	_nvbios_acpi_fast
	.quad	0                               ; 0x0
	.quad	0
	.long	0                               ; 0x0
	.space	4
	.quad	0
	.quad	0
	.long	4                               ; 0x4
	.space	4
	.quad	_nvbios_acpi_slow
	.quad	0                               ; 0x0
	.quad	0
	.long	0                               ; 0x0
	.space	4
	.quad	0
	.quad	0
	.long	1                               ; 0x1
	.space	4
	.quad	_nvbios_pcirom
	.quad	0                               ; 0x0
	.quad	0
	.long	0                               ; 0x0
	.space	4
	.quad	0
	.quad	0
	.long	1                               ; 0x1
	.space	4
	.quad	_nvbios_platform
	.quad	0                               ; 0x0
	.quad	0
	.long	0                               ; 0x0
	.space	4
	.quad	0
	.quad	0
	.space	56

	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"NvBios"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_shadow_fw,8,3                  ; @shadow_fw
l_.str.1:                               ; @.str.1
	.asciz	"%s invalid\n"

l_.str.2:                               ; @.str.2
	.asciz	"unable to locate usable image\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"using image from %s\n"

.subsections_via_symbols
