LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_c_makefile_star2_O0/marcomorain[P]garcon/deps/cmap/map.c
// Function: map_set
int map_set(struct map_t* map, const char* key, void* value)
{
    const struct map_find_results_t find_result = map_find(map, key);

    // found node with same key
    if (find_result.exact_match) {
        if (map->free_func && find_result.node->value) {
            (*map->free_func)(find_result.node->value);
        }

        find_result.node->value = value;
        return 0;
    }

    // create the new node.
    struct map_node_t* new_node = new_map_node(key, value);

    if (!new_node) {
        return -1;
    }

    // empty list
    if (map->head == NULL) {
        map->head = new_node;
        map->size = 1;
        return 0;
    }

    // put the new node in the proper place
    struct map_node_t* node = find_result.node;
    struct map_node_t* prev_node = find_result.prev_node;

    new_node->next = node;

    if (prev_node) {
        prev_node->next = new_node;
    } else {
        map->head = new_node;
    }

    map->size++;
    return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x50, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq -0x10(%rbp), %rsi
movq -0x18(%rbp), %rdx
leaq -0x38(%rbp), %rdi
callq 0x9ec0
cmpw $0x0, -0x28(%rbp)
je 0x9fdc
movq -0x10(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x9fc4
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0x9fc4
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rdi
callq *%rax
movq -0x20(%rbp), %rcx
movq -0x30(%rbp), %rax
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xa07a
movq -0x18(%rbp), %rdi
movq -0x20(%rbp), %rsi
callq 0xa090
movq %rax, -0x40(%rbp)
cmpq $0x0, -0x40(%rbp)
jne 0x9ffd
movl $0xffffffff, -0x4(%rbp) # imm = 0xFFFFFFFF
jmp 0xa07a
movq -0x10(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xa027
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq $0x1, 0x8(%rax)
movl $0x0, -0x4(%rbp)
jmp 0xa07a
movq -0x30(%rbp), %rax
movq %rax, -0x48(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0x50(%rbp)
movq -0x48(%rbp), %rcx
movq -0x40(%rbp), %rax
movq %rcx, 0x10(%rax)
cmpq $0x0, -0x50(%rbp)
je 0xa058
movq -0x40(%rbp), %rcx
movq -0x50(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0xa063
movq -0x40(%rbp), %rcx
movq -0x10(%rbp), %rax
movq %rcx, (%rax)
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
addq $0x1, %rcx
movq %rcx, 0x8(%rax)
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x50, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/marcomorain[P]garcon/deps/cmap/map.c
// Function: new_map_node
static struct map_node_t* new_map_node(const char* key, void* value)
{
    struct map_node_t* new_node = NULL;

    new_node = (struct map_node_t*)malloc(sizeof(struct map_node_t));

    if (new_node) {
        new_node->next = NULL;
        new_node->value = value;

        new_node->key = (char*)malloc(strlen(key) + 1);
        if (!new_node->key) {
            free(new_node);
            return NULL;
        }

        strcpy(new_node->key, key);
    }

    return new_node;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq $0x0, -0x20(%rbp)
movl $0x18, %edi
callq 0x21e0
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xa121
movq -0x20(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x18(%rbp), %rcx
movq -0x20(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x10(%rbp), %rdi
callq 0x20b0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x21e0
movq %rax, %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movq -0x20(%rbp), %rax
cmpq $0x0, (%rax)
jne 0xa111
movq -0x20(%rbp), %rdi
callq 0x2300
movq $0x0, -0x8(%rbp)
jmp 0xa129
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movq -0x10(%rbp), %rsi
callq 0x2050
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/marcomorain[P]garcon/deps/cmap/map.c
// Function: map_del
void map_del(struct map_t* map, const char* key)
{
    struct map_find_results_t find_results = map_find(map, key);

    if (!find_results.exact_match) {
        return;
    }

    struct map_node_t* node = find_results.node;

    if (map->free_func && node->value) {
        (*map->free_func)(node->value);
    }

    if (node == map->head) {
        map->head = map->head->next;
    } else {
        find_results.prev_node->next = node->next;
    }

    free(node->key);
    free(node);

    map->size--;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq -0x8(%rbp), %rsi
movq -0x10(%rbp), %rdx
leaq -0x28(%rbp), %rdi
callq 0x9ec0
cmpw $0x0, -0x18(%rbp)
jne 0xa16d
jmp 0xa1f3
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x8(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0xa19d
movq -0x30(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xa19d
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movq -0x30(%rbp), %rcx
movq 0x8(%rcx), %rdi
callq *%rax
movq -0x30(%rbp), %rax
movq -0x8(%rbp), %rcx
cmpq (%rcx), %rax
jne 0xa1be
movq -0x8(%rbp), %rax
movq (%rax), %rax
movq 0x10(%rax), %rcx
movq -0x8(%rbp), %rax
movq %rcx, (%rax)
jmp 0xa1ce
movq -0x30(%rbp), %rax
movq 0x10(%rax), %rcx
movq -0x28(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x30(%rbp), %rax
movq (%rax), %rdi
callq 0x2300
movq -0x30(%rbp), %rdi
callq 0x2300
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rcx
addq $-0x1, %rcx
movq %rcx, 0x8(%rax)
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/marcomorain[P]garcon/deps/commander/commander.c
// Function: command_help
void
command_help(command_t *self) {
  printf("\n");
  printf("  Usage: %s %s\n", self->name, self->usage);
  printf("\n");
  printf("  Options:\n");
  printf("\n");

  int i;
  for (i = 0; i < self->option_count; ++i) {
    command_option_t *option = &self->options[i];
    printf("    %s, %-25s %s\n"
      , option->small
      , option->large_with_arg
      , option->description);
  }

  printf("\n");
  command_free(self);
  exit(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
leaq 0x11f9(%rip), %rdi      # 0xb42c
movb $0x0, %al
callq 0x20e0
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x21bc(%rip), %rdi      # 0xc40d
movb $0x0, %al
callq 0x20e0
leaq 0x11cd(%rip), %rdi      # 0xb42c
movb $0x0, %al
callq 0x20e0
leaq 0x21b0(%rip), %rdi      # 0xc41d
movb $0x0, %al
callq 0x20e0
leaq 0x11b1(%rip), %rdi      # 0xb42c
movb $0x0, %al
callq 0x20e0
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0xa2dd
movq -0x8(%rbp), %rax
addq $0x30, %rax
movslq -0xc(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rsi
movq -0x18(%rbp), %rax
movq 0x20(%rax), %rdx
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rcx
leaq 0x215e(%rip), %rdi      # 0xc429
movb $0x0, %al
callq 0x20e0
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa289
leaq 0x1148(%rip), %rdi      # 0xb42c
movb $0x0, %al
callq 0x20e0
movq -0x8(%rbp), %rdi
callq 0xa300
xorl %edi, %edi
callq 0x22a0
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/marcomorain[P]garcon/deps/commander/commander.c
// Function: command_free
void
command_free(command_t *self) {
  int i;

  for (i = 0; i < self->option_count; ++i) {
    command_option_t *option = &self->options[i];
    free(option->argname);
    free(option->large);
  }

  if (self->nargv) {
    for (i = 0; self->nargv[i]; ++i) {
      free(self->nargv[i]);
    }
    free(self->nargv);
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movl $0x0, -0xc(%rbp)
movl -0xc(%rbp), %eax
movq -0x8(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0xa35b
movq -0x8(%rbp), %rax
addq $0x30, %rax
movslq -0xc(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x2300
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x2300
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa313
movq -0x8(%rbp), %rax
cmpq $0x0, 0x838(%rax)
je 0xa3b9
movl $0x0, -0xc(%rbp)
movq -0x8(%rbp), %rax
movq 0x838(%rax), %rax
movslq -0xc(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xa3a9
movq -0x8(%rbp), %rax
movq 0x838(%rax), %rax
movslq -0xc(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
callq 0x2300
movl -0xc(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xc(%rbp)
jmp 0xa370
movq -0x8(%rbp), %rax
movq 0x838(%rax), %rdi
callq 0x2300
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/marcomorain[P]garcon/deps/commander/commander.c
// Function: command_init
void
command_init(command_t *self, const char *name, const char *version) {
  self->arg = NULL;
  self->name = name;
  self->version = version;
  self->option_count = self->argc = 0;
  self->usage = "[options]";
  self->nargv = NULL;
  command_option(self, "-V", "--version", "output program version", command_version);
  command_option(self, "-h", "--help", "output help information", command_help);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, 0x10(%rax)
movq -0x10(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x18(%rbp), %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x730(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x28(%rax)
movq -0x8(%rbp), %rax
leaq 0x201f(%rip), %rcx      # 0xc43b
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x838(%rax)
movq -0x8(%rbp), %rdi
leaq 0x200b(%rip), %rsi      # 0xc445
leaq 0x2007(%rip), %rdx      # 0xc448
leaq 0x200a(%rip), %rcx      # 0xc452
leaq 0x1d1(%rip), %r8        # 0xa620
callq 0xa480
movq -0x8(%rbp), %rdi
leaq 0x200a(%rip), %rsi      # 0xc469
leaq 0x2006(%rip), %rdx      # 0xc46c
leaq 0x2006(%rip), %rcx      # 0xc473
leaq -0x254(%rip), %r8       # 0xa220
callq 0xa480
addq $0x20, %rsp
popq %rbp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/marcomorain[P]garcon/deps/commander/commander.c
// Function: command_option
void
command_option(command_t *self, const char *small, const char *large, const char *desc, command_callback_t cb) {
  if (self->option_count == COMMANDER_MAX_OPTIONS) {
    command_free(self);
    error("Maximum option definitions exceeded");
  }
  int n = self->option_count++;
  command_option_t *option = &self->options[n];
  option->cb = cb;
  option->small = small;
  option->description = desc;
  option->required_arg = option->optional_arg = 0;
  option->large_with_arg = large;
  option->argname = malloc(strlen(large) + 1);
  assert(option->argname);
  option->large = malloc(strlen(large) + 1);
  assert(option->large);
  parse_argname(large, option->large, option->argname);
  if ('[' == option->argname[0]) option->optional_arg = 1;
  if ('<' == option->argname[0]) option->required_arg = 1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x8(%rbp), %rax
cmpl $0x20, 0x28(%rax)
jne 0xa4bb
movq -0x8(%rbp), %rdi
callq 0xa300
leaq 0x1fd5(%rip), %rdi      # 0xc48b
callq 0xa660
movq -0x8(%rbp), %rcx
movl 0x28(%rcx), %eax
movl %eax, %edx
addl $0x1, %edx
movl %edx, 0x28(%rcx)
movl %eax, -0x2c(%rbp)
movq -0x8(%rbp), %rax
addq $0x30, %rax
movslq -0x2c(%rbp), %rcx
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq %rax, -0x38(%rbp)
movq -0x28(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x30(%rax)
movq -0x10(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x20(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x28(%rax)
movq -0x38(%rbp), %rax
movl $0x0, (%rax)
movq -0x38(%rbp), %rax
movl $0x0, 0x4(%rax)
movq -0x18(%rbp), %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x18(%rbp), %rdi
callq 0x20b0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x21e0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x8(%rax)
je 0xa556
jmp 0xa575
leaq 0x1f52(%rip), %rdi      # 0xc4af
leaq 0x1f5b(%rip), %rsi      # 0xc4bf
movl $0xb9, %edx
leaq 0x1f6a(%rip), %rcx      # 0xc4da
callq 0x2110
movq -0x18(%rbp), %rdi
callq 0x20b0
movq %rax, %rdi
addq $0x1, %rdi
callq 0x21e0
movq %rax, %rcx
movq -0x38(%rbp), %rax
movq %rcx, 0x10(%rax)
movq -0x38(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0xa5a2
jmp 0xa5c1
leaq 0x1f90(%rip), %rdi      # 0xc539
leaq 0x1f0f(%rip), %rsi      # 0xc4bf
movl $0xbb, %edx
leaq 0x1f1e(%rip), %rcx      # 0xc4da
callq 0x2110
movq -0x18(%rbp), %rdi
movq -0x38(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0xa6a0
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %ecx
movl $0x5b, %eax
cmpl %ecx, %eax
jne 0xa5f8
movq -0x38(%rbp), %rax
movl $0x1, (%rax)
movq -0x38(%rbp), %rax
movq 0x8(%rax), %rax
movsbl (%rax), %ecx
movl $0x3c, %eax
cmpl %ecx, %eax
jne 0xa617
movq -0x38(%rbp), %rax
movl $0x1, 0x4(%rax)
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/marcomorain[P]garcon/deps/commander/commander.c
// Function: parse_argname
static void
parse_argname(const char *str, char *flag, char *arg) {
  int buffer = 0;
  size_t flagpos = 0;
  size_t argpos = 0;
  size_t len = strlen(str);
  size_t i;

  for (i = 0; i < len; ++i) {
    if (buffer || '[' == str[i] || '<' == str[i]) {
      buffer = 1;
      arg[argpos++] = str[i];
    } else {
      if (' ' == str[i]) continue;
      flag[flagpos++] = str[i];
    }
  }

  arg[argpos] = '\0';
  flag[flagpos] = '\0';
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movl $0x0, -0x1c(%rbp)
movq $0x0, -0x28(%rbp)
movq $0x0, -0x30(%rbp)
movq -0x8(%rbp), %rdi
callq 0x20b0
movq %rax, -0x38(%rbp)
movq $0x0, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xa793
cmpl $0x0, -0x1c(%rbp)
jne 0xa71e
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movl $0x5b, %eax
cmpl %ecx, %eax
je 0xa71e
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movl $0x3c, %eax
cmpl %ecx, %eax
jne 0xa748
movl $0x1, -0x1c(%rbp)
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x30(%rbp)
movb %dl, (%rax,%rcx)
jmp 0xa780
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %ecx
movl $0x20, %eax
cmpl %ecx, %eax
jne 0xa75f
jmp 0xa782
movq -0x8(%rbp), %rax
movq -0x40(%rbp), %rcx
movb (%rax,%rcx), %dl
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movq %rcx, %rsi
addq $0x1, %rsi
movq %rsi, -0x28(%rbp)
movb %dl, (%rax,%rcx)
jmp 0xa782
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xa6e0
movq -0x18(%rbp), %rax
movq -0x30(%rbp), %rcx
movb $0x0, (%rax,%rcx)
movq -0x10(%rbp), %rax
movq -0x28(%rbp), %rcx
movb $0x0, (%rax,%rcx)
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/marcomorain[P]garcon/deps/commander/commander.c
// Function: normalize_args
static char **
normalize_args(int *argc, char **argv) {
  int size = 0;
  int alloc = *argc + 1;
  char **nargv = malloc(alloc * sizeof(char *));
  int i;

  for (i = 0; argv[i]; ++i) {
    const char *arg = argv[i];
    size_t len = strlen(arg);

    // short flag
    if (len > 2 && '-' == arg[0] && !strchr(arg + 1, '-')) {
      alloc += len - 2;
      nargv = realloc(nargv, alloc * sizeof(char *));
      for (size_t j = 1; j < len; ++j) {
        nargv[size] = malloc(3);
        sprintf(nargv[size], "-%c", arg[j]);
        size++;
      }
      continue;
    }

    // regular arg
    nargv[size] = malloc(len + 1);
    strcpy(nargv[size], arg);
    size++;
  }

  nargv[size] = NULL;
  *argc = size;
  return nargv;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x14(%rbp)
movq -0x8(%rbp), %rax
movl (%rax), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
movslq -0x18(%rbp), %rdi
shlq $0x3, %rdi
callq 0x21e0
movq %rax, -0x20(%rbp)
movl $0x0, -0x24(%rbp)
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
cmpq $0x0, (%rax,%rcx,8)
je 0xa9af
movq -0x10(%rbp), %rax
movslq -0x24(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, -0x30(%rbp)
movq -0x30(%rbp), %rdi
callq 0x20b0
movq %rax, -0x38(%rbp)
cmpq $0x2, -0x38(%rbp)
jbe 0xa967
movq -0x30(%rbp), %rax
movsbl (%rax), %ecx
movl $0x2d, %eax
cmpl %ecx, %eax
jne 0xa967
movq -0x30(%rbp), %rdi
addq $0x1, %rdi
movl $0x2d, %esi
callq 0x20d0
cmpq $0x0, %rax
jne 0xa967
movq -0x38(%rbp), %rcx
subq $0x2, %rcx
movslq -0x18(%rbp), %rax
addq %rcx, %rax
movl %eax, -0x18(%rbp)
movq -0x20(%rbp), %rdi
movslq -0x18(%rbp), %rsi
shlq $0x3, %rsi
callq 0x2210
movq %rax, -0x20(%rbp)
movq $0x1, -0x40(%rbp)
movq -0x40(%rbp), %rax
cmpq -0x38(%rbp), %rax
jae 0xa965
movl $0x3, %edi
callq 0x21e0
movq %rax, %rdx
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x30(%rbp), %rax
movq -0x40(%rbp), %rcx
movsbl (%rax,%rcx), %edx
leaq 0x1c00(%rip), %rsi      # 0xc547
movb $0x0, %al
callq 0x2290
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movq -0x40(%rbp), %rax
addq $0x1, %rax
movq %rax, -0x40(%rbp)
jmp 0xa905
jmp 0xa9a1
movq -0x38(%rbp), %rdi
addq $0x1, %rdi
callq 0x21e0
movq %rax, %rdx
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq %rdx, (%rax,%rcx,8)
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movq -0x30(%rbp), %rsi
callq 0x2050
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa86b
movq -0x20(%rbp), %rax
movslq -0x14(%rbp), %rcx
movq $0x0, (%rax,%rcx,8)
movl -0x14(%rbp), %ecx
movq -0x8(%rbp), %rax
movl %ecx, (%rax)
movq -0x20(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/jfill.c
// Function: main
int main(void)
{
	for (int i = 0; i < 100; i++) {
		printf("--------------------------------"
		       "--------------------------------\n");
		printf("Seed: %d\n", i);
		srandom(i);
		test();
	}

	return 0;
}

// Assembly:
pushq %rax
movl $0x0, 0x4(%rsp)
movl $0x0, (%rsp)
cmpl $0x64, (%rsp)
jge 0x301d
leaq 0x2017(%rip), %rdi      # 0x5004
movb $0x0, %al
callq 0x1050
movl (%rsp), %esi
leaq 0x2048(%rip), %rdi      # 0x5046
movb $0x0, %al
callq 0x1050
movl (%rsp), %edi
callq 0x1040
callq 0x3030
movl (%rsp), %eax
addl $0x1, %eax
movl %eax, (%rsp)
jmp 0x2fe0
xorl %eax, %eax
popq %rcx
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/dlbeer[P]dhara/tests/jfill.c
// Function: test
static void test(void)
{
	struct dhara_journal journal;
	const size_t page_size = 1 << sim_nand.log2_page_size;
	uint8_t page_buf[page_size];
	int rep;

	sim_reset();
	sim_inject_bad(10);
	sim_inject_failed(10);

	printf("Journal init\n");
	dhara_journal_init(&journal, &sim_nand, page_buf);
	printf("    capacity: %d\n", dhara_journal_capacity(&journal));
	printf("\n");

	for (rep = 0; rep < 5; rep++) {
		int count;

		printf("Rep: %d\n", rep);

		printf("    enqueue until error...\n");
		count = jt_enqueue_sequence(&journal, 0, -1);
		printf("    enqueue count: %d\n", count);
		printf("    size: %d\n", dhara_journal_size(&journal));

		printf("    dequeue...\n");
		jt_dequeue_sequence(&journal, 0, count);
		printf("    size: %d\n", dhara_journal_size(&journal));

		/* Only way to recover space here... */
		journal.tail_sync = journal.tail;
	}

	printf("\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
leaq 0x208d(%rip), %rax      # 0x50cc
movb (%rax), %cl
movl $0x1, %eax
shll %cl, %eax
cltq
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq %rsp, %rcx
movq %rcx, -0x48(%rbp)
movq %rax, %rdx
addq $0xf, %rdx
andq $-0x10, %rdx
movq %rsp, %rcx
subq %rdx, %rcx
movq %rcx, -0x60(%rbp)
movq %rcx, %rsp
movq %rax, -0x50(%rbp)
callq 0x31b0
movl $0xa, %edi
callq 0x3970
movl $0xa, %edi
callq 0x39d0
leaq 0x1fbb(%rip), %rdi      # 0x5050
movb $0x0, %al
callq 0x1050
movq -0x60(%rbp), %rdx
leaq -0x38(%rbp), %rdi
leaq 0x2021(%rip), %rsi      # 0x50cc
callq 0x11c0
leaq -0x38(%rbp), %rdi
callq 0x1c20
movl %eax, %esi
leaq 0x1f9c(%rip), %rdi      # 0x505e
movb $0x0, %al
callq 0x1050
leaq 0x217a(%rip), %rdi      # 0x524a
movb $0x0, %al
callq 0x1050
movl $0x0, -0x54(%rbp)
cmpl $0x5, -0x54(%rbp)
jge 0x318d
movl -0x54(%rbp), %esi
leaq 0x1f7e(%rip), %rdi      # 0x5070
movb $0x0, %al
callq 0x1050
leaq 0x1f79(%rip), %rdi      # 0x5079
movb $0x0, %al
callq 0x1050
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
movl $0xffffffff, %edx       # imm = 0xFFFFFFFF
callq 0x4070
movl %eax, -0x58(%rbp)
movl -0x58(%rbp), %esi
leaq 0x1f71(%rip), %rdi      # 0x5095
movb $0x0, %al
callq 0x1050
leaq -0x38(%rbp), %rdi
callq 0x1cb0
movl %eax, %esi
leaq 0x1f6f(%rip), %rdi      # 0x50ac
movb $0x0, %al
callq 0x1050
leaq 0x1f6f(%rip), %rdi      # 0x50ba
movb $0x0, %al
callq 0x1050
movl -0x58(%rbp), %edx
leaq -0x38(%rbp), %rdi
xorl %esi, %esi
callq 0x43b0
leaq -0x38(%rbp), %rdi
callq 0x1cb0
movl %eax, %esi
leaq 0x1f3a(%rip), %rdi      # 0x50ac
movb $0x0, %al
callq 0x1050
movl -0x18(%rbp), %eax
movl %eax, -0x1c(%rbp)
movl -0x54(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x54(%rbp)
jmp 0x30de
leaq 0x20b6(%rip), %rdi      # 0x524a
movb $0x0, %al
callq 0x1050
movq -0x48(%rbp), %rax
movq %rax, %rsp
movq %rbp, %rsp
popq %rbp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: fnf_to_sdd_auto
SddNode* fnf_to_sdd_auto(Fnf* fnf, SddManager* manager) {
  SddCompilerOptions* options = sdd_manager_options(manager);
  int verbose      = options->verbose;
  BoolOp op        = fnf->op;
  SddSize count    = fnf->litset_count;
  LitSet** litsets = (LitSet**) malloc(count*sizeof(LitSet*));
  for (SddSize i=0; i<count; i++) litsets[i] = fnf->litsets + i;

  if(verbose) { printf("\nclauses: %ld ",count); fflush(stdout); }
  SddNode* node = ONE(manager,op);
  for(int i=0; i<count; i++) {
    sort_litsets_by_lca(litsets+i,count-i,manager);
    sdd_ref(node,manager);
    SddNode* l = apply_litset(litsets[i],manager);
    sdd_deref(node,manager);
    node = sdd_apply(l,node,op,manager);
    if(verbose) { printf("%ld ",count-i-1); fflush(stdout); }
  }
  free(litsets);
  return node;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x50(%rsp)
movq %rsi, 0x48(%rsp)
movq 0x48(%rsp), %rdi
callq 0x77e0
movq %rax, 0x40(%rsp)
movq 0x40(%rsp), %rax
movl 0x58(%rax), %eax
movl %eax, 0x3c(%rsp)
movq 0x50(%rsp), %rax
movw 0x18(%rax), %ax
movw %ax, 0x3a(%rsp)
movq 0x50(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x30(%rsp), %rdi
shlq $0x3, %rdi
callq 0x2190
movq %rax, 0x28(%rsp)
movq $0x0, 0x20(%rsp)
movq 0x20(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x270d
movq 0x50(%rsp), %rax
movq 0x10(%rax), %rdx
imulq $0x30, 0x20(%rsp), %rax
addq %rax, %rdx
movq 0x28(%rsp), %rax
movq 0x20(%rsp), %rcx
movq %rdx, (%rax,%rcx,8)
movq 0x20(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x20(%rsp)
jmp 0x26d1
cmpl $0x0, 0x3c(%rsp)
je 0x2736
movq 0x30(%rsp), %rsi
leaq 0x21a10(%rip), %rdi     # 0x24130
movb $0x0, %al
callq 0x20c0
movq 0x28892(%rip), %rax     # 0x2afc0
movq (%rax), %rdi
callq 0x21a0
movzwl 0x3a(%rsp), %eax
cmpl $0x0, %eax
jne 0x2750
movq 0x48(%rsp), %rdi
callq 0x7530
movq %rax, (%rsp)
jmp 0x275e
movq 0x48(%rsp), %rdi
callq 0x7540
movq %rax, (%rsp)
movq (%rsp), %rax
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movslq 0x14(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x284a
movq 0x28(%rsp), %rdi
movslq 0x14(%rsp), %rax
shlq $0x3, %rax
addq %rax, %rdi
movq 0x30(%rsp), %rsi
movslq 0x14(%rsp), %rax
subq %rax, %rsi
movq 0x48(%rsp), %rdx
callq 0x2ed0
movq 0x18(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0xa950
movq 0x28(%rsp), %rax
movslq 0x14(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x48(%rsp), %rsi
callq 0x2860
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
movq 0x48(%rsp), %rsi
callq 0xaa40
movq 0x8(%rsp), %rdi
movq 0x18(%rsp), %rsi
movw 0x3a(%rsp), %ax
movq 0x48(%rsp), %rcx
movzwl %ax, %edx
callq 0xc9b0
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x3c(%rsp)
je 0x2838
movq 0x30(%rsp), %rsi
movslq 0x14(%rsp), %rax
subq %rax, %rsi
subq $0x1, %rsi
leaq 0x21918(%rip), %rdi     # 0x2413a
movb $0x0, %al
callq 0x20c0
movq 0x28790(%rip), %rax     # 0x2afc0
movq (%rax), %rdi
callq 0x21a0
jmp 0x283a
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x276f
movq 0x28(%rsp), %rdi
callq 0x2030
movq 0x18(%rsp), %rax
addq $0x58, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: apply_litset
SddNode* apply_litset(LitSet* litset, SddManager* manager) {

  BoolOp op            = litset->op; //conjoin (term) or disjoin (clause)
  SddLiteral* literals = litset->literals;
  SddNode* node        = ONE(manager,op); //will not be gc'd
  
  for(SddLiteral i=0; i<litset->literal_count; i++) {
    SddNode* literal = sdd_manager_literal(literals[i],manager);
    node             = sdd_apply(node,literal,op,manager);
  }
  
  return node;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x40(%rsp)
movq %rsi, 0x38(%rsp)
movq 0x40(%rsp), %rax
movw 0x18(%rax), %ax
movw %ax, 0x36(%rsp)
movq 0x40(%rsp), %rax
movq 0x10(%rax), %rax
movq %rax, 0x28(%rsp)
movzwl 0x36(%rsp), %eax
cmpl $0x0, %eax
jne 0x28a5
movq 0x38(%rsp), %rdi
callq 0x7530
movq %rax, 0x8(%rsp)
jmp 0x28b4
movq 0x38(%rsp), %rdi
callq 0x7540
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x40(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x2925
movq 0x28(%rsp), %rax
movq 0x18(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x38(%rsp), %rsi
callq 0x7550
movq %rax, 0x10(%rsp)
movq 0x20(%rsp), %rdi
movq 0x10(%rsp), %rsi
movw 0x36(%rsp), %ax
movq 0x38(%rsp), %rcx
movzwl %ax, %edx
callq 0xc9b0
movq %rax, 0x20(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x28c7
movq 0x20(%rsp), %rax
addq $0x48, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: fnf_to_sdd
SddNode* fnf_to_sdd(Fnf* fnf, SddManager* manager) {
  SddNode* test = degenerate_fnf_test(fnf,manager);
  if (test != NULL) return test;
  SddCompilerOptions* options = sdd_manager_options(manager);

  if(options->vtree_search_mode < 0) {
    sdd_manager_auto_gc_and_minimize_on(manager);
    return fnf_to_sdd_auto(fnf,manager);
  } else {
    sdd_manager_auto_gc_and_minimize_off(manager);
    return fnf_to_sdd_manual(fnf,manager);
  }
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x18(%rsp)
movq %rsi, 0x10(%rsp)
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x2c40
movq %rax, 0x8(%rsp)
cmpq $0x0, 0x8(%rsp)
je 0x2bd6
movq 0x8(%rsp), %rax
movq %rax, 0x20(%rsp)
jmp 0x2c2c
movq 0x10(%rsp), %rdi
callq 0x77e0
movq %rax, (%rsp)
movq (%rsp), %rax
cmpl $0x0, 0x50(%rax)
jge 0x2c0e
movq 0x10(%rsp), %rdi
callq 0x70e0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x2670
movq %rax, 0x20(%rsp)
jmp 0x2c2c
movq 0x10(%rsp), %rdi
callq 0x70f0
movq 0x18(%rsp), %rdi
movq 0x10(%rsp), %rsi
callq 0x2930
movq %rax, 0x20(%rsp)
movq 0x20(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/compiler.c
// Function: degenerate_fnf_test
static
SddNode* degenerate_fnf_test(Fnf* fnf, SddManager* manager) {
  BoolOp op     = fnf->op;
  SddSize count = fnf->litset_count;

  if(count==0) return ONE(manager,op);

  for(int i=0; i<count; i++) {
    if (fnf->litsets[i].literal_count == 0)
      return ZERO(manager,op);
  }

  return NULL;
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq 0x38(%rsp), %rax
movw 0x18(%rax), %ax
movw %ax, 0x2e(%rsp)
movq 0x38(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
cmpq $0x0, 0x20(%rsp)
jne 0x2ca8
movzwl 0x2e(%rsp), %eax
cmpl $0x0, %eax
jne 0x2c8d
movq 0x30(%rsp), %rdi
callq 0x7530
movq %rax, 0x10(%rsp)
jmp 0x2c9c
movq 0x30(%rsp), %rdi
callq 0x7540
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x2d26
movl $0x0, 0x1c(%rsp)
movslq 0x1c(%rsp), %rax
cmpq 0x20(%rsp), %rax
jae 0x2d1d
movq 0x38(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x1c(%rsp), %rcx
imulq $0x30, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x8(%rax)
jne 0x2d0e
movzwl 0x2e(%rsp), %eax
cmpl $0x0, %eax
jne 0x2cf3
movq 0x30(%rsp), %rdi
callq 0x7540
movq %rax, 0x8(%rsp)
jmp 0x2d02
movq 0x30(%rsp), %rdi
callq 0x7530
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x40(%rsp)
jmp 0x2d26
jmp 0x2d10
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x2cb0
movq $0x0, 0x40(%rsp)
movq 0x40(%rsp), %rax
addq $0x48, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/utils.c
// Function: litset_cmp_lca
int litset_cmp_lca(const void* litset1_loc, const void* litset2_loc) {

  LitSet* litset1 = *(LitSet**)litset1_loc;
  LitSet* litset2 = *(LitSet**)litset2_loc;

  Vtree* vtree1 = litset1->vtree;
  Vtree* vtree2 = litset2->vtree;
  SddLiteral p1 = sdd_vtree_position(vtree1);
  SddLiteral p2 = sdd_vtree_position(vtree2);
  
  if(vtree1!=vtree2 && (sdd_vtree_is_sub(vtree2,vtree1) || (!sdd_vtree_is_sub(vtree1,vtree2) && (p1 > p2)))) return 1;
  else if(vtree1!=vtree2 && (sdd_vtree_is_sub(vtree1,vtree2) || (!sdd_vtree_is_sub(vtree2,vtree1) && (p1 < p2)))) return -1;
  else {
	
  SddLiteral l1 = litset1->literal_count;
  SddLiteral l2 = litset2->literal_count;
  
  if(l1 > l2) return 1;
  else if(l1 < l2) return -1;
  else { 
    //so the litset order is unique
  	//without this, final litset order may depend on system
    SddSize id1 = litset1->id;
    SddSize id2 = litset2->id;
    if(id1 > id2) return 1;
    else if(id1 < id2) return -1;
    else return 0;
  }
  }
}

// Assembly:
subq $0x68, %rsp
movq %rdi, 0x58(%rsp)
movq %rsi, 0x50(%rsp)
movq 0x58(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x48(%rsp)
movq 0x50(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x40(%rsp)
movq 0x48(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x38(%rsp)
movq 0x40(%rsp), %rax
movq 0x20(%rax), %rax
movq %rax, 0x30(%rsp)
movq 0x38(%rsp), %rdi
callq 0x7940
movq %rax, 0x28(%rsp)
movq 0x30(%rsp), %rdi
callq 0x7940
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0x2ddf
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xaf70
cmpl $0x0, %eax
jne 0x2dd2
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xaf70
cmpl $0x0, %eax
jne 0x2ddf
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
jle 0x2ddf
movl $0x1, 0x64(%rsp)
jmp 0x2ebf
movq 0x38(%rsp), %rax
cmpq 0x30(%rsp), %rax
je 0x2e2c
movq 0x38(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0xaf70
cmpl $0x0, %eax
jne 0x2e1f
movq 0x30(%rsp), %rdi
movq 0x38(%rsp), %rsi
callq 0xaf70
cmpl $0x0, %eax
jne 0x2e2c
movq 0x28(%rsp), %rax
cmpq 0x20(%rsp), %rax
jge 0x2e2c
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x2ebf
movq 0x48(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x18(%rsp)
movq 0x40(%rsp), %rax
movq 0x8(%rax), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jle 0x2e5e
movl $0x1, 0x64(%rsp)
jmp 0x2ebf
movq 0x18(%rsp), %rax
cmpq 0x10(%rsp), %rax
jge 0x2e74
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x2ebf
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rax, 0x8(%rsp)
movq 0x40(%rsp), %rax
movq (%rax), %rax
movq %rax, (%rsp)
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
jbe 0x2ea2
movl $0x1, 0x64(%rsp)
jmp 0x2ebf
movq 0x8(%rsp), %rax
cmpq (%rsp), %rax
jae 0x2eb7
movl $0xffffffff, 0x64(%rsp) # imm = 0xFFFFFFFF
jmp 0x2ebf
movl $0x0, 0x64(%rsp)
movl 0x64(%rsp), %eax
addq $0x68, %rsp
retq
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/utils.c
// Function: sort_litsets_by_lca
void sort_litsets_by_lca(LitSet** litsets, SddSize size, SddManager* manager) {
  //compute lcas of litsets
  for(SddLiteral i=0; i<size; i++) {
    LitSet* litset = litsets[i];
    litset->vtree  = sdd_manager_lca_of_literals(litset->literal_count,litset->literals,manager);
  }
  //sort
  qsort((LitSet**)litsets,size,sizeof(LitSet*),litset_cmp_lca);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq %rsi, 0x18(%rsp)
movq %rdx, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
cmpq 0x18(%rsp), %rax
jae 0x2f41
movq 0x20(%rsp), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq %rax, (%rsp)
movq (%rsp), %rax
movq 0x8(%rax), %rax
movl %eax, %edi
movq (%rsp), %rax
movq 0x10(%rax), %rsi
movq 0x10(%rsp), %rdx
callq 0xaff0
movq %rax, %rcx
movq (%rsp), %rax
movq %rcx, 0x20(%rax)
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x2eec
movq 0x20(%rsp), %rdi
movq 0x18(%rsp), %rsi
movl $0x8, %edx
leaq -0x227(%rip), %rcx      # 0x2d30
callq 0x2040
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
nopl (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/fnf.c
// Function: print_fnf
void print_fnf(char* type, FILE* file, const Fnf* fnf) {
  fprintf(file,"p %s %"PRIlitS" %"PRIsS"\n",type,fnf->var_count,fnf->litset_count);
  for (SddSize i=0; i<fnf->litset_count; i++) {
    LitSet* litset = fnf->litsets + i;
    for (SddLiteral j=0; j<litset->literal_count; j++) fprintf(file,"%"PRIlitS" ",litset->literals[j]);
    fprintf(file,"0\n");
  }
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movq %rsi, 0x28(%rsp)
movq %rdx, 0x20(%rsp)
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rdx
movq 0x20(%rsp), %rax
movq (%rax), %rcx
movq 0x20(%rsp), %rax
movq 0x8(%rax), %r8
leaq 0x210ed(%rip), %rsi     # 0x24142
movb $0x0, %al
callq 0x2130
movq $0x0, 0x18(%rsp)
movq 0x18(%rsp), %rax
movq 0x20(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x3104
movq 0x20(%rsp), %rax
movq 0x10(%rax), %rax
imulq $0x30, 0x18(%rsp), %rcx
addq %rcx, %rax
movq %rax, 0x10(%rsp)
movq $0x0, 0x8(%rsp)
movq 0x8(%rsp), %rax
movq 0x10(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jge 0x30de
movq 0x28(%rsp), %rdi
movq 0x10(%rsp), %rax
movq 0x10(%rax), %rax
movq 0x8(%rsp), %rcx
movq (%rax,%rcx,8), %rdx
leaq 0x21073(%rip), %rsi     # 0x2413a
movb $0x0, %al
callq 0x2130
movq 0x8(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x8(%rsp)
jmp 0x3099
movq 0x28(%rsp), %rdi
leaq 0x21066(%rip), %rsi     # 0x24150
movb $0x0, %al
callq 0x2130
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
jmp 0x3065
addq $0x38, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/io.c
// Function: read_fnf
Fnf* read_fnf(const char* filename) {
  char* buffer = read_file(filename);
  char* filtered = filter_comments(buffer);
  Fnf* fnf = parse_fnf_file(filtered);
  //cleanup
  free(buffer);
  free(filtered);
  return fnf;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
callq 0x31d0
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rdi
callq 0x32c0
movq %rax, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3430
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x2030
movq 0x10(%rsp), %rdi
callq 0x2030
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/io.c
// Function: read_file
static char* read_file(const char* filename) {
  FILE *file = fopen(filename, "rb");
  if (file == NULL) {
    printf("Could not open the file %s\n",filename);
    exit(1);
  }

  // lookup file size
  fseek(file,0,SEEK_END);
  unsigned int file_size = ftell(file);
  rewind(file);

  // allocate memory
  char* buffer = (char*)calloc(file_size+1,sizeof(char));

  // read the whole file
  unsigned int result = fread(buffer,sizeof(char),file_size,file);
  if (result != file_size) {
    printf("Could not read the file %s\n",filename);
    exit(1);
  }
  buffer[file_size] = 0; // null terminate

  fclose(file);
  return buffer;
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movq 0x20(%rsp), %rdi
leaq 0x20f76(%rip), %rsi     # 0x2415b
callq 0x2200
movq %rax, 0x18(%rsp)
cmpq $0x0, 0x18(%rsp)
jne 0x3214
movq 0x20(%rsp), %rsi
leaq 0x20f5b(%rip), %rdi     # 0x2415e
movb $0x0, %al
callq 0x20c0
movl $0x1, %edi
callq 0x2260
movq 0x18(%rsp), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x2, %edx
callq 0x21c0
movq 0x18(%rsp), %rdi
callq 0x2140
movl %eax, 0x14(%rsp)
movq 0x18(%rsp), %rdi
callq 0x20d0
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
callq 0x2110
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rdi
movl 0x14(%rsp), %eax
movl %eax, %edx
movq 0x18(%rsp), %rcx
movl $0x1, %esi
callq 0x2050
movl %eax, 0x4(%rsp)
movl 0x4(%rsp), %eax
cmpl 0x14(%rsp), %eax
je 0x329e
movq 0x20(%rsp), %rsi
leaq 0x20eed(%rip), %rdi     # 0x2417a
movb $0x0, %al
callq 0x20c0
movl $0x1, %edi
callq 0x2260
movq 0x8(%rsp), %rax
movl 0x14(%rsp), %ecx
movb $0x0, (%rax,%rcx)
movq 0x18(%rsp), %rdi
callq 0x2080
movq 0x8(%rsp), %rax
addq $0x28, %rsp
retq
nop
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/io.c
// Function: filter_comments
static char* filter_comments(const char* buffer) {
  int is_comment_line, is_eol;
  unsigned int file_length = 0, line_length;
  const char* read_head = buffer;
  char* write_head;

  // count size of filtered string
  while (*read_head != '\0') {
    is_comment_line = (*read_head == 'c');
    line_length = 0;
    while (*read_head != '\0') {
      is_eol = (*read_head == '\n');
      read_head++;
      line_length++;
      if (is_eol) break;
    }
    if (!is_comment_line)
      file_length += line_length;
  }

  // copy filtered string
  char* filtered = (char*)calloc(file_length+1,sizeof(char));
  read_head = buffer;
  write_head = filtered;
  while (*read_head != '\0') {
    is_comment_line = (*read_head == 'c');
    while (*read_head != '\0') {
      is_eol = (*read_head == '\n');
      if (!is_comment_line) {
        *write_head = *read_head;
        write_head++;
      }
      read_head++;
      if (is_eol) break;
    }
  }
  *write_head = '\0';
  return filtered;
}

// Assembly:
subq $0x38, %rsp
movq %rdi, 0x30(%rsp)
movl $0x0, 0x24(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3367
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x63, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x2c(%rsp)
movl $0x0, 0x20(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x334f
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x28(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
movl 0x20(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x20(%rsp)
cmpl $0x0, 0x28(%rsp)
je 0x334d
jmp 0x334f
jmp 0x3307
cmpl $0x0, 0x2c(%rsp)
jne 0x3362
movl 0x20(%rsp), %eax
addl 0x24(%rsp), %eax
movl %eax, 0x24(%rsp)
jmp 0x32db
movl 0x24(%rsp), %eax
addl $0x1, %eax
movl %eax, %eax
movl %eax, %edi
movl $0x1, %esi
callq 0x2110
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x18(%rsp)
movq 0x8(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x341e
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x63, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x2c(%rsp)
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0x0, %eax
je 0x3419
movq 0x18(%rsp), %rax
movsbl (%rax), %eax
cmpl $0xa, %eax
sete %al
andb $0x1, %al
movzbl %al, %eax
movl %eax, 0x28(%rsp)
cmpl $0x0, 0x2c(%rsp)
jne 0x3400
movq 0x18(%rsp), %rax
movb (%rax), %cl
movq 0x10(%rsp), %rax
movb %cl, (%rax)
movq 0x10(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x10(%rsp)
movq 0x18(%rsp), %rax
addq $0x1, %rax
movq %rax, 0x18(%rsp)
cmpl $0x0, 0x28(%rsp)
je 0x3417
jmp 0x3419
jmp 0x33b9
jmp 0x3395
movq 0x10(%rsp), %rax
movb $0x0, (%rax)
movq 0x8(%rsp), %rax
addq $0x38, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/io.c
// Function: read_cnf
Cnf* read_cnf(const char* filename) {
 Cnf* cnf = read_fnf(filename);
 //declare as cnf
  cnf->op=CONJOIN;
  for(SddSize i=0; i<cnf->litset_count; i++) cnf->litsets[i].op=DISJOIN;
  return cnf;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3170
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movw $0x0, 0x18(%rax)
movq $0x0, (%rsp)
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x374f
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
imulq $0x30, (%rsp), %rcx
addq %rcx, %rax
movw $0x1, 0x18(%rax)
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x371b
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/io.c
// Function: read_dnf
Dnf* read_dnf(const char* filename) {
 Dnf* dnf = read_fnf(filename);
 //declare as dnf
  dnf->op=DISJOIN;
  for(SddSize i=0; i<dnf->litset_count; i++) dnf->litsets[i].op=CONJOIN;
  return dnf;
}

// Assembly:
subq $0x18, %rsp
movq %rdi, 0x10(%rsp)
movq 0x10(%rsp), %rdi
callq 0x3170
movq %rax, 0x8(%rsp)
movq 0x8(%rsp), %rax
movw $0x1, 0x18(%rax)
movq $0x0, (%rsp)
movq (%rsp), %rax
movq 0x8(%rsp), %rcx
cmpq 0x8(%rcx), %rax
jae 0x37bf
movq 0x8(%rsp), %rax
movq 0x10(%rax), %rax
imulq $0x30, (%rsp), %rcx
addq %rcx, %rax
movw $0x0, 0x18(%rax)
movq (%rsp), %rax
addq $0x1, %rax
movq %rax, (%rsp)
jmp 0x378b
movq 0x8(%rsp), %rax
addq $0x18, %rsp
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/fnf/io.c
// Function: cnf_int_strtok
static int cnf_int_strtok() {
  static const char* whitespace = " \t\n\v\f\r";
  char* token = strtok(NULL,whitespace);
  test_parse_fnf_file(token == NULL,"Unexpected end of file.");
  return atoi(token);
}

// Assembly:
pushq %rax
movq 0x27948(%rip), %rsi     # 0x2b160
xorl %eax, %eax
movl %eax, %edi
callq 0x2210
movq %rax, (%rsp)
cmpq $0x0, (%rsp)
sete %al
andb $0x1, %al
movzbl %al, %edi
leaq 0x209ab(%rip), %rsi     # 0x241e4
callq 0x37d0
movq (%rsp), %rdi
callq 0x2240
popq %rcx
retq
nopl (%rax)
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/trim/move.c
// Function: is_feature_var_in_vtree
int is_feature_var_in_vtree(SddLiteral* const feature_vars,
    const size_t num_vars, Vtree* vtree) {
  if (sdd_vtree_is_leaf(vtree)) {
    SddLiteral var = sdd_vtree_var(vtree);
    for (int i = 0; i < num_vars; i++) { // enough to check 1 feature var
      if (feature_vars[i] == var) return 1;
    }
    return 0;
  }
  return is_feature_var_in_vtree(feature_vars, num_vars, sdd_vtree_left(vtree));
}

// Assembly:
subq $0x48, %rsp
movq %rdi, 0x38(%rsp)
movq %rsi, 0x30(%rsp)
movq %rdx, 0x28(%rsp)
movq 0x28(%rsp), %rdi
callq 0xad80
cmpl $0x0, %eax
je 0x38cd
movq 0x28(%rsp), %rdi
callq 0x7920
movq %rax, 0x20(%rsp)
movl $0x0, 0x1c(%rsp)
movslq 0x1c(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x38c3
movq 0x38(%rsp), %rax
movslq 0x1c(%rsp), %rcx
movq (%rax,%rcx,8), %rax
cmpq 0x20(%rsp), %rax
jne 0x38b4
movl $0x1, 0x44(%rsp)
jmp 0x3901
jmp 0x38b6
movl 0x1c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x1c(%rsp)
jmp 0x3889
movl $0x0, 0x44(%rsp)
jmp 0x3901
movq 0x38(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x10(%rsp)
movq 0x28(%rsp), %rdi
callq 0x78e0
movq 0x8(%rsp), %rdi
movq 0x10(%rsp), %rsi
movq %rax, %rdx
callq 0x3850
movl %eax, 0x44(%rsp)
movl 0x44(%rsp), %eax
addq $0x48, %rsp
retq
nopw (%rax,%rax)
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/trim/move.c
// Function: sdd_move_feature_to_pos
SddNode* sdd_move_feature_to_pos(SddNode* node, SddManager* manager,
    SddLiteral* const feature_vars, const size_t num_vars, const int rl_pos,
    const int no_check) {
  SddNode* return_node = node;

  // new_sibling should point to rl_pos'th node in the rightmost path
  Vtree* new_sibling = sdd_vtree_of(node);  
  for (int i = 0; i < rl_pos; i++) new_sibling = sdd_vtree_right(new_sibling);

  // Return if already in position
  if (!no_check && is_feature_var_in_vtree(feature_vars, num_vars,
                                           sdd_vtree_left(new_sibling))) {
    return return_node;
  }

  for (int i = 0; i < num_vars; i++) {
    // Move the first indicator to the left of new_sibling, and the rest to
    // the right of new_sibling
    return_node = sdd_move_var_to_pos(feature_vars[i], (i==0), new_sibling,
                                      return_node, manager);
    new_sibling = sdd_vtree_of(sdd_manager_literal(feature_vars[i],manager));
  }

  return return_node;
}

// Assembly:
subq $0x58, %rsp
movq %rdi, 0x48(%rsp)
movq %rsi, 0x40(%rsp)
movq %rdx, 0x38(%rsp)
movq %rcx, 0x30(%rsp)
movl %r8d, 0x2c(%rsp)
movl %r9d, 0x28(%rsp)
movq 0x48(%rsp), %rax
movq %rax, 0x20(%rsp)
movq 0x48(%rsp), %rdi
callq 0x7590
movq %rax, 0x18(%rsp)
movl $0x0, 0x14(%rsp)
movl 0x14(%rsp), %eax
cmpl 0x2c(%rsp), %eax
jge 0x3b69
movq 0x18(%rsp), %rdi
callq 0x78f0
movq %rax, 0x18(%rsp)
movl 0x14(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x14(%rsp)
jmp 0x3b43
cmpl $0x0, 0x28(%rsp)
jne 0x3bb2
movq 0x38(%rsp), %rax
movq %rax, (%rsp)
movq 0x30(%rsp), %rax
movq %rax, 0x8(%rsp)
movq 0x18(%rsp), %rdi
callq 0x78e0
movq (%rsp), %rdi
movq 0x8(%rsp), %rsi
movq %rax, %rdx
callq 0x3850
cmpl $0x0, %eax
je 0x3bb2
movq 0x20(%rsp), %rax
movq %rax, 0x50(%rsp)
jmp 0x3c36
movl $0x0, 0x10(%rsp)
movslq 0x10(%rsp), %rax
cmpq 0x30(%rsp), %rax
jae 0x3c2c
movq 0x38(%rsp), %rax
movslq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
cmpl $0x0, 0x10(%rsp)
sete %al
andb $0x1, %al
movzbl %al, %esi
movq 0x18(%rsp), %rdx
movq 0x20(%rsp), %rcx
movq 0x40(%rsp), %r8
callq 0x3910
movq %rax, 0x20(%rsp)
movq 0x38(%rsp), %rax
movslq 0x10(%rsp), %rcx
movq (%rax,%rcx,8), %rdi
movq 0x40(%rsp), %rsi
callq 0x7550
movq %rax, %rdi
callq 0x7590
movq %rax, 0x18(%rsp)
movl 0x10(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x10(%rsp)
jmp 0x3bba
movq 0x20(%rsp), %rax
movq %rax, 0x50(%rsp)
movq 0x50(%rsp), %rax
addq $0x58, %rsp
retq
// File: /workspace/github_c_makefile_star2_O0/UCLA-StarAI[P]TrimBN/src/trim/search.c
// Function: update_constrained_positions
void update_constrained_positions(
    const Vtree* vtree, const int y, const int xy,
    SddLiteral* y_vtree, SddLiteral* xy_vtree) {
  if (y == 0) { // update Y-constrained vtree position
    *y_vtree = sdd_vtree_position(vtree);
  } 
  if (xy == 0) { // update XY-constrained vtree position
    *xy_vtree = sdd_vtree_position(vtree);
    return;
  }
  update_constrained_positions(sdd_vtree_right(vtree), y-1, xy-1, y_vtree, xy_vtree);
}

// Assembly:
subq $0x28, %rsp
movq %rdi, 0x20(%rsp)
movl %esi, 0x1c(%rsp)
movl %edx, 0x18(%rsp)
movq %rcx, 0x10(%rsp)
movq %r8, 0x8(%rsp)
cmpl $0x0, 0x1c(%rsp)
jne 0x3c77
movq 0x20(%rsp), %rdi
callq 0x7940
movq %rax, %rcx
movq 0x10(%rsp), %rax
movq %rcx, (%rax)
cmpl $0x0, 0x18(%rsp)
jne 0x3c95
movq 0x20(%rsp), %rdi
callq 0x7940
movq %rax, %rcx
movq 0x8(%rsp), %rax
movq %rcx, (%rax)
jmp 0x3cbf
movq 0x20(%rsp), %rdi
callq 0x78f0
movq %rax, %rdi
movl 0x1c(%rsp), %esi
subl $0x1, %esi
movl 0x18(%rsp), %edx
subl $0x1, %edx
movq 0x10(%rsp), %rcx
movq 0x8(%rsp), %r8
callq 0x3c40
addq $0x28, %rsp
retq
nopw %cs:(%rax,%rax)