	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function intel_fake_agp_alloc_by_type
_intel_fake_agp_alloc_by_type:          ## @intel_fake_agp_alloc_by_type
	.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
	movq	%rdi, %r14
	movq	_AGP_DCACHE_MEMORY@GOTPCREL(%rip), %r15
	cmpl	%esi, (%r15)
	jne	LBB0_5
## %bb.1:
	movq	_INTEL_GTT_GEN@GOTPCREL(%rip), %rax
	cmpl	$1, (%rax)
	jne	LBB0_5
## %bb.2:
	movq	_intel_private@GOTPCREL(%rip), %rax
	cmpq	%r14, (%rax)
	jne	LBB0_9
## %bb.3:
	movl	$1, %edi
	callq	_agp_create_memory
	testq	%rax, %rax
	je	LBB0_9
## %bb.4:
	movq	%rax, %rbx
	movl	(%r15), %eax
	movl	%eax, (%rbx)
	movq	%r14, 8(%rbx)
	movq	$0, 16(%rbx)
	movq	%rbx, %rdi
	callq	_agp_free_page_array
	jmp	LBB0_10
LBB0_5:
	movq	_AGP_PHYS_MEMORY@GOTPCREL(%rip), %rax
	cmpl	%esi, (%rax)
	jne	LBB0_9
## %bb.6:
	movq	%r14, %rdi
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_alloc_agpphysmem_i8xx          ## TAILCALL
LBB0_9:
	xorl	%ebx, %ebx
LBB0_10:
	movq	%rbx, %rax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_AGP_DCACHE_MEMORY,4,2          ## @AGP_DCACHE_MEMORY
	.comm	_INTEL_GTT_GEN,4,2              ## @INTEL_GTT_GEN
	.comm	_intel_private,8,3              ## @intel_private
	.comm	_AGP_PHYS_MEMORY,4,2            ## @AGP_PHYS_MEMORY
	.no_dead_strip	_intel_fake_agp_alloc_by_type
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function intel_fake_agp_alloc_by_type
_intel_fake_agp_alloc_by_type:          ; @intel_fake_agp_alloc_by_type
	.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
	mov	x19, x0
Lloh0:
	adrp	x21, _AGP_DCACHE_MEMORY@GOTPAGE
Lloh1:
	ldr	x21, [x21, _AGP_DCACHE_MEMORY@GOTPAGEOFF]
	ldr	w8, [x21]
Lloh2:
	adrp	x9, _INTEL_GTT_GEN@GOTPAGE
Lloh3:
	ldr	x9, [x9, _INTEL_GTT_GEN@GOTPAGEOFF]
Lloh4:
	ldr	w9, [x9]
	cmp	w8, w1
	ccmp	w9, #1, #0, eq
	b.eq	LBB0_3
; %bb.1:
Lloh5:
	adrp	x8, _AGP_PHYS_MEMORY@GOTPAGE
Lloh6:
	ldr	x8, [x8, _AGP_PHYS_MEMORY@GOTPAGEOFF]
Lloh7:
	ldr	w8, [x8]
	cmp	w8, w1
	b.ne	LBB0_6
; %bb.2:
	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	_alloc_agpphysmem_i8xx
LBB0_3:
Lloh8:
	adrp	x8, _intel_private@GOTPAGE
Lloh9:
	ldr	x8, [x8, _intel_private@GOTPAGEOFF]
Lloh10:
	ldr	x8, [x8]
	cmp	x8, x19
	b.ne	LBB0_6
; %bb.4:
	mov	w0, #1
	bl	_agp_create_memory
	mov	x20, x0
	cbz	x0, LBB0_7
; %bb.5:
	ldr	w8, [x21]
	str	w8, [x20]
	stp	x19, xzr, [x20, #8]
	mov	x0, x20
	bl	_agp_free_page_array
	b	LBB0_7
LBB0_6:
	mov	x20, #0
LBB0_7:
	mov	x0, x20
	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
	.loh AdrpLdrGotLdr	Lloh2, Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_AGP_DCACHE_MEMORY,4,2          ; @AGP_DCACHE_MEMORY
	.comm	_INTEL_GTT_GEN,4,2              ; @INTEL_GTT_GEN
	.comm	_intel_private,8,3              ; @intel_private
	.comm	_AGP_PHYS_MEMORY,4,2            ; @AGP_PHYS_MEMORY
	.no_dead_strip	_intel_fake_agp_alloc_by_type
.subsections_via_symbols
