#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 mymain(int kname, int nname, int krel, int kver, int mach, int proc,
           int hard, int opsys) {
  if (kname)
    printf("Linux ");
  if (nname)
    printf("localhost.localdomain ");
  if (krel)
    printf("2.4.19-16 ");
  if (kver)
    printf("#1 Fri Sep 20 18:15:05 CEST 2002 ");
  if (mach)
    printf("i686 ");
  if (proc)
    printf("Intel ");
  if (hard)
    printf("unknown ");
  if (opsys)
    printf("GNU/Linux ");
  printf("\n");
  return 0;
}


x86 assembly (clang, -O0):
<mymain>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1148 <mymain+0x38>
lea    0xf1b(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x8(%rbp)
je     115e <mymain+0x4e>
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0xc(%rbp)
je     1174 <mymain+0x64>
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x10(%rbp)
je     118a <mymain+0x7a>
lea    0xe9d(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x14(%rbp)
je     11a0 <mymain+0x90>
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,-0x18(%rbp)
je     11b6 <mymain+0xa6>
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,0x10(%rbp)
je     11cc <mymain+0xbc>
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x0,0x18(%rbp)
je     11e2 <mymain+0xd2>
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
lea    0xe7c(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mymain>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r9d,%r14d
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %edx,%ebp
mov    %esi,%ebx
test   %edi,%edi
je     1145 <mymain+0x25>
lea    0xf1e(%rip),%rdi
call   1040 <printf@plt>
test   %ebx,%ebx
je     1155 <mymain+0x35>
lea    0xeb0(%rip),%rdi
call   1040 <printf@plt>
test   %ebp,%ebp
je     1165 <mymain+0x45>
lea    0xeb7(%rip),%rdi
call   1040 <printf@plt>
test   %r12d,%r12d
je     1176 <mymain+0x56>
lea    0xeb1(%rip),%rdi
call   1040 <printf@plt>
test   %r15d,%r15d
je     1187 <mymain+0x67>
lea    0xec2(%rip),%rdi
call   1040 <printf@plt>
mov    0x30(%rsp),%ebx
test   %r14d,%r14d
je     119c <mymain+0x7c>
lea    0xeb3(%rip),%rdi
call   1040 <printf@plt>
mov    0x38(%rsp),%ebp
test   %ebx,%ebx
je     11b0 <mymain+0x90>
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
test   %ebp,%ebp
je     11c0 <mymain+0xa0>
lea    0xe9f(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"Linux \00"
@.str.1 = [23 x i8] c"localhost.localdomain \00"
@.str.2 = [11 x i8] c"2.4.19-16 \00"
@.str.3 = [34 x i8] c" Fri Sep 20 18:15:05 CEST 2002 \00"
@.str.4 = [6 x i8] c"i686 \00"
@.str.5 = [7 x i8] c"Intel \00"
@.str.6 = [9 x i8] c"unknown \00"
@.str.7 = [11 x i8] c"GNU/Linux \00"
@.str.8 = [2 x i8] c"\0A\00"
define i32 @mymain(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%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* %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%17 = load i32, i32* %9
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %8
%20 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19, %8
%22 = load i32, i32* %10
%23 = icmp ne i32 %22, 0
br i1 %23, label %24, label %26
24: ; preds = %21
%25 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %24, %21
%27 = load i32, i32* %11
%28 = icmp ne i32 %27, 0
br i1 %28, label %29, label %31
29: ; preds = %26
%30 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %31
31: ; preds = %29, %26
%32 = load i32, i32* %12
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %36
34: ; preds = %31
%35 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
br label %36
36: ; preds = %34, %31
%37 = load i32, i32* %13
%38 = icmp ne i32 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %41
41: ; preds = %39, %36
%42 = load i32, i32* %14
%43 = icmp ne i32 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %46
46: ; preds = %44, %41
%47 = load i32, i32* %15
%48 = icmp ne i32 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
br label %51
51: ; preds = %49, %46
%52 = load i32, i32* %16
%53 = icmp ne i32 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
br label %56
56: ; preds = %54, %51
%57 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.8, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"Linux \00"
@.str.1 = [23 x i8] c"localhost.localdomain \00"
@.str.2 = [11 x i8] c"2.4.19-16 \00"
@.str.3 = [34 x i8] c" Fri Sep 20 18:15:05 CEST 2002 \00"
@.str.4 = [6 x i8] c"i686 \00"
@.str.5 = [7 x i8] c"Intel \00"
@.str.6 = [9 x i8] c"unknown \00"
@.str.7 = [11 x i8] c"GNU/Linux \00"
define i32 @mymain(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = icmp eq i32 %0, 0
br i1 %9, label %12, label %10
10: ; preds = %8
%11 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %8
%13 = icmp eq i32 %1, 0
br i1 %13, label %16, label %14
14: ; preds = %12
%15 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
%17 = icmp eq i32 %2, 0
br i1 %17, label %20, label %18
18: ; preds = %16
%19 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
br label %20
20: ; preds = %18, %16
%21 = icmp eq i32 %3, 0
br i1 %21, label %24, label %22
22: ; preds = %20
%23 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0))
br label %24
24: ; preds = %22, %20
%25 = icmp eq i32 %4, 0
br i1 %25, label %28, label %26
26: ; preds = %24
%27 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
br label %28
28: ; preds = %26, %24
%29 = icmp eq i32 %5, 0
br i1 %29, label %32, label %30
30: ; preds = %28
%31 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
br label %32
32: ; preds = %30, %28
%33 = icmp eq i32 %6, 0
br i1 %33, label %36, label %34
34: ; preds = %32
%35 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.6, i64 0, i64 0))
br label %36
36: ; preds = %34, %32
%37 = icmp eq i32 %7, 0
br i1 %37, label %40, label %38
38: ; preds = %36
%39 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.7, i64 0, i64 0))
br label %40
40: ; preds = %38, %36
%41 = tail call i32 @putchar(i32 10)
ret i32 0
}