#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 /*<<< orphan*/, int, char *, ...);
void io_printcards(int c, int s, int r, int m, int p, int v, int pos) {
  int x = 0;
  int y = 10;
  mvprintw(y++, x,
           "###########################################################");
  mvprintw(y++, x,
           "#  Buy   Soldier     Road    Monopoly   Year of   Victory #");
  mvprintw(y++, x,
           "# Card             Building             Plenty     Point  #");
  mvprintw(y++, x,
           "#  %2d      %2d        %2d         %2d        %2d        %2d    #",
           c, s, r, m, p, v);
  mvprintw(y++, x,
           "#   %c       %c         %c          %c         %c         %c    #",
           (pos == 0) ? '*' : ' ', (pos == 1) ? '*' : ' ',
           (pos == 2) ? '*' : ' ', (pos == 3) ? '*' : ' ',
           (pos == 4) ? '*' : ' ', (pos == 5) ? '*' : ' ');
  mvprintw(y++, x,
           "###########################################################");
}


x86 assembly (clang, -O0):
<io_printcards>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x38,%rsp
mov    0x10(%rbp),%eax
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0xa,-0x28(%rbp)
mov    -0x28(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%esi
lea    0xead(%rip),%rdx
mov    $0x0,%al
call   1030 <mvprintw@plt>
mov    -0x28(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%esi
lea    0xecd(%rip),%rdx
mov    $0x0,%al
call   1030 <mvprintw@plt>
mov    -0x28(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%esi
lea    0xeed(%rip),%rdx
mov    $0x0,%al
call   1030 <mvprintw@plt>
mov    -0x28(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%esi
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%r11d
mov    -0x1c(%rbp),%r10d
mov    -0x20(%rbp),%eax
lea    0xef7(%rip),%rdx
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1030 <mvprintw@plt>
mov    -0x28(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%esi
mov    0x10(%rbp),%edx
mov    $0x20,%ecx
mov    $0x2a,%eax
cmp    $0x0,%edx
cmove  %eax,%ecx
mov    0x10(%rbp),%edx
mov    $0x20,%r8d
mov    $0x2a,%eax
cmp    $0x1,%edx
cmove  %eax,%r8d
mov    0x10(%rbp),%edx
mov    $0x20,%r9d
mov    $0x2a,%eax
cmp    $0x2,%edx
cmove  %eax,%r9d
mov    0x10(%rbp),%edx
mov    $0x20,%r11d
mov    $0x2a,%eax
cmp    $0x3,%edx
cmove  %eax,%r11d
mov    0x10(%rbp),%edx
mov    $0x20,%r10d
mov    $0x2a,%eax
cmp    $0x4,%edx
cmove  %eax,%r10d
mov    0x10(%rbp),%ebx
mov    $0x20,%eax
mov    $0x2a,%edx
cmp    $0x5,%ebx
cmove  %edx,%eax
lea    0xe96(%rip),%rdx
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
mov    $0x0,%al
call   1030 <mvprintw@plt>
mov    -0x28(%rbp),%edi
mov    %edi,%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
mov    -0x24(%rbp),%esi
lea    0xd77(%rip),%rdx
mov    $0x0,%al
call   1030 <mvprintw@plt>
add    $0x38,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_printcards>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r13d
mov    %r8d,%r12d
mov    %rcx,(%rsp)
mov    %edx,%ebp
mov    %esi,%ebx
mov    %edi,%r14d
mov    0x40(%rsp),%r15d
lea    0xec8(%rip),%rdx
mov    $0xa,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <mvprintw@plt>
lea    0xeef(%rip),%rdx
mov    $0xb,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <mvprintw@plt>
lea    0xf16(%rip),%rdx
mov    $0xc,%edi
xor    %esi,%esi
xor    %eax,%eax
call   1030 <mvprintw@plt>
sub    $0x8,%rsp
lea    0xf39(%rip),%rdx
mov    $0xd,%edi
xor    %esi,%esi
mov    %r14d,%ecx
mov    %ebx,%r8d
mov    %ebp,%r9d
xor    %eax,%eax
push   %r13
push   %r12
push   0x18(%rsp)
call   1030 <mvprintw@plt>
add    $0x20,%rsp
test   %r15d,%r15d
mov    $0x2a,%eax
mov    $0x20,%ecx
cmove  %eax,%ecx
cmp    $0x1,%r15d
mov    $0x20,%r8d
cmove  %eax,%r8d
cmp    $0x2,%r15d
mov    $0x20,%r9d
cmove  %eax,%r9d
cmp    $0x3,%r15d
mov    $0x20,%r10d
cmove  %eax,%r10d
cmp    $0x4,%r15d
mov    $0x20,%ebx
cmove  %eax,%ebx
mov    $0x20,%ebp
cmp    $0x5,%r15d
cmove  %eax,%ebp
sub    $0x8,%rsp
lea    0xefb(%rip),%rdx
mov    $0xe,%edi
xor    %esi,%esi
xor    %eax,%eax
push   %rbp
push   %rbx
push   %r10
call   1030 <mvprintw@plt>
add    $0x20,%rsp
mov    $0xf,%edi
xor    %esi,%esi
lea    0xde1(%rip),%rdx
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <mvprintw@plt>

LLVM IR (-O0):
@.str = [60 x i8] c"###########################################################\00"
@.str.1 = [60 x i8] c"# Buy Soldier Road Monopoly Year of Victory #\00"
@.str.2 = [60 x i8] c"# Card Building Plenty Point #\00"
@.str.3 = [66 x i8] c"# %2d %2d %2d %2d %2d %2d #\00"
@.str.4 = [66 x i8] c"# %c %c %c %c %c %c #\00"
define void @io_printcards(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
store i32 0, i32* %15
store i32 10, i32* %16
%17 = load i32, i32* %16
%18 = add nsw i32 %17, 1
store i32 %18, i32* %16
%19 = load i32, i32* %15
%20 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 %17, i32 %19, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%21 = load i32, i32* %16
%22 = add nsw i32 %21, 1
store i32 %22, i32* %16
%23 = load i32, i32* %15
%24 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 %21, i32 %23, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%25 = load i32, i32* %16
%26 = add nsw i32 %25, 1
store i32 %26, i32* %16
%27 = load i32, i32* %15
%28 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 %25, i32 %27, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%29 = load i32, i32* %16
%30 = add nsw i32 %29, 1
store i32 %30, i32* %16
%31 = load i32, i32* %15
%32 = load i32, i32* %8
%33 = load i32, i32* %9
%34 = load i32, i32* %10
%35 = load i32, i32* %11
%36 = load i32, i32* %12
%37 = load i32, i32* %13
%38 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 %29, i32 %31, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0), i32 %32, i32 %33, i32 %34, i32 %35, i32 %36, i32 %37)
%39 = load i32, i32* %16
%40 = add nsw i32 %39, 1
store i32 %40, i32* %16
%41 = load i32, i32* %15
%42 = load i32, i32* %14
%43 = icmp eq i32 %42, 0
%44 = zext i1 %43 to i64
%45 = select i1 %43, i32 42, i32 32
%46 = load i32, i32* %14
%47 = icmp eq i32 %46, 1
%48 = zext i1 %47 to i64
%49 = select i1 %47, i32 42, i32 32
%50 = load i32, i32* %14
%51 = icmp eq i32 %50, 2
%52 = zext i1 %51 to i64
%53 = select i1 %51, i32 42, i32 32
%54 = load i32, i32* %14
%55 = icmp eq i32 %54, 3
%56 = zext i1 %55 to i64
%57 = select i1 %55, i32 42, i32 32
%58 = load i32, i32* %14
%59 = icmp eq i32 %58, 4
%60 = zext i1 %59 to i64
%61 = select i1 %59, i32 42, i32 32
%62 = load i32, i32* %14
%63 = icmp eq i32 %62, 5
%64 = zext i1 %63 to i64
%65 = select i1 %63, i32 42, i32 32
%66 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 %39, i32 %41, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i32 %45, i32 %49, i32 %53, i32 %57, i32 %61, i32 %65)
%67 = load i32, i32* %16
%68 = add nsw i32 %67, 1
store i32 %68, i32* %16
%69 = load i32, i32* %15
%70 = call i32 (i32, i32, i8*, ...) @mvprintw(i32 %67, i32 %69, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [60 x i8] c"###########################################################\00"
@.str.1 = [60 x i8] c"# Buy Soldier Road Monopoly Year of Victory #\00"
@.str.2 = [60 x i8] c"# Card Building Plenty Point #\00"
@.str.3 = [66 x i8] c"# %2d %2d %2d %2d %2d %2d #\00"
@.str.4 = [66 x i8] c"# %c %c %c %c %c %c #\00"
define void @io_printcards(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 10, i32 0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 11, i32 0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 12, i32 0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%11 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 13, i32 0, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.3, i64 0, i64 0), i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5)
%12 = icmp eq i32 %6, 0
%13 = select i1 %12, i32 42, i32 32
%14 = icmp eq i32 %6, 1
%15 = select i1 %14, i32 42, i32 32
%16 = icmp eq i32 %6, 2
%17 = select i1 %16, i32 42, i32 32
%18 = icmp eq i32 %6, 3
%19 = select i1 %18, i32 42, i32 32
%20 = icmp eq i32 %6, 4
%21 = select i1 %20, i32 42, i32 32
%22 = icmp eq i32 %6, 5
%23 = select i1 %22, i32 42, i32 32
%24 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 14, i32 0, i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str.4, i64 0, i64 0), i32 %13, i32 %15, i32 %17, i32 %19, i32 %21, i32 %23)
%25 = tail call i32 (i32, i32, i8*, ...) @mvprintw(i32 15, i32 0, i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret void
}