	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	4, 0x90                         ## -- Begin function ttm_copy_io_ttm_page
_ttm_copy_io_ttm_page:                  ## @ttm_copy_io_ttm_page
	.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), %rax
	movq	(%rax,%rdx,8), %rbx
	movq	%rbx, -48(%rbp)
	testq	%rbx, %rbx
	je	LBB0_1
## %bb.2:
	movl	%ecx, %r14d
	movq	%rdx, %r13
	movq	%rsi, %r15
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shlq	%cl, %r13
	movl	%r14d, %edi
	callq	_pgprot_val
	movq	%rax, %r12
	movq	_PAGE_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pgprot_val
	cmpq	%rax, %r12
	jne	LBB0_3
## %bb.4:
	movq	%rbx, %rdi
	callq	_kmap
	jmp	LBB0_5
LBB0_3:
	leaq	-48(%rbp), %rdi
	movl	$1, %esi
	xorl	%edx, %edx
	movl	%r14d, %ecx
	callq	_vmap
LBB0_5:
	movq	%rax, %r12
	testq	%rax, %rax
	je	LBB0_1
## %bb.6:
	addq	%r15, %r13
	movq	_PAGE_SIZE@GOTPCREL(%rip), %rax
	movl	(%rax), %edx
	movq	%r12, %rdi
	movq	%r13, %rsi
	callq	_memcpy_fromio
	movl	%r14d, %edi
	callq	_pgprot_val
	movq	%rax, %rbx
	movq	_PAGE_KERNEL@GOTPCREL(%rip), %rax
	movl	(%rax), %edi
	callq	_pgprot_val
	cmpq	%rax, %rbx
	jne	LBB0_7
## %bb.8:
	movq	-48(%rbp), %rdi
	callq	_kunmap
	jmp	LBB0_9
LBB0_1:
	movq	_ENOMEM@GOTPCREL(%rip), %rcx
	xorl	%eax, %eax
	subl	(%rcx), %eax
	jmp	LBB0_10
LBB0_7:
	movq	%r12, %rdi
	callq	_vunmap
LBB0_9:
	xorl	%eax, %eax
LBB0_10:
	addq	$8, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_PAGE_SHIFT,8,3                 ## @PAGE_SHIFT
	.comm	_PAGE_KERNEL,4,2                ## @PAGE_KERNEL
	.comm	_PAGE_SIZE,4,2                  ## @PAGE_SIZE
	.comm	_KM_USER0,4,2                   ## @KM_USER0
	.no_dead_strip	_ttm_copy_io_ttm_page
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.p2align	2                               ; -- Begin function ttm_copy_io_ttm_page
_ttm_copy_io_ttm_page:                  ; @ttm_copy_io_ttm_page
	.cfi_startproc
; %bb.0:
	sub	sp, sp, #96
	.cfi_def_cfa_offset 96
	stp	x26, x25, [sp, #16]             ; 16-byte Folded Spill
	stp	x24, x23, [sp, #32]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #48]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #64]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #80]             ; 16-byte Folded Spill
	add	x29, sp, #80
	.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
	ldr	x8, [x0]
	ldr	x22, [x8, x2, lsl #3]
	str	x22, [sp, #8]
	cbz	x22, LBB0_6
; %bb.1:
	mov	x19, x3
	mov	x21, x2
	mov	x20, x1
Lloh0:
	adrp	x8, _PAGE_SHIFT@GOTPAGE
Lloh1:
	ldr	x8, [x8, _PAGE_SHIFT@GOTPAGEOFF]
Lloh2:
	ldr	x25, [x8]
	mov	x0, x3
	bl	_pgprot_val
	mov	x23, x0
Lloh3:
	adrp	x24, _PAGE_KERNEL@GOTPAGE
Lloh4:
	ldr	x24, [x24, _PAGE_KERNEL@GOTPAGEOFF]
	ldr	w0, [x24]
	bl	_pgprot_val
	cmp	x23, x0
	b.ne	LBB0_5
; %bb.2:
	mov	x0, x22
	bl	_kmap
	mov	x22, x0
	cbz	x0, LBB0_6
LBB0_3:
	lsl	x8, x21, x25
	add	x1, x8, x20
Lloh5:
	adrp	x8, _PAGE_SIZE@GOTPAGE
Lloh6:
	ldr	x8, [x8, _PAGE_SIZE@GOTPAGEOFF]
Lloh7:
	ldr	w2, [x8]
	mov	x0, x22
	bl	_memcpy_fromio
	mov	x0, x19
	bl	_pgprot_val
	mov	x19, x0
	ldr	w0, [x24]
	bl	_pgprot_val
	cmp	x19, x0
	b.ne	LBB0_7
; %bb.4:
	ldr	x0, [sp, #8]
	bl	_kunmap
	b	LBB0_8
LBB0_5:
	add	x0, sp, #8
	mov	w1, #1
	mov	w2, #0
	mov	x3, x19
	bl	_vmap
	mov	x22, x0
	cbnz	x0, LBB0_3
LBB0_6:
Lloh8:
	adrp	x8, _ENOMEM@GOTPAGE
Lloh9:
	ldr	x8, [x8, _ENOMEM@GOTPAGEOFF]
Lloh10:
	ldr	w8, [x8]
	neg	w0, w8
	b	LBB0_9
LBB0_7:
	mov	x0, x22
	bl	_vunmap
LBB0_8:
	mov	w0, #0
LBB0_9:
	ldp	x29, x30, [sp, #80]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #64]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #48]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #32]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp, #16]             ; 16-byte Folded Reload
	add	sp, sp, #96
	ret
	.loh AdrpLdrGot	Lloh3, Lloh4
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh5, Lloh6, Lloh7
	.loh AdrpLdrGotLdr	Lloh8, Lloh9, Lloh10
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_PAGE_SHIFT,8,3                 ; @PAGE_SHIFT
	.comm	_PAGE_KERNEL,4,2                ; @PAGE_KERNEL
	.comm	_PAGE_SIZE,4,2                  ; @PAGE_SIZE
	.comm	_KM_USER0,4,2                   ; @KM_USER0
	.no_dead_strip	_ttm_copy_io_ttm_page
.subsections_via_symbols
