	.file	"extr_Platform.c_Platform_setSwapValues.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	Platform_setSwapValues
	.type	Platform_setSwapValues, @function
Platform_setSwapValues:
.LFB0:
	.cfi_startproc
	endbr64
	push	r13
	.cfi_def_cfa_offset 16
	.cfi_offset 13, -16
	xor	edx, edx
	xor	esi, esi
	push	r12
	.cfi_def_cfa_offset 24
	.cfi_offset 12, -24
	push	rbp
	.cfi_def_cfa_offset 32
	.cfi_offset 6, -32
	push	rbx
	.cfi_def_cfa_offset 40
	.cfi_offset 3, -40
	mov	rbx, rdi
	sub	rsp, 8
	.cfi_def_cfa_offset 48
	mov	rbp, QWORD PTR 16[rdi]
	mov	edi, DWORD PTR SWAP_NSWAP[rip]
	call	swapctl@PLT
	test	eax, eax
	jne	.L15
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 40
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	ret
	.p2align 4,,10
	.p2align 3
.L15:
	.cfi_restore_state
	mov	esi, 12
	mov	edi, eax
	mov	r13d, eax
	call	xCalloc@PLT
	mov	edi, DWORD PTR SWAP_STATS[rip]
	mov	edx, r13d
	mov	rsi, rax
	mov	r12, rax
	call	swapctl@PLT
	cmp	eax, -1
	je	.L13
	xor	esi, esi
	xor	edi, edi
	test	r13d, r13d
	jle	.L5
	lea	eax, -1[r13]
	mov	r11d, DWORD PTR SWF_ENABLE[rip]
	mov	rcx, r12
	xor	esi, esi
	lea	rax, 3[rax+rax*2]
	mov	r10d, DWORD PTR DEV_BSIZE[rip]
	xor	edi, edi
	mov	r8d, 1024
	lea	r9, [r12+rax*4]
	.p2align 4,,10
	.p2align 3
.L7:
	test	DWORD PTR [rcx], r11d
	je	.L6
	mov	eax, r8d
	cdq
	idiv	r10d
	mov	r13d, eax
	mov	eax, DWORD PTR 4[rcx]
	cdq
	idiv	r13d
	cdqe
	add	rsi, rax
	mov	eax, DWORD PTR 8[rcx]
	cdq
	idiv	r13d
	cdqe
	add	rdi, rax
.L6:
	add	rcx, 12
	cmp	rcx, r9
	jne	.L7
.L5:
	mov	rax, QWORD PTR 8[rbx]
	mov	QWORD PTR 0[rbp], rdi
	mov	QWORD PTR [rbx], rdi
	mov	QWORD PTR 8[rbp], rsi
	mov	QWORD PTR [rax], rsi
.L13:
	add	rsp, 8
	.cfi_def_cfa_offset 40
	mov	rdi, r12
	pop	rbx
	.cfi_def_cfa_offset 32
	pop	rbp
	.cfi_def_cfa_offset 24
	pop	r12
	.cfi_def_cfa_offset 16
	pop	r13
	.cfi_def_cfa_offset 8
	jmp	free@PLT
	.cfi_endproc
.LFE0:
	.size	Platform_setSwapValues, .-Platform_setSwapValues
	.comm	SWF_ENABLE,4,4
	.comm	SWAP_STATS,4,4
	.comm	SWAP_NSWAP,4,4
	.comm	DEV_BSIZE,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_Platform.c_Platform_setSwapValues.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.global	Platform_setSwapValues
	.syntax unified
	.arm
	.fpu softvfp
	.type	Platform_setSwapValues, %function
Platform_setSwapValues:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r8, r0
	mov	r2, #0
	ldr	r3, .L17
	sub	sp, sp, #20
	ldr	r0, [r3]
	ldr	r3, [r8, #12]
	mov	r1, r2
	str	r3, [sp, #8]
	bl	swapctl
	subs	r5, r0, #0
	bne	.L15
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L15:
	mov	r1, #12
	bl	xCalloc
	ldr	r3, .L17+4
	mov	r1, r0
	mov	r10, r0
	mov	r2, r5
	ldr	r0, [r3]
	bl	swapctl
	cmn	r0, #1
	beq	.L3
	cmp	r5, #0
	mov	r6, #0
	mov	r7, #0
	ble	.L16
	ldr	r2, .L17+8
	ldr	r3, .L17+12
	ldr	r9, [r2]
	ldr	fp, [r3]
	add	r5, r5, r5, lsl #1
	add	r5, r10, r5, lsl #2
	mov	r4, r10
	str	r10, [sp, #12]
	mov	r10, fp
	mov	fp, r9
	mov	r9, r8
	mov	r8, r5
	stm	sp, {r6-r7}
.L7:
	ldr	r1, [r4]
	tst	fp, r1
	beq	.L6
	mov	r1, r10
	mov	r0, #1024
	bl	__aeabi_idiv
	mov	r5, r0
	ldr	r0, [r4, #4]
	mov	r1, r5
	bl	__aeabi_idiv
	mov	ip, r0
	mov	r1, r5
	adds	r6, r6, ip
	ldr	r0, [r4, #8]
	adc	r7, r7, ip, asr #31
	bl	__aeabi_idiv
	ldmia	sp, {r2-r3}
	adds	r2, r2, r0
	adc	r3, r3, r0, asr #31
	stm	sp, {r2-r3}
.L6:
	add	r4, r4, #12
	cmp	r4, r8
	bne	.L7
	mov	r8, r9
	ldr	r10, [sp, #12]
.L5:
	mov	r0, r10
	ldmia	sp, {r1-r2}
	ldr	r3, [r8, #8]
	ldr	ip, [sp, #8]
	stm	ip, {r1-r2}
	stm	r8, {r1-r2}
	str	r6, [ip, #8]
	str	r7, [ip, #12]
	stm	r3, {r6-r7}
.L13:
	add	sp, sp, #20
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	free
.L3:
	mov	r0, r10
	b	.L13
.L16:
	stm	sp, {r6-r7}
	b	.L5
.L18:
	.align	2
.L17:
	.word	SWAP_NSWAP
	.word	SWAP_STATS
	.word	SWF_ENABLE
	.word	DEV_BSIZE
	.size	Platform_setSwapValues, .-Platform_setSwapValues
	.comm	SWF_ENABLE,4,4
	.comm	SWAP_STATS,4,4
	.comm	SWAP_NSWAP,4,4
	.comm	DEV_BSIZE,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
