	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nouveau_bios_shadow
_nouveau_bios_shadow:                   ## @nouveau_bios_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	$424, %rsp                      ## imm = 0x1A8
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	leaq	-448(%rbp), %r14
	movl	$400, %esi                      ## imm = 0x190
	movq	%r14, %rdi
	callq	___bzero
	leaq	L_.str(%rip), %rax
	movq	%rax, -448(%rbp)
	movq	_nouveau_bios_shadow_pramin@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -440(%rbp)
	movq	$1, -432(%rbp)
	leaq	L_.str.1(%rip), %rax
	movq	%rax, -368(%rbp)
	movq	_nouveau_bios_shadow_prom@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -360(%rbp)
	leaq	L_.str.2(%rip), %rax
	movq	%rax, -288(%rbp)
	movq	_nouveau_bios_shadow_acpi@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -280(%rbp)
	movq	$1, -272(%rbp)
	leaq	L_.str.3(%rip), %rax
	movq	%rax, -208(%rbp)
	movq	_nouveau_bios_shadow_pci@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, -200(%rbp)
	movq	$1, -192(%rbp)
	movq	%r13, %rdi
	callq	_nv_device
	movl	8(%rax), %edi
	leaq	L_.str.4(%rip), %rsi
	leaq	-452(%rbp), %rdx
	callq	_nouveau_stropt
	testq	%rax, %rax
	je	LBB0_8
## %bb.1:
	movl	-452(%rbp), %esi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rcx
	movl	(%rcx), %edx
	movq	%rax, %rdi
	callq	_kstrndup
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r15
	leaq	-432(%rbp), %r12
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_3:                                 ##   in Loop: Header=BB0_4 Depth=1
	cmpq	$0, 112(%r12)
	leaq	80(%r12), %r12
	je	LBB0_6
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rbx
	movq	%r15, %rdi
	movq	%rbx, %rsi
	callq	_strcasecmp
	testq	%rax, %rax
	jne	LBB0_3
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r13, %rdi
	leaq	L_.str.5(%rip), %rsi
	movq	%rbx, %rdx
	callq	_nv_info
	movq	%r13, %rdi
	callq	*32(%r12)
	movl	12(%r12), %esi
	movq	%r13, %rdi
	callq	_nouveau_bios_score
	movl	%eax, 8(%r12)
	testl	%eax, %eax
	je	LBB0_3
	jmp	LBB0_19
LBB0_6:
	movq	%r13, %rdi
	callq	_nv_device
	movq	(%rax), %rdx
	leaq	-464(%rbp), %rdi
	movq	%r15, %rsi
	callq	_request_firmware
	testl	%eax, %eax
	je	LBB0_18
LBB0_7:
	leaq	L_.str.7(%rip), %rsi
	movq	%r13, %rdi
	movq	%r15, %rdx
	xorl	%eax, %eax
	callq	_nv_error
	movq	%r15, %rdi
	callq	_kfree
LBB0_8:
	leaq	-432(%rbp), %rbx
	leaq	L_.str.8(%rip), %r15
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%rbx), %rdx
	movq	%r13, %rdi
	movq	%r15, %rsi
	callq	_nv_info
	movq	%r13, %rdi
	callq	*32(%rbx)
	movl	12(%rbx), %esi
	movq	%r13, %rdi
	callq	_nouveau_bios_score
	movl	%eax, 8(%rbx)
	movl	8(%r13), %ecx
	movl	%ecx, 24(%rbx)
	movq	(%r13), %rcx
	movq	%rcx, 16(%rbx)
	movq	$0, (%r13)
	cmpl	$3, %eax
	je	LBB0_11
## %bb.10:                              ##   in Loop: Header=BB0_9 Depth=1
	cmpq	$0, 112(%rbx)
	leaq	80(%rbx), %rbx
	jne	LBB0_9
LBB0_11:
	movq	%r14, %rbx
	jmp	LBB0_13
	.p2align	4, 0x90
LBB0_12:                                ##   in Loop: Header=BB0_13 Depth=1
	cmpq	$0, 128(%rbx)
	leaq	80(%rbx), %rbx
	je	LBB0_15
LBB0_13:                                ## =>This Inner Loop Header: Depth=1
	movl	24(%rbx), %eax
	cmpl	24(%r14), %eax
	jle	LBB0_12
## %bb.14:                              ##   in Loop: Header=BB0_13 Depth=1
	movq	32(%r14), %rdi
	callq	_kfree
	movq	%rbx, %r14
	jmp	LBB0_12
LBB0_15:
	cmpl	$0, 24(%r14)
	je	LBB0_17
## %bb.16:
	movq	16(%r14), %rdx
	leaq	L_.str.9(%rip), %rsi
	movq	%r13, %rdi
	callq	_nv_info
	movl	40(%r14), %eax
	movl	%eax, 8(%r13)
	movq	32(%r14), %rax
	movq	%rax, (%r13)
	jmp	LBB0_20
LBB0_17:
	leaq	L_.str.10(%rip), %rsi
	xorl	%r14d, %r14d
	movq	%r13, %rdi
	xorl	%eax, %eax
	callq	_nv_error
	movq	_EINVAL@GOTPCREL(%rip), %rax
	subl	(%rax), %r14d
	jmp	LBB0_21
LBB0_18:
	movq	-464(%rbp), %rax
	movl	(%rax), %esi
	movl	%esi, 8(%r13)
	movl	4(%rax), %edi
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	callq	_kmemdup
	movq	%rax, (%r13)
	movq	-464(%rbp), %rdi
	callq	_release_firmware
	leaq	L_.str.6(%rip), %rsi
	movq	%r13, %rdi
	movq	%r15, %rdx
	callq	_nv_info
	movq	%r13, %rdi
	movl	$1, %esi
	callq	_nouveau_bios_score
	testl	%eax, %eax
	je	LBB0_23
LBB0_19:
	movq	%r15, %rdi
	callq	_kfree
LBB0_20:
	xorl	%r14d, %r14d
LBB0_21:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_24
## %bb.22:
	movl	%r14d, %eax
	addq	$424, %rsp                      ## imm = 0x1A8
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_23:
	movq	(%r13), %rdi
	callq	_kfree
	movq	$0, (%r13)
	jmp	LBB0_7
LBB0_24:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"PRAMIN"

	.comm	_nouveau_bios_shadow_pramin,4,2 ## @nouveau_bios_shadow_pramin
L_.str.1:                               ## @.str.1
	.asciz	"PROM"

	.comm	_nouveau_bios_shadow_prom,4,2   ## @nouveau_bios_shadow_prom
L_.str.2:                               ## @.str.2
	.asciz	"ACPI"

	.comm	_nouveau_bios_shadow_acpi,4,2   ## @nouveau_bios_shadow_acpi
L_.str.3:                               ## @.str.3
	.asciz	"PCIROM"

	.comm	_nouveau_bios_shadow_pci,4,2    ## @nouveau_bios_shadow_pci
L_.str.4:                               ## @.str.4
	.asciz	"NvBios"

	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
L_.str.5:                               ## @.str.5
	.asciz	"source: %s\n"

L_.str.6:                               ## @.str.6
	.asciz	"image: %s\n"

L_.str.7:                               ## @.str.7
	.asciz	"source '%s' invalid\n"

L_.str.8:                               ## @.str.8
	.asciz	"checking %s for image...\n"

L_.str.9:                               ## @.str.9
	.asciz	"using image from %s\n"

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

	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_nouveau_bios_shadow_of,4,2     ## @nouveau_bios_shadow_of
	.no_dead_strip	_nouveau_bios_shadow
.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
_nouveau_bios_shadow:                   ; @nouveau_bios_shadow
	.cfi_startproc
