// File: /workspace/github_c_makefile_star2_O0/pali[P]bmfdec/./bmfparse.c
// Function: parse_class_property
static void parse_class_property(char *buf, uint32_t size, struct mof_class *out) {
  uint32_t *buf2 = (uint32_t *)buf;
  if (size < 20) error("Invalid size");
  uint32_t len = buf2[0];
  if (len == 0 || size < len) error("Invalid size");
  if (buf2[2] != 0x0 || buf2[4] != 0xFFFFFFFF) error("Invalid unknown");
  uint32_t type = buf2[1];
  uint32_t slen = buf2[3];
  if (!check_sum(20, slen, size)) error("Invalid size");
  char *name = parse_string(buf+20, slen);
  if (type == 0x08) {
    char *value = parse_string(buf+20+slen, size-slen-20);
    if (strcmp(name, "__CLASS") == 0) {
      out->name = value;
    } else if (strcmp(name, "__NAMESPACE") == 0) {
      out->namespace = value;
    } else if (strcmp(name, "__SUPERCLASS") == 0) {
      out->superclassname = value;
    } else {
      fprintf(stderr, "Warning: Unknown class property name %s\n", name);
      free(value);
    }
  } else if (type == 0x03) {
    if (size-slen-20 != 4) error("Invalid size");
    int32_t value = *((int32_t *)(buf+20+slen));
    if (strcmp(name, "__CLASSFLAGS") == 0) {
      out->classflags = value;
    } else {
      fprintf(stderr, "Warning: Unknown class property name %s\n", name);
    }
  } else {
    fprintf(stderr, "Warning: Unknown class property type 0x%x for name %s\n", type, name);
  }
  free(name);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x8(%rbp)
movl %esi, -0xc(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
cmpl $0x14, -0xc(%rbp)
jae 0x4669
jmp 0x4633
movq 0x69be(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x3e37(%rip), %rsi      # 0x847b
leaq 0x3e74(%rip), %rdx      # 0x84bf
leaq 0x40e6(%rip), %rcx      # 0x8738
movl $0x29a, %r8d            # imm = 0x29A
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
cmpl $0x0, -0x24(%rbp)
je 0x4680
movl -0xc(%rbp), %eax
cmpl -0x24(%rbp), %eax
jae 0x46b8
jmp 0x4682
movq 0x696f(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x3de8(%rip), %rsi      # 0x847b
leaq 0x3e25(%rip), %rdx      # 0x84bf
leaq 0x4097(%rip), %rcx      # 0x8738
movl $0x29c, %r8d            # imm = 0x29C
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x20(%rbp), %rax
cmpl $0x0, 0x8(%rax)
jne 0x46cc
movq -0x20(%rbp), %rax
cmpl $-0x1, 0x10(%rax)
je 0x4704
jmp 0x46ce
movq 0x6923(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x3d9c(%rip), %rsi      # 0x847b
leaq 0x3e66(%rip), %rdx      # 0x854c
leaq 0x404b(%rip), %rcx      # 0x8738
movl $0x29d, %r8d            # imm = 0x29D
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x20(%rbp), %rax
movl 0x4(%rax), %eax
movl %eax, -0x28(%rbp)
movq -0x20(%rbp), %rax
movl 0xc(%rax), %eax
movl %eax, -0x2c(%rbp)
movl $0xffffffeb, %eax       # imm = 0xFFFFFFEB
cmpl -0x2c(%rbp), %eax
jb 0x472d
movl -0x2c(%rbp), %eax
addl $0x14, %eax
cmpl -0xc(%rbp), %eax
jbe 0x4765
jmp 0x472f
movq 0x68c2(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x3d3b(%rip), %rsi      # 0x847b
leaq 0x3d78(%rip), %rdx      # 0x84bf
leaq 0x3fea(%rip), %rcx      # 0x8738
movl $0x2a0, %r8d            # imm = 0x2A0
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x8(%rbp), %rdi
addq $0x14, %rdi
movl -0x2c(%rbp), %esi
callq 0x5900
movq %rax, -0x38(%rbp)
cmpl $0x8, -0x28(%rbp)
jne 0x4839
movq -0x8(%rbp), %rdi
addq $0x14, %rdi
movl -0x2c(%rbp), %eax
addq %rax, %rdi
movl -0xc(%rbp), %esi
subl -0x2c(%rbp), %esi
subl $0x14, %esi
callq 0x5900
movq %rax, -0x40(%rbp)
movq -0x38(%rbp), %rdi
leaq 0x3f9f(%rip), %rsi      # 0x874d
callq 0x10f0
cmpl $0x0, %eax
jne 0x47c5
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
jmp 0x4834
movq -0x38(%rbp), %rdi
leaq 0x3f85(%rip), %rsi      # 0x8755
callq 0x10f0
cmpl $0x0, %eax
jne 0x47e8
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
jmp 0x4832
movq -0x38(%rbp), %rdi
leaq 0x3f6e(%rip), %rsi      # 0x8761
callq 0x10f0
cmpl $0x0, %eax
jne 0x480b
movq -0x40(%rbp), %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x4830
movq 0x67e6(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x38(%rbp), %rdx
leaq 0x3f4e(%rip), %rsi      # 0x876e
movb $0x0, %al
callq 0x1100
movq -0x40(%rbp), %rdi
callq 0x1030
jmp 0x4832
jmp 0x4834
jmp 0x48f7
cmpl $0x3, -0x28(%rbp)
jne 0x48d6
movl -0xc(%rbp), %eax
subl -0x2c(%rbp), %eax
subl $0x14, %eax
cmpl $0x4, %eax
je 0x4889
jmp 0x4853
movq 0x679e(%rip), %rax      # 0xaff8
movq (%rax), %rdi
leaq 0x3c17(%rip), %rsi      # 0x847b
leaq 0x3c54(%rip), %rdx      # 0x84bf
leaq 0x3ec6(%rip), %rcx      # 0x8738
movl $0x2af, %r8d            # imm = 0x2AF
movb $0x0, %al
callq 0x1100
movl $0x1, %edi
callq 0x1180
movq -0x8(%rbp), %rax
movl -0x2c(%rbp), %ecx
movl 0x14(%rax,%rcx), %eax
movl %eax, -0x44(%rbp)
movq -0x38(%rbp), %rdi
leaq 0x3ef5(%rip), %rsi      # 0x8797
callq 0x10f0
cmpl $0x0, %eax
jne 0x48b8
movl -0x44(%rbp), %ecx
movq -0x18(%rbp), %rax
movl %ecx, 0x18(%rax)
jmp 0x48d4
movq 0x6739(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movq -0x38(%rbp), %rdx
leaq 0x3ea1(%rip), %rsi      # 0x876e
movb $0x0, %al
callq 0x1100
jmp 0x48f5
movq 0x671b(%rip), %rax      # 0xaff8
movq (%rax), %rdi
movl -0x28(%rbp), %edx
movq -0x38(%rbp), %rcx
leaq 0x3eb6(%rip), %rsi      # 0x87a4
movb $0x0, %al
callq 0x1100
jmp 0x48f7
movq -0x38(%rbp), %rdi
callq 0x1030
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)