// File: /workspace/github_c_makefile_star2_O3/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:
cmpb $0x30, (%rdx)
jb 0xa35a4
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r13
movq 0x8(%rdx), %rax
movq 0x20(%rax), %rax
testq %rax, %rax
je 0xa35ee
movq %r8, %r15
movq %rcx, %r12
movq %rsi, %rbx
movq %rdi, %r14
cmpl $0x30, (%rax)
je 0xa35a7
movq 0x10(%rax), %rax
testq %rax, %rax
jne 0xa3594
jmp 0xa35ee
xorl %eax, %eax
retq
movq 0x8(%rax), %rbp
testq %rbp, %rbp
je 0xa35ee
movq 0x10(%r15), %rax
movq 0x8(%rax), %rsi
movq 0x8(%r14), %rdi
callq 0xa56a4
testq %rax, %rax
je 0xa35ee
movq 0x10(%rax), %rcx
movzbl (%rcx), %esi
leaq 0xa764c(%rip), %rdx     # 0x14ac20
cmpb $0x1, (%rsi,%rdx)
jne 0xa35ff
movq 0x18(%rcx), %rcx
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
je 0xa35ff
cmpq $0x1, 0x10(%rcx)
jle 0xa35ff
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rbp, 0x18(%rbx)
movq %rax, 0x8(%rbx)
cmpb $0x30, (%r13)
jb 0xa3641
movq 0x8(%r13), %rcx
movq 0x20(%rcx), %rcx
testq %rcx, %rcx
je 0xa3641
movq 0x10(%r12), %rsi
movq 0x8(%rsi), %rsi
movb (%rsi), %r8b
xorl %r13d, %r13d
movq %rcx, %rdi
cmpl $0x31, (%rdi)
je 0xa3757
movq 0x10(%rdi), %rdi
testq %rdi, %rdi
jne 0xa362d
jmp 0xa3644
xorl %r13d, %r13d
movq 0x10(%r15), %rax
movq 0x10(%rax), %r15
movq 0x8(%r15), %r12
movq %r14, %rdi
movq %r12, %rsi
callq 0x9f8a2
testq %rax, %rax
je 0xa369d
leaq 0x60fc(%rip), %rcx      # 0xa9763
movq %rcx, (%rbx)
movq %rax, 0x10(%rbx)
testq %r13, %r13
je 0xa3679
testb $0x4, 0x3(%rax)
jne 0xa36c9
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0x0, 0x70(%rbx)
movl $0x1, %eax
movl $0x74, %ecx
jmp 0xa374d
cmpb $0xb, (%r12)
jne 0xa3719
movq 0x8(%r12), %rax
movq %rax, 0x10(%rbx)
leaq 0xabd1(%rip), %rax      # 0xae285
movq %rax, (%rbx)
movabsq $0x100000004, %rax      # imm = 0x100000004
movq %rax, 0x60(%rbx)
xorl %eax, %eax
jmp 0xa3748
movzbl (%r13), %ecx
addl $-0x13, %ecx
cmpl $0x5, %ecx
ja 0xa3679
leaq 0x64d0f(%rip), %rdx     # 0x1083ec
movslq (%rdx,%rcx,4), %rcx
addq %rdx, %rcx
jmpq *%rcx
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq 0x8(%r13), %rax
jg 0xa36ff
leaq 0xaa79(%rip), %rax      # 0xae174
movq %rax, 0x18(%rbx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0x9, 0x70(%rbx)
jmp 0xa368e
movq %r14, %rdi
movq %r15, %rsi
callq 0x9fbc8
movl %eax, %ecx
xorl %eax, %eax
testb %cl, %cl
je 0xa35f0
leaq 0xab67(%rip), %rcx      # 0xae29e
movq %rcx, (%rbx)
movabsq $0x100000004, %rcx      # imm = 0x100000004
movq %rcx, 0x60(%rbx)
movl $0x70, %ecx
movl %eax, (%rbx,%rcx)
movb $0x1, %al
jmp 0xa35f0
xorl %r13d, %r13d
cmpb $0xa, %r8b
jne 0xa3644
cmpq $0x0, 0x8(%rdi)
je 0xa3644
movq 0x10(%rax), %r13
movzbl (%r13), %eax
cmpl $0x1, %eax
je 0xa387b
cmpl $0x13, %eax
jne 0xa3868
cmpq 0x1190(%r14), %rsi
jne 0xa387b
jmp 0xa38b5
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq 0x8(%r13), %rax
jg 0xa37b5
leaq 0xaa51(%rip), %rax      # 0xae202
movq %rax, 0x18(%rbx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0x4, 0x70(%rbx)
jmp 0xa368e
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq 0x8(%r13), %rax
jg 0xa37e8
leaq 0xa9b8(%rip), %rax      # 0xae19c
movq %rax, 0x18(%rbx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0x6, 0x70(%rbx)
jmp 0xa368e
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq 0x8(%r13), %rax
jg 0xa381b
leaq 0xa98e(%rip), %rax      # 0xae1a5
movq %rax, 0x18(%rbx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0x5, 0x70(%rbx)
jmp 0xa368e
movq 0x10(%rax), %rax
movq 0x10(%rax), %rax
cmpq 0x8(%r13), %rax
jg 0xa384e
leaq 0xa93e(%rip), %rax      # 0xae188
movq %rax, 0x18(%rbx)
movabsq $0x200000004, %rax      # imm = 0x200000004
movq %rax, 0x60(%rbx)
movl $0xa, 0x70(%rbx)
jmp 0xa368e
cmpb $0x1, (%rax,%rdx)
jne 0xa3644
cmpl $0x13, %eax
je 0xa378a
cmpb $0x1, (%rax,%rdx)
jne 0xa388a
cmpq 0x11b0(%r14), %rsi
je 0xa38b5
cmpq $0x18, %rax
je 0xa38a8
cmpl $0x1, %eax
jne 0xa3644
cmpq 0x1140(%r14), %rsi
jne 0xa3644
jmp 0xa38b5
cmpq 0xfe8(%r14), %rsi
jne 0xa3644
xorl %eax, %eax
cmpl $0x31, (%rcx)
je 0xa38c7
movq 0x10(%rcx), %rcx
testq %rcx, %rcx
jne 0xa38b7
jmp 0xa38cb
movq 0x8(%rcx), %rax
movq %rax, 0x18(%rbx)
jmp 0xa3644