	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.section	__TEXT,__literal16,16byte_literals
	.p2align	4                               ## -- Begin function qxl_ttm_placement_from_domain
LCPI0_0:
	.quad	1                               ## 0x1
	.quad	1                               ## 0x1
	.section	__TEXT,__text,regular,pure_instructions
	.globl	_qxl_ttm_placement_from_domain
	.p2align	4, 0x90
_qxl_ttm_placement_from_domain:         ## @qxl_ttm_placement_from_domain
	.cfi_startproc
## %bb.0:
	pushq	%rbp
	.cfi_def_cfa_offset 16
	.cfi_offset %rbp, -16
	movq	%rsp, %rbp
	.cfi_def_cfa_register %rbp
	xorl	%ecx, %ecx
	movl	$0, %eax
	testl	%edx, %edx
	je	LBB0_2
## %bb.1:
	movq	_TTM_PL_FLAG_NO_EVICT@GOTPCREL(%rip), %rax
	movq	(%rax), %rax
LBB0_2:
	movq	(%rdi), %r8
	movq	%r8, 32(%rdi)
	movq	%r8, 24(%rdi)
	movq	_QXL_GEM_DOMAIN_VRAM@GOTPCREL(%rip), %rdx
	cmpq	%rsi, (%rdx)
	jne	LBB0_4
## %bb.3:
	movq	_TTM_PL_FLAG_CACHED@GOTPCREL(%rip), %rcx
	movq	_TTM_PL_FLAG_VRAM@GOTPCREL(%rip), %rdx
	movq	(%rcx), %rcx
	orq	%rax, %rcx
	orq	(%rdx), %rcx
	movq	%rcx, 16(%r8)
	movl	$1, %ecx
LBB0_4:
	movq	_QXL_GEM_DOMAIN_SURFACE@GOTPCREL(%rip), %rdx
	cmpq	%rsi, (%rdx)
	jne	LBB0_6
## %bb.5:
	movq	_TTM_PL_FLAG_CACHED@GOTPCREL(%rip), %r10
	movq	_TTM_PL_FLAG_PRIV@GOTPCREL(%rip), %r9
	movq	(%r10), %rdx
	orq	%rax, %rdx
	orq	(%r9), %rdx
	leaq	(%rcx,%rcx,2), %r9
	movq	%rdx, 16(%r8,%r9,8)
	movq	_TTM_PL_FLAG_VRAM@GOTPCREL(%rip), %r11
	movq	(%r10), %rdx
	orq	%rax, %rdx
	orq	(%r11), %rdx
	orq	$2, %rcx
	movq	%rdx, 40(%r8,%r9,8)
LBB0_6:
	movq	_QXL_GEM_DOMAIN_CPU@GOTPCREL(%rip), %rdx
	cmpq	%rsi, (%rdx)
	jne	LBB0_8
## %bb.7:
	movq	_TTM_PL_MASK_CACHING@GOTPCREL(%rip), %rdx
	movq	_TTM_PL_FLAG_SYSTEM@GOTPCREL(%rip), %rsi
	orq	(%rdx), %rax
	orq	(%rsi), %rax
	leaq	(%rcx,%rcx,2), %rdx
	incq	%rcx
	movq	%rax, 16(%r8,%rdx,8)
LBB0_8:
	testq	%rcx, %rcx
	je	LBB0_9
## %bb.10:
	movq	%rcx, 16(%rdi)
	movq	%rcx, 8(%rdi)
	jg	LBB0_11
LBB0_15:
	popq	%rbp
	retq
LBB0_9:
	movq	_TTM_PL_MASK_CACHING@GOTPCREL(%rip), %rax
	movq	_TTM_PL_FLAG_SYSTEM@GOTPCREL(%rip), %rcx
	movq	(%rcx), %rcx
	orq	(%rax), %rcx
	movq	%rcx, 16(%r8)
	movaps	LCPI0_0(%rip), %xmm0            ## xmm0 = [1,1]
	movups	%xmm0, 8(%rdi)
	movl	$1, %ecx
LBB0_11:
	xorps	%xmm0, %xmm0
	movups	%xmm0, (%r8)
	cmpl	$1, %ecx
	je	LBB0_15
## %bb.12:
	movups	%xmm0, 24(%r8)
	cmpl	$2, %ecx
	je	LBB0_15
## %bb.13:
	xorps	%xmm0, %xmm0
	movups	%xmm0, 48(%r8)
	cmpl	$3, %ecx
	je	LBB0_15
## %bb.14:
	movups	%xmm0, 72(%r8)
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_TTM_PL_FLAG_NO_EVICT,8,3       ## @TTM_PL_FLAG_NO_EVICT
	.comm	_QXL_GEM_DOMAIN_VRAM,8,3        ## @QXL_GEM_DOMAIN_VRAM
	.comm	_TTM_PL_FLAG_CACHED,8,3         ## @TTM_PL_FLAG_CACHED
	.comm	_TTM_PL_FLAG_VRAM,8,3           ## @TTM_PL_FLAG_VRAM
	.comm	_QXL_GEM_DOMAIN_SURFACE,8,3     ## @QXL_GEM_DOMAIN_SURFACE
	.comm	_TTM_PL_FLAG_PRIV,8,3           ## @TTM_PL_FLAG_PRIV
	.comm	_QXL_GEM_DOMAIN_CPU,8,3         ## @QXL_GEM_DOMAIN_CPU
	.comm	_TTM_PL_MASK_CACHING,8,3        ## @TTM_PL_MASK_CACHING
	.comm	_TTM_PL_FLAG_SYSTEM,8,3         ## @TTM_PL_FLAG_SYSTEM
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_qxl_ttm_placement_from_domain  ; -- Begin function qxl_ttm_placement_from_domain
	.p2align	2
_qxl_ttm_placement_from_domain:         ; @qxl_ttm_placement_from_domain
	.cfi_startproc
; %bb.0:
	mov	x9, #0
Lloh0:
	adrp	x8, _TTM_PL_FLAG_NO_EVICT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _TTM_PL_FLAG_NO_EVICT@GOTPAGEOFF]
