// File: /workspace/github_cpp_makefile_star2_O3/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 $0x78, %rsp
movq %rdi, -0x48(%rbp)
movq 0x58(%rdx), %rdi
testq %rdi, %rdi
je 0x3f3b8
movq %rdx, %r12
movq %rsi, %r13
movq 0x68(%rdx), %rsi
callq 0x33ad2
leaq -0x98(%rbp), %r15
movq %rax, -0x8(%r15)
movq %rdx, (%r15)
movq (%r13), %rbx
leaq 0x1d0(%rbx), %rdi
leaq -0x90(%rbp), %r14
movq %rbx, (%r14)
movq %r14, %rsi
callq 0x11842
cmpb $0x1, 0x1d4(%rbx)
jne 0x3f273
leaq 0x18(%r12), %rax
movq %rax, -0x58(%rbp)
movq (%r13), %rax
movq (%rax), %rax
leaq -0x40(%rbp), %rcx
movq %rax, (%rcx)
movq %r12, %rdi
xorl %esi, %esi
callq 0x340f2
movq %rax, -0x90(%rbp)
movq %rdx, -0x88(%rbp)
movq 0x60(%r12), %rax
movq 0x68(%r12), %rcx
subq 0x20(%r12), %rcx
leaq -0x50(%rbp), %r10
movq %rcx, (%r10)
leaq -0x78(%rbp), %r11
movq %rax, (%r11)
movq 0x70(%r12), %rax
leaq -0x70(%rbp), %r13
movq %rax, (%r13)
movq 0x78(%r12), %rax
leaq -0x68(%rbp), %r12
movq %rax, (%r12)
movq -0x48(%rbp), %rbx
movq $0x0, (%rbx)
leaq 0x8(%rbx), %rdi
leaq -0x60(%rbp), %rdx
leaq -0xa0(%rbp), %r8
movq %rbx, %rsi
movq -0x58(%rbp), %rcx
movq %r15, %r9
pushq %r12
pushq %r13
pushq %r11
pushq %r10
pushq %r14
leaq -0x40(%rbp), %rax
pushq %rax
callq 0x3f532
movq %rbx, %rax
addq $0x30, %rsp
jmp 0x3f3a9
movq (%r13), %rax
movq (%rax), %rax
leaq -0x50(%rbp), %rcx
movq %rax, (%rcx)
movq %r14, %rdi
movq %r12, %rsi
xorl %edx, %edx
movq $-0x1, %rcx
callq 0x3f3ee
movq 0x60(%r12), %rax
movq 0x68(%r12), %rdx
subq 0x20(%r12), %rdx
leaq 0x18(%r12), %rcx
leaq -0x78(%rbp), %r10
movq %rdx, (%r10)
leaq -0x70(%rbp), %r11
movq %rax, (%r11)
movq 0x70(%r12), %rax
leaq -0x68(%rbp), %r13
movq %rax, (%r13)
movq 0x78(%r12), %rax
leaq -0x60(%rbp), %rbx
movq %rax, (%rbx)
leaq -0x38(%rbp), %r12
movq $0x0, -0x8(%r12)
leaq -0x40(%rbp), %rsi
leaq -0x29(%rbp), %rdx
leaq -0xa0(%rbp), %r8
movq %r12, %rdi
movq %r15, %r9
pushq %rbx
pushq %r13
pushq %r11
pushq %r10
pushq %r14
leaq -0x50(%rbp), %rax
pushq %rax
callq 0x3f876
addq $0x30, %rsp
leaq -0x90(%rbp), %rdi
callq 0x3f4d6
movq -0x40(%rbp), %rcx
movq 0xc0(%rcx), %r15
movq 0xc8(%rcx), %r13
cmpq %r13, %r15
je 0x3f39a
movq 0x1ec3d(%rip), %rbx     # 0x5df70
movq (%r15), %rdi
movq 0x8(%r15), %r14
testq %r14, %r14
je 0x3f34a
cmpb $0x0, (%rbx)
je 0x3f366
incl 0x8(%r14)
jmp 0x3f36b
movq -0x40(%rbp), %rax
movq %rax, 0xd8(%rdi)
addq $0xe0, %rdi
movq %r12, %rsi
callq 0x2b902
jmp 0x3f38d
lock
incl 0x8(%r14)
movq -0x40(%rbp), %rax
movq %rax, 0xd8(%rdi)
addq $0xe0, %rdi
movq %r12, %rsi
callq 0x2b902
movq %r14, %rdi
callq 0x123fc
addq $0x10, %r15
cmpq %r13, %r15
jne 0x3f333
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
movq -0x38(%rbp), %rcx
movq %rcx, 0x8(%rax)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3964(%rip), %rdi      # 0x42d23
leaq 0x32ef(%rip), %rsi      # 0x426b5
leaq 0x3959(%rip), %rcx      # 0x42d26
movl $0xa05, %edx            # imm = 0xA05
callq 0x81b0
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x3f4d6
movq %rbx, %rdi
callq 0x8420