// File: /workspace/github_c_makefile_star2_O0/albinoloverats[P]hide/common/src/cli.c
// Function: cli_display_bars
static void cli_display_bars(cli_progress_s *t, cli_progress_s *c, cli_bps_s *bps)
{
	double total   = PERCENT * (t->offset + (1.0f * c->offset / c->size)) / t->size;
	double current = PERCENT * c->offset / c->size;
	bool single = t->size == 1;

	if (!single)
	{
		char name[CLI_TRUNCATED_DISPLAY_LONG] = { 0x0 };
		char *nm = c->display ? /*dir_get_name(c->display, '.')*/ : CLI_UNKNOWN;
		if (strlen(nm) < CLI_TRUNCATED_DISPLAY_LONG)
			strcpy(name, nm);
		else
		{
			strncpy(name, nm, CLI_TRUNCATED_DISPLAY_SHORT);
			strcat(name, CLI_TRUNCATED_ELLIPSE);
			if (cli_width > CLI_DEFAULT)
				strcat(name, nm + (strlen(nm) - CLI_TRUNCATED_DISPLAY_SHORT));
		}
		fprintf(stderr, "\x1B[1F"); // go up 1 line
		cli_display_bar(name, c, current);
		cli_display_bps(bps);
		fprintf(stderr, "\n");
	}
	cli_display_bar("Total", single ? c : t, total);

	return;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq %rcx, -0x68(%rbp)
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x60(%rbp)
testq %rax, %rax
movss %xmm0, -0x5c(%rbp)
js 0x4d7b
movss -0x60(%rbp), %xmm0
movss %xmm0, -0x5c(%rbp)
movss -0x5c(%rbp), %xmm0
movss %xmm0, -0x7c(%rbp)
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq %rcx, -0x78(%rbp)
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x70(%rbp)
testq %rax, %rax
movss %xmm0, -0x6c(%rbp)
js 0x4dc9
movss -0x70(%rbp), %xmm0
movss %xmm0, -0x6c(%rbp)
movq -0x78(%rbp), %rax
movss -0x6c(%rbp), %xmm0
movss %xmm0, -0x88(%rbp)
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x84(%rbp)
testq %rax, %rax
movss %xmm0, -0x80(%rbp)
js 0x4e15
movss -0x84(%rbp), %xmm0
movss %xmm0, -0x80(%rbp)
movq -0x68(%rbp), %rax
movss -0x7c(%rbp), %xmm0
movss -0x88(%rbp), %xmm1
movss -0x80(%rbp), %xmm2
divss %xmm2, %xmm1
addss %xmm1, %xmm0
movss 0x1525(%rip), %xmm1     # 0x6360
movss %xmm1, -0x98(%rbp)
mulss %xmm1, %xmm0
movss %xmm0, -0x94(%rbp)
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0x90(%rbp)
testq %rax, %rax
movss %xmm0, -0x8c(%rbp)
js 0x4e90
movss -0x90(%rbp), %xmm0
movss %xmm0, -0x8c(%rbp)
movss -0x94(%rbp), %xmm0
movss -0x8c(%rbp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x20(%rbp)
movq -0x10(%rbp), %rcx
movq (%rcx), %rax
movq 0x8(%rcx), %rcx
movq %rcx, -0xa8(%rbp)
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xa0(%rbp)
testq %rax, %rax
movss %xmm0, -0x9c(%rbp)
js 0x4f00
movss -0xa0(%rbp), %xmm0
movss %xmm0, -0x9c(%rbp)
movq -0xa8(%rbp), %rax
movss -0x98(%rbp), %xmm1
movss -0x9c(%rbp), %xmm0
mulss %xmm1, %xmm0
movss %xmm0, -0xb4(%rbp)
movq %rax, %rdx
shrq %rdx
movl %eax, %ecx
andl $0x1, %ecx
orq %rdx, %rcx
cvtsi2ss %rcx, %xmm0
addss %xmm0, %xmm0
cvtsi2ss %rax, %xmm1
movss %xmm1, -0xb0(%rbp)
testq %rax, %rax
movss %xmm0, -0xac(%rbp)
js 0x4f64
movss -0xb0(%rbp), %xmm0
movss %xmm0, -0xac(%rbp)
movss -0xb4(%rbp), %xmm0
movss -0xac(%rbp), %xmm1
divss %xmm1, %xmm0
cvtss2sd %xmm0, %xmm0
movsd %xmm0, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x1, 0x8(%rax)
sete %al
andb $0x1, %al
movb %al, -0x29(%rbp)
testb $0x1, -0x29(%rbp)
jne 0x50bb
leaq -0x50(%rbp), %rdi
xorl %esi, %esi
movl $0x19, %edx
callq 0x2170
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0xc0(%rbp)
cmpq $0x0, %rax
je 0x4fd1
movq -0xc0(%rbp), %rax
movq %rax, -0xc8(%rbp)
jmp 0x4fe1
leaq 0x13c3(%rip), %rax      # 0x639b
movq %rax, -0xc8(%rbp)
jmp 0x4fe1
movq -0xc8(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2100
cmpq $0x19, %rax
jae 0x500a
leaq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
callq 0x20a0
jmp 0x5070
leaq -0x50(%rbp), %rdi
movq -0x58(%rbp), %rsi
movl $0xa, %edx
callq 0x2070
leaq -0x50(%rbp), %rdi
leaq 0x137e(%rip), %rsi      # 0x63a5
callq 0x2320
cmpl $0x50, 0x31b9(%rip)     # 0x81ec
jle 0x506e
leaq -0x50(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0x58(%rbp), %rax
movq %rax, -0xd8(%rbp)
movq -0x58(%rbp), %rdi
callq 0x2100
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdi
subq $0xa, %rax
addq %rax, %rsi
callq 0x2320
jmp 0x5070
movq 0x2f81(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
leaq 0x1329(%rip), %rsi      # 0x63aa
movb $0x0, %al
callq 0x2200
leaq -0x50(%rbp), %rdi
movq -0x10(%rbp), %rsi
movsd -0x28(%rbp), %xmm0
callq 0x5150
movq -0x18(%rbp), %rdi
callq 0x5320
movq 0x2f4e(%rip), %rax      # 0x7ff8
movq (%rax), %rdi
leaq 0x11f1(%rip), %rsi      # 0x62a5
movb $0x0, %al
callq 0x2200
testb $0x1, -0x29(%rbp)
je 0x50ce
movq -0x10(%rbp), %rax
movq %rax, -0xe0(%rbp)
jmp 0x50d9
movq -0x8(%rbp), %rax
movq %rax, -0xe0(%rbp)
movq -0xe0(%rbp), %rsi
movsd -0x20(%rbp), %xmm0
leaq 0x12c3(%rip), %rdi      # 0x63af
callq 0x5150
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)