	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_generic_destroy_page       ## -- Begin function agp_generic_destroy_page
	.p2align	4, 0x90
_agp_generic_destroy_page:              ## @agp_generic_destroy_page
	.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
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movl	%esi, %r14d
	movq	%rdi, %rbx
	movq	_AGP_PAGE_DESTROY_UNMAP@GOTPCREL(%rip), %rax
	testl	%esi, (%rax)
	je	LBB0_3
## %bb.2:
	movq	%rbx, %rdi
	callq	_unmap_page_from_agp
LBB0_3:
	movq	_AGP_PAGE_DESTROY_FREE@GOTPCREL(%rip), %rax
	testl	%r14d, (%rax)
	je	LBB0_4
## %bb.5:
	movq	%rbx, %rdi
	callq	_put_page
	movq	%rbx, %rdi
	callq	___free_page
	movq	_agp_bridge@GOTPCREL(%rip), %rax
	movq	(%rax), %rdi
	popq	%rbx
	popq	%r14
	popq	%rbp
	jmp	_atomic_dec                     ## TAILCALL
LBB0_4:
	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
	.comm	_agp_bridge,8,3                 ## @agp_bridge
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_generic_destroy_page       ; -- Begin function agp_generic_destroy_page
	.p2align	2
_agp_generic_destroy_page:              ; @agp_generic_destroy_page
	.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
	cbz	x0, LBB0_5
; %bb.1:
	mov	x20, x1
	mov	x19, x0
Lloh0:
	adrp	x8, _AGP_PAGE_DESTROY_UNMAP@GOTPAGE
Lloh1:
	ldr	x8, [x8, _AGP_PAGE_DESTROY_UNMAP@GOTPAGEOFF]
Lloh2:
	ldr	w8, [x8]
	tst	w8, w1
	b.eq	LBB0_3
; %bb.2:
	mov	x0, x19
	bl	_unmap_page_from_agp
LBB0_3:
Lloh3:
	adrp	x8, _AGP_PAGE_DESTROY_FREE@GOTPAGE
Lloh4:
	ldr	x8, [x8, _AGP_PAGE_DESTROY_FREE@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	tst	w8, w20
	b.eq	LBB0_5
; %bb.4:
	mov	x0, x19
	bl	_put_page
	mov	x0, x19
	bl	___free_page
Lloh6:
	adrp	x8, _agp_bridge@GOTPAGE
Lloh7:
	ldr	x8, [x8, _agp_bridge@GOTPAGEOFF]
Lloh8:
	ldr	x0, [x8]
	ldp	x29, x30, [sp, #16]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp], #32             ; 16-byte Folded Reload
	b	_atomic_dec
LBB0_5:
	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	_AGP_PAGE_DESTROY_UNMAP,4,2     ; @AGP_PAGE_DESTROY_UNMAP
	.comm	_AGP_PAGE_DESTROY_FREE,4,2      ; @AGP_PAGE_DESTROY_FREE
	.comm	_agp_bridge,8,3                 ; @agp_bridge
.subsections_via_symbols
