// File: /workspace/github_c_makefile_star2_O2/ArtifexSoftware[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 0x17874
cmpl $0x57, %eax
je 0x178cb
cmpl $0x54, %eax
jne 0x17968
movl 0x4(%r13), %eax
movl %eax, 0x5c(%r15)
movq %r12, %rdi
movq %r15, %rsi
pushq $0x4f
jmp 0x178c5
movl 0x4(%r13), %eax
movl %eax, 0x5c(%r15)
cmpl $0x0, 0x8(%r15)
je 0x17937
cmpl $0x52, 0x4(%rsp)
setne %al
cmpq %rbx, %r13
sete %cl
testb %cl, %al
jne 0x178b4
movq %r12, %rdi
movq %r15, %rsi
pushq $0x3
popq %rdx
callq 0x15d57
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x15d57
cmpl $0x51, %ebp
jne 0x17968
movq %r12, %rdi
movq %r15, %rsi
pushq $0x3
popq %rdx
jmp 0x17963
movl 0x4(%r13), %eax
movl %eax, 0x5c(%r15)
cmpq 0x10(%r13), %r14
jne 0x178fb
movq %r12, %rdi
movq %r15, %rsi
pushq $0x4b
popq %rdx
callq 0x15d57
movq 0x28(%r13), %rdx
testq %rdx, %rdx
je 0x178fb
movq %r12, %rdi
movq %r15, %rsi
callq 0x15ff8
cmpq 0x20(%r13), %r14
jne 0x17968
movq 0x28(%r13), %r14
movq %r12, %rdi
movq %r15, %rsi
pushq $0x4d
popq %rdx
callq 0x15d57
testq %r14, %r14
je 0x17968
movq %r12, %rdi
movq %r15, %rsi
pushq $0x4b
popq %rdx
callq 0x15d57
movq 0x28(%r13), %rdx
movq %r12, %rdi
movq %r15, %rsi
callq 0x15ff8
jmp 0x17968
cmpl $0x51, %ebp
je 0x17956
cmpl $0x52, %ebp
je 0x1795b
cmpl $0x53, %ebp
jne 0x17968
movq %r12, %rdi
movq %r15, %rsi
pushq $0x3
popq %rdx
callq 0x15d57
jmp 0x1795b
cmpq %rbx, %r13
je 0x17968
movq %r12, %rdi
movq %r15, %rsi
xorl %edx, %edx
callq 0x15d57
cmpq %rbx, %r13
jne 0x17841
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq