	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_memx_init                 ## -- Begin function nvkm_memx_init
	.p2align	4, 0x90
_nvkm_memx_init:                        ## @nvkm_memx_init
	.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	%r12
	pushq	%rbx
	subq	$32, %rsp
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %r15
	movq	%rdi, %r14
	movq	___stack_chk_guard@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	%rax, -40(%rbp)
	movq	(%rdi), %rbx
	movq	_PROC_MEMX@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	_MEMX_MSG_INFO@GOTPCREL(%rip), %rax
	movl	(%rax), %ecx
	movq	_MEMX_INFO_DATA@GOTPCREL(%rip), %rax
	movl	(%rax), %r8d
	leaq	-64(%rbp), %rsi
	xorl	%r9d, %r9d
	callq	_nvkm_pmu_send
	testl	%eax, %eax
	jne	LBB0_6
## %bb.1:
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	movq	%rax, (%r15)
	testq	%rax, %rax
	je	LBB0_2
## %bb.3:
	movq	%rax, %r12
	movq	%r14, 16(%rax)
	movl	-64(%rbp), %eax
	movl	%eax, (%r12)
	movq	-56(%rbp), %rax
	movq	%rax, 8(%r12)
	.p2align	4, 0x90
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	%rbx, %rdi
	movl	$1090944, %esi                  ## imm = 0x10A580
	movl	$3, %edx
	callq	_nvkm_wr32
	movq	%rbx, %rdi
	movl	$1090944, %esi                  ## imm = 0x10A580
	callq	_nvkm_rd32
	cmpl	$3, %eax
	jne	LBB0_4
## %bb.5:
	movl	$16777216, %edx                 ## imm = 0x1000000
	orl	(%r12), %edx
	movq	%rbx, %rdi
	movl	$1089984, %esi                  ## imm = 0x10A1C0
	callq	_nvkm_wr32
	xorl	%eax, %eax
	jmp	LBB0_6
LBB0_2:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	movq	___stack_chk_guard@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	cmpq	-40(%rbp), %rcx
	jne	LBB0_8
## %bb.7:
	addq	$32, %rsp
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_8:
	callq	___stack_chk_fail
	.cfi_endproc
                                        ## -- End function
	.comm	_PROC_MEMX,4,2                  ## @PROC_MEMX
	.comm	_MEMX_MSG_INFO,4,2              ## @MEMX_MSG_INFO
	.comm	_MEMX_INFO_DATA,4,2             ## @MEMX_INFO_DATA
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_nvkm_memx_init                 ; -- Begin function nvkm_memx_init
	.p2align	2
_nvkm_memx_init:                        ; @nvkm_memx_init
	.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	x21, x1
	mov	x20, 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	x19, [x0]
Lloh3:
	adrp	x8, _PROC_MEMX@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PROC_MEMX@GOTPAGEOFF]
Lloh5:
	ldr	w2, [x8]
Lloh6:
	adrp	x8, _MEMX_MSG_INFO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _MEMX_MSG_INFO@GOTPAGEOFF]
Lloh8:
	ldr	w3, [x8]
Lloh9:
	adrp	x8, _MEMX_INFO_DATA@GOTPAGE
Lloh10:
	ldr	x8, [x8, _MEMX_INFO_DATA@GOTPAGEOFF]
Lloh11:
	ldr	w4, [x8]
	add	x1, sp, #8
	mov	w5, #0
	bl	_nvkm_pmu_send
	cbnz	w0, LBB0_6
; %bb.1:
Lloh12:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh13:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh14:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	str	x0, [x21]
	cbz	x0, LBB0_5
; %bb.2:
	mov	x22, x0
	mov	w21, #42368
	movk	w21, #16, lsl #16
	ldr	x8, [sp, #8]
	str	w8, [x0]
	ldr	x8, [sp, #16]
	stp	x8, x20, [x0, #8]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	mov	x0, x19
	mov	w1, #42368
	movk	w1, #16, lsl #16
	mov	w2, #3
	bl	_nvkm_wr32
	mov	x0, x19
	mov	w1, #42368
	movk	w1, #16, lsl #16
	bl	_nvkm_rd32
	cmp	w0, #3
	b.ne	LBB0_3
; %bb.4:
	ldr	w8, [x22]
	orr	w2, w8, #0x1000000
	sub	w1, w21, #960
	mov	x0, x19
	bl	_nvkm_wr32
	mov	w0, #0
	b	LBB0_6
LBB0_5:
Lloh15:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh16:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh17:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_6:
	ldr	x8, [sp, #24]
Lloh18:
	adrp	x9, ___stack_chk_guard@GOTPAGE
Lloh19:
	ldr	x9, [x9, ___stack_chk_guard@GOTPAGEOFF]
Lloh20:
	ldr	x9, [x9]
	cmp	x9, x8
	b.ne	LBB0_8
; %bb.7:
	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_8:
	bl	___stack_chk_fail
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpLdrGotLdr	Lloh18, Lloh19, Lloh20
	.cfi_endproc
                                        ; -- End function
	.comm	_PROC_MEMX,4,2                  ; @PROC_MEMX
	.comm	_MEMX_MSG_INFO,4,2              ; @MEMX_MSG_INFO
	.comm	_MEMX_INFO_DATA,4,2             ; @MEMX_INFO_DATA
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
.subsections_via_symbols
