// File: /workspace/github_c_makefile_star2_O1/nimble-code[P]Uno/Src/uno_lts.c
// Function: lts_dowhile
static State *
lts_dowhile(State *now, treenode *node)	/* lnode - cond; rnode - body */
{	State *ts, *es;
	Trans *tr;
	leafnode *si, *ei;
	treenode *el, *en;
	treenode *sl, *sn;
	if_node *t;

	if (!node->lnode)
		node->lnode = mk_int(1);
	if (!node->rnode)
		node->rnode = mk_int(1);

	si = mk_ident();	/* start of loop */
	sl = mk_label_node(si, node, "do-while");
	sn = mk_goto_node(si);

	ei = mk_ident();	/*   end of loop */
	el = mk_label_node(ei, node, "do-while");
	en = mk_goto_node(ei);

	lts_push_start(sn);
	lts_push_end(en);

	ts = create_state(curgraph);	/* then branch */
	ts->n = sn;				/* jump to start */
	es = create_state(curgraph);	/* else branch */
	es->n = en;				/* jump to end */

	tr = get_trans();
	tr->cond = mk_bool("_true_");
	tr->branch = ts;
	tr->nxt = get_trans();
	tr->nxt->cond = mk_bool("_false_");
	tr->nxt->branch = es;

	now = lts_tree(now, sl);		/* place start label */
	now = lts_tree(now, node->rnode);	/* loop body */

	t = (if_node *) emalloc(sizeof(if_node));
	t->hdr.which = IF_T;
	t->hdr.type = TN_IF;

	t->hdr.fnm = node->hdr.fnm;
	t->hdr.line = node->hdr.line;
	t->hdr.defuse = node->lnode->hdr.defuse;
#ifdef DEFTYP
	t->hdr.deftyp = node->lnode->hdr.deftyp;
#endif

	t->cond = node->lnode;		/* loop condition */
	t->then_n = ts->n;		/* just for form, */
	t->else_n = es->n;		/* the real info is in tr */

	now = add_seq(now, (treenode *) t); /* add loop test */
	now->succ = tr;			/* with its two branches */

	now = lts_tree(now, el);	/* place end label */

	lts_pop_start();
	lts_pop_end();

	return now;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq %rsi, %rbx
movq %rdi, 0x10(%rsp)
cmpq $0x0, 0x40(%rsi)
jne 0x172dc
movl $0x1, %edi
callq 0x1028c
movq %rax, 0x40(%rbx)
cmpq $0x0, 0x48(%rbx)
jne 0x172f1
movl $0x1, %edi
callq 0x1028c
movq %rax, 0x48(%rbx)
callq 0x101ad
movq %rax, %r14
leaq 0x18c68(%rip), %rdx     # 0x2ff68
movq %rax, %rdi
movq %rbx, %rsi
callq 0x169b4
movq %rax, (%rsp)
movl $0x50, %edi
callq 0x61a1
movq %rax, %rbp
movl $0x4, %eax
movl %eax, (%rbp)
movabsq $0x1d0000011c, %r15     # imm = 0x1D0000011C
movq %r15, 0x18(%rbp)
leaq 0x18b04(%rip), %r12     # 0x2fe3d
movq %r12, 0x8(%rbp)
movq %r14, 0x40(%rbp)
callq 0x101ad
movq %rax, %r13
movq %rax, %rdi
movq %rbx, %rsi
leaq 0x18c12(%rip), %rdx     # 0x2ff68
callq 0x169b4
movq %rax, 0x8(%rsp)
movl $0x50, %edi
callq 0x61a1
movq %rax, %r14
movl $0x4, %eax
movl %eax, (%r14)
movq %r15, 0x18(%r14)
movq %r12, 0x8(%r14)
movq %r13, 0x40(%r14)
movq %rbp, %rdi
callq 0x16a77
movq %r14, %rdi
callq 0x16abd
movq 0x58ab0(%rip), %r15     # 0x6fe48
movq 0x58b21(%rip), %r13     # 0x6fec0
testq %r13, %r13
je 0x173d7
movq 0x68(%r13), %rax
movq %rax, 0x58b11(%rip)     # 0x6fec0
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%r13)
movups %xmm0, 0x50(%r13)
movups %xmm0, 0x40(%r13)
movups %xmm0, 0x30(%r13)
movups %xmm0, 0x20(%r13)
movups %xmm0, 0x10(%r13)
movups %xmm0, (%r13)
jmp 0x173e4
movl $0x70, %edi
callq 0x61a1
movq %rax, %r13
movq 0x10(%r15), %rax
movq %rax, 0x68(%r13)
movq %r13, 0x10(%r15)
movq %rbp, (%r13)
movq 0x58a4d(%rip), %r15     # 0x6fe48
movq 0x58abe(%rip), %rbp     # 0x6fec0
testq %rbp, %rbp
je 0x17433
movq 0x68(%rbp), %rax
movq %rax, 0x58aae(%rip)     # 0x6fec0
xorps %xmm0, %xmm0
movups %xmm0, 0x60(%rbp)
movups %xmm0, 0x50(%rbp)
movups %xmm0, 0x40(%rbp)
movups %xmm0, 0x30(%rbp)
movups %xmm0, 0x20(%rbp)
movups %xmm0, 0x10(%rbp)
movups %xmm0, (%rbp)
jmp 0x17440
movl $0x70, %edi
callq 0x61a1
movq %rax, %rbp
movq 0x10(%r15), %rax
movq %rax, 0x68(%rbp)
movq %rbp, 0x10(%r15)
movq %r14, (%rbp)
movq 0x58a71(%rip), %r14     # 0x6fec8
testq %r14, %r14
je 0x17475
movq 0x18(%r14), %rax
movq %rax, 0x58a61(%rip)     # 0x6fec8
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%r14)
movups %xmm0, (%r14)
jmp 0x17482
movl $0x20, %edi
callq 0x61a1
movq %rax, %r14
leaq 0x188f7(%rip), %rdi     # 0x2fd80
callq 0x1022e
movq %rax, (%r14)
movq %r13, 0x10(%r14)
movq 0x58a2c(%rip), %rax     # 0x6fec8
testq %rax, %rax
je 0x174b8
movq 0x18(%rax), %rcx
movq %rcx, 0x58a1c(%rip)     # 0x6fec8
xorps %xmm0, %xmm0
movups %xmm0, 0x10(%rax)
movups %xmm0, (%rax)
jmp 0x174c2
movl $0x20, %edi
callq 0x61a1
movq %rax, 0x18(%r14)
leaq 0x188ab(%rip), %rdi     # 0x2fd78
callq 0x1022e
movq 0x18(%r14), %rcx
movq %rax, (%rcx)
movq %rbp, 0x10(%rcx)
movq 0x10(%rsp), %rdi
movq (%rsp), %rsi
callq 0x15e11
movq 0x48(%rbx), %rsi
movq %rax, %rdi
callq 0x15e11
movq %rax, %r12
movl $0x58, %edi
callq 0x61a1
movl $0x2, (%rax)
movl $0x1b, 0x1c(%rax)
movq 0x8(%rbx), %rcx
movq %rcx, 0x8(%rax)
movl 0x10(%rbx), %ecx
movl %ecx, 0x10(%rax)
movq 0x40(%rbx), %rcx
movq 0x28(%rcx), %rdx
movq %rdx, 0x28(%rax)
movq %rcx, 0x40(%rax)
movq (%r13), %rcx
movq %rcx, 0x48(%rax)
movq (%rbp), %rcx
movq %rcx, 0x50(%rax)
movq %r12, %rdi
movq %rax, %rsi
callq 0x16b0a
movq %r14, 0x50(%rax)
movq %rax, %rdi
movq 0x8(%rsp), %rsi
callq 0x15e11
movq %rax, %rbx
xorl %edi, %edi
cmpq $0x0, 0x58988(%rip)     # 0x6fef0
setne %dil
leaq 0x18919(%rip), %rsi     # 0x2fe8c
callq 0x13f8c
movq 0x58971(%rip), %rax     # 0x6fef0
movq 0x10(%rax), %rcx
movq %rcx, 0x58966(%rip)     # 0x6fef0
movq 0x5894f(%rip), %rcx     # 0x6fee0
movq %rcx, 0x10(%rax)
movq %rax, 0x58944(%rip)     # 0x6fee0
xorl %edi, %edi
cmpq $0x0, 0x58952(%rip)     # 0x6fef8
setne %dil
leaq 0x188f1(%rip), %rsi     # 0x2fea2
callq 0x13f8c
movq 0x5893b(%rip), %rax     # 0x6fef8
movq 0x10(%rax), %rcx
movq %rcx, 0x58930(%rip)     # 0x6fef8
movq 0x58911(%rip), %rcx     # 0x6fee0
movq %rcx, 0x10(%rax)
movq %rax, 0x58906(%rip)     # 0x6fee0
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq