	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function nvidia_remove_memory
_nvidia_remove_memory:                  ## @nvidia_remove_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	%r13
	pushq	%r12
	pushq	%rbx
	pushq	%rax
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movl	%edx, %r14d
	movl	%esi, %r15d
	movq	%rdi, %rbx
	movl	8(%rdi), %edi
	movl	%edx, %esi
	callq	_agp_generic_type_to_mask_type
	testl	%eax, %eax
	jne	LBB0_2
## %bb.1:
	cmpl	%r14d, (%rbx)
	jne	LBB0_2
## %bb.3:
	xorl	%r14d, %r14d
	cmpl	$0, 4(%rbx)
	je	LBB0_8
## %bb.4:
	jle	LBB0_7
## %bb.5:
	movslq	%r15d, %r12
	movq	_nvidia_private@GOTPCREL(%rip), %r13
	movq	%r12, %r15
	.p2align	4, 0x90
LBB0_6:                                 ## =>This Inner Loop Header: Depth=1
	movq	_agp_bridge@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movl	16(%rax), %edi
	movq	8(%rax), %rsi
	addq	(%r13), %rsi
	addq	%r15, %rsi
	callq	_writel
	incq	%r15
	movslq	4(%rbx), %rax
	addq	%r12, %rax
	cmpq	%rax, %r15
	jl	LBB0_6
LBB0_7:
	movq	_agp_bridge@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
	movq	(%rax), %rax
	movq	%rbx, %rdi
	callq	*(%rax)
	jmp	LBB0_8
LBB0_2:
	movq	_EINVAL@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
LBB0_8:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_EINVAL,4,2                     ## @EINVAL
	.comm	_agp_bridge,8,3                 ## @agp_bridge
	.comm	_nvidia_private,8,3             ## @nvidia_private
	.no_dead_strip	_nvidia_remove_memory
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function nvidia_remove_memory
_nvidia_remove_memory:                  ; @nvidia_remove_memory
	.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
	mov	x21, x2
	mov	x20, x1
	mov	x19, x0
	ldr	w0, [x0, #8]
	mov	x1, x2
	bl	_agp_generic_type_to_mask_type
	cbnz	w0, LBB0_8
; %bb.1:
	ldr	w8, [x19]
	cmp	w8, w21
	b.ne	LBB0_8
; %bb.2:
	ldr	w8, [x19, #4]
	cbz	w8, LBB0_7
; %bb.3:
Lloh0:
	adrp	x21, _agp_bridge@GOTPAGE
Lloh1:
	ldr	x21, [x21, _agp_bridge@GOTPAGEOFF]
	cmp	w8, #1
	b.lt	LBB0_6
; %bb.4:
	sxtw	x22, w20
Lloh2:
	adrp	x23, _nvidia_private@GOTPAGE
Lloh3:
	ldr	x23, [x23, _nvidia_private@GOTPAGEOFF]
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x21]
	ldr	w0, [x8, #16]
	ldr	x8, [x8, #8]
	ldr	x9, [x23]
	add	x8, x8, x9
	add	x1, x22, x8
	bl	_writel
	add	x22, x22, #1
	ldrsw	x8, [x19, #4]
	add	x8, x8, w20, sxtw
	cmp	x22, x8
	b.lt	LBB0_5
LBB0_6:
	ldr	x8, [x21]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x19
	blr	x8
LBB0_7:
	mov	w0, #0
	b	LBB0_9
LBB0_8:
Lloh4:
	adrp	x8, _EINVAL@GOTPAGE
Lloh5:
	ldr	x8, [x8, _EINVAL@GOTPAGEOFF]
Lloh6:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_9:
	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
	.loh AdrpLdrGot	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.cfi_endproc
                                        ; -- End function
	.comm	_EINVAL,4,2                     ; @EINVAL
	.comm	_agp_bridge,8,3                 ; @agp_bridge
	.comm	_nvidia_private,8,3             ; @nvidia_private
	.no_dead_strip	_nvidia_remove_memory
.subsections_via_symbols
