	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvkm_fault_oneinit_buffer
_nvkm_fault_oneinit_buffer:             ## @nvkm_fault_oneinit_buffer
	.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
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r12d
	movq	%rdi, %r15
	movq	16(%rdi), %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$32, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rbx
	leaq	16(%r15), %r13
	movq	%r15, 24(%rax)
	movl	%r12d, (%rax)
	movq	(%r15), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
	movq	8(%r15), %rax
	movslq	%r12d, %rdx
	movq	%rbx, (%rax,%rdx,8)
	movl	4(%rbx), %ecx
	leaq	L_.str(%rip), %rsi
	movq	%r13, %rdi
                                        ## kill: def $edx killed $edx killed $rdx
	callq	_nvkm_debug
	movq	_NVKM_MEM_TARGET_INST@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	(%r15), %rax
	movl	(%rax), %edx
	imull	4(%rbx), %edx
	movq	%rbx, %r9
	addq	$16, %r9
	movq	%r14, %rdi
	movl	$4096, %ecx                     ## imm = 0x1000
	movl	$1, %r8d
	callq	_nvkm_memory_new
	testl	%eax, %eax
	jne	LBB0_6
## %bb.3:
	movl	16(%rbx), %edi
	callq	_nvkm_memory_bar2
	movq	%rax, %rcx
	movq	%rax, 8(%rbx)
	xorl	%eax, %eax
	cmpq	$-1, %rcx
	jne	LBB0_6
## %bb.4:
	movq	_EFAULT@GOTPCREL(%rip), %rcx
	jmp	LBB0_5
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
LBB0_5:
	xorl	%eax, %eax
	subl	(%rcx), %eax
LBB0_6:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"buffer %d: %d entries\n"

	.comm	_NVKM_MEM_TARGET_INST,4,2       ## @NVKM_MEM_TARGET_INST
	.comm	_EFAULT,4,2                     ## @EFAULT
	.no_dead_strip	_nvkm_fault_oneinit_buffer
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvkm_fault_oneinit_buffer
_nvkm_fault_oneinit_buffer:             ; @nvkm_fault_oneinit_buffer
	.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
	mov	x22, x1
	mov	x21, x0
	mov	x23, x0
	ldr	x20, [x23, #16]!
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #32
	bl	_kzalloc
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	str	x21, [x0, #24]
	str	w22, [x0]
	ldr	x8, [x21]
	ldr	x8, [x8, #8]
	blr	x8
	ldr	x8, [x21, #8]
	str	x19, [x8, w22, sxtw #3]
	ldr	w3, [x19, #4]
Lloh3:
	adrp	x1, l_.str@PAGE
Lloh4:
	add	x1, x1, l_.str@PAGEOFF
	mov	x0, x23
	mov	x2, x22
	bl	_nvkm_debug
Lloh5:
	adrp	x8, _NVKM_MEM_TARGET_INST@GOTPAGE
Lloh6:
	ldr	x8, [x8, _NVKM_MEM_TARGET_INST@GOTPAGEOFF]
Lloh7:
	ldr	w1, [x8]
	ldr	w8, [x19, #4]
	ldr	x9, [x21]
	ldr	w9, [x9]
	mul	w2, w9, w8
	add	x5, x19, #16
	mov	x0, x20
	mov	w3, #4096
	mov	w4, #1
	bl	_nvkm_memory_new
	cbnz	w0, LBB0_7
; %bb.2:
	ldr	w0, [x19, #16]
	bl	_nvkm_memory_bar2
	str	x0, [x19, #8]
	cmn	x0, #1
	b.eq	LBB0_5
; %bb.3:
	mov	w0, #0
	b	LBB0_7
LBB0_4:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
	b	LBB0_6
LBB0_5:
Lloh10:
	adrp	x8, _EFAULT@GOTPAGE
Lloh11:
	ldr	x8, [x8, _EFAULT@GOTPAGEOFF]
LBB0_6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpAdd	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh8, Lloh9
	.loh AdrpLdrGot	Lloh10, Lloh11
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"buffer %d: %d entries\n"

	.comm	_NVKM_MEM_TARGET_INST,4,2       ; @NVKM_MEM_TARGET_INST
	.comm	_EFAULT,4,2                     ; @EFAULT
	.no_dead_strip	_nvkm_fault_oneinit_buffer
.subsections_via_symbols
