#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 */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ _IONBF;
int /*<<< orphan*/ ajouterScore(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
char *getenv(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setvbuf(int /*<<< orphan*/, int /*<<< orphan*/ *,
                           int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ sscanf(char *, char *, char *, int *);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int main(int argc, char *argv[]) {
  setvbuf(stdin, NULL, _IONBF, 0);
  printf("Content-type:text/html\n\n");
  char *pRequestMethod;
  char nom[100];
  int score;
  char inputBuffer[100 + 10];
  pRequestMethod = getenv("REQUEST_METHOD");
  if (strcmp(pRequestMethod, "POST") == 0) {
    fgets(inputBuffer, 100 + 10, stdin);
    sscanf(inputBuffer, "%s : %d", nom, &score);
    if (strlen(nom) > 100 - 1 || strlen(nom) == 0) {
      return EXIT_SUCCESS;
    }
    FILE *f = NULL;
    ajouterScore(f, nom, score);
  }
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e48(%rip),%rax
mov    (%rax),%edi
mov    0x2e37(%rip),%rax
mov    (%rax),%edx
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
call   1090 <setvbuf@plt>
lea    0xe43(%rip),%rdi
call   1050 <printf@plt>
lea    0xe50(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe4b(%rip),%rsi
call   1070 <strcmp@plt>
cmp    $0x0,%rax
jne    127a <main+0xfa>
lea    -0x100(%rbp),%rdi
mov    0x2dee(%rip),%rax
mov    (%rax),%edx
mov    $0x6e,%esi
call   1060 <fgets@plt>
lea    -0x100(%rbp),%rdi
lea    -0x80(%rbp),%rdx
lea    0xe15(%rip),%rsi
lea    -0x84(%rbp),%rcx
call   1080 <sscanf@plt>
lea    -0x80(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x63,%eax
jg     1248 <main+0xc8>
lea    -0x80(%rbp),%rdi
call   1040 <strlen@plt>
cmp    $0x0,%eax
jne    1259 <main+0xd9>
mov    0x2d81(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1286 <main+0x106>
movq   $0x0,-0x108(%rbp)
mov    -0x108(%rbp),%rdi
lea    -0x80(%rbp),%rsi
mov    -0x84(%rbp),%edx
call   10a0 <ajouterScore@plt>
mov    0x2d4f(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0xf8,%rsp
mov    0x2e57(%rip),%rbx
mov    (%rbx),%edi
mov    0x2e46(%rip),%rax
mov    (%rax),%edx
xor    %esi,%esi
xor    %ecx,%ecx
call   1090 <setvbuf@plt>
lea    0xe70(%rip),%rdi
call   1040 <puts@plt>
lea    0xe48(%rip),%rdi
call   1030 <getenv@plt>
lea    0xe4b(%rip),%rsi
mov    %rax,%rdi
call   1070 <strcmp@plt>
test   %rax,%rax
jne    122f <main+0xaf>
mov    (%rbx),%edx
lea    0x80(%rsp),%r14
mov    %r14,%rdi
mov    $0x6e,%esi
call   1060 <fgets@plt>
lea    0xe25(%rip),%rsi
lea    0x10(%rsp),%rbx
lea    0xc(%rsp),%rcx
mov    %r14,%rdi
mov    %rbx,%rdx
call   1080 <sscanf@plt>
mov    %rbx,%rdi
call   1050 <strlen@plt>
cmp    $0x63,%eax
jg     122f <main+0xaf>
lea    0x10(%rsp),%rdi
call   1050 <strlen@plt>
test   %eax,%eax
je     122f <main+0xaf>
mov    0xc(%rsp),%edx
lea    0x10(%rsp),%rsi
xor    %edi,%edi
call   10a0 <ajouterScore@plt>
mov    0x2d9a(%rip),%rax
mov    (%rax),%eax
add    $0xf8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@stdin = global i32 0
@_IONBF = global i32 0
@.str = [25 x i8] c"Content-type:text/html\0A\0A\00"
@.str.1 = [15 x i8] c"REQUEST_METHOD\00"
@.str.2 = [5 x i8] c"POST\00"
@.str.3 = [8 x i8] c"%s : %d\00"
@EXIT_SUCCESS = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca [100 x i8]
%8 = alloca i32
%9 = alloca [110 x i8]
%10 = alloca i32*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%11 = load i32, i32* @stdin
%12 = load i32, i32* @_IONBF
%13 = call i32 @setvbuf(i32 %11, i32* null, i32 %12, i32 0)
%14 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%15 = call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
store i8* %15, i8** %6
%16 = load i8*, i8** %6
%17 = call i64 @strcmp(i8* %16, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp eq i64 %17, 0
br i1 %18, label %19, label %40
19: ; preds = %2
%20 = getelementptr inbounds [110 x i8], [110 x i8]* %9, i64 0, i64 0
%21 = load i32, i32* @stdin
%22 = call i32 @fgets(i8* %20, i32 110, i32 %21)
%23 = getelementptr inbounds [110 x i8], [110 x i8]* %9, i64 0, i64 0
%24 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%25 = call i32 @sscanf(i8* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %24, i32* %8)
%26 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%27 = call i32 @strlen(i8* %26)
%28 = icmp sgt i32 %27, 99
br i1 %28, label %33, label %29
29: ; preds = %19
%30 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%31 = call i32 @strlen(i8* %30)
%32 = icmp eq i32 %31, 0
br i1 %32, label %33, label %35
33: ; preds = %29, %19
%34 = load i32, i32* @EXIT_SUCCESS
store i32 %34, i32* %3
br label %42
35: ; preds = %29
store i32* null, i32** %10
%36 = load i32*, i32** %10
%37 = getelementptr inbounds [100 x i8], [100 x i8]* %7, i64 0, i64 0
%38 = load i32, i32* %8
%39 = call i32 @ajouterScore(i32* %36, i8* %37, i32 %38)
br label %40
40: ; preds = %35, %2
%41 = load i32, i32* @EXIT_SUCCESS
store i32 %41, i32* %3
br label %42
42: ; preds = %40, %33
%43 = load i32, i32* %3
ret i32 %43
}

LLVM IR (-O2):
@stdin = global i32 0
@_IONBF = global i32 0
@.str.1 = [15 x i8] c"REQUEST_METHOD\00"
@.str.2 = [5 x i8] c"POST\00"
@.str.3 = [8 x i8] c"%s : %d\00"
@EXIT_SUCCESS = global i32 0
@str = [24 x i8] c"Content-type:text/html\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i8]
%4 = alloca i32
%5 = alloca [110 x i8]
%6 = load i32, i32* @stdin
%7 = load i32, i32* @_IONBF
%8 = tail call i32 @setvbuf(i32 %6, i32* null, i32 %7, i32 0)
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @str, i64 0, i64 0))
%10 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%11 = bitcast i32* %4 to i8*
%12 = getelementptr inbounds [110 x i8], [110 x i8]* %5, i64 0, i64 0
%13 = tail call i8* @getenv(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%14 = tail call i64 @strcmp(i8* %13, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0))
%15 = icmp eq i64 %14, 0
br i1 %15, label %16, label %28
16: ; preds = %2
%17 = load i32, i32* @stdin
%18 = call i32 @fgets(i8* %12, i32 110, i32 %17)
%19 = call i32 @sscanf(i8* %12, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* %10, i32* %4)
%20 = call i32 @strlen(i8* %10)
%21 = icmp sgt i32 %20, 99
br i1 %21, label %28, label %22
22: ; preds = %16
%23 = call i32 @strlen(i8* %10)
%24 = icmp eq i32 %23, 0
br i1 %24, label %28, label %25
25: ; preds = %22
%26 = load i32, i32* %4
%27 = call i32 @ajouterScore(i32* null, i8* %10, i32 %26)
br label %28
28: ; preds = %2, %25, %16, %22
%29 = load i32, i32* @EXIT_SUCCESS
ret i32 %29
}