// File: /workspace/github_c_makefile_star2_O1/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 $0xd8, %rsp
movl %r9d, 0x2c(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x30(%rdi)
movups %xmm0, 0x20(%rdi)
movups %xmm0, 0x10(%rdi)
movups %xmm0, (%rdi)
movq %rdi, 0x20(%rsp)
movq $0x0, 0x40(%rdi)
cmpl $0x7, %edx
jbe 0x5749
movq %rsi, 0x18(%rsp)
movl (%rsi), %r15d
cmpl %edx, %r15d
ja 0x574e
cmpl %ecx, %r15d
jne 0x5753
movl %edx, 0x10(%rsp)
movl 0x2c(%rsp), %eax
movq %rax, 0x88(%rsp)
testl %r8d, %r8d
je 0x4e35
movq 0x18(%rsp), %r13
movl 0x4(%r13), %ebx
movq 0x20(%rsp), %r12
movl %ebx, 0x1c(%r12)
movl $0x20, %esi
movq %rbx, %rdi
callq 0x10e0
movq %rax, 0x20(%r12)
testq %rax, %rax
je 0x575d
leaq 0x8(%r13), %r12
testl %ebx, %ebx
je 0x4e3d
movq %rax, %r14
movq %r13, %rdx
shlq $0x5, %rbx
xorl %ebp, %ebp
movq %r12, %rsi
subq %rdx, %r12
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, %r12
jg 0x56f9
cmpl $-0x5, %r12d
ja 0x56f9
leal 0x4(%r12), %ecx
cmpl %r15d, %ecx
ja 0x56f9
movl (%rsi), %r13d
movl %r13d, %ecx
negl %ecx
cmpl %r12d, %ecx
jbe 0x573a
addl %r13d, %r12d
cmpl %r15d, %r12d
ja 0x573a
movq %rsi, %r12
movq 0x88(%rsp), %rax
leal (%rsi,%rax), %ecx
subl %edx, %ecx
movl 0x2c(%rsp), %eax
testl %eax, %eax
cmovel %eax, %ecx
leaq 0xb8(%rsp), %rdi
movl %r13d, %edx
callq 0x5767
movq 0x18(%rsp), %rdx
movups 0xb8(%rsp), %xmm0
movups 0xc8(%rsp), %xmm1
movups %xmm1, 0x10(%r14,%rbp)
movups %xmm0, (%r14,%rbp)
addq %r13, %r12
addq $0x20, %rbp
cmpq %rbp, %rbx
jne 0x4d91
jmp 0x4e3d
xorl %r15d, %r15d
movq 0x18(%rsp), %r12
movl (%r12), %ebx
movl %ebx, %eax
addl %r15d, %eax
jb 0x5744
leal (%rbx,%r15), %ebp
cmpl 0x10(%rsp), %ebp
ja 0x5744
movl 0x4(%r12), %r14d
movl $0x30, %esi
movq %r14, %rdi
callq 0x10e0
movq 0x20(%rsp), %rcx
movq %rax, 0x30(%rcx)
testq %rax, %rax
je 0x5758
addq $0x8, %r12
testq %r14, %r14
movq 0x18(%rsp), %rdx
je 0x5669
movl %r15d, %eax
addq %rdx, %rax
addq %rbx, %rax
movq %rax, 0x98(%rsp)
movq $0x0, 0x68(%rsp)
movl %ebp, 0x7c(%rsp)
movq %r14, 0x90(%rsp)
movq %r12, %rax
subq %rdx, %rax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, %rax
jg 0x570d
cmpl $-0x5, %eax
ja 0x5708
leal 0x4(%rax), %ecx
cmpl %ebp, %ecx
ja 0x5708
movl (%r12), %esi
movl %esi, %ecx
negl %ecx
cmpl %eax, %ecx
jbe 0x5703
addl %esi, %eax
cmpl %ebp, %eax
ja 0x5703
leaq 0x10(%r12), %rax
cmpq 0x98(%rsp), %rax
movq %rsi, 0x38(%rsp)
ja 0x4f15
cmpl $-0x1, (%rax)
je 0x4fb2
movq 0x68(%rsp), %rcx
leaq (%rcx,%rcx,2), %r9
shlq $0x4, %r9
movq 0x20(%rsp), %rcx
addq 0x30(%rcx), %r9
movq 0x88(%rsp), %rcx
leal (%r12,%rcx), %edi
subl %edx, %edi
movl 0x2c(%rsp), %ecx
testl %ecx, %ecx
cmovel %ecx, %edi
movl %edi, 0x54(%rsp)
movb $0x0, 0xe(%rsp)
movw $0x0, 0xc(%rsp)
cmpl $0x13, %esi
jbe 0x5717
movl 0x4(%r12), %edi
movl %edi, %ecx
shrl $0x8, %ecx
movq %r9, 0xa0(%rsp)
je 0x4f82
cmpl $0x20, %ecx
jne 0x562e
movb $0x1, %cl
movl %ecx, 0x14(%rsp)
xorl %ecx, %ecx
jmp 0x4f8c
movb $0x1, %cl
movl $0x0, 0x14(%rsp)
movzbl %dil, %edx
leal -0x2(%rdx), %esi
cmpl $0x13, %esi
ja 0x4fc9
leaq 0x2111(%rip), %r8       # 0x70b0
movslq (%r8,%rsi,4), %rsi
addq %r8, %rsi
jmpq *%rsi
movl $0x6, %esi
jmp 0x503a
movq %r12, %rdi
movq 0x20(%rsp), %rdx
callq 0x5a42
movq 0x38(%rsp), %rbx
jmp 0x55a3
cmpl $0x65, %edx
je 0x5035
cmpl $0x67, %edx
jne 0x562e
movl $0xd, %esi
jmp 0x503a
movl $0x7, %esi
jmp 0x503a
movl $0x5, %esi
jmp 0x503a
movq $0x0, (%rsp)
jmp 0x503e
movl $0x1, %esi
jmp 0x503a
movl $0x2, %esi
jmp 0x503a
movl $0xb, %esi
jmp 0x503a
movl $0x3, %esi
jmp 0x503a
movl $0xa, %esi
jmp 0x503a
movl $0x4, %esi
jmp 0x503a
movl $0xe, %esi
jmp 0x503a
movl $0x8, %esi
jmp 0x503a
movl $0x9, %esi
jmp 0x503a
movl $0xc, %esi
movq %rsi, (%rsp)
xorb $0x1, %cl
cmpl $0xd, %edx
movzbl %cl, %ecx
leal 0x2(%rcx,%rcx), %edx
leal 0x1(%rcx,%rcx), %ecx
cmovel %edx, %ecx
movl %ecx, 0x30(%rsp)
cmpl $0x0, 0x8(%r12)
jne 0x572b
movl (%rax), %ebx
movl %ebx, %eax
shrl $0x2, %eax
cmpl $0x3ffffffa, %eax       # imm = 0x3FFFFFFA
movq 0x38(%rsp), %rcx
ja 0x5721
leal 0x14(%rbx), %eax
cmpl %ecx, %eax
ja 0x5721
movl 0xc(%r12), %r14d
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
cmpq %rax, %r14
jne 0x55c6
leaq 0x14(%r12), %rdi
movl %ebx, %esi
callq 0x5cbb
movq %rax, 0x60(%rsp)
cmpl $-0x1d, %ebx
movq 0x38(%rsp), %rcx
ja 0x571c
leal 0x1c(%rbx), %ebp
cmpl %ecx, %ebp
ja 0x571c
movl 0x14(%r12,%rbx), %r15d
movl %ebx, %eax
addl %r15d, %eax
jb 0x56f4
leal (%r15,%rbx), %edx
leal -0x14(%rcx), %eax
movl %edx, 0x84(%rsp)
cmpl %eax, %edx
ja 0x56f4
leaq (%r12,%rbx), %r14
addq $0x14, %r14
movl 0x4(%r14), %r13d
movl $0x20, %esi
movq %r13, %rdi
callq 0x10e0
testq %rax, %rax
je 0x5726
movq %rax, %rbx
addq $0x8, %r14
testl %r13d, %r13d
je 0x550f
addl %r15d, %ebp
movl 0x54(%rsp), %eax
movq %rax, 0xa8(%rsp)
movq $0x0, 0x70(%rsp)
movl 0x14(%rsp), %eax
xorb $0x1, %al
movl %eax, 0x14(%rsp)
movl $0x0, 0x34(%rsp)
movl $0x0, 0x8(%rsp)
movq %r12, 0x58(%rsp)
movq %rbx, 0x40(%rsp)
movl %ebp, 0x80(%rsp)
movq %r15, 0x48(%rsp)
movq %r14, %rax
subq %r12, %rax
movabsq $-0xffffffff, %rdx      # imm = 0xFFFFFFFF00000001
leaq (%rax,%rdx), %rcx
addq $0x1d, %rdx
cmpq %rdx, %rcx
jb 0x56e5
cmpl $-0x1d, 0x84(%rsp)
ja 0x56db
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
addq $-0x3, %rcx
cmpq %rcx, %rax
ja 0x56db
leal 0x4(%rax), %ecx
cmpl %ebp, %ecx
ja 0x56db
movq %r13, 0xb0(%rsp)
movl (%r14), %r13d
testq %r13, %r13
je 0x56e0
cmpl %r15d, %r13d
jae 0x56e0
movl %eax, %ecx
notl %ecx
cmpl %ecx, %r13d
ja 0x56ea
addl %r13d, %eax
cmpl %ebp, %eax
ja 0x56ea
movl 0x8(%rsp), %r15d
shlq $0x5, %r15
movq 0xa8(%rsp), %rax
leal (%r14,%rax), %ecx
subl %r12d, %ecx
movl 0x54(%rsp), %eax
testl %eax, %eax
cmovel %eax, %ecx
leaq 0xb8(%rsp), %rdi
movq %r14, %rsi
movl %r13d, %edx
callq 0x5767
movups 0xb8(%rsp), %xmm0
movups 0xc8(%rsp), %xmm1
movups %xmm1, 0x10(%rbx,%r15)
movups %xmm0, (%rbx,%r15)
movq 0x8(%rbx,%r15), %rbp
testq %rbp, %rbp
je 0x52b2
addq %r15, %rbx
movl (%rbx), %r12d
cmpl $0x2, %r12d
je 0x5266
cmpl $0x3, %r12d
jne 0x52a4
movq %rbp, %rdi
leaq 0x2490(%rip), %rsi      # 0x76e7
callq 0x10f0
testl %eax, %eax
je 0x52d7
cmpl $0x2, %r12d
jne 0x52a4
movq %rbp, %rdi
leaq 0x250f(%rip), %rsi      # 0x777f
callq 0x10f0
testl %eax, %eax
setne %al
orb 0x14(%rsp), %al
jne 0x52a4
movl 0x18(%rbx), %eax
movl %eax, 0x34(%rsp)
movq 0x40(%rsp), %rbx
movq 0x8(%rbx,%r15), %rdi
callq 0x1030
movb $0x1, %al
movq %rax, 0x70(%rsp)
movq 0x58(%rsp), %r12
jmp 0x52b2
incl 0x8(%rsp)
movq 0x58(%rsp), %r12
movq 0x40(%rsp), %rbx
movq 0x48(%rsp), %r15
addq %r13, %r14
movq 0xb0(%rsp), %r13
decl %r13d
movl 0x80(%rsp), %ebp
jne 0x5161
jmp 0x5528
movl 0x30(%rsp), %eax
cmpl $0x4, %eax
je 0x52e5
cmpl $0x2, %eax
jne 0x5338
movq 0x18(%rbx), %rbp
movl $0x7, %edx
movq %rbp, %rdi
leaq 0x23cb(%rip), %rsi      # 0x76c3
callq 0x1060
testl %eax, %eax
movq 0x58(%rsp), %r12
jne 0x5712
addq $0x7, %rbp
movq %rbp, %rdi
callq 0x1190
movq %rax, (%rsp)
movq 0x40(%rsp), %rbx
movq 0x8(%rbx,%r15), %rdi
callq 0x1030
movq 0x18(%rbx,%r15), %rdi
callq 0x1030
jmp 0x52b2
movq 0x18(%rbx), %rbp
movq %rbp, %rdi
leaq 0x23a9(%rip), %rsi      # 0x76ef
callq 0x1040
testl %eax, %eax
movq 0x58(%rsp), %r12
je 0x548a
movq %rbp, %rdi
leaq 0x2394(%rip), %rsi      # 0x76f6
callq 0x1040
testl %eax, %eax
movq 0x40(%rsp), %rbx
je 0x5496
movq %rbp, %rdi
leaq 0x237f(%rip), %rsi      # 0x76fd
callq 0x1040
testl %eax, %eax
je 0x549d
movq %rbp, %rdi
leaq 0x236f(%rip), %rsi      # 0x7704
callq 0x1040
testl %eax, %eax
je 0x54a4
movq %rbp, %rdi
leaq 0x235f(%rip), %rsi      # 0x770b
callq 0x1040
testl %eax, %eax
je 0x54ab
movq %rbp, %rdi
leaq 0x234f(%rip), %rsi      # 0x7712
callq 0x1040
testl %eax, %eax
je 0x54b2
movq %rbp, %rdi
leaq 0x233f(%rip), %rsi      # 0x7719
callq 0x1040
testl %eax, %eax
je 0x54b9
movq %rbp, %rdi
leaq 0x232f(%rip), %rsi      # 0x7720
callq 0x1040
testl %eax, %eax
je 0x54c0
movq %rbp, %rdi
leaq 0x231f(%rip), %rsi      # 0x7727
callq 0x1040
testl %eax, %eax
je 0x54c7
movq %rbp, %rdi
leaq 0x230f(%rip), %rsi      # 0x772e
callq 0x1040
testl %eax, %eax
je 0x54ce
movq %rbp, %rdi
leaq 0x22fe(%rip), %rsi      # 0x7734
callq 0x1040
testl %eax, %eax
je 0x54d5
movq %rbp, %rdi
leaq 0x22ed(%rip), %rsi      # 0x773a
callq 0x1040
testl %eax, %eax
je 0x54dc
movq %rbp, %rdi
leaq 0x22df(%rip), %rsi      # 0x7743
callq 0x1040
testl %eax, %eax
je 0x54e3
movq %rbp, %rdi
leaq 0x22d3(%rip), %rsi      # 0x774a
callq 0x1040
movl $0xe, %ebp
testl %eax, %eax
je 0x54e8
jmp 0x5762
movl $0x1, %ebp
movq 0x40(%rsp), %rbx
jmp 0x54e8
movl $0x2, %ebp
jmp 0x54e8
movl $0x3, %ebp
jmp 0x54e8
movl $0x4, %ebp
jmp 0x54e8
movl $0x5, %ebp
jmp 0x54e8
movl $0x6, %ebp
jmp 0x54e8
movl $0x7, %ebp
jmp 0x54e8
movl $0x8, %ebp
jmp 0x54e8
movl $0x9, %ebp
jmp 0x54e8
movl $0xa, %ebp
jmp 0x54e8
movl $0xb, %ebp
jmp 0x54e8
movl $0xc, %ebp
jmp 0x54e8
movl $0xd, %ebp
movq 0x18(%rbx,%r15), %rdi
callq 0x1030
movq 0x8(%rbx,%r15), %rdi
callq 0x1030
cmpl (%rsp), %ebp
movq 0x48(%rsp), %r15
je 0x52b7
jmp 0x573f
movl $0x0, 0x34(%rsp)
movq $0x0, 0x70(%rsp)
movl $0x0, 0x8(%rsp)
movq %rbx, %rdx
movq 0x38(%rsp), %rbx
leaq (%r12,%rbx), %rax
cmpq %rax, %r14
movl 0x7c(%rsp), %ebp
movq 0x90(%rsp), %r14
movl 0x34(%rsp), %esi
movq 0x70(%rsp), %rdi
jne 0x5730
movq 0xa0(%rsp), %rcx
movl 0x8(%rsp), %eax
movl %eax, (%rcx)
xorl %eax, %eax
movl %eax, 0x4(%rcx)
movq %rdx, 0x8(%rcx)
movq 0x60(%rsp), %rdx
movq %rdx, 0x10(%rcx)
movl 0x30(%rsp), %edx
movl %edx, 0x18(%rcx)
movl %eax, 0x1c(%rcx)
movq (%rsp), %rax
movq %rax, 0x20(%rcx)
movl %esi, 0x28(%rcx)
movb %dil, 0x2c(%rcx)
movzwl 0xc(%rsp), %eax
movw %ax, 0x2d(%rcx)
movb 0xe(%rsp), %al
movb %al, 0x2f(%rcx)
movq 0x20(%rsp), %rax
incl 0x28(%rax)
movq 0x18(%rsp), %rdx
addq %rbx, %r12
movq 0x68(%rsp), %rcx
incq %rcx
movq %rcx, 0x68(%rsp)
cmpq %r14, %rcx
jne 0x4eb6
jmp 0x5669
cmpl %r14d, %ebx
jb 0x5735
cmpl $-0x15, %r14d
ja 0x5735
leal 0x14(%r14), %eax
cmpl %ecx, %eax
ja 0x5735
leaq 0x14(%r12), %rdi
movl %r14d, %esi
callq 0x5cbb
movq %rax, 0x60(%rsp)
movq 0x59fa(%rip), %rax      # 0xaff8
movq (%rax), %rcx
movl $0x2d, %esi
movl $0x1, %edx
leaq 0x2083(%rip), %rdi      # 0x7695
callq 0x1180
leaq (%r12,%r14), %rdi
addq $0x14, %rdi
movl %ebx, %esi
subl %r14d, %esi
callq 0x5be3
jmp 0x50a8
movq %r12, %rsi
movq 0x38(%rsp), %rbx
movl %ebx, %edx
callq 0x2388
xorl %edx, %edx
movq $0x0, 0x60(%rsp)
movl $0x0, 0x30(%rsp)
movl $0x0, 0x8(%rsp)
movq $0x0, (%rsp)
xorl %esi, %esi
xorl %edi, %edi
jmp 0x5552
movl 0x10(%rsp), %r14d
addq %rdx, %r14
cmpq %r14, %r12
je 0x56c4
movq %r12, %rax
subq %rdx, %rax
movl $0xfffffffe, %ecx       # imm = 0xFFFFFFFE
cmpq %rcx, %rax
jg 0x56ef
cmpl $-0x5, %eax
ja 0x56ef
leal 0x4(%rax), %ecx
cmpl 0x10(%rsp), %ecx
ja 0x56ef
movl (%r12), %ebx
movl %ebx, %ecx
negl %ecx
cmpl %eax, %ecx
jbe 0x56fe
addl %ebx, %eax
cmpl 0x10(%rsp), %eax
ja 0x56fe
movq %r12, %rdi
movl %ebx, %esi
movq 0x20(%rsp), %rdx
callq 0x5a42
addq %rbx, %r12
cmpq %r14, %r12
movq 0x18(%rsp), %rdx
jne 0x5676
movq 0x20(%rsp), %rax
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
callq 0x2215
callq 0x210c
callq 0x224a
callq 0x21e0
callq 0x24d9
callq 0x22e9
callq 0x2038
callq 0x24a4
callq 0x2405
callq 0x243a
callq 0x246f
callq 0x2141
callq 0x23d0
callq 0x231e
callq 0x2353
callq 0x22b4
callq 0x20a2
callq 0x227f
callq 0x20d7
callq 0x2003
callq 0x21ab
callq 0x2543
callq 0x25ad
callq 0x2578
callq 0x1fce
callq 0x250e
callq 0x206d
callq 0x2176