// File: /workspace/github_c_makefile_star2_O0/rafa9811[P]theIndiependenceGame/interact.c
// Function: interact_load
Interact *interact_load(char*filename){
  Interact *interact;
	char path[512],name[128];
	FILE *in;

	if(!filename) return NULL;

	interact=(Interact*)malloc(sizeof(Interact));
	if(!interact) return NULL;

	in = (FILE*) fopen(filename, "r");
	if(!in){
		free(interact);
		return NULL;
	}

	while(!feof(in)){
		fscanf(in,"%s\t%s\n",name,path);
        if(strcmp(name,"Objects")==0){
            IN(objects)=mobjects_load(path);
        }
        else if(strcmp(name,"Inventory")==0){
            IN(inventory)=inventory_load(path);
        }
        else if(strcmp(name,"Shop")==0){
            IN(shop)=inventory_load(path);
        }
        else if(strcmp(name,"Map")==0){
            IN(map)=map_load(path);
        }
        else if(strcmp(name,"Dialogs")==0){
            IN(dialogs)=dialogs_load(path);
        }
        else if(strcmp(name,"Meetings")==0){
            IN(meeting)=meeting_load(path);
        }
	}

	IN(player)=player_ini();
	IN(stat)=stat_ini();

	if(!IN(objects) || !IN(inventory) || !IN(shop) || !IN(map) || !IN(dialogs) || !IN(meeting) || !IN(player) || !IN(stat)) exit(0);
    IN(boxes)=0;
    IN(printers)=0;
    IN(meetings)=0;
    IN(danger)=0;
    strcpy(IN(dialog),"Welcome to Barçalona Président! Press I to open the inventory, Q for quitting the game, or A for interacting. Good luck on not being arrested!");
    IN(px)=INIX;
    IN(py)=INIY;
    IN(correct)=1;
    bg_updateRoom(IN(objects),IN(map),IN(player));
	fclose(in);
	return interact;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x2b0, %rsp            # imm = 0x2B0
movq %rdi, -0x10(%rbp)
cmpq $0x0, -0x10(%rbp)
jne 0x6463
movq $0x0, -0x8(%rbp)
jmp 0x6760
movl $0x460, %edi            # imm = 0x460
callq 0x1130
movq %rax, -0x18(%rbp)
cmpq $0x0, -0x18(%rbp)
jne 0x6485
movq $0x0, -0x8(%rbp)
jmp 0x6760
movq -0x10(%rbp), %rdi
leaq 0x2ba2(%rip), %rsi      # 0x9032
callq 0x1190
movq %rax, -0x2a8(%rbp)
cmpq $0x0, -0x2a8(%rbp)
jne 0x64bc
movq -0x18(%rbp), %rdi
callq 0x1030
movq $0x0, -0x8(%rbp)
jmp 0x6760
jmp 0x64be
movq -0x2a8(%rbp), %rdi
callq 0x10f0
cmpl $0x0, %eax
setne %al
xorb $-0x1, %al
testb $0x1, %al
jne 0x64db
jmp 0x663a
movq -0x2a8(%rbp), %rdi
leaq -0x2a0(%rbp), %rdx
leaq -0x220(%rbp), %rcx
leaq 0x2d49(%rip), %rsi      # 0x9240
movb $0x0, %al
callq 0x1050
leaq -0x2a0(%rbp), %rdi
leaq 0x2d3b(%rip), %rsi      # 0x9247
callq 0x10e0
cmpl $0x0, %eax
jne 0x6532
leaq -0x220(%rbp), %rdi
callq 0x2a80
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x18(%rax)
jmp 0x6635
leaq -0x2a0(%rbp), %rdi
leaq 0x2d0f(%rip), %rsi      # 0x924f
callq 0x10e0
cmpl $0x0, %eax
jne 0x6566
leaq -0x220(%rbp), %rdi
callq 0x2470
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x20(%rax)
jmp 0x6633
leaq -0x2a0(%rbp), %rdi
leaq 0x2ce5(%rip), %rsi      # 0x9259
callq 0x10e0
cmpl $0x0, %eax
jne 0x659a
leaq -0x220(%rbp), %rdi
callq 0x2470
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x28(%rax)
jmp 0x6631
leaq -0x2a0(%rbp), %rdi
leaq 0x2cb6(%rip), %rsi      # 0x925e
callq 0x10e0
cmpl $0x0, %eax
jne 0x65cb
leaq -0x220(%rbp), %rdi
callq 0x3200
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x10(%rax)
jmp 0x662f
leaq -0x2a0(%rbp), %rdi
leaq 0x2c89(%rip), %rsi      # 0x9262
callq 0x10e0
cmpl $0x0, %eax
jne 0x65fc
leaq -0x220(%rbp), %rdi
callq 0x22a0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x30(%rax)
jmp 0x662d
leaq -0x2a0(%rbp), %rdi
leaq 0x2c60(%rip), %rsi      # 0x926a
callq 0x10e0
cmpl $0x0, %eax
jne 0x662b
leaq -0x220(%rbp), %rdi
callq 0x3590
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x38(%rax)
jmp 0x662d
jmp 0x662f
jmp 0x6631
jmp 0x6633
jmp 0x6635
jmp 0x64be
movb $0x0, %al
callq 0x57d0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, (%rax)
movb $0x0, %al
callq 0x5fb0
movq %rax, %rcx
movq -0x18(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x18(%rbp), %rax
cmpq $0x0, 0x18(%rax)
je 0x66b4
movq -0x18(%rbp), %rax
cmpq $0x0, 0x20(%rax)
je 0x66b4
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x66b4
movq -0x18(%rbp), %rax
cmpq $0x0, 0x10(%rax)
je 0x66b4
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x66b4
movq -0x18(%rbp), %rax
cmpq $0x0, 0x38(%rax)
je 0x66b4
movq -0x18(%rbp), %rax
cmpq $0x0, (%rax)
je 0x66b4
movq -0x18(%rbp), %rax
cmpq $0x0, 0x8(%rax)
jne 0x66bb
xorl %edi, %edi
callq 0x11b0
movq -0x18(%rbp), %rax
movl $0x0, 0x440(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x444(%rax)
movq -0x18(%rbp), %rax
movl $0x0, 0x448(%rax)
movq -0x18(%rbp), %rax
movw $0x0, 0x44c(%rax)
movq -0x18(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2b72(%rip), %rsi      # 0x9273
callq 0x1040
movq -0x18(%rbp), %rax
movl $0x46, 0x450(%rax)
movq -0x18(%rbp), %rax
movl $0x14, 0x454(%rax)
movq -0x18(%rbp), %rax
movl $0x1, 0x458(%rax)
movq -0x18(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x18(%rbp), %rax
movq (%rax), %rdx
callq 0x3b00
movq -0x2a8(%rbp), %rdi
callq 0x1060
movq -0x18(%rbp), %rax
movq %rax, -0x8(%rbp)
movq -0x8(%rbp), %rax
addq $0x2b0, %rsp            # imm = 0x2B0
popq %rbp
retq
nopl (%rax)