// File: /workspace/github_c_makefile_star2_O3/sisshiki1969[P]monocc/src/debug.c
// Function: print_type
void print_type(FILE *stream, Type *type) {
  MemberInfo *param;
  bool first;
  switch (type->ty) {
    case CHAR:
      fprintf(stream, "char ");
      break;
    case SHORT:
      fprintf(stream, "short ");
      break;
    case USHORT:
      fprintf(stream, "unsigned short ");
      break;
    case INT:
      fprintf(stream, "int ");
      break;
    case UINT:
      fprintf(stream, "unsigned int ");
      break;
    case LONG:
      fprintf(stream, "long ");
      break;
    case ULONG:
      fprintf(stream, "unsigned long ");
      break;
    case BOOL:
      fprintf(stream, "bool ");
      break;
    case VOID:
      fprintf(stream, "void ");
      break;
    case PTR:
      fprintf(stream, "* ");
      print_type(stream, type->ptr_to);
      break;
    case ARRAY:
      fprintf(stream, "[%d] ", type->array_size);
      print_type(stream, type->ptr_to);
      break;
    case FUNC:
      fprintf(stream, "func ");
      if (type->variadic) fprintf(stream, "VARIADIC ");
      param = type->params;
      fprintf(stream, "( ");
      first = true;
      while (param) {
        if (!first) fprintf(stream, ", ");
        first = false;
        if (param->type)
          print_type(stream, param->type);
        else
          fprintf(stream, "NULL_TYPE");
        if (param->ident)
          fprintf(stream, " %.*s ", param->ident->len, param->ident->str);
        else
          fprintf(stream, "- ");
        param = param->next;
      }
      fprintf(stream, ") ");
      print_type(stream, type->ptr_to);
      break;
    case STRUCT:
      fprintf(stream, "struct ");
      if (type->tag_name) {
        fprintf(stream, "<%.*s> ", type->tag_name->len, type->tag_name->str);
      } else {
        fprintf(stream, "<> { ");
        print_struct_member(stream, type->member);
        fprintf(stream, "}");
      }
      break;
      // Type *member = type->member;
    case ENUM:
      fprintf(stream, "enum ");
      if (type->tag_name) {
        fprintf(stream, "<%.*s> ", type->tag_name->len, type->tag_name->str);
      }
      break;
    case ENUM_EL:
      fprintf(stream, "enum_el ");
      if (type->tag_name) {
        fprintf(stream, "<%.*s:%d> ", type->tag_name->len, type->tag_name->str,
                type->offset);
      }
      break;
    default:
      error("print_type(): Unknown Type.");
  }
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
leaq 0x8525(%rip), %r12      # 0xcc98
leaq 0x8754(%rip), %r13      # 0xcece
leaq 0x87d2(%rip), %rbp      # 0xcf53
leaq 0x8739(%rip), %r15      # 0xcec1
movl (%r14), %eax
cmpq $0xe, %rax
ja 0x4a70
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movl $0x2, %esi
movl $0x1, %edx
leaq 0x86f6(%rip), %rdi      # 0xcea5
movq %rbx, %rcx
callq 0x1190
jmp 0x48e1
movl 0x10(%r14), %edx
movq %rbx, %rdi
leaq 0x86de(%rip), %rsi      # 0xcea8
xorl %eax, %eax
callq 0x10f0
jmp 0x48e1
movl $0x5, %esi
movl $0x1, %edx
leaq 0x86c7(%rip), %rdi      # 0xceae
movq %rbx, %rcx
callq 0x1190
cmpb $0x1, 0x38(%r14)
jne 0x480f
movl $0x9, %esi
movl $0x1, %edx
leaq 0x86ad(%rip), %rdi      # 0xceb4
movq %rbx, %rcx
callq 0x1190
movq 0x18(%r14), %r12
movl $0x2, %esi
movl $0x1, %edx
leaq 0x869a(%rip), %rdi      # 0xcebe
movq %rbx, %rcx
callq 0x1190
testq %r12, %r12
je 0x48c1
movb $0x1, %al
testb $0x1, %al
jne 0x4850
movl $0x2, %esi
movl $0x1, %edx
movq %r15, %rdi
movq %rbx, %rcx
callq 0x1190
movq 0x10(%r12), %rsi
testq %rsi, %rsi
je 0x4864
movq %rbx, %rdi
callq 0x475b
jmp 0x487d
movl $0x9, %esi
movl $0x1, %edx
leaq 0x864f(%rip), %rdi      # 0xcec4
movq %rbx, %rcx
callq 0x1190
movq 0x8(%r12), %rax
testq %rax, %rax
je 0x489d
movl 0x28(%rax), %edx
movq 0x20(%rax), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
xorl %eax, %eax
callq 0x10f0
jmp 0x48b2
movl $0x2, %esi
movl $0x1, %edx
movq %r13, %rdi
movq %rbx, %rcx
callq 0x1190
movq (%r12), %r12
xorl %eax, %eax
testq %r12, %r12
jne 0x4837
movl $0x2, %esi
movl $0x1, %edx
leaq 0x85ff(%rip), %rdi      # 0xced1
movq %rbx, %rcx
callq 0x1190
leaq 0x83b7(%rip), %r12      # 0xcc98
movq 0x8(%r14), %r14
jmp 0x4788
leaq 0x85e3(%rip), %rdi      # 0xced4
movl $0x7, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
movq 0x30(%r14), %rax
testq %rax, %rax
jne 0x4a4a
leaq 0x85cd(%rip), %rdi      # 0xcee4
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
movq 0x20(%r14), %rsi
movq %rbx, %rdi
callq 0x4b1a
movl $0x7d, %edi
movq %rbx, %rsi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10c0
leaq 0x8515(%rip), %rdi      # 0xce6c
movl $0xf, %esi
jmp 0x49a1
leaq 0x8534(%rip), %rdi      # 0xce99
jmp 0x499c
leaq 0x8507(%rip), %rdi      # 0xce75
movl $0x6, %esi
jmp 0x49a1
leaq 0x8517(%rip), %rdi      # 0xce93
jmp 0x499c
leaq 0x84e1(%rip), %rdi      # 0xce66
jmp 0x499c
leaq 0x84ee(%rip), %rdi      # 0xce7c
movl $0xd, %esi
jmp 0x49a1
leaq 0x8503(%rip), %rdi      # 0xce9f
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x1190
leaq 0x84c7(%rip), %rdi      # 0xce8a
movl $0xe, %esi
jmp 0x49a1
leaq 0x84b4(%rip), %rdi      # 0xce85
movl $0x4, %esi
jmp 0x49a1
leaq 0x8511(%rip), %rdi      # 0xcef0
movl $0x8, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x4a8c
movl 0x28(%rax), %edx
movq 0x20(%rax), %rcx
movl 0x28(%r14), %r8d
leaq 0x84e9(%rip), %rsi      # 0xcef9
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0
leaq 0x84bb(%rip), %rdi      # 0xceea
movl $0x5, %esi
movl $0x1, %edx
movq %rbx, %rcx
callq 0x1190
movq 0x30(%r14), %rax
testq %rax, %rax
je 0x4a8c
movl 0x28(%rax), %edx
movq 0x20(%rax), %rcx
leaq 0x8484(%rip), %rsi      # 0xcedc
movq %rbx, %rdi
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x10f0
leaq 0x848d(%rip), %rdi      # 0xcf04
xorl %eax, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x508c
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq