// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: kmg
static s7_pointer kmg(s7_scheme *sc, s7_int bytes)
                {
                    block_t *b;
                    int len = 0;
                    b = mallocate(sc, 128);
                    if (bytes < 1000)
                        len = snprintf((char *)block_data(b), 128, "%" print_s7_int, bytes);
                    else
                    {
                        if (bytes < 1000000)
                            len = snprintf((char *)block_data(b), 128, "%.1fk", bytes / 1000.0);
                        else
                        {
                            if (bytes < 1000000000)
                                len = snprintf((char *)block_data(b), 128, "%.1fM", bytes / 1000000.0);
                            else len = snprintf((char *)block_data(b), 128, "%.1fG", bytes / 1000000000.0);
                        }
                    }
                    return(cons(sc, make_integer(sc, bytes), block_to_string(sc, b, len)));
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movq %rsi, %r15
movq %rdi, %rbx
movq 0x870(%rdi), %r14
testq %r14, %r14
je 0xeb716
movq 0x18(%r14), %rax
movq %rax, 0x870(%rbx)
jmp 0xeb7b9
movq 0x838(%rbx), %r14
testq %r14, %r14
jne 0xeb761
movl $0x2800, %edi           # imm = 0x2800
callq 0x8480
movq %rax, %r14
movq %rax, 0x838(%rbx)
addq $0x28, %rax
movl $0xff, %ecx
movq %rax, -0x10(%rax)
movl $0x0, -0x20(%rax)
addq $0x28, %rax
decl %ecx
jne 0xeb73f
movq $0x0, -0x10(%rax)
movl $0x0, -0x20(%rax)
movq 0x18(%r14), %rax
movq %rax, 0x838(%rbx)
movq 0x8c8(%rbx), %rcx
leaq 0x80(%rcx), %rdx
cmpq $0x10000, %rdx          # imm = 0x10000
jbe 0xeb79d
movl $0x10000, %edi          # imm = 0x10000
callq 0x8480
movq %rax, 0x8d0(%rbx)
movl $0x80, %edx
xorl %ecx, %ecx
jmp 0xeb7a4
movq 0x8d0(%rbx), %rax
addq %rax, %rcx
movq %rdx, 0x8c8(%rbx)
movq %rcx, (%r14)
movl $0x7, 0x8(%r14)
movq $0x80, 0x10(%r14)
cmpq $0x3e7, %r15            # imm = 0x3E7
jg 0xeb7e5
movq (%r14), %rdi
leaq 0x2f3c9(%rip), %rdx     # 0x11ab9d
movl $0x80, %esi
movq %r15, %rcx
xorl %eax, %eax
callq 0x8210
jmp 0xeb811
cmpq $0xf423f, %r15          # imm = 0xF423F
ja 0xeb829
movq (%r14), %rdi
cvtsi2sd %r15, %xmm0
divsd 0x1a862(%rip), %xmm0    # 0x106060
leaq 0x2e49b(%rip), %rdx     # 0x119ca0
movl $0x80, %esi
movb $0x1, %al
callq 0x8210
movl %eax, %ebp
cmpq $0x7ff, %r15            # imm = 0x7FF
ja 0xeb869
leaq 0x5b12d(%rip), %rax     # 0x146950
movq (%rax,%r15,8), %r12
jmp 0xeb8a4
xorl %eax, %eax
cmpq $0x3b9aca00, %r15       # imm = 0x3B9ACA00
setb %al
cvtsi2sd %r15, %xmm0
leaq 0x2e465(%rip), %rcx     # 0x119ca6
leaq 0x2e464(%rip), %rdx     # 0x119cac
cmovbq %rcx, %rdx
movq (%r14), %rdi
leaq 0x1e77a(%rip), %rcx     # 0x109fd0
divsd (%rcx,%rax,8), %xmm0
movl $0x80, %esi
movb $0x1, %al
callq 0x8210
movl %eax, %ebp
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xeb888
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r12
movq $0xb, (%r12)
movq %r15, 0x8(%r12)
movslq %ebp, %rdx
movq %rbx, %rdi
movq %r14, %rsi
callq 0x37ebe
movq %rax, %r14
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xeb8d4
movq %rbx, %rdi
callq 0xa550
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %rax
movq $0x200001, (%rax)       # imm = 0x200001
movq %r12, 0x8(%rax)
movq %r14, 0x10(%rax)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq