// File: /workspace/github_cpp_makefile_star2_O2/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
pushq %r15
pushq %r14
pushq %rbx
subq $0x13c8, %rsp           # imm = 0x13C8
movq %rdi, %rbx
leaq 0x40(%rsp), %r14
movq %r14, %rdi
callq 0x3424
movq %r14, %rdi
callq 0x2230
movl $0x7fffffff, %ecx       # imm = 0x7FFFFFFF
xorl %edx, %edx
divl %ecx
cmpl $0x1, %edx
adcl $0x0, %edx
leaq 0x8(%rsp), %rsi
movq %rdx, (%rsi)
movabsq $0x400000001, %rax      # imm = 0x400000001
leaq 0x38(%rsp), %rdi
movq %rax, (%rdi)
movq %rax, 0x30(%rsp)
movq %rax, 0x28(%rsp)
callq 0x347a
movl %eax, %ebp
leaq 0x30(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x347a
movl %eax, %r15d
leaq 0x28(%rsp), %rdi
leaq 0x8(%rsp), %rsi
callq 0x347a
movl %eax, %r14d
leal 0x1(%r15), %eax
cvtsi2sd %r14d, %xmm0
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0x20(%rsp)
callq 0x22c0
movsd %xmm0, 0x18(%rsp)
movq 0x9da1(%rip), %rdi      # 0xcfd0
leaq 0x4f34(%rip), %rsi      # 0x816a
callq 0x21c0
pushq $0xf
popq %rsi
movq %rax, %rdi
callq 0x22b0
leaq 0x4eb5(%rip), %rsi      # 0x8102
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20d0
movq 0x9d6c(%rip), %rdi      # 0xcfd0
leaq 0x4f4a(%rip), %rsi      # 0x81b5
callq 0x21c0
cmpl $0x2, %ebp
jl 0x3292
movq 0x9d54(%rip), %rdi      # 0xcfd0
movl %ebp, %esi
callq 0x22b0
leaq 0x4ec5(%rip), %rsi      # 0x814f
movq %rax, %rdi
callq 0x21c0
movq 0x9d37(%rip), %rdi      # 0xcfd0
pushq $0x78
popq %rsi
callq 0x2200
cmpl $0x2, %r15d
jl 0x32c1
movq 0x9d22(%rip), %rdi      # 0xcfd0
pushq $0x5e
popq %rsi
callq 0x2200
movq %rax, %rdi
movl %r15d, %esi
callq 0x22b0
movq 0x9d08(%rip), %r15      # 0xcfd0
leaq 0x4ef1(%rip), %rsi      # 0x81c0
movq %r15, %rdi
callq 0x21c0
movq %rax, %rdi
xorl %esi, %esi
callq 0x22b0
leaq 0x4edf(%rip), %rsi      # 0x81c7
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
movl %r14d, %esi
callq 0x22b0
leaq 0x4e0d(%rip), %rsi      # 0x810f
movq %rax, %rdi
callq 0x21c0
callq 0x34c2
movsd %xmm1, 0x10(%rsp)
ucomisd 0x4d9b(%rip), %xmm1     # 0x80b8
jbe 0x3370
movq 0x9caa(%rip), %rdi      # 0xcfd0
leaq 0x4de6(%rip), %rsi      # 0x8113
callq 0x21c0
movsd 0x10(%rsp), %xmm0
movq (%rax), %rcx
movq -0x18(%rcx), %rdx
movl $0xfffffefb, %esi       # imm = 0xFFFFFEFB
andl 0x18(%rax,%rdx), %esi
orl $0x4, %esi
movl %esi, 0x18(%rax,%rdx)
movq -0x18(%rcx), %rcx
movq $0x2, 0x8(%rax,%rcx)
movq %rax, %rdi
callq 0x2270
movq %rax, %r15
leaq 0x4dbc(%rip), %rsi      # 0x812a
jmp 0x33dc
cvtsi2sd %ebp, %xmm1
movsd 0x18(%rsp), %xmm2
mulsd %xmm1, %xmm2
divsd 0x20(%rsp), %xmm2
subsd %xmm2, %xmm0
andpd 0x4d40(%rip), %xmm0     # 0x80d0
ucomisd 0x4d28(%rip), %xmm0     # 0x80c0
jae 0x33d5
movq 0x9c2f(%rip), %rdi      # 0xcfd0
leaq 0x4d9a(%rip), %rsi      # 0x8142
callq 0x21c0
pushq $0x6
popq %rsi
movq %rax, %rdi
callq 0x22b0
leaq 0x4d92(%rip), %rsi      # 0x8151
movq %rax, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20d0
addl $0x6, 0x10(%rbx)
jmp 0x33ec
leaq 0x4d58(%rip), %rsi      # 0x8134
movq %r15, %rdi
callq 0x21c0
movq %rax, %rdi
callq 0x20d0
leaq 0x40(%rsp), %rdi
callq 0x34b2
addq $0x13c8, %rsp           # imm = 0x13C8
popq %rbx
popq %r14
popq %r15
popq %rbp
retq
jmp 0x340e
jmp 0x340e
jmp 0x340e
jmp 0x340e
jmp 0x340e
movq %rax, %rbx
leaq 0x40(%rsp), %rdi
callq 0x34b2
movq %rbx, %rdi
callq 0x22d0
nop