// File: /workspace/github_c_makefile_star2_O3/ryvnf[P]czc/eval.c
// Function: eval_size
size_t eval_size(struct ast *ast)
{
    switch (ast->tag) {
        case COMMA_EXPR:
            eval_size(ast_ast(ast, 0));
            return eval_size(ast_ast(ast, 1));

        case OR_EXPR:
            return eval_size(ast_ast(ast, 0)) | eval_size(ast_ast(ast, 1));

        case XOR_EXPR:
            return eval_size(ast_ast(ast, 0)) ^ eval_size(ast_ast(ast, 1));

        case AND_EXPR:
            return eval_size(ast_ast(ast, 0)) & eval_size(ast_ast(ast, 1));

        case SHL_EXPR:
            return eval_size(ast_ast(ast, 0)) << eval_size(ast_ast(ast, 1));

        case SHR_EXPR:
            return eval_size(ast_ast(ast, 0)) >> eval_size(ast_ast(ast, 1));

        case ADD_EXPR:
            return eval_size(ast_ast(ast, 0)) + eval_size(ast_ast(ast, 1));

        case SUB_EXPR:
            return eval_size(ast_ast(ast, 0)) - eval_size(ast_ast(ast, 1));

        case MUL_EXPR:
            return eval_size(ast_ast(ast, 0)) * eval_size(ast_ast(ast, 1));

        case DIV_EXPR:
            return eval_size(ast_ast(ast, 0)) / eval_size(ast_ast(ast, 1));

        case REM_EXPR:
            return eval_size(ast_ast(ast, 0)) % eval_size(ast_ast(ast, 1));

        case COMPL_EXPR:
            return ~eval_size(ast_ast(ast, 0));

        case UPLUS_EXPR:
            return +eval_size(ast_ast(ast, 0));

        case NEG_EXPR:
            return -eval_size(ast_ast(ast, 0));

        case SIZEOF_EXPR:
            return sizeof_type(ast->loc, eval_type(NULL, ast_ast(ast, 0)));

        case INT_CONST:
            return ast_i(ast);

        case NAME:
            return eval_name_size(ast);

        case TRUE_TOK:
        case FALSE_TOK:
            fatal(ast->loc, "boolean constants are not implemented in this "
                    "context (yet)");
            unreachable();
            return 0;

        case NULL_TOK:
            fatal(ast->loc, "pointers are not allowed in constant context (yet)");
            unreachable();
            return 0;
    }

    const char *op_name = op_to_name(ast->tag);
    if (op_name) {
        fatal(ast->loc, "%s operator is allowed in this context (yet)",
                op_name);
    }

    return 0;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movq %rdi, %rbx
xorl %r12d, %r12d
leaq 0x736d(%rip), %r15      # 0xdb1c
movl (%rbx), %edi
cmpl $0x42af, %edi           # imm = 0x42AF
jle 0x67e1
cmpl $0x42c0, %edi           # imm = 0x42C0
jle 0x686a
leal -0x42d1(%rdi), %eax
cmpl $0x6, %eax
ja 0x6935
movslq (%r15,%rax,4), %rax
addq %r15, %rax
jmpq *%rax
xorl %esi, %esi
jmp 0x6818
cmpl $0x426f, %edi           # imm = 0x426F
jg 0x6825
cmpl $0x1fff, %edi           # imm = 0x1FFF
jle 0x691c
cmpl $0x4200, %edi           # imm = 0x4200
jne 0x6a32
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rbx
jmp 0x67af
cmpl $0x428f, %edi           # imm = 0x428F
jg 0x68c4
cmpl $0x4270, %edi           # imm = 0x4270
jne 0x69f1
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rbx
orq %r14, %r12
jmp 0x67af
cmpl $0x42b0, %edi           # imm = 0x42B0
je 0x69bc
cmpl $0x42b1, %edi           # imm = 0x42B1
je 0x698a
cmpl $0x42c0, %edi           # imm = 0x42C0
jne 0x6b5d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r14
imulq %r15, %r14
jmp 0x6b6a
cmpl $0x4290, %edi           # imm = 0x4290
je 0x6a7f
cmpl $0x42a0, %edi           # imm = 0x42A0
je 0x6a4b
cmpl $0x42a1, %edi           # imm = 0x42A1
jne 0x6b5d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movl %eax, %ecx
shrq %cl, %r14
jmp 0x6b6a
cmpl $0x1000, %edi           # imm = 0x1000
jne 0x6b4a
movq %rbx, %rdi
callq 0x6738
jmp 0x6b45
cmpl $0x42c1, %edi           # imm = 0x42C1
je 0x6b10
cmpl $0x42c2, %edi           # imm = 0x42C2
jne 0x6b5d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %rcx
movq %r14, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r14
jmp 0x6b6a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
subq %rax, %r14
jmp 0x6b6a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r14
addq %r15, %r14
jmp 0x6b6a
cmpl $0x4280, %edi           # imm = 0x4280
jne 0x6b5d
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r14
xorq %r15, %r14
jmp 0x6b6a
cmpl $0x2000, %edi           # imm = 0x2000
jne 0x6b5d
movq %rbx, %rdi
callq 0x276f
jmp 0x6b45
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movl %eax, %ecx
shlq %cl, %r14
jmp 0x6b6a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r15
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r14
andq %r15, %r14
jmp 0x6b6a
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
negq %rax
jmp 0x6ae0
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
notq %rax
orq %rax, %r12
movq %r12, %r14
jmp 0x6b6d
movq 0x8(%rbx), %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
xorl %edi, %edi
movq %rax, %rsi
callq 0x578e
movq %r14, %rdi
movq %rax, %rsi
callq 0x65c3
jmp 0x6b45
movq %rbx, %rdi
xorl %esi, %esi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %r14
movl $0x1, %esi
movq %rbx, %rdi
callq 0x27e8
movq %rax, %rdi
callq 0x679a
movq %rax, %rcx
movq %r14, %rax
xorl %edx, %edx
divq %rcx
movq %rax, %r14
jmp 0x6b6a
leal -0x125(%rdi), %eax
cmpl $0x2, %eax
jb 0x6b7c
cmpl $0x124, %edi            # imm = 0x124
je 0x6b89
callq 0x50b4
testq %rax, %rax
jne 0x6b9b
xorl %r14d, %r14d
orq %r12, %r14
movq %r14, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%rbx), %rdi
leaq 0x74e1(%rip), %rsi      # 0xe068
jmp 0x6b94
movq 0x8(%rbx), %rdi
leaq 0x7510(%rip), %rsi      # 0xe0a4
xorl %eax, %eax
callq 0x4fa1
movq 0x8(%rbx), %rdi
leaq 0x7531(%rip), %rsi      # 0xe0d7
movq %rax, %rdx
xorl %eax, %eax
callq 0x4fa1