	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function mxm_shadow_rom
_mxm_shadow_rom:                        ## @mxm_shadow_rom
	.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	$40, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r12
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -48(%rbp)
	movq	8(%rdi), %rax
	movq	(%rax), %rbx
	movq	8(%rax), %rdi
	movl	$1, %esi
	callq	_mxm_ddc_map
	andl	$15, %eax
	xorl	%r15d, %r15d
	cmpl	$15, %eax
	je	LBB0_8
## %bb.1:
	movq	%rbx, %rdi
	movl	%eax, %esi
	callq	_nvkm_i2c_bus_find
	testq	%rax, %rax
	je	LBB0_8
## %bb.2:
	movq	%rax, %r14
	movl	$84, %r13d
	xorl	%r15d, %r15d
	leaq	-80(%rbp), %rbx
	movq	%rax, %rdi
	movl	$84, %esi
	xorl	%edx, %edx
	movl	$6, %ecx
	movq	%rbx, %r8
	callq	_mxm_shadow_rom_fetch
	testq	%rax, %rax
	jne	LBB0_4
## %bb.3:
	movl	$86, %r13d
	leaq	-80(%rbp), %r8
	movq	%r14, %rdi
	movl	$86, %esi
	xorl	%edx, %edx
	movl	$6, %ecx
	callq	_mxm_shadow_rom_fetch
	testq	%rax, %rax
	je	LBB0_8
LBB0_4:
	movq	%rbx, (%r12)
	movq	%r12, %rdi
	callq	_mxms_headerlen
	movl	%eax, %r15d
	movq	%r12, %rdi
	callq	_mxms_structlen
	movl	%eax, %ebx
	addl	%r15d, %ebx
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	%ebx, %edi
	callq	_kmalloc
	movq	%rax, (%r12)
	xorl	%edi, %edi
	testq	%rax, %rax
	je	LBB0_7
## %bb.5:
	movq	%r14, %rdi
	movl	%r13d, %esi
	xorl	%edx, %edx
	movl	%ebx, %ecx
	movq	%rax, %r8
	callq	_mxm_shadow_rom_fetch
	movl	$1, %r15d
	testq	%rax, %rax
	jne	LBB0_8
## %bb.6:
	movq	(%r12), %rdi
LBB0_7:
	callq	_kfree
	movq	$0, (%r12)
	xorl	%r15d, %r15d
LBB0_8:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	cmpq	-48(%rbp), %rax
	jne	LBB0_10
## %bb.9:
	movl	%r15d, %eax
	addq	$40, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_10:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_mxm_shadow_rom
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function mxm_shadow_rom
_mxm_shadow_rom:                        ; @mxm_shadow_rom
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #80
	.cfi_def_cfa_offset 80
	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
	mov	x19, x0
Lloh0:
	adrp	x8, ___stack_chk_guard@GOTPAGE
Lloh1:
	ldr	x8, [x8, ___stack_chk_guard@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	str	x8, [sp, #24]
	ldr	x8, [x0, #8]
	ldp	x20, x0, [x8]
	mov	w1, #1
	bl	_mxm_ddc_map
	and	w1, w0, #0xf
	cmp	w1, #15
	b.ne	LBB0_2
; %bb.1:
	mov	w0, #0
	b	LBB0_10
LBB0_2:
	mov	x0, x20
	bl	_nvkm_i2c_bus_find
	cbz	x0, LBB0_10
; %bb.3:
	mov	x20, x0
	mov	w21, #84
	mov	x22, sp
	mov	x4, sp
	mov	w1, #84
	mov	w2, #0
	mov	w3, #6
	bl	_mxm_shadow_rom_fetch
	cbnz	x0, LBB0_5
; %bb.4:
	mov	w21, #86
	mov	x4, sp
	mov	x0, x20
	mov	w1, #86
	mov	w2, #0
	mov	w3, #6
	bl	_mxm_shadow_rom_fetch
	cbz	x0, LBB0_10
LBB0_5:
	str	x22, [x19]
	mov	x0, x19
	bl	_mxms_headerlen
	mov	x22, x0
	mov	x0, x19
	bl	_mxms_structlen
	add	w22, w0, w22
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x22
	bl	_kmalloc
	str	x0, [x19]
	cbz	x0, LBB0_9
; %bb.6:
	mov	x4, x0
	mov	x0, x20
	mov	x1, x21
	mov	w2, #0
	mov	x3, x22
	bl	_mxm_shadow_rom_fetch
	cbz	x0, LBB0_8
; %bb.7:
	mov	w0, #1
	b	LBB0_10
LBB0_8:
	ldr	x0, [x19]
LBB0_9:
	bl	_kfree
	mov	w0, #0
	str	xzr, [x19]
LBB0_10:
	ldr	x8, [sp, #24]
Lloh6:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh7:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_12
; %bb.11:
	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
	add	sp, sp, #80
	ret
LBB0_12:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_mxm_shadow_rom
.subsections_via_symbols
