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

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xe0, %rsp
movq %rdi, -0x10(%rbp)
xorl %eax, %eax
movq $-0x80, %rcx
cmpq -0x10(%rbp), %rcx
movb %al, -0xd9(%rbp)
jg 0x21465
cmpq $0x80, -0x10(%rbp)
setl %al
movb %al, -0xd9(%rbp)
movb -0xd9(%rbp), %al
andb $0x1, %al
movb %al, -0x11(%rbp)
testb $0x1, -0x11(%rbp)
je 0x2155b
movq -0x10(%rbp), %rcx
leaq 0x13720ab(%rip), %rax   # 0x1393530
cmpq $0x0, 0x400(%rax,%rcx,8)
je 0x2155b
movq -0x10(%rbp), %rcx
leaq 0x1372091(%rip), %rax   # 0x1393530
movq 0x400(%rax,%rcx,8), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
leaq 0x36fc9e(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2154c
movq -0x20(%rbp), %rax
movq %rax, -0x40(%rbp)
leaq 0x36fc79(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x38(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0x40(%rbp), %rax
cmpq $0x0, %rax
je 0x2154c
movq -0x20(%rbp), %rax
movq %rax, -0x50(%rbp)
leaq 0x36fc4e(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0x48(%rbp)
movq -0x50(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x2154c
movq -0x20(%rbp), %rax
movq %rax, -0x60(%rbp)
leaq 0x36fc29(%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 0x2154e
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0x2169d
movq -0x10(%rbp), %rdi
leaq -0x80(%rbp), %rsi
movl $0x20, %edx
leaq -0x88(%rbp), %rcx
leaq -0x90(%rbp), %r8
callq 0x54c0
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
callq 0xb6c0
movq %rax, -0x98(%rbp)
testb $0x1, -0x11(%rbp)
je 0x21692
movq -0x98(%rbp), %rdx
movq -0x10(%rbp), %rcx
leaq 0x1371f7f(%rip), %rax   # 0x1393530
movq %rdx, 0x400(%rax,%rcx,8)
movq -0x98(%rbp), %rax
movq %rax, -0xa8(%rbp)
leaq 0x36fb8a(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xa0(%rbp)
movq -0xa0(%rbp), %rax
andq $0x1, %rax
cmpq $0x0, %rax
je 0x2168e
movq -0x98(%rbp), %rax
movq %rax, -0xb8(%rbp)
leaq 0x36fb55(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xb0(%rbp)
movabsq $0xfffffffffffc, %rax   # imm = 0xFFFFFFFFFFFC
andq -0xb8(%rbp), %rax
cmpq $0x0, %rax
je 0x2168e
movq -0x98(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq 0x36fb1e(%rip), %rax    # 0x391158
orq $0x1, %rax
movq %rax, -0xc0(%rbp)
movq -0xc8(%rbp), %rax
andq $0x3, %rax
cmpq $0x0, %rax
jne 0x2168e
movq -0x98(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq 0x36faed(%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 0x21690
jmp 0x21692
movq -0x98(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0xe0, %rsp
popq %rbp
retq
nopw (%rax,%rax)