	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_tt_swapout                 ## -- Begin function ttm_tt_swapout
	.p2align	4, 0x90
_ttm_tt_swapout:                        ## @ttm_tt_swapout
	.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	$24, %rsp
	.cfi_offset %rbx, -56
	.cfi_offset %r12, -48
	.cfi_offset %r13, -40
	.cfi_offset %r14, -32
	.cfi_offset %r15, -24
	movq	%rdi, %r13
	movq	(%rdi), %rax
	movq	_tt_unbound@GOTPCREL(%rip), %rcx
	cmpq	(%rcx), %rax
	setne	%cl
	movq	_tt_unpopulated@GOTPCREL(%rip), %rdx
	cmpq	(%rdx), %rax
	movq	%rsi, %r14
	setne	%al
	andb	%cl, %al
	movzbl	%al, %edi
	callq	_BUG_ON
	movq	8(%r13), %rax
	movq	_tt_cached@GOTPCREL(%rip), %rcx
	xorl	%edi, %edi
	cmpq	(%rcx), %rax
	setne	%dil
	callq	_BUG_ON
	movq	%r14, %rbx
	testq	%r14, %r14
	je	LBB0_1
LBB0_2:
	movq	%r14, -56(%rbp)                 ## 8-byte Spill
	movq	%rbx, -48(%rbp)                 ## 8-byte Spill
	movq	%rbx, %rdi
	callq	_file_inode
	cmpl	$0, 16(%r13)
	jle	LBB0_10
## %bb.3:
	movq	(%rax), %r12
	xorl	%ebx, %ebx
	jmp	LBB0_4
	.p2align	4, 0x90
LBB0_8:                                 ##   in Loop: Header=BB0_4 Depth=1
	movq	%r15, %rdi
	movq	%r14, %rsi
	callq	_copy_highpage
	movq	%r15, %rdi
	callq	_set_page_dirty
	movq	%r15, %rdi
	callq	_mark_page_accessed
	movq	%r15, %rdi
	callq	_page_cache_release
LBB0_9:                                 ##   in Loop: Header=BB0_4 Depth=1
	incq	%rbx
	movslq	16(%r13), %rax
	cmpq	%rax, %rbx
	jge	LBB0_10
LBB0_4:                                 ## =>This Inner Loop Header: Depth=1
	movq	40(%r13), %rax
	movq	(%rax,%rbx,8), %r14
	xorl	%edi, %edi
	testq	%r14, %r14
	sete	%dil
	callq	_unlikely
	testq	%rax, %rax
	jne	LBB0_9
## %bb.5:                               ##   in Loop: Header=BB0_4 Depth=1
	movq	%r12, %rdi
	movl	%ebx, %esi
	callq	_shmem_read_mapping_page
	movq	%rax, %r15
	movq	%rax, %rdi
	callq	_IS_ERR
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_8
## %bb.6:
	movq	%r15, %rdi
	callq	_PTR_ERR
	movl	%eax, %ebx
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	jne	LBB0_12
## %bb.7:
	movq	-48(%rbp), %rdi                 ## 8-byte Reload
	callq	_fput
	jmp	LBB0_12
LBB0_10:
	movq	32(%r13), %rax
	movq	(%rax), %rax
	movq	%r13, %rdi
	callq	*(%rax)
	movq	-48(%rbp), %rax                 ## 8-byte Reload
	movq	%rax, 24(%r13)
	movq	_TTM_PAGE_FLAG_SWAPPED@GOTPCREL(%rip), %rcx
	movl	20(%r13), %eax
	orl	(%rcx), %eax
	xorl	%ebx, %ebx
	movl	%eax, 20(%r13)
	cmpq	$0, -56(%rbp)                   ## 8-byte Folded Reload
	je	LBB0_12
## %bb.11:
	movq	_TTM_PAGE_FLAG_PERSISTENT_SWAP@GOTPCREL(%rip), %rcx
	orl	(%rcx), %eax
	movl	%eax, 20(%r13)
LBB0_12:
	movl	%ebx, %eax
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	retq
LBB0_1:
	movl	16(%r13), %esi
	movq	_PAGE_SHIFT@GOTPCREL(%rip), %rax
	movb	(%rax), %cl
	shll	%cl, %esi
	leaq	L_.str(%rip), %rdi
	xorl	%edx, %edx
	callq	_shmem_file_setup
	movq	%rax, %rbx
	movq	%rax, %rdi
	callq	_IS_ERR
	movl	%eax, %edi
	callq	_unlikely
	testq	%rax, %rax
	je	LBB0_2
