// File: /workspace/github_cpp_makefile_star2_O3/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: WhileStatement::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 WhileStatement::output(Parser *parser,
                            const std::shared_ptr<FunctionToken>& function,
                            const std::string& returnLabel,
                            const std::string&,
                            const std::string&) {
  // Create the break and continue labels.
  std::string breakLabel =
    parser->getUnusedLabel(function->name() + "_while_break");
  std::string continueLabel =
    parser->getUnusedLabel(function->name() + "_while_continue");
  // Output the continue label and test the condition.
  parser->writeln(continueLabel + ":");
  _condExpr->output(parser, VarLocation("L"));
  parser->writeInst("TST L L");
  parser->writeInst("JEQ " + breakLabel);
  // Output the loop body and then jump to the start again.
  _body->output(parser, function, returnLabel, breakLabel, continueLabel);
  parser->writeInst("JMPI " + continueLabel);
  // Output the break label.
  parser->writeln(breakLabel + ":");
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x98, %rsp
movq %rcx, 0x90(%rsp)
movq %rdx, %r15
movq %rsi, %rbx
movq %rdi, %r12
movq (%rdx), %rax
leaq 0x40(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
leaq 0x30(%rsp), %r13
movq %r13, %rdi
callq 0xbd58
leaq 0x15444(%rip), %rsi     # 0x35f0f
movq %r13, %rdi
callq 0x7560
leaq 0x18(%rsp), %rbp
movq %rbp, -0x10(%rbp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x20afa
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x20b01
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rsi
leaq 0x8(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x70(%rsp), %rdi
movq %rbx, %rsi
callq 0xa73a
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20b41
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x20b58
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
movq (%r15), %rax
leaq 0x60(%rsp), %r14
movq %r14, -0x10(%r14)
movq 0x58(%rax), %rsi
movq 0x60(%rax), %rdx
addq %rsi, %rdx
leaq 0x50(%rsp), %rdi
callq 0xbd58
leaq 0x1539f(%rip), %rsi     # 0x35f1f
leaq 0x50(%rsp), %rdi
callq 0x7560
movq %rbp, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x20bad
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x20bb4
movups (%rcx), %xmm0
movups %xmm0, (%rbp)
movq 0x8(%rax), %rsi
leaq 0x8(%rsp), %rdx
movq %rsi, 0x8(%rdx)
movq %rcx, (%rax)
movq $0x0, 0x8(%rax)
movb $0x0, 0x10(%rax)
leaq 0x30(%rsp), %rdi
movq %rbx, %rsi
callq 0xa73a
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20bf4
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x20c0b
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq 0x30(%rsp), %rsi
movq 0x38(%rsp), %rdx
addq %rsi, %rdx
callq 0xbd58
leaq 0x16a44(%rip), %rsi     # 0x37670
leaq 0x8(%rsp), %rdi
callq 0x7560
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xaff2
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20c5a
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x10(%r12), %r13
leaq 0x50(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x14e6a(%rip), %rsi     # 0x35ad8
leaq 0x14e64(%rip), %rdx     # 0x35ad9
callq 0xbdee
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
callq 0xbd58
leaq 0x8(%rsp), %rdx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x153ca
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20cbb
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x20cd2
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x151ff(%rip), %rsi     # 0x35ee0
leaq 0x151ff(%rip), %rdx     # 0x35ee7
leaq 0x40(%rsp), %r14
callq 0xbdee
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xab5a
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20d16
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x14b16(%rip), %rsi     # 0x35833
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0xb692
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xab5a
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20d50
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x20(%r12), %rdi
movq (%rdi), %rax
leaq 0x70(%rsp), %r8
leaq 0x30(%rsp), %r9
movq %rbx, %rsi
movq %r15, %rdx
movq 0x90(%rsp), %rcx
callq *0x8(%rax)
leaq 0x143ab(%rip), %rsi     # 0x35125
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0xb692
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xab5a
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20dad
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq 0x70(%rsp), %rsi
movq 0x78(%rsp), %rdx
addq %rsi, %rdx
callq 0xbd58
leaq 0x168a2(%rip), %rsi     # 0x37670
leaq 0x8(%rsp), %rdi
callq 0x7560
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xaff2
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20dfc
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x20e13
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20e34
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x72c0
addq $0x98, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x20e8e
jmp 0x20e8e
jmp 0x20eaa
jmp 0x20e8e
jmp 0x20eaa
jmp 0x20eaa
jmp 0x20e8e
jmp 0x20eaa
jmp 0x20e8e
jmp 0x20eaa
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20e79
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x20e79
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x20ead
movq 0x60(%rsp), %rsi
jmp 0x20ea0
jmp 0x20eaa
jmp 0x20e8e
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20ead
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x20ead
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x20ec9
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x20eea
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rbx, %rdi
callq 0x74f0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20f11
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x20f11
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x20ec9
movq 0x60(%rsp), %rsi
jmp 0x20ec1
movq %rax, %rbx
jmp 0x20ec9
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x20f46
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x20f46
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x20eea
movq 0x40(%rsp), %rsi
jmp 0x20ee2
nop