	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function agp_create_user_memory
_agp_create_user_memory:                ## @agp_create_user_memory
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	pushq	%r14
	pushq	%rbx
	.cfi_offset %rbx, -32
	.cfi_offset %r14, -24
	movq	_INT_MAX@GOTPCREL(%rip), %rax
	movslq	(%rax), %rax
	shrq	$3, %rax
	cmpq	%rdi, %rax
	jb	LBB0_9
## %bb.2:
	movq	%rdi, %r14
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_9
## %bb.3:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_agp_get_key
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_8
## %bb.4:
	shlq	$3, %r14
	movq	%r14, %rdi
	movq	%rbx, %rsi
	callq	_agp_alloc_page_array
	cmpq	$0, 16(%rbx)
	je	LBB0_7
## %bb.5:
	movq	$0, 8(%rbx)
	jmp	LBB0_10
LBB0_7:
	movq	(%rbx), %rdi
	callq	_agp_free_key
LBB0_8:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_INT_MAX,4,2                    ## @INT_MAX
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.no_dead_strip	_agp_create_user_memory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function agp_create_user_memory
_agp_create_user_memory:                ; @agp_create_user_memory
	.cfi_startproc
; %bb.0:
	stp	x20, x19, [sp, #-32]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 32
	stp	x29, x30, [sp, #16]             ; 16-byte Folded Spill
	add	x29, sp, #16
	.cfi_def_cfa w29, 16
	.cfi_offset w30, -8
	.cfi_offset w29, -16
	.cfi_offset w19, -24
	.cfi_offset w20, -32
Lloh0:
	adrp	x8, _INT_MAX@GOTPAGE
Lloh1:
	ldr	x8, [x8, _INT_MAX@GOTPAGEOFF]
Lloh2:
	ldrsw	x8, [x8]
	cmp	x0, x8, lsr #3
	b.hi	LBB0_7
; %bb.1:
	mov	x20, x0
Lloh3:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh4:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_8
; %bb.2:
	bl	_agp_get_key
	str	x0, [x19]
	tbnz	x0, #63, LBB0_6
; %bb.3:
	lsl	x0, x20, #3
	mov	x1, x19
	bl	_agp_alloc_page_array
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_5
; %bb.4:
	str	xzr, [x19, #8]
	b	LBB0_8
LBB0_5:
	ldr	x0, [x19]
	bl	_agp_free_key
LBB0_6:
	mov	x0, x19
	bl	_kfree
LBB0_7:
	mov	x19, #0
LBB0_8:
	mov	x0, x19
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.cfi_endproc
                                        ; -- End function
	.comm	_INT_MAX,4,2                    ; @INT_MAX
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.no_dead_strip	_agp_create_user_memory
.subsections_via_symbols