## %bb.13:
	leaq	L_.str.1(%rip), %rdi
	callq	_pr_err
	movq	%rbx, %rdi
	addq	$24, %rsp
	popq	%rbx
	popq	%r12
	popq	%r13
	popq	%r14
	popq	%r15
	popq	%rbp
	jmp	_PTR_ERR                        ## TAILCALL
	.cfi_endproc
                                        ## -- End function
	.comm	_ENOMEM,4,2                     ## @ENOMEM
	.comm	_tt_unbound,8,3                 ## @tt_unbound
	.comm	_tt_unpopulated,8,3             ## @tt_unpopulated
	.comm	_tt_cached,8,3                  ## @tt_cached
	.section	__TEXT,__cstring,cstring_literals
L_.str:                                 ## @.str
	.asciz	"ttm swap"

	.comm	_PAGE_SHIFT,4,2                 ## @PAGE_SHIFT
L_.str.1:                               ## @.str.1
	.asciz	"Failed allocating swap storage\n"

	.comm	_TTM_PAGE_FLAG_SWAPPED,4,2      ## @TTM_PAGE_FLAG_SWAPPED
	.comm	_TTM_PAGE_FLAG_PERSISTENT_SWAP,4,2 ## @TTM_PAGE_FLAG_PERSISTENT_SWAP
.subsections_via_symbols

	.section	__TEXT,__text,regular,pure_instructions
	.build_version macos, 13, 0	sdk_version 13, 3
	.globl	_ttm_tt_swapout                 ; -- Begin function ttm_tt_swapout
	.p2align	2
_ttm_tt_swapout:                        ; @ttm_tt_swapout
	.cfi_startproc
