// File: /workspace/github_cpp_makefile_star2_O3/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: ForStatement::output(Parser*, std::shared_ptr<FunctionToken> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void ForStatement::output(Parser *parser,
                          const std::shared_ptr<FunctionToken>& function,
                          const std::string& returnLabel,
                          const std::string&,
                          const std::string&) {
  // Evaluate the initial expressions and discard the result.
  for (auto expr : _initExprs) {
    expr->output(parser, VarLocation("L"));
  }
  // Create the start, break, and continue labels.
  std::string startLabel =
    parser->getUnusedLabel(function->name() + "_for_start");
  std::string breakLabel =
    parser->getUnusedLabel(function->name() + "_for_break");
  std::string continueLabel =
    parser->getUnusedLabel(function->name() + "_for_continue");
  // Output the start label and test the condition.
  parser->writeln(startLabel + ":");
  _condExpr->output(parser, VarLocation("L"));
  parser->writeInst("TST L L");
  parser->writeInst("JEQ " + breakLabel);
  // Output the function body followed by the continue label.
  _body->output(parser, function, returnLabel, breakLabel, continueLabel);
  parser->writeln(continueLabel + ":");
  // Output the loop expressions and jump to the start of the loop.
  for (auto expr : _loopExprs) {
    expr->output(parser, VarLocation("L"));
  }
  parser->writeInst("JMPI " + startLabel);
  // Output the break label.
  parser->writeln(breakLabel + ":");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xc8, %rsp
movq %rcx, 0xb0(%rsp)
movq %rdx, 0xc0(%rsp)
movq %rsi, 0x28(%rsp)
movq 0x30(%rdi), %r15
movq %rdi, 0xb8(%rsp)
movq 0x38(%rdi), %r12
cmpq %r12, %r15
je 0x20263
leaq 0x10(%rsp), %rbp
movq %rsp, %r14
movq (%r15), %rbx
movq 0x8(%r15), %r13
testq %r13, %r13
je 0x201cc
movq 0x26ddc(%rip), %rax     # 0x46f98
cmpb $0x0, (%rax)
je 0x201c7
incl 0x8(%r13)
jmp 0x201cc
lock
incl 0x8(%r13)
leaq 0x60(%rsp), %rax
movq %rax, 0x50(%rsp)
leaq 0x50(%rsp), %rdi
leaq 0x158f6(%rip), %rsi     # 0x35ad8
leaq 0x158f0(%rip), %rdx     # 0x35ad9
callq 0xbdee
movq %rbp, (%rsp)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
movq %r14, %rdi
callq 0xbd58
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq %r14, %rdx
callq 0x153ca
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x2022d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x20249
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x72c0
testq %r13, %r13
je 0x20256
movq %r13, %rdi
callq 0x8036
addq $0x10, %r15
cmpq %r12, %r15
jne 0x201a9
movq 0xc0(%rsp), %r12
movq (%r12), %rax
leaq 0xa0(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
leaq 0x90(%rsp), %rbx
movq %rbx, %rdi
callq 0xbd58
leaq 0x15c4b(%rip), %rsi     # 0x35ee8
movq %rbx, %rdi
callq 0x7560
leaq 0x10(%rsp), %r15
movq %r15, -0x10(%r15)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x202cb
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x202d2
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rsi
movq %rsp, %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x50(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xa73a
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x20311
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x2032e
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x72c0
movq (%r12), %rax
leaq 0x80(%rsp), %rbx
movq %rbx, -0x10(%rbx)
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
leaq 0x70(%rsp), %rdi
callq 0xbd58
movq 0xb8(%rsp), %r14
leaq 0x15b91(%rip), %rsi     # 0x35ef3
leaq 0x70(%rsp), %rdi
callq 0x7560
movq %r15, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x2038d
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x20394
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rsi
movq %rsp, %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x90(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xa73a
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x203d6
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x70(%rsp), %rdi
cmpq %rbx, %rdi
je 0x203f0
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x72c0
movq (%r12), %rax
leaq 0x40(%rsp), %rcx
movq %rcx, -0x10(%rcx)
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %rdi
callq 0xbd58
leaq 0x15ae5(%rip), %rsi     # 0x35efe
leaq 0x30(%rsp), %rdi
callq 0x7560
movq %r15, (%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x20444
movq %rdx, (%rsp)
movq (%rcx), %rdx
movq %rdx, 0x10(%rsp)
jmp 0x2044b
movups (%rcx), %xmm0
movups %xmm0, (%r15)
movq 0x8(%rax), %rsi
movq %rsp, %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x70(%rsp), %rdi
movq 0x28(%rsp), %rsi
callq 0xa73a
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2048a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x204a6
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rsp, %rdi
movq %r15, (%rdi)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
callq 0xbd58
leaq 0x171ab(%rip), %rsi     # 0x37670
movq %rsp, %rdi
callq 0x7560
movq %rsp, %rsi
movq 0x28(%rsp), %rdi
callq 0xaff2
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x204f0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x10(%r14), %rbx
leaq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
movq %rax, (%rdi)
leaq 0x155d0(%rip), %rsi     # 0x35ad8
leaq 0x155ca(%rip), %rdx     # 0x35ad9
callq 0xbdee
movq %rsp, %rdi
movq %r15, (%rdi)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
callq 0xbd58
movq %rsp, %rdx
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
callq 0x153ca
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x20552
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2056e
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rsp, %rdi
movq %r15, (%rdi)
leaq 0x15965(%rip), %rsi     # 0x35ee0
leaq 0x15965(%rip), %rdx     # 0x35ee7
callq 0xbdee
movq %rsp, %rsi
movq 0x28(%rsp), %rdi
callq 0xab5a
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x205aa
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x15282(%rip), %rsi     # 0x35833
movq %rsp, %rdi
leaq 0x90(%rsp), %rdx
callq 0xb692
movq %rsp, %rsi
movq 0x28(%rsp), %rdi
callq 0xab5a
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x205e4
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x20(%r14), %rdi
movq (%rdi), %rax
leaq 0x90(%rsp), %r8
leaq 0x70(%rsp), %r9
movq 0x28(%rsp), %rsi
movq %r12, %rdx
movq 0xb0(%rsp), %rcx
callq *0x8(%rax)
movq %rsp, %rdi
movq %r15, (%rdi)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
callq 0xbd58
leaq 0x17046(%rip), %rsi     # 0x37670
movq %rsp, %rdi
callq 0x7560
movq %rsp, %rsi
movq 0x28(%rsp), %rdi
callq 0xaff2
movq (%rsp), %rdi
movq %r15, %r13
cmpq %r15, %rdi
je 0x20658
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x48(%r14), %r15
movq 0x50(%r14), %r12
cmpq %r12, %r15
je 0x20726
movq %rsp, %rbp
movq (%r15), %rbx
movq 0x8(%r15), %r14
testq %r14, %r14
je 0x2068f
movq 0x26919(%rip), %rax     # 0x46f98
cmpb $0x0, (%rax)
je 0x2068a
incl 0x8(%r14)
jmp 0x2068f
lock
incl 0x8(%r14)
leaq 0x40(%rsp), %rax
movq %rax, 0x30(%rsp)
leaq 0x30(%rsp), %rdi
leaq 0x15433(%rip), %rsi     # 0x35ad8
leaq 0x1542d(%rip), %rdx     # 0x35ad9
callq 0xbdee
movq %r13, (%rsp)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
movq %rbp, %rdi
callq 0xbd58
movq %rbx, %rdi
movq 0x28(%rsp), %rsi
movq %rbp, %rdx
callq 0x153ca
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x206f0
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x2070c
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
testq %r14, %r14
je 0x20719
movq %r14, %rdi
callq 0x8036
addq $0x10, %r15
cmpq %r12, %r15
jne 0x2066c
leaq 0x149f8(%rip), %rsi     # 0x35125
movq %rsp, %rdi
leaq 0x50(%rsp), %rdx
callq 0xb692
movq %rsp, %rsi
movq 0x28(%rsp), %rdi
leaq 0xa0(%rsp), %rbx
leaq 0x80(%rsp), %r14
callq 0xab5a
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2076d
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rsp, %rdi
movq %r13, (%rdi)
movq 0x90(%rsp), %rsi
movq 0x98(%rsp), %rdx
addq %rsi, %rdx
callq 0xbd58
leaq 0x16ede(%rip), %rsi     # 0x37670
movq %rsp, %rdi
callq 0x7560
movq %rsp, %rsi
movq 0x28(%rsp), %rdi
callq 0xaff2
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x207bd
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x207d7
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x90(%rsp), %rdi
cmpq %rbx, %rdi
je 0x207f4
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x2080f
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x72c0
addq $0xc8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x2082a
jmp 0x2082a
jmp 0x208ab
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
jne 0x20899
jmp 0x209c5
jmp 0x208ab
jmp 0x20889
jmp 0x20889
jmp 0x208ab
jmp 0x208ab
jmp 0x20889
jmp 0x208ab
jmp 0x20889
jmp 0x208ab
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2086b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x2086b
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x209c5
movq 0x40(%rsp), %rsi
jmp 0x2089e
jmp 0x208ab
jmp 0x20889
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x209c5
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x209c5
movq %rax, %rbx
jmp 0x209c5
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x208d1
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x208d1
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x209e7
movq 0x40(%rsp), %rsi
jmp 0x209df
movq %rax, %rbx
jmp 0x209e7
movq %rbx, %r14
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2091a
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x2091a
movq %rbx, %r14
movq %rax, %rbx
movq 0x70(%rsp), %rdi
cmpq %r14, %rdi
je 0x20a0c
movq 0x80(%rsp), %rsi
jmp 0x20a04
movq %rax, %rbx
jmp 0x20a0c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r15, %rdi
je 0x2095b
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x2095b
movq %rax, %rbx
movq 0x90(%rsp), %rdi
cmpq %r14, %rdi
je 0x20a75
movq 0xa0(%rsp), %rsi
jmp 0x20a1f
movq %rax, %rbx
jmp 0x209b8
movq %rax, %rbx
jmp 0x2099c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %r13, %rdi
je 0x2099c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x209b8
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
testq %r14, %r14
je 0x209c5
movq %r14, %rdi
callq 0x8036
movq 0x70(%rsp), %rdi
leaq 0x80(%rsp), %rax
cmpq %rax, %rdi
je 0x209e7
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x90(%rsp), %rdi
leaq 0xa0(%rsp), %rax
cmpq %rax, %rdi
je 0x20a0c
movq 0xa0(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x60(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20a75
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x20a75
movq %rax, %rbx
jmp 0x20a68
movq %rax, %rbx
jmp 0x20a4c
movq %rax, %rbx
movq (%rsp), %rdi
cmpq %rbp, %rdi
je 0x20a4c
movq 0x10(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x50(%rsp), %rdi
leaq 0x60(%rsp), %rax
cmpq %rax, %rdi
je 0x20a68
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x72c0
testq %r13, %r13
je 0x20a75
movq %r13, %rdi
callq 0x8036
movq %rbx, %rdi
callq 0x74f0
nop