// File: /workspace/github_c_makefile_star2_O1/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, %r14
xorl %ebx, %ebx
leaq 0x7302(%rip), %r12      # 0xdb1c
movl (%r14), %edi
cmpl $0x42af, %edi           # imm = 0x42AF
jle 0x6850
cmpl $0x42c0, %edi           # imm = 0x42C0
jle 0x68d9
leal -0x42d1(%rdi), %eax
cmpl $0x6, %eax
ja 0x69a1
movslq (%r12,%rax,4), %rax
addq %r12, %rax
jmpq *%rax
movq %r14, %rdi
xorl %esi, %esi
jmp 0x688a
cmpl $0x426f, %edi           # imm = 0x426F
jg 0x6894
cmpl $0x1fff, %edi           # imm = 0x1FFF
jle 0x6988
cmpl $0x4200, %edi           # imm = 0x4200
jne 0x6a98
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %r14
jmp 0x681a
cmpl $0x428f, %edi           # imm = 0x428F
jg 0x6930
cmpl $0x4270, %edi           # imm = 0x4270
jne 0x6a5a
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %r14
orq %r15, %rbx
jmp 0x681a
cmpl $0x42b0, %edi           # imm = 0x42B0
je 0x6a28
cmpl $0x42b1, %edi           # imm = 0x42B1
je 0x69f6
cmpl $0x42c0, %edi           # imm = 0x42C0
jne 0x6bba
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
imulq %r15, %rax
jmp 0x6bc6
cmpl $0x4290, %edi           # imm = 0x4290
je 0x6ae8
cmpl $0x42a0, %edi           # imm = 0x42A0
je 0x6ab1
cmpl $0x42a1, %edi           # imm = 0x42A1
jne 0x6bba
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movl %eax, %ecx
shrq %cl, %r15
jmp 0x6ae0
cmpl $0x1000, %edi           # imm = 0x1000
jne 0x6ba7
movq %r14, %rdi
callq 0x67a4
jmp 0x6bc6
cmpl $0x42c1, %edi           # imm = 0x42C1
je 0x6b70
cmpl $0x42c2, %edi           # imm = 0x42C2
jne 0x6bba
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %rcx
movq %r15, %rax
xorl %edx, %edx
divq %rcx
orq %rdx, %rbx
jmp 0x6bc9
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
subq %rax, %r15
jmp 0x6ae0
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
addq %r15, %rax
jmp 0x6bc6
cmpl $0x4280, %edi           # imm = 0x4280
jne 0x6bba
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
xorq %r15, %rax
jmp 0x6bc6
cmpl $0x2000, %edi           # imm = 0x2000
jne 0x6bba
movq %r14, %rdi
callq 0x274f
jmp 0x6bc6
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movl %eax, %ecx
shlq %cl, %r15
orq %r15, %rbx
jmp 0x6bc9
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
andq %r15, %rax
jmp 0x6bc6
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
negq %rax
jmp 0x6bc6
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
notq %rax
jmp 0x6bc6
movq 0x8(%r14), %r15
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
xorl %edi, %edi
movq %rax, %rsi
callq 0x57c4
movq %r15, %rdi
movq %rax, %rsi
callq 0x662f
jmp 0x6bc6
movq %r14, %rdi
xorl %esi, %esi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %r15
movl $0x1, %esi
movq %r14, %rdi
callq 0x27c8
movq %rax, %rdi
callq 0x6806
movq %rax, %rcx
movq %r15, %rax
xorl %edx, %edx
divq %rcx
jmp 0x6bc6
leal -0x125(%rdi), %eax
cmpl $0x2, %eax
jb 0x6bd8
cmpl $0x124, %edi            # imm = 0x124
je 0x6be5
callq 0x5124
testq %rax, %rax
jne 0x6bf7
xorl %eax, %eax
orq %rax, %rbx
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
movq 0x8(%r14), %rdi
leaq 0x7485(%rip), %rsi      # 0xe068
jmp 0x6bf0
movq 0x8(%r14), %rdi
leaq 0x74b4(%rip), %rsi      # 0xe0a4
xorl %eax, %eax
callq 0x5011
movq 0x8(%r14), %rdi
leaq 0x74d5(%rip), %rsi      # 0xe0d7
movq %rax, %rdx
xorl %eax, %eax
callq 0x5011