// File: /workspace/github_cpp_makefile_star2_O1/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 0x41507
movq %rdx, %r12
movq %rsi, %r13
movq 0x68(%rdx), %rsi
callq 0x35a14
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 0x12a60
cmpb $0x1, 0x1d4(%rbx)
jne 0x413b3
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 0x3604a
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 0x4167c
movq %rbx, %rax
addq $0x30, %rsp
jmp 0x414f8
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 0x4153e
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 0x419d0
addq $0x30, %rsp
leaq -0x90(%rbp), %rdi
callq 0x41626
movq -0x40(%rbp), %rax
movq 0xc0(%rax), %r15
movq 0xc8(%rax), %r13
cmpq %r13, %r15
je 0x414db
movq 0x1eafd(%rip), %rbx     # 0x5ff70
movq (%r15), %rdi
movq 0x8(%r15), %r14
testq %r14, %r14
je 0x4148a
cmpb $0x0, (%rbx)
je 0x414a6
incl 0x8(%r14)
jmp 0x414ab
movq -0x40(%rbp), %rax
movq %rax, 0xd8(%rdi)
addq $0xe0, %rdi
movq %r12, %rsi
callq 0x2d4ea
jmp 0x414d2
lock
incl 0x8(%r14)
movq -0x40(%rbp), %rax
movq %rax, 0xd8(%rdi)
addq $0xe0, %rdi
movq %r12, %rsi
callq 0x2d4ea
testq %r14, %r14
je 0x414d2
movq %r14, %rdi
callq 0x13612
addq $0x10, %r15
cmpq %r13, %r15
jne 0x41473
movq -0x40(%rbp), %rcx
movq -0x48(%rbp), %rax
movq %rcx, (%rax)
xorl %edx, %edx
movq %rdx, 0x8(%rax)
movq -0x38(%rbp), %rcx
movq %rdx, -0x38(%rbp)
movq %rcx, 0x8(%rax)
addq $0x78, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x3815(%rip), %rdi      # 0x44d23
leaq 0x31a0(%rip), %rsi      # 0x446b5
leaq 0x380a(%rip), %rcx      # 0x44d26
movl $0xa05, %edx            # imm = 0xA05
callq 0x91b0
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x41626
movq %rbx, %rdi
callq 0x9420
nop