// File: /workspace/github_c_makefile_star2_O1/BernardTatin[P]s7sh/s7.c
// Function: p_pi_ok
static bool p_pi_ok(s7_scheme *sc, opt_info *opc, s7_pointer s_func, s7_pointer sig, s7_pointer car_x)
                {
                    s7_p_pi_t func;
                    func = s7_p_pi_function(s_func);
                    if (func)
                    {
                        s7_pointer obj = NULL, slot1, checker = NULL;

                        /* here we know cadr is a symbol */
                        slot1 = opt_simple_symbol(sc, cadr(car_x));
                        if (!slot1)
                            return(return_false(sc, car_x, __func__, __LINE__));
                        if ((is_any_vector(slot_value(slot1))) &&
                                (vector_rank(slot_value(slot1)) > 1))
                            return(return_false(sc, car_x, __func__, __LINE__));

                        opc->v[3].p_pi_f = func;
                        opc->v[1].p = slot1;

                        if (is_symbol(cadr(sig)))
                            checker = cadr(sig);

                        if ((s7_p_pi_direct_function(s_func)) &&
                                (checker))
                        {
                            obj = slot_value(opc->v[1].p);
                            if ((is_string(obj)) ||
                                    (is_pair(obj)) ||
                                    (is_any_vector(obj)))
                            {
                                if (((is_string(obj)) && (checker == sc->is_string_symbol)) ||
                                        ((is_any_vector(obj)) && (checker == sc->is_vector_symbol)) ||
                                        ((is_pair(obj)) && (checker == sc->is_pair_symbol)) ||
                                        ((is_byte_vector(obj)) && (checker == sc->is_byte_vector_symbol)))
                                    opc->v[3].p_pi_f = s7_p_pi_direct_function(s_func);
                            }
                        }
                        slot1 = opt_integer_symbol(sc, caddr(car_x));
                        if (slot1)
                        {
                            opc->v[0].fp = opt_p_pi_ss;
                            opc->v[2].p = slot1;
                            if ((obj) &&
                                    (is_step_end(slot1)))
                                switch (type(obj))
                                {
                                    case T_VECTOR:
                                        if (denominator(slot_value(slot1)) <= vector_length(obj))
                                            opc->v[3].p_pi_f = vector_ref_unchecked;
                                        return(oo_set_type_2(opc, 4, 1, 2, OO_PV, OO_I));

                                    case T_INT_VECTOR:
                                        if (denominator(slot_value(slot1)) <= vector_length(obj))
                                            opc->v[3].p_pi_f = int_vector_ref_unchecked_p;
                                        return(oo_set_type_2(opc, 4, 1, 2, OO_IV, OO_I));

                                    case T_FLOAT_VECTOR:
                                        if (denominator(slot_value(slot1)) <= vector_length(obj))
                                            opc->v[3].p_pi_f = float_vector_ref_unchecked_p;
                                        return(oo_set_type_2(opc, 4, 1, 2, OO_FV, OO_I));

                                    case T_STRING:
                                        if (denominator(slot_value(slot1)) <= string_length(obj))
                                            opc->v[3].p_pi_f = string_ref_unchecked;
                                        return(oo_set_type_2(opc, 4, 1, 2, OO_S, OO_I));

                                    case T_BYTE_VECTOR:
                                        if (denominator(slot_value(slot1)) <= string_length(obj))
                                            opc->v[3].p_pi_f = byte_vector_ref_unchecked_p;
                                        return(oo_set_type_2(opc, 4, 1, 2, OO_BV, OO_I));
                                }
                            return(oo_set_type_2(opc, 4, 1, 2, OO_P, OO_I));
                        }
                        if (is_t_integer(caddr(car_x)))
                        {
                            opc->v[2].i = integer(caddr(car_x));
                            opc->v[0].fp = opt_p_pi_sc;
                            return(oo_set_type_1(opc, 4, 1, OO_P));
                        }
                        if (int_optimize(sc, cddr(car_x)))
                        {
                            opc->v[0].fp = opt_p_pi_sf;
                            return(oo_set_type_1(opc, 4, 1, OO_P));
                        }
                    }
                    return(return_false(sc, car_x, __func__, __LINE__));
                }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %r15
