// File: /workspace/github_c_makefile_star2_O0/ccxvii[P]mujs/./jscompile.c
// Function: cexit
static void cexit(JF, enum js_AstType T, js_Ast *node, js_Ast *target)
{
	js_Ast *prev;
	do {
		prev = node, node = node->parent;
		switch (node->type) {
		default:
			/* impossible */
			break;
		case STM_WITH:
			emitline(J, F, node);
			emit(J, F, OP_ENDWITH);
			break;
		case STM_FOR_IN:
		case STM_FOR_IN_VAR:
			emitline(J, F, node);
			/* pop the iterator if leaving the loop */
			if (F->script) {
				if (T == STM_RETURN || T == STM_BREAK || (T == STM_CONTINUE && target != node)) {
					/* pop the iterator, save the return or exp value */
					emit(J, F, OP_ROT2);
					emit(J, F, OP_POP);
				}
				if (T == STM_CONTINUE)
					emit(J, F, OP_ROT2); /* put the iterator back on top */
			} else {
				if (T == STM_RETURN) {
					/* pop the iterator, save the return value */
					emit(J, F, OP_ROT2);
					emit(J, F, OP_POP);
				}
				if (T == STM_BREAK || (T == STM_CONTINUE && target != node))
					emit(J, F, OP_POP); /* pop the iterator */
			}
			break;
		case STM_TRY:
			emitline(J, F, node);
			/* came from try block */
			if (prev == node->a) {
				emit(J, F, OP_ENDTRY);
				if (node->d) cstm(J, F, node->d); /* finally */
			}
			/* came from catch block */
			if (prev == node->c) {
				/* ... with finally */
				if (node->d) {
					emit(J, F, OP_ENDCATCH);
					emit(J, F, OP_ENDTRY);
					cstm(J, F, node->d); /* finally */
				} else {
					emit(J, F, OP_ENDCATCH);
				}
			}
			break;
		}
	} while (node != target);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x40, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl %edx, -0x14(%rbp)
movq %rcx, -0x20(%rbp)
movq %r8, -0x28(%rbp)
movq -0x20(%rbp), %rax
movq %rax, -0x30(%rbp)
movq -0x20(%rbp), %rax
movq 0x8(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x34(%rbp)
addl $-0x4f, %eax
subl $0x2, %eax
jb 0x214d7
jmp 0x21492
movl -0x34(%rbp), %eax
subl $0x54, %eax
je 0x214af
jmp 0x2149c
movl -0x34(%rbp), %eax
subl $0x57, %eax
je 0x2159c
jmp 0x214aa
jmp 0x21659
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1f2b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4f, %edx
callq 0x1ef90
jmp 0x21659
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1f2b0
movq -0x10(%rbp), %rax
cmpl $0x0, 0x8(%rax)
je 0x21549
cmpl $0x53, -0x14(%rbp)
je 0x2150e
cmpl $0x52, -0x14(%rbp)
je 0x2150e
cmpl $0x51, -0x14(%rbp)
jne 0x2152f
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x2152f
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x3, %edx
callq 0x1ef90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x1ef90
cmpl $0x51, -0x14(%rbp)
jne 0x21547
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x3, %edx
callq 0x1ef90
jmp 0x21597
cmpl $0x53, -0x14(%rbp)
jne 0x21570
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x3, %edx
callq 0x1ef90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x1ef90
cmpl $0x52, -0x14(%rbp)
je 0x21586
cmpl $0x51, -0x14(%rbp)
jne 0x21595
movq -0x28(%rbp), %rax
cmpq -0x20(%rbp), %rax
je 0x21595
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x1ef90
jmp 0x21597
jmp 0x21659
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1f2b0
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x10(%rcx), %rax
jne 0x215ef
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4b, %edx
callq 0x1ef90
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x215ed
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rdx
callq 0x1f4c0
jmp 0x215ef
movq -0x30(%rbp), %rax
movq -0x20(%rbp), %rcx
cmpq 0x20(%rcx), %rax
jne 0x21657
movq -0x20(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x21643
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4d, %edx
callq 0x1ef90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4b, %edx
callq 0x1ef90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x28(%rax), %rdx
callq 0x1f4c0
jmp 0x21655
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4d, %edx
callq 0x1ef90
jmp 0x21657
jmp 0x21659
jmp 0x2165b
movq -0x20(%rbp), %rax
cmpq -0x28(%rbp), %rax
jne 0x2146b
addq $0x40, %rsp
popq %rbp
retq
nop