#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 parse_version_string(char *, int *, int *);
int /*<<< orphan*/ printf(char *, ...);
char *strcasestr(char *, char *);
int main(int argc, char *argv[]) {
  char *str, *s;
  int gcc_major = 9;
  int gcc_minor = 4;
  int major = 0;
  int minor = 0;
  int ret, strict = 0;
  if (argc != 2) {
    printf("No /proc/version string specified.\n");
    return 1;
  }
  str = argv[1];
  s = strcasestr(str, "Linux version");
  if (!s) {
    printf("The string \"Linux version\" was not found in the "
           "/proc/version string: \"%s\"; please report this error "
           "to linux-bugs@nvidia.com\n",
           str);
    return 1;
  }
  ret = parse_version_string(s, &major, &minor);
  if (ret == 0) {
    if ((major > 2) || (major == 2 && minor >= 5))
      strict = 1;
  } else {
    printf("No Linux kernel version found in /proc/version string: "
           "\"%s\"; please report this error to "
           "linux-bugs@nvidia.com\n",
           str);
    return 1;
  }
  str = argv[1];
  s = strcasestr(str, "(gcc");
  if (!s)
    s = strcasestr(str, "(version gcc");
  if (!s) {
    printf("The string \"(gcc\" was not found in the /proc/version "
           "string: \"%s\"; please report this error to "
           "linux-bugs@nvidia.com\n",
           str);
    return 1;
  }
  ret = parse_version_string(s, &major, &minor);
  if (ret == 0) {
    if ((major == gcc_major) && (minor == gcc_minor)) {
      printf("The compiler used to compile the kernel matches the "
             "current compiler (gcc %d.%d)\n",
             major, minor);
      return 0;
    } else if ((major == gcc_major) && (gcc_major > 2)) {
      if (strict) {
        printf("The compiler used to compile the kernel (gcc %d.%d) "
               "does not exactly match the current compiler "
               "(gcc %d.%d).  The Linux 2.6 kernel module loader "
               "rejects kernel modules built with a version of gcc "
               "that does not exactly match that of the compiler "
               "used to build the running kernel.\n",
               major, minor, gcc_major, gcc_minor);
        return 1;
      } else {
        printf("The compiler used to compile the kernel (gcc %d.%d) "
               "does not exactly match the current compiler "
               "(gcc %d.%d), but it is most likely compatible.\n",
               major, minor, gcc_major, gcc_minor);
        return 0;
      }
    } else {
      if (strict) {
        printf("You appear to be compiling the NVIDIA kernel module "
               "with a different compiler than the one that was "
               "used to compile the running kernel.  The Linux 2.6 "
               "kernel module loader rejects kernel modules built "
               "with a version of gcc that does not exactly match "
               "that of the compiler used to build the running "
               "kernel.  ");
      } else {
        printf("You appear to be compiling the NVIDIA kernel module "
               "with a different compiler than the one that was "
               "used to compile the running kernel.  This may be "
               "fine, but there are cases where this can lead to "
               "instability.  ");
      }
      printf("The compiler used to "
             "compile the kernel was gcc %d.%d; the current "
             "compiler is gcc %d.%d.\n",
             major, minor, gcc_major, gcc_minor);
      return 1;
    }
  } else {
    printf("No gcc version found in /proc/version string: \"%s\"; please "
           "report this error to linux-bugs@nvidia.com\n",
           str);
    return 1;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x9,-0x24(%rbp)
movl   $0x4,-0x28(%rbp)
movl   $0x0,-0x2c(%rbp)
movl   $0x0,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     118d <main+0x5d>
lea    0xe86(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13d3 <main+0x2a3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xe80(%rip),%rsi
call   1050 <strcasestr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    11d6 <main+0xa6>
mov    -0x18(%rbp),%rsi
lea    0xe6f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13d3 <main+0x2a3>
mov    -0x20(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <parse_version_string@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jne    121e <main+0xee>
cmpl   $0x2,-0x2c(%rbp)
jg     1212 <main+0xe2>
cmpl   $0x2,-0x2c(%rbp)
jne    1219 <main+0xe9>
cmpl   $0x5,-0x30(%rbp)
jl     1219 <main+0xe9>
movl   $0x1,-0x38(%rbp)
jmp    123c <main+0x10c>
mov    -0x18(%rbp),%rsi
lea    0xe88(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13d3 <main+0x2a3>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xece(%rip),%rsi
call   1050 <strcasestr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    127b <main+0x14b>
mov    -0x18(%rbp),%rdi
lea    0xeb4(%rip),%rsi
call   1050 <strcasestr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    12a4 <main+0x174>
mov    -0x18(%rbp),%rsi
lea    0xea2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13d3 <main+0x2a3>
mov    -0x20(%rbp),%rdi
lea    -0x2c(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <parse_version_string@plt>
mov    %eax,-0x34(%rbp)
cmpl   $0x0,-0x34(%rbp)
jne    13ba <main+0x28a>
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    12fa <main+0x1ca>
mov    -0x30(%rbp),%eax
cmp    -0x28(%rbp),%eax
jne    12fa <main+0x1ca>
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13d3 <main+0x2a3>
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    1368 <main+0x238>
cmpl   $0x2,-0x24(%rbp)
jle    1368 <main+0x238>
cmpl   $0x0,-0x38(%rbp)
je     1341 <main+0x211>
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
lea    0xecd(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13d3 <main+0x2a3>
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
lea    0xfbe(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    13d3 <main+0x2a3>
cmpl   $0x0,-0x38(%rbp)
je     1385 <main+0x255>
lea    0x102a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1393 <main+0x263>
lea    0x114b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2c(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x28(%rbp),%r8d
lea    0x1205(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13d3 <main+0x2a3>
mov    -0x18(%rbp),%rsi
lea    0x1242(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
cmp    $0x2,%edi
jne    119a <main+0x5a>
mov    %rsi,%r14
mov    0x8(%rsi),%rbx
lea    0xe95(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcasestr@plt>
test   %rax,%rax
je     11ab <main+0x6b>
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rax,%rdi
call   1040 <parse_version_string@plt>
test   %eax,%eax
je     11b7 <main+0x77>
lea    0xef8(%rip),%rdi
jmp    1278 <main+0x138>
lea    0x14a9(%rip),%rdi
call   1030 <puts@plt>
jmp    1282 <main+0x142>
lea    0xe5c(%rip),%rdi
jmp    1278 <main+0x138>
cmpl   $0x2,0xc(%rsp)
jg     11ca <main+0x8a>
mov    $0x1,%bpl
jne    11cc <main+0x8c>
cmpl   $0x5,0x8(%rsp)
jl     11cc <main+0x8c>
xor    %ebp,%ebp
mov    0x8(%r14),%rbx
lea    0xf26(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcasestr@plt>
test   %rax,%rax
jne    11f8 <main+0xb8>
lea    0xf17(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcasestr@plt>
test   %rax,%rax
je     1271 <main+0x131>
lea    0xc(%rsp),%rsi
lea    0x8(%rsp),%rdx
mov    %rax,%rdi
call   1040 <parse_version_string@plt>
test   %eax,%eax
je     1217 <main+0xd7>
lea    0x13ce(%rip),%rdi
jmp    1278 <main+0x138>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%edx
cmp    $0x9,%eax
jne    1245 <main+0x105>
cmp    $0x4,%edx
jne    1245 <main+0x105>
lea    0xf55(%rip),%rdi
xor    %ebx,%ebx
mov    $0x9,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1287 <main+0x147>
cmp    $0x9,%eax
jne    1292 <main+0x152>
test   %bpl,%bpl
je     12bf <main+0x17f>
lea    0x1099(%rip),%rdi
xor    %ebx,%ebx
mov    $0x9,%esi
mov    $0x9,%ecx
mov    $0x4,%r8d
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1287 <main+0x147>
lea    0xe97(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0x121a(%rip),%rax
lea    0x10df(%rip),%rdi
test   %bpl,%bpl
cmovne %rax,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    0xc(%rsp),%esi
mov    0x8(%rsp),%edx
lea    0x12cb(%rip),%rdi
jmp    12cb <main+0x18b>
lea    0xf11(%rip),%rdi
mov    $0x9,%esi
mov    $0x9,%ecx
mov    $0x4,%r8d
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1282 <main+0x142>

LLVM IR (-O0):
@.str = [36 x i8] c"No /proc/version string specified.\0A\00"
@.str.1 = [14 x i8] c"Linux version\00"
@.str.2 = [127 x i8] c"The string \22Linux version\22 was not found in the /proc/version string: \22%s\22; please report this error to linux-bugs@nvidia.com\0A\00"
@.str.3 = [112 x i8] c"No Linux kernel version found in /proc/version string: \22%s\22; please report this error to linux-bugs@nvidia.com\0A\00"
@.str.4 = [5 x i8] c"(gcc\00"
@.str.5 = [13 x i8] c"(version gcc\00"
@.str.6 = [118 x i8] c"The string \22(gcc\22 was not found in the /proc/version string: \22%s\22; please report this error to linux-bugs@nvidia.com\0A\00"
@.str.7 = [82 x i8] c"The compiler used to compile the kernel matches the current compiler (gcc %d.%d)\0A\00"
@.str.8 = [280 x i8] c"The compiler used to compile the kernel (gcc %d.%d) does not exactly match the current compiler (gcc %d.%d). The Linux 2.6 kernel module loader rejects kernel modules built with a version of gcc that does not exactly match that of the compiler used to build the running kernel.\0A\00"
@.str.9 = [144 x i8] c"The compiler used to compile the kernel (gcc %d.%d) does not exactly match the current compiler (gcc %d.%d), but it is most likely compatible.\0A\00"
@.str.10 = [308 x i8] c"You appear to be compiling the NVIDIA kernel module with a different compiler than the one that was used to compile the running kernel. The Linux 2.6 kernel module loader rejects kernel modules built with a version of gcc that does not exactly match that of the compiler used to build the running kernel. \00"
@.str.11 = [213 x i8] c"You appear to be compiling the NVIDIA kernel module with a different compiler than the one that was used to compile the running kernel. This may be fine, but there are cases where this can lead to instability. \00"
@.str.12 = [91 x i8] c"The compiler used to compile the kernel was gcc %d.%d; the current compiler is gcc %d.%d.\0A\00"
@.str.13 = [103 x i8] c"No gcc version found in /proc/version string: \22%s\22; please report this error to linux-bugs@nvidia.com\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 9, i32* %8
store i32 4, i32* %9
store i32 0, i32* %10
store i32 0, i32* %11
store i32 0, i32* %13
%14 = load i32, i32* %4
%15 = icmp ne i32 %14, 2
br i1 %15, label %16, label %18
16: ; preds = %2
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %120
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
store i8* %21, i8** %6
%22 = load i8*, i8** %6
%23 = call i8* @strcasestr(i8* %22, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
store i8* %23, i8** %7
%24 = load i8*, i8** %7
%25 = icmp ne i8* %24, null
br i1 %25, label %29, label %26
26: ; preds = %18
%27 = load i8*, i8** %6
%28 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([127 x i8], [127 x i8]* @.str.2, i64 0, i64 0), i8* %27)
store i32 1, i32* %3
br label %120
29: ; preds = %18
%30 = load i8*, i8** %7
%31 = call i32 @parse_version_string(i8* %30, i32* %10, i32* %11)
store i32 %31, i32* %12
%32 = load i32, i32* %12
%33 = icmp eq i32 %32, 0
br i1 %33, label %34, label %45
34: ; preds = %29
%35 = load i32, i32* %10
%36 = icmp sgt i32 %35, 2
br i1 %36, label %43, label %37
37: ; preds = %34
%38 = load i32, i32* %10
%39 = icmp eq i32 %38, 2
br i1 %39, label %40, label %44
40: ; preds = %37
%41 = load i32, i32* %11
%42 = icmp sge i32 %41, 5
br i1 %42, label %43, label %44
43: ; preds = %40, %34
store i32 1, i32* %13
br label %44
44: ; preds = %43, %40, %37
br label %48
45: ; preds = %29
%46 = load i8*, i8** %6
%47 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([112 x i8], [112 x i8]* @.str.3, i64 0, i64 0), i8* %46)
store i32 1, i32* %3
br label %120
48: ; preds = %44
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 1
%51 = load i8*, i8** %50
store i8* %51, i8** %6
%52 = load i8*, i8** %6
%53 = call i8* @strcasestr(i8* %52, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
store i8* %53, i8** %7
%54 = load i8*, i8** %7
%55 = icmp ne i8* %54, null
br i1 %55, label %59, label %56
56: ; preds = %48
%57 = load i8*, i8** %6
%58 = call i8* @strcasestr(i8* %57, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
store i8* %58, i8** %7
br label %59
59: ; preds = %56, %48
%60 = load i8*, i8** %7
%61 = icmp ne i8* %60, null
br i1 %61, label %65, label %62
62: ; preds = %59
%63 = load i8*, i8** %6
%64 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([118 x i8], [118 x i8]* @.str.6, i64 0, i64 0), i8* %63)
store i32 1, i32* %3
br label %120
65: ; preds = %59
%66 = load i8*, i8** %7
%67 = call i32 @parse_version_string(i8* %66, i32* %10, i32* %11)
store i32 %67, i32* %12
%68 = load i32, i32* %12
%69 = icmp eq i32 %68, 0
br i1 %69, label %70, label %117
70: ; preds = %65
%71 = load i32, i32* %10
%72 = load i32, i32* %8
%73 = icmp eq i32 %71, %72
br i1 %73, label %74, label %82
74: ; preds = %70
%75 = load i32, i32* %11
%76 = load i32, i32* %9
%77 = icmp eq i32 %75, %76
br i1 %77, label %78, label %82
78: ; preds = %74
%79 = load i32, i32* %10
%80 = load i32, i32* %11
%81 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([82 x i8], [82 x i8]* @.str.7, i64 0, i64 0), i32 %79, i32 %80)
store i32 0, i32* %3
br label %120
82: ; preds = %74, %70
%83 = load i32, i32* %10
%84 = load i32, i32* %8
%85 = icmp eq i32 %83, %84
br i1 %85, label %86, label %104
86: ; preds = %82
%87 = load i32, i32* %8
%88 = icmp sgt i32 %87, 2
br i1 %88, label %89, label %104
89: ; preds = %86
%90 = load i32, i32* %13
%91 = icmp ne i32 %90, 0
br i1 %91, label %92, label %98
92: ; preds = %89
%93 = load i32, i32* %10
%94 = load i32, i32* %11
%95 = load i32, i32* %8
%96 = load i32, i32* %9
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([280 x i8], [280 x i8]* @.str.8, i64 0, i64 0), i32 %93, i32 %94, i32 %95, i32 %96)
store i32 1, i32* %3
br label %120
98: ; preds = %89
%99 = load i32, i32* %10
%100 = load i32, i32* %11
%101 = load i32, i32* %8
%102 = load i32, i32* %9
%103 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([144 x i8], [144 x i8]* @.str.9, i64 0, i64 0), i32 %99, i32 %100, i32 %101, i32 %102)
store i32 0, i32* %3
br label %120
104: ; preds = %86, %82
%105 = load i32, i32* %13
%106 = icmp ne i32 %105, 0
br i1 %106, label %107, label %109
107: ; preds = %104
%108 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([308 x i8], [308 x i8]* @.str.10, i64 0, i64 0))
br label %111
109: ; preds = %104
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str.11, i64 0, i64 0))
br label %111
111: ; preds = %109, %107
%112 = load i32, i32* %10
%113 = load i32, i32* %11
%114 = load i32, i32* %8
%115 = load i32, i32* %9
%116 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([91 x i8], [91 x i8]* @.str.12, i64 0, i64 0), i32 %112, i32 %113, i32 %114, i32 %115)
store i32 1, i32* %3
br label %120
117: ; preds = %65
%118 = load i8*, i8** %6
%119 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([103 x i8], [103 x i8]* @.str.13, i64 0, i64 0), i8* %118)
store i32 1, i32* %3
br label %120
120: ; preds = %117, %111, %98, %92, %78, %62, %45, %26, %16
%121 = load i32, i32* %3
ret i32 %121
}

LLVM IR (-O2):
@.str.1 = [14 x i8] c"Linux version\00"
@.str.2 = [127 x i8] c"The string \22Linux version\22 was not found in the /proc/version string: \22%s\22; please report this error to linux-bugs@nvidia.com\0A\00"
@.str.3 = [112 x i8] c"No Linux kernel version found in /proc/version string: \22%s\22; please report this error to linux-bugs@nvidia.com\0A\00"
@.str.4 = [5 x i8] c"(gcc\00"
@.str.5 = [13 x i8] c"(version gcc\00"
@.str.6 = [118 x i8] c"The string \22(gcc\22 was not found in the /proc/version string: \22%s\22; please report this error to linux-bugs@nvidia.com\0A\00"
@.str.7 = [82 x i8] c"The compiler used to compile the kernel matches the current compiler (gcc %d.%d)\0A\00"
@.str.8 = [280 x i8] c"The compiler used to compile the kernel (gcc %d.%d) does not exactly match the current compiler (gcc %d.%d). The Linux 2.6 kernel module loader rejects kernel modules built with a version of gcc that does not exactly match that of the compiler used to build the running kernel.\0A\00"
@.str.9 = [144 x i8] c"The compiler used to compile the kernel (gcc %d.%d) does not exactly match the current compiler (gcc %d.%d), but it is most likely compatible.\0A\00"
@.str.10 = [308 x i8] c"You appear to be compiling the NVIDIA kernel module with a different compiler than the one that was used to compile the running kernel. The Linux 2.6 kernel module loader rejects kernel modules built with a version of gcc that does not exactly match that of the compiler used to build the running kernel. \00"
@.str.11 = [213 x i8] c"You appear to be compiling the NVIDIA kernel module with a different compiler than the one that was used to compile the running kernel. This may be fine, but there are cases where this can lead to instability. \00"
@.str.12 = [91 x i8] c"The compiler used to compile the kernel was gcc %d.%d; the current compiler is gcc %d.%d.\0A\00"
@.str.13 = [103 x i8] c"No gcc version found in /proc/version string: \22%s\22; please report this error to linux-bugs@nvidia.com\0A\00"
@str = [35 x i8] c"No /proc/version string specified.\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca i32
%4 = alloca i32
%5 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%6 = bitcast i32* %4 to i8*
store i32 0, i32* %4
%7 = icmp eq i32 %0, 2
br i1 %7, label %10, label %8
8: ; preds = %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @str, i64 0, i64 0))
br label %67
10: ; preds = %2
%11 = getelementptr inbounds i8*, i8** %1, i64 1
%12 = load i8*, i8** %11
%13 = tail call i8* @strcasestr(i8* %12, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp eq i8* %13, null
br i1 %14, label %15, label %17
15: ; preds = %10
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([127 x i8], [127 x i8]* @.str.2, i64 0, i64 0), i8* %12)
br label %67
17: ; preds = %10
%18 = call i32 @parse_version_string(i8* %13, i32* %3, i32* %4)
%19 = icmp eq i32 %18, 0
br i1 %19, label %20, label %29
20: ; preds = %17
%21 = load i32, i32* %3
%22 = icmp sgt i32 %21, 2
br i1 %22, label %28, label %23
23: ; preds = %20
%24 = icmp eq i32 %21, 2
%25 = load i32, i32* %4
%26 = icmp sgt i32 %25, 4
%27 = select i1 %24, i1 %26, i1 false
br i1 %27, label %28, label %31
28: ; preds = %23, %20
br label %31
29: ; preds = %17
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([112 x i8], [112 x i8]* @.str.3, i64 0, i64 0), i8* %12)
br label %67
31: ; preds = %23, %28
%32 = phi i1 [ true, %23 ], [ false, %28 ]
%33 = load i8*, i8** %11
%34 = call i8* @strcasestr(i8* %33, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%35 = icmp eq i8* %34, null
br i1 %35, label %36, label %41
36: ; preds = %31
%37 = call i8* @strcasestr(i8* %33, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0))
%38 = icmp eq i8* %37, null
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([118 x i8], [118 x i8]* @.str.6, i64 0, i64 0), i8* %33)
br label %67
41: ; preds = %31, %36
%42 = phi i8* [ %37, %36 ], [ %34, %31 ]
%43 = call i32 @parse_version_string(i8* %42, i32* %3, i32* %4)
%44 = icmp eq i32 %43, 0
br i1 %44, label %45, label %65
45: ; preds = %41
%46 = load i32, i32* %3
%47 = icmp eq i32 %46, 9
%48 = load i32, i32* %4
%49 = icmp eq i32 %48, 4
%50 = select i1 %47, i1 %49, i1 false
br i1 %50, label %51, label %53
51: ; preds = %45
%52 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([82 x i8], [82 x i8]* @.str.7, i64 0, i64 0), i32 9, i32 4)
br label %67
53: ; preds = %45
br i1 %47, label %54, label %59
54: ; preds = %53
br i1 %32, label %57, label %55
55: ; preds = %54
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([280 x i8], [280 x i8]* @.str.8, i64 0, i64 0), i32 9, i32 %48, i32 9, i32 4)
br label %67
57: ; preds = %54
%58 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([144 x i8], [144 x i8]* @.str.9, i64 0, i64 0), i32 9, i32 %48, i32 9, i32 4)
br label %67
59: ; preds = %53
%60 = select i1 %32, i8* getelementptr inbounds ([213 x i8], [213 x i8]* @.str.11, i64 0, i64 0), i8* getelementptr inbounds ([308 x i8], [308 x i8]* @.str.10, i64 0, i64 0)
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) %60)
%62 = load i32, i32* %3
%63 = load i32, i32* %4
%64 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([91 x i8], [91 x i8]* @.str.12, i64 0, i64 0), i32 %62, i32 %63, i32 9, i32 4)
br label %67
65: ; preds = %41
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([103 x i8], [103 x i8]* @.str.13, i64 0, i64 0), i8* %33)
br label %67
67: ; preds = %65, %59, %57, %55, %51, %39, %29, %15, %8
%68 = phi i32 [ 1, %8 ], [ 0, %51 ], [ 1, %55 ], [ 0, %57 ], [ 1, %59 ], [ 1, %65 ], [ 1, %39 ], [ 1, %29 ], [ 1, %15 ]
ret i32 %68
}