#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*/ clear();
int /*<<< orphan*/ mvaddstr(int, int, char *);
unsigned int read_number(int, int, int, int, int);
int read_yes_no(int, int);
void get_inputs(unsigned *nsnakes, unsigned *speed, int *increase_speed) {
  clear();
  mvaddstr(4, 19, "How many players (1 to 4)?");
  *nsnakes = read_number(4, 46, 1, 1, 4);
  mvaddstr(7, 20, "Skill level (1 to 100)?");
  mvaddstr(8, 21, "1   = Novice");
  mvaddstr(9, 21, "90  = Expert");
  mvaddstr(10, 21, "100 = Twiddle finger");
  mvaddstr(11, 14, "Computer speed may affect your skill level)");
  *speed = read_number(7, 44, 3, 1, 100);
  *speed = ((100 - *speed) * 2) + 1;
  mvaddstr(14, 14, "Increase game speed during play (Y or N)?");
  *increase_speed = read_yes_no(14, 56);
}


x86 assembly (clang, -O0):
<get_inputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1060 <clear@plt>
mov    $0x4,%edi
mov    $0x13,%esi
lea    0xe94(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x4,%r8d
mov    $0x2e,%esi
mov    $0x1,%ecx
mov    %r8d,%edi
mov    %ecx,%edx
call   1040 <read_number@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    $0x7,%edi
mov    $0x14,%esi
lea    0xe77(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x8,%edi
mov    $0x15,%esi
lea    0xe79(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x9,%edi
mov    $0x15,%esi
lea    0xe70(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0xa,%edi
mov    $0x15,%esi
lea    0xe67(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0xb,%edi
mov    $0xe,%esi
lea    0xe66(%rip),%rdx
call   1050 <mvaddstr@plt>
mov    $0x7,%edi
mov    $0x2c,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x64,%r8d
call   1040 <read_number@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
mov    $0x64,%ecx
sub    (%rax),%ecx
shl    $0x1,%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    $0xe,%esi
lea    0xe43(%rip),%rdx
mov    %esi,%edi
call   1050 <mvaddstr@plt>
mov    $0xe,%edi
mov    $0x38,%esi
call   1030 <read_yes_no@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_inputs>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
xor    %eax,%eax
call   1060 <clear@plt>
lea    0xea4(%rip),%rdx
mov    $0x4,%edi
mov    $0x13,%esi
call   1050 <mvaddstr@plt>
mov    $0x4,%edi
mov    $0x2e,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    $0x4,%r8d
call   1040 <read_number@plt>
mov    %eax,(%rbx)
lea    0xe88(%rip),%rdx
mov    $0x7,%edi
mov    $0x14,%esi
call   1050 <mvaddstr@plt>
lea    0xe8a(%rip),%rdx
mov    $0x8,%edi
mov    $0x15,%esi
call   1050 <mvaddstr@plt>
lea    0xe81(%rip),%rdx
mov    $0x9,%edi
mov    $0x15,%esi
call   1050 <mvaddstr@plt>
lea    0xe78(%rip),%rdx
mov    $0xa,%edi
mov    $0x15,%esi
call   1050 <mvaddstr@plt>
lea    0xe77(%rip),%rdx
mov    $0xb,%edi
mov    $0xe,%esi
call   1050 <mvaddstr@plt>
mov    $0x7,%edi
mov    $0x2c,%esi
mov    $0x3,%edx
mov    $0x1,%ecx
mov    $0x64,%r8d
call   1040 <read_number@plt>
add    %eax,%eax
mov    $0xc9,%ecx
sub    %eax,%ecx
mov    %ecx,(%r15)
lea    0xe62(%rip),%rdx
mov    $0xe,%edi
mov    $0xe,%esi
call   1050 <mvaddstr@plt>
mov    $0xe,%edi
mov    $0x38,%esi
call   1030 <read_yes_no@plt>
mov    %eax,(%r14)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [27 x i8] c"How many players (1 to 4)?\00"
@.str.1 = [24 x i8] c"Skill level (1 to 100)?\00"
@.str.2 = [13 x i8] c"1 = Novice\00"
@.str.3 = [13 x i8] c"90 = Expert\00"
@.str.4 = [21 x i8] c"100 = Twiddle finger\00"
@.str.5 = [44 x i8] c"Computer speed may affect your skill level)\00"
@.str.6 = [42 x i8] c"Increase game speed during play (Y or N)?\00"
define void @get_inputs(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = call i32 (...) @clear()
%8 = call i32 @mvaddstr(i32 4, i32 19, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%9 = call i32 @read_number(i32 4, i32 46, i32 1, i32 1, i32 4)
%10 = load i32*, i32** %4
store i32 %9, i32* %10
%11 = call i32 @mvaddstr(i32 7, i32 20, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%12 = call i32 @mvaddstr(i32 8, i32 21, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @mvaddstr(i32 9, i32 21, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%14 = call i32 @mvaddstr(i32 10, i32 21, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%15 = call i32 @mvaddstr(i32 11, i32 14, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%16 = call i32 @read_number(i32 7, i32 44, i32 3, i32 1, i32 100)
%17 = load i32*, i32** %5
store i32 %16, i32* %17
%18 = load i32*, i32** %5
%19 = load i32, i32* %18
%20 = sub i32 100, %19
%21 = mul i32 %20, 2
%22 = add i32 %21, 1
%23 = load i32*, i32** %5
store i32 %22, i32* %23
%24 = call i32 @mvaddstr(i32 14, i32 14, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%25 = call i32 @read_yes_no(i32 14, i32 56)
%26 = load i32*, i32** %6
store i32 %25, i32* %26
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"How many players (1 to 4)?\00"
@.str.1 = [24 x i8] c"Skill level (1 to 100)?\00"
@.str.2 = [13 x i8] c"1 = Novice\00"
@.str.3 = [13 x i8] c"90 = Expert\00"
@.str.4 = [21 x i8] c"100 = Twiddle finger\00"
@.str.5 = [44 x i8] c"Computer speed may affect your skill level)\00"
@.str.6 = [42 x i8] c"Increase game speed during play (Y or N)?\00"
define void @get_inputs(i32* nocapture writeonly %0, i32* nocapture writeonly %1, i32* nocapture writeonly %2) {
%4 = tail call i32 (...) @clear()
%5 = tail call i32 @mvaddstr(i32 4, i32 19, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @read_number(i32 4, i32 46, i32 1, i32 1, i32 4)
store i32 %6, i32* %0
%7 = tail call i32 @mvaddstr(i32 7, i32 20, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @mvaddstr(i32 8, i32 21, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.2, i64 0, i64 0))
%9 = tail call i32 @mvaddstr(i32 9, i32 21, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @mvaddstr(i32 10, i32 21, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0))
%11 = tail call i32 @mvaddstr(i32 11, i32 14, i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.5, i64 0, i64 0))
%12 = tail call i32 @read_number(i32 7, i32 44, i32 3, i32 1, i32 100)
%13 = mul i32 %12, -2
%14 = add i32 %13, 201
store i32 %14, i32* %1
%15 = tail call i32 @mvaddstr(i32 14, i32 14, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.6, i64 0, i64 0))
%16 = tail call i32 @read_yes_no(i32 14, i32 56)
store i32 %16, i32* %2
ret void
}