	.file	"extr_swapfile.c___swap_duplicate.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.type	__swap_duplicate, @function
__swap_duplicate:
.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
	mov	r13d, esi
	push	r12
	.cfi_def_cfa_offset 40
	.cfi_offset 12, -40
	mov	r12d, edi
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 24
	.cfi_def_cfa_offset 80
	mov	ebx, DWORD PTR EINVAL[rip]
	call	get_swap_device@PLT
	test	rax, rax
	je	.L23
	mov	edi, r12d
	mov	rbp, rax
	call	swp_offset@PLT
	mov	rdi, rbp
	mov	rsi, rax
	mov	rbx, rax
	call	lock_cluster_or_swap_info@PLT
	mov	r14, rax
	mov	rax, QWORD PTR 0[rbp]
	movzx	edi, BYTE PTR [rax+rbx]
	mov	r12d, edi
	call	swap_count@PLT
	xor	edi, edi
	cmp	QWORD PTR SWAP_MAP_BAD[rip], rax
	sete	dil
	call	unlikely@PLT
	test	rax, rax
	jne	.L24
	movzx	esi, BYTE PTR SWAP_HAS_CACHE[rip]
	mov	eax, esi
	mov	r15d, esi
	not	eax
	and	r15d, r12d
	and	eax, r12d
	cmp	sil, r13b
	je	.L25
	mov	ecx, r15d
	or	cl, al
	je	.L10
	movzx	edx, BYTE PTR COUNT_CONTINUED[rip]
	movzx	r8d, al
	movzx	esi, BYTE PTR SWAP_MAP_MAX[rip]
	not	edx
	and	edx, r8d
	cmp	edx, esi
	jge	.L11
	add	r13d, eax
	xor	r12d, r12d
	mov	ecx, r13d
	or	ecx, r15d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L24:
	mov	r12d, DWORD PTR ENOENT[rip]
	neg	r12d
.L5:
	mov	rdi, rbp
	mov	rsi, r14
	call	unlock_cluster_or_swap_info@PLT
	mov	rdi, rbp
	call	put_swap_device@PLT
.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
.L23:
	.cfi_restore_state
	neg	ebx
	mov	r12d, ebx
	jmp	.L1
	.p2align 4,,10
	.p2align 3
.L10:
	mov	r12d, DWORD PTR ENOENT[rip]
	neg	r12d
.L8:
	mov	rax, QWORD PTR 0[rbp]
	mov	BYTE PTR [rax+rbx], cl
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L25:
	test	r15b, r15b
	jne	.L20
	test	al, al
	je	.L7
	or	eax, esi
	xor	r12d, r12d
	mov	ecx, eax
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L11:
	jle	.L12
	mov	r12d, DWORD PTR EINVAL[rip]
	neg	r12d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L20:
	mov	r12d, DWORD PTR EEXIST[rip]
	mov	ecx, r15d
	or	ecx, eax
	neg	r12d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L7:
	test	r15b, r15b
	jne	.L20
	mov	r12d, DWORD PTR ENOENT[rip]
	mov	ecx, eax
	neg	r12d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L12:
	mov	edx, r8d
	mov	rsi, rbx
	mov	rdi, rbp
	mov	BYTE PTR 15[rsp], cl
	call	swap_count_continued@PLT
	movzx	ecx, BYTE PTR 15[rsp]
	test	rax, rax
	je	.L13
	movzx	ecx, BYTE PTR COUNT_CONTINUED[rip]
	xor	r12d, r12d
	or	ecx, r15d
	jmp	.L8
	.p2align 4,,10
	.p2align 3
.L13:
	mov	r12d, DWORD PTR ENOMEM[rip]
	neg	r12d
	jmp	.L8
	.cfi_endproc
.LFE0:
	.size	__swap_duplicate, .-__swap_duplicate
	.comm	SWAP_MAP_MAX,1,1
	.comm	SWAP_MAP_BAD,8,8
	.comm	SWAP_HAS_CACHE,1,1
	.comm	ENOMEM,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.comm	EEXIST,4,4
	.comm	COUNT_CONTINUED,1,1
	.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_swapfile.c___swap_duplicate.c"
	.text
	.align	2
	.syntax unified
	.arm
	.fpu softvfp
	.type	__swap_duplicate, %function
__swap_duplicate:
	@ args = 0, pretend = 0, frame = 0
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r3, r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r9, .L18
	mov	r8, r1
	ldr	r5, [r9]
	mov	r6, r0
	bl	get_swap_device
	subs	r4, r0, #0
	rsbeq	r5, r5, #0
	beq	.L1
	mov	r0, r6
	bl	swp_offset
	mov	r6, r0
	mov	r0, r4
	mov	r1, r6
	bl	lock_cluster_or_swap_info
	ldr	r3, [r4]
	mov	r10, r0
	ldrb	r7, [r3, r6]	@ zero_extendqisi2
	mov	r0, r7
	bl	swap_count
	ldr	r3, .L18+4
	ldr	r3, [r3]
	sub	r0, r3, r0
	clz	r0, r0
	lsr	r0, r0, #5
	bl	unlikely
	subs	r5, r0, #0
	bne	.L16
	ldr	r3, .L18+8
	ldrb	r3, [r3]	@ zero_extendqisi2
	cmp	r3, r8
	and	fp, r3, r7
	bic	r2, r7, r3
	beq	.L17
	orrs	r7, fp, r2
	beq	.L10
	ldr	r3, .L18+12
	ldr	r0, .L18+16
	ldrb	r1, [r3]	@ zero_extendqisi2
	ldrb	r0, [r0]	@ zero_extendqisi2
	bic	r1, r2, r1
	cmp	r1, r0
	bge	.L11
	add	r7, r2, r8
	orr	r3, fp, r7
	and	r7, r3, #255
	b	.L8
.L16:
	ldr	r3, .L18+20
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L5:
	mov	r1, r10
	mov	r0, r4
	bl	unlock_cluster_or_swap_info
	mov	r0, r4
	bl	put_swap_device
.L1:
	mov	r0, r5
	pop	{r3, r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L10:
	ldr	r3, .L18+20
	ldr	r5, [r3]
	rsb	r5, r5, #0
.L8:
	ldr	r3, [r4]
	strb	r7, [r3, r6]
	b	.L5
.L17:
	subs	r1, r2, #0
	movne	r1, #1
	cmp	fp, #0
	movne	r1, #0
	cmp	r1, #0
	orrne	r7, r2, r3
	bne	.L8
	cmp	fp, #0
	ldrne	r3, .L18+24
	ldreq	r3, .L18+20
	moveq	r7, r2
	ldr	r5, [r3]
	orrne	r7, fp, r2
	rsb	r5, r5, #0
	b	.L8
.L11:
	ldrgt	r5, [r9]
	rsbgt	r5, r5, #0
	bgt	.L8
.L12:
	mov	r1, r6
	mov	r0, r4
	bl	swap_count_continued
	cmp	r0, #0
	ldrne	r3, .L18+12
	ldreq	r3, .L18+28
	ldrbne	r3, [r3]	@ zero_extendqisi2
	ldreq	r5, [r3]
	orrne	r7, fp, r3
	rsbeq	r5, r5, #0
	b	.L8
.L19:
	.align	2
.L18:
	.word	EINVAL
	.word	SWAP_MAP_BAD
	.word	SWAP_HAS_CACHE
	.word	COUNT_CONTINUED
	.word	SWAP_MAP_MAX
	.word	ENOENT
	.word	EEXIST
	.word	ENOMEM
	.size	__swap_duplicate, .-__swap_duplicate
	.comm	SWAP_MAP_MAX,1,1
	.comm	SWAP_MAP_BAD,4,4
	.comm	SWAP_HAS_CACHE,1,1
	.comm	ENOMEM,4,4
	.comm	ENOENT,4,4
	.comm	EINVAL,4,4
	.comm	EEXIST,4,4
	.comm	COUNT_CONTINUED,1,1
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
