// File: /workspace/github_c_makefile_star2_O1/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, %r14
movq %rdi, %rbx
movq 0x870(%rdi), %r15
testq %r15, %r15
je 0xf4562
movq 0x18(%r15), %rax
movq %rax, 0x870(%rbx)
jmp 0xf4616
cmpq $0x0, 0x838(%rbx)
jne 0xf45a8
movl $0x2800, %edi           # imm = 0x2800
callq 0x9480
movq %rax, 0x838(%rbx)
addq $0x28, %rax
movl $0xff, %ecx
movq %rax, -0x10(%rax)
movl $0x0, -0x20(%rax)
addq $0x28, %rax
decl %ecx
jne 0xf4586
movq $0x0, -0x10(%rax)
movl $0x0, -0x20(%rax)
movq 0x838(%rbx), %r15
movq 0x18(%r15), %rax
movq %rax, 0x838(%rbx)
movl $0x0, 0x8(%r15)
movq 0x8c8(%rbx), %rax
subq $-0x80, %rax
cmpq $0x10001, %rax          # imm = 0x10001
jb 0xf45f6
movl $0x10000, %edi          # imm = 0x10000
callq 0x9480
movq %rax, 0x8d0(%rbx)
movq $0x0, 0x8c8(%rbx)
movl $0x80, %eax
movq 0x8d0(%rbx), %rcx
addq 0x8c8(%rbx), %rcx
movq %rax, 0x8c8(%rbx)
movq %rcx, (%r15)
movl $0x7, 0x8(%r15)
movq $0x80, 0x10(%r15)
cmpq $0x3e7, %r14            # imm = 0x3E7
jg 0xf4642
movq (%r15), %rdi
leaq 0x2f45c(%rip), %rdx     # 0x123a8d
movl $0x80, %esi
movq %r14, %rcx
xorl %eax, %eax
callq 0x9210
jmp 0xf46a1
cmpq $0xf423f, %r14          # imm = 0xF423F
jg 0xf4664
movq (%r15), %rdi
cvtsi2sd %r14, %xmm0
divsd 0x1aa05(%rip), %xmm0    # 0x10f060
leaq 0x2e52e(%rip), %rdx     # 0x122b90
jmp 0xf4695
movq (%r15), %rdi
cvtsi2sd %r14, %xmm0
cmpq $0x3b9ac9ff, %r14       # imm = 0x3B9AC9FF
jg 0xf4686
divsd 0x1aa93(%rip), %xmm0    # 0x10f110
leaq 0x2e512(%rip), %rdx     # 0x122b96
jmp 0xf4695
divsd 0x1aa8a(%rip), %xmm0    # 0x10f118
leaq 0x2e507(%rip), %rdx     # 0x122b9c
movl $0x80, %esi
movb $0x1, %al
callq 0x9210
movl %eax, %ebp
cmpq $0x7ff, %r14            # imm = 0x7FF
ja 0xf46b9
leaq 0x5a29d(%rip), %rax     # 0x14e950
movq (%rax,%r14,8), %r12
jmp 0xf46f4
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xf46d1
movq %rbx, %rdi
callq 0xb389
movq 0x90(%rbx), %rax
leaq -0x8(%rax), %rcx
movq %rcx, 0x90(%rbx)
movq -0x8(%rax), %r12
movq $0xb, (%r12)
movq %r14, 0x8(%r12)
movslq %ebp, %rdx
movq %rbx, %rdi
movq %r15, %rsi
callq 0x3a419
movq %rax, %r14
movq 0x90(%rbx), %rax
cmpq 0x98(%rbx), %rax
ja 0xf471d
movq %rbx, %rdi
callq 0xb389
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