// File: /workspace/github_c_makefile_star2_O3/cogbee[P]vmir-latest/src/vmir_bitcode_parser.c
// Function: paramattr_group_rec_handler
static void
paramattr_group_rec_handler(ir_unit_t *iu, int op,
                            unsigned int argc, const int64_t *argv)
{
  char *key, *value;
  const char *ctx = "PARAMATTR_GRP_CODE_ENTRY";
  switch(op) {
  case 3: // PARAMATTR_GRP_CODE_ENTRY
    if(argc < 3)
      parser_error(iu, "%s: Short (%d records)", ctx, argc);

    ir_attr_t *ia = calloc(1, sizeof(ir_attr_t));
    LIST_INSERT_HEAD(&iu->iu_attribute_groups, ia, ia_link);

    ia->ia_group_id = argv[0];
    ia->ia_index    = argv[1];
    argv += 2;
    argc -= 2;
    while(argc > 0) {
      int type = argv[0];
      argv++;
      argc--;
      if(argc == 0)
        parser_error(iu, "%s: Short record", ctx);

      switch(type) {
      case 0:
        // ENUM attribute
        ia->ia_flags |= (1ULL << argv[0]);
        argv++;
        argc--;
        break;
      case 1:
        if(argc < 1)
          parser_error(iu, "%s: Missing int-arg", ctx);
        // Integer attribute
        argv += 2;
        argc -= 2;
        break;
      case 3:
        key = read_zstr_from_argv(&argc, &argv);
        if(key == NULL)
          parser_error(iu, "%s: short string", ctx);
        free(key);
        break;
      case 4:
        key = read_zstr_from_argv(&argc, &argv);
        if(key == NULL)
          parser_error(iu, "%s: short string", ctx);
        value = read_zstr_from_argv(&argc, &argv);
        if(value == NULL) {
          free(key);
          parser_error(iu, "%s: short string", ctx);
        }
        free(key);
        free(value);
        break;
      default:
        parser_error(iu, "%s: Unknown attr %d", ctx, type);
      }
    }
    break;
  default:
    parser_error(iu, "Unknown op %d in paramattr_group", op);
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rdi, %rbx
cmpl $0x3, %esi
jne 0x1e485
movl %edx, %ebp
cmpl $0x2, %edx
jbe 0x1e4a5
movq %rcx, %r12
movl $0x1, %edi
movl $0x20, %esi
callq 0x32f0
movq %rax, %r14
leaq 0x148(%rbx), %rax
movq %rbx, 0x8(%rsp)
movq 0x148(%rbx), %rcx
movq %rcx, (%r14)
testq %rcx, %rcx
je 0x1e2ca
movq %r14, 0x8(%rcx)
movq %r14, (%rax)
movq %rax, 0x8(%r14)
movdqu (%r12), %xmm0
pshufd $0xe8, %xmm0, %xmm0     # xmm0 = xmm0[0,2,2,3]
movq %xmm0, 0x10(%r14)
addq $0x10, %r12
leaq 0x10(%rsp), %r15
movq %r12, (%r15)
addl $-0x2, %ebp
leaq 0x6444(%rip), %rbx      # 0x2473c
leaq 0x4(%rsp), %r12
movq 0x10(%rsp), %rax
movq (%rax), %r9
leaq 0x8(%rax), %rcx
movq %rcx, 0x10(%rsp)
movl %ebp, %ecx
decl %ecx
movl %ecx, 0x4(%rsp)
je 0x1e3d3
cmpl $0x4, %r9d
ja 0x1e3f9
movl %r9d, %ecx
movslq (%rbx,%rcx,4), %rcx
addq %rbx, %rcx
jmpq *%rcx
movb 0x8(%rax), %cl
movl $0x1, %edx
shlq %cl, %rdx
orq %rdx, 0x18(%r14)
addq $0x10, %rax
movq %rax, 0x10(%rsp)
addl $-0x2, %ebp
jmp 0x1e3b8
movq %r12, %rdi
movq %r15, %rsi
callq 0x2014d
testq %rax, %rax
je 0x1e461
movq %rax, %r13
jmp 0x1e39e
movq %r12, %rdi
movq %r15, %rsi
callq 0x2014d
testq %rax, %rax
je 0x1e440
movq %rax, %rbp
movq %r12, %rdi
movq %r15, %rsi
callq 0x2014d
movq %rax, %r13
movq %rbp, %rdi
callq 0x3030
testq %r13, %r13
je 0x1e41f
movq %r13, %rdi
callq 0x3030
movl 0x4(%rsp), %ebp
jmp 0x1e3bc
addq $0x18, %rax
movq %rax, 0x10(%rsp)
addl $-0x3, %ebp
movl %ebp, 0x4(%rsp)
testl %ebp, %ebp
jne 0x1e2fd
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x91fb(%rip), %rsi      # 0x275d5
leaq 0x93fe(%rip), %rcx      # 0x277df
leaq 0x93c7(%rip), %r8       # 0x277af
movq 0x8(%rsp), %rdi
movl $0x122, %edx            # imm = 0x122
xorl %eax, %eax
callq 0xca98
leaq 0x91d5(%rip), %rsi      # 0x275d5
leaq 0x93fa(%rip), %rcx      # 0x27801
leaq 0x93a1(%rip), %r8       # 0x277af
movq 0x8(%rsp), %rdi
movl $0x145, %edx            # imm = 0x145
xorl %eax, %eax
callq 0xca98
leaq 0x91af(%rip), %rsi      # 0x275d5
leaq 0x93c3(%rip), %rcx      # 0x277f0
leaq 0x937b(%rip), %r8       # 0x277af
movq 0x8(%rsp), %rdi
movl $0x13f, %edx            # imm = 0x13F
jmp 0x1e3f2
leaq 0x918e(%rip), %rsi      # 0x275d5
leaq 0x93a2(%rip), %rcx      # 0x277f0
leaq 0x935a(%rip), %r8       # 0x277af
movq 0x8(%rsp), %rdi
movl $0x13b, %edx            # imm = 0x13B
jmp 0x1e3f2
leaq 0x916d(%rip), %rsi      # 0x275d5
leaq 0x9381(%rip), %rcx      # 0x277f0
leaq 0x9339(%rip), %r8       # 0x277af
movq 0x8(%rsp), %rdi
movl $0x135, %edx            # imm = 0x135
jmp 0x1e3f2
movl %esi, %r8d
leaq 0x9146(%rip), %rsi      # 0x275d5
leaq 0x937f(%rip), %rcx      # 0x27815
movq %rbx, %rdi
movl $0x14a, %edx            # imm = 0x14A
xorl %eax, %eax
callq 0xca98
leaq 0x9129(%rip), %rsi      # 0x275d5
leaq 0x9315(%rip), %rcx      # 0x277c8
leaq 0x92f5(%rip), %r8       # 0x277af
movq %rbx, %rdi
movl $0x114, %edx            # imm = 0x114
movl %ebp, %r9d
jmp 0x1e418