	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_move_memcpy             ## -- Begin function ttm_bo_move_memcpy
	.p2align	4, 0x90
_ttm_bo_move_memcpy:                    ## @ttm_bo_move_memcpy
	.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
	subq	$120, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rsi, %rbx
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	%rax, -48(%rbp)                 ## 8-byte Spill
	movq	56(%rdi), %r14
	movq	(%r14), %rax
	movq	%rax, -112(%rbp)                ## 8-byte Spill
	movq	%rdx, -56(%rbp)                 ## 8-byte Spill
	movq	(%rdx), %rax
	movq	%rax, -104(%rbp)                ## 8-byte Spill
	movups	8(%rdi), %xmm0
	movups	24(%rdi), %xmm1
	movups	40(%rdi), %xmm2
	movaps	%xmm2, -128(%rbp)
	movaps	%xmm1, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movl	(%rsi), %edx
	movl	4(%rsi), %esi
	callq	_ttm_bo_wait
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_31
## %bb.1:
	leaq	8(%r13), %r12
	leaq	-72(%rbp), %rdx
	movq	%r14, %rdi
	movq	%r12, %rsi
	callq	_ttm_mem_reg_ioremap
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_31
## %bb.2:
	movq	%r12, -80(%rbp)                 ## 8-byte Spill
	leaq	-64(%rbp), %rdx
	movq	%r14, %rdi
	movq	-56(%rbp), %rsi                 ## 8-byte Reload
	callq	_ttm_mem_reg_ioremap
	movq	-72(%rbp), %rdx
	testl	%eax, %eax
	je	LBB0_4
## %bb.3:
	movl	%eax, %r15d
	leaq	-160(%rbp), %rsi
	movq	%r14, %rdi
	callq	_ttm_mem_reg_iounmap
	jmp	LBB0_31
LBB0_4:
	movq	-64(%rbp), %rdi
	movq	%rdx, %rax
	orq	%rdi, %rax
	movq	%r14, -96(%rbp)                 ## 8-byte Spill
	je	LBB0_27
## %bb.5:
	testq	%rdx, %rdx
	je	LBB0_7
## %bb.6:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_10
	jmp	LBB0_11
