// File: /workspace/github_c_makefile_star2_O2/ieyasu[P]funit/generate_code.c
// Function: print_macro_arg
static void print_macro_arg(struct Code *arg)
{
    char *s, *start, *end, *amp, string_delim;
    int in_string = 0;

    assert(arg && arg->type == ARG_CODE);

    s = start = arg->u.c.str;
    end = s + arg->u.c.len;
    amp = NULL;
    while (s < end) {
        switch (*s) {
        case '\'':
        case '"':
            if (in_string) {
                if (*s == string_delim) {
                    if (*(s + 1) == string_delim)
                        s++; // doubled to escape
                    else
                        in_string = 0; // close quote
                }
            } else {
                in_string = 1;
                string_delim = *s;
            }
            amp = NULL;
            break;
        case '&':
            amp = s;
            break;
        case ' ':
        case '\t':
            // leave amp alone
            break;
        case '\n':
        case '\r':
            // line continuation
            assert(amp != NULL);
            // print prior arg-part
            fwrite(start, amp - start, 1, fout);
            // scan for next arg-part
            start = find_line_continuation(s, end, in_string);
            s = start - 1;
            break;
        default:
            amp = NULL;
            break;
        }
        s++;
    }
    // print remaining
    fwrite(start, end - start, 1, fout);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
testq %rdi, %rdi
je 0x4776
movq %rdi, %rax
cmpl $0x2, 0x8(%rdi)
jne 0x4776
movq 0x18(%rax), %rdi
movq 0x20(%rax), %rbx
addq %rdi, %rbx
xorl %r14d, %r14d
leaq 0x3221(%rip), %r15      # 0x7830
movq %rdi, %r13
xorl %ebp, %ebp
cmpq %rbx, %r13
jae 0x471b
movb (%r13), %al
movzbl %al, %ecx
leal -0x20(%rcx), %edx
cmpl $0x7, %edx
ja 0x465a
movslq (%r15,%rdx,4), %rcx
addq %r15, %rcx
jmpq *%rcx
testl %ebp, %ebp
je 0x4705
cmpb %r12b, %al
jne 0x470d
leaq 0x1(%r13), %rax
xorl %ebp, %ebp
cmpb %r12b, 0x1(%r13)
sete %bpl
cmoveq %rax, %r13
jmp 0x469f
cmpl $0x9, %ecx
je 0x4713
cmpl $0xa, %ecx
je 0x466d
cmpl $0xd, %ecx
jne 0x469f
testq %r14, %r14
je 0x473e
movq %r14, %rsi
subq %rdi, %rsi
movq 0x9b6d(%rip), %rcx      # 0xe1f0
pushq $0x1
popq %rdx
callq 0x2250
movzbl (%r13), %eax
cmpl $0xd, %eax
je 0x46ac
cmpl $0xa, %eax
je 0x46ac
jmp 0x475d
xorl %r14d, %r14d
jmp 0x4713
movq %r13, %r14
jmp 0x4713
incq %r13
cmpq %rbx, %r13
jae 0x46d0
movzbl (%r13), %eax
cmpl $0xa, %eax
je 0x46cd
cmpl $0xd, %eax
jne 0x46a9
leaq 0x1(%r13), %rax
cmpb $0xa, 0x1(%r13)
cmoveq %rax, %r13
incq %r13
movq %r13, %rdi
movzbl (%r13), %eax
cmpq %rbx, %r13
jae 0x46ec
cmpl $0x9, %eax
je 0x46e7
cmpl $0x20, %eax
jne 0x46ec
incq %r13
jmp 0x46d3
cmpl $0x21, %eax
je 0x46ac
cmpl $0x26, %eax
jne 0x46ff
incq %r13
testl %ebp, %ebp
cmovneq %r13, %rdi
leaq -0x1(%rdi), %r13
jmp 0x4713
xorl %r14d, %r14d
movl %eax, %r12d
jmp 0x4710
xorl %r14d, %r14d
pushq $0x1
popq %rbp
incq %r13
jmp 0x4614
subq %rdi, %rbx
movq 0x9acb(%rip), %rcx      # 0xe1f0
pushq $0x1
popq %rdx
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x2250
leaq 0x3c32(%rip), %rdi      # 0x8377
leaq 0x3a4f(%rip), %rsi      # 0x819b
leaq 0x3c00(%rip), %rcx      # 0x8353
movl $0x89, %edx
callq 0x2120
leaq 0x3c1f(%rip), %rdi      # 0x8383
leaq 0x3a30(%rip), %rsi      # 0x819b
leaq 0x3c2a(%rip), %rcx      # 0x839c
pushq $0x3e
jmp 0x478d
leaq 0x3bb9(%rip), %rdi      # 0x8336
leaq 0x3a17(%rip), %rsi      # 0x819b
leaq 0x3bc8(%rip), %rcx      # 0x8353
pushq $0x69
popq %rdx
callq 0x2120