// File: permui[P]CastleAdventure/src/games.cpp
// Function: games::int_game(Player&, Grid&, std::map<Position, Grid, std::less<Position>, std::allocator<std::pair<Position const, Grid>>>&)
void int_game(Player &player, Grid&, Map&) {
		random_device r;
		default_random_engine eng(r());
		uniform_int_distribution<int> coef(1, int_param.first);
		uniform_int_distribution<int> expo(1, int_param.second);
		uniform_int_distribution<int> uppe(1, int_upper_limit_max);
		int c = coef(eng), e = expo(eng), u = uppe(eng);
		double ans = pow(u, e + 1) * c / (e + 1);
		cout << "Answer the following question **accurate to at least 1 decimal place** in " << int_time << " seconds" << endl;
		cout << "integrate ";
		if (c > 1) cout << c << " ";
		cout << 'x';
		if (e > 1) cout << '^' << e;
		cout << " from " << 0 << " to " << u << " = ";
		pair<double, double> get = GetAin<double>();
		if (get.second > int_time) {
			cout << "Out of time! You took " << fixed << setprecision(2) << get.second << " seconds!" << endl;
			return;	
		}
		if (fabs(get.first - ans) >= 0.1) {
			cout << "Wrong Answer!" << endl;
			return;
		}
		cout << "Right answer! " << int_award << " BTC to your pocket." << endl;
		player.btc += int_award;
	}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x14d0, %rsp           # imm = 0x14D0
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
leaq -0x13a0(%rbp), %rdi
movq %rdi, -0x1408(%rbp)
callq 0x6c30
movq -0x1408(%rbp), %rdi
callq 0x6cd0
movl %eax, -0x13fc(%rbp)
jmp 0x673e
movl -0x13fc(%rbp), %eax
movl %eax, %eax
movl %eax, %esi
leaq -0x13a8(%rbp), %rdi
callq 0x6cf0
jmp 0x6756
leaq -0x13bc(%rbp), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x6d20
jmp 0x676e
leaq -0x13c4(%rbp), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x6d20
jmp 0x6786
leaq -0x13cc(%rbp), %rdi
movl $0x1, %esi
movl $0x4, %edx
callq 0x6d20
jmp 0x679e
leaq -0x13bc(%rbp), %rdi
leaq -0x13a8(%rbp), %rsi
callq 0x6d50
movl %eax, -0x140c(%rbp)
jmp 0x67b9
movl -0x140c(%rbp), %eax
movl %eax, -0x13d0(%rbp)
leaq -0x13c4(%rbp), %rdi
leaq -0x13a8(%rbp), %rsi
callq 0x6d50
movl %eax, -0x1410(%rbp)
jmp 0x67e0
movl -0x1410(%rbp), %eax
movl %eax, -0x13d4(%rbp)
leaq -0x13cc(%rbp), %rdi
leaq -0x13a8(%rbp), %rsi
callq 0x6d50
movl %eax, -0x1414(%rbp)
jmp 0x6807
movl -0x1414(%rbp), %eax
movl %eax, -0x13d8(%rbp)
movl -0x13d8(%rbp), %edi
movl -0x13d4(%rbp), %esi
incl %esi
callq 0x6e80
movsd %xmm0, -0x1420(%rbp)
jmp 0x6830
movsd -0x1420(%rbp), %xmm0
cvtsi2sdl -0x13d0(%rbp), %xmm1
mulsd %xmm1, %xmm0
movl -0x13d4(%rbp), %eax
incl %eax
cvtsi2sd %eax, %xmm1
divsd %xmm1, %xmm0
movsd %xmm0, -0x13e0(%rbp)
movq 0x1376d(%rip), %rdi     # 0x19fd0
leaq 0xb918(%rip), %rsi      # 0x12182
callq 0x3210
movq %rax, -0x1428(%rbp)
jmp 0x6878
movq -0x1428(%rbp), %rdi
movl $0xf, %esi
callq 0x3380
movq %rax, -0x1430(%rbp)
jmp 0x6892
movq -0x1430(%rbp), %rdi
leaq 0xb87a(%rip), %rsi      # 0x1211a
callq 0x3210
movq %rax, -0x1438(%rbp)
jmp 0x68ae
movq -0x1438(%rbp), %rdi
movq 0x13704(%rip), %rsi     # 0x19fc0
callq 0x3250
jmp 0x68c3
movq 0x13706(%rip), %rdi     # 0x19fd0
leaq 0xb8fc(%rip), %rsi      # 0x121cd
callq 0x3210
jmp 0x68d8
cmpl $0x1, -0x13d0(%rbp)
jle 0x6936
movl -0x13d0(%rbp), %esi
movq 0x136e2(%rip), %rdi     # 0x19fd0
callq 0x3380
movq %rax, -0x1440(%rbp)
jmp 0x68fc
movq -0x1440(%rbp), %rdi
leaq 0xb85d(%rip), %rsi      # 0x12167
callq 0x3210
jmp 0x6911
jmp 0x6936
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x13b0(%rbp)
movl %eax, -0x13b4(%rbp)
leaq -0x13a0(%rbp), %rdi
callq 0x6e50
jmp 0x6c19
movq 0x13693(%rip), %rdi     # 0x19fd0
movl $0x78, %esi
callq 0x32a0
jmp 0x6949
cmpl $0x1, -0x13d4(%rbp)
jle 0x6982
movq 0x13677(%rip), %rdi     # 0x19fd0
movl $0x5e, %esi
callq 0x32a0
movq %rax, -0x1448(%rbp)
jmp 0x696c
movq -0x1448(%rbp), %rdi
movl -0x13d4(%rbp), %esi
callq 0x3380
jmp 0x6980
jmp 0x6982
movq 0x13647(%rip), %rdi     # 0x19fd0
leaq 0xb848(%rip), %rsi      # 0x121d8
callq 0x3210
movq %rax, -0x1450(%rbp)
jmp 0x699e
movq -0x1450(%rbp), %rdi
xorl %esi, %esi
callq 0x3380
movq %rax, -0x1458(%rbp)
jmp 0x69b5
movq -0x1458(%rbp), %rdi
leaq 0xb81c(%rip), %rsi      # 0x121df
callq 0x3210
movq %rax, -0x1460(%rbp)
jmp 0x69d1
movq -0x1460(%rbp), %rdi
movl -0x13d8(%rbp), %esi
callq 0x3380
movq %rax, -0x1468(%rbp)
jmp 0x69ec
movq -0x1468(%rbp), %rdi
leaq 0xb72d(%rip), %rsi      # 0x12127
callq 0x3210
jmp 0x6a01
callq 0x6eb0
movsd %xmm1, -0x1478(%rbp)
movsd %xmm0, -0x1470(%rbp)
jmp 0x6a18
movsd -0x1478(%rbp), %xmm0
movsd -0x1470(%rbp), %xmm1
movsd %xmm1, -0x13f0(%rbp)
movsd %xmm0, -0x13e8(%rbp)
movsd -0x13e8(%rbp), %xmm0
movsd 0xb668(%rip), %xmm1     # 0x120b0
ucomisd %xmm1, %xmm0
jbe 0x6b20
movq 0x13577(%rip), %rdi     # 0x19fd0
leaq 0xb6cb(%rip), %rsi      # 0x1212b
callq 0x3210
movq %rax, -0x1480(%rbp)
jmp 0x6a6e
movq -0x1480(%rbp), %rdi
leaq 0x384(%rip), %rsi       # 0x6e00
callq 0x3090
movq %rax, -0x1488(%rbp)
jmp 0x6a8a
movl $0x2, %edi
callq 0x6e30
movl %eax, -0x148c(%rbp)
jmp 0x6a9c
movq -0x1488(%rbp), %rdi
movl -0x148c(%rbp), %eax
movl %eax, -0x13f4(%rbp)
movl -0x13f4(%rbp), %esi
callq 0x3330
movq %rax, -0x1498(%rbp)
jmp 0x6ac3
movq -0x1498(%rbp), %rdi
movsd -0x13e8(%rbp), %xmm0
callq 0x33d0
movq %rax, -0x14a0(%rbp)
jmp 0x6ae0
movq -0x14a0(%rbp), %rdi
leaq 0xb654(%rip), %rsi      # 0x12142
callq 0x3210
movq %rax, -0x14a8(%rbp)
jmp 0x6afc
movq -0x14a8(%rbp), %rdi
movq 0x134b6(%rip), %rsi     # 0x19fc0
callq 0x3250
jmp 0x6b11
movl $0x1, -0x13f8(%rbp)
jmp 0x6c04
movsd -0x13f0(%rbp), %xmm0
subsd -0x13e0(%rbp), %xmm0
movaps 0xb599(%rip), %xmm1     # 0x120d0
pand %xmm1, %xmm0
movsd 0xb575(%rip), %xmm1     # 0x120b8
ucomisd %xmm1, %xmm0
jb 0x6b86
movq 0x13480(%rip), %rdi     # 0x19fd0
leaq 0xb5f5(%rip), %rsi      # 0x1214c
callq 0x3210
movq %rax, -0x14b0(%rbp)
jmp 0x6b65
movq -0x14b0(%rbp), %rdi
movq 0x1344d(%rip), %rsi     # 0x19fc0
callq 0x3250
jmp 0x6b7a
movl $0x1, -0x13f8(%rbp)
jmp 0x6c04
movq 0x13443(%rip), %rdi     # 0x19fd0
leaq 0xb5c6(%rip), %rsi      # 0x1215a
callq 0x3210
movq %rax, -0x14b8(%rbp)
jmp 0x6ba2
movq -0x14b8(%rbp), %rdi
movl $0x6, %esi
callq 0x3380
movq %rax, -0x14c0(%rbp)
jmp 0x6bbc
movq -0x14c0(%rbp), %rdi
leaq 0xb59f(%rip), %rsi      # 0x12169
callq 0x3210
movq %rax, -0x14c8(%rbp)
jmp 0x6bd8
movq -0x14c8(%rbp), %rdi
movq 0x133da(%rip), %rsi     # 0x19fc0
callq 0x3250
jmp 0x6bed
movq -0x8(%rbp), %rax
movl 0x10(%rax), %ecx
addl $0x6, %ecx
movl %ecx, 0x10(%rax)
movl $0x0, -0x13f8(%rbp)
leaq -0x13a0(%rbp), %rdi
callq 0x6e50
addq $0x14d0, %rsp           # imm = 0x14D0
popq %rbp
retq
movq -0x13b0(%rbp), %rdi
callq 0x33a0
nopw %cs:(%rax,%rax)
nop