// File: /workspace/github_c_makefile_star2_O2/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 $0x48, %rsp
movq %rsi, %r12
movq %rdi, %r14
leaq -0x52(%rbp), %r15
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
movq %r15, %rdi
movq %r14, %rcx
callq 0x1080
movzwl (%r15), %eax
rolw $0x8, %ax
movzwl %ax, %r13d
leaq 0x339f(%rip), %rdi      # 0x9147
xorl %ebx, %ebx
movl %r13d, %esi
xorl %eax, %eax
callq 0x10b0
movw %r13w, 0x8(%r12)
movl %r13d, %edi
shll $0x3, %edi
callq 0x10e0
movq %r12, -0x50(%rbp)
movq %rax, (%r12)
cmpq %rbx, %r13
je 0x5de3
movq -0x50(%rbp), %rax
movq (%rax), %rax
andq $0x0, (%rax,%rbx,8)
incq %rbx
jmp 0x5dcd
movw $0x1, %bx
leaq -0x2d(%rbp), %r12
movq %r14, -0x48(%rbp)
movq %r13, -0x60(%rbp)
cmpw %r13w, %bx
jae 0x6349
movq %r12, %rdi
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %r14, %rcx
callq 0x1080
movzbl -0x2d(%rbp), %r15d
leaq 0x271a(%rip), %rdi      # 0x8534
movl %r15d, %esi
xorl %eax, %eax
callq 0x10b0
decl %r15d
cmpl $0x13, %r15d
ja 0x6226
leaq 0x31ec(%rip), %rcx      # 0x9024
movslq (%rcx,%r15,4), %rax
addq %rcx, %rax
jmpq *%rax
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
movq %r13, %r14
movq %r12, %r13
pushq $0x2
popq %r12
movq %r12, %rdx
movq -0x48(%rbp), %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x2d32(%rip), %rdi      # 0x8ba6
jmp 0x5ed2
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x2acd(%rip), %rdi      # 0x8967
jmp 0x621f
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
movq %r13, %r14
movq %r12, %r13
pushq $0x2
popq %r12
movq %r12, %rdx
movq -0x48(%rbp), %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x3330(%rip), %rdi      # 0x9202
xorl %eax, %eax
callq 0x10b0
leaq -0x34(%rbp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %r12
movq %r14, %r13
movq -0x48(%rbp), %r14
movq %r14, %rcx
callq 0x1080
movzwl -0x34(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x325b(%rip), %rdi      # 0x9162
jmp 0x621f
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
pushq $0x4
popq %rdx
movq %r14, %rcx
callq 0x1080
movl -0x2c(%rbp), %r12d
bswapl %r12d
leaq 0x3266(%rip), %rdi      # 0x9196
movl %r12d, %esi
xorl %eax, %eax
callq 0x10b0
leaq -0x34(%rbp), %rdi
movq %r15, %rsi
pushq $0x4
popq %rdx
movq %r14, %rcx
callq 0x1080
movl -0x34(%rbp), %r15d
bswapl %r15d
leaq 0x324e(%rip), %rdi      # 0x91a8
movl %r15d, %esi
xorl %eax, %eax
callq 0x10b0
movq %r12, %rax
shlq $0x20, %rax
orq %rax, %r15
movq %r15, %rcx
btrq $0x3f, %rcx
movabsq $0x7ff0000000000001, %rdx # imm = 0x7FF0000000000001
cmpq %rdx, %rcx
jb 0x6260
leaq 0x3295(%rip), %rdi      # 0x9225
callq 0x1070
jmp 0x62d6
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
jmp 0x61c3
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
movq %r14, %rcx
callq 0x1080
movl -0x2c(%rbp), %esi
bswapl %esi
leaq 0x31c8(%rip), %rdi      # 0x919b
jmp 0x621f
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x3181(%rip), %rdi      # 0x917d
jmp 0x621f
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
pushq $0x4
popq %rdx
movq %r14, %rcx
callq 0x1080
movl -0x2c(%rbp), %r12d
movl %r12d, %esi
bswapl %esi
leaq 0x316f(%rip), %rdi      # 0x9196
xorl %eax, %eax
callq 0x10b0
leaq -0x34(%rbp), %rdi
movq %r15, %rsi
pushq $0x4
popq %rdx
movq %r14, %rcx
callq 0x1080
movl -0x34(%rbp), %r15d
movl %r15d, %esi
bswapl %esi
leaq 0x3158(%rip), %rdi      # 0x91a8
xorl %eax, %eax
callq 0x10b0
shlq $0x20, %r15
orq %r12, %r15
leaq -0x2d(%rbp), %r12
bswapq %r15
leaq 0x314d(%rip), %rdi      # 0x91b9
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
incl %ebx
jmp 0x6226
movl %ebx, -0x40(%rbp)
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
movq %r14, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %ebx
movl %ebx, %eax
rolw $0x8, %ax
movzwl %ax, %r12d
leaq 0x262b(%rip), %rdi      # 0x86d2
movl %r12d, %esi
xorl %eax, %eax
callq 0x10b0
testw %bx, %bx
je 0x625b
movq %rsp, -0x68(%rbp)
leaq 0x1(%r12), %rdi
movq %rsp, %r15
leal 0xf(%rdi), %eax
andl $-0x10, %eax
subq %rax, %r15
movq %r15, %rsp
callq 0x10e0
movq -0x50(%rbp), %rcx
movq (%rcx), %rcx
movzwl -0x40(%rbp), %r13d
movq %rax, (%rcx,%r13,8)
xorl %ebx, %ebx
cmpq %rbx, %r12
je 0x622d
leaq (%r15,%rbx), %rdi
pushq $0x1
popq %rdx
movq %rdx, %rsi
movq %r14, %rcx
callq 0x1080
movb (%r15,%rbx), %al
movq -0x50(%rbp), %rcx
movq (%rcx), %rcx
movq (%rcx,%r13,8), %rcx
movb %al, (%rcx,%rbx)
incq %rbx
jmp 0x60e9
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %rsi
pushq $0x4
popq %rdx
movq %r14, %rcx
callq 0x1080
movl -0x2c(%rbp), %r15d
bswapl %r15d
leaq 0x3060(%rip), %rdi      # 0x919b
movl %r15d, %esi
xorl %eax, %eax
callq 0x10b0
movl %r15d, %eax
andl $0x7fffffff, %eax       # imm = 0x7FFFFFFF
cmpl $0x7f800001, %eax       # imm = 0x7F800001
jb 0x62e1
leaq 0x30e0(%rip), %rdi      # 0x923f
callq 0x1070
jmp 0x6226
leaq -0x2c(%rbp), %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
movq %r13, %r14
movq %r12, %r13
pushq $0x2
popq %r12
movq %r12, %rdx
movq -0x48(%rbp), %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x27cb(%rip), %rdi      # 0x8967
xorl %eax, %eax
callq 0x10b0
leaq -0x34(%rbp), %rdi
movq %r15, %rsi
movq %r12, %rdx
movq %r13, %r12
movq %r14, %r13
movq -0x48(%rbp), %r14
movq %r14, %rcx
callq 0x1080
movzwl -0x34(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x250f(%rip), %rdi      # 0x86e0
jmp 0x621f
leaq -0x34(%rbp), %rdi
pushq $0x1
popq %r15
movq %r15, %rsi
movq %r15, %rdx
movq %r14, %rcx
callq 0x1080
movzbl -0x34(%rbp), %esi
leaq 0x2fe1(%rip), %rdi      # 0x91d5
xorl %eax, %eax
callq 0x10b0
leaq -0x2c(%rbp), %rdi
movq %r15, %rsi
pushq $0x2
popq %rdx
movq %r14, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movzwl %ax, %esi
leaq 0x2fcc(%rip), %rdi      # 0x91eb
xorl %eax, %eax
callq 0x10b0
incl %ebx
jmp 0x5df3
xorl %ecx, %ecx
movb %cl, (%r15,%r12)
movq -0x50(%rbp), %rax
movq (%rax), %rax
movq (%rax,%r13,8), %rax
movb %cl, (%rax,%r12)
leaq 0x2f7c(%rip), %rdi      # 0x91c5
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
movq -0x68(%rbp), %rsp
movq -0x60(%rbp), %r13
movl -0x40(%rbp), %ebx
jmp 0x62d8
shrl $0x14, %r12d
andl $0x7ff, %r12d           # imm = 0x7FF
leaq (%r15,%r15), %rcx
movabsq $0x1ffffffffffffe, %rdx # imm = 0x1FFFFFFFFFFFFE
andq %rdx, %rcx
movabsq $0xfffffffffffff, %rdx  # imm = 0xFFFFFFFFFFFFF
andq %rdx, %r15
testl %r12d, %r12d
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, %r12d      # imm = 0xFFFFFBCD
movsd 0x2d5d(%rip), %xmm0     # 0x9018
movl %r12d, %edi
callq 0x1060
mulsd -0x40(%rbp), %xmm0
leaq 0x2ef0(%rip), %rdi      # 0x91bf
movb $0x1, %al
callq 0x10b0
incl %ebx
leaq -0x2d(%rbp), %r12
jmp 0x6226
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
cvtsi2ss %eax, %xmm0
movss %xmm0, -0x40(%rbp)
addl $0xffffff6a, %edi       # imm = 0xFFFFFF6A
movss 0x2cf8(%rip), %xmm0     # 0x9020
callq 0x1110
mulss -0x40(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x2e54(%rip), %rdi      # 0x9191
movb $0x1, %al
callq 0x10b0
jmp 0x6226
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq