	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_agp_generic_destroy_pages      ## -- Begin function agp_generic_destroy_pages
	.p2align	4, 0x90
_agp_generic_destroy_pages:             ## @agp_generic_destroy_pages
	.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
	testq	%rdi, %rdi
	je	LBB0_4
## %bb.1:
	movq	%rdi, %r14
	cmpl	$0, (%rdi)
	jle	LBB0_4
## %bb.2:
	xorl	%ebx, %ebx
	movq	_agp_bridge@GOTPCREL(%rip), %r12
	.p2align	4, 0x90
LBB0_3:                                 ## =>This Inner Loop Header: Depth=1
	movq	8(%r14), %rax
	movq	(%rax,%rbx,8), %r15
	movq	%r15, %rdi
	callq	_unmap_page_from_agp
	movq	%r15, %rdi
	callq	_put_page
	movq	%r15, %rdi
	callq	___free_page
	movq	(%r12), %rdi
	callq	_atomic_dec
	movq	8(%r14), %rax
	movq	$0, (%rax,%rbx,8)
	incq	%rbx
	movslq	(%r14), %rax
	cmpq	%rax, %rbx
	jl	LBB0_3
LBB0_4:
	popq	%rbx
	popq	%r12
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.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_pages      ; -- Begin function agp_generic_destroy_pages
	.p2align	2
_agp_generic_destroy_pages:             ; @agp_generic_destroy_pages
	.cfi_startproc
; %bb.0:
	stp	x24, x23, [sp, #-64]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 64
	stp	x22, x21, [sp, #16]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #32]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #48]             ; 16-byte Folded Spill
	add	x29, sp, #48
	.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
	.cfi_offset w23, -56
	.cfi_offset w24, -64
	cbz	x0, LBB0_4
; %bb.1:
	mov	x19, x0
	ldr	w8, [x0]
	cmp	w8, #1
	b.lt	LBB0_4
; %bb.2:
	mov	x21, #0
Lloh0:
	adrp	x22, _agp_bridge@GOTPAGE
Lloh1:
	ldr	x22, [x22, _agp_bridge@GOTPAGEOFF]
LBB0_3:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	lsl	x23, x21, #3
	ldr	x20, [x8, x23]
	mov	x0, x20
	bl	_unmap_page_from_agp
	mov	x0, x20
	bl	_put_page
	mov	x0, x20
	bl	___free_page
	ldr	x0, [x22]
	bl	_atomic_dec
	ldr	x8, [x19, #8]
	str	xzr, [x8, x23]
	add	x21, x21, #1
	ldrsw	x8, [x19]
	cmp	x21, x8
	b.lt	LBB0_3
LBB0_4:
	ldp	x29, x30, [sp, #48]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #32]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #16]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp], #64             ; 16-byte Folded Reload
	ret
	.loh AdrpLdrGot	Lloh0, Lloh1
	.cfi_endproc
                                        ; -- End function
	.comm	_agp_bridge,8,3                 ; @agp_bridge
.subsections_via_symbols
