#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*/ initscr();
int /*<<< orphan*/ printw(char *, char *, ...);
int /*<<< orphan*/ refresh();
void greetings_parallel(int numThreads, char *version) {
  initscr();
  if (numThreads > 1) {
    printw("*** LIME, The versatile line modeling engine, Ver. %s (parallel "
           "running, %d threads)\n",
           version, numThreads);
  } else {
    printw("*** LIME, The versatile line modeling engine, Ver. %s\n", version);
  }
  refresh();
}


x86 assembly (clang, -O0):
<greetings_parallel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <initscr@plt>
cmpl   $0x1,-0x4(%rbp)
jle    116a <greetings_parallel+0x3a>
mov    -0x10(%rbp),%rsi
mov    -0x4(%rbp),%edx
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1040 <printw@plt>
jmp    117c <greetings_parallel+0x4c>
mov    -0x10(%rbp),%rsi
lea    0xee1(%rip),%rdi
mov    $0x0,%al
call   1040 <printw@plt>
mov    $0x0,%al
call   1050 <refresh@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<greetings_parallel>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <initscr@plt>
cmp    $0x2,%ebp
jl     1159 <greetings_parallel+0x29>
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printw@plt>
jmp    116a <greetings_parallel+0x3a>
lea    0xef6(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printw@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <refresh@plt>

LLVM IR (-O0):
@.str = [86 x i8] c"*** LIME, The versatile line modeling engine, Ver. %s (parallel running, %d threads)\0A\00"
@.str.1 = [55 x i8] c"*** LIME, The versatile line modeling engine, Ver. %s\0A\00"
define void @greetings_parallel(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = call i32 (...) @initscr()
%6 = load i32, i32* %3
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = load i32, i32* %3
%11 = call i32 (i8*, i8*, ...) @printw(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %10)
br label %15
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = call i32 (i8*, i8*, ...) @printw(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %12, %8
%16 = call i32 (...) @refresh()
ret void
}

LLVM IR (-O2):
@.str = [86 x i8] c"*** LIME, The versatile line modeling engine, Ver. %s (parallel running, %d threads)\0A\00"
@.str.1 = [55 x i8] c"*** LIME, The versatile line modeling engine, Ver. %s\0A\00"
define void @greetings_parallel(i32 %0, i8* %1) {
%3 = tail call i32 (...) @initscr()
%4 = icmp sgt i32 %0, 1
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 (i8*, i8*, ...) @printw(i8* getelementptr inbounds ([86 x i8], [86 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %0)
br label %9
7: ; preds = %2
%8 = tail call i32 (i8*, i8*, ...) @printw(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %9
9: ; preds = %7, %5
%10 = tail call i32 (...) @refresh()
ret void
}