	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ati_create_page_map
_ati_create_page_map:                   ## @ati_create_page_map
	.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
	movq	%rdi, %r13
	movq	_GFP_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	___get_free_page
	movq	%rax, (%r13)
	testq	%rax, %rax
	je	LBB0_1
## %bb.2:
	movq	%rax, %rdi
	movl	$1, %esi
	callq	_set_memory_uc
	movq	(%r13), %rdi
	callq	_virt_to_page
	movl	%eax, %edi
	callq	_map_page_into_agp
	movq	(%r13), %rsi
	movq	%rsi, 8(%r13)
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r15
	xorl	%ebx, %ebx
	cmpl	$8, (%r15)
	jb	LBB0_7
## %bb.3:
	movq	_agp_bridge@GOTPCREL(%rip), %r12
	movq	(%r12), %rax
	movl	(%rax), %edi
	callq	_writel
	movq	8(%r13), %rdi
	callq	_readl
	cmpl	$16, (%r15)
	jb	LBB0_7
## %bb.4:
	movl	$1, %ebx
	movl	$8, %r14d
	.p2align	4, 0x90
LBB0_5:                                 ## =>This Inner Loop Header: Depth=1
	movq	(%r12), %rax
	movl	(%rax), %edi
	movq	8(%r13), %rsi
	addq	%r14, %rsi
	callq	_writel
	movq	8(%r13), %rdi
	addq	%r14, %rdi
	callq	_readl
	incq	%rbx
	movslq	(%r15), %rax
	shrq	$3, %rax
	addq	$8, %r14
	cmpq	%rbx, %rax
	ja	LBB0_5
## %bb.6:
	xorl	%ebx, %ebx
	jmp	LBB0_7
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_7:
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_GFP_KERNEL,4,2                 ## @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_agp_bridge,8,3                 ## @agp_bridge
	.no_dead_strip	_ati_create_page_map
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ati_create_page_map
_ati_create_page_map:                   ; @ati_create_page_map
	.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	x19, x0
Lloh0:
	adrp	x8, _GFP_KERNEL@GOTPAGE
Lloh1:
	ldr	x8, [x8, _GFP_KERNEL@GOTPAGEOFF]
Lloh2:
	ldr	w0, [x8]
	bl	___get_free_page
	str	x0, [x19]
	cbz	x0, LBB0_6
; %bb.1:
	mov	w1, #1
	bl	_set_memory_uc
	ldr	x0, [x19]
	bl	_virt_to_page
	bl	_map_page_into_agp
	ldr	x1, [x19]
	str	x1, [x19, #8]
Lloh3:
	adrp	x20, _PAGE_SIZE@GOTPAGE
Lloh4:
	ldr	x20, [x20, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	cmp	w8, #8
	b.lo	LBB0_5
; %bb.2:
Lloh5:
	adrp	x21, _agp_bridge@GOTPAGE
Lloh6:
	ldr	x21, [x21, _agp_bridge@GOTPAGEOFF]
	ldr	x8, [x21]
	ldr	w0, [x8]
	bl	_writel
	ldr	x0, [x19, #8]
	bl	_readl
	ldr	w8, [x20]
	cmp	w8, #16
	b.lo	LBB0_5
; %bb.3:
	mov	w22, #1
	mov	w23, #8
LBB0_4:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x19, #8]
	ldr	x9, [x21]
	ldr	w0, [x9]
	add	x1, x8, x23
	bl	_writel
	ldr	x8, [x19, #8]
	add	x0, x8, x23
	bl	_readl
	add	x22, x22, #1
	ldrsw	x8, [x20]
	add	x23, x23, #8
	cmp	x22, x8, lsr #3
	b.lo	LBB0_4
LBB0_5:
	mov	w0, #0
	b	LBB0_7
LBB0_6:
Lloh7:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh8:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh9:
	ldr	w8, [x8]
	neg	w0, w8
LBB0_7:
	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 AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGot	Lloh5, Lloh6
	.loh AdrpLdrGotLdr	Lloh7, Lloh8, Lloh9
	.cfi_endproc
                                        ; -- End function
	.comm	_GFP_KERNEL,4,2                 ; @GFP_KERNEL
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_agp_bridge,8,3                 ; @agp_bridge
	.no_dead_strip	_ati_create_page_map
.subsections_via_symbols