; %bb.0:
	stp	x26, x25, [sp, #-80]!           ; 16-byte Folded Spill
	.cfi_def_cfa_offset 80
	stp	x24, x23, [sp, #16]             ; 16-byte Folded Spill
	stp	x22, x21, [sp, #32]             ; 16-byte Folded Spill
	stp	x20, x19, [sp, #48]             ; 16-byte Folded Spill
	stp	x29, x30, [sp, #64]             ; 16-byte Folded Spill
	add	x29, sp, #64
	.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
	mov	x19, x1
	mov	x20, x0
	ldr	x8, [x0]
Lloh0:
	adrp	x9, _tt_unbound@GOTPAGE
Lloh1:
	ldr	x9, [x9, _tt_unbound@GOTPAGEOFF]
Lloh2:
	ldr	x9, [x9]
	cmp	x8, x9
Lloh3:
	adrp	x9, _tt_unpopulated@GOTPAGE
Lloh4:
	ldr	x9, [x9, _tt_unpopulated@GOTPAGEOFF]
Lloh5:
	ldr	x9, [x9]
	ccmp	x8, x9, #4, ne
	cset	w0, ne
	bl	_BUG_ON
	ldr	x8, [x20, #8]
Lloh6:
	adrp	x9, _tt_cached@GOTPAGE
Lloh7:
	ldr	x9, [x9, _tt_cached@GOTPAGEOFF]
Lloh8:
	ldr	x9, [x9]
	cmp	x8, x9
	cset	w0, ne
	bl	_BUG_ON
	mov	x21, x19
	cbz	x19, LBB0_12
LBB0_1:
	mov	x0, x21
	bl	_file_inode
	ldr	w8, [x20, #16]
	cmp	w8, #1
	b.lt	LBB0_9
; %bb.2:
	mov	x22, #0
	ldr	x23, [x0]
	b	LBB0_5
LBB0_3:                                 ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x25
	mov	x1, x24
	bl	_copy_highpage
	mov	x0, x25
	bl	_set_page_dirty
	mov	x0, x25
	bl	_mark_page_accessed
	mov	x0, x25
	bl	_page_cache_release
LBB0_4:                                 ;   in Loop: Header=BB0_5 Depth=1
	add	x22, x22, #1
	ldrsw	x8, [x20, #16]
	cmp	x22, x8
	b.ge	LBB0_9
LBB0_5:                                 ; =>This Inner Loop Header: Depth=1
	ldr	x8, [x20, #40]
	ldr	x24, [x8, x22, lsl #3]
	cmp	x24, #0
	cset	w0, eq
	bl	_unlikely
	cbnz	x0, LBB0_4
; %bb.6:                                ;   in Loop: Header=BB0_5 Depth=1
	mov	x0, x23
	mov	x1, x22
	bl	_shmem_read_mapping_page
	mov	x25, x0
	bl	_IS_ERR
	bl	_unlikely
	cbz	x0, LBB0_3
; %bb.7:
	mov	x0, x25
	bl	_PTR_ERR
	mov	x22, x0
	cbnz	x19, LBB0_11
; %bb.8:
	mov	x0, x21
	bl	_fput
	b	LBB0_11
LBB0_9:
	ldr	x8, [x20, #32]
	ldr	x8, [x8]
	ldr	x8, [x8]
	mov	x0, x20
	blr	x8
	str	x21, [x20, #24]
Lloh9:
	adrp	x8, _TTM_PAGE_FLAG_SWAPPED@GOTPAGE
Lloh10:
	ldr	x8, [x8, _TTM_PAGE_FLAG_SWAPPED@GOTPAGEOFF]
Lloh11:
	ldr	w8, [x8]
	ldr	w9, [x20, #20]
	orr	w8, w9, w8
	str	w8, [x20, #20]
	mov	w22, #0
	cbz	x19, LBB0_11
; %bb.10:
Lloh12:
	adrp	x9, _TTM_PAGE_FLAG_PERSISTENT_SWAP@GOTPAGE
Lloh13:
	ldr	x9, [x9, _TTM_PAGE_FLAG_PERSISTENT_SWAP@GOTPAGEOFF]
Lloh14:
	ldr	w9, [x9]
	orr	w8, w9, w8
	str	w8, [x20, #20]
LBB0_11:
	mov	x0, x22
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	ret
LBB0_12:
	ldr	w8, [x20, #16]
Lloh15:
	adrp	x9, _PAGE_SHIFT@GOTPAGE
Lloh16:
	ldr	x9, [x9, _PAGE_SHIFT@GOTPAGEOFF]
Lloh17:
	ldr	w9, [x9]
	lsl	w1, w8, w9
Lloh18:
	adrp	x0, l_.str@PAGE
Lloh19:
	add	x0, x0, l_.str@PAGEOFF
	mov	w2, #0
	bl	_shmem_file_setup
	mov	x21, x0
	bl	_IS_ERR
	bl	_unlikely
	cbz	x0, LBB0_1
; %bb.13:
Lloh20:
	adrp	x0, l_.str.1@PAGE
Lloh21:
	add	x0, x0, l_.str.1@PAGEOFF
	bl	_pr_err
	mov	x0, x21
	ldp	x29, x30, [sp, #64]             ; 16-byte Folded Reload
	ldp	x20, x19, [sp, #48]             ; 16-byte Folded Reload
	ldp	x22, x21, [sp, #32]             ; 16-byte Folded Reload
	ldp	x24, x23, [sp, #16]             ; 16-byte Folded Reload
	ldp	x26, x25, [sp], #80             ; 16-byte Folded Reload
	b	_PTR_ERR
	.loh AdrpLdrGotLdr	Lloh6, Lloh7, Lloh8
	.loh AdrpLdrGotLdr	Lloh3, Lloh4, Lloh5
	.loh AdrpLdrGotLdr	Lloh0, Lloh1, Lloh2
	.loh AdrpLdrGotLdr	Lloh9, Lloh10, Lloh11
	.loh AdrpLdrGotLdr	Lloh12, Lloh13, Lloh14
	.loh AdrpAdd	Lloh18, Lloh19
	.loh AdrpLdrGotLdr	Lloh15, Lloh16, Lloh17
	.loh AdrpAdd	Lloh20, Lloh21
	.cfi_endproc
                                        ; -- End function
	.comm	_ENOMEM,4,2                     ; @ENOMEM
	.comm	_tt_unbound,8,3                 ; @tt_unbound
	.comm	_tt_unpopulated,8,3             ; @tt_unpopulated
	.comm	_tt_cached,8,3                  ; @tt_cached
	.section	__TEXT,__cstring,cstring_literals
l_.str:                                 ; @.str
	.asciz	"ttm swap"

	.comm	_PAGE_SHIFT,4,2                 ; @PAGE_SHIFT
l_.str.1:                               ; @.str.1
	.asciz	"Failed allocating swap storage\n"

	.comm	_TTM_PAGE_FLAG_SWAPPED,4,2      ; @TTM_PAGE_FLAG_SWAPPED
	.comm	_TTM_PAGE_FLAG_PERSISTENT_SWAP,4,2 ; @TTM_PAGE_FLAG_PERSISTENT_SWAP
.subsections_via_symbols
