// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: check_for_substring_temp
static void check_for_substring_temp(s7_scheme *sc, s7_pointer expr)
                {
                    s7_pointer nps[NUM_STRING_WRAPPERS];
                    s7_pointer p, arg;
                    int32_t pairs = 0, substrs = 0;
                    /* a bit tricky -- accept temp only if there's just one inner expression and it calls substring
                     *   and don't use this for arg if arg is returned: (reverse! (write-string (symbol->string x)))
                     */
                    for (p = cdr(expr); is_pair(p); p = cdr(p))
                    {
                        arg = car(p);
                        if (is_pair(arg))
                        {
                            pairs++;
                            if ((is_symbol(car(arg))) &&
                                    (is_safely_optimized(arg)) &&
                                    (has_fx(arg)))
                            {
                                if (c_callee(arg) == g_substring)
                                {
                                    if (substrs < NUM_STRING_WRAPPERS)
                                        nps[substrs++] = arg;
                                }
                                else
                                {
                                    if (c_callee(arg) == g_symbol_to_string)
                                        set_c_function(arg, sc->symbol_to_string_uncopied);
                                    else
                                    {
                                        if ((c_callee(arg) == g_read_line) &&
                                                (is_pair(cdr(arg))))
                                            set_c_function(arg, sc->read_line_uncopied);
                                    }}}}}
                    if ((pairs > 0) &&
                            (pairs == substrs))
                    {
                        int32_t i;
                        for (i = 0; i < substrs; i++)
                            set_c_function(nps[i], sc->substring_to_temp);
                    }
                }

// Assembly:
pushq %r14
pushq %rbx
movq 0x10(%rsi), %rcx
xorl %edx, %edx
cmpb $0x1, (%rcx)
movl $0x0, %eax
jne 0x10d5e5
xorl %eax, %eax
movl $0x800800, %esi         # imm = 0x800800
leaq -0x96585(%rip), %r8     # 0x76fb2
leaq -0xa907d(%rip), %r9     # 0x644c1
leaq -0xa4d3c(%rip), %r10    # 0x68809
xorl %edx, %edx
movq 0x8(%rcx), %r11
cmpb $0x1, (%r11)
jne 0x10d5d8
incl %edx
movq 0x8(%r11), %rbx
cmpb $0xa, (%rbx)
jne 0x10d5d8
movl (%r11), %ebx
andl %esi, %ebx
cmpl $0x800, %ebx            # imm = 0x800
jne 0x10d5d8
movzwl 0x6(%r11), %ebx
testb $0x4, %bl
je 0x10d5d8
movq 0x20(%r11), %r14
cmpq %r8, %r14
je 0x10d5a8
cmpq %r9, %r14
je 0x10d5b9
cmpq %r10, %r14
jne 0x10d5d8
movq 0x10(%r11), %r14
cmpb $0x1, (%r14)
jne 0x10d5d8
movq 0x1bf8(%rdi), %r14
movq %r14, 0x18(%r11)
movq 0x1bf8(%rdi), %r14
jmp 0x10d5cb
cmpl $0x7, %eax
jg 0x10d5d8
movslq %eax, %rbx
incl %eax
movq %r11, -0x48(%rsp,%rbx,8)
jmp 0x10d5d8
movq 0x1af0(%rdi), %r14
movq %r14, 0x18(%r11)
movq 0x1af0(%rdi), %r14
movq 0x10(%r14), %r14
movq %r14, 0x20(%r11)
movw %bx, 0x6(%r11)
movq 0x10(%rcx), %rcx
cmpb $0x1, (%rcx)
je 0x10d547
testl %edx, %edx
jle 0x10d620
cmpl %eax, %edx
jne 0x10d620
testl %eax, %eax
jle 0x10d620
movl %eax, %eax
xorl %ecx, %ecx
movq 0x1ac8(%rdi), %rdx
movq -0x48(%rsp,%rcx,8), %rsi
movq %rdx, 0x18(%rsi)
movq 0x1ac8(%rdi), %rdx
movq 0x10(%rdx), %rdx
movq %rdx, 0x20(%rsi)
orb $0x4, 0x6(%rsi)
incq %rcx
cmpq %rcx, %rax
jne 0x10d5f5
popq %rbx
popq %r14
retq