	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function agp_backend_initialize
_agp_backend_initialize:                ## @agp_backend_initialize
	.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, %rbx
	xorl	%r12d, %r12d
	xorl	%eax, %eax
	callq	_agp_find_max
	movl	%eax, 64(%rbx)
	movq	_agp_current_version@GOTPCREL(%rip), %rax
	movq	%rax, 56(%rbx)
	movq	8(%rbx), %rcx
	cmpq	$0, 24(%rcx)
	je	LBB0_9
## %bb.1:
	movq	%rbx, %rdi
	callq	*72(%rcx)
	testq	%rax, %rax
	je	LBB0_5
## %bb.2:
	movq	%rax, 16(%rbx)
	movq	8(%rbx), %rcx
	movq	64(%rcx), %rcx
	testq	%rcx, %rcx
	je	LBB0_6
## %bb.3:
	leaq	24(%rbx), %r14
	movq	%rax, %rdi
	movq	%r14, %rsi
	callq	*%rcx
	testq	%rax, %rax
	je	LBB0_7
## %bb.4:
	movq	40(%rbx), %rdi
	leaq	L_.str.1(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	movl	(%rax), %r14d
	xorl	%r13d, %r13d
	xorl	%r12d, %r12d
	jmp	LBB0_21
LBB0_5:
	movq	40(%rbx), %rdi
	leaq	L_.str(%rip), %rsi
	callq	_dev_err
	movq	_ENOMEM@GOTPCREL(%rip), %rax
	xorl	%r14d, %r14d
	subl	(%rax), %r14d
	jmp	LBB0_27
LBB0_6:
	movq	%rax, %rdi
	callq	_page_to_phys
	movl	%eax, %esi
	movl	%eax, 24(%rbx)
	jmp	LBB0_8
LBB0_7:
	movl	(%r14), %esi
LBB0_8:
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	xorl	%edx, %edx
	callq	*56(%rax)
	movl	%eax, 48(%rbx)
	movq	8(%rbx), %rcx
LBB0_9:
	xorl	%eax, %eax
	callq	*(%rcx)
	movq	_EINVAL@GOTPCREL(%rip), %r15
	testl	%eax, %eax
	je	LBB0_12
## %bb.10:
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*48(%rax)
	movq	_ENOMEM@GOTPCREL(%rip), %r14
	testq	%rax, %rax
	je	LBB0_13
## %bb.11:
	leaq	L_.str.3(%rip), %rsi
	xorl	%r13d, %r13d
LBB0_17:
	movq	%r14, %r15
	jmp	LBB0_18
LBB0_12:
	leaq	L_.str.2(%rip), %rsi
	xorl	%r13d, %r13d
	jmp	LBB0_18
LBB0_13:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %r13
	movl	(%r13), %edi
	shll	$2, %edi
	callq	_vmalloc
	movq	%rax, (%rbx)
	testq	%rax, %rax
	je	LBB0_16
## %bb.14:
	movl	(%r13), %edx
	shll	$2, %edx
	xorl	%r14d, %r14d
	movq	%rax, %rdi
	xorl	%esi, %esi
	callq	_memset
	movq	8(%rbx), %rcx
	xorl	%eax, %eax
	callq	*40(%rcx)
	testq	%rax, %rax
	je	LBB0_28
## %bb.15:
	movl	$1, %r13d
	leaq	L_.str.5(%rip), %rsi
	movl	$1, %r12d
LBB0_18:
	movq	40(%rbx), %rdi
	callq	_dev_err
	movl	(%r15), %r14d
	movq	8(%rbx), %rax
	cmpq	$0, 24(%rax)
	je	LBB0_21
## %bb.19:
	movq	32(%rax), %rcx
	testq	%rcx, %rcx
	je	LBB0_21
## %bb.20:
	movq	16(%rbx), %rdi
	movl	24(%rbx), %esi
	callq	*%rcx
LBB0_21:
	movq	8(%rbx), %rax
	cmpq	$0, 24(%rax)
	je	LBB0_23
## %bb.22:
	movq	16(%rbx), %rdi
	callq	_page_address
	movq	%rax, %r15
	movq	8(%rbx), %rax
	movq	_AGP_PAGE_DESTROY_UNMAP@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	callq	*16(%rax)
	movq	8(%rbx), %rax
	movq	_AGP_PAGE_DESTROY_FREE@GOTPCREL(%rip), %rcx
	movl	(%rcx), %esi
	movq	%r15, %rdi
	callq	*16(%rax)
LBB0_23:
	testl	%r13d, %r13d
	je	LBB0_25
## %bb.24:
	movq	8(%rbx), %rax
	movq	%rbx, %rdi
	callq	*8(%rax)
LBB0_25:
	negl	%r14d
	testl	%r12d, %r12d
	je	LBB0_27
## %bb.26:
	movq	(%rbx), %rdi
	callq	_vfree
	movq	$0, (%rbx)
LBB0_27:
	movl	%r14d, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_16:
	movl	$1, %r13d
	leaq	L_.str.4(%rip), %rsi
	jmp	LBB0_17
LBB0_28:
	leaq	32(%rbx), %rdi
	callq	_INIT_LIST_HEAD
	addq	$28, %rbx
	movq	%rbx, %rdi
	callq	_spin_lock_init
	jmp	LBB0_27
	.cfi_endproc
                                        ## -- End function
	.comm	_agp_current_version,4,2        ## @agp_current_version
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"can't get memory for scratch page\n"

	.comm	_ENOMEM,4,2                     ## @ENOMEM
L_.str.1:                               ## @.str.1
	.asciz	"unable to dma-map scratch page\n"

L_.str.2:                               ## @.str.2
	.asciz	"can't determine aperture size\n"

	.comm	_EINVAL,4,2                     ## @EINVAL
L_.str.3:                               ## @.str.3
	.asciz	"can't get memory for graphics translation table\n"

	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
L_.str.4:                               ## @.str.4
	.asciz	"can't allocate memory for key lists\n"

L_.str.5:                               ## @.str.5
	.asciz	"error configuring host chipset\n"

	.comm	_AGP_PAGE_DESTROY_UNMAP,4,2     ## @AGP_PAGE_DESTROY_UNMAP
	.comm	_AGP_PAGE_DESTROY_FREE,4,2      ## @AGP_PAGE_DESTROY_FREE
	.no_dead_strip	_agp_backend_initialize
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function agp_backend_initialize
_agp_backend_initialize:                ; @agp_backend_initialize
	.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
	bl	_agp_find_max
	str	w0, [x19, #64]
Lloh0:
	adrp	x8, _agp_current_version@GOTPAGE
Lloh1:
	ldr	x8, [x8, _agp_current_version@GOTPAGEOFF]
	str	x8, [x19, #56]
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_9
; %bb.1:
	ldr	x8, [x8, #72]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_5
; %bb.2:
	str	x0, [x19, #16]
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #64]
	cbz	x8, LBB0_6
; %bb.3:
	add	x20, x19, #24
	mov	x1, x20
	blr	x8
	cbz	x0, LBB0_7
; %bb.4:
	ldr	x0, [x19, #40]
Lloh2:
	adrp	x1, l_.str.1@PAGE
Lloh3:
	add	x1, x1, l_.str.1@PAGEOFF
	bl	_dev_err
	mov	w22, #0
	mov	w21, #0
Lloh4:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh5:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh6:
	ldr	w23, [x8]
	b	LBB0_20
LBB0_5:
	ldr	x0, [x19, #40]
Lloh7:
	adrp	x1, l_.str@PAGE
Lloh8:
	add	x1, x1, l_.str@PAGEOFF
	bl	_dev_err
Lloh9:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh10:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	neg	w20, w8
	b	LBB0_26
LBB0_6:
	bl	_page_to_phys
	mov	x1, x0
	str	w0, [x19, #24]
	b	LBB0_8
LBB0_7:
	ldr	w1, [x20]
LBB0_8:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #56]
	mov	x0, x19
	mov	w2, #0
	blr	x8
	str	w0, [x19, #48]
	ldr	x8, [x19, #8]
LBB0_9:
	ldr	x8, [x8]
	blr	x8
	cbz	w0, LBB0_12
; %bb.10:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #48]
	mov	x0, x19
	blr	x8
	cbz	x0, LBB0_13
; %bb.11:
	mov	w22, #0
	mov	w21, #0
Lloh12:
	adrp	x20, _ENOMEM@GOTPAGE
Lloh13:
	ldr	x20, [x20, _ENOMEM@GOTPAGEOFF]
Lloh14:
	adrp	x1, l_.str.3@PAGE
Lloh15:
	add	x1, x1, l_.str.3@PAGEOFF
	b	LBB0_17
LBB0_12:
	mov	w22, #0
	mov	w21, #0
Lloh16:
	adrp	x20, _EINVAL@GOTPAGE
Lloh17:
	ldr	x20, [x20, _EINVAL@GOTPAGEOFF]
Lloh18:
	adrp	x1, l_.str.2@PAGE
Lloh19:
	add	x1, x1, l_.str.2@PAGEOFF
	b	LBB0_17
LBB0_13:
Lloh20:
	adrp	x20, _PAGE_SIZE@GOTPAGE
Lloh21:
	ldr	x20, [x20, _PAGE_SIZE@GOTPAGEOFF]
	ldr	w8, [x20]
	lsl	w0, w8, #2
	bl	_vmalloc
	str	x0, [x19]
	cbz	x0, LBB0_16
; %bb.14:
	ldr	w8, [x20]
	lsl	w2, w8, #2
	mov	w1, #0
	bl	_memset
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #40]
	blr	x8
	cbz	x0, LBB0_27
; %bb.15:
Lloh22:
	adrp	x20, _EINVAL@GOTPAGE
Lloh23:
	ldr	x20, [x20, _EINVAL@GOTPAGEOFF]
	mov	w22, #1
	mov	w21, #1
Lloh24:
	adrp	x1, l_.str.5@PAGE
Lloh25:
	add	x1, x1, l_.str.5@PAGEOFF
	b	LBB0_17
LBB0_16:
	mov	w21, #0
Lloh26:
	adrp	x20, _ENOMEM@GOTPAGE
Lloh27:
	ldr	x20, [x20, _ENOMEM@GOTPAGEOFF]
	mov	w22, #1
Lloh28:
	adrp	x1, l_.str.4@PAGE
Lloh29:
	add	x1, x1, l_.str.4@PAGEOFF
LBB0_17:
	ldr	x0, [x19, #40]
	bl	_dev_err
	ldr	w23, [x20]
	ldr	x8, [x19, #8]
	ldr	x9, [x8, #24]
	cbz	x9, LBB0_20
; %bb.18:
	ldr	x8, [x8, #32]
	cbz	x8, LBB0_20
; %bb.19:
	ldr	x0, [x19, #16]
	ldr	w1, [x19, #24]
	blr	x8
LBB0_20:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #24]
	cbz	x8, LBB0_22
; %bb.21:
	ldr	x0, [x19, #16]
	bl	_page_address
	mov	x20, x0
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
Lloh30:
	adrp	x9, _AGP_PAGE_DESTROY_UNMAP@GOTPAGE
Lloh31:
	ldr	x9, [x9, _AGP_PAGE_DESTROY_UNMAP@GOTPAGEOFF]
Lloh32:
	ldr	w1, [x9]
	blr	x8
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #16]
Lloh33:
	adrp	x9, _AGP_PAGE_DESTROY_FREE@GOTPAGE
Lloh34:
	ldr	x9, [x9, _AGP_PAGE_DESTROY_FREE@GOTPAGEOFF]
Lloh35:
	ldr	w1, [x9]
	mov	x0, x20
	blr	x8
LBB0_22:
	neg	w20, w23
	cbz	w22, LBB0_24
; %bb.23:
	ldr	x8, [x19, #8]
	ldr	x8, [x8, #8]
	mov	x0, x19
	blr	x8
LBB0_24:
	cbz	w21, LBB0_26
; %bb.25:
	ldr	x0, [x19]
	bl	_vfree
	str	xzr, [x19]
LBB0_26:
	mov	x0, x20
	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
LBB0_27:
	add	x0, x19, #32
	bl	_INIT_LIST_HEAD
	add	x0, x19, #28
	bl	_spin_lock_init
	mov	w20, #0
	b	LBB0_26
	.loh AdrpLdrGot	Lloh0, Lloh1
	.loh AdrpLdrGotLdr	Lloh4, Lloh5, Lloh6
	.loh AdrpAdd	Lloh2, Lloh3
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpAdd	Lloh7, Lloh8
	.loh AdrpAdd	Lloh14, Lloh15
	.loh AdrpLdrGot	Lloh12, Lloh13
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh16, Lloh17
	.loh AdrpLdrGot	Lloh20, Lloh21
	.loh AdrpAdd	Lloh24, Lloh25
	.loh AdrpLdrGot	Lloh22, Lloh23
	.loh AdrpAdd	Lloh28, Lloh29
	.loh AdrpLdrGot	Lloh26, Lloh27
	.loh AdrpLdrGotLdr	Lloh33, Lloh34, Lloh35
	.loh AdrpLdrGotLdr	Lloh30, Lloh31, Lloh32
	.cfi_endproc
                                        ; -- End function
	.comm	_agp_current_version,4,2        ; @agp_current_version
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"can't get memory for scratch page\n"

	.comm	_ENOMEM,4,2                     ; @ENOMEM
l_.str.1:                               ; @.str.1
	.asciz	"unable to dma-map scratch page\n"

l_.str.2:                               ; @.str.2
	.asciz	"can't determine aperture size\n"

	.comm	_EINVAL,4,2                     ; @EINVAL
l_.str.3:                               ; @.str.3
	.asciz	"can't get memory for graphics translation table\n"

	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
l_.str.4:                               ; @.str.4
	.asciz	"can't allocate memory for key lists\n"

l_.str.5:                               ; @.str.5
	.asciz	"error configuring host chipset\n"

	.comm	_AGP_PAGE_DESTROY_UNMAP,4,2     ; @AGP_PAGE_DESTROY_UNMAP
	.comm	_AGP_PAGE_DESTROY_FREE,4,2      ; @AGP_PAGE_DESTROY_FREE
	.no_dead_strip	_agp_backend_initialize
.subsections_via_symbols
