// File: /workspace/github_c_makefile_star2_O0/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
movq %rsp, %rbp
subq $0x100, %rsp            # imm = 0x100
movq %rdi, -0xb8(%rbp)
movq %rdi, %rax
movq %rax, -0xb0(%rbp)
movq %rsi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl %ecx, -0x10(%rbp)
movl %r8d, -0x14(%rbp)
movl %r9d, -0x18(%rbp)
xorl %esi, %esi
movl $0x48, %edx
callq 0x10c0
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x8, -0xc(%rbp)
jae 0x33a0
jmp 0x336a
movq 0x7c87(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x5100(%rip), %rsi      # 0x847b
leaq 0x513d(%rip), %rdx      # 0x84bf
leaq 0x5275(%rip), %rcx      # 0x85fe
movl $0x2c0, %r8d            # imm = 0x2C0
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
movl -0x24(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x33e9
jmp 0x33b3
movq 0x7c3e(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x50b7(%rip), %rsi      # 0x847b
leaq 0x50f4(%rip), %rdx      # 0x84bf
leaq 0x522c(%rip), %rcx      # 0x85fe
movl $0x2c2, %r8d            # imm = 0x2C2
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movl -0x24(%rbp), %eax
cmpl -0x10(%rbp), %eax
je 0x3429
jmp 0x33f3
movq 0x7bfe(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x5077(%rip), %rsi      # 0x847b
leaq 0x50b4(%rip), %rdx      # 0x84bf
leaq 0x51ec(%rip), %rcx      # 0x85fe
movl $0x2c3, %r8d            # imm = 0x2C3
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x8(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
cmpl $0x0, -0x14(%rbp)
je 0x3673
movq -0xb8(%rbp), %rax
movl -0x28(%rbp), %ecx
movl %ecx, 0x1c(%rax)
movl -0x28(%rbp), %eax
movl %eax, %edi
movl $0x20, %esi
callq 0x10e0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq %rcx, 0x20(%rax)
cmpq $0x0, 0x20(%rax)
jne 0x34b2
jmp 0x347c
movq 0x7b75(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x4fee(%rip), %rsi      # 0x847b
leaq 0x50c8(%rip), %rdx      # 0x855c
leaq 0x5163(%rip), %rcx      # 0x85fe
movl $0x2ca, %r8d            # imm = 0x2CA
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x28(%rbp), %eax
jae 0x3671
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jge 0x3506
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
cmpl $0x4, %eax
jb 0x3506
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addl $0x4, %eax
cmpl -0x24(%rbp), %eax
jbe 0x353e
jmp 0x3508
movq 0x7ae9(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x4f62(%rip), %rsi      # 0x847b
leaq 0x4f9f(%rip), %rdx      # 0x84bf
leaq 0x50d7(%rip), %rcx      # 0x85fe
movl $0x2cc, %r8d            # imm = 0x2CC
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x3c(%rbp)
cmpl $0x0, -0x3c(%rbp)
je 0x3579
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
cmpl -0x3c(%rbp), %eax
jb 0x3579
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addl -0x3c(%rbp), %eax
cmpl -0x24(%rbp), %eax
jbe 0x35b1
jmp 0x357b
movq 0x7a76(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x4eef(%rip), %rsi      # 0x847b
leaq 0x4f2c(%rip), %rdx      # 0x84bf
leaq 0x5064(%rip), %rcx      # 0x85fe
movl $0x2ce, %r8d            # imm = 0x2CE
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0xb8(%rbp), %rax
movq 0x20(%rax), %rax
movl -0x2c(%rbp), %ecx
shlq $0x5, %rcx
addq %rcx, %rax
movq %rax, -0xd0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xc8(%rbp)
movl -0x3c(%rbp), %eax
movl %eax, -0xbc(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x3603
movl -0x18(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xd8(%rbp)
jmp 0x360e
xorl %eax, %eax
movq %rax, -0xd8(%rbp)
jmp 0x360e
movl -0xbc(%rbp), %edx
movq -0xc8(%rbp), %rsi
movq -0xd8(%rbp), %rax
movl %eax, %ecx
leaq -0x60(%rbp), %rdi
callq 0x40a0
movq -0xd0(%rbp), %rax
movq -0x60(%rbp), %rcx
movq %rcx, (%rax)
movq -0x58(%rbp), %rcx
movq %rcx, 0x8(%rax)
movq -0x50(%rbp), %rcx
movq %rcx, 0x10(%rax)
movq -0x48(%rbp), %rcx
movq %rcx, 0x18(%rax)
movl -0x3c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x34b9
jmp 0x3689
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movl $0x0, -0x28(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x64(%rbp)
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x68(%rbp)
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl -0x24(%rbp), %eax
cmpl -0x64(%rbp), %eax
jb 0x36bc
movl -0x24(%rbp), %eax
addl -0x64(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x36f4
jmp 0x36be
movq 0x7933(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x4dac(%rip), %rsi      # 0x847b
leaq 0x4de9(%rip), %rdx      # 0x84bf
leaq 0x4f21(%rip), %rcx      # 0x85fe
movl $0x2da, %r8d            # imm = 0x2DA
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x38(%rbp), %rax
addq $0x8, %rax
movq %rax, -0x38(%rbp)
movl -0x68(%rbp), %eax
movl %eax, %edi
movl $0x30, %esi
callq 0x10e0
movq %rax, %rcx
movq -0xb8(%rbp), %rax
movq %rcx, 0x30(%rax)
cmpq $0x0, 0x30(%rax)
jne 0x375c
jmp 0x3726
movq 0x78cb(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x4d44(%rip), %rsi      # 0x847b
leaq 0x4e1e(%rip), %rdx      # 0x855c
leaq 0x4eb9(%rip), %rcx      # 0x85fe
movl $0x2dd, %r8d            # imm = 0x2DD
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movl $0x0, -0x2c(%rbp)
movl -0x2c(%rbp), %eax
cmpl -0x68(%rbp), %eax
jae 0x39b9
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jge 0x379c
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl -0x24(%rbp), %eax
cmpl -0x64(%rbp), %eax
jb 0x379c
movl -0x24(%rbp), %eax
addl -0x64(%rbp), %eax
cmpl $-0x1, %eax
jbe 0x37d4
jmp 0x379e
movq 0x7853(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x4ccc(%rip), %rsi      # 0x847b
leaq 0x4d09(%rip), %rdx      # 0x84bf
leaq 0x4e41(%rip), %rcx      # 0x85fe
movl $0x2df, %r8d            # imm = 0x2DF
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
cmpl $0x4, %eax
jb 0x3805
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addl $0x4, %eax
movl -0x24(%rbp), %ecx
addl -0x64(%rbp), %ecx
cmpl %ecx, %eax
jbe 0x383d
jmp 0x3807
movq 0x77ea(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x4c63(%rip), %rsi      # 0x847b
leaq 0x4ca0(%rip), %rdx      # 0x84bf
leaq 0x4dd8(%rip), %rcx      # 0x85fe
movl $0x2e0, %r8d            # imm = 0x2E0
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
cmpl $0x0, -0x6c(%rbp)
je 0x387d
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
cmpl -0x6c(%rbp), %eax
jb 0x387d
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addl -0x6c(%rbp), %eax
movl -0x24(%rbp), %ecx
addl -0x64(%rbp), %ecx
cmpl %ecx, %eax
jbe 0x38b5
jmp 0x387f
movq 0x7772(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x4beb(%rip), %rsi      # 0x847b
leaq 0x4c28(%rip), %rdx      # 0x84bf
leaq 0x4d60(%rip), %rcx      # 0x85fe
movl $0x2e2, %r8d            # imm = 0x2E2
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x38(%rbp), %rax
addq $0x10, %rax
movq -0x8(%rbp), %rcx
movl -0x24(%rbp), %edx
addq %rdx, %rcx
movl -0x64(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
ja 0x38f4
movq -0x38(%rbp), %rax
cmpl $-0x1, 0x10(%rax)
jne 0x38f4
movq -0xb8(%rbp), %rdx
movq -0x38(%rbp), %rdi
movl -0x6c(%rbp), %esi
callq 0x4610
jmp 0x399b
movq -0xb8(%rbp), %rax
movq 0x30(%rax), %rax
movl -0x2c(%rbp), %ecx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0xf0(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xe8(%rbp)
movl -0x6c(%rbp), %eax
movl %eax, -0xdc(%rbp)
cmpl $0x0, -0x18(%rbp)
je 0x3946
movl -0x18(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movq %rax, -0xf8(%rbp)
jmp 0x3951
xorl %eax, %eax
movq %rax, -0xf8(%rbp)
jmp 0x3951
movl -0xdc(%rbp), %edx
movq -0xe8(%rbp), %rsi
movq -0xf8(%rbp), %rax
movl %eax, %ecx
leaq -0xa0(%rbp), %rdi
callq 0x4910
movq -0xf0(%rbp), %rdi
leaq -0xa0(%rbp), %rsi
movl $0x30, %edx
callq 0x1130
movq -0xb8(%rbp), %rax
movl 0x28(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x28(%rax)
movl -0x6c(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movl -0x2c(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x2c(%rbp)
jmp 0x3763
jmp 0x39bb
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
movl -0xc(%rbp), %edx
addq %rdx, %rcx
cmpq %rcx, %rax
je 0x3af8
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl $0xffffffff, %ecx       # imm = 0xFFFFFFFF
cmpq %rcx, %rax
jge 0x3a13
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
cmpl $0x4, %eax
jb 0x3a13
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addl $0x4, %eax
cmpl -0xc(%rbp), %eax
jbe 0x3a4b
jmp 0x3a15
movq 0x75dc(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x4a55(%rip), %rsi      # 0x847b
leaq 0x4a92(%rip), %rdx      # 0x84bf
leaq 0x4bca(%rip), %rcx      # 0x85fe
movl $0x2ec, %r8d            # imm = 0x2EC
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x38(%rbp), %rax
movl (%rax), %eax
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa4(%rbp)
je 0x3a92
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
movl %eax, %ecx
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
subl %ecx, %eax
cmpl -0xa4(%rbp), %eax
jb 0x3a92
movq -0x38(%rbp), %rax
movq -0x8(%rbp), %rcx
subq %rcx, %rax
addl -0xa4(%rbp), %eax
cmpl -0xc(%rbp), %eax
jbe 0x3aca
jmp 0x3a94
movq 0x755d(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x49d6(%rip), %rsi      # 0x847b
leaq 0x4a13(%rip), %rdx      # 0x84bf
leaq 0x4b4b(%rip), %rcx      # 0x85fe
movl $0x2ee, %r8d            # imm = 0x2EE
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0xb8(%rbp), %rdx
movq -0x38(%rbp), %rdi
movl -0xa4(%rbp), %esi
callq 0x4610
movl -0xa4(%rbp), %ecx
movq -0x38(%rbp), %rax
movl %ecx, %ecx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
jmp 0x39bb
movq -0xb0(%rbp), %rax
addq $0x100, %rsp            # imm = 0x100
popq %rbp
retq
nopl (%rax,%rax)