; %bb.0:
	stp	x28, x27, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	.cfi_offset w27, -72
	.cfi_offset w28, -80
	sub	sp, sp, #432
	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, #-72]
	add	x8, sp, #24
	add	x9, x8, #8
	str	xzr, [x9, #384]
	movi.2d	v0, #0000000000000000
	stp	q0, q0, [x9, #352]
	stp	q0, q0, [x9, #320]
	stp	q0, q0, [x9, #288]
	stp	q0, q0, [x9, #256]
	stur	q0, [x8, #248]
	stur	q0, [x8, #232]
	stur	q0, [x8, #216]
	stur	q0, [x8, #200]
	stur	q0, [x8, #184]
	stur	q0, [x8, #168]
	stur	q0, [x8, #152]
	stur	q0, [x8, #136]
	stur	q0, [x8, #120]
	stp	q0, q0, [sp, #112]
	stp	q0, q0, [sp, #80]
	stp	q0, q0, [sp, #48]
	stur	q0, [sp, #32]
Lloh3:
	adrp	x9, l_.str@PAGE
Lloh4:
	add	x9, x9, l_.str@PAGEOFF
	str	x9, [sp, #24]
Lloh5:
	adrp	x9, _nouveau_bios_shadow_pramin@GOTPAGE
Lloh6:
	ldr	x9, [x9, _nouveau_bios_shadow_pramin@GOTPAGEOFF]
Lloh7:
	ldr	w9, [x9]
	str	w9, [sp, #32]
	mov	w9, #1
	str	x9, [sp, #40]
Lloh8:
	adrp	x10, l_.str.1@PAGE
Lloh9:
	add	x10, x10, l_.str.1@PAGEOFF
	str	x10, [sp, #104]
Lloh10:
	adrp	x10, _nouveau_bios_shadow_prom@GOTPAGE
Lloh11:
	ldr	x10, [x10, _nouveau_bios_shadow_prom@GOTPAGEOFF]
Lloh12:
	ldr	w10, [x10]
	str	w10, [sp, #112]
Lloh13:
	adrp	x10, l_.str.2@PAGE
Lloh14:
	add	x10, x10, l_.str.2@PAGEOFF
Lloh15:
	adrp	x11, _nouveau_bios_shadow_acpi@GOTPAGE
Lloh16:
	ldr	x11, [x11, _nouveau_bios_shadow_acpi@GOTPAGEOFF]
	str	x10, [x8, #160]
Lloh17:
	ldr	w10, [x11]
	str	x9, [x8, #176]
Lloh18:
	adrp	x11, l_.str.3@PAGE
Lloh19:
	add	x11, x11, l_.str.3@PAGEOFF
	str	x11, [x8, #240]
Lloh20:
	adrp	x11, _nouveau_bios_shadow_pci@GOTPAGE
Lloh21:
	ldr	x11, [x11, _nouveau_bios_shadow_pci@GOTPAGEOFF]
Lloh22:
	ldr	w11, [x11]
	str	w10, [sp, #192]
	str	w11, [sp, #272]
	str	x9, [x8, #256]
	bl	_nv_device
	ldr	w0, [x0, #8]
Lloh23:
	adrp	x1, l_.str.4@PAGE
Lloh24:
	add	x1, x1, l_.str.4@PAGEOFF
	add	x2, sp, #12
	bl	_nouveau_stropt
	cbz	x0, LBB0_8
; %bb.1:
	ldr	w1, [sp, #12]
Lloh25:
	adrp	x23, _GFP_KERNEL@GOTPAGE
Lloh26:
	ldr	x23, [x23, _GFP_KERNEL@GOTPAGEOFF]
	ldr	w2, [x23]
	bl	_kstrndup
	cbz	x0, LBB0_8
; %bb.2:
	mov	x20, x0
	add	x8, sp, #24
	add	x24, x8, #128
Lloh27:
	adrp	x21, l_.str.5@PAGE
Lloh28:
	add	x21, x21, l_.str.5@PAGEOFF
	b	LBB0_4
LBB0_3:                                 ;   in Loop: Header=BB0_4 Depth=1
	ldr	x8, [x24], #80
	cbz	x8, LBB0_6
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldur	x22, [x24, #-112]
	mov	x0, x20
	mov	x1, x22
	bl	_strcasecmp
	cbnz	x0, LBB0_3
; %bb.5:                                ;   in Loop: Header=BB0_4 Depth=1
	mov	x0, x19
	mov	x1, x21
	mov	x2, x22
	bl	_nv_info
	ldur	x8, [x24, #-80]
	mov	x0, x19
	blr	x8
	ldur	w1, [x24, #-100]
	mov	x0, x19
	bl	_nouveau_bios_score
	stur	w0, [x24, #-104]
	cbz	w0, LBB0_3
	b	LBB0_19
LBB0_6:
	mov	x0, x19
	bl	_nv_device
	ldr	x2, [x0]
	add	x0, sp, #16
	mov	x1, x20
	bl	_request_firmware
	cbz	w0, LBB0_18
LBB0_7:
	str	x20, [sp]
Lloh29:
	adrp	x1, l_.str.7@PAGE
Lloh30:
	add	x1, x1, l_.str.7@PAGEOFF
	mov	x0, x19
	bl	_nv_error
	mov	x0, x20
	bl	_kfree
LBB0_8:
	add	x21, sp, #24
Lloh31:
	adrp	x20, l_.str.8@PAGE
Lloh32:
	add	x20, x20, l_.str.8@PAGEOFF
LBB0_9:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x2, [x21, #16]
	mov	x0, x19
	mov	x1, x20
	bl	_nv_info
	ldr	x8, [x21, #48]
	mov	x0, x19
	blr	x8
	ldr	w1, [x21, #28]
	mov	x0, x19
	bl	_nouveau_bios_score
	str	w0, [x21, #24]
	ldr	w8, [x19, #8]
	str	w8, [x21, #40]
	ldr	x8, [x19]
	str	x8, [x21, #32]
	str	xzr, [x19]
	cmp	w0, #3
	b.eq	LBB0_11
; %bb.10:                               ;   in Loop: Header=BB0_9 Depth=1
	ldr	x8, [x21, #128]
	add	x21, x21, #80
	cbnz	x8, LBB0_9
LBB0_11:
	add	x20, sp, #24
	add	x21, sp, #24
	b	LBB0_13
LBB0_12:                                ;   in Loop: Header=BB0_13 Depth=1
	ldr	x8, [x21, #128]
	add	x21, x21, #80
	cbz	x8, LBB0_15
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldr	w8, [x21, #24]
	ldr	w9, [x20, #24]
	cmp	w8, w9
	b.le	LBB0_12
; %bb.14:                               ;   in Loop: Header=BB0_13 Depth=1
	ldr	x0, [x20, #32]
	bl	_kfree
	mov	x20, x21
	b	LBB0_12
LBB0_15:
	ldr	w8, [x20, #24]
	cbz	w8, LBB0_17
; %bb.16:
	ldr	x2, [x20, #16]
Lloh33:
	adrp	x1, l_.str.9@PAGE
Lloh34:
	add	x1, x1, l_.str.9@PAGEOFF
	mov	x0, x19
	bl	_nv_info
	mov	w0, #0
	ldr	w8, [x20, #40]
	str	w8, [x19, #8]
	ldr	x8, [x20, #32]
	str	x8, [x19]
	b	LBB0_20
LBB0_17:
Lloh35:
	adrp	x1, l_.str.10@PAGE
Lloh36:
	add	x1, x1, l_.str.10@PAGEOFF
	mov	x0, x19
	bl	_nv_error
Lloh37:
	adrp	x8, _EINVAL@GOTPAGE
Lloh38:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh39:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_20
LBB0_18:
	ldr	x8, [sp, #16]
	ldr	w1, [x8]
	str	w1, [x19, #8]
	ldr	w0, [x8, #4]
	ldr	w2, [x23]
	bl	_kmemdup
	str	x0, [x19]
	ldr	x0, [sp, #16]
	bl	_release_firmware
Lloh40:
	adrp	x1, l_.str.6@PAGE
Lloh41:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	x0, x19
	mov	x2, x20
	bl	_nv_info
	mov	x0, x19
	mov	w1, #1
	bl	_nouveau_bios_score
	cbz	w0, LBB0_22
LBB0_19:
	mov	x0, x20
	bl	_kfree
	mov	w0, #0
LBB0_20:
	ldur	x8, [x29, #-72]
Lloh42:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh43:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh44:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_23
; %bb.21:
	add	sp, sp, #432
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_22:
	ldr	x0, [x19]
	bl	_kfree
	str	xzr, [x19]
	b	LBB0_7
LBB0_23:
	bl	___stack_chk_fail
	.loh AdrpAdd	Lloh23, Lloh24
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh10, Lloh11, Lloh12
	.loh AdrpAdd	Lloh8, Lloh9
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh25, Lloh26
	.loh AdrpAdd	Lloh27, Lloh28
	.loh AdrpAdd	Lloh29, Lloh30
	.loh AdrpAdd	Lloh31, Lloh32
	.loh AdrpAdd	Lloh33, Lloh34
	.loh AdrpLdrGotLdr	Lloh37, Lloh38, Lloh39
	.loh AdrpAdd	Lloh35, Lloh36
	.loh AdrpAdd	Lloh40, Lloh41
	.loh AdrpLdrGotLdr	Lloh42, Lloh43, Lloh44
	.cfi_endproc
                                        ; -- End function
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"PRAMIN"

	.comm	_nouveau_bios_shadow_pramin,4,2 ; @nouveau_bios_shadow_pramin
l_.str.1:                               ; @.str.1
	.asciz	"PROM"

	.comm	_nouveau_bios_shadow_prom,4,2   ; @nouveau_bios_shadow_prom
l_.str.2:                               ; @.str.2
	.asciz	"ACPI"

	.comm	_nouveau_bios_shadow_acpi,4,2   ; @nouveau_bios_shadow_acpi
l_.str.3:                               ; @.str.3
	.asciz	"PCIROM"

	.comm	_nouveau_bios_shadow_pci,4,2    ; @nouveau_bios_shadow_pci
l_.str.4:                               ; @.str.4
	.asciz	"NvBios"

	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
l_.str.5:                               ; @.str.5
	.asciz	"source: %s\n"

l_.str.6:                               ; @.str.6
	.asciz	"image: %s\n"

l_.str.7:                               ; @.str.7
	.asciz	"source '%s' invalid\n"

l_.str.8:                               ; @.str.8
	.asciz	"checking %s for image...\n"

l_.str.9:                               ; @.str.9
	.asciz	"using image from %s\n"

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

	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_nouveau_bios_shadow_of,4,2     ; @nouveau_bios_shadow_of
	.no_dead_strip	_nouveau_bios_shadow
.subsections_via_symbols
