// File: /workspace/github_c_makefile_star2_O0/ethinethin[P]Secret/inter.c
// Function: interact
static void interact(int room, int item1, int item2)
{
	int i;
	for (i = 0; interactions[i].event_id != -1; i++) {
		if (interactions[i].room_id == room &&
			interactions[i].item1 == item1 &&
			interactions[i].item2 == item2 &&
			interactions[i].triggerable == YES) {
			/* do the action */
			if (interactions[i].event_type == OPEN) {
				location_move(interactions[i].event_attr1,
					interactions[i].event_dir,
					interactions[i].event_attr2);
			} else if (interactions[i].event_type == BREAK) {
				break_item(interactions[i].event_attr1);
			} else if (interactions[i].event_type == CREATE) {
				create_item(interactions[i].event_attr1, interactions[i].event_attr2);
			} else if (interactions[i].event_type == STORY) {
				GAME_STATUS = interactions[i].event_attr1;
			} else if (interactions[i].event_type == TAKE) {
				take(interactions[i].event_attr1);
			}

			/* print description */
			if (interactions[i].event_desc != NULL)
				printf("%s\n",interactions[i].event_desc);
			/* deactivate current event, and activate linked event if necessary */
			interactions[i].triggerable = NO;
			if (interactions[i].event_link != -1) {
				if (interactions[interactions[i].event_link].triggerable == YES)
					interactions[interactions[i].event_link].triggerable = NO;
				else
					interactions[interactions[i].event_link].triggerable = YES;
			}

			/* if you don't want to chain together events, quit now */
			if (interactions[i].quit == YES) return;
		}
	}
	/* got to the end with nothing happening */
	printf("You can't do that.\n");
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
movl %esi, -0x8(%rbp)
movl %edx, -0xc(%rbp)
movl $0x0, -0x10(%rbp)
movslq -0x10(%rbp), %rcx
leaq 0x8ccd(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, (%rax)
je 0x779e
movslq -0x10(%rbp), %rcx
leaq 0x8cb2(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0xc(%rax), %eax
cmpl -0x4(%rbp), %eax
jne 0x778e
movslq -0x10(%rbp), %rcx
leaq 0x8c94(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
cmpl -0x8(%rbp), %eax
jne 0x778e
movslq -0x10(%rbp), %rcx
leaq 0x8c76(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x8(%rax), %eax
cmpl -0xc(%rbp), %eax
jne 0x778e
movslq -0x10(%rbp), %rcx
leaq 0x8c58(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0x10(%rax)
jne 0x778e
movslq -0x10(%rbp), %rcx
leaq 0x8c3c(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x14(%rax)
jne 0x758a
movslq -0x10(%rbp), %rcx
leaq 0x8c24(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %edi
movslq -0x10(%rbp), %rcx
leaq 0x8c0f(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x18(%rax), %esi
movslq -0x10(%rbp), %rcx
leaq 0x8bfa(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %edx
callq 0x6740
jmp 0x767c
movslq -0x10(%rbp), %rcx
leaq 0x8bdb(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0x14(%rax)
jne 0x75c1
movslq -0x10(%rbp), %rcx
leaq 0x8bc3(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %edi
callq 0x7210
jmp 0x767a
movslq -0x10(%rbp), %rcx
leaq 0x8ba4(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x2, 0x14(%rax)
jne 0x760a
movslq -0x10(%rbp), %rcx
leaq 0x8b8c(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %edi
movslq -0x10(%rbp), %rcx
leaq 0x8b77(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x20(%rax), %esi
callq 0x7250
jmp 0x7678
movslq -0x10(%rbp), %rcx
leaq 0x8b5b(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x3, 0x14(%rax)
jne 0x7642
movslq -0x10(%rbp), %rcx
leaq 0x8b43(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %ecx
leaq 0x9586(%rip), %rax      # 0x10bc4
movl %ecx, (%rax)
jmp 0x7676
movslq -0x10(%rbp), %rcx
leaq 0x8b23(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x4, 0x14(%rax)
jne 0x7674
movslq -0x10(%rbp), %rcx
leaq 0x8b0b(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl 0x1c(%rax), %edi
callq 0x6dd0
jmp 0x7676
jmp 0x7678
jmp 0x767a
jmp 0x767c
movslq -0x10(%rbp), %rcx
leaq 0x8ae9(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpq $0x0, 0x30(%rax)
je 0x76b9
movslq -0x10(%rbp), %rcx
leaq 0x8ad0(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movq 0x30(%rax), %rsi
leaq 0x13e2(%rip), %rdi      # 0x8a94
movb $0x0, %al
callq 0x30e0
movslq -0x10(%rbp), %rcx
leaq 0x8aac(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x10(%rax)
movslq -0x10(%rbp), %rcx
leaq 0x8a93(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $-0x1, 0x24(%rax)
je 0x7772
movslq -0x10(%rbp), %rcx
leaq 0x8a77(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movslq 0x24(%rax), %rcx
leaq 0x8a65(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0x10(%rax)
jne 0x7745
movslq -0x10(%rbp), %rcx
leaq 0x8a4d(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movslq 0x24(%rax), %rcx
leaq 0x8a3b(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x10(%rax)
jmp 0x7770
movslq -0x10(%rbp), %rcx
leaq 0x8a20(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movslq 0x24(%rax), %rcx
leaq 0x8a0e(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x10(%rax)
jmp 0x7772
movslq -0x10(%rbp), %rcx
leaq 0x89f3(%rip), %rax      # 0x10170
imulq $0x38, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0x28(%rax)
jne 0x778c
jmp 0x77ac
jmp 0x778e
jmp 0x7790
movl -0x10(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x10(%rbp)
jmp 0x7498
leaq 0x4339(%rip), %rdi      # 0xbade
movb $0x0, %al
callq 0x30e0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)
nopl (%rax)