// File: /workspace/github_c_makefile_star2_O0/rafa9811[P]theIndiependenceGame/interact.c
// Function: interact_play
State interact_play(State state, Interact *interact) {
  char choice;
  char name[256], msg[1024], dlg[1024];
  int ret,px,py,correctans=0,id=0;

  if(state>MEETING3||!interact){
      exit(-1);
  }
  
  if(IN(meetings)==5 && IN(boxes)==5 && IN(printers)==5) return QUIT2;

  /*We read the pressed key*/
  choice = fgetc(stdin);
  /*And now depending on our state what we pressed has different effects:*/
  switch (state){
      /*If we have just picked and object. (This state is for erasing from our screen the object we picked)*/
    case(PICK):{
        if(choice=='a'||choice=='A'){
            dialog(" ");
            return NOTHING;
        }
        if(choice=='q'||choice=='Q'){
            goto quit;
        }
        else return PICK;
    }
      /*If we just talked to an NPC.*/
    case(TALK):{
        if(choice=='a'||choice=='A'){
            dialog(" ");
            return NOTHING;
        }
        if(choice=='q'||choice=='Q'){
            goto quit;
        }
        else return TALK;
    }
      /*We just opened the inventory window.*/
    case(INVENTORY):{
      /*We close the inventory window*/
        if(choice=='i'||choice=='I'){
            dialog(" ");
            return NOTHING;
        }
        if(choice=='q'||choice=='Q'){
            goto quit;
        }
      /*We want to use one of our 10 objects.*/
        if(choice>='0'&&choice<='9'){
            ret = bg_use(IN(inventory),IN(stat),choice-'0',name,&id);
            switch(ret){
              /*Using a ballot box*/
                case(B_BOX):{
                    ret = bg_box(IN(inventory),IN(player),IN(map),IN(stat),choice-'0');
                    if(ret == 1){
                        dialog("You placed a ballot box! Now more people will vote.");
                        IN(boxes)++;
                        return INVENTORY;
                    }
                    else if(ret == 2){
                        dialog("You already have one ballot box placed here...");
                        return INVENTORY;
                    }
                    else if(ret == 0){
                        dialog("You can't place a ballot box here...");
                        return INVENTORY;
                    }
                    else exit(0);
                    }
              /*Using another object*/
                case(1):{
                  switch(id){
                    case(3):{
                      dialog("You used the power of fake news to spread your message even more! Everything went better, just take a look at the stats now...");
                      break;
                    }
                    case(7):{
                      dialog("The canvas was meant to cover the Looney Tunes boat all the time! A lot of civil guards got now in. Danger decreased!");
                      break;
                    }
                    case(8):{
                      dialog("As El Pais will suspect, you now have the full control of Twitter!");
                      break;
                    }
                    case(6):{
                      dialog("Thanks to the sacrifice that means wearing this, your danger decreased!");
                      break;
                    }
                    case(5):{
                      dialog("It's impossible to brush that perfect hair! Chaos increased!");
                      break;
                    }
                    case(13):{
                      dialog("You threw the PujolToken to the floor, and from the smoke JordiPujol appeared to give you money. You won 100 Ç!");
                      break;
                    }
                    case(14):{
                      dialog("Your incredibly disgusting supper made angry the civil guard, so they are occupied now tweeting. Danger decreased!");
                      break;
                    }
                    case(15):{
                      dialog("Filling your pockets with sand won't make Catalonia independent. What are you doing?");
                      break;
                    }
                    default:{
                      sprintf(msg,"You used %s.",name);
                      dialog(msg);
                      break;
                    }
                    return INVENTORY;
                  }
                }
                case(0):{
                    return INVENTORY;
                }
                default: exit(0);
            }
        }
        else return INVENTORY;
    }
    /*We interacted with the shop-keeper, so we are in the shop menu:*/
    case(SHOP):{
        /*Closing the shop window*/
        if(choice=='i'||choice=='I'){
            dialog("See you soon, President!");
            return NOTHING;
        }
        if(choice=='q'||choice=='Q'){
            goto quit;
        }
        /*Buying an object*/
        if(choice>='0'&&choice<='9'){
            ret = bg_buy(IN(shop),IN(inventory),IN(stat),choice-'0',name);
            switch(ret){
                case(1):{
                    sprintf(msg,"You bought %s.",name);
                    dialog(msg);
                return SHOP;
                }
                case(0):{
                    dialog("You don't have enough money...");
                    return SHOP;
                }
                case(B_FULL):{
                    dialog("Your inventory is full! Use one of all your objects before buying another one.");
                    return SHOP;
                }
                default: exit(0);
            }
        }
        else return SHOP;
  }
    /*We have just interacted with a lectern, so that we entered in meeting mode, with the game waiting for answering the first question.*/
    case(MEETING1):{
        if(choice>='1'&&choice<='2'){ /*The if is written like this in case of adding more answers per question.*/
          bg_meeting(IN(meeting),IN(player),IN(objects),IN(stat),0,choice-'0',msg,&correctans);
          if(correctans==0)IN(correct)=0;
          dialog(msg);
          return MEETING2;
        }
        else return MEETING1;
    }
    /*In a meeting answering the second question.*/
    case(MEETING2):{
        if(choice>='1'&&choice<='2'){ /*The if is written like this in case of adding more answers per question.*/
          bg_meeting(IN(meeting),IN(player),IN(objects),IN(stat),1,choice-'0',msg,&correctans);
          if(correctans==0)IN(correct)=0;
          dialog(msg);
          return MEETING3;
        }
        else return MEETING2;
    }
    /*Answering the third question*/
    case(MEETING3):{
        if(choice>='1'&&choice<='2'){ /*The if is written like this in case of adding more answers per question.*/
          bg_meeting(IN(meeting),IN(player),IN(objects),IN(stat),2,choice-'0',msg,&correctans);
          if(correctans==0)IN(correct)=0;
          if(IN(correct)==1)dialog("Excelent meeting President! Now your people will keep distracted the civil guard as your chaos went up!");
          else dialog("What have you done? Do you even know yourself? Your meeting has not been good at all, and you know chaos is important so as to keep the civil guard distracted... Next time talk more with the people.");
          return TALK;
        }
        else return MEETING3;
    }
    /*We pressed Q and the game is asking us to confirm by pressing again Q that we'd like to end the game.*/
    case(QUIT1):{
      if(choice=='q' || choice=='Q') return QUIT2;
      else{
          dialog(" ");
          return NOTHING;
      }
    }
    /*The rest of the situations: When we are moving in the city and we can either open the inventory, quit the game, interact with something as well as keep moving*/
    default:{
        if(choice=='q' || choice=='Q') goto quit;
        if(choice=='i' || choice=='I'){
            dialog("Welcome to your inventory! Press I to close it or press a number for using an object.");
            return INVENTORY;
        }
        if (choice == 27 && fgetc(stdin) == '[') { /* The key is an arrow key */
            choice = fgetc(stdin);
            px = player_get_px(IN(player));
            py = player_get_py(IN(player));
            IN(px)=px;
            IN(py)=py;
            switch(choice) {
                case('A'):{ /*Up*/
                    ret = bg_move(IN(player),px,py-1,IN(map),msg);
                    break;
                }
                case('B'):{ /*Down*/
                    ret = bg_move(IN(player),px,py+1,IN(map),msg);
                    break;
                }
                case('C'):{ /*Left*/
                    ret = bg_move(IN(player),px+1,py,IN(map),msg);
                    break;
                }
                case('D'):{ /*Right*/
                    ret = bg_move(IN(player),px-1,py,IN(map),msg);
                    break;
                }
            }
            switch(ret){
                /*We can't move to that position.*/
                case(B_NOTHING):return NOTHING;
                /*We moved in our screen.*/
                case(B_MOVE):return MOVE;
                /*We changed room. Note that we check if the civil guard is in the screen we moved to, so as to initiate a danger clock.*/
                case(B_SCREEN):{
                    bg_updateRoom(IN(objects),IN(map),IN(player));
                    IN(danger)=bg_checkDanger(IN(map),IN(player),IN(stat));
                    if(IN(danger)==0) dialog(msg);
                    else dialog("Watch out! The civil guard will find you if you stay here too much time!");
                    return SCREEN;
                }
                default: exit(0);
            }
        }
        /*We pressed the interact button.*/
        if(choice=='a' || choice=='A'){
            ret = bg_pick(IN(inventory),IN(player),IN(objects),name,IN(map));
            switch(ret){
                /*There's nothing near to us.*/
                case(B_NOTHING):{
                    return NOTHING;
                }
                /*We picked an object.*/
                case(B_PICK):{
                    sprintf(msg,"You picked %s.",name);
                    dialog(msg);
                    bg_updateRoom(IN(objects),IN(map),IN(player));
                    return PICK;
                }
                /*We talked to someone.*/
                case(B_NPC):{
                    ret = bg_talk(IN(dialogs),IN(player),IN(objects),dlg,name);
                    if (ret==1){
                        sprintf(msg,"%s: %s",name,dlg);
                        dialog(msg);
                        return TALK;
                    }
                }
                /*We started a meeting.*/
                case(B_MEETING):{
                  IN(correct)=1;
                    ret = bg_meeting(IN(meeting),IN(player),IN(objects),IN(stat),0,0,msg,&correctans);
                    if(ret == 3){
                      dialog("You've already done this meeting, President!");
                      return TALK;
                    }
                    dialog(msg);
                    IN(meetings)++;
                    return MEETING1;
                }
                /*We interacted with the shopkeeper, so that we open the shop menu.*/
                case(B_SHOP):{
                    dialog("Welcome to the shop! To exit press I, to buy any product press a number.");
                    return SHOP;
                }
                /*We turned on a printer.*/
                case(B_PRINTER):{
                    dialog("You just turned on a printer! Now the people will have more ballots to vote.");
                    stat_add_motivation(IN(stat),PRINTER_MOTIVATION);
                    IN(printers)++;
                    return TALK;
                }
                case(B_FULL):{
                  dialog("Your inventory is full! Use one of all your objects before picking up another one.");
                  return TALK;
                }
                default: exit(0);
            }
        }
        else return NOTHING;
    }

}
    /*Tag for the quit dialog:*/
    quit: dialog("Are you sure you want to quit? Press Q again to quit, press any key to continue playing");
    return QUIT1;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x980, %rsp            # imm = 0x980
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movl $0x0, -0x930(%rbp)
movl $0x0, -0x934(%rbp)
cmpl $0xb, -0x8(%rbp)
ja 0x6ac3
cmpq $0x0, -0x10(%rbp)
jne 0x6acd
movl $0xffffffff, %edi       # imm = 0xFFFFFFFF
callq 0x11b0
movq -0x10(%rbp), %rax
cmpl $0x5, 0x448(%rax)
jne 0x6b00
movq -0x10(%rbp), %rax
cmpl $0x5, 0x440(%rax)
jne 0x6b00
movq -0x10(%rbp), %rax
cmpl $0x5, 0x444(%rax)
jne 0x6b00
movl $0x1, -0x4(%rbp)
jmp 0x7799
movq 0x64d9(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
callq 0x10c0
movb %al, -0x11(%rbp)
movl -0x8(%rbp), %eax
movq %rax, -0x940(%rbp)
subq $0xb, %rax
ja 0x724c
movq -0x940(%rbp), %rax
leaq 0x2668(%rip), %rcx      # 0x919c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movsbl -0x11(%rbp), %eax
cmpl $0x61, %eax
je 0x6b4f
movsbl -0x11(%rbp), %eax
cmpl $0x41, %eax
jne 0x6b6f
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2fe9(%rip), %rsi      # 0x9b47
callq 0x1040
movl $0x2, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x71, %eax
je 0x6b81
movsbl -0x11(%rbp), %eax
cmpl $0x51, %eax
jne 0x6b86
jmp 0x777e
movl $0x4, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x61, %eax
je 0x6ba4
movsbl -0x11(%rbp), %eax
cmpl $0x41, %eax
jne 0x6bc4
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2f94(%rip), %rsi      # 0x9b47
callq 0x1040
movl $0x2, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x71, %eax
je 0x6bd6
movsbl -0x11(%rbp), %eax
cmpl $0x51, %eax
jne 0x6bdb
jmp 0x777e
movl $0x6, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x69, %eax
je 0x6bf9
movsbl -0x11(%rbp), %eax
cmpl $0x49, %eax
jne 0x6c19
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2f3f(%rip), %rsi      # 0x9b47
callq 0x1040
movl $0x2, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x71, %eax
je 0x6c2b
movsbl -0x11(%rbp), %eax
cmpl $0x51, %eax
jne 0x6c30
jmp 0x777e
movsbl -0x11(%rbp), %eax
cmpl $0x30, %eax
jl 0x6ea9
movsbl -0x11(%rbp), %eax
cmpl $0x39, %eax
jg 0x6ea9
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rsi
movq 0x20(%rax), %rdi
movsbl -0x11(%rbp), %edx
addl $-0x30, %edx
leaq -0x120(%rbp), %rcx
leaq -0x934(%rbp), %r8
callq 0x4170
movl %eax, -0x924(%rbp)
movl -0x924(%rbp), %eax
movl %eax, -0x944(%rbp)
testl %eax, %eax
je 0x6e96
jmp 0x6c8c
movl -0x944(%rbp), %eax
subl $0x1, %eax
je 0x6d76
jmp 0x6c9d
movl -0x944(%rbp), %eax
subl $0x6, %eax
jne 0x6ea2
jmp 0x6cae
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movsbl -0x11(%rbp), %r8d
subl $0x30, %r8d
callq 0x4040
movl %eax, -0x924(%rbp)
cmpl $0x1, -0x924(%rbp)
jne 0x6d1d
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x260b(%rip), %rsi      # 0x9304
callq 0x1040
movq -0x10(%rbp), %rax
movl 0x440(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x440(%rax)
movl $0x7, -0x4(%rbp)
jmp 0x7799
cmpl $0x2, -0x924(%rbp)
jne 0x6d46
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2603(%rip), %rsi      # 0x9338
callq 0x1040
movl $0x7, -0x4(%rbp)
jmp 0x7799
cmpl $0x0, -0x924(%rbp)
jne 0x6d6f
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2609(%rip), %rsi      # 0x9367
callq 0x1040
movl $0x7, -0x4(%rbp)
jmp 0x7799
xorl %edi, %edi
callq 0x11b0
movl -0x934(%rbp), %eax
addl $-0x3, %eax
movl %eax, %ecx
movq %rcx, -0x950(%rbp)
subl $0xc, %eax
ja 0x6e64
movq -0x950(%rbp), %rax
leaq 0x242d(%rip), %rcx      # 0x91cc
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x25d5(%rip), %rsi      # 0x938c
callq 0x1040
jmp 0x6e94
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x263b(%rip), %rsi      # 0x940b
callq 0x1040
jmp 0x6e94
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2698(%rip), %rsi      # 0x9481
callq 0x1040
jmp 0x6e94
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x26c2(%rip), %rsi      # 0x94c4
callq 0x1040
jmp 0x6e94
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x26f1(%rip), %rsi      # 0x950c
callq 0x1040
jmp 0x6e94
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2718(%rip), %rsi      # 0x9549
callq 0x1040
jmp 0x6e94
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2773(%rip), %rsi      # 0x95ba
callq 0x1040
jmp 0x6e94
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x27d0(%rip), %rsi      # 0x962d
callq 0x1040
jmp 0x6e94
leaq -0x520(%rbp), %rdi
leaq -0x120(%rbp), %rdx
leaq 0x2809(%rip), %rsi      # 0x9682
movb $0x0, %al
callq 0x11a0
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq -0x520(%rbp), %rsi
callq 0x1040
jmp 0x6e96
movl $0x7, -0x4(%rbp)
jmp 0x7799
xorl %edi, %edi
callq 0x11b0
movl $0x7, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x69, %eax
je 0x6ec7
movsbl -0x11(%rbp), %eax
cmpl $0x49, %eax
jne 0x6ee7
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x27b9(%rip), %rsi      # 0x968f
callq 0x1040
movl $0x2, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x71, %eax
je 0x6ef9
movsbl -0x11(%rbp), %eax
cmpl $0x51, %eax
jne 0x6efe
jmp 0x777e
movsbl -0x11(%rbp), %eax
cmpl $0x30, %eax
jl 0x6ff1
movsbl -0x11(%rbp), %eax
cmpl $0x39, %eax
jg 0x6ff1
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
movq 0x8(%rax), %rdx
movq 0x20(%rax), %rsi
movsbl -0x11(%rbp), %ecx
addl $-0x30, %ecx
leaq -0x120(%rbp), %r8
callq 0x4310
cwtl
movl %eax, -0x924(%rbp)
movl -0x924(%rbp), %eax
movl %eax, -0x954(%rbp)
testl %eax, %eax
je 0x6faa
jmp 0x6f54
movl -0x954(%rbp), %eax
subl $0x1, %eax
je 0x6f6e
jmp 0x6f61
movl -0x954(%rbp), %eax
subl $0xb, %eax
je 0x6fca
jmp 0x6fea
leaq -0x520(%rbp), %rdi
leaq -0x120(%rbp), %rdx
leaq 0x2725(%rip), %rsi      # 0x96a8
movb $0x0, %al
callq 0x11a0
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq -0x520(%rbp), %rsi
callq 0x1040
movl $0x8, -0x4(%rbp)
jmp 0x7799
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x26fe(%rip), %rsi      # 0x96b7
callq 0x1040
movl $0x8, -0x4(%rbp)
jmp 0x7799
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x26fd(%rip), %rsi      # 0x96d6
callq 0x1040
movl $0x8, -0x4(%rbp)
jmp 0x7799
xorl %edi, %edi
callq 0x11b0
movl $0x8, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x31, %eax
jl 0x7091
movsbl -0x11(%rbp), %eax
cmpl $0x32, %eax
jg 0x7091
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movsbl -0x11(%rbp), %r9d
subl $0x30, %r9d
leaq -0x520(%rbp), %r10
xorl %r8d, %r8d
leaq -0x930(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4560
cmpl $0x0, -0x930(%rbp)
jne 0x7071
movq -0x10(%rbp), %rax
movl $0x0, 0x458(%rax)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq -0x520(%rbp), %rsi
callq 0x1040
movl $0xa, -0x4(%rbp)
jmp 0x7799
movl $0x9, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x31, %eax
jl 0x7138
movsbl -0x11(%rbp), %eax
cmpl $0x32, %eax
jg 0x7138
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movsbl -0x11(%rbp), %r9d
subl $0x30, %r9d
leaq -0x520(%rbp), %r10
movl $0x1, %r8d
leaq -0x930(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4560
cmpl $0x0, -0x930(%rbp)
jne 0x7118
movq -0x10(%rbp), %rax
movl $0x0, 0x458(%rax)
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq -0x520(%rbp), %rsi
callq 0x1040
movl $0xb, -0x4(%rbp)
jmp 0x7799
movl $0xa, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x31, %eax
jl 0x7202
movsbl -0x11(%rbp), %eax
cmpl $0x32, %eax
jg 0x7202
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
movsbl -0x11(%rbp), %r9d
subl $0x30, %r9d
leaq -0x520(%rbp), %r10
movl $0x2, %r8d
leaq -0x930(%rbp), %rax
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4560
cmpl $0x0, -0x930(%rbp)
jne 0x71bf
movq -0x10(%rbp), %rax
movl $0x0, 0x458(%rax)
movq -0x10(%rbp), %rax
cmpl $0x1, 0x458(%rax)
jne 0x71e2
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x254a(%rip), %rsi      # 0x9725
callq 0x1040
jmp 0x71f6
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x259c(%rip), %rsi      # 0x978d
callq 0x1040
movl $0x6, -0x4(%rbp)
jmp 0x7799
movl $0xb, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x71, %eax
je 0x7220
movsbl -0x11(%rbp), %eax
cmpl $0x51, %eax
jne 0x722c
movl $0x1, -0x4(%rbp)
jmp 0x7799
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x290c(%rip), %rsi      # 0x9b47
callq 0x1040
movl $0x2, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x71, %eax
je 0x725e
movsbl -0x11(%rbp), %eax
cmpl $0x51, %eax
jne 0x7263
jmp 0x777e
movsbl -0x11(%rbp), %eax
cmpl $0x69, %eax
je 0x7275
movsbl -0x11(%rbp), %eax
cmpl $0x49, %eax
jne 0x7295
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x25d0(%rip), %rsi      # 0x9854
callq 0x1040
movl $0x7, -0x4(%rbp)
jmp 0x7799
movsbl -0x11(%rbp), %eax
cmpl $0x1b, %eax
jne 0x74f3
movq 0x5d37(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
callq 0x10c0
cmpl $0x5b, %eax
jne 0x74f3
movq 0x5d1f(%rip), %rax      # 0xcfe0
movq (%rax), %rdi
callq 0x10c0
movb %al, -0x11(%rbp)
movq -0x10(%rbp), %rax
movq (%rax), %rdi
xorl %eax, %eax
movb %al, -0x961(%rbp)
callq 0x5910
movl %eax, %ecx
movb -0x961(%rbp), %al
movl %ecx, -0x928(%rbp)
movq -0x10(%rbp), %rcx
movq (%rcx), %rdi
callq 0x5940
movl %eax, -0x92c(%rbp)
movl -0x928(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x450(%rax)
movl -0x92c(%rbp), %ecx
movq -0x10(%rbp), %rax
movl %ecx, 0x454(%rax)
movsbl -0x11(%rbp), %eax
addl $-0x41, %eax
movl %eax, %ecx
movq %rcx, -0x960(%rbp)
subl $0x3, %eax
ja 0x7419
movq -0x960(%rbp), %rax
leaq 0x1ee9(%rip), %rcx      # 0x9230
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x928(%rbp), %esi
movl -0x92c(%rbp), %edx
subl $0x1, %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
leaq -0x520(%rbp), %r8
callq 0x3710
movl %eax, -0x924(%rbp)
jmp 0x7419
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x928(%rbp), %esi
movl -0x92c(%rbp), %edx
addl $0x1, %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
leaq -0x520(%rbp), %r8
callq 0x3710
movl %eax, -0x924(%rbp)
jmp 0x7419
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x928(%rbp), %esi
addl $0x1, %esi
movl -0x92c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
leaq -0x520(%rbp), %r8
callq 0x3710
movl %eax, -0x924(%rbp)
jmp 0x7419
movq -0x10(%rbp), %rax
movq (%rax), %rdi
movl -0x928(%rbp), %esi
subl $0x1, %esi
movl -0x92c(%rbp), %edx
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rcx
leaq -0x520(%rbp), %r8
callq 0x3710
movl %eax, -0x924(%rbp)
movl -0x924(%rbp), %eax
movl %eax, -0x968(%rbp)
testl %eax, %eax
je 0x7448
jmp 0x742b
movl -0x968(%rbp), %eax
subl $0x1, %eax
je 0x7454
jmp 0x7438
movl -0x968(%rbp), %eax
subl $0x2, %eax
je 0x7460
jmp 0x74ec
movl $0x2, -0x4(%rbp)
jmp 0x7799
movl $0x3, -0x4(%rbp)
jmp 0x7799
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
callq 0x3b00
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdx
callq 0x3d90
movw %ax, %cx
movq -0x10(%rbp), %rax
movw %cx, 0x44c(%rax)
movq -0x10(%rbp), %rax
movswl 0x44c(%rax), %eax
cmpl $0x0, %eax
jne 0x74cc
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq -0x520(%rbp), %rsi
callq 0x1040
jmp 0x74e0
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x23cf(%rip), %rsi      # 0x98aa
callq 0x1040
movl $0x5, -0x4(%rbp)
jmp 0x7799
xorl %edi, %edi
callq 0x11b0
movsbl -0x11(%rbp), %eax
cmpl $0x61, %eax
je 0x7509
movsbl -0x11(%rbp), %eax
cmpl $0x41, %eax
jne 0x7775
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
movq 0x18(%rax), %rdx
movq (%rax), %rsi
movq 0x10(%rax), %r8
leaq -0x120(%rbp), %rcx
callq 0x3e30
movl %eax, -0x924(%rbp)
movl -0x924(%rbp), %eax
movq %rax, -0x970(%rbp)
subq $0xb, %rax
ja 0x776e
movq -0x970(%rbp), %rax
leaq 0x1cad(%rip), %rcx      # 0x9200
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movl $0x2, -0x4(%rbp)
jmp 0x7799
leaq -0x520(%rbp), %rdi
leaq -0x120(%rbp), %rdx
leaq 0x2376(%rip), %rsi      # 0x98f3
movb $0x0, %al
callq 0x11a0
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq -0x520(%rbp), %rsi
callq 0x1040
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rsi
movq -0x10(%rbp), %rax
movq (%rax), %rdx
callq 0x3b00
movl $0x4, -0x4(%rbp)
jmp 0x7799
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
leaq -0x920(%rbp), %rcx
leaq -0x120(%rbp), %r8
callq 0x4430
movl %eax, -0x924(%rbp)
cmpl $0x1, -0x924(%rbp)
jne 0x763c
leaq -0x520(%rbp), %rdi
leaq -0x120(%rbp), %rdx
leaq -0x920(%rbp), %rcx
leaq 0x22ed(%rip), %rsi      # 0x9902
movb $0x0, %al
callq 0x11a0
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq -0x520(%rbp), %rsi
callq 0x1040
movl $0x6, -0x4(%rbp)
jmp 0x7799
jmp 0x763e
movq -0x10(%rbp), %rax
movl $0x1, 0x458(%rax)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
movq -0x10(%rbp), %rax
movq (%rax), %rsi
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdx
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rcx
leaq -0x520(%rbp), %r10
xorl %r9d, %r9d
leaq -0x930(%rbp), %rax
movl %r9d, %r8d
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
callq 0x4560
movl %eax, -0x924(%rbp)
cmpl $0x3, -0x924(%rbp)
jne 0x76bc
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x225e(%rip), %rsi      # 0x9909
callq 0x1040
movl $0x6, -0x4(%rbp)
jmp 0x7799
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq -0x520(%rbp), %rsi
callq 0x1040
movq -0x10(%rbp), %rax
movl 0x448(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x448(%rax)
movl $0x9, -0x4(%rbp)
jmp 0x7799
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2238(%rip), %rsi      # 0x9936
callq 0x1040
movl $0x8, -0x4(%rbp)
jmp 0x7799
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2261(%rip), %rsi      # 0x997f
callq 0x1040
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
movl $0x96, %esi
callq 0x60a0
movq -0x10(%rbp), %rax
movl 0x444(%rax), %ecx
addl $0x1, %ecx
movl %ecx, 0x444(%rax)
movl $0x6, -0x4(%rbp)
jmp 0x7799
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x226c(%rip), %rsi      # 0x99cc
callq 0x1040
movl $0x6, -0x4(%rbp)
jmp 0x7799
xorl %edi, %edi
callq 0x11b0
movl $0x2, -0x4(%rbp)
jmp 0x7799
movq -0x10(%rbp), %rdi
addq $0x40, %rdi
leaq 0x2292(%rip), %rsi      # 0x9a1f
callq 0x1040
movl $0x0, -0x4(%rbp)
movl -0x4(%rbp), %eax
addq $0x980, %rsp            # imm = 0x980
popq %rbp
retq
nopw %cs:(%rax,%rax)
nop