// File: yhirose[P]fizzbuzzlang/fzbz.cc
// Function: eval_for(peg::AstBase<peg::EmptyType> const&, std::shared_ptr<Environment>)
Value eval_for(const Ast& ast, shared_ptr<Environment> env) {
  auto ident = ast.nodes[0]->token;
  auto from = eval(*ast.nodes[1], env).get<long>();
  auto to = eval(*ast.nodes[2], env).get<long>();
  auto& expr = *ast.nodes[3];

  for (auto i = from; i <= to; i++) {
    auto call_env = make_shared<Environment>(env);
    call_env->set_value(ident, Value(i));
    eval(expr, call_env);
  }
  return Value();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x1c0, %rsp            # imm = 0x1C0
movq %rdx, -0x168(%rbp)
movq %rdi, -0x178(%rbp)
movq %rdi, %rax
movq %rax, -0x170(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x130c0
movq %rax, %rdi
callq 0x13720
movups 0xb0(%rax), %xmm0
movaps %xmm0, -0x30(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movl $0x1, %esi
callq 0x130c0
movq %rax, %rdi
callq 0x130e0
movq -0x168(%rbp), %rsi
movq %rax, -0x160(%rbp)
leaq -0x70(%rbp), %rdi
movq %rdi, -0x158(%rbp)
callq 0x13110
movq -0x160(%rbp), %rsi
movq -0x158(%rbp), %rdx
leaq -0x60(%rbp), %rdi
callq 0xadb0
jmp 0xb75a
leaq -0x60(%rbp), %rdi
callq 0x133d0
movq %rax, -0x180(%rbp)
jmp 0xb76c
leaq -0x60(%rbp), %rdi
callq 0x13210
leaq -0x70(%rbp), %rdi
callq 0x13230
movq -0x180(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movl $0x2, %esi
callq 0x130c0
movq %rax, %rdi
callq 0x130e0
movq -0x168(%rbp), %rsi
movq %rax, -0x190(%rbp)
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x188(%rbp)
callq 0x13110
movq -0x190(%rbp), %rsi
movq -0x188(%rbp), %rdx
leaq -0xb0(%rbp), %rdi
callq 0xadb0
jmp 0xb7e3
leaq -0xb0(%rbp), %rdi
callq 0x133d0
movq %rax, -0x198(%rbp)
jmp 0xb7f8
leaq -0xb0(%rbp), %rdi
callq 0x13210
leaq -0xc0(%rbp), %rdi
callq 0x13230
movq -0x198(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x10(%rbp), %rdi
addq $0xc0, %rdi
movl $0x3, %esi
callq 0x130c0
movq %rax, %rdi
callq 0x130e0
movq %rax, -0xc8(%rbp)
movq -0x38(%rbp), %rax
movq %rax, -0xd0(%rbp)
movq -0xd0(%rbp), %rax
cmpq -0x88(%rbp), %rax
jg 0xba0f
movq -0x168(%rbp), %rsi
leaq -0xe0(%rbp), %rdi
movq %rdi, -0x1a8(%rbp)
callq 0x138a0
movq -0x1a8(%rbp), %rdi
callq 0x134f0
movq %rax, -0x1a0(%rbp)
movaps -0x30(%rbp), %xmm0
movaps %xmm0, -0xf0(%rbp)
movq -0xd0(%rbp), %rsi
leaq -0x118(%rbp), %rdi
callq 0x134c0
jmp 0xb8ae
movq -0x1a0(%rbp), %rdi
movq -0xf0(%rbp), %rsi
movq -0xe8(%rbp), %rdx
leaq -0x118(%rbp), %rcx
callq 0x13910
jmp 0xb8d1
leaq -0x118(%rbp), %rdi
callq 0x13210
movq -0xc8(%rbp), %rax
movq %rax, -0x1b8(%rbp)
leaq -0x150(%rbp), %rdi
movq %rdi, -0x1b0(%rbp)
leaq -0xe0(%rbp), %rsi
callq 0x13110
movq -0x1b8(%rbp), %rsi
movq -0x1b0(%rbp), %rdx
leaq -0x140(%rbp), %rdi
callq 0xadb0
jmp 0xb921
leaq -0x140(%rbp), %rdi
callq 0x13210
leaq -0x150(%rbp), %rdi
callq 0x13230
leaq -0xe0(%rbp), %rdi
callq 0x13230
movq -0xd0(%rbp), %rax
addq $0x1, %rax
movq %rax, -0xd0(%rbp)
jmp 0xb84d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xb97f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x60(%rbp), %rdi
callq 0x13210
leaq -0x70(%rbp), %rdi
callq 0x13230
jmp 0xba2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xb9b3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0xb0(%rbp), %rdi
callq 0x13210
leaq -0xc0(%rbp), %rdi
callq 0x13230
jmp 0xba2b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
jmp 0xba01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x13210
jmp 0xba01
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x78(%rbp)
movl %eax, -0x7c(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x13230
leaq -0xe0(%rbp), %rdi
callq 0x13230
jmp 0xba2b
movq -0x178(%rbp), %rdi
callq 0x13960
movq -0x170(%rbp), %rax
addq $0x1c0, %rsp            # imm = 0x1C0
popq %rbp
retq
movq -0x78(%rbp), %rdi
callq 0xa650
nopw %cs:(%rax,%rax)