// File: /workspace/github_c_makefile_star2_O1/ryvnf[P]czc/type.c
// Function: type_from_ast
struct type *type_from_ast(struct ast *ast)
{
    switch (ast->tag) {
        case PTR_EXPR:
            return type_from_ptr_ast(ast);
        case ARRAY_EXPR:
            return type_from_array_ast(ast);
        case FUNC_EXPR:
            return type_from_func_ast(ast);
        case NAME:
            return type_from_name_ast(ast);
        case STRUCT_EXPR:
            return type_from_struct_ast(ast);
    }
    abort();
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, %rbx
movl (%rdi), %ecx
leal -0x4300(%rcx), %eax
cmpl $0x3, %eax
ja 0xbcd4
leaq 0x2cc3(%rip), %rcx      # 0xe960
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0xbc78
movq %rax, %rbx
movl $0x10, %edi
callq 0x2160
movl $0x1008, (%rax)         # imm = 0x1008
movq %rbx, 0x8(%rax)
jmp 0xbe95
cmpl $0x1000, %ecx           # imm = 0x1000
jne 0xbebe
movq %rbx, %rdi
callq 0x26d0
movq %rax, %r15
leaq 0x80ee(%rip), %rax      # 0x13de0
movq (%rax), %rdi
movq %r15, %rsi
callq 0xb387
testq %rax, %rax
jne 0xbe95
movq 0x8(%rbx), %rdi
leaq 0x2efc(%rip), %rsi      # 0xec0d
jmp 0xbeb4
movq %rbx, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xbec3
leaq 0x20(%rsp), %r12
movq %rbx, 0x10(%rsp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2805
movq %rax, %r15
movq (%r12), %rdi
shlq $0x4, %rdi
addq $0x20, %rdi
callq 0x2160
movq %rax, %r14
movl $0x40, (%rax)
callq 0x325f
movq %rax, 0x8(%r14)
movq (%r12), %rax
movq %rax, 0x10(%r14)
movb $0x0, 0x18(%r14)
leaq 0x805d(%rip), %rax      # 0x13dd8
movl (%rax), %ecx
leal 0x1(%rcx), %edx
movl %edx, (%rax)
movl %ecx, 0x1c(%r14)
movq (%r12), %r12
testq %r12, %r12
je 0xbde8
leaq 0x28(%r14), %rbp
xorl %ebx, %ebx
movq (%r15,%rbx,8), %r12
movq %r12, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x26d0
movq %rax, %rdi
callq 0x2220
movq %rax, %r13
movl $0x1, %esi
movq %r12, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0xbc78
orb $0x4, 0x1(%rax)
movq %r13, -0x8(%rbp)
movq %rax, (%rbp)
incq %rbx
movq 0x20(%rsp), %r12
addq $0x10, %rbp
cmpq %r12, %rbx
jb 0xbd95
movq %r14, 0x8(%rsp)
testq %r12, %r12
je 0xbe49
movq 0x8(%rsp), %rax
leaq 0x20(%rax), %rcx
movq %rcx, 0x18(%rsp)
leaq 0x30(%rax), %r14
xorl %ebx, %ebx
movq %rbx, %rax
incq %rbx
cmpq %r12, %rbx
jae 0xbe40
shlq $0x4, %rax
movq 0x18(%rsp), %rcx
movq (%rcx,%rax), %r15
movq %r14, %r13
movq %rbx, %rbp
movq (%r13), %rsi
movq %r15, %rdi
callq 0x2100
testl %eax, %eax
je 0xbea4
incq %rbp
addq $0x10, %r13
cmpq %r12, %rbp
jb 0xbe24
addq $0x10, %r14
cmpq %r12, %rbx
jne 0xbe06
movq 0x8(%rsp), %rax
jmp 0xbe95
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0xbc78
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %rbx
movl $0x18, %edi
callq 0x2160
movl $0x10, (%rax)
movq %r15, 0x8(%rax)
movq %rbx, 0x10(%rax)
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x10(%rsp), %rax
movq 0x8(%rax), %rdi
leaq 0x2d72(%rip), %rsi      # 0xec26
movq %r15, %rdx
xorl %eax, %eax
callq 0x5011
callq 0x2040