// File: /workspace/github_cpp_makefile_star2_O1/Falldog[P]dcinja/src/include/inja/inja.hpp
// Function: inja::Lexer::scan_body(std::basic_string_view<char, std::char_traits<char>>, inja::Token::Kind, std::basic_string_view<char, std::char_traits<char>>, bool)
Token scan_body(nonstd::string_view close, Token::Kind closeKind, nonstd::string_view close_trim = nonstd::string_view(), bool trim = false) {
  again:
    // skip whitespace (except for \n as it might be a close)
    if (tok_start >= m_in.size()) {
      return make_token(Token::Kind::Eof);
    }
    char ch = m_in[tok_start];
    if (ch == ' ' || ch == '\t' || ch == '\r') {
      tok_start += 1;
      goto again;
    }

    // check for close
    if (!close_trim.empty() && inja::string_view::starts_with(m_in.substr(tok_start), close_trim)) {
      state = State::Text;
      pos = tok_start + close_trim.size();
      Token tok = make_token(closeKind);
      skip_whitespaces_and_newlines();
      return tok;
    }

    if (inja::string_view::starts_with(m_in.substr(tok_start), close)) {
      state = State::Text;
      pos = tok_start + close.size();
      Token tok = make_token(closeKind);
      if (trim) {
        skip_whitespaces_and_first_newline();
      }
      return tok;
    }

    // skip \n
    if (ch == '\n') {
      tok_start += 1;
      goto again;
    }

    pos = tok_start + 1;
    if (std::isalpha(ch)) {
      minus_state = MinusState::Operator;
      return scan_id();
    }

    MinusState current_minus_state = minus_state;
    if (minus_state == MinusState::Operator) {
      minus_state = MinusState::Number;
    }

    switch (ch) {
    case '+':
      return make_token(Token::Kind::Plus);
    case '-':
      if (current_minus_state == MinusState::Operator) {
        return make_token(Token::Kind::Minus);
      }
      return scan_number();
    case '*':
      return make_token(Token::Kind::Times);
    case '/':
      return make_token(Token::Kind::Slash);
    case '^':
      return make_token(Token::Kind::Power);
    case '%':
      return make_token(Token::Kind::Percent);
    case '.':
      return make_token(Token::Kind::Dot);
    case ',':
      return make_token(Token::Kind::Comma);
    case ':':
      return make_token(Token::Kind::Colon);
    case '(':
      return make_token(Token::Kind::LeftParen);
    case ')':
      minus_state = MinusState::Operator;
      return make_token(Token::Kind::RightParen);
    case '[':
      return make_token(Token::Kind::LeftBracket);
    case ']':
      minus_state = MinusState::Operator;
      return make_token(Token::Kind::RightBracket);
    case '{':
      return make_token(Token::Kind::LeftBrace);
    case '}':
      minus_state = MinusState::Operator;
      return make_token(Token::Kind::RightBrace);
    case '>':
      if (pos < m_in.size() && m_in[pos] == '=') {
        pos += 1;
        return make_token(Token::Kind::GreaterEqual);
      }
      return make_token(Token::Kind::GreaterThan);
    case '<':
      if (pos < m_in.size() && m_in[pos] == '=') {
        pos += 1;
        return make_token(Token::Kind::LessEqual);
      }
      return make_token(Token::Kind::LessThan);
    case '=':
      if (pos < m_in.size() && m_in[pos] == '=') {
        pos += 1;
        return make_token(Token::Kind::Equal);
      }
      return make_token(Token::Kind::Unknown);
    case '!':
      if (pos < m_in.size() && m_in[pos] == '=') {
        pos += 1;
        return make_token(Token::Kind::NotEqual);
      }
      return make_token(Token::Kind::Unknown);
    case '\"':
      return scan_string();
    case '0':
    case '1':
    case '2':
    case '3':
    case '4':
    case '5':
    case '6':
    case '7':
    case '8':
    case '9':
      minus_state = MinusState::Operator;
      return scan_number();
    case '_':
      minus_state = MinusState::Operator;
      return scan_id();
    default:
      return make_token(Token::Kind::Unknown);
    }
  }

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rcx, %rbx
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, (%rsp)
movq 0x10(%rsi), %rcx
movq 0x20(%rsi), %rdx
cmpq %rcx, %rdx
jae 0x1f482
movl %r9d, 0xc(%rsp)
movl %r8d, 0x8(%rsp)
leaq 0x60(%rsp), %rax
movq (%rax), %r12
movq 0x8(%rax), %rax
movq %rax, 0x20(%rsp)
movabsq $0x100002200, %rbp      # imm = 0x100002200
movq 0x18(%r14), %rax
movzbl (%rax,%rdx), %r15d
cmpq $0x20, %r15
ja 0x1f3de
btq %r15, %rbp
jb 0x1f46e
testq %r12, %r12
je 0x1f420
movq %rcx, %rsi
subq %rdx, %rsi
jb 0x1fbaf
addq %rdx, %rax
movq %rsi, 0x10(%rsp)
movq %rax, 0x18(%rsp)
cmpq %r12, %rsi
jb 0x1f420
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movq %r12, %rdx
movq %r12, %rcx
movq 0x20(%rsp), %r8
callq 0x1ec56
testl %eax, %eax
je 0x1f599
movq 0x10(%r14), %rcx
movq 0x20(%r14), %rdx
movq %rcx, %rax
subq %rdx, %rax
jb 0x1fbaf
addq 0x18(%r14), %rdx
movq %rax, 0x10(%rsp)
movq %rdx, 0x18(%rsp)
cmpq %r13, %rax
jb 0x1f464
leaq 0x10(%rsp), %rdi
xorl %esi, %esi
movq %r13, %rdx
movq %r13, %rcx
movq %rbx, %r8
callq 0x1ec56
testl %eax, %eax
je 0x1f4e5
cmpb $0xa, %r15b
jne 0x1f4af
movq 0x20(%r14), %rdx
incq %rdx
movq %rdx, 0x20(%r14)
movq 0x10(%r14), %rcx
cmpq %rcx, %rdx
jb 0x1f3c5
addq 0x18(%r14), %rcx
movq (%rsp), %r15
movl $0x22, (%r15)
movq $0x0, 0x8(%r15)
movq %rcx, 0x10(%r15)
movq %r15, %rax
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movsbl %r15b, %edi
movq 0x20(%r14), %rbx
leaq 0x1(%rbx), %r12
movq %r12, 0x28(%r14)
callq 0x96e0
testl %eax, %eax
je 0x1f54d
movl $0x0, 0xc(%r14)
movq (%rsp), %r15
movq %r15, %rdi
movq %r14, %rsi
callq 0x1fcc2
jmp 0x1f49d
movl $0x0, 0x8(%r14)
movq 0x10(%r14), %rax
movq 0x20(%r14), %rcx
addq %rcx, %r13
movq %r13, 0x28(%r14)
cmpq %rcx, %rax
cmovbq %rax, %rcx
cmpq %r13, %rcx
cmovaq %rcx, %r13
cmpq %rax, %r13
cmovaeq %rax, %r13
subq %rcx, %r13
subq %rcx, %rax
cmpq %r13, %rax
cmovaeq %r13, %rax
addq 0x18(%r14), %rcx
movq (%rsp), %r15
movl 0x8(%rsp), %edx
movl %edx, (%r15)
movq %rax, 0x8(%r15)
movq %rcx, 0x10(%r15)
cmpb $0x0, 0xc(%rsp)
je 0x1f49d
movq %r14, %rdi
callq 0x1fbc4
jmp 0x1f49d
movl 0xc(%r14), %eax
testl %eax, %eax
jne 0x1f55d
movl $0x1, 0xc(%r14)
movzbl %r15b, %ecx
leal -0x21(%rcx), %edx
cmpl $0x3e, %edx
ja 0x1f645
leaq 0x35d08(%rip), %rcx     # 0x5527c
movslq (%rcx,%rdx,4), %rdx
addq %rcx, %rdx
movq (%rsp), %r15
jmpq *%rdx
movl $0x0, 0xc(%r14)
movq %r15, %rdi
movq %r14, %rsi
callq 0x1fd74
jmp 0x1f49d
movl $0x0, 0x8(%r14)
movq 0x20(%r14), %rdx
leaq (%rdx,%r12), %rsi
movq %rsi, 0x28(%r14)
movq 0x10(%r14), %rax
cmpq %rdx, %rax
movq %rdx, %rdi
cmovbq %rax, %rdi
cmpq %rsi, %rdi
movq %rsi, %r8
cmovaq %rdi, %r8
cmpq %rax, %r8
cmovaeq %rax, %r8
movq 0x18(%r14), %rcx
subq %rdi, %r8
movq %rax, %r9
subq %rdi, %r9
cmpq %r8, %r9
cmovaeq %r8, %r9
addq %rcx, %rdi
movq (%rsp), %r15
movl 0x8(%rsp), %r8d
movl %r8d, (%r15)
movq %r9, 0x8(%r15)
movq %rdi, 0x10(%r15)
cmpq %rax, %rsi
jae 0x1f49d
negq %rax
addq %r12, %rdx
incq %rdx
movabsq $0x100002600, %rsi      # imm = 0x100002600
movzbl -0x1(%rcx,%rdx), %edi
cmpq $0x20, %rdi
ja 0x1f49d
btq %rdi, %rsi
jae 0x1f49d
movq %rdx, 0x28(%r14)
leaq (%rax,%rdx), %rdi
incq %rdi
incq %rdx
cmpq $0x1, %rdi
jne 0x1f613
jmp 0x1f49d
cmpl $0x7b, %ecx
movq (%rsp), %r15
je 0x1fb13
cmpl $0x7d, %ecx
jne 0x1f695
movl $0x0, 0xc(%r14)
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x1a, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
jmp 0x1f8f4
movq 0x10(%r14), %rax
cmpq %rax, %r12
jae 0x1fb46
movq 0x18(%r14), %rcx
cmpb $0x3d, (%rcx,%r12)
jne 0x1fb46
leaq 0x2(%rbx), %rcx
movq %rcx, 0x28(%r14)
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %rcx, %rbx
cmovaq %rbx, %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
subq %rbx, %rcx
subq %rbx, %rax
cmpq %rcx, %rax
cmovaeq %rcx, %rax
addq 0x18(%r14), %rbx
movl $0x20, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x14, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0xf, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x10, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rax, %r12
jae 0x1f8f4
movq 0x18(%r14), %rcx
cmpb $0x3d, (%rcx,%r12)
jne 0x1f8f4
leaq 0x2(%rbx), %rcx
movq %rcx, 0x28(%r14)
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %rcx, %rbx
cmovaq %rbx, %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
subq %rbx, %rcx
subq %rbx, %rax
cmpq %rcx, %rax
cmovaeq %rcx, %rax
addq 0x18(%r14), %rbx
movl $0x1b, (%r15)
jmp 0x1fba2
movq %r15, %rdi
movq %r14, %rsi
callq 0x1fe14
jmp 0x1f49d
testl %eax, %eax
jne 0x1f589
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0xd, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x12, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x11, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rax, %r12
jae 0x1f8f4
movq 0x18(%r14), %rcx
cmpb $0x3d, (%rcx,%r12)
jne 0x1f8f4
leaq 0x2(%rbx), %rcx
movq %rcx, 0x28(%r14)
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %rcx, %rbx
cmovaq %rbx, %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
subq %rbx, %rcx
subq %rbx, %rax
cmpq %rcx, %rax
cmovaeq %rcx, %rax
addq 0x18(%r14), %rbx
movl $0x1c, (%r15)
jmp 0x1fba2
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x21, (%r15)
jmp 0x1fba2
movl $0x0, 0xc(%r14)
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x16, (%r15)
jmp 0x1fba2
movl $0x0, 0xc(%r14)
jmp 0x1f4d8
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x15, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0xe, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0xc, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x17, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x13, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rax, %r12
jae 0x1fb75
movq 0x18(%r14), %rcx
cmpb $0x3d, (%rcx,%r12)
jne 0x1fb75
leaq 0x2(%rbx), %rcx
movq %rcx, 0x28(%r14)
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %rcx, %rbx
cmovaq %rbx, %rcx
cmpq %rax, %rcx
cmovaeq %rax, %rcx
subq %rbx, %rcx
subq %rbx, %rax
cmpq %rcx, %rax
cmovaeq %rcx, %rax
addq 0x18(%r14), %rbx
movl $0x1e, (%r15)
jmp 0x1fba2
movl $0x0, 0xc(%r14)
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x18, (%r15)
jmp 0x1fba2
movq 0x10(%r14), %rax
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x19, (%r15)
jmp 0x1fba2
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x1f, (%r15)
jmp 0x1fba2
cmpq %rbx, %rax
cmovbq %rax, %rbx
cmpq %r12, %rbx
cmovaq %rbx, %r12
cmpq %rax, %r12
cmovaeq %rax, %r12
subq %rbx, %r12
subq %rbx, %rax
cmpq %r12, %rax
cmovaeq %r12, %rax
addq 0x18(%r14), %rbx
movl $0x1d, (%r15)
movq %rax, 0x8(%r15)
movq %rbx, 0x10(%r15)
jmp 0x1f49d
leaq 0x36fbd(%rip), %rdi     # 0x56b73
leaq 0x36f9c(%rip), %rsi     # 0x56b59
xorl %eax, %eax
callq 0x9670