Lloh2:
	ldr	x8, [x8]
	cmp	w2, #0
	csel	x10, xzr, x8, eq
	ldr	x8, [x0]
	stp	x8, x8, [x0, #24]
Lloh3:
	adrp	x11, _QXL_GEM_DOMAIN_VRAM@GOTPAGE
Lloh4:
	ldr	x11, [x11, _QXL_GEM_DOMAIN_VRAM@GOTPAGEOFF]
Lloh5:
	ldr	x11, [x11]
	cmp	x11, x1
	b.ne	LBB0_2
; %bb.1:
Lloh6:
	adrp	x9, _TTM_PL_FLAG_CACHED@GOTPAGE
Lloh7:
	ldr	x9, [x9, _TTM_PL_FLAG_CACHED@GOTPAGEOFF]
Lloh8:
	adrp	x11, _TTM_PL_FLAG_VRAM@GOTPAGE
Lloh9:
	ldr	x11, [x11, _TTM_PL_FLAG_VRAM@GOTPAGEOFF]
Lloh10:
	ldr	x9, [x9]
Lloh11:
	ldr	x11, [x11]
	orr	x9, x9, x10
	orr	x9, x9, x11
	str	x9, [x8, #16]
	mov	w9, #1
LBB0_2:
Lloh12:
	adrp	x11, _QXL_GEM_DOMAIN_SURFACE@GOTPAGE
Lloh13:
	ldr	x11, [x11, _QXL_GEM_DOMAIN_SURFACE@GOTPAGEOFF]
Lloh14:
	ldr	x11, [x11]
	cmp	x11, x1
	b.ne	LBB0_4
; %bb.3:
Lloh15:
	adrp	x11, _TTM_PL_FLAG_CACHED@GOTPAGE
Lloh16:
	ldr	x11, [x11, _TTM_PL_FLAG_CACHED@GOTPAGEOFF]
	ldr	x12, [x11]
Lloh17:
	adrp	x13, _TTM_PL_FLAG_PRIV@GOTPAGE
Lloh18:
	ldr	x13, [x13, _TTM_PL_FLAG_PRIV@GOTPAGEOFF]
Lloh19:
	ldr	x13, [x13]
	orr	x12, x12, x10
	orr	x12, x12, x13
	mov	w13, #24
	madd	x13, x9, x13, x8
	str	x12, [x13, #16]
Lloh20:
	adrp	x12, _TTM_PL_FLAG_VRAM@GOTPAGE
Lloh21:
	ldr	x12, [x12, _TTM_PL_FLAG_VRAM@GOTPAGEOFF]
	ldr	x11, [x11]
Lloh22:
	ldr	x12, [x12]
	orr	x11, x11, x10
	orr	x11, x11, x12
	orr	x9, x9, #0x2
	str	x11, [x13, #40]
LBB0_4:
Lloh23:
	adrp	x11, _QXL_GEM_DOMAIN_CPU@GOTPAGE
Lloh24:
	ldr	x11, [x11, _QXL_GEM_DOMAIN_CPU@GOTPAGEOFF]
Lloh25:
	ldr	x11, [x11]
	cmp	x11, x1
	b.ne	LBB0_6
; %bb.5:
Lloh26:
	adrp	x11, _TTM_PL_MASK_CACHING@GOTPAGE
Lloh27:
	ldr	x11, [x11, _TTM_PL_MASK_CACHING@GOTPAGEOFF]
Lloh28:
	ldr	x11, [x11]
Lloh29:
	adrp	x12, _TTM_PL_FLAG_SYSTEM@GOTPAGE
Lloh30:
	ldr	x12, [x12, _TTM_PL_FLAG_SYSTEM@GOTPAGEOFF]
Lloh31:
	ldr	x12, [x12]
	orr	x10, x11, x10
	orr	x10, x10, x12
	mov	w11, #24
	madd	x11, x9, x11, x8
	add	x9, x9, #1
	str	x10, [x11, #16]
LBB0_6:
	cbz	x9, LBB0_9
; %bb.7:
	stp	x9, x9, [x0, #8]
	cmp	x9, #1
	b.ge	LBB0_10
LBB0_8:
	ret
LBB0_9:
Lloh32:
	adrp	x9, _TTM_PL_MASK_CACHING@GOTPAGE
Lloh33:
	ldr	x9, [x9, _TTM_PL_MASK_CACHING@GOTPAGEOFF]
Lloh34:
	ldr	x9, [x9]
Lloh35:
	adrp	x10, _TTM_PL_FLAG_SYSTEM@GOTPAGE
Lloh36:
	ldr	x10, [x10, _TTM_PL_FLAG_SYSTEM@GOTPAGEOFF]
Lloh37:
	ldr	x10, [x10]
	orr	x9, x10, x9
	str	x9, [x8, #16]
	mov	w9, #1
	dup.2d	v0, x9
	stur	q0, [x0, #8]
LBB0_10:
	stp	xzr, xzr, [x8]
	cmp	x9, #1
	b.eq	LBB0_8
; %bb.11:
	stp	xzr, xzr, [x8, #24]
	cmp	x9, #2
	b.eq	LBB0_8
; %bb.12:
	stp	xzr, xzr, [x8, #48]
	cmp	x9, #3
	b.eq	LBB0_8
; %bb.13:
	stp	xzr, xzr, [x8, #72]
	ret
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh11
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh10
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh20, Lloh21, Lloh22
	.loh AdrpLdrGotLdr	Lloh17, Lloh18, Lloh19
	.loh AdrpLdrGot	Lloh15, Lloh16
	.loh AdrpLdrGotLdr	Lloh23, Lloh24, Lloh25
	.loh AdrpLdrGotLdr	Lloh29, Lloh30, Lloh31
	.loh AdrpLdrGotLdr	Lloh26, Lloh27, Lloh28
	.loh AdrpLdrGotLdr	Lloh35, Lloh36, Lloh37
	.loh AdrpLdrGotLdr	Lloh32, Lloh33, Lloh34
	.cfi_endproc
                                        ; -- End function
	.comm	_TTM_PL_FLAG_NO_EVICT,8,3       ; @TTM_PL_FLAG_NO_EVICT
	.comm	_QXL_GEM_DOMAIN_VRAM,8,3        ; @QXL_GEM_DOMAIN_VRAM
	.comm	_TTM_PL_FLAG_CACHED,8,3         ; @TTM_PL_FLAG_CACHED
	.comm	_TTM_PL_FLAG_VRAM,8,3           ; @TTM_PL_FLAG_VRAM
	.comm	_QXL_GEM_DOMAIN_SURFACE,8,3     ; @QXL_GEM_DOMAIN_SURFACE
	.comm	_TTM_PL_FLAG_PRIV,8,3           ; @TTM_PL_FLAG_PRIV
	.comm	_QXL_GEM_DOMAIN_CPU,8,3         ; @QXL_GEM_DOMAIN_CPU
	.comm	_TTM_PL_MASK_CACHING,8,3        ; @TTM_PL_MASK_CACHING
	.comm	_TTM_PL_FLAG_SYSTEM,8,3         ; @TTM_PL_FLAG_SYSTEM
.subsections_via_symbols
