// File: /workspace/github_c_makefile_star2_O0/TurkeyMcMac[P]ts3d/src/ui-util.c
// Function: meter_draw
void meter_draw(const struct meter *meter)
{
	int full = meter->width * meter->fraction;
	int i;
	for (i = 0; meter->label[i] && i < full; ++i) {
		mvwaddch(meter->win, meter->y, meter->x + i,
			meter->full_style | meter->label[i]);
	}
	if (i < full) {
		do {
			mvwaddch(meter->win,meter->y, meter->x + i,
				meter->full_style | ' ');
		} while (++i < full);
	} else {
		for (; meter->label[i]; ++i) {
			mvwaddch(meter->win, meter->y, meter->x + i,
				meter->empty_style | meter->label[i]);
		}
	}
	for (; i < meter->width; ++i) {
		mvwaddch(meter->win, meter->y, meter->x + i,
			meter->empty_style | ' ');
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
cvtsi2sdl 0x20(%rax), %xmm0
movq -0x8(%rbp), %rax
mulsd 0x8(%rax), %xmm0
cvttsd2si %xmm0, %eax
movl %eax, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
xorl %eax, %eax
cmpl $0x0, %ecx
movb %al, -0x11(%rbp)
je 0x10121
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
setl %al
movb %al, -0x11(%rbp)
movb -0x11(%rbp), %al
testb $0x1, %al
jne 0x1012a
jmp 0x10182
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
addl -0x10(%rbp), %edx
callq 0x2310
cmpl $-0x1, %eax
jne 0x1014f
jmp 0x10174
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %eax
orl %eax, %esi
callq 0x2210
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x100fc
movl -0x10(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0x101d8
jmp 0x1018c
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
addl -0x10(%rbp), %edx
callq 0x2310
cmpl $-0x1, %eax
jne 0x101b1
jmp 0x101c8
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x10(%rax), %esi
orl $0x20, %esi
callq 0x2210
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
cmpl -0xc(%rbp), %eax
jl 0x1018c
jmp 0x10242
jmp 0x101da
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
cmpb $0x0, (%rax,%rcx)
je 0x10240
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
addl -0x10(%rbp), %edx
callq 0x2310
cmpl $-0x1, %eax
jne 0x10210
jmp 0x10235
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %esi
movq -0x8(%rbp), %rax
movq (%rax), %rax
movslq -0x10(%rbp), %rcx
movsbl (%rax,%rcx), %eax
orl %eax, %esi
callq 0x2210
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x101da
jmp 0x10242
jmp 0x10244
movl -0x10(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x20(%rcx), %eax
jge 0x10297
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x1c(%rax), %esi
movq -0x8(%rbp), %rax
movl 0x18(%rax), %edx
addl -0x10(%rbp), %edx
callq 0x2310
cmpl $-0x1, %eax
jne 0x10275
jmp 0x1028c
movq -0x8(%rbp), %rax
movq 0x28(%rax), %rdi
movq -0x8(%rbp), %rax
movl 0x14(%rax), %esi
orl $0x20, %esi
callq 0x2210
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x10244
addq $0x20, %rsp
popq %rbp
retq
nopl (%rax)