// File: /workspace/github_c_makefile_star2_O1/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, %rcx
leaq -0x36(%rbp), %r15
movl $0x1, %esi
movl $0x2, %edx
movq %r15, %rdi
movq %rcx, %r13
callq 0x1080
movzwl (%r15), %ebx
movl %ebx, %r12d
rolw $0x8, %r12w
movw %r12w, (%r15)
movzwl %r12w, %r15d
leaq 0x3e21(%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
je 0x636f
cmpw $0x2, %r12w
movl $0x1, %eax
cmovael %r12d, %eax
movzwl %ax, %eax
xorl %ecx, %ecx
movq (%r14), %rdx
movq $0x0, (%rdx,%rcx,8)
incq %rcx
cmpq %rcx, %rax
jne 0x635c
cmpw $0x2, -0x36(%rbp)
jb 0x6942
movq %r13, %r12
movw $0x1, %bx
leaq -0x2d(%rbp), %r13
movl $0x1, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %r12, %rcx
callq 0x1080
movzbl -0x2d(%rbp), %r15d
leaq 0x318e(%rip), %rdi      # 0x9534
movl %r15d, %esi
xorl %eax, %eax
callq 0x10b0
decl %r15d
cmpl $0x13, %r15d
ja 0x6845
leaq 0x3c60(%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
movw %ax, -0x2c(%rbp)
movzwl %ax, %esi
leaq 0x37ad(%rip), %rdi      # 0x9ba6
jmp 0x6458
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movw %ax, -0x2c(%rbp)
movzwl %ax, %esi
leaq 0x3540(%rip), %rdi      # 0x9967
jmp 0x683e
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movw %ax, -0x2c(%rbp)
movzwl %ax, %esi
leaq 0x3daa(%rip), %rdi      # 0xa202
xorl %eax, %eax
callq 0x10b0
movl $0x1, %esi
movl $0x2, %edx
leaq -0x34(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x34(%rbp), %eax
rolw $0x8, %ax
movw %ax, -0x34(%rbp)
movzwl %ax, %esi
leaq 0x3cd7(%rip), %rdi      # 0xa162
jmp 0x683e
movl $0x1, %esi
movl $0x4, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x2c(%rbp), %r13d
bswapl %r13d
movl %r13d, -0x2c(%rbp)
leaq 0x3cde(%rip), %rdi      # 0xa196
movl %r13d, %esi
xorl %eax, %eax
callq 0x10b0
movl $0x1, %esi
movl $0x4, %edx
leaq -0x34(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x34(%rbp), %r15d
bswapl %r15d
movl %r15d, -0x34(%rbp)
leaq 0x3cbe(%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 0x6856
leaq 0x3d05(%rip), %rdi      # 0xa225
callq 0x1070
jmp 0x68cc
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movw %ax, -0x2c(%rbp)
jmp 0x67de
movl $0x1, %esi
movl $0x4, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x2c(%rbp), %esi
bswapl %esi
movl %esi, -0x2c(%rbp)
leaq 0x3c25(%rip), %rdi      # 0xa19b
jmp 0x683e
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movw %ax, -0x2c(%rbp)
movzwl %ax, %esi
leaq 0x3bd6(%rip), %rdi      # 0xa17d
jmp 0x683e
movl $0x1, %esi
movl $0x4, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x2c(%rbp), %r13d
movl %r13d, %esi
bswapl %esi
movl %esi, -0x2c(%rbp)
leaq 0x3bc1(%rip), %rdi      # 0xa196
xorl %eax, %eax
callq 0x10b0
movl $0x1, %esi
movl $0x4, %edx
leaq -0x34(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x34(%rbp), %r15d
movl %r15d, %esi
bswapl %esi
movl %esi, -0x34(%rbp)
leaq 0x3ba3(%rip), %rdi      # 0xa1a8
xorl %eax, %eax
callq 0x10b0
shlq $0x20, %r15
orq %r13, %r15
leaq -0x2d(%rbp), %r13
bswapq %r15
leaq 0x3b98(%rip), %rdi      # 0xa1b9
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
incl %ebx
jmp 0x6845
movl %ebx, -0x44(%rbp)
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
movw %ax, -0x2c(%rbp)
movzwl %ax, %r15d
leaq 0x306e(%rip), %rdi      # 0x96d2
movl %r15d, %esi
xorl %eax, %eax
callq 0x10b0
testw %bx, %bx
je 0x672b
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
movzwl -0x44(%rbp), %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 0x66c1
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 0x3ab2(%rip), %rdi      # 0xa1c5
movq %r15, %rsi
xorl %eax, %eax
callq 0x10b0
movq -0x50(%rbp), %rsp
movq %r12, %r14
movq %r13, %r12
leaq -0x2d(%rbp), %r13
movl -0x44(%rbp), %ebx
jmp 0x6845
movl $0x1, %esi
movl $0x4, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movl -0x2c(%rbp), %r15d
bswapl %r15d
movl %r15d, -0x2c(%rbp)
leaq 0x3a40(%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 0x68d7
leaq 0x3ac0(%rip), %rdi      # 0xa23f
callq 0x1070
jmp 0x6845
movl $0x1, %esi
movl $0x2, %edx
leaq -0x2c(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x2c(%rbp), %eax
rolw $0x8, %ax
movw %ax, -0x2c(%rbp)
movzwl %ax, %esi
leaq 0x31b2(%rip), %rdi      # 0x9967
xorl %eax, %eax
callq 0x10b0
movl $0x1, %esi
movl $0x2, %edx
leaq -0x34(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzwl -0x34(%rbp), %eax
rolw $0x8, %ax
movw %ax, -0x34(%rbp)
movzwl %ax, %esi
leaq 0x2ef8(%rip), %rdi      # 0x96e0
jmp 0x683e
movl $0x1, %esi
movl $0x1, %edx
leaq -0x34(%rbp), %rdi
movq %r12, %rcx
callq 0x1080
movzbl -0x34(%rbp), %esi
leaq 0x39ca(%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
movw %ax, -0x2c(%rbp)
movzwl %ax, %esi
leaq 0x39ad(%rip), %rdi      # 0xa1eb
xorl %eax, %eax
callq 0x10b0
incl %ebx
cmpw -0x36(%rbp), %bx
jb 0x6385
jmp 0x6942
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 0x3767(%rip), %xmm0     # 0xa018
movl %r13d, %edi
callq 0x1060
mulsd -0x40(%rbp), %xmm0
leaq 0x38fa(%rip), %rdi      # 0xa1bf
movb $0x1, %al
callq 0x10b0
incl %ebx
leaq -0x2d(%rbp), %r13
jmp 0x6845
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 0x36ff(%rip), %xmm0     # 0xa020
callq 0x1110
mulss -0x40(%rbp), %xmm0
cvtss2sd %xmm0, %xmm0
leaq 0x385b(%rip), %rdi      # 0xa191
movb $0x1, %al
callq 0x10b0
jmp 0x6845
leaq -0x28(%rbp), %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq