#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */

/* Variables and functions */
double Game24Points(int, int, int, int);
double Game24PointsEx(char *);
int /*<<< orphan*/ printf(char *, double);
int main(void) {
  printf("%f\n", Game24Points(7, 2, 1, 10));
  printf("%f\n", Game24Points(7, 2, 2, 10));
  printf("%f\n\n", Game24PointsEx("7  2 2 10"));
  printf("%f\n", Game24PointsEx("1 5 5 5"));
  printf("%f\n", Game24PointsEx("1 7 6 7"));
  printf("%f\n", Game24PointsEx("3 3 8 8"));
  printf("%f\n", Game24PointsEx("9 9 7 5"));
  printf("%f\n", Game24PointsEx("1 9 1 7"));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x7,%edi
mov    $0x2,%esi
mov    $0x1,%edx
mov    $0xa,%ecx
call   1050 <Game24Points@plt>
lea    0xea1(%rip),%rdi
call   1030 <printf@plt>
mov    $0x7,%edi
mov    $0x2,%edx
mov    $0xa,%ecx
mov    %edx,%esi
call   1050 <Game24Points@plt>
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7c(%rip),%rdi
call   1040 <Game24PointsEx@plt>
lea    0xe6b(%rip),%rdi
call   1030 <printf@plt>
lea    0xe6e(%rip),%rdi
call   1040 <Game24PointsEx@plt>
lea    0xe4f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe5e(%rip),%rdi
call   1040 <Game24PointsEx@plt>
lea    0xe37(%rip),%rdi
call   1030 <printf@plt>
lea    0xe4e(%rip),%rdi
call   1040 <Game24PointsEx@plt>
lea    0xe1f(%rip),%rdi
call   1030 <printf@plt>
lea    0xe3e(%rip),%rdi
call   1040 <Game24PointsEx@plt>
lea    0xe07(%rip),%rdi
call   1030 <printf@plt>
lea    0xe2e(%rip),%rdi
call   1040 <Game24PointsEx@plt>
lea    0xdef(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x7,%edi
mov    $0x2,%esi
mov    $0x1,%edx
mov    $0xa,%ecx
call   1050 <Game24Points@plt>
lea    0xeaf(%rip),%rbx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x7,%edi
mov    $0x2,%esi
mov    $0x2,%edx
mov    $0xa,%ecx
call   1050 <Game24Points@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe88(%rip),%rdi
call   1040 <Game24PointsEx@plt>
lea    0xe77(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7a(%rip),%rdi
call   1040 <Game24PointsEx@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe6e(%rip),%rdi
call   1040 <Game24PointsEx@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe62(%rip),%rdi
call   1040 <Game24PointsEx@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe56(%rip),%rdi
call   1040 <Game24PointsEx@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xe4a(%rip),%rdi
call   1040 <Game24PointsEx@plt>
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [5 x i8] c"%f\0A\0A\00"
@.str.2 = [10 x i8] c"7 2 2 10\00"
@.str.3 = [8 x i8] c"1 5 5 5\00"
@.str.4 = [8 x i8] c"1 7 6 7\00"
@.str.5 = [8 x i8] c"3 3 8 8\00"
@.str.6 = [8 x i8] c"9 9 7 5\00"
@.str.7 = [8 x i8] c"1 9 1 7\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call double @Game24Points(i32 7, i32 2, i32 1, i32 10)
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %2)
%4 = call double @Game24Points(i32 7, i32 2, i32 2, i32 10)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %4)
%6 = call double @Game24PointsEx(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %6)
%8 = call double @Game24PointsEx(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %8)
%10 = call double @Game24PointsEx(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %10)
%12 = call double @Game24PointsEx(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%13 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %12)
%14 = call double @Game24PointsEx(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%15 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %14)
%16 = call double @Game24PointsEx(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%17 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%f\0A\00"
@.str.1 = [5 x i8] c"%f\0A\0A\00"
@.str.2 = [10 x i8] c"7 2 2 10\00"
@.str.3 = [8 x i8] c"1 5 5 5\00"
@.str.4 = [8 x i8] c"1 7 6 7\00"
@.str.5 = [8 x i8] c"3 3 8 8\00"
@.str.6 = [8 x i8] c"9 9 7 5\00"
@.str.7 = [8 x i8] c"1 9 1 7\00"
define i32 @main() {
%1 = tail call double @Game24Points(i32 7, i32 2, i32 1, i32 10)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %1)
%3 = tail call double @Game24Points(i32 7, i32 2, i32 2, i32 10)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %3)
%5 = tail call double @Game24PointsEx(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), double %5)
%7 = tail call double @Game24PointsEx(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %7)
%9 = tail call double @Game24PointsEx(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%10 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %9)
%11 = tail call double @Game24PointsEx(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %11)
%13 = tail call double @Game24PointsEx(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%14 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %13)
%15 = tail call double @Game24PointsEx(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%16 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double %15)
ret i32 0
}