#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*/ mvprintw(int, int, char *, ...);
void io_printwin(int player, int cards) {
  mvprintw(11, 10, "#################################");
  mvprintw(12, 10, "# Player %d Won with %d VP card%s #", player + 1, cards,
           (cards == 1) ? "! " : "s!");
  mvprintw(13, 10, "#      Press 'q' to exit.       #");
  mvprintw(14, 10, "#################################");
}


x86 assembly (clang, -O0):
<io_printwin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0xb,%edi
mov    $0xa,%esi
lea    0xed1(%rip),%rdx
mov    $0x0,%al
call   1030 <mvprintw@plt>
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%r8d
mov    -0x8(%rbp),%edx
lea    0xeff(%rip),%r9
lea    0xef5(%rip),%rax
cmp    $0x1,%edx
cmove  %rax,%r9
mov    $0xc,%edi
mov    $0xa,%esi
lea    0xeb9(%rip),%rdx
mov    $0x0,%al
call   1030 <mvprintw@plt>
mov    $0xd,%edi
mov    $0xa,%esi
lea    0xecb(%rip),%rdx
mov    $0x0,%al
call   1030 <mvprintw@plt>
mov    $0xe,%edi
mov    $0xa,%esi
lea    0xe67(%rip),%rdx
mov    $0x0,%al
call   1030 <mvprintw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_printwin>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xee1(%rip),%r14
mov    $0xb,%edi
mov    $0xa,%esi
mov    %r14,%rdx
xor    %eax,%eax
call   1030 <mvprintw@plt>
add    $0x1,%ebx
cmp    $0x1,%ebp
lea    0xf06(%rip),%rax
lea    0xf02(%rip),%r9
cmove  %rax,%r9
lea    0xed0(%rip),%rdx
mov    $0xc,%edi
mov    $0xa,%esi
mov    %ebx,%ecx
mov    %ebp,%r8d
xor    %eax,%eax
call   1030 <mvprintw@plt>
lea    0xedd(%rip),%rdx
mov    $0xd,%edi
mov    $0xa,%esi
xor    %eax,%eax
call   1030 <mvprintw@plt>
mov    $0xe,%edi
mov    $0xa,%esi
mov    %r14,%rdx
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <mvprintw@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"#################################\00"
@.str.1 = [36 x i8] c"# Player %d Won with %d VP card%s #\00"
@.str.2 = [3 x i8] c"! \00"
@.str.3 = [3 x i8] c"s!\00"
@.str.4 = [34 x i8] c"# Press 'q' to exit. #\00"
define void @io_printwin(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 11, i32 10, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
%8 = load i32, i32* %4
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 1
%11 = zext i1 %10 to i64
%12 = select i1 %10, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%13 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 12, i32 10, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %7, i32 %8, i8* %12)
%14 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 13, i32 10, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 14, i32 10, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"#################################\00"
@.str.1 = [36 x i8] c"# Player %d Won with %d VP card%s #\00"
@.str.2 = [3 x i8] c"! \00"
@.str.3 = [3 x i8] c"s!\00"
@.str.4 = [34 x i8] c"# Press 'q' to exit. #\00"
define void @io_printwin(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 11, i32 10, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
%4 = add nsw i32 %0, 1
%5 = icmp eq i32 %1, 1
%6 = select i1 %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0)
%7 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 12, i32 10, i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %1, i8* %6)
%8 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 13, i32 10, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0))
%9 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 14, i32 10, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
ret void
}