	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_generic_alloc_user         ## -- Begin function agp_generic_alloc_user
	.p2align	4, 0x90
_agp_generic_alloc_user:                ## @agp_generic_alloc_user
	.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
	.cfi_offset %rbx, -48
	.cfi_offset %r12, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%esi, %r14d
	movq	%rdi, %r12
	movq	_ENTRIES_PER_PAGE@GOTPCREL(%rip), %rax
	movq	(%rax), %rcx
	leaq	(%rdi,%rcx), %rax
	decq	%rax
	movq	%rax, %rdx
	orq	%rcx, %rdx
	shrq	$32, %rdx
	je	LBB0_1
## %bb.2:
	xorl	%edx, %edx
	divq	%rcx
	movq	%rax, %r15
	jmp	LBB0_3
LBB0_1:
                                        ## kill: def $eax killed $eax killed $rax
	xorl	%edx, %edx
	divl	%ecx
	movl	%eax, %r15d
LBB0_3:
	movq	%r12, %rdi
	callq	_agp_create_user_memory
	movq	%rax, %rbx
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	testq	%r12, %r12
	je	LBB0_6
## %bb.5:
	movq	16(%rbx), %rdi
	shlq	$3, %r12
	movq	%r12, %rsi
	callq	___bzero
LBB0_6:
	movq	$0, 8(%rbx)
	movl	%r14d, (%rbx)
	movl	%r15d, 4(%rbx)
LBB0_7:
	movq	%rbx, %rax
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENTRIES_PER_PAGE,8,3           ## @ENTRIES_PER_PAGE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_generic_alloc_user         ; -- Begin function agp_generic_alloc_user
	.p2align	2
_agp_generic_alloc_user:                ; @agp_generic_alloc_user
	.cfi_startproc
; %bb.0:
	stp	x22, x21, [sp, #-48]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 48
	stp	x20, x19, [sp, #16]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #32]             ; 16-byte Folded Spill
	add	x29, sp, #32
	.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	x19, x1
	mov	x21, x0
Lloh0:
	adrp	x8, _ENTRIES_PER_PAGE@GOTPAGE
Lloh1:
	ldr	x8, [x8, _ENTRIES_PER_PAGE@GOTPAGEOFF]
Lloh2:
	ldr	x22, [x8]
	bl	_agp_create_user_memory
	mov	x20, x0
	cbz	x0, LBB0_4
; %bb.1:
	add	x8, x21, x22
	sub	x8, x8, #1
	udiv	x22, x8, x22
	cbz	x21, LBB0_3
; %bb.2:
	ldr	x0, [x20, #16]
	lsl	x1, x21, #3
	bl	_bzero
LBB0_3:
	str	xzr, [x20, #8]
	stp	w19, w22, [x20]
LBB0_4:
	mov	x0, x20
	ldp	x29, x30, [sp, #32]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #16]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp], #48             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_ENTRIES_PER_PAGE,8,3           ; @ENTRIES_PER_PAGE
.subsections_via_symbols
