	.file	"extr_ttm_tt.c_ttm_tt_swapout.c"
	.intel_syntax noprefix
	.text
	.section	.rodata.str1.1,"aMS",@progbits,1
.LC0:
	.string	"ttm swap"
	.section	.rodata.str1.8,"aMS",@progbits,1
	.align 8
.LC1:
	.string	"Failed allocating swap storage\n"
	.text
	.p2align 4
	.globl	ttm_tt_swapout
	.type	ttm_tt_swapout, @function
ttm_tt_swapout:
.LFB0:
	.cfi_startproc
	endbr64
	push	r15
	.cfi_def_cfa_offset 16
	.cfi_offset 15, -16
	push	r14
	.cfi_def_cfa_offset 24
	.cfi_offset 14, -24
	push	r13
	.cfi_def_cfa_offset 32
	.cfi_offset 13, -32
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	mov	rbp, rdi
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	rax, QWORD PTR [rdi]
	xor	edi, edi
	cmp	rax, QWORD PTR tt_unbound[rip]
	mov	QWORD PTR [rsp], rsi
	je	.L2
	xor	edi, edi
	cmp	QWORD PTR tt_unpopulated[rip], rax
	setne	dil
.L2:
	call	BUG_ON@PLT
	mov	rax, QWORD PTR tt_cached[rip]
	xor	edi, edi
	cmp	QWORD PTR 8[rbp], rax
	setne	dil
	call	BUG_ON@PLT
	mov	rax, QWORD PTR [rsp]
	mov	QWORD PTR 8[rsp], rax
	test	rax, rax
	je	.L27
.L3:
	mov	rax, QWORD PTR 8[rsp]
	xor	ebx, ebx
	mov	r13, QWORD PTR [rax]
	mov	eax, DWORD PTR 16[rbp]
	test	eax, eax
	jle	.L11
	.p2align 4,,10
	.p2align 3
.L4:
	mov	rdi, r13
	mov	r14d, ebx
	call	mapping_gfp_mask@PLT
	mov	r15d, eax
	mov	eax, DWORD PTR 20[rbp]
	test	DWORD PTR TTM_PAGE_FLAG_NO_RETRY[rip], eax
	je	.L7
	or	r15d, DWORD PTR __GFP_RETRY_MAYFAIL[rip]
.L7:
	mov	rax, QWORD PTR 32[rbp]
	xor	edi, edi
	mov	r12, QWORD PTR [rax+rbx*8]
	test	r12, r12
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L8
	mov	esi, r14d
	mov	rdi, r13
	mov	edx, r15d
	call	shmem_read_mapping_page_gfp@PLT
	mov	rdi, rax
	mov	r14, rax
	call	IS_ERR@PLT
	test	rax, rax
	jne	.L28
	mov	rsi, r12
	mov	rdi, r14
	call	copy_highpage@PLT
	mov	rdi, r14
	call	set_page_dirty@PLT
	mov	rdi, r14
	call	mark_page_accessed@PLT
	mov	rdi, r14
	call	put_page@PLT
.L8:
	add	rbx, 1
	cmp	DWORD PTR 16[rbp], ebx
	jg	.L4
.L11:
	mov	rdi, rbp
	call	ttm_tt_unpopulate@PLT
	mov	rax, QWORD PTR 8[rsp]
	mov	QWORD PTR 24[rbp], rax
	mov	eax, DWORD PTR 20[rbp]
	or	eax, DWORD PTR TTM_PAGE_FLAG_SWAPPED[rip]
	cmp	QWORD PTR [rsp], 0
	mov	DWORD PTR 20[rbp], eax
	je	.L25
	or	eax, DWORD PTR TTM_PAGE_FLAG_PERSISTENT_SWAP[rip]
	mov	DWORD PTR 20[rbp], eax
.L25:
	xor	r12d, r12d
.L1:
	add	rsp, 24
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	eax, r12d
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L28:
	.cfi_restore_state
	mov	rdi, r14
	call	PTR_ERR@PLT
	cmp	QWORD PTR [rsp], 0
	mov	r12d, eax
	jne	.L1
	mov	rdi, QWORD PTR 8[rsp]
	call	fput@PLT
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L27:
	mov	ecx, DWORD PTR PAGE_SHIFT[rip]
	mov	esi, DWORD PTR 16[rbp]
	xor	edx, edx
	lea	rdi, .LC0[rip]
	sal	esi, cl
	call	shmem_file_setup@PLT
	mov	rdi, rax
	mov	QWORD PTR 8[rsp], rax
	call	IS_ERR@PLT
	test	rax, rax
	je	.L3
	lea	rdi, .LC1[rip]
	call	pr_err@PLT
	mov	rdi, QWORD PTR 8[rsp]
	add	rsp, 24
	.cfi_def_cfa_offset 56
	pop	rbx
	.cfi_def_cfa_offset 48
	pop	rbp
	.cfi_def_cfa_offset 40
	pop	r12
	.cfi_def_cfa_offset 32
	pop	r13
	.cfi_def_cfa_offset 24
	pop	r14
	.cfi_def_cfa_offset 16
	pop	r15
	.cfi_def_cfa_offset 8
	jmp	PTR_ERR@PLT
	.cfi_endproc
.LFE0:
	.size	ttm_tt_swapout, .-ttm_tt_swapout
	.comm	tt_unpopulated,8,8
	.comm	tt_unbound,8,8
	.comm	tt_cached,8,8
	.comm	__GFP_RETRY_MAYFAIL,4,4
	.comm	TTM_PAGE_FLAG_SWAPPED,4,4
	.comm	TTM_PAGE_FLAG_PERSISTENT_SWAP,4,4
	.comm	TTM_PAGE_FLAG_NO_RETRY,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",@progbits
	.section	.note.gnu.property,"a"
	.align 8
	.long	 1f - 0f
	.long	 4f - 1f
	.long	 5
