// File: /workspace/github_c_makefile_star2_O0/mirth-lang[P]mirth/bin/mirth1.c
// Function: str_trace_
void str_trace_(VAL v, int fd) {
    STR* str = VSTR(v);
    ASSERT(str->size <= SIZE_MAX);
    write(fd, "\"", 1);
    USIZE i0 = 0;
    char xb[4]={'\\','x'};
    USIZE i;
    for (i = 0; i < str->size; i++) {
        const char* c = NULL; size_t n=0;
        uint8_t v=str->data[i];
        switch(v) {
            case '\n': c="\\n"; n=2; break;
            case '\r': c="\\r"; n=2; break;
            case '\t': c="\\t"; n=2; break;
            case '\\': c="\\\\"; n=2; break;
            case '\"': c="\\\""; n=2; break;
            default:
                if (!((' ' <= v) && (v < 0x7F))) {
                    xb[2] = '0' + (v&15) + ('A'-'9'-1)*((v&15) > 9);
                    xb[3] = '0' + (v/16) + ('A'-'9'-1)*((v/16) > 9);
                    c=xb; n=4;
                }
        }
        if ((n > 0) && (i0 < i)) {
            write(fd, str->data+i0, (size_t)(i-i0));
            i0=i+1;
        }
        write(fd, c, n);
    }
    if (i0 < i) write(fd, str->data+i0, (size_t)(i-i0));
    write(fd, "\"", 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x8(%rbp)
movl %edx, -0x14(%rbp)
movq -0x10(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
cmpq $-0x1, 0x10(%rax)
jbe 0x3500e0
movl $0x2, %edi
leaq 0x1e836(%rip), %rsi     # 0x36e8f8
movl $0x43, %edx
callq 0x5060
callq 0x5310
callq 0x53b0
movl $0x1, %edi
callq 0x5130
jmp 0x3500e2
movl -0x14(%rbp), %edi
leaq 0xbec4(%rip), %rsi      # 0x35bfb0
movl $0x1, %edx
callq 0x5060
movq $0x0, -0x28(%rbp)
movl 0x1eb94(%rip), %eax     # 0x36ec98
movl %eax, -0x2c(%rbp)
movq $0x0, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jae 0x3502cc
movq $0x0, -0x40(%rbp)
movq $0x0, -0x48(%rbp)
movq -0x20(%rbp), %rax
movq -0x38(%rbp), %rcx
movb 0x18(%rax,%rcx), %al
movb %al, -0x49(%rbp)
movzbl -0x49(%rbp), %eax
movl %eax, -0x50(%rbp)
subl $0x9, %eax
je 0x3501a6
jmp 0x35014e
movl -0x50(%rbp), %eax
subl $0xa, %eax
je 0x350176
jmp 0x350158
movl -0x50(%rbp), %eax
subl $0xd, %eax
je 0x35018e
jmp 0x350162
movl -0x50(%rbp), %eax
subl $0x22, %eax
je 0x3501d6
jmp 0x35016c
movl -0x50(%rbp), %eax
subl $0x5c, %eax
je 0x3501be
jmp 0x3501ee
leaq 0x1c75a(%rip), %rax     # 0x36c8d7
movq %rax, -0x40(%rbp)
movq $0x2, -0x48(%rbp)
jmp 0x350272
leaq 0x1c745(%rip), %rax     # 0x36c8da
movq %rax, -0x40(%rbp)
movq $0x2, -0x48(%rbp)
jmp 0x350272
leaq 0x1c727(%rip), %rax     # 0x36c8d4
movq %rax, -0x40(%rbp)
movq $0x2, -0x48(%rbp)
jmp 0x350272
leaq 0xbded(%rip), %rax      # 0x35bfb2
movq %rax, -0x40(%rbp)
movq $0x2, -0x48(%rbp)
jmp 0x350272
leaq 0xbdd2(%rip), %rax      # 0x35bfaf
movq %rax, -0x40(%rbp)
movq $0x2, -0x48(%rbp)
jmp 0x350272
movzbl -0x49(%rbp), %ecx
movl $0x20, %eax
cmpl %ecx, %eax
jg 0x350204
movzbl -0x49(%rbp), %eax
cmpl $0x7f, %eax
jl 0x350270
movzbl -0x49(%rbp), %eax
andl $0xf, %eax
addl $0x30, %eax
movzbl -0x49(%rbp), %ecx
andl $0xf, %ecx
cmpl $0x9, %ecx
setg %cl
andb $0x1, %cl
movzbl %cl, %ecx
imull $0x7, %ecx, %ecx
addl %ecx, %eax
movb %al, -0x2a(%rbp)
movzbl -0x49(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
addl $0x30, %eax
movl %eax, -0x54(%rbp)
movzbl -0x49(%rbp), %eax
movl $0x10, %ecx
cltd
idivl %ecx
movl %eax, %ecx
movl -0x54(%rbp), %eax
cmpl $0x9, %ecx
setg %cl
andb $0x1, %cl
movzbl %cl, %ecx
imull $0x7, %ecx, %ecx
addl %ecx, %eax
movb %al, -0x29(%rbp)
leaq -0x2c(%rbp), %rax
movq %rax, -0x40(%rbp)
movq $0x4, -0x48(%rbp)
jmp 0x350272
cmpq $0x0, -0x48(%rbp)
jbe 0x3502ab
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x3502ab
movl -0x14(%rbp), %edi
movq -0x20(%rbp), %rsi
addq $0x18, %rsi
addq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq -0x28(%rbp), %rdx
callq 0x5060
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
movl -0x14(%rbp), %edi
movq -0x40(%rbp), %rsi
movq -0x48(%rbp), %rdx
callq 0x5060
movq -0x38(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x38(%rbp)
jmp 0x35010f
movq -0x28(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0x3502f2
movl -0x14(%rbp), %edi
movq -0x20(%rbp), %rsi
addq $0x18, %rsi
addq -0x28(%rbp), %rsi
movq -0x38(%rbp), %rdx
subq -0x28(%rbp), %rdx
callq 0x5060
movl -0x14(%rbp), %edi
leaq 0xbcb4(%rip), %rsi      # 0x35bfb0
movl $0x1, %edx
callq 0x5060
addq $0x60, %rsp
popq %rbp
retq
nopl (%rax)