// File: /workspace/github_c_makefile_star2_O1/pencode-lab[P]Shoit/shoit_progress.c
// Function: shoit_progress_show_all
void shoit_progress_show_all(FILE *fp,progress_t *progress, float bit,long total)               
{                                                                                                                                    
                                                                                                                                     
                                                                                                                                     
    int val = (int)(bit * progress->max);                                                                                                 
    char buffer[512]={0};                                                                                                            

    float mbps = 1e-6 * 8*progress->total / (progress->utime == 0 ? .01 : progress->utime);
                                                                                                                                     
    memset(buffer,0,512);                                                                                                            
    snprintf(buffer,sizeof(buffer)-1,"%gMbps    %ld/%ldK    %.2fs    ",mbps,progress->total>>10,total,progress->utime);                                        
                                                                                                                                     
    int prog = (int)(progress->offset * val);                                                                                             
                                                                                                                                     
    if(prog>100) prog=100;                                                                                                           
                                                                                                                                     
    fprintf(fp,"\033[?25l\033[31m\033[1m%s%d%%\033[?25h\033[0m\r",                                                                   
        buffer, prog);                                                                                                               
    fflush(fp);                                                                                                                      
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x230, %rsp            # imm = 0x230
movq %rdx, %r12
movss %xmm0, 0xc(%rsp)
movq %rsi, %r15
movq %rdi, %rbx
xorps %xmm0, %xmm0
cvtsi2ssl 0x14(%rsi), %xmm0
movaps %xmm0, 0x10(%rsp)
leaq 0x30(%rsp), %r14
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
xorl %esi, %esi
callq 0x2190
movq 0x28(%r15), %r13
movss 0x30(%r15), %xmm0
xorps %xmm1, %xmm1
ucomiss %xmm0, %xmm1
xorps %xmm1, %xmm1
cvtss2sd %xmm0, %xmm1
movaps %xmm1, %xmm0
jne 0x3a0b
movaps %xmm1, %xmm0
jp 0x3a0b
movsd 0x2b35(%rip), %xmm0     # 0x6540
movsd %xmm1, 0x28(%rsp)
movq %r13, %xmm1
punpckldq 0x2b32(%rip), %xmm1 # xmm1 = xmm1[0],mem[0],xmm1[1],mem[1]
subpd 0x2b3a(%rip), %xmm1     # 0x6560
movapd %xmm1, %xmm2
unpckhpd %xmm1, %xmm2            # xmm2 = xmm2[1],xmm1[1]
addsd %xmm1, %xmm2
mulsd 0x2b0e(%rip), %xmm2     # 0x6548
divsd %xmm0, %xmm2
movaps 0x10(%rsp), %xmm0
mulss 0xc(%rsp), %xmm0
movaps %xmm0, 0x10(%rsp)
xorps %xmm0, %xmm0
cvtsd2ss %xmm2, %xmm0
movss %xmm0, 0xc(%rsp)
movl $0x200, %edx            # imm = 0x200
movq %r14, %rdi
xorl %esi, %esi
callq 0x2190
xorps %xmm0, %xmm0
cvtss2sd 0xc(%rsp), %xmm0
shrq $0xa, %r13
leaq 0x2b65(%rip), %rdx      # 0x65e3
movl $0x1ff, %esi            # imm = 0x1FF
movq %r14, %rdi
movq %r13, %rcx
movq %r12, %r8
movsd 0x28(%rsp), %xmm1
movb $0x2, %al
callq 0x2130
cvttps2dq 0x10(%rsp), %xmm0
cvtdq2ps %xmm0, %xmm0
mulss 0x18(%r15), %xmm0
cvttss2si %xmm0, %eax
cmpl $0x64, %eax
movl $0x64, %ecx
cmovll %eax, %ecx
leaq 0x2ab2(%rip), %rsi      # 0x6570
movq %rbx, %rdi
movq %r14, %rdx
xorl %eax, %eax
callq 0x2250
movq %rbx, %rdi
callq 0x22f0
addq $0x230, %rsp            # imm = 0x230
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq