// File: /workspace/github_cpp_makefile_star2_O1/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 %r12
pushq %rbx
subq $0x13d0, %rsp           # imm = 0x13D0
movq %rdi, %rbx
leaq 0x48(%rsp), %r14
movq %r14, %rdi
callq 0x3830
movq %r14, %rdi
callq 0x2200
movl %eax, %ecx
leaq (%rcx,%rcx,2), %rcx
shrq $0x20, %rcx
movl %eax, %edx
subl %ecx, %edx
shrl %edx
addl %ecx, %edx
shrl $0x1e, %edx
movl %edx, %ecx
shll $0x1f, %ecx
orl %edx, %ecx
leal (%rax,%rcx), %edx
cmpl $0x1, %edx
adcl %eax, %ecx
leaq 0x10(%rsp), %rsi
movq %rcx, (%rsi)
movabsq $0x400000001, %rax      # imm = 0x400000001
leaq 0x40(%rsp), %rdi
movq %rax, (%rdi)
movq %rax, 0x38(%rsp)
movq %rax, 0x30(%rsp)
movq %rdi, %rdx
callq 0x3914
movl %eax, %ebp
leaq 0x10(%rsp), %rsi
leaq 0x38(%rsp), %rdi
movq %rdi, %rdx
callq 0x3914
movl %eax, %r15d
leaq 0x10(%rsp), %rsi
leaq 0x30(%rsp), %rdi
movq %rdi, %rdx
callq 0x3914
movl %eax, %r14d
leal 0x1(%r15), %eax
cvtsi2sd %r14d, %xmm0
cvtsi2sd %eax, %xmm1
movsd %xmm1, 0x28(%rsp)
callq 0x2290
movsd %xmm0, 0x20(%rsp)
movq 0xaa91(%rip), %rdi      # 0xdfd0
leaq 0x6c04(%rip), %rsi      # 0xa14a
movl $0x4a, %edx
callq 0x21e0
movq 0xaa79(%rip), %rdi      # 0xdfd0
movl $0xf, %esi
callq 0x2280
movq %rax, %r12
leaq 0x6b77(%rip), %rsi      # 0xa0e2
movl $0x8, %edx
movq %rax, %rdi
callq 0x21e0
movq (%r12), %rax
movq -0x18(%rax), %rdi
addq %r12, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r12, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
movq 0xaa29(%rip), %rdi      # 0xdfd0
leaq 0x6be7(%rip), %rsi      # 0xa195
movl $0xa, %edx
callq 0x21e0
cmpl $0x2, %ebp
jl 0x35df
movq 0xaa0c(%rip), %rdi      # 0xdfd0
movl %ebp, %esi
callq 0x2280
leaq 0x6b5d(%rip), %rsi      # 0xa12f
movl $0x1, %edx
movq %rax, %rdi
callq 0x21e0
leaq 0xf(%rsp), %rsi
movb $0x78, (%rsi)
movq 0xa9e2(%rip), %rdi      # 0xdfd0
movl $0x1, %edx
callq 0x21e0
cmpl $0x2, %r15d
jl 0x3622
leaq 0xf(%rsp), %rsi
movb $0x5e, (%rsi)
movq 0xa9c3(%rip), %rdi      # 0xdfd0
movl $0x1, %edx
callq 0x21e0
movq %rax, %rdi
movl %r15d, %esi
callq 0x2280
movq 0xa9a7(%rip), %rdi      # 0xdfd0
leaq 0x6b70(%rip), %rsi      # 0xa1a0
movl $0x6, %edx
callq 0x21e0
movq 0xa98f(%rip), %rdi      # 0xdfd0
xorl %esi, %esi
callq 0x2280
movq %rax, %r15
leaq 0x6b55(%rip), %rsi      # 0xa1a7
movl $0x4, %edx
movq %rax, %rdi
callq 0x21e0
movq %r15, %rdi
movl %r14d, %esi
callq 0x2280
leaq 0x6a7e(%rip), %rsi      # 0xa0ef
movl $0x3, %edx
movq %rax, %rdi
callq 0x21e0
callq 0x38da
movsd %xmm1, 0x18(%rsp)
ucomisd 0x6a0f(%rip), %xmm1     # 0xa0a0
jbe 0x3710
movq 0xa936(%rip), %rbx      # 0xdfd0
leaq 0x6a52(%rip), %rsi      # 0xa0f3
movl $0x16, %edx
movq %rbx, %rdi
callq 0x21e0
movsd 0x18(%rsp), %xmm0
movq (%rbx), %rax
movq -0x18(%rax), %rcx
movl $0xfffffefb, %edx       # imm = 0xFFFFFEFB
andl 0x18(%rbx,%rcx), %edx
orl $0x4, %edx
movl %edx, 0x18(%rbx,%rcx)
movq -0x18(%rax), %rax
movq $0x2, 0x8(%rbx,%rax)
movq %rbx, %rdi
callq 0x2240
movq %rax, %rbx
leaq 0x6a20(%rip), %rsi      # 0xa10a
movl $0x9, %edx
movq %rax, %rdi
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
jmp 0x37d9
xorps %xmm1, %xmm1
cvtsi2sd %ebp, %xmm1
movsd 0x20(%rsp), %xmm2
mulsd %xmm1, %xmm2
divsd 0x28(%rsp), %xmm2
subsd %xmm2, %xmm0
andpd 0x697d(%rip), %xmm0     # 0xa0b0
ucomisd 0x696d(%rip), %xmm0     # 0xa0a8
jae 0x37aa
movq 0xa88c(%rip), %rdi      # 0xdfd0
leaq 0x69d7(%rip), %rsi      # 0xa122
movl $0xe, %edx
callq 0x21e0
movq 0xa874(%rip), %rdi      # 0xdfd0
movl $0x6, %esi
callq 0x2280
movq %rax, %r14
leaq 0x69c1(%rip), %rsi      # 0xa131
movl $0x14, %edx
movq %rax, %rdi
callq 0x21e0
movq (%r14), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %r14, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
addl $0x6, 0x10(%rbx)
jmp 0x37ec
movq 0xa81f(%rip), %rbx      # 0xdfd0
leaq 0x695c(%rip), %rsi      # 0xa114
movl $0xd, %edx
movq %rbx, %rdi
callq 0x21e0
movq (%rbx), %rax
movq -0x18(%rax), %rdi
addq %rbx, %rdi
movl $0xa, %esi
callq 0x21a0
movsbl %al, %esi
movq %rbx, %rdi
callq 0x2030
movq %rax, %rdi
callq 0x2120
leaq 0x48(%rsp), %rdi
callq 0x2190
addq $0x13d0, %rsp           # imm = 0x13D0
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
jmp 0x3827
jmp 0x3812
jmp 0x3812
jmp 0x3812
jmp 0x3812
jmp 0x3812
movq %rax, %rbx
leaq 0x48(%rsp), %rdi
callq 0x2190
movq %rbx, %rdi
callq 0x22a0
movq %rax, %rdi
callq 0x29c6
nop