// File: /workspace/github_cpp_makefile_star2_O2/yhirose[P]fizzbuzzlang/./peglib.h
// Function: void peg::add_ast_action<peg::AstBase<peg::EmptyType>>(peg::Definition&)::'lambda'(peg::SemanticValues const&)::operator()(peg::SemanticValues const&) const
void add_ast_action(Definition &rule) {
  rule.action = [&](const SemanticValues &vs) {
    auto line = vs.line_info();

    if (rule.is_token()) {
      return std::make_shared<T>(
          vs.path, line.first, line.second, rule.name.data(), vs.token(),
          std::distance(vs.ss, vs.sv().data()), vs.sv().length(),
          vs.choice_count(), vs.choice());
    }

    auto ast =
        std::make_shared<T>(vs.path, line.first, line.second, rule.name.data(),
                            vs.transform<std::shared_ptr<T>>(),
                            std::distance(vs.ss, vs.sv().data()),
                            vs.sv().length(), vs.choice_count(), vs.choice());

    for (auto node : ast->nodes) {
      node->parent = ast;
    }
    return ast;
  };
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x68, %rsp
movq %rdx, %r15
movq %rsi, %r13
movq %rdi, %r12
movq %rdx, %rdi
callq 0x2a938
leaq -0x80(%rbp), %r14
movq %rax, -0x8(%r14)
movq %rdx, (%r14)
movq (%r13), %rdi
callq 0x10200
testb %al, %al
je 0x364d5
leaq 0x18(%r15), %rax
movq %rax, -0x30(%rbp)
movq (%r13), %rax
movq (%rax), %rax
leaq -0x58(%rbp), %r13
movq %rax, (%r13)
movq %r15, %rdi
xorl %esi, %esi
callq 0x2b062
leaq -0x48(%rbp), %r9
movq %rax, (%r9)
movq %rdx, 0x8(%r9)
movq 0x60(%r15), %rax
movq 0x68(%r15), %rcx
subq 0x20(%r15), %rcx
leaq -0x78(%rbp), %r10
movq %rcx, (%r10)
leaq -0x70(%rbp), %r11
movq %rax, (%r11)
movq 0x70(%r15), %rax
leaq -0x68(%rbp), %rbx
movq %rax, (%rbx)
movq 0x78(%r15), %rax
leaq -0x60(%rbp), %r15
movq %rax, (%r15)
leaq -0x88(%rbp), %rdx
movq %r12, %rdi
movq -0x30(%rbp), %rsi
movq %r14, %rcx
movq %r13, %r8
pushq %r15
pushq %rbx
pushq %r11
pushq %r10
callq 0x36615
addq $0x20, %rsp
jmp 0x365d2
movq %r12, -0x30(%rbp)
movq (%r13), %rax
movq (%rax), %rax
leaq -0x78(%rbp), %r12
movq %rax, (%r12)
leaq -0x48(%rbp), %r13
pushq $-0x1
popq %rcx
movq %r13, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x3669e
movq 0x68(%r15), %rax
subq 0x20(%r15), %rax
movq 0x60(%r15), %rcx
leaq 0x18(%r15), %rsi
leaq -0x70(%rbp), %r10
movq %rax, (%r10)
leaq -0x68(%rbp), %rax
movq %rcx, (%rax)
movq 0x70(%r15), %rcx
leaq -0x60(%rbp), %r11
movq %rcx, (%r11)
movq 0x78(%r15), %rcx
leaq -0x90(%rbp), %rbx
movq %rcx, (%rbx)
leaq -0x58(%rbp), %rdi
leaq -0x88(%rbp), %rdx
movq %r14, %rcx
movq %r12, %r8
movq %r13, %r9
pushq %rbx
pushq %r11
pushq %rax
pushq %r10
callq 0x36659
addq $0x20, %rsp
leaq -0x48(%rbp), %rdi
callq 0x36748
leaq -0x58(%rbp), %r15
movq (%r15), %rax
movq 0xc0(%rax), %r12
movq 0xc8(%rax), %rbx
leaq -0x40(%rbp), %r13
movl $0xd8, %r14d
cmpq %rbx, %r12
je 0x365ac
leaq -0x48(%rbp), %rdi
movq %r12, %rsi
callq 0x30710
movq -0x48(%rbp), %rdi
addq %r14, %rdi
movq %r15, %rsi
callq 0x37232
movq %r13, %rdi
callq 0x1106c
addq $0x10, %r12
jmp 0x3657e
leaq -0x50(%rbp), %rdi
movq -0x8(%rdi), %rax
movq -0x30(%rbp), %r12
movq %rax, (%r12)
movq (%rdi), %rax
andq $0x0, (%rdi)
movq %rax, 0x8(%r12)
andq $0x0, -0x8(%rdi)
callq 0x1106c
movq %r12, %rax
addq $0x68, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x48(%rbp), %rdi
callq 0x36748
movq %rbx, %rdi
callq 0x9430