// File: /workspace/github_c_makefile_star2_O3/CheneyThinker[P]jbyte/src/jbyte_cp.c
// Function: analyzer_constant_pool
void analyzer_constant_pool(FILE* pReadFile, pcp_info pcp) {
  PRINTF_U2(constant_pool_count)
  pcp->constant_pool_count = constant_pool_count;
  pcp->constant_pool = (u1**) malloc(constant_pool_count * sizeof(u1*));
  for (u2 constant_pool_count_index = 0; constant_pool_count_index < constant_pool_count; constant_pool_count_index++) {
    pcp->constant_pool[constant_pool_count_index] = NULL;
  }
  for (u2 constant_pool_count_index = 1; constant_pool_count_index < constant_pool_count; constant_pool_count_index++) {
    PRINTF_U1(tag)
    switch (tag) {
      case CONSTANT_CLASS_TAG:
        {
          PRINTF_U2(name_index)
        }
        break;
      case CONSTANT_FIELDREF_TAG:
      case CONSTANT_METHODREF_TAG:
      case CONSTANT_INTERFACE_METHODREF_TAG:
        {
          PRINTF_U2(class_index)
          PRINTF_U2(name_and_type_index)
        }
        break;
      case CONSTANT_STRING_TAG:
        {
          PRINTF_U2(string_index)
        }
        break;
      case CONSTANT_INTEGER_TAG:
        {
          PRINTF_U4(bytes)
        }
        break;
      case CONSTANT_FLOAT_TAG:
        {
          PRINTF_U4(bytes)
          if ((bytes >= 0x7f800001 && bytes <= 0x7fffffff) || (bytes >= 0xff800001 && bytes <= 0xffffffff)) {
            printf("\tthe float value is NaN!\n");
          } else {
            int s = ((bytes >> 31) == 0) ? 1 : -1;
            int e = ((bytes >> 23) & 0xff);
            int m = (e == 0) ? (bytes & 0x7fffff) << 1 : (bytes & 0x7fffff) | 0x800000;
            float result = s * m * powf(2, e - 150);
            printf("\t%f\n", result);
          }
        }
        break;
      case CONSTANT_LONG_TAG:
        {
          PRINTF_U4(high_bytes)
          PRINTF_U4(low_bytes)
          long result = ((long) high_bytes << 32) | low_bytes;
          printf("\t%ld\n", result);
          constant_pool_count_index = constant_pool_count_index + 0x01;
        }
        break;
      case CONSTANT_DOUBLE_TAG:
        {
          PRINTF_U4(high_bytes)
          PRINTF_U4(low_bytes)
          long bytes = ((long) high_bytes << 32) | low_bytes;
          if ((bytes >= 0x7ff0000000000001L && bytes <= 0x7fffffffffffffffL) || (bytes >= 0xfff0000000000001L && bytes <= 0xffffffffffffffffL)) {
            printf("\tthe double value is NaN!\n");
          } else {
            int s = ((bytes >> 63) == 0) ? 1 : -1;
            int e = (int) ((bytes >> 52) & 0x7ffL);
            long m = (e == 0) ? (bytes & 0xfffffffffffffL) << 1 : (bytes & 0xfffffffffffffL) | 0x10000000000000L;
            double result = s * m * pow(2, e - 1075);
            printf("\t%lf\n", result);
          }
          constant_pool_count_index = constant_pool_count_index + 0x01;
        }
        break;
      case CONSTANT_NAME_AND_TYPE_TAG:
        {
          PRINTF_U2(name_index)
          PRINTF_U2(descriptor_index)
        }
        break;
      case CONSTANT_UTF8_TAG:
        {
          PRINTF_U2(length)
          if (length > 0) {
            u1 utf8_bytes[length + 1];
            pcp->constant_pool[constant_pool_count_index] = (u1*) malloc((length + 1) * sizeof(u1));
            for (u2 utf8_bytes_index = 0; utf8_bytes_index < length; utf8_bytes_index++) {
              fread(&utf8_bytes[utf8_bytes_index], 1, sizeof(u1), pReadFile);
              pcp->constant_pool[constant_pool_count_index][utf8_bytes_index] = utf8_bytes[utf8_bytes_index];
            }
            utf8_bytes[length] = '\0';
            pcp->constant_pool[constant_pool_count_index][length] = '\0';
            printf("utf8_bytes: %s\n", utf8_bytes);
          }
        }
        break;
      case CONSTANT_METHOD_HANDLE_TAG:
        {
          PRINTF_U1(reference_kind)
          PRINTF_U2(reference_index)
        }
        break;
      case CONSTANT_METHOD_TYPE_TAG:
        {
          PRINTF_U2(descriptor_index)
        }
        break;
      case CONSTANT_DYNAMIC_TAG:
      case CONSTANT_INVOKE_DYNAMIC_TAG:
        {
          PRINTF_U2(bootstrap_method_attr_index)
          PRINTF_U2(name_and_type_index)
        }
        break;
      case CONSTANT_MODULE_TAG:
      case CONSTANT_PACKAGE_TAG:
        {
          PRINTF_U2(name_index)
        }
        break;
    }
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rsi, %r14
movq %rdi, %r12
leaq -0x46(%rbp), %r15
movl $0x1, %esi
movl $0x2, %edx
movq %r15, %rdi
movq %r12, %rcx
callq 0x1080
movzwl (%r15), %ebx
movl %ebx, %r13d
rolw $0x8, %r13w
movzwl %r13w, %r15d
leaq 0x3e29(%rip), %rdi      # 0xa147
movl %r15d, %esi
xorl %eax, %eax
callq 0x10b0
movw %r15w, 0x8(%r14)
shll $0x3, %r15d
movq %r15, %rdi
callq 0x10e0
movq %rax, (%r14)
testw %bx, %bx
movl %r13d, %ebx
je 0x6368
cmpw $0x2, %bx
movl $0x1, %eax
cmovael %ebx, %eax
movzwl %ax, %eax
xorl %ecx, %ecx
movq (%r14), %rdx
movq $0x0, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x6355
cmpw $0x2, %bx
jb 0x6900
movw $0x1, %r13w
movl %ebx, -0x44(%rbp)
movl $0x1, %esi
movl $0x1, %edx
leaq -0x31(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzbl -0x31(%rbp), %r15d
leaq 0x3198(%rip), %rdi      # 0x9534
movl %r15d, %esi
xorl %eax, %eax
callq 0x10b0
decl %r15d
cmpl $0x13, %r15d
ja 0x6801
leaq 0x3c6a(%rip), %rcx      # 0xa024
movslq (%rcx,%r15,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x37bb(%rip), %rdi      # 0x9ba6
jmp 0x6442
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x3552(%rip), %rdi      # 0x9967
jmp 0x67fa
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x3dc0(%rip), %rdi      # 0xa202
xorl %eax, %eax
callq 0x10b0
movl $0x1, %esi
movl $0x2, %edx
leaq -0x30(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x30(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x3cf1(%rip), %rdi      # 0xa162
jmp 0x67fa
movl %r13d, -0x38(%rbp)
movl $0x1, %esi
movl $0x4, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x2c(%rbp), %r13d
bswapl %r13d
leaq 0x3cf8(%rip), %rdi      # 0xa196
movl %r13d, %esi
xorl %eax, %eax
callq 0x10b0
movl $0x1, %esi
movl $0x4, %edx
leaq -0x30(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x30(%rbp), %r15d
bswapl %r15d
leaq 0x3cdc(%rip), %rdi      # 0xa1a8
movl %r15d, %esi
xorl %eax, %eax
callq 0x10b0
movq %r13, %rax
shlq $0x20, %rax
orq %rax, %r15
movq %r15, %rcx
btrq $0x3f, %rcx
movabsq $0x7ff0000000000001, %rdx # imm = 0x7FF0000000000001
cmpq %rdx, %rcx
jb 0x6813
leaq 0x3d23(%rip), %rdi      # 0xa225
callq 0x1070
jmp 0x6889
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
jmp 0x679a
movl $0x1, %esi
movl $0x4, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x2c(%rbp), %esi
bswapl %esi
leaq 0x3c4e(%rip), %rdi      # 0xa19b
jmp 0x67fa
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x3c03(%rip), %rdi      # 0xa17d
jmp 0x67fa
movl $0x1, %esi
movl $0x4, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl %r13d, -0x38(%rbp)
movl -0x2c(%rbp), %r13d
movl %r13d, %esi
bswapl %esi
leaq 0x3bed(%rip), %rdi      # 0xa196
xorl %eax, %eax
callq 0x10b0
movl $0x1, %esi
movl $0x4, %edx
leaq -0x30(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x30(%rbp), %r15d
movl %r15d, %esi
bswapl %esi
leaq 0x3bd2(%rip), %rdi      # 0xa1a8
xorl %eax, %eax
callq 0x10b0
shlq $0x20, %r15
orq %r13, %r15
movl -0x38(%rbp), %r13d
bswapq %r15
leaq 0x3bc7(%rip), %rdi      # 0xa1b9
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
jmp 0x688d
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %ebx
movl %ebx, %eax
rolw $0x8, %ax
movzwl %ax, %r15d
leaq 0x30a6(%rip), %rdi      # 0x96d2
movl %r15d, %esi
xorl %eax, %eax
callq 0x10b0
testw %bx, %bx
je 0x66f7
movq %rsp, -0x50(%rbp)
leaq 0x1(%r15), %rdi
movq %r15, %rbx
movq %rsp, %r15
leal 0xf(%rdi), %eax
andl $-0x10, %eax
subq %rax, %r15
movq %r15, %rsp
callq 0x10e0
movq (%r14), %rcx
movl %r13d, -0x38(%rbp)
movzwl %r13w, %edx
movq %rdx, -0x40(%rbp)
movq %rax, (%rcx,%rdx,8)
cmpw $0x2, %bx
movl $0x1, %eax
movq %rbx, -0x58(%rbp)
cmovael %ebx, %eax
movzwl %ax, %ebx
movq %r12, %r13
movq %r14, %r12
xorl %r14d, %r14d
leaq (%r15,%r14), %rdi
movl $0x1, %esi
movl $0x1, %edx
movq %r13, %rcx
callq 0x1080
movb (%r15,%r14), %al
movq (%r12), %rcx
movq -0x40(%rbp), %rdx
movq (%rcx,%rdx,8), %rcx
movb %al, (%rcx,%r14)
incq %r14
cmpq %r14, %rbx
jne 0x668d
xorl %ecx, %ecx
movq -0x58(%rbp), %rdx
movb %cl, (%r15,%rdx)
movq (%r12), %rax
movq -0x40(%rbp), %rsi
movq (%rax,%rsi,8), %rax
movb %cl, (%rax,%rdx)
leaq 0x3ae6(%rip), %rdi      # 0xa1c5
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
movq -0x50(%rbp), %rsp
movq %r12, %r14
movq %r13, %r12
movl -0x38(%rbp), %r13d
movl -0x44(%rbp), %ebx
jmp 0x6801
movl $0x1, %esi
movl $0x4, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x2c(%rbp), %r15d
bswapl %r15d
leaq 0x3a78(%rip), %rdi      # 0xa19b
movl %r15d, %esi
xorl %eax, %eax
callq 0x10b0
movl %r15d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x7f800001, %eax       # imm = 0x7F800001
jb 0x6895
leaq 0x3af8(%rip), %rdi      # 0xa23f
callq 0x1070
jmp 0x6801
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x31ee(%rip), %rdi      # 0x9967
xorl %eax, %eax
callq 0x10b0
movl $0x1, %esi
movl $0x2, %edx
leaq -0x30(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x30(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x2f38(%rip), %rdi      # 0x96e0
jmp 0x67fa
movl $0x1, %esi
movl $0x1, %edx
leaq -0x30(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzbl -0x30(%rbp), %esi
leaq 0x3a0a(%rip), %rdi      # 0xa1d5
xorl %eax, %eax
callq 0x10b0
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x39f1(%rip), %rdi      # 0xa1eb
xorl %eax, %eax
callq 0x10b0
incl %r13d
cmpw %bx, %r13w
jb 0x637a
jmp 0x6900
shrl $0x14, %r13d
andl $0x7ff, %r13d           # imm = 0x7FF
leaq (%r15,%r15), %rcx
movabsq $0x1ffffffffffffe, %rdx # imm = 0x1FFFFFFFFFFFFE
andq %rdx, %rcx
movabsq $0xfffffffffffff, %rdx  # imm = 0xFFFFFFFFFFFFF
andq %rdx, %r15
testl %r13d, %r13d
leaq 0x1(%r15,%rdx), %rdx
cmoveq %rcx, %rdx
movq %rdx, %rcx
negq %rcx
testq %rax, %rax
cmovnsq %rdx, %rcx
cvtsi2sd %rcx, %xmm0
movsd %xmm0, -0x40(%rbp)
addl $0xfffffbcd, %r13d      # imm = 0xFFFFFBCD
movsd 0x37aa(%rip), %xmm0     # 0xa018
movl %r13d, %edi
callq 0x1060
mulsd -0x40(%rbp), %xmm0
leaq 0x393d(%rip), %rdi      # 0xa1bf
movb $0x1, %al
callq 0x10b0
movl -0x38(%rbp), %r13d
incl %r13d
jmp 0x6801
movl %r15d, %eax
shrl $0x17, %eax
movzbl %al, %edi
leal (%r15,%r15), %eax
andl $0xfffffe, %eax         # imm = 0xFFFFFE
movl %r15d, %ecx
andl $0x7fffff, %ecx         # imm = 0x7FFFFF
orl $0x800000, %ecx         # imm = 0x800000
testl %edi, %edi
cmovel %eax, %ecx
movl %ecx, %eax
negl %eax
testl %r15d, %r15d
cmovnsl %ecx, %eax
xorps %xmm0, %xmm0
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x40(%rbp)
addl $0xffffff6a, %edi       # imm = 0xFFFFFF6A
movss 0x3741(%rip), %xmm0     # 0xa020
callq 0x1110
mulss -0x40(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x389d(%rip), %rdi      # 0xa191
movb $0x1, %al
callq 0x10b0
jmp 0x6801
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq