// File: /workspace/github_c_makefile_star2_O3/BernardTatin[P]s7sh/s7.c
// Function: combine_ops
static int32_t combine_ops(s7_scheme *sc, s7_pointer func, s7_pointer expr, combine_op_t cop, s7_pointer e1, s7_pointer e2) /* sc needed for debugger stuff */
                {
                    int32_t arg_op;
                    s7_pointer arg;

                    switch (cop)
                    {
                        case E_C_P:
                            arg_op = op_no_hop(e1);
                            switch (arg_op)
                            {
                                case OP_SAFE_C_S:      return(OP_SAFE_C_opSq);
                                case OP_SAFE_C_D:      return(OP_SAFE_C_opDq);
                                case OP_SAFE_C_SS:     return(OP_SAFE_C_opSSq);
                                case OP_SAFE_C_SC:     return(OP_SAFE_C_opSCq);
                                case OP_SAFE_C_CS:     return(OP_SAFE_C_opCSq);
                                case OP_SAFE_C_opSq:   return(OP_SAFE_C_op_opSq_q);
                                case OP_SAFE_C_S_opSq: return(OP_SAFE_C_op_S_opSq_q);
                                case OP_SAFE_C_opSq_S: return(OP_SAFE_C_op_opSq_S_q);
                                case OP_SAFE_C_A:      return(OP_SAFE_C_opAq);
                                case OP_SAFE_C_AA:     return(OP_SAFE_C_opAAq);
                                case OP_SAFE_C_AAA:    return(OP_SAFE_C_opAAAq);
                                                       /* deeper opA...q nestings are rare */
                            }
                            return(OP_SAFE_C_P); /* this splits out to A in optimize_func one_arg */

                        case E_C_SP:
                            arg = e2;
                            arg_op = op_no_hop(arg);
                            switch (arg_op)
                            {
                                case OP_SAFE_C_S:
                                    set_opt1_sym(cdr(expr), cadr(arg));
                                    return(OP_SAFE_C_S_opSq);

                                case OP_SAFE_C_D:
                                    set_opt1_pair(cdr(expr), cdr(arg));
                                    return(OP_SAFE_C_S_opDq);

                                case OP_SAFE_C_SC:
                                    set_opt1_sym(cdr(expr), cadr(arg));
                                    set_opt2_con(cdr(expr), caddr(arg));
                                    return(OP_SAFE_C_S_opSCq);

                                case OP_SAFE_C_CS:	  /* expr is (* a (- 1 b)), e2 is (- 1 b) */
                                    /* set_opt1_con(cdr(expr), cadr(arg)); */
                                    set_opt2_sym(cdr(expr), caddr(arg));
                                    return(OP_SAFE_C_S_opCSq);

                                case OP_SAFE_C_SS:	  /* (* a (- b c)) */
                                    set_opt1_sym(cdr(expr), cadr(arg));
                                    set_opt2_sym(cdr(expr), caddr(arg));
                                    return(OP_SAFE_C_S_opSSq);

                                case OP_SAFE_C_opSq_C:      return(OP_SAFE_C_S_op_opSq_Cq);
                                case OP_SAFE_C_S_opSSq:	    return(OP_SAFE_C_S_op_S_opSSqq);
                                case OP_SAFE_C_S_opSq:	    return(OP_SAFE_C_S_op_S_opSqq);
                                case OP_SAFE_C_opSSq_opSSq: return(OP_SAFE_C_S_op_opSSq_opSSqq);
                                case OP_SAFE_C_A:	    return(OP_SAFE_C_S_opAq);
                                case OP_SAFE_C_AA:	    return(OP_SAFE_C_S_opAAq);
                                case OP_SAFE_C_AAA:  	    return(OP_SAFE_C_S_opAAAq);
                            }
                            return(OP_SAFE_C_SP); /* if fxable -> AA later */

                        case E_C_PS:
                            arg = e1;
                            arg_op = op_no_hop(arg);
                            switch (arg_op)
                            {
                                case OP_SAFE_C_S:     return(OP_SAFE_C_opSq_S);
                                case OP_SAFE_C_SS:    return(OP_SAFE_C_opSSq_S);
                                case OP_SAFE_C_D:     return(OP_SAFE_C_opDq_S);
                                case OP_SAFE_C_CS:    return(OP_SAFE_C_opCSq_S);
                                case OP_SAFE_C_A:     return(OP_SAFE_C_opAq_S);
                                case OP_SAFE_C_opSSq:
                                                      set_opt1_pair(cdr(expr), cadadr(expr));
                                                      return(OP_SAFE_C_op_opSSq_q_S);
                                case OP_SAFE_C_opSSq_S:
                                                      set_opt3_pair(expr, cadadr(expr));
                                                      return(OP_SAFE_C_op_opSSq_Sq_S);
                            }
                            return(OP_SAFE_C_PS);

                        case E_C_PC:
                            arg = e1;
                            arg_op = op_no_hop(arg);
                            switch (arg_op)
                            {
                                case OP_SAFE_C_S:
                                    set_opt1_con(cdr(expr), (is_quoted_pair(cadr(e1))) ? cadadr(e1) : cadr(e1));
                                    set_opt2_con(cdr(expr), e2);
                                    return(OP_SAFE_C_opSq_C);
                                case OP_SAFE_C_CS:    return(OP_SAFE_C_opCSq_C);
                                case OP_SAFE_C_SC:    return(OP_SAFE_C_opSCq_C);
                                case OP_SAFE_C_opSq:  return(OP_SAFE_C_op_opSq_q_C);
                                case OP_SAFE_C_opSSq: return(OP_SAFE_C_op_opSSq_q_C);
                                case OP_SAFE_C_SS:    return(OP_SAFE_C_opSSq_C);
                            }
                            set_opt2_con(cdr(expr), caddr(expr));
                            return(OP_SAFE_C_PC);

                        case E_C_CP:
                            arg = e2;
                            arg_op = op_no_hop(arg);
                            switch (arg_op)
                            {
                                case OP_SAFE_C_D:
                                    set_opt1_pair(cdr(expr), cdr(arg));
                                    return(OP_SAFE_C_C_opDq);

                                case OP_SAFE_C_S:
                                    set_opt1_sym(cdr(expr), cadr(arg));
                                    return(OP_SAFE_C_C_opSq);

                                case OP_SAFE_C_CS:
                                    /* set_opt1_con(cdr(expr), cadr(arg)); */
                                    set_opt2_sym(cdr(expr), caddr(arg));
                                    return(OP_SAFE_C_C_opCSq);

                                case OP_SAFE_C_SC:
                                    set_opt1_sym(cdr(expr), cadr(arg));
                                    set_opt2_con(cdr(expr), caddr(arg));
                                    return(OP_SAFE_C_C_opSCq);

                                case OP_SAFE_C_SS:
                                    set_opt1_sym(cdr(expr), cadr(arg));
                                    if ((is_real(e1)) &&
                                            (symbol_id(car(arg)) == 0) &&
                                            (s7_d_pd_function(slot_value(global_slot(car(arg))))))
                                    {
                                        s7_p_dd_t fp;
                                        fp = s7_p_dd_function(func);
                                        if (fp)
                                        {
                                            /* direct_c_c_opssq calls number_to_real on e1 */
                                            set_opt3_direct(cddr(expr), s7_d_pd_function(slot_value(global_slot(car(arg)))));
                                            set_opt2_direct(cdr(expr), fp);
                                            set_direct_opt(expr);
                                        }
                                    }
                                    return(OP_SAFE_C_C_opSSq);
                            }
                            return(OP_SAFE_C_CP);

                        case E_C_PP:
                            arg = e2;
                            arg_op = op_no_hop(arg);
                            switch (arg_op)
                            {
                                case OP_SAFE_C_S:
                                    if (is_safe_c_s(e1))
                                    {
                                        s7_p_dd_t fp;
                                        fp = s7_p_dd_function(func);
                                        if (fp)
                                        {
                                            if ((symbol_id(car(e1)) == 0) && (s7_d_p_function(slot_value(global_slot(car(e1))))) &&
                                                    (symbol_id(car(e2)) == 0) && (s7_d_p_function(slot_value(global_slot(car(e2))))))
                                            {
                                                set_opt3_direct(cdr(expr), s7_d_p_function(slot_value(global_slot(car(e1)))));
                                                set_opt3_direct(cddr(expr), s7_d_p_function(slot_value(global_slot(car(e2)))));
                                                set_opt2_direct(cdr(expr), fp);
                                                set_direct_opt(expr);
                                            }
                                        }
                                        return(OP_SAFE_C_opSq_opSq);
                                    }
                                    if (optimize_op_match(e1, OP_SAFE_C_SS))
                                        return(OP_SAFE_C_opSSq_opSq);
                                    break;

                                case OP_SAFE_C_SS:
                                    if (optimize_op_match(e1, OP_SAFE_C_SS))
                                        return(OP_SAFE_C_opSSq_opSSq);
                                    if (is_safe_c_s(e1))
                                        return(OP_SAFE_C_opSq_opSSq);
                                    break;
                            }
                            return(OP_SAFE_C_PP);

                        default:
                            break;
                    }
                    /* fprintf(stderr, "%s[%d]: unopt %s\n", __func__, __LINE__, DISPLAY(expr)); */
                    return(OP_UNOPT);
                }