movq %rcx, %r13
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq %rdx, %rdi
callq 0xb5ee8
testq %rax, %rax
je 0xaa33f
movq %rax, %rbp
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
movq %r14, %rdi
callq 0xac2d6
testq %rax, %rax
je 0xaa175
movq 0x10(%rax), %rcx
movzbl (%rcx), %esi
leaq 0xa8ac5(%rip), %rdx     # 0x152c20
cmpb $0x1, (%rsi,%rdx)
jne 0xaa17c
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
je 0xaa17c
cmpq $0x1, 0x10(%rcx)
jle 0xaa17c
xorl %eax, %eax
jmp 0xaa339
movq %rbp, 0x18(%rbx)
movq %rax, 0x8(%rbx)
movq 0x10(%r13), %rcx
movq 0x8(%rcx), %rsi
movb (%rsi), %dil
xorl %ecx, %ecx
cmpb $0xa, %dil
cmoveq %rsi, %rcx
cmpb $0x30, (%r12)
jb 0xaa1d9
movq 0x8(%r12), %rsi
movq 0x20(%rsi), %r8
testq %r8, %r8
sete %r9b
je 0xaa1d4
cmpl $0x31, (%r8)
je 0xaa1cb
movq 0x10(%r8), %r8
testq %r8, %r8
sete %r9b
je 0xaa1d4
cmpl $0x31, (%r8)
jne 0xaa1b8
movq 0x8(%r8), %rsi
xorl %r9d, %r9d
jmp 0xaa1d4
testb %r9b, %r9b
je 0xaa1db
xorl %esi, %esi
xorl %r13d, %r13d
cmpb $0xa, %dil
jne 0xaa247
testq %rsi, %rsi
je 0xaa247
movq 0x10(%rax), %r13
movzbl (%r13), %eax
cmpl $0x1, %eax
je 0xaa212
cmpl $0x13, %eax
jne 0xaa207
cmpq 0x1190(%r14), %rcx
jne 0xaa212
jmp 0xaa243
cmpb $0x1, (%rax,%rdx)
jne 0xaa247
cmpl $0x13, %eax
je 0xaa1fc
cmpb $0x1, (%rax,%rdx)
jne 0xaa221
cmpq 0x11b0(%r14), %rcx
je 0xaa243
cmpq $0x18, %rax
je 0xaa23a
cmpl $0x1, %eax
jne 0xaa247
cmpq 0x1140(%r14), %rcx
je 0xaa243
cmpl $0x18, %eax
jne 0xaa247
cmpq 0xfe8(%r14), %rcx
jne 0xaa247
movq %rsi, 0x18(%rbx)
movq 0x10(%r15), %rax
movq 0x10(%rax), %r15
movq 0x8(%r15), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0xa639f
testq %rax, %rax
je 0xaa2a0
leaq 0x6421(%rip), %rcx      # 0xb068b
movq %rcx, (%rbx)
movq %rax, 0x10(%rbx)
testq %r13, %r13
je 0xaa27c
testb $0x4, 0x3(%rax)
jne 0xaa2b9
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0x0, 0x70(%rbx)
movl $0x1, %eax
movl $0x74, %ecx
jmp 0xaa334
cmpb $0xb, (%r12)
jne 0xaa306
movq 0x8(%r12), %rax
movq %rax, 0x10(%rbx)
leaq 0xb2b0(%rip), %rax      # 0xb5567
jmp 0xaa31c
movzbl (%r13), %ecx
addl $-0x13, %ecx
cmpl $0x5, %ecx
ja 0xaa27c
leaq 0x670b3(%rip), %rdx     # 0x111380
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq 0x8(%r13), %rax
jg 0xaa2ef
leaq 0xb16b(%rip), %rax      # 0xb5456
movq %rax, 0x18(%rbx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0x9, 0x70(%rbx)
jmp 0xaa291
movq %r14, %rdi
movq %r15, %rsi
callq 0xa66f0
testb %al, %al
je 0xaa352
leaq 0xb264(%rip), %rax      # 0xb5580
movq %rax, (%rbx)
movabsq $0x100000004, %rax      # imm = 0x100000004
movq %rax, 0x60(%rbx)
xorl %eax, %eax
movl $0x70, %ecx
movl %eax, (%rbx,%rcx)
movb $0x1, %al
xorl %ecx, %ecx
testb %cl, %cl
je 0xaa341
xorl %eax, %eax
andb $0x1, %al
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movb $0x1, %cl
jmp 0xaa33b
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq 0x8(%r13), %rax
jg 0xaa36f
leaq 0xb179(%rip), %rax      # 0xb54e4
movq %rax, 0x18(%rbx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0x4, 0x70(%rbx)
jmp 0xaa291
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq 0x8(%r13), %rax
jg 0xaa3a2
leaq 0xb0e0(%rip), %rax      # 0xb547e
movq %rax, 0x18(%rbx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0x6, 0x70(%rbx)
jmp 0xaa291
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq 0x8(%r13), %rax
jg 0xaa3d5
leaq 0xb0b6(%rip), %rax      # 0xb5487
movq %rax, 0x18(%rbx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0x5, 0x70(%rbx)
jmp 0xaa291
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq 0x8(%r13), %rax
jg 0xaa408
leaq 0xb066(%rip), %rax      # 0xb546a
movq %rax, 0x18(%rbx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0xa, 0x70(%rbx)
jmp 0xaa291