0:
	.string	 "GNU"
1:
	.align 8
	.long	 0xc0000002
	.long	 3f - 2f
2:
	.long	 0x3
3:
	.align 8
4:

	.arch armv5t
	.eabi_attribute 20, 1
	.eabi_attribute 21, 1
	.eabi_attribute 23, 3
	.eabi_attribute 24, 1
	.eabi_attribute 25, 1
	.eabi_attribute 26, 2
	.eabi_attribute 30, 2
	.eabi_attribute 34, 0
	.eabi_attribute 18, 4
	.file	"extr_ttm_tt.c_ttm_tt_swapout.c"
	.text
	.section	.rodata.str1.4,"aMS",%progbits,1
	.align	2
.LC0:
	.ascii	"ttm swap\000"
	.align	2
.LC1:
	.ascii	"Failed allocating swap storage\012\000"
	.text
	.align	2
	.global	ttm_tt_swapout
	.syntax unified
	.arm
	.fpu softvfp
	.type	ttm_tt_swapout, %function
ttm_tt_swapout:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	fp, r0
	ldr	r0, .L26
	ldr	r2, [fp]
	ldr	ip, [r0]
	mov	r10, r1
	cmp	r2, ip
	moveq	r0, #0
	sub	sp, sp, #12
	beq	.L2
	ldr	r1, .L26+4
	ldr	r0, [r1]
	subs	r0, r0, r2
	movne	r0, #1
.L2:
	bl	BUG_ON
	ldr	r2, .L26+8
	ldr	r0, [fp, #4]
	ldr	r2, [r2]
	subs	r0, r0, r2
	movne	r0, #1
	bl	BUG_ON
	cmp	r10, #0
	strne	r10, [sp, #4]
	beq	.L24
.L3:
	ldr	r2, [fp, #8]
	ldr	r3, [sp, #4]
	cmp	r2, #0
	ldr	r7, [r3]
	ble	.L11
	mov	r5, #0
	ldr	r8, .L26+12
	ldr	r9, .L26+16
.L4:
	mov	r0, r7
	bl	mapping_gfp_mask
	ldr	ip, [fp, #12]
	ldr	r1, [r8]
	mov	r4, r0
	tst	ip, r1
	ldrne	r2, [r9]
	orrne	r4, r0, r2
	ldr	r2, [fp, #20]
	ldr	r6, [r2, r5, lsl #2]
	clz	r0, r6
	lsr	r0, r0, #5
	bl	unlikely
	cmp	r0, #0
	bne	.L8
	mov	r2, r4
	mov	r1, r5
	mov	r0, r7
	bl	shmem_read_mapping_page_gfp
	mov	r4, r0
	bl	IS_ERR
	cmp	r0, #0
	bne	.L25
	mov	r1, r6
	mov	r0, r4
	bl	copy_highpage
	mov	r0, r4
	bl	set_page_dirty
	mov	r0, r4
	bl	mark_page_accessed
	mov	r0, r4
	bl	put_page
.L8:
	ldr	r2, [fp, #8]
	add	r5, r5, #1
	cmp	r2, r5
	bgt	.L4
.L11:
	mov	r0, fp
	bl	ttm_tt_unpopulate
	ldr	r1, .L26+20
	ldr	r2, [fp, #12]
	ldr	r1, [r1]
	ldr	r3, [sp, #4]
	orr	r2, r2, r1
	cmp	r10, #0
	str	r3, [fp, #16]
	str	r2, [fp, #12]
	beq	.L1
	mov	r10, #0
	ldr	r1, .L26+24
	ldr	r1, [r1]
	orr	r2, r1, r2
	str	r2, [fp, #12]
.L1:
	mov	r0, r10
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L25:
	mov	r0, r4
	bl	PTR_ERR
	cmp	r10, #0
	mov	r10, r0
	bne	.L1
	ldr	r0, [sp, #4]
	bl	fput
	b	.L1
.L24:
	ldr	r2, .L26+28
	ldr	r0, [fp, #8]
	ldr	r1, [r2]
	mov	r2, r10
	lsl	r1, r0, r1
	ldr	r0, .L26+32
	bl	shmem_file_setup
	str	r0, [sp, #4]
	bl	IS_ERR
	cmp	r0, #0
	beq	.L3
	ldr	r0, .L26+36
	bl	pr_err
	ldr	r0, [sp, #4]
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	PTR_ERR
.L27:
	.align	2
.L26:
	.word	tt_unbound
	.word	tt_unpopulated
	.word	tt_cached
	.word	TTM_PAGE_FLAG_NO_RETRY
	.word	__GFP_RETRY_MAYFAIL
	.word	TTM_PAGE_FLAG_SWAPPED
	.word	TTM_PAGE_FLAG_PERSISTENT_SWAP
	.word	PAGE_SHIFT
	.word	.LC0
	.word	.LC1
	.size	ttm_tt_swapout, .-ttm_tt_swapout
	.comm	tt_unpopulated,4,4
	.comm	tt_unbound,4,4
	.comm	tt_cached,4,4
	.comm	__GFP_RETRY_MAYFAIL,4,4
	.comm	TTM_PAGE_FLAG_SWAPPED,4,4
	.comm	TTM_PAGE_FLAG_PERSISTENT_SWAP,4,4
	.comm	TTM_PAGE_FLAG_NO_RETRY,4,4
	.comm	PAGE_SHIFT,4,4
	.comm	ENOMEM,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