LBB0_7:
	cmpq	$0, -48(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_15
## %bb.8:
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movq	_tt_unpopulated@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	jne	LBB0_10
## %bb.9:
	movq	_TTM_PAGE_FLAG_SWAPPED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	movq	-48(%rbp), %rcx                 ## 8-byte Reload
	testl	%eax, 8(%rcx)
	je	LBB0_15
LBB0_10:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %rsi
	callq	_ttm_tt_populate
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_29
LBB0_11:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movq	(%rax), %rax
	movl	$1, %ecx
	movq	%rcx, -88(%rbp)                 ## 8-byte Spill
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	cmpq	(%rcx), %rax
	jne	LBB0_16
## %bb.12:
	movq	32(%r13), %rax
	addq	24(%r13), %rax
	cmpq	%rax, 16(%rcx)
	jge	LBB0_16
## %bb.13:
	movslq	8(%rcx), %rbx
	decq	%rbx
	movq	$-1, -88(%rbp)                  ## 8-byte Folded Spill
	jmp	LBB0_17
LBB0_16:
	xorl	%ebx, %ebx
LBB0_17:
	cmpl	$0, 8(%rcx)
	je	LBB0_26
## %bb.18:
	xorl	%r14d, %r14d
LBB0_19:                                ## =>This Inner Loop Header: Depth=1
	movq	-72(%rbp), %rsi
	testq	%rsi, %rsi
	je	LBB0_22
## %bb.20:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	-64(%rbp), %rdi
	testq	%rdi, %rdi
	je	LBB0_23
## %bb.21:                              ##   in Loop: Header=BB0_19 Depth=1
	movq	%rbx, %r12
	movq	%rbx, %rdx
	callq	_ttm_copy_io_page
	jmp	LBB0_24
LBB0_22:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	48(%r13), %edi
	movq	_PAGE_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ttm_io_prot
	movq	-64(%rbp), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %r12
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_ttm_copy_ttm_io_page
	jmp	LBB0_24
LBB0_23:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	40(%rcx), %edi
	movq	_PAGE_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %esi
	callq	_ttm_io_prot
	movq	-72(%rbp), %rsi
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	movq	%rbx, %r12
	movq	%rbx, %rdx
	movl	%eax, %ecx
	callq	_ttm_copy_io_ttm_page
LBB0_24:                                ##   in Loop: Header=BB0_19 Depth=1
	movl	%eax, %r15d
	testl	%eax, %eax
	jne	LBB0_29
## %bb.25:                              ##   in Loop: Header=BB0_19 Depth=1
	incq	%r14
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movslq	8(%rcx), %rax
	movq	%r12, %rbx
	addq	-88(%rbp), %rbx                 ## 8-byte Folded Reload
	cmpq	%rax, %r14
	jb	LBB0_19
LBB0_26:
	xorl	%eax, %eax
	callq	_mb
	jmp	LBB0_27
LBB0_15:
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	-56(%rbp), %rax                 ## 8-byte Reload
	imull	8(%rax), %edx
	xorl	%esi, %esi
	callq	_memset_io
LBB0_27:
	movq	-80(%rbp), %rax                 ## 8-byte Reload
	movups	(%rax), %xmm0
	movups	16(%rax), %xmm1
	movups	32(%rax), %xmm2
	movaps	%xmm2, -128(%rbp)
	movaps	%xmm1, -144(%rbp)
	movaps	%xmm0, -160(%rbp)
	movq	-56(%rbp), %rcx                 ## 8-byte Reload
	movups	(%rcx), %xmm0
	movups	16(%rcx), %xmm1
	movups	32(%rcx), %xmm2
	movups	%xmm0, (%rax)
	movups	%xmm1, 16(%rax)
	movups	%xmm2, 32(%rax)
	movq	$0, 32(%rcx)
	movq	_TTM_MEMTYPE_FLAG_FIXED@GOTPCREL(%rip), %rax
	movl	(%rax), %eax
	xorl	%r15d, %r15d
	movq	-112(%rbp), %rcx                ## 8-byte Reload
	movq	-104(%rbp), %rdx                ## 8-byte Reload
	testl	%eax, (%rcx,%rdx,4)
	je	LBB0_29
## %bb.28:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_ttm_tt_destroy
	movq	$0, (%r13)
LBB0_29:
	movq	-64(%rbp), %rdx
	movq	-96(%rbp), %rbx                 ## 8-byte Reload
	movq	%rbx, %rdi
	movq	-80(%rbp), %rsi                 ## 8-byte Reload
	callq	_ttm_mem_reg_iounmap
	movq	-72(%rbp), %rdx
	leaq	-160(%rbp), %rsi
	movq	%rbx, %rdi
	callq	_ttm_mem_reg_iounmap
	testl	%r15d, %r15d
	jne	LBB0_31
## %bb.30:
	leaq	-160(%rbp), %rsi
	movq	%r13, %rdi
	callq	_ttm_bo_mem_put
	xorl	%r15d, %r15d
LBB0_31:
	movl	%r15d, %eax
	addq	$120, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_tt_unpopulated,8,3             ## @tt_unpopulated
	.comm	_TTM_PAGE_FLAG_SWAPPED,4,2      ## @TTM_PAGE_FLAG_SWAPPED
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_PAGE_KERNEL,4,2                ## @PAGE_KERNEL
	.comm	_TTM_MEMTYPE_FLAG_FIXED,4,2     ## @TTM_MEMTYPE_FLAG_FIXED
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_bo_move_memcpy             ; -- Begin function ttm_bo_move_memcpy
	.p2align	2
_ttm_bo_move_memcpy:                    ; @ttm_bo_move_memcpy
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #176
	.cfi_def_cfa_offset 176
	stp	x28, x27, [sp, #80]             ; 16-byte Folded Spill
	stp	x26, x25, [sp, #96]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #112]            ; 16-byte Folded Spill
	stp	x22, x21, [sp, #128]            ; 16-byte Folded Spill
	stp	x20, x19, [sp, #144]            ; 16-byte Folded Spill
	stp	x29, x30, [sp, #160]            ; 16-byte Folded Spill
	add	x29, sp, #160
	.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
	.cfi_offset w25, -72
	.cfi_offset w26, -80
	.cfi_offset w27, -88
	.cfi_offset w28, -96
	mov	x23, x2
	mov	x24, x1
	mov	x19, x0
	ldr	x20, [x0, #56]
	ldr	x26, [x20]
	ldr	x27, [x2]
	ldr	x22, [x0]
	ldur	q0, [x0, #8]
	ldur	q1, [x0, #24]
	stp	q0, q1, [sp, #32]
	ldur	q0, [x0, #40]
	str	q0, [sp, #64]
	ldr	w1, [x1, #4]
	ldr	w2, [x24]
	bl	_ttm_bo_wait
	mov	x25, x0
	cbnz	w0, LBB0_31
; %bb.1:
	add	x21, x19, #8
	add	x2, sp, #24
	mov	x0, x20
	mov	x1, x21
	bl	_ttm_mem_reg_ioremap
	mov	x25, x0
	cbnz	w0, LBB0_31
; %bb.2:
	add	x2, sp, #16
	mov	x0, x20
	mov	x1, x23
	bl	_ttm_mem_reg_ioremap
	ldr	x2, [sp, #24]
	cbz	w0, LBB0_4
; %bb.3:
	mov	x25, x0
	add	x1, sp, #32
	mov	x0, x20
	bl	_ttm_mem_reg_iounmap
	b	LBB0_31
LBB0_4:
	ldr	x0, [sp, #16]
	orr	x8, x2, x0
	cbz	x8, LBB0_26
; %bb.5:
	cbz	x2, LBB0_7
; %bb.6:
	cbnz	x22, LBB0_10
	b	LBB0_11
LBB0_7:
	cbz	x22, LBB0_25
; %bb.8:
	ldr	x8, [x22]
Lloh0:
	adrp	x9, _tt_unpopulated@GOTPAGE
Lloh1:
	ldr	x9, [x9, _tt_unpopulated@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
	b.ne	LBB0_10
; %bb.9:
	ldr	w8, [x22, #8]
Lloh3:
	adrp	x9, _TTM_PAGE_FLAG_SWAPPED@GOTPAGE
Lloh4:
	ldr	x9, [x9, _TTM_PAGE_FLAG_SWAPPED@GOTPAGEOFF]
Lloh5:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_25
LBB0_10:
	mov	x0, x22
	mov	x1, x24
	bl	_ttm_tt_populate
	mov	x25, x0
	cbnz	w0, LBB0_29
LBB0_11:
	ldr	x8, [x21]
	ldr	x9, [x23]
	cmp	x8, x9
	b.ne	LBB0_14
; %bb.12:
	ldr	x8, [x23, #16]
	ldp	x9, x10, [x19, #24]
	add	x9, x10, x9
	cmp	x8, x9
	b.ge	LBB0_14
; %bb.13:
	ldrsw	x8, [x23, #8]
	sub	x24, x8, #1
	mov	x8, #-1
	b	LBB0_15
LBB0_14:
	mov	x24, #0
	mov	w8, #1
LBB0_15:
	str	x8, [sp, #8]                    ; 8-byte Folded Spill
	ldr	w8, [x23, #8]
	cbz	w8, LBB0_24
; %bb.16:
	mov	x28, #0
	b	LBB0_19
LBB0_17:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	w0, [x19, #48]
Lloh6:
	adrp	x8, _PAGE_KERNEL@GOTPAGE
Lloh7:
	ldr	x8, [x8, _PAGE_KERNEL@GOTPAGEOFF]
Lloh8:
	ldr	w1, [x8]
	bl	_ttm_io_prot
	mov	x3, x0
	ldr	x1, [sp, #16]
	mov	x0, x22
	mov	x2, x24
	bl	_ttm_copy_ttm_io_page
	cbnz	w0, LBB0_23
LBB0_18:                                ;   in Loop: Header=BB0_19 Depth=1
	add	x28, x28, #1
	ldrsw	x8, [x23, #8]
	ldr	x9, [sp, #8]                    ; 8-byte Folded Reload
	add	x24, x24, x9
	cmp	x28, x8
	b.hs	LBB0_24
LBB0_19:                                ; =>This Inner Loop Header: Depth=1
	ldr	x1, [sp, #24]
	cbz	x1, LBB0_17
; %bb.20:                               ;   in Loop: Header=BB0_19 Depth=1
	ldr	x0, [sp, #16]
	cbz	x0, LBB0_22
; %bb.21:                               ;   in Loop: Header=BB0_19 Depth=1
	mov	x2, x24
	bl	_ttm_copy_io_page
	cbz	w0, LBB0_18
	b	LBB0_23
LBB0_22:                                ;   in Loop: Header=BB0_19 Depth=1
	ldr	w0, [x23, #40]
Lloh9:
	adrp	x8, _PAGE_KERNEL@GOTPAGE
Lloh10:
	ldr	x8, [x8, _PAGE_KERNEL@GOTPAGEOFF]
Lloh11:
	ldr	w1, [x8]
	bl	_ttm_io_prot
	mov	x3, x0
	ldr	x1, [sp, #24]
	mov	x0, x22
	mov	x2, x24
	bl	_ttm_copy_io_ttm_page
	cbz	w0, LBB0_18
LBB0_23:
	mov	x25, x0
	b	LBB0_29
LBB0_24:
	bl	_mb
	b	LBB0_26
LBB0_25:
	ldr	w8, [x23, #8]
Lloh12:
	adrp	x9, _PAGE_SIZE@GOTPAGE
Lloh13:
	ldr	x9, [x9, _PAGE_SIZE@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	mul	w2, w9, w8
	mov	w1, #0
	bl	_memset_io
LBB0_26:
	ldp	q0, q1, [x21]
	stp	q0, q1, [sp, #32]
	ldr	q0, [x21, #32]
	str	q0, [sp, #64]
	ldp	q1, q0, [x23, #16]
	ldr	q2, [x23]
	stp	q2, q1, [x21]
	str	q0, [x21, #32]
	str	xzr, [x23, #32]
	ldr	w8, [x26, x27, lsl #2]
Lloh15:
	adrp	x9, _TTM_MEMTYPE_FLAG_FIXED@GOTPAGE
Lloh16:
	ldr	x9, [x9, _TTM_MEMTYPE_FLAG_FIXED@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	tst	w9, w8
	b.eq	LBB0_28
; %bb.27:
	mov	x0, x22
	bl	_ttm_tt_destroy
	mov	w25, #0
	str	xzr, [x19]
	b	LBB0_29
LBB0_28:
	mov	w25, #0
LBB0_29:
	ldr	x2, [sp, #16]
	mov	x0, x20
	mov	x1, x21
	bl	_ttm_mem_reg_iounmap
	ldr	x2, [sp, #24]
	add	x1, sp, #32
	mov	x0, x20
	bl	_ttm_mem_reg_iounmap
	cbnz	w25, LBB0_31
; %bb.30:
	add	x1, sp, #32
	mov	x0, x19
	bl	_ttm_bo_mem_put
LBB0_31:
	mov	x0, x25
	ldp	x29, x30, [sp, #160]            ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #144]            ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #128]            ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #112]            ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #96]             ; 16-byte Folded Reload
	ldp	x28, x27, [sp, #80]             ; 16-byte Folded Reload
	add	sp, sp, #176
	ret
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.cfi_endproc
                                        ; -- End function
	.comm	_tt_unpopulated,8,3             ; @tt_unpopulated
	.comm	_TTM_PAGE_FLAG_SWAPPED,4,2      ; @TTM_PAGE_FLAG_SWAPPED
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_PAGE_KERNEL,4,2                ; @PAGE_KERNEL
	.comm	_TTM_MEMTYPE_FLAG_FIXED,4,2     ; @TTM_MEMTYPE_FLAG_FIXED
.subsections_via_symbols
