	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_mxm_new_                  ## -- Begin function nvkm_mxm_new_
	.p2align	4, 0x90
_nvkm_mxm_new_:                         ## @nvkm_mxm_new_
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdx, %rbx
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	8(%rdi), %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$8, %edi
	callq	_kzalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %r15
	leaq	4(%rax), %rbx
	movq	_nvkm_mxm@GOTPCREL(%rip), %rdi
	movq	%r12, %rsi
	movl	%r14d, %edx
	movq	%rbx, %rcx
	callq	_nvkm_subdev_ctor
	leaq	-44(%rbp), %rsi
	leaq	-60(%rbp), %rdx
	movq	%r13, %rdi
	callq	_mxm_table
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rax, %r14
	movq	%r13, %rdi
	movq	%rax, %rsi
	callq	_nvbios_rd08
	movl	%eax, -44(%rbp)
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movq	%r12, -56(%rbp)                 ## 8-byte Spill
	movl	%eax, %edx
	sarl	$4, %edx
	andl	$15, %eax
	leaq	L_.str.1(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %ecx
	callq	_nvkm_info
	leaq	1(%r14), %rsi
	movq	%r13, %rdi
	callq	_nvbios_rd08
	leaq	L_.str.2(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_nvkm_debug
	addq	$2, %r14
	movq	%r13, %rdi
	movq	%r14, %rsi
	callq	_nvbios_rd08
	leaq	L_.str.3(%rip), %rsi
	movq	%rbx, %rdi
	movl	%eax, %edx
	xorl	%eax, %eax
	callq	_nvkm_debug
	movl	-44(%rbp), %esi
	movq	%r15, %rdi
	callq	_mxm_shadow
	testq	%rax, %rax
	je	LBB0_7
## %bb.6:
	leaq	L_.str.4(%rip), %rsi
	movq	%rbx, %rdi
	callq	_nvkm_warn
	jmp	LBB0_9
LBB0_4:
	leaq	L_.str(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%rbx, %rdi
	xorl	%eax, %eax
	callq	_nvkm_debug
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r12d, %r12d
	subl	(%rax), %r12d
LBB0_9:
	movl	%r12d, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_7:
	movq	%r15, %rdi
	callq	_mxms_version
	movq	%rbx, %r14
	movl	%eax, %ebx
	sarl	$8, %ebx
	movq	%r15, %rdi
	callq	_mxms_version
	movzbl	%al, %ecx
	leaq	L_.str.5(%rip), %rsi
	xorl	%r12d, %r12d
	movq	%r14, %rdi
	movl	%ebx, %edx
	xorl	%eax, %eax
	callq	_nvkm_debug
	movq	%r15, %rdi
	xorl	%esi, %esi
	xorl	%edx, %edx
	xorl	%ecx, %ecx
	callq	_mxms_foreach
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	movl	(%rax), %edi
	leaq	L_.str.6(%rip), %rsi
	movl	$1, %edx
	callq	_nvkm_boolopt
	testq	%rax, %rax
	je	LBB0_9
## %bb.8:
	movq	_MXM_SANITISE_DCB@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	orl	%eax, (%r15)
	jmp	LBB0_9
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_nvkm_mxm,4,2                   ## @nvkm_mxm
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"no VBIOS data, nothing to do\n"

L_.str.1:                               ## @.str.1
	.asciz	"BIOS version %d.%d\n"

L_.str.2:                               ## @.str.2
	.asciz	"module flags: %02x\n"

L_.str.3:                               ## @.str.3
	.asciz	"config flags: %02x\n"

L_.str.4:                               ## @.str.4
	.asciz	"failed to locate valid SIS\n"

L_.str.5:                               ## @.str.5
	.asciz	"MXMS Version %d.%d\n"

L_.str.6:                               ## @.str.6
	.asciz	"NvMXMDCB"

	.comm	_MXM_SANITISE_DCB,4,2           ## @MXM_SANITISE_DCB
	.comm	_EINVAL,4,2                     ## @EINVAL
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_mxm_new_                  ; -- Begin function nvkm_mxm_new_
	.p2align	2
_nvkm_mxm_new_:                         ; @nvkm_mxm_new_
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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	x21, x2
	mov	x23, x1
	mov	x20, x0
	ldr	x22, [x0, #8]
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #8
	bl	_kzalloc
	str	x0, [x21]
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	add	x21, x0, #4
Lloh3:
	adrp	x0, _nvkm_mxm@GOTPAGE
Lloh4:
	ldr	x0, [x0, _nvkm_mxm@GOTPAGEOFF]
	mov	x1, x20
	mov	x2, x23
	mov	x3, x21
	bl	_nvkm_subdev_ctor
	add	x1, sp, #28
	add	x2, sp, #24
	mov	x0, x22
	bl	_mxm_table
	cbz	x0, LBB0_5
; %bb.2:
	mov	x23, x0
	mov	x0, x22
	mov	x1, x23
	bl	_nvbios_rd08
	str	w0, [sp, #28]
	cbz	w0, LBB0_5
; %bb.3:
	asr	w2, w0, #4
	and	w3, w0, #0xf
Lloh5:
	adrp	x1, l_.str.1@PAGE
Lloh6:
	add	x1, x1, l_.str.1@PAGEOFF
	mov	x0, x21
	bl	_nvkm_info
	add	x1, x23, #1
	mov	x0, x22
	bl	_nvbios_rd08
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh7:
	adrp	x1, l_.str.2@PAGE
Lloh8:
	add	x1, x1, l_.str.2@PAGEOFF
	mov	x0, x21
	bl	_nvkm_debug
	add	x1, x23, #2
	mov	x0, x22
	bl	_nvbios_rd08
                                        ; kill: def $w0 killed $w0 def $x0
	str	x0, [sp]
Lloh9:
	adrp	x1, l_.str.3@PAGE
Lloh10:
	add	x1, x1, l_.str.3@PAGEOFF
	mov	x0, x21
	bl	_nvkm_debug
	ldr	w1, [sp, #28]
	mov	x0, x19
	bl	_mxm_shadow
	cbz	x0, LBB0_8
; %bb.4:
Lloh11:
	adrp	x1, l_.str.4@PAGE
Lloh12:
	add	x1, x1, l_.str.4@PAGEOFF
	mov	x0, x21
	bl	_nvkm_warn
	mov	w0, #0
	b	LBB0_7
LBB0_5:
Lloh13:
	adrp	x1, l_.str@PAGE
Lloh14:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x21
	bl	_nvkm_debug
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
LBB0_8:
	mov	x0, x19
	bl	_mxms_version
	asr	w22, w0, #8
	mov	x0, x19
	bl	_mxms_version
	and	w8, w0, #0xff
	stp	x22, x8, [sp]
Lloh18:
	adrp	x1, l_.str.5@PAGE
Lloh19:
	add	x1, x1, l_.str.5@PAGEOFF
	mov	x0, x21
	bl	_nvkm_debug
	mov	x0, x19
	mov	w1, #0
	mov	x2, #0
	mov	x3, #0
	bl	_mxms_foreach
	ldr	w0, [x20]
Lloh20:
	adrp	x1, l_.str.6@PAGE
Lloh21:
	add	x1, x1, l_.str.6@PAGEOFF
	mov	w2, #1
	bl	_nvkm_boolopt
	cbz	x0, LBB0_7
; %bb.9:
	mov	w0, #0
Lloh22:
	adrp	x8, _MXM_SANITISE_DCB@GOTPAGE
Lloh23:
	ldr	x8, [x8, _MXM_SANITISE_DCB@GOTPAGEOFF]
Lloh24:
	ldr	w8, [x8]
	ldr	w9, [x19]
	orr	w8, w9, w8
	str	w8, [x19]
	b	LBB0_7
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpAdd	Lloh9, Lloh10
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh5, Lloh6
	.loh AdrpAdd	Lloh11, Lloh12
	.loh AdrpAdd	Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh22, Lloh23, Lloh24
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_nvkm_mxm,4,2                   ; @nvkm_mxm
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"no VBIOS data, nothing to do\n"

l_.str.1:                               ; @.str.1
	.asciz	"BIOS version %d.%d\n"

l_.str.2:                               ; @.str.2
	.asciz	"module flags: %02x\n"

l_.str.3:                               ; @.str.3
	.asciz	"config flags: %02x\n"

l_.str.4:                               ; @.str.4
	.asciz	"failed to locate valid SIS\n"

l_.str.5:                               ; @.str.5
	.asciz	"MXMS Version %d.%d\n"

l_.str.6:                               ; @.str.6
	.asciz	"NvMXMDCB"

	.comm	_MXM_SANITISE_DCB,4,2           ; @MXM_SANITISE_DCB
	.comm	_EINVAL,4,2                     ; @EINVAL
.subsections_via_symbols
