// File: /workspace/github_c_makefile_star2_O0/sisshiki1969[P]monocc/src/parse.c
// Function: parse_type_specifier
Type *parse_type_specifier(bool allow_undefined_tag) {
  Token *t = consume();
  Type *ty;
  switch (t->kind) {
    case TK_BOOL:
      return new_type_bool();
    case TK_VOID:
      return new_type_void();
    case TK_STRUCT:
      return parse_struct_specifier(allow_undefined_tag);
    case TK_ENUM:
      return parse_enum_specifier();
    case TK_IDENT:
      // typedef-name
      ty = find_typedef(t);
      if (ty)
        return ty;
      else
        error_at_token(t, "Internal error: Must be typedef name.");
  }
  int flag = 0;
  enum {
    CHAR = 1,
    SHORT = 4,
    INT = 16,
    LONG = 64,
    SIGNED = 256,
    UNSIGNED = 1024
  } size;
  while (is_type_specifier(t)) {
    switch (t->kind) {
      case TK_CHAR:
        flag += CHAR;
        break;
      case TK_SHORT:
        flag += SHORT;
        break;
      case TK_INT:
        flag += INT;
        break;
      case TK_LONG:
        flag += LONG;
        break;
      case TK_SIGNED:
        flag += SIGNED;
        break;
      case TK_UNSIGNED:
        flag += UNSIGNED;
        break;
      default:
        error_at_token(t, "Illegal type specifier.");
    }
    switch (flag) {
      case CHAR:
        ty = new_type_char();
        break;
      case SHORT:
      case SHORT + INT:
      case SIGNED + SHORT:
      case SIGNED + SHORT + INT:
        ty = new_type_short();
        break;
      case UNSIGNED + SHORT:
      case UNSIGNED + SHORT + INT:
        ty = new_type_ushort();
        break;
      case INT:
      case SIGNED + INT:
        ty = new_type_int();
        break;
      case UNSIGNED + INT:
        ty = new_type_uint();
        break;
      case LONG:
      case LONG + INT:
      case SIGNED + LONG:
      case SIGNED + LONG + INT:
        ty = new_type_long();
        break;
      case UNSIGNED + LONG:
      case UNSIGNED + LONG + INT:
        ty = new_type_ulong();
        break;
      case SIGNED:
      case UNSIGNED:
        ty = NULL;
        break;
      default:
        error_at_token(t, "Illegal type specifier.");
    }
    if (!is_type_specifier(token)) {
      break;
    }
    t = consume();
  }
  if (!ty) error_at_token(t, "Illegal type specifier.");
  return ty;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movb %dil, %al
andb $0x1, %al
movb %al, -0x9(%rbp)
callq 0x7830
movq %rax, -0x18(%rbp)
movq -0x18(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x2c(%rbp)
testl %eax, %eax
je 0xa3b4
jmp 0xa348
movl -0x2c(%rbp), %eax
subl $0x36, %eax
je 0xa370
jmp 0xa352
movl -0x2c(%rbp), %eax
subl $0x37, %eax
je 0xa380
jmp 0xa35c
movl -0x2c(%rbp), %eax
subl $0x3a, %eax
je 0xa390
jmp 0xa366
movl -0x2c(%rbp), %eax
subl $0x3b, %eax
je 0xa3a6
jmp 0xa3e9
movb $0x0, %al
callq 0xd120
movq %rax, -0x8(%rbp)
jmp 0xa63c
movb $0x0, %al
callq 0xd130
movq %rax, -0x8(%rbp)
jmp 0xa63c
movb -0x9(%rbp), %al
andb $0x1, %al
movzbl %al, %edi
callq 0xa0e0
movq %rax, -0x8(%rbp)
jmp 0xa63c
callq 0x9fb0
movq %rax, -0x8(%rbp)
jmp 0xa63c
movq -0x18(%rbp), %rdi
callq 0x7b20
movq %rax, -0x20(%rbp)
cmpq $0x0, -0x20(%rbp)
je 0xa3d5
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
jmp 0xa63c
movq -0x18(%rbp), %rdi
leaq 0x6381(%rip), %rsi      # 0x10761
movb $0x0, %al
callq 0x5d20
jmp 0xa3e9
movl $0x0, -0x24(%rbp)
movq -0x18(%rbp), %rdi
callq 0x7ac0
testb $0x1, %al
jne 0xa402
jmp 0xa61b
movq -0x18(%rbp), %rax
movl (%rax), %eax
addl $-0x34, %eax
movl %eax, %ecx
movq %rcx, -0x38(%rbp)
subl $0xa, %eax
ja 0xa470
movq -0x38(%rbp), %rax
leaq 0x5eeb(%rip), %rcx      # 0x1030c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl -0x24(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x24(%rbp)
jmp 0xa482
movl -0x24(%rbp), %eax
addl $0x4, %eax
movl %eax, -0x24(%rbp)
jmp 0xa482
movl -0x24(%rbp), %eax
addl $0x10, %eax
movl %eax, -0x24(%rbp)
jmp 0xa482
movl -0x24(%rbp), %eax
addl $0x40, %eax
movl %eax, -0x24(%rbp)
jmp 0xa482
movl -0x24(%rbp), %eax
addl $0x100, %eax            # imm = 0x100
movl %eax, -0x24(%rbp)
jmp 0xa482
movl -0x24(%rbp), %eax
addl $0x400, %eax            # imm = 0x400
movl %eax, -0x24(%rbp)
jmp 0xa482
movq -0x18(%rbp), %rdi
leaq 0x630c(%rip), %rsi      # 0x10787
movb $0x0, %al
callq 0x5d20
movl -0x24(%rbp), %eax
movl %eax, -0x3c(%rbp)
subl $0x1, %eax
je 0xa581
jmp 0xa493
movl -0x3c(%rbp), %eax
subl $0x4, %eax
je 0xa58e
jmp 0xa4a1
movl -0x3c(%rbp), %eax
subl $0x10, %eax
je 0xa5a8
jmp 0xa4af
movl -0x3c(%rbp), %eax
subl $0x14, %eax
je 0xa58e
jmp 0xa4bd
movl -0x3c(%rbp), %eax
subl $0x40, %eax
je 0xa5c2
jmp 0xa4cb
movl -0x3c(%rbp), %eax
subl $0x50, %eax
je 0xa5c2
jmp 0xa4d9
movl -0x3c(%rbp), %eax
subl $0x100, %eax            # imm = 0x100
je 0xa5dc
jmp 0xa4e9
movl -0x3c(%rbp), %eax
subl $0x104, %eax            # imm = 0x104
je 0xa58e
jmp 0xa4f9
movl -0x3c(%rbp), %eax
subl $0x110, %eax            # imm = 0x110
je 0xa5a8
jmp 0xa509
movl -0x3c(%rbp), %eax
subl $0x114, %eax            # imm = 0x114
je 0xa58e
jmp 0xa515
movl -0x3c(%rbp), %eax
subl $0x140, %eax            # imm = 0x140
je 0xa5c2
jmp 0xa525
movl -0x3c(%rbp), %eax
subl $0x150, %eax            # imm = 0x150
je 0xa5c2
jmp 0xa535
movl -0x3c(%rbp), %eax
subl $0x400, %eax            # imm = 0x400
je 0xa5dc
jmp 0xa545
movl -0x3c(%rbp), %eax
subl $0x404, %eax            # imm = 0x404
je 0xa59b
jmp 0xa551
movl -0x3c(%rbp), %eax
subl $0x410, %eax            # imm = 0x410
je 0xa5b5
jmp 0xa55d
movl -0x3c(%rbp), %eax
subl $0x414, %eax            # imm = 0x414
je 0xa59b
jmp 0xa569
movl -0x3c(%rbp), %eax
subl $0x440, %eax            # imm = 0x440
je 0xa5cf
jmp 0xa575
movl -0x3c(%rbp), %eax
subl $0x450, %eax            # imm = 0x450
je 0xa5cf
jmp 0xa5e6
movb $0x0, %al
callq 0xd110
movq %rax, -0x20(%rbp)
jmp 0xa5f8
movb $0x0, %al
callq 0xd0d0
movq %rax, -0x20(%rbp)
jmp 0xa5f8
movb $0x0, %al
callq 0xd0e0
movq %rax, -0x20(%rbp)
jmp 0xa5f8
movb $0x0, %al
callq 0xd0b0
movq %rax, -0x20(%rbp)
jmp 0xa5f8
movb $0x0, %al
callq 0xd0c0
movq %rax, -0x20(%rbp)
jmp 0xa5f8
movb $0x0, %al
callq 0xd0f0
movq %rax, -0x20(%rbp)
jmp 0xa5f8
movb $0x0, %al
callq 0xd100
movq %rax, -0x20(%rbp)
jmp 0xa5f8
movq $0x0, -0x20(%rbp)
jmp 0xa5f8
movq -0x18(%rbp), %rdi
leaq 0x6196(%rip), %rsi      # 0x10787
movb $0x0, %al
callq 0x5d20
leaq 0xac19(%rip), %rax      # 0x15218
movq (%rax), %rdi
callq 0x7ac0
testb $0x1, %al
jne 0xa60d
jmp 0xa61b
callq 0x7830
movq %rax, -0x18(%rbp)
jmp 0xa3f0
cmpq $0x0, -0x20(%rbp)
jne 0xa634
movq -0x18(%rbp), %rdi
leaq 0x615a(%rip), %rsi      # 0x10787
movb $0x0, %al
callq 0x5d20
movq -0x20(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x40, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)