// File: yhirose[P]fizzbuzzlang/fzbz.cc
// Function: eval(peg::AstBase<peg::EmptyType> const&, std::shared_ptr<Environment>)
Value eval(const Ast& ast, shared_ptr<Environment> env) {
  switch (ast.tag) {
    case "TERNARY"_:
      return eval_ternary(ast, env);
    case "CONDITION"_:
      return eval_condition(ast, env);
    case "MULTIPLICATIVE"_:
      return eval_multiplicative(ast, env);
    case "CALL"_:
      return eval_call(ast, env);
    case "FOR"_:
      return eval_for(ast, env);
    case "Identifier"_:
      return Value(env->get_value(ast.token));
    case "String"_:
      return Value(ast.token);
    case "Number"_:
      return Value(ast.token_to_number<long>());
    default:
      return Value();
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdx, -0xb8(%rbp)
movq %rdi, -0xb0(%rbp)
movq %rdi, %rax
movq %rax, -0xa8(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rax
movl 0xa0(%rax), %eax
movl %eax, -0x9c(%rbp)
subl $0xa93e7fa7, %eax       # imm = 0xA93E7FA7
je 0xae84
jmp 0xadfc
movl -0x9c(%rbp), %eax
subl $0xbd90f163, %eax       # imm = 0xBD90F163
je 0xb10b
jmp 0xae0f
movl -0x9c(%rbp), %eax
subl $0xc31de055, %eax       # imm = 0xC31DE055
je 0xb0cf
jmp 0xae22
movl -0x9c(%rbp), %eax
subl $0x1323b, %eax          # imm = 0x1323B
je 0xb01c
jmp 0xae35
movl -0x9c(%rbp), %eax
subl $0x25d362, %eax         # imm = 0x25D362
je 0xafb6
jmp 0xae48
movl -0x9c(%rbp), %eax
subl $0xb538ed3, %eax        # imm = 0xB538ED3
je 0xaeea
jmp 0xae5b
movl -0x9c(%rbp), %eax
subl $0x36a5c243, %eax       # imm = 0x36A5C243
je 0xb082
jmp 0xae6e
movl -0x9c(%rbp), %eax
subl $0x63cc1e70, %eax       # imm = 0x63CC1E70
je 0xaf50
jmp 0xb125
movq -0xb8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0xc8(%rbp)
leaq -0x28(%rbp), %rdi
movq %rdi, -0xc0(%rbp)
callq 0x13110
movq -0xb0(%rbp), %rdi
movq -0xc8(%rbp), %rsi
movq -0xc0(%rbp), %rdx
callq 0xab40
jmp 0xaec2
leaq -0x28(%rbp), %rdi
callq 0x13230
jmp 0xb131
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x13230
jmp 0xb141
movq -0xb8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0xd8(%rbp)
leaq -0x48(%rbp), %rdi
movq %rdi, -0xd0(%rbp)
callq 0x13110
movq -0xb0(%rbp), %rdi
movq -0xd8(%rbp), %rsi
movq -0xd0(%rbp), %rdx
callq 0xb150
jmp 0xaf28
leaq -0x48(%rbp), %rdi
callq 0x13230
jmp 0xb131
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x13230
jmp 0xb141
movq -0xb8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0xe8(%rbp)
leaq -0x58(%rbp), %rdi
movq %rdi, -0xe0(%rbp)
callq 0x13110
movq -0xb0(%rbp), %rdi
movq -0xe8(%rbp), %rsi
movq -0xe0(%rbp), %rdx
callq 0xb300
jmp 0xaf8e
leaq -0x58(%rbp), %rdi
callq 0x13230
jmp 0xb131
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x13230
jmp 0xb141
movq -0xb8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0xf8(%rbp)
leaq -0x68(%rbp), %rdi
movq %rdi, -0xf0(%rbp)
callq 0x13110
movq -0xb0(%rbp), %rdi
movq -0xf8(%rbp), %rsi
movq -0xf0(%rbp), %rdx
callq 0xb530
jmp 0xaff4
leaq -0x68(%rbp), %rdi
callq 0x13230
jmp 0xb131
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x68(%rbp), %rdi
callq 0x13230
jmp 0xb141
movq -0xb8(%rbp), %rsi
movq -0x10(%rbp), %rax
movq %rax, -0x108(%rbp)
leaq -0x78(%rbp), %rdi
movq %rdi, -0x100(%rbp)
callq 0x13110
movq -0xb0(%rbp), %rdi
movq -0x108(%rbp), %rsi
movq -0x100(%rbp), %rdx
callq 0xb6b0
jmp 0xb05a
leaq -0x78(%rbp), %rdi
callq 0x13230
jmp 0xb131
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x30(%rbp)
movl %eax, -0x34(%rbp)
leaq -0x78(%rbp), %rdi
callq 0x13230
jmp 0xb141
movq -0xb8(%rbp), %rdi
callq 0x134f0
movq %rax, %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rcx
movq %rcx, -0x88(%rbp)
movq 0xb8(%rax), %rax
movq %rax, -0x80(%rbp)
movq -0x88(%rbp), %rsi
movq -0x80(%rbp), %rdx
callq 0x13510
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
callq 0x13250
jmp 0xb131
movq -0xb0(%rbp), %rdi
movq -0x10(%rbp), %rax
movq 0xb0(%rax), %rcx
movq %rcx, -0x98(%rbp)
movq 0xb8(%rax), %rax
movq %rax, -0x90(%rbp)
movq -0x98(%rbp), %rsi
movq -0x90(%rbp), %rdx
callq 0x13990
jmp 0xb131
movq -0x10(%rbp), %rdi
callq 0x139c0
movq -0xb0(%rbp), %rdi
movq %rax, %rsi
callq 0x134c0
jmp 0xb131
movq -0xb0(%rbp), %rdi
callq 0x13960
movq -0xa8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x30(%rbp), %rdi
callq 0xa650
nopw (%rax,%rax)