#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 */
int /*<<< orphan*/ printf(char *, int, ...);
int print_result(int winner, int numberofguesses, char storedstring[7]) {
  if (winner == 1) {
    printf("You are the winner of the game with %d guesses.\n",
           numberofguesses + 1);
  } else {
    printf("You lost the game. %d guesses were not enough for you to find the "
           "word %s.\n",
           numberofguesses + 1, storedstring);
  }
}


x86 assembly (clang, -O0):
<print_result>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    1145 <print_result+0x35>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    115d <print_result+0x4d>
mov    -0xc(%rbp),%esi
add    $0x1,%esi
mov    -0x18(%rbp),%rdx
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_result>:
push   %rax
add    $0x1,%esi
cmp    $0x1,%edi
jne    1129 <print_result+0x19>
lea    0xee0(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rcx
ret
lea    0xf01(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
pop    %rcx
ret

LLVM IR (-O0):
@.str = [49 x i8] c"You are the winner of the game with %d guesses.\0A\00"
@.str.1 = [76 x i8] c"You lost the game. %d guesses were not enough for you to find the word %s.\0A\00"
define i32 @print_result(i32 %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%8 = load i32, i32* %5
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i32, i32* %6
%12 = add nsw i32 %11, 1
%13 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %12)
br label %19
14: ; preds = %3
%15 = load i32, i32* %6
%16 = add nsw i32 %15, 1
%17 = load i8*, i8** %7
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i32 %16, i8* %17)
br label %19
19: ; preds = %14, %10
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
@.str = [49 x i8] c"You are the winner of the game with %d guesses.\0A\00"
@.str.1 = [76 x i8] c"You lost the game. %d guesses were not enough for you to find the word %s.\0A\00"
define i32 @print_result(i32 %0, i32 %1, i8* %2) {
%4 = icmp eq i32 %0, 1
%5 = add nsw i32 %1, 1
br i1 %4, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %5)
br label %10
8: ; preds = %3
%9 = tail call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([76 x i8], [76 x i8]* @.str.1, i64 0, i64 0), i32 %5, i8* %2)
br label %10
10: ; preds = %8, %6
ret i32 undef
}