// File: kongrigoriou[P]Text-Based-RPG/src/Market.cpp
// Function: Market::buy()
void Market::buy(){

	cout << "Which hero is buying?Type their name" << endl;
	string hero_name;
	Hero* h;
	list<Hero*> :: iterator hr;
	list <Hero*> hrList;
	list<Weapon*> ::iterator it;
	int flag = 0;

	int heroFlag = 0;													//check if the hero name exists
	while(heroFlag == 0){
		cin >> hero_name;
		hrList = team->get_HeroList();
		for(hr = hrList.begin(); hr != hrList.end(); ++hr){
			if((*hr)->get_name() == hero_name){
				h = *hr;
				heroFlag = 1;
				break;
			}
		}
		if(heroFlag == 0){
			cout << "I could not find that name. Try again" << endl;
			cin >> hero_name;
		}
	}

	cout << "What item do you want to buy? Press 1 for Weapon,2 for Armor,3 for Potion,4 for Spell" << endl;
	string answer;
	cin >> answer;
	while(answer != "1" && answer!= "2" && answer!="3" && answer!="4" ){
		cout <<"Wrong input,try again" << endl;
		cin >> answer;
	}
	displayItems();

	if(answer == "1"){

		cout << "Type the name of the weapon you want to buy" << endl;
		string weapon_name;
		cin >> weapon_name;
		
		while(flag == 0){
			for (it = Weapons.begin(); it !=  Weapons.end(); ++it){
				if(weapon_name == (*it)->get_name()){
					flag = 1;
					h->buy_Weapon(*it);
					cout << h->GetWeaponsListSize() << endl;
				}
			}
			if(flag==0){
				cout <<"Weapon doesnt exist.Try again" << endl;
				cin >> weapon_name;
			}	
		}

	}else if(answer == "2"){

		cout << "Type the name of the armor you want to buy" << endl;
		string armor_name;
		cin >> armor_name;
		list<Armor*> :: iterator ar;
		flag = 0;

		while(flag == 0){
			for(ar = Armors.begin(); ar != Armors.end(); ++ar){
				if(armor_name == (*ar)->get_name()){
					flag = 1;
					h->buy_Armor(*ar);
				}
			}
			if(flag==0){
				cout <<"Armor doesnt exist.Try again" << endl;
				cin >> armor_name;
			}
		}

	}else if(answer == "3"){

		cout << "Type the name of the potion you want to buy" << endl;
		string potion_name;
		cin >> potion_name;
		list<Potion*> :: iterator pt;
		flag = 0;

		while(flag == 0){
			for(pt = Potions.begin(); pt != Potions.end(); ++pt){
				if(potion_name == (*pt)->get_name()){
					flag = 1;
					h->buy_Potion(*pt);
				}
			}
			if(flag==0){
				cout <<"Potion doesnt exist.Try again" << endl;
				cin >> potion_name;
			}
		}

	}else if(answer == "4"){

		cout << "Type the name of the ice spell you want to buy" << endl;
		string spell_name;
		cin >> spell_name;
		list<Spell*> :: iterator is;
		flag = 0;

		while( flag == 0){
			for(is = Spells.begin(); is!= Spells.end(); ++is){
				if(spell_name == (*is)->get_name()){
					flag = 1;
					h->buy_Spell(*is);
				}
			}
			if(flag == 0){
				cout <<"Spell doesnt exist.Try again" << endl;
				cin >> spell_name;
			}
		}
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x340, %rsp            # imm = 0x340
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x238(%rbp)
movq 0x12a7f(%rip), %rdi     # 0x1efd0
leaq 0x916b(%rip), %rsi      # 0x156c3
callq 0x31e0
movq %rax, %rdi
movq 0x12a59(%rip), %rsi     # 0x1efc0
callq 0x3210
leaq -0x28(%rbp), %rdi
callq 0x32c0
leaq -0x38(%rbp), %rdi
callq 0xde50
leaq -0x50(%rbp), %rdi
callq 0xde70
leaq -0x58(%rbp), %rdi
callq 0x7ad0
movl $0x0, -0x5c(%rbp)
movl $0x0, -0x60(%rbp)
cmpl $0x0, -0x60(%rbp)
jne 0xc705
movq 0x12a31(%rip), %rdi     # 0x1efe0
leaq -0x28(%rbp), %rsi
callq 0x32a0
jmp 0xc5ba
movq -0x238(%rbp), %rax
movq 0x78(%rax), %rsi
leaq -0x88(%rbp), %rdi
callq 0x14050
jmp 0xc5d3
leaq -0x50(%rbp), %rdi
leaq -0x88(%rbp), %rsi
callq 0xde90
leaq -0x88(%rbp), %rdi
callq 0xdec0
leaq -0x50(%rbp), %rdi
callq 0xdee0
movq %rax, -0x90(%rbp)
movq -0x90(%rbp), %rax
movq %rax, -0x38(%rbp)
leaq -0x50(%rbp), %rdi
callq 0xdf40
movq %rax, -0x98(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0xdf10
testb $0x1, %al
jne 0xc633
jmp 0xc6b5
leaq -0x38(%rbp), %rdi
callq 0xdf70
movq (%rax), %rsi
leaq -0xb8(%rbp), %rdi
callq 0x4df0
jmp 0xc64d
leaq -0xb8(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x7eb0
movb %al, -0x239(%rbp)
leaq -0xb8(%rbp), %rdi
callq 0x3120
movb -0x239(%rbp), %al
testb $0x1, %al
jne 0xc67b
jmp 0xc6a5
leaq -0x38(%rbp), %rdi
callq 0xdf70
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x1, -0x60(%rbp)
jmp 0xc6b5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xd10e
jmp 0xc6a7
leaq -0x38(%rbp), %rdi
callq 0xdf90
jmp 0xc60a
cmpl $0x0, -0x60(%rbp)
jne 0xc700
movq 0x1290e(%rip), %rdi     # 0x1efd0
leaq 0x901f(%rip), %rsi      # 0x156e8
callq 0x31e0
movq %rax, -0x248(%rbp)
jmp 0xc6d7
movq -0x248(%rbp), %rdi
movq 0x128db(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xc6ec
movq 0x128ed(%rip), %rdi     # 0x1efe0
leaq -0x28(%rbp), %rsi
callq 0x32a0
jmp 0xc6fe
jmp 0xc700
jmp 0xc59e
movq 0x128c4(%rip), %rdi     # 0x1efd0
leaq 0x8ffb(%rip), %rsi      # 0x1570e
callq 0x31e0
movq %rax, -0x250(%rbp)
jmp 0xc721
movq -0x250(%rbp), %rdi
movq 0x12891(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xc736
leaq -0xd8(%rbp), %rdi
movq %rdi, -0x258(%rbp)
callq 0x32c0
movq -0x258(%rbp), %rsi
movq 0x12889(%rip), %rdi     # 0x1efe0
callq 0x32a0
jmp 0xc75e
jmp 0xc760
leaq 0x8f58(%rip), %rsi      # 0x156bf
leaq -0xd8(%rbp), %rdi
callq 0xdfb0
movb %al, -0x259(%rbp)
jmp 0xc77b
movb -0x259(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x25a(%rbp)
jne 0xc793
jmp 0xc81c
leaq 0x8f27(%rip), %rsi      # 0x156c1
leaq -0xd8(%rbp), %rdi
callq 0xdfb0
movb %al, -0x25b(%rbp)
jmp 0xc7ae
movb -0x25b(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x25a(%rbp)
jne 0xc7c3
jmp 0xc81c
leaq 0x8f9a(%rip), %rsi      # 0x15764
leaq -0xd8(%rbp), %rdi
callq 0xdfb0
movb %al, -0x25c(%rbp)
jmp 0xc7de
movb -0x25c(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x25a(%rbp)
jne 0xc7f3
jmp 0xc81c
leaq 0x8f6c(%rip), %rsi      # 0x15766
leaq -0xd8(%rbp), %rdi
callq 0xdfb0
movb %al, -0x25d(%rbp)
jmp 0xc80e
movb -0x25d(%rbp), %al
movb %al, -0x25a(%rbp)
jmp 0xc81c
movb -0x25a(%rbp), %al
testb $0x1, %al
jne 0xc828
jmp 0xc884
movq 0x127a1(%rip), %rdi     # 0x1efd0
leaq 0x8f32(%rip), %rsi      # 0x15768
callq 0x31e0
movq %rax, -0x268(%rbp)
jmp 0xc844
movq -0x268(%rbp), %rdi
movq 0x1276e(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xc859
movq 0x12780(%rip), %rdi     # 0x1efe0
leaq -0xd8(%rbp), %rsi
callq 0x32a0
jmp 0xc86e
jmp 0xc760
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
jmp 0xd102
movq -0x238(%rbp), %rdi
callq 0xbb20
jmp 0xc892
leaq 0x8e26(%rip), %rsi      # 0x156bf
leaq -0xd8(%rbp), %rdi
callq 0x7f70
movb %al, -0x269(%rbp)
jmp 0xc8ad
movb -0x269(%rbp), %al
testb $0x1, %al
jne 0xc8bc
jmp 0xcab9
movq 0x1270d(%rip), %rdi     # 0x1efd0
leaq 0x8eb4(%rip), %rsi      # 0x1577e
callq 0x31e0
movq %rax, -0x278(%rbp)
jmp 0xc8d8
movq -0x278(%rbp), %rdi
movq 0x126da(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xc8ed
leaq -0xf8(%rbp), %rdi
movq %rdi, -0x280(%rbp)
callq 0x32c0
movq -0x280(%rbp), %rsi
movq 0x126d2(%rip), %rdi     # 0x1efe0
callq 0x32a0
jmp 0xc915
jmp 0xc917
cmpl $0x0, -0x5c(%rbp)
jne 0xcaa8
movq -0x238(%rbp), %rdi
callq 0x7b50
movq %rax, -0x100(%rbp)
movq -0x100(%rbp), %rax
movq %rax, -0x58(%rbp)
movq -0x238(%rbp), %rdi
callq 0x7bb0
movq %rax, -0x108(%rbp)
leaq -0x58(%rbp), %rdi
leaq -0x108(%rbp), %rsi
callq 0x7b80
testb $0x1, %al
jne 0xc96b
jmp 0xca55
leaq -0x58(%rbp), %rdi
callq 0x7be0
movq (%rax), %rsi
leaq -0x128(%rbp), %rdi
callq 0x12640
jmp 0xc985
leaq -0xf8(%rbp), %rdi
leaq -0x128(%rbp), %rsi
callq 0x7eb0
movb %al, -0x281(%rbp)
leaq -0x128(%rbp), %rdi
callq 0x3120
movb -0x281(%rbp), %al
testb $0x1, %al
jne 0xc9b9
jmp 0xca45
movl $0x1, -0x5c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x290(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x7be0
movq -0x290(%rbp), %rdi
movq (%rax), %rsi
callq 0x5160
jmp 0xc9e5
movq -0x30(%rbp), %rdi
callq 0x66a0
movl %eax, -0x294(%rbp)
jmp 0xc9f6
movl -0x294(%rbp), %esi
movq 0x125cd(%rip), %rdi     # 0x1efd0
callq 0x3320
movq %rax, -0x2a0(%rbp)
jmp 0xca11
movq -0x2a0(%rbp), %rdi
movq 0x125a1(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xca26
jmp 0xca45
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0xf8(%rbp), %rdi
callq 0x3120
jmp 0xd102
jmp 0xca47
leaq -0x58(%rbp), %rdi
callq 0x7c00
jmp 0xc93f
cmpl $0x0, -0x5c(%rbp)
jne 0xcaa3
movq 0x1256e(%rip), %rdi     # 0x1efd0
leaq 0x8d41(%rip), %rsi      # 0x157aa
callq 0x31e0
movq %rax, -0x2a8(%rbp)
jmp 0xca77
movq -0x2a8(%rbp), %rdi
movq 0x1253b(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xca8c
movq 0x1254d(%rip), %rdi     # 0x1efe0
leaq -0xf8(%rbp), %rsi
callq 0x32a0
jmp 0xcaa1
jmp 0xcaa3
jmp 0xc917
leaq -0xf8(%rbp), %rdi
callq 0x3120
jmp 0xd0db
leaq 0x8c01(%rip), %rsi      # 0x156c1
leaq -0xd8(%rbp), %rdi
callq 0x7f70
movb %al, -0x2a9(%rbp)
jmp 0xcad4
movb -0x2a9(%rbp), %al
testb $0x1, %al
jne 0xcae3
jmp 0xccc4
movq 0x124e6(%rip), %rdi     # 0x1efd0
leaq 0x8cd7(%rip), %rsi      # 0x157c8
callq 0x31e0
movq %rax, -0x2b8(%rbp)
jmp 0xcaff
movq -0x2b8(%rbp), %rdi
movq 0x124b3(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xcb14
leaq -0x148(%rbp), %rdi
movq %rdi, -0x2c0(%rbp)
callq 0x32c0
movq -0x2c0(%rbp), %rsi
movq 0x124ab(%rip), %rdi     # 0x1efe0
callq 0x32a0
jmp 0xcb3c
leaq -0x150(%rbp), %rdi
callq 0x7af0
movl $0x0, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jne 0xccb3
movq -0x238(%rbp), %rdi
addq $0x18, %rdi
callq 0x7c20
movq %rax, -0x158(%rbp)
movq -0x158(%rbp), %rax
movq %rax, -0x150(%rbp)
movq -0x238(%rbp), %rdi
addq $0x18, %rdi
callq 0x7c80
movq %rax, -0x160(%rbp)
leaq -0x150(%rbp), %rdi
leaq -0x160(%rbp), %rsi
callq 0x7c50
testb $0x1, %al
jne 0xcbb1
jmp 0xcc60
leaq -0x150(%rbp), %rdi
callq 0x7cb0
movq (%rax), %rsi
leaq -0x180(%rbp), %rdi
callq 0x12640
jmp 0xcbce
leaq -0x148(%rbp), %rdi
leaq -0x180(%rbp), %rsi
callq 0x7eb0
movb %al, -0x2c1(%rbp)
leaq -0x180(%rbp), %rdi
callq 0x3120
movb -0x2c1(%rbp), %al
testb $0x1, %al
jne 0xcbff
jmp 0xcc4d
movl $0x1, -0x5c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x2d0(%rbp)
leaq -0x150(%rbp), %rdi
callq 0x7cb0
movq -0x2d0(%rbp), %rdi
movq (%rax), %rsi
callq 0x5260
jmp 0xcc2e
jmp 0xcc4d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x148(%rbp), %rdi
callq 0x3120
jmp 0xd102
jmp 0xcc4f
leaq -0x150(%rbp), %rdi
callq 0x7cd0
jmp 0xcb7e
cmpl $0x0, -0x5c(%rbp)
jne 0xccae
movq 0x12363(%rip), %rdi     # 0x1efd0
leaq 0x8b7f(%rip), %rsi      # 0x157f3
callq 0x31e0
movq %rax, -0x2d8(%rbp)
jmp 0xcc82
movq -0x2d8(%rbp), %rdi
movq 0x12330(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xcc97
movq 0x12342(%rip), %rdi     # 0x1efe0
leaq -0x148(%rbp), %rsi
callq 0x32a0
jmp 0xccac
jmp 0xccae
jmp 0xcb4f
leaq -0x148(%rbp), %rdi
callq 0x3120
jmp 0xd0d9
leaq 0x8a99(%rip), %rsi      # 0x15764
leaq -0xd8(%rbp), %rdi
callq 0x7f70
movb %al, -0x2d9(%rbp)
jmp 0xccdf
movb -0x2d9(%rbp), %al
testb $0x1, %al
jne 0xccee
jmp 0xcecf
movq 0x122db(%rip), %rdi     # 0x1efd0
leaq 0x8b14(%rip), %rsi      # 0x15810
callq 0x31e0
movq %rax, -0x2e8(%rbp)
jmp 0xcd0a
movq -0x2e8(%rbp), %rdi
movq 0x122a8(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xcd1f
leaq -0x1a0(%rbp), %rdi
movq %rdi, -0x2f0(%rbp)
callq 0x32c0
movq -0x2f0(%rbp), %rsi
movq 0x122a0(%rip), %rdi     # 0x1efe0
callq 0x32a0
jmp 0xcd47
leaq -0x1a8(%rbp), %rdi
callq 0x7b10
movl $0x0, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jne 0xcebe
movq -0x238(%rbp), %rdi
addq $0x30, %rdi
callq 0x7cf0
movq %rax, -0x1b0(%rbp)
movq -0x1b0(%rbp), %rax
movq %rax, -0x1a8(%rbp)
movq -0x238(%rbp), %rdi
addq $0x30, %rdi
callq 0x7d50
movq %rax, -0x1b8(%rbp)
leaq -0x1a8(%rbp), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x7d20
testb $0x1, %al
jne 0xcdbc
jmp 0xce6b
leaq -0x1a8(%rbp), %rdi
callq 0x7d80
movq (%rax), %rsi
leaq -0x1d8(%rbp), %rdi
callq 0x12640
jmp 0xcdd9
leaq -0x1a0(%rbp), %rdi
leaq -0x1d8(%rbp), %rsi
callq 0x7eb0
movb %al, -0x2f1(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0x3120
movb -0x2f1(%rbp), %al
testb $0x1, %al
jne 0xce0a
jmp 0xce58
movl $0x1, -0x5c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x300(%rbp)
leaq -0x1a8(%rbp), %rdi
callq 0x7d80
movq -0x300(%rbp), %rdi
movq (%rax), %rsi
callq 0x5360
jmp 0xce39
jmp 0xce58
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1a0(%rbp), %rdi
callq 0x3120
jmp 0xd102
jmp 0xce5a
leaq -0x1a8(%rbp), %rdi
callq 0x7da0
jmp 0xcd89
cmpl $0x0, -0x5c(%rbp)
jne 0xceb9
movq 0x12158(%rip), %rdi     # 0x1efd0
leaq 0x89bd(%rip), %rsi      # 0x1583c
callq 0x31e0
movq %rax, -0x308(%rbp)
jmp 0xce8d
movq -0x308(%rbp), %rdi
movq 0x12125(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xcea2
movq 0x12137(%rip), %rdi     # 0x1efe0
leaq -0x1a0(%rbp), %rsi
callq 0x32a0
jmp 0xceb7
jmp 0xceb9
jmp 0xcd5a
leaq -0x1a0(%rbp), %rdi
callq 0x3120
jmp 0xd0d7
leaq 0x8890(%rip), %rsi      # 0x15766
leaq -0xd8(%rbp), %rdi
callq 0x7f70
movb %al, -0x309(%rbp)
jmp 0xceea
movb -0x309(%rbp), %al
testb $0x1, %al
jne 0xcef9
jmp 0xd0d5
movq 0x120d0(%rip), %rdi     # 0x1efd0
leaq 0x8953(%rip), %rsi      # 0x1585a
callq 0x31e0
movq %rax, -0x318(%rbp)
jmp 0xcf15
movq -0x318(%rbp), %rdi
movq 0x1209d(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xcf2a
leaq -0x1f8(%rbp), %rdi
movq %rdi, -0x320(%rbp)
callq 0x32c0
movq -0x320(%rbp), %rsi
movq 0x12095(%rip), %rdi     # 0x1efe0
callq 0x32a0
jmp 0xcf52
leaq -0x200(%rbp), %rdi
callq 0x7b30
movl $0x0, -0x5c(%rbp)
cmpl $0x0, -0x5c(%rbp)
jne 0xd0c9
movq -0x238(%rbp), %rdi
addq $0x48, %rdi
callq 0x7dc0
movq %rax, -0x208(%rbp)
movq -0x208(%rbp), %rax
movq %rax, -0x200(%rbp)
movq -0x238(%rbp), %rdi
addq $0x48, %rdi
callq 0x7e20
movq %rax, -0x210(%rbp)
leaq -0x200(%rbp), %rdi
leaq -0x210(%rbp), %rsi
callq 0x7df0
testb $0x1, %al
jne 0xcfc7
jmp 0xd076
leaq -0x200(%rbp), %rdi
callq 0x7e50
movq (%rax), %rsi
leaq -0x230(%rbp), %rdi
callq 0x12640
jmp 0xcfe4
leaq -0x1f8(%rbp), %rdi
leaq -0x230(%rbp), %rsi
callq 0x7eb0
movb %al, -0x321(%rbp)
leaq -0x230(%rbp), %rdi
callq 0x3120
movb -0x321(%rbp), %al
testb $0x1, %al
jne 0xd015
jmp 0xd063
movl $0x1, -0x5c(%rbp)
movq -0x30(%rbp), %rax
movq %rax, -0x330(%rbp)
leaq -0x200(%rbp), %rdi
callq 0x7e50
movq -0x330(%rbp), %rdi
movq (%rax), %rsi
callq 0x5460
jmp 0xd044
jmp 0xd063
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x68(%rbp)
movl %eax, -0x6c(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x3120
jmp 0xd102
jmp 0xd065
leaq -0x200(%rbp), %rdi
callq 0x7e70
jmp 0xcf94
cmpl $0x0, -0x5c(%rbp)
jne 0xd0c4
movq 0x11f4d(%rip), %rdi     # 0x1efd0
leaq 0x87ff(%rip), %rsi      # 0x15889
callq 0x31e0
movq %rax, -0x338(%rbp)
jmp 0xd098
movq -0x338(%rbp), %rdi
movq 0x11f1a(%rip), %rsi     # 0x1efc0
callq 0x3210
jmp 0xd0ad
movq 0x11f2c(%rip), %rdi     # 0x1efe0
leaq -0x1f8(%rbp), %rsi
callq 0x32a0
jmp 0xd0c2
jmp 0xd0c4
jmp 0xcf65
leaq -0x1f8(%rbp), %rdi
callq 0x3120
jmp 0xd0d7
jmp 0xd0d9
jmp 0xd0db
leaq -0xd8(%rbp), %rdi
callq 0x3120
leaq -0x50(%rbp), %rdi
callq 0xdec0
leaq -0x28(%rbp), %rdi
callq 0x3120
addq $0x340, %rsp            # imm = 0x340
popq %rbp
retq
leaq -0xd8(%rbp), %rdi
callq 0x3120
leaq -0x50(%rbp), %rdi
callq 0xdec0
leaq -0x28(%rbp), %rdi
callq 0x3120
movq -0x68(%rbp), %rdi
callq 0x3330
nopl (%rax)