	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function agp_backend_cleanup
_agp_backend_cleanup:                   ## @agp_backend_cleanup
	.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	%rdi, %rbx
	movq	(%rdi), %rax
	movq	32(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_2
## %bb.1:
	xorl	%eax, %eax
	callq	*%rcx
	movq	(%rbx), %rax
LBB0_2:
	movq	24(%rax), %rax
	testq	%rax, %rax
	je	LBB0_4
## %bb.3:
	movq	%rbx, %rdi
	callq	*%rax
LBB0_4:
	movq	16(%rbx), %rdi
	callq	_vfree
	movq	$0, 16(%rbx)
	movq	(%rbx), %rax
	cmpq	$0, (%rax)
	je	LBB0_9
## %bb.5:
	cmpq	$0, 16(%rax)
	je	LBB0_9
## %bb.6:
	movl	12(%rbx), %edi
	callq	_page_address
	movq	%rax, %r14
	movq	(%rbx), %rcx
	movq	8(%rcx), %rax
	testq	%rax, %rax
	je	LBB0_8
## %bb.7:
	movl	8(%rbx), %esi
	movl	12(%rbx), %edi
	callq	*%rax
	movq	(%rbx), %rcx
LBB0_8:
	movq	_AGP_PAGE_DESTROY_UNMAP@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r14, %rdi
	callq	*(%rcx)
	movq	(%rbx), %rax
	movq	(%rax), %rax
	movq	_AGP_PAGE_DESTROY_FREE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r14, %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmpq	*%rax                           ## TAILCALL
LBB0_9:
	popq	%rbx
	popq	%r14
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AGP_PAGE_DESTROY_UNMAP,4,2     ## @AGP_PAGE_DESTROY_UNMAP
	.comm	_AGP_PAGE_DESTROY_FREE,4,2      ## @AGP_PAGE_DESTROY_FREE
	.no_dead_strip	_agp_backend_cleanup
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function agp_backend_cleanup
_agp_backend_cleanup:                   ; @agp_backend_cleanup
	.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	x19, x0
	ldr	x8, [x0]
	ldr	x9, [x8, #32]
	cbz	x9, LBB0_2
; %bb.1:
	blr	x9
	ldr	x8, [x19]
LBB0_2:
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_4
; %bb.3:
	mov	x0, x19
	blr	x8
LBB0_4:
	ldr	x0, [x19, #16]
	bl	_vfree
	str	xzr, [x19, #16]
	ldr	x8, [x19]
	ldr	x9, [x8]
	cbz	x9, LBB0_9
; %bb.5:
	ldr	x8, [x8, #16]
	cbz	x8, LBB0_9
; %bb.6:
	ldr	w0, [x19, #12]
	bl	_page_address
	mov	x20, x0
	ldr	x8, [x19]
	ldr	x9, [x8, #8]
	cbz	x9, LBB0_8
; %bb.7:
	ldp	w1, w0, [x19, #8]
	blr	x9
	ldr	x8, [x19]
LBB0_8:
	ldr	x8, [x8]
Lloh0:
	adrp	x9, _AGP_PAGE_DESTROY_UNMAP@GOTPAGE
Lloh1:
	ldr	x9, [x9, _AGP_PAGE_DESTROY_UNMAP@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x9]
	mov	x0, x20
	blr	x8
	ldr	x8, [x19]
	ldr	x2, [x8]
Lloh3:
	adrp	x8, _AGP_PAGE_DESTROY_FREE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AGP_PAGE_DESTROY_FREE@GOTPAGEOFF]
Lloh5:
	ldr	w1, [x8]
	mov	x0, x20
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	br	x2
LBB0_9:
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.cfi_endproc
                                        ; -- End function
	.comm	_AGP_PAGE_DESTROY_UNMAP,4,2     ; @AGP_PAGE_DESTROY_UNMAP
	.comm	_AGP_PAGE_DESTROY_FREE,4,2      ; @AGP_PAGE_DESTROY_FREE
	.no_dead_strip	_agp_backend_cleanup
.subsections_via_symbols
