// File: /workspace/github_c_makefile_star2_O3/pali[P]bmfdec/./bmfparse.c
// Function: parse_class_data
static struct mof_class parse_class_data(char *buf, uint32_t size, uint32_t size1, int with_qualifiers, uint32_t offset) {
  struct mof_class out;
  memset(&out, 0, sizeof(out));
  uint32_t *buf2 = (uint32_t *)buf;
  if (size < 8) error("Invalid size");
  uint32_t len1 = buf2[0];
  if (len1 > size) error("Invalid size");
  if (len1 != size1) error("Invalid size");
  uint32_t count1 = buf2[1];
  uint32_t i;
  char *tmp = buf + 8;
  if (with_qualifiers) {
    out.qualifiers_count = count1;
    out.qualifiers = calloc(count1, sizeof(*out.qualifiers));
    if (!out.qualifiers) error("calloc failed");
    for (i=0; i<count1; ++i) {
      if (tmp-buf >= UINT32_MAX || !check_sum(tmp-buf, 4, len1)) error("Invalid size");
      uint32_t len = ((uint32_t *)tmp)[0];
      if (len == 0 || !check_sum(tmp-buf, len, len1)) error("Invalid size");
      out.qualifiers[i] = parse_qualifier(tmp, len, offset ? offset+tmp-buf : 0);
      tmp += len;
    }
  } else {
    tmp = buf;
    count1 = 0;
    len1 = 0;
  }
  buf2 = (uint32_t *)tmp;
  uint32_t len2 = buf2[0];
  uint32_t count2 = buf2[1];
  if (!check_sum(len1, len2, size)) error("Invalid size");
  tmp += 8;
  out.variables = calloc(count2, sizeof(*out.variables));
  if (!out.variables) error("calloc failed");
  for (i=0; i<count2; ++i) {
    if (tmp-buf >= UINT32_MAX || !check_sum(len1, len2, UINT32_MAX)) error("Invalid size");
    if (!check_sum(tmp-buf, 4, len1+len2)) error("Invalid size");
    uint32_t len = ((uint32_t *)tmp)[0];
    if (len == 0 || !check_sum(tmp-buf, len, len1+len2)) error("Invalid size");
    if (tmp+16 <= buf+len1+len2 && ((uint32_t *)tmp)[4] == 0xFFFFFFFF) {
      parse_class_property(tmp, len, &out);
    } else {
      out.variables[i] = parse_class_variable(tmp, len, offset ? offset+tmp-buf : 0);
      out.variables_count++;
    }
    tmp += len;
  }
  while (tmp != buf+size) {
    if (tmp-buf >= UINT32_MAX || !check_sum(tmp-buf, 4, size)) error("Invalid size");
    uint32_t len = ((uint32_t *)tmp)[0];
    if (len == 0 || !check_sum(tmp-buf, len, size)) error("Invalid size");
    parse_class_property(tmp, len, &out);
    tmp += len;
  }
  return out;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xe8, %rsp
movl %r9d, 0x1c(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %rdi, 0x30(%rsp)
movq $0x0, 0x40(%rdi)
cmpl $0x7, %edx
jbe 0x5801
movl %edx, %ebp
movl (%rsi), %eax
cmpl %edx, %eax
ja 0x5806
movl %ecx, %ebx
cmpl %ecx, %eax
jne 0x580b
movl 0x1c(%rsp), %eax
movq %rax, 0x88(%rsp)
testl %r8d, %r8d
movl %ebp, 0x4c(%rsp)
movq %rsi, 0x28(%rsp)
je 0x4eb6
movq %rsi, %r12
movl 0x4(%rsi), %r14d
movq 0x30(%rsp), %r13
movl %r14d, 0x1c(%r13)
movl $0x20, %esi
movq %r14, %rdi
callq 0x10e0
movq %rax, 0x20(%r13)
testq %rax, %rax
je 0x5815
addq $0x8, %r12
testl %r14d, %r14d
je 0x4ebb
movq %rax, %r15
shlq $0x5, %r14
movq %r14, 0x10(%rsp)
xorl %r14d, %r14d
movq 0x28(%rsp), %r13
movq %r12, %rdx
subq %r13, %r12
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, %r12
jg 0x57b1
cmpl $-0x5, %r12d
ja 0x57b1
leal 0x4(%r12), %ecx
cmpl %ebx, %ecx
ja 0x57b1
movl (%rdx), %ebp
movl %ebp, %ecx
negl %ecx
cmpl %r12d, %ecx
jbe 0x57f2
addl %ebp, %r12d
cmpl %ebx, %r12d
ja 0x57f2
movq %rdx, %r12
movq 0x88(%rsp), %rax
leal (%rdx,%rax), %ecx
movq 0x28(%rsp), %r13
subl %r13d, %ecx
movl 0x1c(%rsp), %eax
testl %eax, %eax
cmovel %eax, %ecx
leaq 0xc8(%rsp), %rdi
movq %rdx, %rsi
movl %ebp, %edx
callq 0x581f
movups 0xc8(%rsp), %xmm0
movups 0xd8(%rsp), %xmm1
movups %xmm1, 0x10(%r15,%r14)
movups %xmm0, (%r15,%r14)
addq %rbp, %r12
addq $0x20, %r14
cmpq %r14, 0x10(%rsp)
jne 0x4e0c
movl 0x4c(%rsp), %ebp
jmp 0x4ebb
xorl %ebx, %ebx
movq %rsi, %r12
movl (%r12), %r14d
movl %r14d, %eax
addl %ebx, %eax
jb 0x57fc
leal (%r14,%rbx), %eax
movl %eax, 0x50(%rsp)
cmpl %ebp, %eax
ja 0x57fc
movl 0x4(%r12), %r15d
movl $0x30, %esi
movq %r15, %rdi
callq 0x10e0
movq 0x30(%rsp), %rcx
movq %rax, 0x30(%rcx)
testq %rax, %rax
je 0x5810
addq $0x8, %r12
testq %r15, %r15
je 0x572d
movl %ebx, %eax
movq 0x28(%rsp), %rbx
addq %rbx, %rax
addq %r14, %rax
movq %rax, 0xb0(%rsp)
movq $0x0, 0x78(%rsp)
movl 0x50(%rsp), %r14d
movq %r15, 0xa8(%rsp)
movq %r12, %rax
subq %rbx, %rax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, %rax
jg 0x57c5
cmpl $-0x5, %eax
ja 0x57c0
leal 0x4(%rax), %ecx
cmpl %r14d, %ecx
ja 0x57c0
movl (%r12), %edx
movl %edx, %ecx
negl %ecx
cmpl %eax, %ecx
jbe 0x57bb
addl %edx, %eax
cmpl %r14d, %eax
ja 0x57bb
movq %rdx, 0x8(%rsp)
leaq 0x10(%r12), %rax
cmpq 0xb0(%rsp), %rax
ja 0x4f97
cmpl $-0x1, (%rax)
je 0x5039
movq 0x78(%rsp), %rcx
leaq (%rcx,%rcx,2), %rdx
shlq $0x4, %rdx
movq 0x30(%rsp), %rcx
addq 0x30(%rcx), %rdx
movq %rdx, 0xb8(%rsp)
movq 0x88(%rsp), %rcx
leal (%r12,%rcx), %edx
subl %ebx, %edx
movl 0x1c(%rsp), %ecx
testl %ecx, %ecx
cmovel %ecx, %edx
movl %edx, 0x54(%rsp)
movb $0x0, 0x6(%rsp)
movw $0x0, 0x4(%rsp)
cmpl $0x13, 0x8(%rsp)
jbe 0x57cf
movl 0x4(%r12), %edi
movl %edi, %ecx
shrl $0x8, %ecx
je 0x5007
cmpl $0x20, %ecx
jne 0x56e5
movb $0x1, %cl
movq %rcx, 0x60(%rsp)
xorl %ecx, %ecx
jmp 0x5012
movb $0x1, %cl
movq $0x0, 0x60(%rsp)
movzbl %dil, %edx
leal -0x2(%rdx), %esi
cmpl $0x13, %esi
ja 0x5050
leaq 0x208b(%rip), %r8       # 0x70b0
movslq (%r8,%rsi,4), %rsi
addq %r8, %rsi
jmpq *%rsi
movl $0x6, %r13d
jmp 0x50d0
movq %r12, %rdi
movq 0x8(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x5b12
jmp 0x5657
cmpl $0x65, %edx
je 0x50ca
cmpl $0x67, %edx
jne 0x56e5
movl $0xd, %r13d
jmp 0x50d0
movl $0x7, %r13d
jmp 0x50d0
movl $0x5, %r13d
jmp 0x50d0
xorl %ebp, %ebp
movq 0x8(%rsp), %r15
xorl %r13d, %r13d
jmp 0x50d8
movl $0x1, %r13d
jmp 0x50d0
movl $0x2, %r13d
jmp 0x50d0
movl $0xb, %r13d
jmp 0x50d0
movl $0x3, %r13d
jmp 0x50d0
movl $0xa, %r13d
jmp 0x50d0
movl $0x4, %r13d
jmp 0x50d0
movl $0xe, %r13d
jmp 0x50d0
movl $0x8, %r13d
jmp 0x50d0
movl $0x9, %r13d
jmp 0x50d0
movl $0xc, %r13d
movl %r13d, %ebp
movq 0x8(%rsp), %r15
xorb $0x1, %cl
cmpl $0xd, %edx
movzbl %cl, %ecx
leal 0x2(%rcx,%rcx), %edx
leal 0x1(%rcx,%rcx), %ecx
cmovel %edx, %ecx
movl %ecx, 0x20(%rsp)
cmpl $0x0, 0x8(%r12)
jne 0x57e3
movl (%rax), %r14d
movl %r14d, %eax
shrl $0x2, %eax
cmpl $0x3ffffffa, %eax       # imm = 0x3FFFFFFA
ja 0x57d9
leal 0x14(%r14), %eax
cmpl %r15d, %eax
ja 0x57d9
movl 0xc(%r12), %ebx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %rbx
jne 0x567f
leaq 0x14(%r12), %rdi
movl %r14d, %esi
callq 0x5d8b
movq %rax, 0x68(%rsp)
cmpl $-0x1d, %r14d
ja 0x57d4
leal 0x1c(%r14), %ebx
cmpl %r15d, %ebx
ja 0x57d4
movq %rbp, 0x70(%rsp)
movq %r13, 0x90(%rsp)
movl 0x14(%r12,%r14), %ecx
movl %r14d, %eax
addl %ecx, %eax
jb 0x57ac
leal (%rcx,%r14), %edx
leal -0x14(%r15), %eax
movl %edx, 0x84(%rsp)
cmpl %eax, %edx
ja 0x57ac
movq %rcx, 0x98(%rsp)
addq %r12, %r14
addq $0x14, %r14
movl 0x4(%r14), %ebp
movl $0x20, %esi
movq %rbp, %rdi
callq 0x10e0
testq %rax, %rax
je 0x57de
movq %rax, 0x40(%rsp)
addq $0x8, %r14
testl %ebp, %ebp
movq 0x98(%rsp), %rsi
je 0x55c0
addl %esi, %ebx
movl 0x54(%rsp), %eax
movq %rax, 0xc0(%rsp)
movl $0x0, 0x10(%rsp)
movq 0x60(%rsp), %rax
xorb $0x1, %al
movq %rax, 0x60(%rsp)
movl $0x0, 0x24(%rsp)
movq $0x0, 0x58(%rsp)
movq %r12, 0x38(%rsp)
movl %ebx, 0x80(%rsp)
movq %r14, %rax
subq %r12, %rax
movabsq $-0xffffffff, %rdx      # imm = 0xFFFFFFFF00000001
leaq (%rax,%rdx), %rcx
addq $0x1d, %rdx
cmpq %rdx, %rcx
jb 0x579d
cmpl $-0x1d, 0x84(%rsp)
ja 0x5793
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
addq $-0x3, %rcx
cmpq %rcx, %rax
ja 0x5793
leal 0x4(%rax), %ecx
cmpl %ebx, %ecx
ja 0x5793
movl (%r14), %r13d
testq %r13, %r13
je 0x5798
cmpl %esi, %r13d
jae 0x5798
movl %eax, %ecx
notl %ecx
cmpl %ecx, %r13d
ja 0x57a2
addl %r13d, %eax
cmpl %ebx, %eax
ja 0x57a2
movl 0x10(%rsp), %r15d
shlq $0x5, %r15
movq 0xc0(%rsp), %rax
leal (%r14,%rax), %ecx
subl %r12d, %ecx
movl 0x54(%rsp), %eax
testl %eax, %eax
cmovel %eax, %ecx
leaq 0xc8(%rsp), %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0x581f
movups 0xc8(%rsp), %xmm0
movups 0xd8(%rsp), %xmm1
movq 0x40(%rsp), %rax
movups %xmm1, 0x10(%rax,%r15)
movups %xmm0, (%rax,%r15)
movq 0x8(%rax,%r15), %rbx
testq %rbx, %rbx
je 0x53bf
leaq (%rax,%r15), %r12
movl (%r12), %eax
cmpl $0x2, %eax
je 0x5382
cmpl $0x3, %eax
jne 0x53b6
movq %rbx, %rdi
leaq 0x23d7(%rip), %rsi      # 0x76e4
callq 0x10f0
testl %eax, %eax
jne 0x53b6
movl 0x20(%rsp), %eax
cmpl $0x4, %eax
je 0x532c
cmpl $0x2, %eax
jne 0x53de
movq 0x18(%r12), %r12
movl $0x7, %edx
movq %r12, %rdi
leaq 0x2380(%rip), %rsi      # 0x76c0
callq 0x1060
testl %eax, %eax
jne 0x57ca
addq $0x7, %r12
movq %r12, %rdi
callq 0x1190
movq %rax, %r12
movq %rbx, %rdi
callq 0x1030
movq 0x40(%rsp), %rax
movq 0x18(%rax,%r15), %rdi
callq 0x1030
movq %r12, 0x70(%rsp)
movq %r12, 0x90(%rsp)
jmp 0x53ba
movq %rbx, %rdi
leaq 0x23f0(%rip), %rsi      # 0x777c
callq 0x10f0
testl %eax, %eax
setne %al
orb 0x60(%rsp), %al
jne 0x53b6
movl 0x18(%r12), %eax
movl %eax, 0x24(%rsp)
movq %rbx, %rdi
callq 0x1030
movb $0x1, %al
movq %rax, 0x58(%rsp)
jmp 0x53ba
incl 0x10(%rsp)
movq 0x38(%rsp), %r12
addq %r13, %r14
decl %ebp
movl 0x80(%rsp), %ebx
movq 0x98(%rsp), %rsi
jne 0x520e
jmp 0x55d9
movq 0x18(%r12), %rbx
movq %rbx, %rdi
leaq 0x22ff(%rip), %rsi      # 0x76ec
callq 0x1040
testl %eax, %eax
movq %rbx, 0xa0(%rsp)
je 0x5534
movq %rbx, %rdi
leaq 0x22e7(%rip), %rsi      # 0x76f3
callq 0x1040
testl %eax, %eax
movq 0x38(%rsp), %r12
je 0x5540
movq %rbx, %rdi
leaq 0x22d2(%rip), %rsi      # 0x76fa
callq 0x1040
testl %eax, %eax
je 0x5547
movq %rbx, %rdi
leaq 0x22c2(%rip), %rsi      # 0x7701
callq 0x1040
testl %eax, %eax
je 0x554e
movq %rbx, %rdi
leaq 0x22b2(%rip), %rsi      # 0x7708
callq 0x1040
testl %eax, %eax
je 0x5555
movq %rbx, %rdi
leaq 0x22a2(%rip), %rsi      # 0x770f
callq 0x1040
testl %eax, %eax
je 0x555c
movq %rbx, %rdi
leaq 0x2292(%rip), %rsi      # 0x7716
callq 0x1040
testl %eax, %eax
je 0x5563
movq %rbx, %rdi
leaq 0x2282(%rip), %rsi      # 0x771d
callq 0x1040
testl %eax, %eax
je 0x556a
movq %rbx, %rdi
leaq 0x2272(%rip), %rsi      # 0x7724
callq 0x1040
testl %eax, %eax
je 0x5571
movq %rbx, %rdi
leaq 0x2262(%rip), %rsi      # 0x772b
callq 0x1040
testl %eax, %eax
je 0x5578
movq %rbx, %rdi
leaq 0x2251(%rip), %rsi      # 0x7731
callq 0x1040
testl %eax, %eax
je 0x557f
movq %rbx, %rdi
leaq 0x2240(%rip), %rsi      # 0x7737
callq 0x1040
testl %eax, %eax
je 0x5586
movq %rbx, %rdi
leaq 0x2232(%rip), %rsi      # 0x7740
callq 0x1040
testl %eax, %eax
je 0x558d
movq %rbx, %rdi
leaq 0x2226(%rip), %rsi      # 0x7747
callq 0x1040
movl $0xe, %ebx
testl %eax, %eax
je 0x5592
jmp 0x581a
movl $0x1, %ebx
movq 0x38(%rsp), %r12
jmp 0x5592
movl $0x2, %ebx
jmp 0x5592
movl $0x3, %ebx
jmp 0x5592
movl $0x4, %ebx
jmp 0x5592
movl $0x5, %ebx
jmp 0x5592
movl $0x6, %ebx
jmp 0x5592
movl $0x7, %ebx
jmp 0x5592
movl $0x8, %ebx
jmp 0x5592
movl $0x9, %ebx
jmp 0x5592
movl $0xa, %ebx
jmp 0x5592
movl $0xb, %ebx
jmp 0x5592
movl $0xc, %ebx
jmp 0x5592
movl $0xd, %ebx
movq 0xa0(%rsp), %rdi
callq 0x1030
movq 0x40(%rsp), %rax
movq 0x8(%rax,%r15), %rdi
callq 0x1030
cmpl 0x90(%rsp), %ebx
je 0x53bf
jmp 0x57f7
movl $0x0, 0x10(%rsp)
movl $0x0, 0x24(%rsp)
movq $0x0, 0x58(%rsp)
movq 0x8(%rsp), %rax
addq %r12, %rax
cmpq %rax, %r14
movl 0x4c(%rsp), %ebp
movq 0x28(%rsp), %rbx
movl 0x50(%rsp), %r14d
movl 0x24(%rsp), %esi
jne 0x57e8
movq 0xb8(%rsp), %rcx
movl 0x10(%rsp), %eax
movl %eax, (%rcx)
xorl %eax, %eax
movl %eax, 0x4(%rcx)
movq 0x40(%rsp), %rdx
movq %rdx, 0x8(%rcx)
movq 0x68(%rsp), %rdx
movq %rdx, 0x10(%rcx)
movl 0x20(%rsp), %edx
movl %edx, 0x18(%rcx)
movl %eax, 0x1c(%rcx)
movq 0x70(%rsp), %rax
movq %rax, 0x20(%rcx)
movl %esi, 0x28(%rcx)
movq 0x58(%rsp), %rax
movb %al, 0x2c(%rcx)
movzwl 0x4(%rsp), %eax
movw %ax, 0x2d(%rcx)
movb 0x6(%rsp), %al
movb %al, 0x2f(%rcx)
movq 0x30(%rsp), %rax
incl 0x28(%rax)
addq 0x8(%rsp), %r12
movq 0x78(%rsp), %rcx
incq %rcx
movq 0xa8(%rsp), %r15
movq %rcx, 0x78(%rsp)
cmpq %r15, %rcx
jne 0x4f36
jmp 0x5732
cmpl %ebx, %r14d
jb 0x57ed
cmpl $-0x15, %ebx
ja 0x57ed
leal 0x14(%rbx), %eax
cmpl %r15d, %eax
ja 0x57ed
leaq 0x14(%r12), %rdi
movl %ebx, %esi
callq 0x5d8b
movq %rax, 0x68(%rsp)
movq 0x5943(%rip), %rax      # 0xaff8
movq (%rax), %rcx
movl $0x2d, %esi
movl $0x1, %edx
leaq 0x1fc9(%rip), %rdi      # 0x7692
callq 0x1180
leaq (%r12,%rbx), %rdi
addq $0x14, %rdi
movl %r14d, %esi
subl %ebx, %esi
callq 0x5cb3
jmp 0x5142
movq %r12, %rsi
movq 0x8(%rsp), %rdx
callq 0x2340
movq $0x0, 0x40(%rsp)
movq $0x0, 0x68(%rsp)
movl $0x0, 0x20(%rsp)
movl $0x0, 0x10(%rsp)
movq $0x0, 0x70(%rsp)
xorl %esi, %esi
movq $0x0, 0x58(%rsp)
jmp 0x55fc
movq 0x28(%rsp), %rbx
movl %ebp, %r14d
addq %rbx, %r14
cmpq %r14, %r12
je 0x5781
movq %r12, %rax
subq 0x28(%rsp), %rax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, %rax
jg 0x57a7
cmpl $-0x5, %eax
ja 0x57a7
leal 0x4(%rax), %ecx
cmpl %ebp, %ecx
ja 0x57a7
movl (%r12), %ebx
movl %ebx, %ecx
negl %ecx
cmpl %eax, %ecx
jbe 0x57b6
addl %ebx, %eax
cmpl %ebp, %eax
ja 0x57b6
movq %r12, %rdi
movl %ebx, %esi
movq 0x30(%rsp), %rdx
callq 0x5b12
addq %rbx, %r12
jmp 0x5738
addq $0xe8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x21cd
callq 0x20c4
callq 0x2202
callq 0x2198
callq 0x2491
callq 0x22a1
callq 0x1ff0
callq 0x245c
callq 0x23bd
callq 0x23f2
callq 0x2427
callq 0x20f9
callq 0x2388
callq 0x22d6
callq 0x230b
callq 0x226c
callq 0x205a
callq 0x2237
callq 0x208f
callq 0x1fbb
callq 0x2163
callq 0x24fb
callq 0x2565
callq 0x2530
callq 0x1f86
callq 0x24c6
callq 0x2025
callq 0x212e