// File: /workspace/github_cpp_makefile_star2_O1/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 0xc014
leaq 0x15d08(%rip), %rsi     # 0x36f0f
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 0x21236
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x2123d
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 0xa992
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2127d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x21294
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 0xc014
leaq 0x15c63(%rip), %rsi     # 0x36f1f
leaq 0x50(%rsp), %rdi
callq 0x7560
movq %rbp, 0x8(%rsp)
movq (%rax), %rdx
movq %rax, %rcx
addq $0x10, %rcx
cmpq %rcx, %rdx
je 0x212e9
movq %rdx, 0x8(%rsp)
movq (%rcx), %rdx
movq %rdx, 0x18(%rsp)
jmp 0x212f0
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 0xa992
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x21330
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x21347
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 0xc014
leaq 0x17290(%rip), %rsi     # 0x385f8
leaq 0x8(%rsp), %rdi
callq 0x7560
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb2c4
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x21396
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x10(%r12), %r13
leaq 0x50(%rsp), %rdi
movq %r14, (%rdi)
leaq 0x1572e(%rip), %rsi     # 0x36ad8
leaq 0x15728(%rip), %rdx     # 0x36ad9
callq 0xc0a4
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
movq 0x50(%rsp), %rsi
movq 0x58(%rsp), %rdx
addq %rsi, %rdx
callq 0xc014
leaq 0x8(%rsp), %rdx
movq %r13, %rdi
movq %rbx, %rsi
callq 0x1592e
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x213f7
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x2140e
movq 0x60(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x8(%rsp), %rdi
movq %rbp, (%rdi)
leaq 0x15ac3(%rip), %rsi     # 0x36ee0
leaq 0x15ac3(%rip), %rdx     # 0x36ee7
leaq 0x40(%rsp), %r14
callq 0xc0a4
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xadb2
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x21452
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x153da(%rip), %rsi     # 0x36833
leaq 0x8(%rsp), %rdi
leaq 0x70(%rsp), %rdx
callq 0xb963
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xadb2
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2148c
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 0x14c6f(%rip), %rsi     # 0x36125
leaq 0x8(%rsp), %rdi
leaq 0x30(%rsp), %rdx
callq 0xb963
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xadb2
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x214e9
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 0xc014
leaq 0x170ee(%rip), %rsi     # 0x385f8
leaq 0x8(%rsp), %rdi
callq 0x7560
leaq 0x8(%rsp), %rsi
movq %rbx, %rdi
callq 0xb2c4
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x21538
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x2154f
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21570
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 0x215ca
jmp 0x215ca
jmp 0x215e6
jmp 0x215ca
jmp 0x215e6
jmp 0x215e6
jmp 0x215ca
jmp 0x215e6
jmp 0x215ca
jmp 0x215e6
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x215b5
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x215b5
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x215e9
movq 0x60(%rsp), %rsi
jmp 0x215dc
jmp 0x215e6
jmp 0x215ca
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x215e9
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x215e9
movq %rax, %rbx
movq 0x30(%rsp), %rdi
leaq 0x40(%rsp), %rax
cmpq %rax, %rdi
je 0x21605
movq 0x40(%rsp), %rsi
incq %rsi
callq 0x72c0
leaq 0x80(%rsp), %rax
movq -0x10(%rax), %rdi
cmpq %rax, %rdi
je 0x21626
movq 0x80(%rsp), %rsi
incq %rsi
callq 0x72c0
movq %rbx, %rdi
callq 0x74f0
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x2164d
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x2164d
movq %rax, %rbx
movq 0x50(%rsp), %rdi
cmpq %r14, %rdi
je 0x21605
movq 0x60(%rsp), %rsi
jmp 0x215fd
movq %rax, %rbx
jmp 0x21605
movq %rax, %rbx
movq 0x8(%rsp), %rdi
cmpq %rbp, %rdi
je 0x21682
movq 0x18(%rsp), %rsi
incq %rsi
callq 0x72c0
jmp 0x21682
movq %rax, %rbx
movq 0x30(%rsp), %rdi
cmpq %r14, %rdi
je 0x21626
movq 0x40(%rsp), %rsi
jmp 0x2161e
nop