// File: /workspace/github_c_makefile_star2_O2/pencode-lab[P]Shoit/shoit_progress.c
// Function: shoit_progress_show
void shoit_progress_show(progress_t *progress, float bit)
{
    int val = (int)(bit * progress->max);

    switch ( progress->style )
    {
        case PROGRESS_NUM_STYLE:                                                                                                     
            fprintf(stderr,"\033[?25l\033[31m\033[1m%s%d%%\033[?25h\033[0m\r",                                                       
                progress->title, (int)(progress->offset * val));                                                                               
            fflush(stderr);                                                                                                          
            break;                                                                                                                   
                                                                                                                                     
        case PROGRESS_CHR_STYLE:                                                                                                     
            memset(progress->pro, '.', val);                                                                                              
            fprintf(stderr,"\033[?25l\033[31m\033[1m%s  %-s| %d%%\033[?25h\033[0m\r",                                                
                progress->title, progress->pro, (int)(progress->offset * val));                                                                     
            fflush(stderr);                                                                                                          
            break;                                                                                                                   
                                                                                                                                     
        case PROGRESS_BGC_STYLE:                                                                                                     
            memset(progress->pro, 32, val);                                                                                               
            fprintf(stderr,"\033[?25l\033[31m\033[1m%s\033[41m %d%% %s\033[?25h\033[0m\r",                                           
                progress->title, (int)(progress->offset * val), progress->pro);                                                                     
            fflush(stderr);                                                                                                          
            break;                                                                                                                   
    }                                                                                                                                
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
cvtsi2ssl 0x14(%rdi), %xmm1
mulss %xmm0, %xmm1
cvttss2si %xmm1, %ebp
movl 0x10(%rdi), %eax
cmpl $0x2, %eax
je 0x3749
cmpl $0x1, %eax
je 0x370a
testl %eax, %eax
je 0x378b
popq %rbx
popq %r14
popq %rbp
retq
movq 0x20(%rbx), %rdi
movslq %ebp, %rdx
pushq $0x2e
popq %rsi
callq 0x2190
movq 0x58d8(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq 0x8(%rbx), %rdx
movq 0x20(%rbx), %rcx
cvtsi2ss %ebp, %xmm0
mulss 0x18(%rbx), %xmm0
cvttss2si %xmm0, %r8d
leaq 0x2e31(%rip), %rsi      # 0x6571
xorl %eax, %eax
callq 0x2250
jmp 0x37b4
movq 0x20(%rbx), %rdi
movslq %ebp, %r14
pushq $0x20
popq %rsi
movq %r14, %rdx
callq 0x2190
cvtsi2ss %r14d, %xmm0
movq 0x5891(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
mulss 0x18(%rbx), %xmm0
cvttss2si %xmm0, %ecx
movq 0x8(%rbx), %rdx
movq 0x20(%rbx), %r8
leaq 0x2e17(%rip), %rsi      # 0x6599
xorl %eax, %eax
callq 0x2250
jmp 0x37b4
movq 0x5866(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
movq 0x8(%rbx), %rdx
cvtsi2ss %ebp, %xmm0
mulss 0x18(%rbx), %xmm0
cvttss2si %xmm0, %ecx
leaq 0x2da3(%rip), %rsi      # 0x6550
xorl %eax, %eax
callq 0x2250
movq 0x583d(%rip), %rax      # 0x8ff8
movq (%rax), %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0x22f0