// File: /workspace/github_c_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r8, %rbx
movq %rcx, %r13
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movl %edx, %eax
andl $-0x2, %eax
movl %eax, 0x4(%rsp)
movq %r13, %r14
movq 0x8(%r13), %r13
movl (%r13), %eax
leal -0x4f(%rax), %ecx
cmpl $0x2, %ecx
jb 0x1f124
cmpl $0x57, %eax
je 0x1f1a8
cmpl $0x54, %eax
jne 0x1f294
movl 0x4(%r13), %edx
movl %edx, 0x5c(%r15)
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d8f3
movq %r12, %rdi
movq %r15, %rsi
movl $0x4f, %edx
jmp 0x1f28f
movl 0x4(%r13), %edx
movl %edx, 0x5c(%r15)
cmpl $0x0, 0x8(%r15)
je 0x1f247
cmpl $0x52, 0x4(%rsp)
setne %al
cmpq %rbx, %r13
sete %cl
testb %cl, %al
jne 0x1f180
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d8f3
movq %r12, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq 0x1d8f3
movl 0x5c(%r15), %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d8f3
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1d8f3
cmpl $0x51, %ebp
jne 0x1f294
movl 0x5c(%r15), %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d8f3
movq %r12, %rdi
movq %r15, %rsi
movl $0x3, %edx
jmp 0x1f28f
movl 0x4(%r13), %edx
movl %edx, 0x5c(%r15)
cmpq 0x10(%r13), %r14
jne 0x1f1e5
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d8f3
movq %r12, %rdi
movq %r15, %rsi
movl $0x4b, %edx
callq 0x1d8f3
movq 0x28(%r13), %rdx
testq %rdx, %rdx
je 0x1f1e5
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d955
cmpq 0x20(%r13), %r14
jne 0x1f294
movq 0x28(%r13), %r14
movl 0x5c(%r15), %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d8f3
movq %r12, %rdi
movq %r15, %rsi
movl $0x4d, %edx
callq 0x1d8f3
testq %r14, %r14
je 0x1f294
movl 0x5c(%r15), %edx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d8f3
movq %r12, %rdi
movq %r15, %rsi
movl $0x4b, %edx
callq 0x1d8f3
movq 0x28(%r13), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d955
jmp 0x1f294
cmpl $0x51, %ebp
je 0x1f277
cmpl $0x52, %ebp
je 0x1f27c
cmpl $0x53, %ebp
jne 0x1f294
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d8f3
movq %r12, %rdi
movq %r15, %rsi
movl $0x3, %edx
callq 0x1d8f3
movl 0x5c(%r15), %edx
jmp 0x1f27c
cmpq %rbx, %r13
je 0x1f294
movq %r12, %rdi
movq %r15, %rsi
callq 0x1d8f3
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x1d8f3
cmpq %rbx, %r13
jne 0x1f0dc
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq