	.file	"extr_ui.c_SetPersistenceSize.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	SetPersistenceSize
	.type	SetPersistenceSize, @function
SetPersistenceSize:
.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
	xor	r12d, r12d
	push	rbp
	.cfi_def_cfa_offset 48
	.cfi_offset 6, -48
	xor	ebp, ebp
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 8
	.cfi_def_cfa_offset 64
	mov	edi, DWORD PTR hDeviceList[rip]
	mov	ebx, DWORD PTR MB[rip]
	call	ComboBox_GetCurSel@PLT
	test	rax, rax
	jns	.L13
.L2:
	mov	esi, DWORD PTR IDC_PERSISTENCE_SLIDER[rip]
	mov	edi, DWORD PTR hMainDialog[rip]
	call	GetDlgItem@PLT
	mov	edx, DWORD PTR TRUE[rip]
	mov	esi, DWORD PTR TBM_SETRANGEMIN[rip]
	xor	ecx, ecx
	mov	edi, eax
	mov	r13d, eax
	call	SendMessage@PLT
	mov	edx, DWORD PTR TRUE[rip]
	mov	ecx, r12d
	mov	edi, r13d
	mov	esi, DWORD PTR TBM_SETRANGEMAX[rip]
	call	SendMessage@PLT
	mov	edx, DWORD PTR TRUE[rip]
	mov	edi, r13d
	mov	ecx, ebp
	mov	esi, DWORD PTR TBM_SETPOS[rip]
	call	SendMessage@PLT
	add	rsp, 8
	.cfi_remember_state
	.cfi_def_cfa_offset 56
	mov	edi, ebp
	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	SetPersistencePos@PLT
	.p2align 4,,10
	.p2align 3
.L13:
	.cfi_restore_state
	mov	r12d, DWORD PTR SelectedDrive[rip]
	mov	edi, DWORD PTR persistence_size[rip]
	xor	r13d, r13d
	xor	r15d, r15d
	sub	r12d, DWORD PTR img_report[rip]
	mov	esi, r12d
	call	min@PLT
	mov	esi, DWORD PTR IDC_PERSISTENCE_UNITS[rip]
	mov	edi, DWORD PTR hMainDialog[rip]
	mov	DWORD PTR persistence_size[rip], eax
	mov	ebp, eax
	call	GetDlgItem@PLT
	mov	edi, eax
	mov	r14d, eax
	call	ComboBox_ResetContent@PLT
	mov	edi, eax
	call	IGNORE_RETVAL@PLT
.L5:
	mov	rdi, QWORD PTR MSG_022[rip]
	add	rdi, r13
	call	lmprintf@PLT
	mov	edi, r14d
	mov	esi, eax
	call	ComboBox_AddStringU@PLT
	mov	edx, r13d
	mov	edi, r14d
	mov	esi, eax
	call	ComboBox_SetItemData@PLT
	mov	edi, eax
	call	IGNORE_RETVAL@PLT
	lea	eax, 0[0+rbx*8]
	mov	edx, DWORD PTR SelectedDrive[rip]
	sub	eax, ebx
	cmp	edx, eax
	mov	eax, ebx
	cmovg	r15d, r13d
	sal	ebx, 11
	sal	eax, 10
	cmp	edx, ebx
	jl	.L4
	add	r13, 1
	cmp	r13, 3
	je	.L4
	mov	ebx, eax
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L4:
	mov	esi, DWORD PTR persistence_unit_selection[rip]
	test	esi, esi
	jns	.L6
	mov	DWORD PTR persistence_unit_selection[rip], r15d
	mov	esi, r15d
.L6:
	mov	edi, r14d
	call	ComboBox_SetCurSel@PLT
	mov	edi, eax
	call	IGNORE_RETVAL@PLT
	mov	eax, ebp
	mov	ecx, DWORD PTR MB[rip]
	mov	esi, DWORD PTR persistence_unit_selection[rip]
	cdq
	idiv	ecx
	mov	ebp, eax
	mov	eax, r12d
	cdq
	idiv	ecx
	mov	r12d, eax
	test	esi, esi
	jle	.L2
	xor	ecx, ecx
	.p2align 4,,10
	.p2align 3
.L7:
	test	ebp, ebp
	lea	eax, 1023[rbp]
	lea	edx, 1023[r12]
	cmovs	ebp, eax
	sar	ebp, 10
	test	r12d, r12d
	cmovs	r12d, edx
	add	ecx, 1
	sar	r12d, 10
	cmp	esi, ecx
	jne	.L7
	jmp	.L2
	.cfi_endproc
.LFE0:
	.size	SetPersistenceSize, .-SetPersistenceSize
	.comm	persistence_unit_selection,4,4
	.comm	persistence_size,4,4
	.comm	img_report,4,4
	.comm	hMainDialog,4,4
	.comm	hDeviceList,4,4
	.comm	TRUE,8,8
	.comm	TBM_SETRANGEMIN,4,4
	.comm	TBM_SETRANGEMAX,4,4
	.comm	TBM_SETPOS,4,4
	.comm	SelectedDrive,4,4
	.comm	MSG_022,8,8
	.comm	MB,4,4
	.comm	IDC_PERSISTENCE_UNITS,4,4
	.comm	IDC_PERSISTENCE_SLIDER,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_ui.c_SetPersistenceSize.c"
	.text
	.global	__aeabi_idiv
	.align	2
	.global	SetPersistenceSize
	.syntax unified
	.arm
	.fpu softvfp
	.type	SetPersistenceSize, %function
SetPersistenceSize:
	@ args = 0, pretend = 0, frame = 8
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	ldr	r3, .L14
	ldr	r8, .L14+4
	ldr	r0, [r3]
	sub	sp, sp, #12
	ldr	r4, [r8]
	bl	ComboBox_GetCurSel
	cmp	r0, #0
	bge	.L13
	mov	r4, #0
	mov	r5, r4
	ldr	r6, .L14+8
.L2:
	ldr	r3, .L14+12
	ldr	r0, [r6]
	ldr	r1, [r3]
	bl	GetDlgItem
	mov	r6, r0
	ldr	r7, .L14+16
	ldr	r3, .L14+20
	ldr	r2, [r7]
	ldr	r1, [r3]
	mov	r3, #0
	bl	SendMessage
	ldr	r1, .L14+24
	mov	r3, r5
	ldr	r2, [r7]
	mov	r0, r6
	ldr	r1, [r1]
	bl	SendMessage
	ldr	r3, .L14+28
	mov	r0, r6
	ldr	r1, [r3]
	ldr	r2, [r7]
	mov	r3, r4
	bl	SendMessage
	mov	r0, r4
	add	sp, sp, #12
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	b	SetPersistencePos
.L13:
	ldr	fp, .L14+32
	ldr	r3, .L14+36
	ldr	r9, [fp]
	ldr	r3, [r3]
	ldr	r5, .L14+40
	sub	r3, r9, r3
	mov	r1, r3
	ldr	r0, [r5]
	str	r3, [sp, #4]
	bl	min
	mov	r2, r0
	ldr	r3, .L14+44
	ldr	r6, .L14+8
	ldr	r1, [r3]
	str	r0, [sp]
	ldr	r0, [r6]
	str	r2, [r5]
	bl	GetDlgItem
	mov	r7, #0
	mov	r5, r0
	bl	ComboBox_ResetContent
	bl	IGNORE_RETVAL
	mov	r9, r7
	ldr	r10, .L14+48
.L5:
	ldr	r0, [r10]
	add	r0, r9, r0
	bl	lmprintf
	mov	r1, r0
	mov	r0, r5
	bl	ComboBox_AddStringU
	mov	r2, r9
	mov	r1, r0
	mov	r0, r5
	bl	ComboBox_SetItemData
	bl	IGNORE_RETVAL
	ldr	r3, [fp]
	rsb	r2, r4, r4, lsl #3
	cmp	r3, r2
	movgt	r7, r9
	cmp	r3, r4, lsl #11
	add	r9, r9, #1
	lsl	r4, r4, #10
	blt	.L4
	cmp	r9, #3
	bne	.L5
.L4:
	ldr	fp, .L14+52
	mov	r0, r5
	ldr	r1, [fp]
	cmp	r1, #0
	movlt	r1, r7
	strlt	r7, [fp]
	bl	ComboBox_SetCurSel
	bl	IGNORE_RETVAL
	ldr	r5, [r8]
	ldr	r0, [sp]
	mov	r1, r5
	bl	__aeabi_idiv
	mov	r1, r5
	mov	r4, r0
	ldr	r0, [sp, #4]
	bl	__aeabi_idiv
	ldr	ip, [fp]
	mov	r5, r0
	cmp	ip, #0
	ble	.L2
	mov	r1, #0
.L7:
	add	r2, r4, #1020
	add	r3, r5, #1020
	cmp	r4, #0
	add	r2, r2, #3
	movlt	r4, r2
	add	r3, r3, #3
	cmp	r5, #0
	movlt	r5, r3
	add	r1, r1, #1
	cmp	ip, r1
	asr	r4, r4, #10
	asr	r5, r5, #10
	bne	.L7
	b	.L2
.L15:
	.align	2
.L14:
	.word	hDeviceList
	.word	MB
	.word	hMainDialog
	.word	IDC_PERSISTENCE_SLIDER
	.word	TRUE
	.word	TBM_SETRANGEMIN
	.word	TBM_SETRANGEMAX
	.word	TBM_SETPOS
	.word	SelectedDrive
	.word	img_report
	.word	persistence_size
	.word	IDC_PERSISTENCE_UNITS
	.word	MSG_022
	.word	persistence_unit_selection
	.size	SetPersistenceSize, .-SetPersistenceSize
	.comm	persistence_unit_selection,4,4
	.comm	persistence_size,4,4
	.comm	img_report,4,4
	.comm	hMainDialog,4,4
	.comm	hDeviceList,4,4
	.comm	TRUE,4,4
	.comm	TBM_SETRANGEMIN,4,4
	.comm	TBM_SETRANGEMAX,4,4
	.comm	TBM_SETPOS,4,4
	.comm	SelectedDrive,4,4
	.comm	MSG_022,4,4
	.comm	MB,4,4
	.comm	IDC_PERSISTENCE_UNITS,4,4
	.comm	IDC_PERSISTENCE_SLIDER,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
