// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: u64_to_str
static STR* u64_to_str (uint64_t x) {
    bool cache = (x <= 255);
    static STR* scache[256] = {0};
    if (cache && scache[x]) {
        STR* s = scache[x];
        incref(MKSTR(s));
        return s;
    } else {
        char c[32];
        char* p; size_t n;
        u64_repr(x,c,sizeof(c),&p,&n);
        STR* s = str_make(p,n);
        if (cache) {
            scache[x] = s;
            incref(MKSTR(s));
        }
        return s;
    }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
cmpq $0xff, -0x10(%rbp)
setbe %al
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x217b2
movq -0x10(%rbp), %rcx
leaq 0x137264c(%rip), %rax   # 0x1393d30
cmpq $0x0, (%rax,%rcx,8)
je 0x217b2
movq -0x10(%rbp), %rcx
leaq 0x1372636(%rip), %rax   # 0x1393d30
movq (%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x36fa47(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x217a3
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x36fa22(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x38(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x40(%rbp), %rax
cmpq $0x0, %rax
je 0x217a3
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0x36f9f7(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x217a3
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0x36f9d2(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x58(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x60(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x217a5
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x218f0
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl $0x20, %edx
leaq -0x88(%rbp), %rcx
leaq -0x90(%rbp), %r8
callq 0x53c0
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xb6c0
movq %rax, -0x98(%rbp)
testb $0x1, -0x11(%rbp)
je 0x218e5
movq -0x98(%rbp), %rdx
movq -0x10(%rbp), %rcx
leaq 0x1372528(%rip), %rax   # 0x1393d30
movq %rdx, (%rax,%rcx,8)
movq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq 0x36f937(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x218e1
movq -0x98(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0x36f902(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xb0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xb8(%rbp), %rax
cmpq $0x0, %rax
je 0x218e1
movq -0x98(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq 0x36f8cb(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xc0(%rbp)
movq -0xc8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x218e1
movq -0x98(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq 0x36f89a(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xd0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xd8(%rbp), %rax
movl (%rax), %ecx
addl $0x1, %ecx
movl %ecx, (%rax)
jmp 0x218e3
jmp 0x218e5
movq -0x98(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nopl (%rax)