	.file	"extr_ui_qmenu.c_ScrollList_Draw.c"
	.intel_syntax noprefix
	.text
	.p2align 4
	.globl	ScrollList_Draw
	.type	ScrollList_Draw, @function
ScrollList_Draw:
.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
	push	rbx
	.cfi_def_cfa_offset 56
	.cfi_offset 3, -56
	sub	rsp, 40
	.cfi_def_cfa_offset 96
	mov	rax, QWORD PTR 64[rdi]
	mov	r12d, DWORD PTR 48[rdi]
	mov	rax, QWORD PTR [rax]
	mov	QWORD PTR 16[rsp], rax
	mov	rax, QWORD PTR 40[rdi]
	mov	QWORD PTR 24[rsp], rax
	mov	eax, DWORD PTR [rdi]
	test	eax, eax
	jle	.L1
	mov	DWORD PTR 12[rsp], 0
	mov	eax, DWORD PTR 8[rdi]
	mov	rbx, rdi
	.p2align 4,,10
	.p2align 3
.L2:
	mov	ebp, DWORD PTR 12[rsp]
	mov	r13d, DWORD PTR 52[rbx]
	imul	ebp, eax
	add	ebp, DWORD PTR 4[rbx]
	movsx	r10, ebp
	mov	r14d, ebp
	lea	r15, 0[0+r10*4]
	test	eax, eax
	jg	.L11
	jmp	.L5
	.p2align 4,,10
	.p2align 3
.L6:
	mov	r8, QWORD PTR text_color_normal[rip]
	mov	ecx, DWORD PTR UI_LEFT[rip]
	or	ecx, DWORD PTR UI_SMALLFONT[rip]
.L9:
	test	eax, eax
	je	.L10
	or	ecx, DWORD PTR UI_CENTER[rip]
.L10:
	mov	rax, QWORD PTR 32[rbx]
	mov	esi, r13d
	mov	edi, r12d
	add	r14d, 1
	mov	edx, DWORD PTR [rax+r15]
	add	r15, 4
	call	UI_DrawString@PLT
	mov	eax, DWORD PTR 8[rbx]
	add	r13d, DWORD PTR SMALLCHAR_HEIGHT[rip]
	lea	edx, 0[rbp+rax]
	cmp	edx, r14d
	jle	.L5
.L11:
	cmp	DWORD PTR 12[rbx], r14d
	jle	.L5
	mov	eax, DWORD PTR 56[rbx]
	and	eax, DWORD PTR QMF_CENTER_JUSTIFY[rip]
	cmp	DWORD PTR 16[rbx], r14d
	jne	.L6
	mov	edx, DWORD PTR 20[rbx]
	imul	edx, DWORD PTR SMALLCHAR_WIDTH[rip]
	lea	edi, -2[r12]
	test	eax, eax
	je	.L7
	mov	eax, edx
	shr	eax, 31
	add	eax, edx
	sar	eax
	add	eax, 1
	sub	edi, eax
.L7:
	mov	rax, QWORD PTR SMALLCHAR_HEIGHT[rip]
	mov	r8d, DWORD PTR listbar_color[rip]
	mov	esi, r13d
	lea	rcx, 2[rax]
	call	UI_FillRect@PLT
	mov	r8, QWORD PTR text_color_highlight[rip]
	mov	rsi, QWORD PTR 24[rsp]
	cmp	QWORD PTR 16[rsp], rsi
	je	.L24
	mov	ecx, DWORD PTR UI_LEFT[rip]
	mov	eax, DWORD PTR 56[rbx]
	or	ecx, DWORD PTR UI_SMALLFONT[rip]
	and	eax, DWORD PTR QMF_CENTER_JUSTIFY[rip]
	jmp	.L9
	.p2align 4,,10
	.p2align 3
.L5:
	mov	edx, DWORD PTR 24[rbx]
	add	edx, DWORD PTR 20[rbx]
	imul	edx, DWORD PTR SMALLCHAR_WIDTH[rip]
	add	DWORD PTR 12[rsp], 1
	mov	esi, DWORD PTR 12[rsp]
	add	r12d, edx
	cmp	DWORD PTR [rbx], esi
	jg	.L2
.L1:
	add	rsp, 40
	.cfi_remember_state
	.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
	ret
	.p2align 4,,10
	.p2align 3
.L24:
	.cfi_restore_state
	mov	ecx, DWORD PTR UI_PULSE[rip]
	mov	eax, DWORD PTR 56[rbx]
	or	ecx, DWORD PTR UI_LEFT[rip]
	and	eax, DWORD PTR QMF_CENTER_JUSTIFY[rip]
	or	ecx, DWORD PTR UI_SMALLFONT[rip]
	jmp	.L9
	.cfi_endproc
.LFE0:
	.size	ScrollList_Draw, .-ScrollList_Draw
	.comm	text_color_normal,8,8
	.comm	text_color_highlight,8,8
	.comm	listbar_color,4,4
	.comm	UI_SMALLFONT,4,4
	.comm	UI_PULSE,4,4
	.comm	UI_LEFT,4,4
	.comm	UI_CENTER,4,4
	.comm	SMALLCHAR_WIDTH,4,4
	.comm	SMALLCHAR_HEIGHT,8,8
	.comm	QMF_CENTER_JUSTIFY,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_qmenu.c_ScrollList_Draw.c"
	.text
	.align	2
	.global	ScrollList_Draw
	.syntax unified
	.arm
	.fpu softvfp
	.type	ScrollList_Draw, %function
