	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ggtt_init_hw
_ggtt_init_hw:                          ## @ggtt_init_hw
	.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, %rbx
	leaq	16(%rdi), %r15
	movq	40(%rdi), %r14
	movq	%r14, %rdi
	callq	_mutex_lock
	movq	_VM_CLASS_GGTT@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	movq	%r15, %rdi
	callq	_i915_address_space_init
	movl	$1, 16(%rbx)
	movq	%r14, %rdi
	callq	_IS_VALLEYVIEW
	movl	%eax, 36(%rbx)
	movq	%r14, %rdi
	callq	_HAS_LLC
	testl	%eax, %eax
	jne	LBB0_3
## %bb.1:
	movq	%r14, %rdi
	callq	_HAS_PPGTT
	testl	%eax, %eax
	jne	LBB0_3
## %bb.2:
	movq	_i915_gtt_color_adjust@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movl	%eax, 32(%rbx)
LBB0_3:
	leaq	48(%rbx), %rdi
	movl	(%rbx), %edx
	movl	4(%rbx), %esi
	callq	_io_mapping_init_wc
	testl	%eax, %eax
	je	LBB0_4
## %bb.5:
	movl	(%rbx), %esi
	movl	4(%rbx), %edi
	callq	_arch_phys_wc_add
	movl	%eax, 8(%rbx)
	movq	%rbx, %rdi
	callq	_i915_ggtt_init_fences
	xorl	%ebx, %ebx
	jmp	LBB0_6
LBB0_4:
	movq	%r15, %rdi
	callq	*24(%rbx)
	movq	_EIO@GOTPCREL(%rip), %rax
	xorl	%ebx, %ebx
	subl	(%rax), %ebx
LBB0_6:
	movq	%r14, %rdi
	callq	_mutex_unlock
	movl	%ebx, %eax
	addq	$8, %rsp
	popq	%rbx
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_VM_CLASS_GGTT,4,2              ## @VM_CLASS_GGTT
	.comm	_i915_gtt_color_adjust,4,2      ## @i915_gtt_color_adjust
	.comm	_EIO,4,2                        ## @EIO
	.no_dead_strip	_ggtt_init_hw
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ggtt_init_hw
_ggtt_init_hw:                          ; @ggtt_init_hw
	.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	x20, x0
	add	x21, x0, #16
	ldr	x19, [x0, #40]
	mov	x0, x19
	bl	_mutex_lock
Lloh0:
	adrp	x8, _VM_CLASS_GGTT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _VM_CLASS_GGTT@GOTPAGEOFF]
Lloh2:
	ldr	w1, [x8]
	mov	x0, x21
	bl	_i915_address_space_init
	mov	w8, #1
	str	w8, [x20, #16]
	mov	x0, x19
	bl	_IS_VALLEYVIEW
	str	w0, [x20, #36]
	mov	x0, x19
	bl	_HAS_LLC
	cbnz	w0, LBB0_3
; %bb.1:
	mov	x0, x19
	bl	_HAS_PPGTT
	cbnz	w0, LBB0_3
; %bb.2:
Lloh3:
	adrp	x8, _i915_gtt_color_adjust@GOTPAGE
Lloh4:
	ldr	x8, [x8, _i915_gtt_color_adjust@GOTPAGEOFF]
Lloh5:
	ldr	w8, [x8]
	str	w8, [x20, #32]
LBB0_3:
	add	x0, x20, #48
	ldp	w2, w1, [x20]
	bl	_io_mapping_init_wc
	cbz	w0, LBB0_5
; %bb.4:
	ldp	w1, w0, [x20]
	bl	_arch_phys_wc_add
	str	w0, [x20, #8]
	mov	x0, x20
	bl	_i915_ggtt_init_fences
	mov	w20, #0
	b	LBB0_6
LBB0_5:
	ldr	x8, [x20, #24]
	mov	x0, x21
	blr	x8
Lloh6:
	adrp	x8, _EIO@GOTPAGE
Lloh7:
	ldr	x8, [x8, _EIO@GOTPAGEOFF]
Lloh8:
	ldr	w8, [x8]
	neg	w20, w8
LBB0_6:
	mov	x0, x19
	bl	_mutex_unlock
	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	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.cfi_endproc
                                        ; -- End function
	.comm	_VM_CLASS_GGTT,4,2              ; @VM_CLASS_GGTT
	.comm	_i915_gtt_color_adjust,4,2      ; @i915_gtt_color_adjust
	.comm	_EIO,4,2                        ; @EIO
	.no_dead_strip	_ggtt_init_hw
.subsections_via_symbols
