// File: /workspace/github_c_makefile_star2_O0/cktan[P]tomlc99/toml.c
// Function: check_key
static int check_key(toml_table_t *tab, const char *key,
                     toml_keyval_t **ret_val, toml_array_t **ret_arr,
                     toml_table_t **ret_tab) {
  int i;
  void *dummy;

  if (!ret_tab)
    ret_tab = (toml_table_t **)&dummy;
  if (!ret_arr)
    ret_arr = (toml_array_t **)&dummy;
  if (!ret_val)
    ret_val = (toml_keyval_t **)&dummy;

  *ret_tab = 0;
  *ret_arr = 0;
  *ret_val = 0;

  for (i = 0; i < tab->nkval; i++) {
    if (0 == strcmp(key, tab->kval[i]->key)) {
      *ret_val = tab->kval[i];
      return 'v';
    }
  }
  for (i = 0; i < tab->narr; i++) {
    if (0 == strcmp(key, tab->arr[i]->key)) {
      *ret_arr = tab->arr[i];
      return 'a';
    }
  }
  for (i = 0; i < tab->ntab; i++) {
    if (0 == strcmp(key, tab->tab[i]->key)) {
      *ret_tab = tab->tab[i];
      return 't';
    }
  }
  return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x10(%rbp)
movq %rsi, -0x18(%rbp)
movq %rdx, -0x20(%rbp)
movq %rcx, -0x28(%rbp)
movq %r8, -0x30(%rbp)
cmpq $0x0, -0x30(%rbp)
jne 0x664b
leaq -0x40(%rbp), %rax
movq %rax, -0x30(%rbp)
cmpq $0x0, -0x28(%rbp)
jne 0x665a
leaq -0x40(%rbp), %rax
movq %rax, -0x28(%rbp)
cmpq $0x0, -0x20(%rbp)
jne 0x6669
leaq -0x40(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x30(%rbp), %rax
movq $0x0, (%rax)
movq -0x28(%rbp), %rax
movq $0x0, (%rax)
movq -0x20(%rbp), %rax
movq $0x0, (%rax)
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0xc(%rcx), %eax
jge 0x66f1
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rsi
callq 0x1130
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x66e4
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x20(%rbp), %rax
movq %rcx, (%rax)
movl $0x76, -0x4(%rbp)
jmp 0x67c0
jmp 0x66e6
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x6691
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x18(%rcx), %eax
jge 0x6755
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rsi
callq 0x1130
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x6748
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x28(%rbp), %rax
movq %rcx, (%rax)
movl $0x61, -0x4(%rbp)
jmp 0x67c0
jmp 0x674a
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x66f8
movl $0x0, -0x34(%rbp)
movl -0x34(%rbp), %eax
movq -0x10(%rbp), %rcx
cmpl 0x28(%rcx), %eax
jge 0x67b9
movq -0x18(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax), %rsi
callq 0x1130
movl %eax, %ecx
xorl %eax, %eax
cmpl %ecx, %eax
jne 0x67ac
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rax
movslq -0x34(%rbp), %rcx
movq (%rax,%rcx,8), %rcx
movq -0x30(%rbp), %rax
movq %rcx, (%rax)
movl $0x74, -0x4(%rbp)
jmp 0x67c0
jmp 0x67ae
movl -0x34(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x34(%rbp)
jmp 0x675c
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x40, %rsp
popq %rbp
retq
nopl (%rax)