// File: /workspace/github_c_makefile_star2_O0/ccxvii[P]mujs/./jscompile.c
// Function: cassignforin
static void cassignforin(JF, js_Ast *stm)
{
	js_Ast *lhs = stm->a;

	if (stm->type == STM_FOR_IN_VAR) {
		if (lhs->b)
			jsC_error(J, lhs->b, "more than one loop variable in for-in statement");
		emitline(J, F, lhs->a);
		emitlocal(J, F, OP_SETLOCAL, OP_SETVAR, lhs->a->a); /* list(var-init(ident)) */
		emit(J, F, OP_POP);
		return;
	}

	switch (lhs->type) {
	case EXP_IDENTIFIER:
		emitline(J, F, lhs);
		emitlocal(J, F, OP_SETLOCAL, OP_SETVAR, lhs);
		emit(J, F, OP_POP);
		break;
	case EXP_INDEX:
		cexp(J, F, lhs->a);
		cexp(J, F, lhs->b);
		emitline(J, F, lhs);
		emit(J, F, OP_ROT3);
		emit(J, F, OP_SETPROP);
		emit(J, F, OP_POP);
		break;
	case EXP_MEMBER:
		cexp(J, F, lhs->a);
		emitline(J, F, lhs);
		emit(J, F, OP_ROT2);
		emitstring(J, F, OP_SETPROP_S, lhs->b->string);
		emit(J, F, OP_POP);
		break;
	default:
		jsC_error(J, lhs, "invalid l-value in for-in loop assignment");
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x30, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rax
cmpl $0x50, (%rax)
jne 0x2101a
movq -0x20(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x20fce
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rsi
leaq 0x1b84c(%rip), %rdx     # 0x3c813
movb $0x0, %al
callq 0x8b80
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x1f2b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rax
movq 0x10(%rax), %r8
movl $0x14, %edx
movl $0x18, %ecx
callq 0x21bb0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x1ef90
jmp 0x21172
movq -0x20(%rbp), %rax
movl (%rax), %eax
movl %eax, -0x24(%rbp)
subl $0x3, %eax
je 0x21045
jmp 0x2102a
movl -0x24(%rbp), %eax
subl $0x12, %eax
je 0x21085
jmp 0x21034
movl -0x24(%rbp), %eax
subl $0x13, %eax
je 0x210f5
jmp 0x2115c
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1f2b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %r8
movl $0x14, %edx
movl $0x18, %ecx
callq 0x21bb0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x1ef90
jmp 0x21172
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x20220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rdx
callq 0x20220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1f2b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x4, %edx
callq 0x1ef90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x22, %edx
callq 0x1ef90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x1ef90
jmp 0x21172
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x10(%rax), %rdx
callq 0x20220
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rdx
callq 0x1f2b0
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movl $0x3, %edx
callq 0x1ef90
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
movq -0x20(%rbp), %rax
movq 0x18(%rax), %rax
movq 0x38(%rax), %rcx
movl $0x23, %edx
callq 0x21d10
movq -0x8(%rbp), %rdi
movq -0x10(%rbp), %rsi
xorl %edx, %edx
callq 0x1ef90
jmp 0x21172
movq -0x8(%rbp), %rdi
movq -0x20(%rbp), %rsi
leaq 0x1b6d8(%rip), %rdx     # 0x3c843
movb $0x0, %al
callq 0x8b80
addq $0x30, %rsp
popq %rbp
retq
nopl (%rax,%rax)