// Assembly:
movl %ecx, %eax
leaq 0x28028(%rip), %rcx     # 0x108b48
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movzwl 0x4(%r8), %eax
andl $-0x2, %eax
cmpl $0x1f, %eax
jle 0xe0cf6
cmpl $0x6b, %eax
jg 0xe0d8b
cmpl $0x20, %eax
je 0xe0f53
cmpl $0x28, %eax
je 0xe0f47
cmpl $0x30, %eax
jne 0xe1001
movl $0x68, %eax
retq
movzwl 0x4(%r8), %eax
andl $-0x2, %eax
leal -0x4(%rax), %ecx
cmpl $0x6, %ecx
ja 0xe0d39
leaq 0x28005(%rip), %rax     # 0x108b84
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x10(%r8), %rax
movq 0x8(%rax), %rax
cmpb $0x1, (%rax)
jne 0xe0bb3
addq $0x10, %r8
movq 0x8(%rax), %rcx
addq $0x10, %rax
cmpq 0x17b0(%rdi), %rcx
cmovneq %r8, %rax
movq (%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x18(%rcx)
movq 0x10(%rdx), %rax
movq %r9, 0x20(%rax)
movl $0x32, %eax
retq
movzwl 0x4(%r9), %ecx
andl $-0x2, %ecx
movl $0x156, %eax            # imm = 0x156
addl $-0x2, %ecx
cmpl $0x8, %ecx
ja 0xe0e61
leaq 0x27f77(%rip), %rdi     # 0x108b60
movslq (%rdi,%rcx,4), %rcx
addq %rdi, %rcx
jmpq *%rcx
movq 0x10(%r9), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x18(%rcx)
movl $0x44, %eax
retq
movzwl 0x4(%r9), %eax
andl $-0x2, %eax
cmpl $0x31, %eax
jg 0xe0ccc
leal -0x2(%rax), %ecx
cmpl $0x8, %ecx
ja 0xe0f24
leaq 0x27f9c(%rip), %rax     # 0x108bc4
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movq 0x10(%r9), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x18(%rcx)
movl $0x3e, %eax
retq
movzwl 0x4(%r9), %eax
andl $-0x2, %eax
cmpl $0x6, %eax
je 0xe0d51
cmpl $0x4, %eax
jne 0xe0e5c
movzwl 0x4(%r8), %eax
andl $-0x2, %eax
cmpw $0x4, %ax
jne 0xe0e45
movl $0x34, %eax
cmpb $0x30, (%rsi)
jb 0xe0e61
movq 0x8(%rsi), %rcx
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
je 0xe0e61
cmpl $0x27, (%rcx)
je 0xe1007
movq 0x10(%rcx), %rcx
jmp 0xe0c85
movzwl 0x4(%r8), %eax
andl $-0x2, %eax
cmpl $0x21, %eax
jg 0xe0d18
addl $-0x2, %eax
cmpl $0x8, %eax
ja 0xe0f1e
leaq 0x27ee3(%rip), %rcx     # 0x108ba0
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x46, %eax
retq
cmpl $0x6b, %eax
jg 0xe0dac
cmpl $0x32, %eax
je 0xe0fe9
cmpl $0x36, %eax
je 0xe0ff5
cmpl $0x48, %eax
jne 0xe0f5f
movl $0x60, %eax
retq
addl $-0x2, %eax
cmpl $0x8, %eax
ja 0xe1001
leaq 0x27edf(%rip), %rcx     # 0x108be8
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1e, %eax
retq
cmpl $0x22, %eax
je 0xe0ee0
cmpl $0x4e, %eax
je 0xe0efa
cmpl $0x6c, %eax
jne 0xe0f1e
movl $0x8e, %eax
retq
cmpl $0x20, %eax
je 0xe0f18
cmpl $0x22, %eax
jne 0xe0dcd
movl $0x5a, %eax
retq
movl $0x801, %edx            # imm = 0x801
xorl (%r8), %edx
movzwl 0x4(%r8), %ecx
andl $0xfffe, %ecx           # imm = 0xFFFE
movl %ecx, %esi
xorl $0x6, %esi
movl $0x48, %eax
orw %dx, %si
je 0xe0e61
movl $0x4c, %eax
cmpw $0x4, %cx
jne 0xe0e5c
jmp 0xe0e61
cmpl $0x6c, %eax
je 0xe0f59
cmpl $0x6e, %eax
je 0xe0f4d
cmpl $0x74, %eax
jne 0xe1001
movl $0x8a, %eax
retq
cmpl $0x6c, %eax
je 0xe0fef
cmpl $0x6e, %eax
je 0xe0ffb
cmpl $0x74, %eax
jne 0xe0f5f
movl $0x92, %eax
retq
movq 0x10(%rdx), %rax
movq 0x10(%rax), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x20(%rax)
movl $0x15e, %eax            # imm = 0x15E
retq
movq 0x10(%r9), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x18(%rcx)
movzbl (%r8), %ecx
leaq 0x69bb2(%rip), %rdi     # 0x14a9b0
movl $0x42, %eax
cmpb $0x1, (%rcx,%rdi)
jne 0xe0e61
movq 0x8(%r9), %rcx
cmpq $0x0, 0x20(%rcx)
jne 0xe0e61
movq 0x10(%rcx), %rcx
movq 0x10(%rcx), %rcx
cmpb $0x30, (%rcx)
jb 0xe0e61
movq 0x8(%rcx), %rcx
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
je 0xe0e61
movq %rcx, %rdi
cmpl $0x9, (%rdi)
je 0xe105b
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0xe0e31
jmp 0xe0e61
cmpw $0x6, %ax
jne 0xe0e5c
movl $0x4a, %eax
movzwl (%r8), %ecx
cmpl $0x801, %ecx            # imm = 0x801
je 0xe0e61
movl $0x150, %eax            # imm = 0x150
retq
movq 0x10(%r9), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x18(%rcx)
movl $0x38, %eax
retq
movq 0x10(%r9), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x18(%rcx)
movq 0x10(%r9), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x20(%rcx)
movl $0x2a, %eax
retq
movq 0x10(%r9), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x20(%rcx)
movl $0x3a, %eax
retq
movl $0x3c, %eax
retq
movl $0x40, %eax
retq
movl $0x52, %eax
retq
movl $0x4e, %eax
retq
movl $0x50, %eax
retq
movl $0x30, %eax
retq
movq 0x10(%rdx), %rax
movq 0x8(%rax), %rcx
movq 0x10(%rcx), %rcx
movq 0x8(%rcx), %rcx
movq %rcx, 0x18(%rax)
movl $0x5e, %eax
retq
movq 0x10(%rdx), %rax
movq 0x8(%rax), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq %rax, 0x28(%rdx)
andb $-0x5, 0x2(%rdx)
movl $0x62, %eax
retq
movl $0x5c, %eax
retq
movl $0x15c, %eax            # imm = 0x15C
retq
cmpl $0x28, %eax
jne 0xe0f5f
movl $0x58, %eax
retq
movl $0x26, %eax
retq
movl $0x24, %eax
retq
movl $0x22, %eax
retq
movl $0x20, %eax
retq
movl $0x66, %eax
retq
movl $0x88, %eax
retq
movl $0x64, %eax
retq
movl $0x86, %eax
retq
movl $0x154, %eax            # imm = 0x154
retq
movq 0x10(%r9), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x20(%rcx)
movl $0x2e, %eax
retq
movq 0x10(%r9), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x18(%rcx)
movq 0x10(%r9), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x20(%rcx)
movl $0x2c, %eax
retq
movq 0x10(%r9), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x18(%rcx)
movl $0x28, %eax
retq
movq 0x10(%r9), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x18(%rcx)
movq 0x10(%r9), %rax
movq 0x10(%rax), %rax
movq 0x8(%rax), %rax
movq 0x10(%rdx), %rcx
movq %rax, 0x20(%rcx)
movl $0x36, %eax
retq
movl $0x54, %eax
retq
movl $0x8c, %eax
retq
movl $0x56, %eax
retq
movl $0x90, %eax
retq
movl $0x9c, %eax
retq
movq 0x8(%rcx), %rcx
testq %rcx, %rcx
je 0xe0e61
movq 0x8(%r8), %rsi
cmpq $0x0, 0x20(%rsi)
jne 0xe0e61
movq 0x10(%rsi), %rsi
movq 0x10(%rsi), %rsi
cmpb $0x30, (%rsi)
jb 0xe0e61
movq 0x8(%rsi), %rsi
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0xe0e61
movq %rsi, %rdi
cmpl $0x19, (%rdi)
je 0xe108b
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0xe1048
jmp 0xe0e61
cmpq $0x0, 0x8(%rdi)
je 0xe0e61
cmpb $0x30, (%rsi)
jb 0xe0e61
movq 0x8(%rsi), %rsi
movq 0x20(%rsi), %rsi
testq %rsi, %rsi
je 0xe0e61
cmpl $0x27, (%rsi)
je 0xe10d2
movq 0x10(%rsi), %rsi
jmp 0xe1077
cmpq $0x0, 0x8(%rdi)
je 0xe0e61
movq 0x8(%r9), %rdi
cmpq $0x0, 0x20(%rdi)
jne 0xe0e61
movq 0x10(%rdi), %rdi
movq 0x10(%rdi), %rdi
cmpb $0x30, (%rdi)
jb 0xe0e61
movq 0x8(%rdi), %rdi
movq 0x20(%rdi), %rdi
testq %rdi, %rdi
je 0xe0e61
cmpl $0x19, (%rdi)
je 0xe111d
movq 0x10(%rdi), %rdi
jmp 0xe10be
movq 0x8(%rsi), %rsi
testq %rsi, %rsi
je 0xe0e61
xorl %edi, %edi
cmpl $0x9, (%rcx)
je 0xe10f1
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0xe10e1
jmp 0xe10f5
movq 0x8(%rcx), %rdi
movq 0x10(%rdx), %rcx
movq 0x10(%rcx), %rcx
movq %rdi, 0x28(%rcx)
movq 0x10(%rdx), %rcx
movq 0x10(%rcx), %rcx
andq $-0x40001, (%rcx)       # imm = 0xFFFBFFFF
movq 0x10(%rdx), %rcx
movq %rsi, 0x20(%rcx)
orb $0x8, 0x3(%rdx)
retq
cmpq $0x0, 0x8(%rdi)
je 0xe0e61
xorl %edi, %edi
cmpl $0x19, (%rsi)
je 0xe113a
movq 0x10(%rsi), %rsi
testq %rsi, %rsi
jne 0xe112a
jmp 0xe113e
movq 0x8(%rsi), %rdi
movq 0x10(%rdx), %rsi
movq %rdi, 0x28(%rsi)
movq 0x10(%rdx), %rsi
andq $-0x40001, (%rsi)       # imm = 0xFFFBFFFF
movq 0x8(%r9), %rsi
movq 0x10(%rsi), %rsi
movq 0x10(%rsi), %rsi
cmpb $0x30, (%rsi)
jb 0xe1181
movq 0x8(%rsi), %rsi
movq 0x20(%rsi), %rdi
testq %rdi, %rdi
je 0xe1181
xorl %esi, %esi
cmpl $0x19, (%rdi)
je 0xe11ab
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0xe1171
jmp 0xe1183
xorl %esi, %esi
movq 0x10(%rdx), %rdi
movq 0x10(%rdi), %rdi
movq %rsi, 0x28(%rdi)
movq 0x10(%rdx), %rsi
movq 0x10(%rsi), %rsi
andq $-0x40001, (%rsi)       # imm = 0xFFFBFFFF
movq 0x10(%rdx), %rsi
movq %rcx, 0x20(%rsi)
jmp 0xe1118
movq 0x8(%rdi), %rsi
jmp 0xe1183