ScrollList_Draw:
	@ args = 0, pretend = 0, frame = 16
	@ frame_needed = 0, uses_anonymous_args = 0
	push	{r4, r5, r6, r7, r8, r9, r10, fp, lr}
	mov	r4, r0
	ldr	r3, [r4, #48]
	sub	sp, sp, #28
	ldr	r3, [r3]
	ldr	r0, [r0]
	str	r3, [sp, #16]
	ldr	r3, [r4, #32]
	cmp	r0, #0
	ldr	r6, [r4, #36]
	str	r3, [sp, #20]
	ble	.L1
	mov	r3, #0
	ldr	r9, .L26
	str	r3, [sp, #12]
	ldr	r10, .L26+4
	ldr	r3, [r4, #8]
	ldr	fp, .L26+8
.L2:
	ldr	r7, [r4, #4]
	ldr	r2, [sp, #12]
	cmp	r3, #0
	mla	r2, r3, r2, r7
	ldr	r7, [r4, #40]
	str	r2, [sp, #8]
	ble	.L5
	ldr	r5, [sp, #8]
	ldr	r8, .L26+12
	b	.L3
.L6:
	ldr	r1, .L26+16
	ldr	r2, [r10]
	ldr	r3, [fp]
	ldr	ip, [r1]
	orr	r3, r2, r3
.L9:
	cmp	r0, #0
	ldrne	r2, .L26+20
	mov	r1, r7
	ldrne	r2, [r2]
	mov	r0, r6
	orrne	r3, r3, r2
	ldr	r2, [r4, #28]
	ldr	r2, [r2, r5, lsl #2]
	str	ip, [sp]
	bl	UI_DrawString
	ldr	r2, [sp, #8]
	ldr	r3, [r4, #8]
	add	r5, r5, #1
	add	r0, r2, r3
	ldr	r2, [r8]
	cmp	r0, r5
	add	r7, r7, r2
	ble	.L24
.L3:
	ldr	r2, [r4, #12]
	cmp	r2, r5
	ble	.L24
	ldr	r2, [r4, #16]
	ldr	r0, [r4, #44]
	ldr	r3, [r9]
	cmp	r2, r5
	and	r0, r0, r3
	bne	.L6
	ldr	r3, .L26+24
	ldr	r2, [r4, #20]
	ldr	r3, [r3]
	cmp	r0, #0
	mul	r2, r3, r2
	addne	r3, r2, r2, lsr #31
	asrne	r3, r3, #1
	ldr	r1, .L26+28
	addne	r3, r3, #1
	sub	r0, r6, #2
	ldr	ip, [r1]
	subne	r0, r0, r3
	ldr	r3, [r8]
	mov	r1, r7
	add	r3, r3, #2
	str	ip, [sp]
	bl	UI_FillRect
	ldr	r2, [sp, #16]
	ldr	r1, [sp, #20]
	ldr	r3, .L26+32
	cmp	r2, r1
	ldr	ip, [r3]
	ldreq	r3, .L26+36
	ldreq	r2, [r10]
	ldreq	r3, [r3]
	ldreq	lr, [fp]
	orreq	r3, r3, r2
	ldreq	r0, [r4, #44]
	ldrne	lr, [r10]
	ldrne	r3, [fp]
	ldrne	r0, [r4, #44]
	ldr	r2, [r9]
	orr	r3, lr, r3
	and	r0, r0, r2
	b	.L9
.L24:
	ldr	r0, [r4]
.L5:
	ldr	r1, [sp, #12]
	ldr	r2, [r4, #20]
	add	lr, r1, #1
	ldr	r1, .L26+24
	ldr	ip, [r4, #24]
	ldr	r1, [r1]
	add	r2, r2, ip
	cmp	r0, lr
	mla	r6, r1, r2, r6
	str	lr, [sp, #12]
	bgt	.L2
.L1:
	add	sp, sp, #28
	@ sp needed
	pop	{r4, r5, r6, r7, r8, r9, r10, fp, pc}
.L27:
	.align	2
.L26:
	.word	QMF_CENTER_JUSTIFY
	.word	UI_LEFT
	.word	UI_SMALLFONT
	.word	SMALLCHAR_HEIGHT
	.word	text_color_normal
	.word	UI_CENTER
	.word	SMALLCHAR_WIDTH
	.word	listbar_color
	.word	text_color_highlight
	.word	UI_PULSE
	.size	ScrollList_Draw, .-ScrollList_Draw
	.comm	text_color_normal,4,4
	.comm	text_color_highlight,4,4
	.comm	listbar_color,4,4
	.comm	UI_SMALLFONT,4,4
	.comm	UI_PULSE,4,4
	.comm	UI_LEFT,4,4
	.comm	UI_CENTER,4,4
	.comm	SMALLCHAR_WIDTH,4,4
	.comm	SMALLCHAR_HEIGHT,4,4
	.comm	QMF_CENTER_JUSTIFY,4,4
	.ident	"GCC: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0"
	.section	.note.GNU-stack,"",%progbits
