#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*/ SIGKILL;
int /*<<< orphan*/ finish(char *);
int /*<<< orphan*/ get_cpuid(char *);
int /*<<< orphan*/ get_name(char *);
int /*<<< orphan*/ get_os(char *);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ raise(int /*<<< orphan*/);
int /*<<< orphan*/ strcat(char *, char *);
scalar_t__ strcmp(char *, char *);
int main(int argc, char **argv) {
  int i;
  char buffer[1024];
  char buffer2[1024];
  memset(buffer2, 0, 1024);
  get_name(buffer);
  printf("Computer name: %s\n", buffer);
  if (strcmp(buffer, "hax0rz!~")) {
    printf("Sorry, your computer's name - %s - is not correct!\n", buffer);
    raise(SIGKILL);
  }
  strcat(buffer2, buffer);
  get_os(buffer);
  printf("OS version: %s\n", buffer);
  if (strcmp(buffer, "2.4.31")) {
    printf("Sorry, your OS version - %s - is not supported!\n", buffer);
    raise(SIGKILL);
  }
  strcat(buffer2, buffer);
  get_cpuid(buffer);
  printf("%s\n", buffer);
  if (strcmp(buffer, "AMDisbetter!")) {
    printf("Sorry, your CPU - %s - is not supported!\n", buffer);
    raise(SIGKILL);
  }
  strcat(buffer2, buffer);
  finish(buffer2);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x820,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x820(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1070 <memset@plt>
lea    -0x420(%rbp),%rdi
call   10b0 <get_name@plt>
lea    -0x420(%rbp),%rsi
lea    0xe2a(%rip),%rdi
call   1060 <printf@plt>
lea    -0x420(%rbp),%rdi
lea    0xe2a(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     1219 <main+0x89>
lea    -0x420(%rbp),%rsi
lea    0xe16(%rip),%rdi
call   1060 <printf@plt>
mov    0x2dce(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
lea    -0x820(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   10a0 <strcat@plt>
lea    -0x420(%rbp),%rdi
call   1090 <get_os@plt>
lea    -0x420(%rbp),%rsi
lea    0xe0a(%rip),%rdi
call   1060 <printf@plt>
lea    -0x420(%rbp),%rdi
lea    0xe07(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     1289 <main+0xf9>
lea    -0x420(%rbp),%rsi
lea    0xdf1(%rip),%rdi
call   1060 <printf@plt>
mov    0x2d5e(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
lea    -0x820(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   10a0 <strcat@plt>
lea    -0x420(%rbp),%rdi
call   1050 <get_cpuid@plt>
lea    -0x420(%rbp),%rsi
lea    0xd59(%rip),%rdi
call   1060 <printf@plt>
lea    -0x420(%rbp),%rdi
lea    0xdcf(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     12f9 <main+0x169>
lea    -0x420(%rbp),%rsi
lea    0xdbf(%rip),%rdi
call   1060 <printf@plt>
mov    0x2cee(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
lea    -0x820(%rbp),%rdi
lea    -0x420(%rbp),%rsi
call   10a0 <strcat@plt>
lea    -0x820(%rbp),%rdi
call   1040 <finish@plt>
mov    -0x4(%rbp),%eax
add    $0x820,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x800,%rsp
lea    0x400(%rsp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1070 <memset@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
call   10b0 <get_name@plt>
lea    0xe42(%rip),%rdi
mov    %rbx,%rsi
call   1060 <printf@plt>
lea    0xe46(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     11f7 <main+0x67>
lea    0xe3b(%rip),%rdi
mov    %rsp,%rsi
call   1060 <printf@plt>
mov    0x2df0(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
lea    0x400(%rsp),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   10a0 <strcat@plt>
mov    %rbx,%rdi
call   1090 <get_os@plt>
lea    0xe37(%rip),%rdi
mov    %rbx,%rsi
call   1060 <printf@plt>
lea    0xe38(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     1252 <main+0xc2>
lea    0xe2b(%rip),%rdi
mov    %rsp,%rsi
call   1060 <printf@plt>
mov    0x2d95(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
lea    0x400(%rsp),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   10a0 <strcat@plt>
mov    %rbx,%rdi
call   1050 <get_cpuid@plt>
lea    0xd9b(%rip),%rdi
mov    %rbx,%rsi
call   1060 <printf@plt>
lea    0xe15(%rip),%rsi
mov    %rbx,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     12ad <main+0x11d>
lea    0xe0e(%rip),%rdi
mov    %rsp,%rsi
call   1060 <printf@plt>
mov    0x2d3a(%rip),%rax
mov    (%rax),%edi
call   1030 <raise@plt>
lea    0x400(%rsp),%rbx
mov    %rsp,%rsi
mov    %rbx,%rdi
call   10a0 <strcat@plt>
mov    %rbx,%rdi
call   1040 <finish@plt>
xor    %eax,%eax
add    $0x800,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"Computer name: %s\0A\00"
@.str.1 = [9 x i8] c"hax0rz!~\00"
@.str.2 = [52 x i8] c"Sorry, your computer's name - %s - is not correct!\0A\00"
@SIGKILL = global i32 0
@.str.3 = [16 x i8] c"OS version: %s\0A\00"
@.str.4 = [7 x i8] c"2.4.31\00"
@.str.5 = [49 x i8] c"Sorry, your OS version - %s - is not supported!\0A\00"
@.str.6 = [4 x i8] c"%s\0A\00"
@.str.7 = [13 x i8] c"AMDisbetter!\00"
@.str.8 = [42 x i8] c"Sorry, your CPU - %s - is not supported!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [1024 x i8]
%8 = alloca [1024 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%10 = call i32 @memset(i8* %9, i32 0, i32 1024)
%11 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%12 = call i32 @get_name(i8* %11)
%13 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%14 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%16 = call i64 @strcmp(i8* %15, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%17 = icmp ne i64 %16, 0
br i1 %17, label %18, label %23
18: ; preds = %2
%19 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%20 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i8* %19)
%21 = load i32, i32* @SIGKILL
%22 = call i32 @raise(i32 %21)
br label %23
23: ; preds = %18, %2
%24 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%25 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%26 = call i32 @strcat(i8* %24, i8* %25)
%27 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%28 = call i32 @get_os(i8* %27)
%29 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%30 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %29)
%31 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%32 = call i64 @strcmp(i8* %31, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%33 = icmp ne i64 %32, 0
br i1 %33, label %34, label %39
34: ; preds = %23
%35 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%36 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0), i8* %35)
%37 = load i32, i32* @SIGKILL
%38 = call i32 @raise(i32 %37)
br label %39
39: ; preds = %34, %23
%40 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%41 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%42 = call i32 @strcat(i8* %40, i8* %41)
%43 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%44 = call i32 @get_cpuid(i8* %43)
%45 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%46 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %45)
%47 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%48 = call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%49 = icmp ne i64 %48, 0
br i1 %49, label %50, label %55
50: ; preds = %39
%51 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%52 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0), i8* %51)
%53 = load i32, i32* @SIGKILL
%54 = call i32 @raise(i32 %53)
br label %55
55: ; preds = %50, %39
%56 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%57 = getelementptr inbounds [1024 x i8], [1024 x i8]* %7, i64 0, i64 0
%58 = call i32 @strcat(i8* %56, i8* %57)
%59 = getelementptr inbounds [1024 x i8], [1024 x i8]* %8, i64 0, i64 0
%60 = call i32 @finish(i8* %59)
%61 = load i32, i32* %3
ret i32 %61
}

LLVM IR (-O2):
@.str = [19 x i8] c"Computer name: %s\0A\00"
@.str.1 = [9 x i8] c"hax0rz!~\00"
@.str.2 = [52 x i8] c"Sorry, your computer's name - %s - is not correct!\0A\00"
@SIGKILL = global i32 0
@.str.3 = [16 x i8] c"OS version: %s\0A\00"
@.str.4 = [7 x i8] c"2.4.31\00"
@.str.5 = [49 x i8] c"Sorry, your OS version - %s - is not supported!\0A\00"
@.str.6 = [4 x i8] c"%s\0A\00"
@.str.7 = [13 x i8] c"AMDisbetter!\00"
@.str.8 = [42 x i8] c"Sorry, your CPU - %s - is not supported!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [1024 x i8]
%4 = alloca [1024 x i8]
%5 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [1024 x i8], [1024 x i8]* %4, i64 0, i64 0
%7 = call i32 @memset(i8* %6, i32 0, i32 1024)
%8 = call i32 @get_name(i8* %5)
%9 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %5)
%10 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %16, label %12
12: ; preds = %2
%13 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.2, i64 0, i64 0), i8* %5)
%14 = load i32, i32* @SIGKILL
%15 = call i32 @raise(i32 %14)
br label %16
16: ; preds = %12, %2
%17 = call i32 @strcat(i8* %6, i8* %5)
%18 = call i32 @get_os(i8* %5)
%19 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %5)
%20 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0))
%21 = icmp eq i64 %20, 0
br i1 %21, label %26, label %22
22: ; preds = %16
%23 = call i32 @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.5, i64 0, i64 0), i8* %5)
%24 = load i32, i32* @SIGKILL
%25 = call i32 @raise(i32 %24)
br label %26
26: ; preds = %22, %16
%27 = call i32 @strcat(i8* %6, i8* %5)
%28 = call i32 @get_cpuid(i8* %5)
%29 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %5)
%30 = call i64 @strcmp(i8* %5, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.7, i64 0, i64 0))
%31 = icmp eq i64 %30, 0
br i1 %31, label %36, label %32
32: ; preds = %26
%33 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str.8, i64 0, i64 0), i8* %5)
%34 = load i32, i32* @SIGKILL
%35 = call i32 @raise(i32 %34)
br label %36
36: ; preds = %32, %26
%37 = call i32 @strcat(i8* %6, i8* %5)
%38 = call i32 @finish(i8* %6)
ret i32 0
}