// File: /workspace/github_c_makefile_star2_O0/hfiguiere[P]exifprobe/print.c
// Function: show_string
int
show_string(char *string,int maxchars,int noquotes)
{
    int lastch;
    int chpr = 0;
    int indent = 0;
    int printed = 0;
    char *ch;

    if(string)
    {
        indent = charsprinted();
        lastch = 'A';
        if(!noquotes)
        {
            (void)putchar('\'');
            chpr++;
        }
        ch = string;
        while(printed < maxchars)
        {
            if(*ch == '\0')
            {
                printf("\\0");
                break;
            }
            else if(isprint(*ch))
            {
                if(isdigit(*ch) && (lastch == '\0'))
                    chpr += printf("00");
                (void)putchar(*ch);
                chpr++;
            }
            else if(*ch == '\n')
            {
                chpr = newline(chpr);
                putindent(indent);
            }
            else if(*ch == '\011')
            {
                putchar(*ch);
                ++ch;
            }
            else
                chpr += printf("\\%03o",(unsigned int)(*ch & 0xff));
            lastch = *ch;
            ++printed;
            ++ch;
        }
        if(!noquotes)
        {
            (void)putchar('\'');
            chpr++;
        }
    }
    setcharsprinted(chpr);
    return(printed);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movl %edx, -0x10(%rbp)
movl $0x0, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movl $0x0, -0x20(%rbp)
cmpq $0x0, -0x8(%rbp)
je 0xb7ad
movb $0x0, %al
callq 0x20a00
movl %eax, -0x1c(%rbp)
movl $0x41, -0x14(%rbp)
cmpl $0x0, -0x10(%rbp)
jne 0xb65c
movl $0x27, %edi
callq 0x3050
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movl -0x20(%rbp), %eax
cmpl -0xc(%rbp), %eax
jge 0xb792
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
jne 0xb68f
leaq 0x59186(%rip), %rdi     # 0x64809
movb $0x0, %al
callq 0x3110
jmp 0xb792
callq 0x32c0
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x4000, %eax           # imm = 0x4000
cmpl $0x0, %eax
je 0xb700
callq 0x32c0
movq (%rax), %rax
movq -0x28(%rbp), %rcx
movsbl (%rcx), %ecx
movslq %ecx, %rcx
movzwl (%rax,%rcx,2), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0xb6e9
cmpl $0x0, -0x14(%rbp)
jne 0xb6e9
leaq 0x5f886(%rip), %rdi     # 0x6af62
movb $0x0, %al
callq 0x3110
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
movq -0x28(%rbp), %rax
movsbl (%rax), %edi
callq 0x3050
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xb76c
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
jne 0xb721
movl -0x18(%rbp), %edi
callq 0x1ef50
movl %eax, -0x18(%rbp)
movl -0x1c(%rbp), %edi
callq 0x60e0
jmp 0xb76a
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x9, %eax
jne 0xb747
movq -0x28(%rbp), %rax
movsbl (%rax), %edi
callq 0x3050
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xb768
movq -0x28(%rbp), %rax
movsbl (%rax), %esi
andl $0xff, %esi
leaq 0x590b1(%rip), %rdi     # 0x6480c
movb $0x0, %al
callq 0x3110
addl -0x18(%rbp), %eax
movl %eax, -0x18(%rbp)
jmp 0xb76a
jmp 0xb76c
jmp 0xb76e
movq -0x28(%rbp), %rax
movsbl (%rax), %eax
movl %eax, -0x14(%rbp)
movl -0x20(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x20(%rbp)
movq -0x28(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x28(%rbp)
jmp 0xb664
cmpl $0x0, -0x10(%rbp)
jne 0xb7ab
movl $0x27, %edi
callq 0x3050
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0xb7ad
movl -0x18(%rbp), %edi
callq 0x1ff00
movl -0x20(%rbp), %eax
addq $0x30, %rsp
popq %rbp
retq
nop