// File: /workspace/github_c_makefile_star2_O3/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 %rbx
movq 0x10(%rsi), %rdx
cmpb $0x1, (%rdx)
jne 0x1040a0
xorl %eax, %eax
leaq -0x9287a(%rip), %rsi    # 0x71753
leaq -0xa4957(%rip), %r8     # 0x5f67d
leaq -0xa07fc(%rip), %r9     # 0x637df
xorl %ecx, %ecx
movq 0x8(%rdx), %r10
cmpb $0x1, (%r10)
jne 0x10405f
incl %ecx
movq 0x8(%r10), %r11
cmpb $0xa, (%r11)
jne 0x10405f
movq (%r10), %r11
movl %r11d, %ebx
andl $0x800800, %ebx         # imm = 0x800800
cmpl $0x800, %ebx            # imm = 0x800
jne 0x10405f
shrq $0x30, %r11
testb $0x4, %r11b
je 0x10405f
movq 0x20(%r10), %rbx
cmpq %rsi, %rbx
je 0x104036
cmpq %r8, %rbx
je 0x104047
cmpq %r9, %rbx
jne 0x10405f
movq 0x10(%r10), %rbx
cmpb $0x1, (%rbx)
jne 0x10405f
movq 0x1bf8(%rdi), %rbx
jmp 0x10404e
cmpl $0x7, %eax
jg 0x10405f
movslq %eax, %r11
incl %eax
movq %r10, -0x40(%rsp,%r11,8)
jmp 0x10405f
movq 0x1af0(%rdi), %rbx
movq %rbx, 0x18(%r10)
movq 0x10(%rbx), %rbx
movq %rbx, 0x20(%r10)
movw %r11w, 0x6(%r10)
movq 0x10(%rdx), %rdx
cmpb $0x1, (%rdx)
je 0x103fdd
testl %ecx, %ecx
jle 0x1040a0
cmpl %eax, %ecx
jne 0x1040a0
testl %eax, %eax
jle 0x1040a0
movl %ecx, %eax
xorl %ecx, %ecx
movq 0x1ac8(%rdi), %rdx
movq -0x40(%rsp,%rcx,8), %rsi
movq %rdx, 0x18(%rsi)
movq 0x10(%rdx), %rdx
movq %rdx, 0x20(%rsi)
orb $0x4, 0x6(%rsi)
incq %rcx
cmpq %rcx, %rax
jne 0x10407c
popq %rbx
retq