	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_create_memory              ## -- Begin function agp_create_memory
	.p2align	4, 0x90
_agp_create_memory:                     ## @agp_create_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
	movl	%edi, %r14d
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movl	$24, %edi
	callq	_kzalloc
	testq	%rax, %rax
	je	LBB0_7
## %bb.1:
	movq	%rax, %rbx
	xorl	%eax, %eax
	callq	_agp_get_key
	movq	%rax, (%rbx)
	testq	%rax, %rax
	js	LBB0_6
## %bb.2:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	imull	%r14d, %edi
	movq	%rbx, %rsi
	callq	_agp_alloc_page_array
	cmpq	$0, 16(%rbx)
	je	LBB0_5
## %bb.3:
	movl	%r14d, 8(%rbx)
	movq	_AGP_NORMAL_MEMORY@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 12(%rbx)
	jmp	LBB0_8
LBB0_5:
	movq	(%rbx), %rdi
	callq	_agp_free_key
LBB0_6:
	movq	%rbx, %rdi
	callq	_kfree
LBB0_7:
	xorl	%ebx, %ebx
LBB0_8:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_AGP_NORMAL_MEMORY,4,2          ## @AGP_NORMAL_MEMORY
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_create_memory              ; -- Begin function agp_create_memory
	.p2align	2
_agp_create_memory:                     ; @agp_create_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
	mov	x20, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	w0, #24
	bl	_kzalloc
	mov	x19, x0
	cbz	x0, LBB0_6
; %bb.1:
	bl	_agp_get_key
	str	x0, [x19]
	tbnz	x0, #63, LBB0_5
; %bb.2:
Lloh3:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	mul	w0, w8, w20
	mov	x1, x19
	bl	_agp_alloc_page_array
	ldr	x8, [x19, #16]
	cbz	x8, LBB0_4
; %bb.3:
Lloh6:
	adrp	x8, _AGP_NORMAL_MEMORY@GOTPAGE
Lloh7:
	ldr	x8, [x8, _AGP_NORMAL_MEMORY@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	stp	w20, w8, [x19, #8]
	b	LBB0_6
LBB0_4:
	ldr	x0, [x19]
	bl	_agp_free_key
LBB0_5:
	mov	x0, x19
	bl	_kfree
	mov	x19, #0
LBB0_6:
	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
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_AGP_NORMAL_MEMORY,4,2          ; @AGP_NORMAL_MEMORY
.subsections_via_symbols
