// File: /workspace/github_c_makefile_star2_O2/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 %r13
pushq %r12
pushq %rbx
movq %rdi, %rbx
xorl %r12d, %r12d
pushq $0x1
popq %r14
leaq 0x5b45(%rip), %r13      # 0xbb1c
movl (%rbx), %edi
leal -0x42d1(%rdi), %eax
cmpl $0x6, %eax
jbe 0x6003
cmpl $0x4200, %edi           # imm = 0x4200
jne 0x601c
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %r14, %rsi
jmp 0x600f
movslq (%r13,%rax,4), %rax
addq %r13, %rax
jmpq *%rax
xorl %esi, %esi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rbx
jmp 0x5fd7
cmpl $0x1000, %edi           # imm = 0x1000
je 0x625f
cmpl $0x2000, %edi           # imm = 0x2000
je 0x626c
cmpl $0x4270, %edi           # imm = 0x4270
jne 0x6067
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r15
movq %rbx, %rdi
movq %r14, %rsi
callq 0x26ce
movq %rax, %rbx
orq %r15, %r12
jmp 0x5fd7
cmpl $0x4280, %edi           # imm = 0x4280
je 0x622c
cmpl $0x4290, %edi           # imm = 0x4290
je 0x6163
cmpl $0x42a0, %edi           # imm = 0x42A0
je 0x61fa
cmpl $0x42a1, %edi           # imm = 0x42A1
je 0x62b1
cmpl $0x42b0, %edi           # imm = 0x42B0
je 0x6326
cmpl $0x42b1, %edi           # imm = 0x42B1
je 0x61ca
cmpl $0x42c0, %edi           # imm = 0x42C0
je 0x6196
cmpl $0x42c1, %edi           # imm = 0x42C1
je 0x62e0
cmpl $0x42c2, %edi           # imm = 0x42C2
je 0x6279
leal -0x125(%rdi), %eax
cmpl $0x2, %eax
jb 0x6356
cmpl $0x124, %edi            # imm = 0x124
je 0x6363
callq 0x4b10
testq %rax, %rax
jne 0x6375
xorl %r14d, %r14d
jmp 0x6316
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
negq %rax
jmp 0x6158
movq 0x8(%rbx), %r14
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
xorl %edi, %edi
movq %rax, %rsi
callq 0x5137
movq %r14, %rdi
movq %rax, %rsi
callq 0x5dff
jmp 0x6313
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
notq %rax
orq %rax, %r12
movq %r12, %r14
jmp 0x6319
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r14
andq %r15, %r14
jmp 0x6316
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r14
imulq %r15, %r14
jmp 0x6316
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
subq %rax, %r14
jmp 0x6316
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movl %eax, %ecx
shlq %cl, %r14
jmp 0x6316
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r14
xorq %r15, %r14
jmp 0x6316
movq %rbx, %rdi
callq 0x5f5b
jmp 0x6313
movq %rbx, %rdi
callq 0x2655
jmp 0x6313
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %rcx
movq %r14, %rax
xorl %edx, %edx
divq %rcx
movq %rdx, %r14
jmp 0x6316
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movl %eax, %ecx
shrq %cl, %r14
jmp 0x6316
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r14
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %rcx
movq %r14, %rax
xorl %edx, %edx
divq %rcx
movq %rax, %r14
orq %r12, %r14
movq %r14, %rax
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
movq %rbx, %rdi
xorl %esi, %esi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r15
pushq $0x1
popq %rsi
movq %rbx, %rdi
callq 0x26ce
movq %rax, %rdi
callq 0x5fbd
movq %rax, %r14
addq %r15, %r14
jmp 0x6316
movq 0x8(%rbx), %rdi
leaq 0x5d07(%rip), %rsi      # 0xc068
jmp 0x636e
movq 0x8(%rbx), %rdi
leaq 0x5d36(%rip), %rsi      # 0xc0a4
xorl %eax, %eax
callq 0x4a05
movq 0x8(%rbx), %rdi
leaq 0x5d57(%rip), %rsi      # 0xc0d7
movq %rax, %rdx
xorl %eax, %eax
callq 0x4a05