	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_free_memory                ## -- Begin function agp_free_memory
	.p2align	4, 0x90
_agp_free_memory:                       ## @agp_free_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	%r15
	pushq	%r14
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	testq	%rdi, %rdi
	je	LBB0_14
## %bb.1:
	movq	%rdi, %r15
	cmpq	$0, 40(%rdi)
	je	LBB0_3
## %bb.2:
	movq	%r15, %rdi
	callq	_agp_unbind_memory
LBB0_3:
	movq	(%r15), %rax
	movq	_AGP_USER_TYPES@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jge	LBB0_15
## %bb.4:
	testq	%rax, %rax
	je	LBB0_5
## %bb.16:
	movq	32(%r15), %rax
	movq	(%rax), %rax
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmpq	*16(%rax)                       ## TAILCALL
LBB0_14:
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_15:
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_agp_generic_free_by_type       ## TAILCALL
LBB0_5:
	cmpq	$0, 8(%r15)
	je	LBB0_13
## %bb.6:
	movq	32(%r15), %rax
	movq	(%rax), %rax
	movq	8(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_7
## %bb.17:
	movq	%r15, %rdi
	callq	*%rcx
	jmp	LBB0_13
LBB0_7:
	movq	24(%r15), %rcx
	movl	(%rcx), %edi
	movq	_AGP_PAGE_DESTROY_UNMAP@GOTPCREL(%rip), %r14
	movl	(%r14), %esi
	callq	*(%rax)
	movq	8(%r15), %rax
	cmpq	$2, %rax
	jb	LBB0_10
## %bb.8:
	movl	$1, %ebx
	.p2align	4, 0x90
LBB0_9:                                 ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movq	32(%r15), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rbx,4), %edi
	movl	(%r14), %esi
	callq	*(%rcx)
	incq	%rbx
	movq	8(%r15), %rax
	cmpq	%rax, %rbx
	jb	LBB0_9
LBB0_10:
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	xorl	%ebx, %ebx
	movq	_AGP_PAGE_DESTROY_FREE@GOTPCREL(%rip), %r14
	.p2align	4, 0x90
LBB0_12:                                ## =>This Inner Loop Header: Depth=1
	movq	24(%r15), %rax
	movq	32(%r15), %rcx
	movq	(%rcx), %rcx
	movl	(%rax,%rbx,4), %edi
	movl	(%r14), %esi
	callq	*(%rcx)
	incq	%rbx
	cmpq	8(%r15), %rbx
	jb	LBB0_12
LBB0_13:
	movl	16(%r15), %edi
	callq	_agp_free_key
	movq	%r15, %rdi
	callq	_agp_free_page_array
	movq	%r15, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_kfree                          ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_AGP_USER_TYPES,8,3             ## @AGP_USER_TYPES
	.comm	_AGP_PAGE_DESTROY_UNMAP,4,2     ## @AGP_PAGE_DESTROY_UNMAP
	.comm	_AGP_PAGE_DESTROY_FREE,4,2      ## @AGP_PAGE_DESTROY_FREE
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_free_memory                ; -- Begin function agp_free_memory
	.p2align	2
_agp_free_memory:                       ; @agp_free_memory
	.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
	cbz	x0, LBB0_6
; %bb.1:
	mov	x19, x0
	ldr	x8, [x0, #40]
	cbz	x8, LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_agp_unbind_memory
LBB0_3:
	ldr	x8, [x19]
Lloh0:
	adrp	x9, _AGP_USER_TYPES@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AGP_USER_TYPES@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ge	LBB0_7
; %bb.4:
	cbz	x8, LBB0_8
; %bb.5:
	ldr	x8, [x19, #32]
	ldr	x8, [x8]
	ldr	x1, [x8, #16]
	mov	x0, x19
	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
	br	x1
LBB0_6:
	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
LBB0_7:
	mov	x0, x19
	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
	b	_agp_generic_free_by_type
LBB0_8:
	ldr	x8, [x19, #8]
	cbz	x8, LBB0_17
; %bb.9:
	ldr	x8, [x19, #32]
	ldr	x9, [x8]
	ldr	x8, [x9, #8]
	cbz	x8, LBB0_11
; %bb.10:
	mov	x0, x19
	blr	x8
	b	LBB0_17
LBB0_11:
	ldr	x8, [x9]
	ldr	x9, [x19, #24]
	ldr	w0, [x9]
Lloh3:
	adrp	x20, _AGP_PAGE_DESTROY_UNMAP@GOTPAGE
Lloh4:
	ldr	x20, [x20, _AGP_PAGE_DESTROY_UNMAP@GOTPAGEOFF]
	ldr	w1, [x20]
	blr	x8
	ldr	x8, [x19, #8]
	cmp	x8, #2
	b.lo	LBB0_14
; %bb.12:
	mov	w21, #1
LBB0_13:                                ; =>This Inner Loop Header: Depth=1
	ldp	x9, x8, [x19, #24]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w0, [x9, x21, lsl #2]
	ldr	w1, [x20]
	blr	x8
	add	x21, x21, #1
	ldr	x8, [x19, #8]
	cmp	x21, x8
	b.lo	LBB0_13
LBB0_14:
	cbz	x8, LBB0_17
; %bb.15:
	mov	x20, #0
Lloh5:
	adrp	x21, _AGP_PAGE_DESTROY_FREE@GOTPAGE
Lloh6:
	ldr	x21, [x21, _AGP_PAGE_DESTROY_FREE@GOTPAGEOFF]
LBB0_16:                                ; =>This Inner Loop Header: Depth=1
	ldp	x9, x8, [x19, #24]
	ldr	x8, [x8]
	ldr	x8, [x8]
	ldr	w0, [x9, x20, lsl #2]
	ldr	w1, [x21]
	blr	x8
	add	x20, x20, #1
	ldr	x8, [x19, #8]
	cmp	x20, x8
	b.lo	LBB0_16
LBB0_17:
	ldr	w0, [x19, #16]
	bl	_agp_free_key
	mov	x0, x19
	bl	_agp_free_page_array
	mov	x0, x19
	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
	b	_kfree
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_AGP_USER_TYPES,8,3             ; @AGP_USER_TYPES
	.comm	_AGP_PAGE_DESTROY_UNMAP,4,2     ; @AGP_PAGE_DESTROY_UNMAP
	.comm	_AGP_PAGE_DESTROY_FREE,4,2      ; @AGP_PAGE_DESTROY_FREE
.subsections_via_symbols
