// File: /workspace/github_cpp_makefile_star2_O2/rfotino[P]consolite-compiler/src/syntax.cpp
// Function: DoWhileStatement::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 DoWhileStatement::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() + "_do_while_break");
  std::string continueLabel =
    parser->getUnusedLabel(function->name() + "_do_while_continue");
  // Output the continue label.
  parser->writeln(continueLabel + ":");
  // Output the loop body.
  _body->output(parser, function, returnLabel, breakLabel, continueLabel);
  // Test the condition.
  _condExpr->output(parser, VarLocation("L"));
  parser->writeInst("TST L L");
  parser->writeInst("JNE " + continueLabel);
  // Output the break label.
  parser->writeln(breakLabel + ":");
}

// Assembly:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x90, %rsp
movq %rcx, %r15
movq %rdx, %r12
movq %rsi, %rbx
movq %rdi, %r14
movq (%rdx), %rsi
addq $0x58, %rsi
leaq 0x50(%rsp), %r13
movq %r13, %rdi
callq 0x73e0
leaq 0x1216b(%rip), %rdx     # 0x29f0c
leaq 0x8(%rsp), %rdi
movq %r13, %rsi
callq 0x9ad4
leaq 0x70(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x901a
leaq 0x8(%rsp), %rdi
callq 0x75c8
leaq 0x50(%rsp), %rdi
callq 0x75c8
movq (%r12), %rsi
addq $0x58, %rsi
leaq 0x30(%rsp), %rdi
callq 0x73e0
leaq 0x1212f(%rip), %rdx     # 0x29f1c
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x9ad4
leaq 0x50(%rsp), %rdi
leaq 0x8(%rsp), %rdx
movq %rbx, %rsi
callq 0x901a
leaq 0x8(%rsp), %rdi
callq 0x75c8
leaq 0x30(%rsp), %rdi
callq 0x75c8
leaq 0x13807(%rip), %rdx     # 0x2b630
leaq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rsi
callq 0x99f6
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x93f2
leaq 0x8(%rsp), %rdi
callq 0x75c8
movq 0x20(%r14), %rdi
movq (%rdi), %rax
leaq 0x70(%rsp), %r8
leaq 0x50(%rsp), %r9
movq %rbx, %rsi
movq %r12, %rdx
movq %r15, %rcx
callq *0x8(%rax)
movq 0x10(%r14), %r14
leaq 0x11c61(%rip), %rsi     # 0x29ad8
leaq 0x30(%rsp), %rdi
leaq 0x7(%rsp), %rdx
callq 0x9502
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rsi
callq 0x73e0
leaq 0x8(%rsp), %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x10ca6
leaq 0x8(%rsp), %rdi
callq 0x75c8
leaq 0x30(%rsp), %rdi
callq 0x75c8
leaq 0x12020(%rip), %rsi     # 0x29ee0
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0x9502
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x914a
leaq 0x8(%rsp), %rdi
callq 0x75c8
leaq 0x11883(%rip), %rsi     # 0x29770
leaq 0x8(%rsp), %rdi
leaq 0x50(%rsp), %rdx
callq 0x9980
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x914a
leaq 0x8(%rsp), %rdi
callq 0x75c8
leaq 0x13716(%rip), %rdx     # 0x2b630
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rsi
callq 0x99f6
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0x93f2
leaq 0x8(%rsp), %rdi
callq 0x75c8
leaq 0x50(%rsp), %rdi
callq 0x75c8
leaq 0x70(%rsp), %rdi
callq 0x75c8
addq $0x90, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
retq
jmp 0x17f8e
jmp 0x17f9d
jmp 0x17f8e
jmp 0x17f9d
jmp 0x17f8e
jmp 0x17f9d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x75c8
jmp 0x17f83
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x17f96
jmp 0x17f9d
jmp 0x17f9d
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x75c8
jmp 0x17fa0
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
callq 0x75c8
leaq 0x70(%rsp), %rdi
callq 0x75c8
movq %rbx, %rdi
callq 0x7510
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x75c8
jmp 0x17fce
movq %rax, %rbx
leaq 0x30(%rsp), %rdi
jmp 0x17fa5
movq %rax, %rbx
jmp 0x17faa
movq %rax, %rbx
leaq 0x8(%rsp), %rdi
callq 0x75c8
jmp 0x17fec
movq %rax, %rbx
leaq 0x50(%rsp), %rdi
jmp 0x17faf
nop