#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*/ _fail(char *);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ pass();
int main(void) {
  char bufmem[64] = "2.6.22";
  char *buf = bufmem;
  unsigned int version;
  int parts;
  char *cp;
  version = 0;
  parts = 0;
  cp = buf;
  while ((*cp >= '0') && (*cp <= '9')) {
    unsigned int here = *cp++ - '0';
    while ((*cp >= '0') && (*cp <= '9')) {
      here *= 10;
      here += *cp++ - '0';
    }
    ++parts;
    version <<= 8;
    version |= here;
    if (*cp++ != '.')
      break;
  }
  if (parts < 3)
    version <<= 8 * (3 - parts);
  if (version < 131584) {
    _fail("at "
          "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
          "2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/"
          "xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_glibc_kernelversion.c"
          ":"
          "113"
          " ");
  };
  pass();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
xor    %esi,%esi
mov    $0x40,%edx
call   1040 <memset@plt>
movb   $0x32,-0x50(%rbp)
movb   $0x2e,-0x4f(%rbp)
movb   $0x36,-0x4e(%rbp)
movb   $0x2e,-0x4d(%rbp)
movb   $0x32,-0x4c(%rbp)
movb   $0x32,-0x4b(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
movl   $0x0,-0x5c(%rbp)
movl   $0x0,-0x60(%rbp)
mov    -0x58(%rbp),%rax
mov    %rax,-0x68(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x6d(%rbp)
jl     11ba <main+0x7a>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x6d(%rbp)
mov    -0x6d(%rbp),%al
test   $0x1,%al
jne    11ca <main+0x8a>
jmp    127e <main+0x13e>
mov    -0x68(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x68(%rbp)
movsbl (%rax),%eax
sub    $0x30,%eax
mov    %eax,-0x6c(%rbp)
mov    -0x68(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x6e(%rbp)
jl     1207 <main+0xc7>
mov    -0x68(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x6e(%rbp)
mov    -0x6e(%rbp),%al
test   $0x1,%al
jne    1217 <main+0xd7>
jmp    123e <main+0xfe>
imul   $0xa,-0x6c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x68(%rbp)
movsbl (%rax),%eax
sub    $0x30,%eax
add    -0x6c(%rbp),%eax
mov    %eax,-0x6c(%rbp)
jmp    11e2 <main+0xa2>
mov    -0x60(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x60(%rbp)
mov    -0x5c(%rbp),%eax
shl    $0x8,%eax
mov    %eax,-0x5c(%rbp)
mov    -0x6c(%rbp),%eax
or     -0x5c(%rbp),%eax
mov    %eax,-0x5c(%rbp)
mov    -0x68(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x68(%rbp)
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     1279 <main+0x139>
jmp    127e <main+0x13e>
jmp    1195 <main+0x55>
cmpl   $0x3,-0x60(%rbp)
jge    129b <main+0x15b>
mov    $0x3,%ecx
sub    -0x60(%rbp),%ecx
shl    $0x3,%ecx
mov    -0x5c(%rbp),%eax
shl    %cl,%eax
mov    %eax,-0x5c(%rbp)
cmpl   $0x20200,-0x5c(%rbp)
jae    12b4 <main+0x174>
lea    0xd51(%rip),%rdi
call   1050 <_fail@plt>
mov    $0x0,%al
call   1030 <pass@plt>
xor    %edi,%edi
call   1060 <exit@plt>

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
mov    %rsp,%rcx
xorps  %xmm0,%xmm0
movaps %xmm0,(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x20(%rsp)
movaps %xmm0,0x10(%rsp)
movl   $0x2e362e32,(%rsp)
movw   $0x3232,0x4(%rsp)
mov    $0x32,%sil
xor    %edx,%edx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edx,%r8d
movzbl %sil,%esi
add    $0xffffffd0,%esi
mov    0x1(%rcx),%dil
lea    -0x30(%rdi),%edx
cmp    $0x9,%dl
ja     11ad <main+0x7d>
cs nopw 0x0(%rax,%rax,1)
movzbl %dil,%edx
lea    (%rsi,%rsi,4),%esi
lea    (%rdx,%rsi,2),%esi
add    $0xffffffd0,%esi
movzbl 0x2(%rcx),%edi
lea    -0x30(%rdi),%edx
add    $0x1,%rcx
cmp    $0xa,%dl
jb     1190 <main+0x60>
lea    0x1(%r8),%edx
shl    $0x8,%eax
or     %esi,%eax
cmp    $0x2e,%dil
jne    11cc <main+0x9c>
add    $0x2,%rcx
mov    (%rcx),%sil
lea    -0x30(%rsi),%edi
cmp    $0xa,%dil
jb     1170 <main+0x40>
shl    $0x3,%dl
mov    $0x18,%cl
sub    %dl,%cl
xor    %edx,%edx
cmp    $0x2,%r8d
movzbl %cl,%ecx
cmovae %edx,%ecx
shl    %cl,%eax
cmp    $0x201ff,%eax
ja     11f4 <main+0xc4>
lea    0xe11(%rip),%rdi
call   1040 <_fail@plt>
xor    %eax,%eax
call   1030 <pass@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [204 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_glibc_kernelversion.c:113 \00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [64 x i8]
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %1
%8 = bitcast [64 x i8]* %2 to i8*
%9 = bitcast i8* %8 to [64 x i8]*
%10 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i32 0, i32 0
store i8 50, i8* %10
%11 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i32 0, i32 1
store i8 46, i8* %11
%12 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i32 0, i32 2
store i8 54, i8* %12
%13 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i32 0, i32 3
store i8 46, i8* %13
%14 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i32 0, i32 4
store i8 50, i8* %14
%15 = getelementptr inbounds [64 x i8], [64 x i8]* %9, i32 0, i32 5
store i8 50, i8* %15
%16 = getelementptr inbounds [64 x i8], [64 x i8]* %2, i64 0, i64 0
store i8* %16, i8** %3
store i32 0, i32* %4
store i32 0, i32* %5
%17 = load i8*, i8** %3
store i8* %17, i8** %6
br label %18
18: ; preds = %72, %0
%19 = load i8*, i8** %6
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp sge i32 %21, 48
br i1 %22, label %23, label %28
23: ; preds = %18
%24 = load i8*, i8** %6
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp sle i32 %26, 57
br label %28
28: ; preds = %23, %18
%29 = phi i1 [ false, %18 ], [ %27, %23 ]
br i1 %29, label %30, label %73
30: ; preds = %28
%31 = load i8*, i8** %6
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %6
%33 = load i8, i8* %31
%34 = sext i8 %33 to i32
%35 = sub nsw i32 %34, 48
store i32 %35, i32* %7
br label %36
36: ; preds = %48, %30
%37 = load i8*, i8** %6
%38 = load i8, i8* %37
%39 = sext i8 %38 to i32
%40 = icmp sge i32 %39, 48
br i1 %40, label %41, label %46
41: ; preds = %36
%42 = load i8*, i8** %6
%43 = load i8, i8* %42
%44 = sext i8 %43 to i32
%45 = icmp sle i32 %44, 57
br label %46
46: ; preds = %41, %36
%47 = phi i1 [ false, %36 ], [ %45, %41 ]
br i1 %47, label %48, label %58
48: ; preds = %46
%49 = load i32, i32* %7
%50 = mul i32 %49, 10
store i32 %50, i32* %7
%51 = load i8*, i8** %6
%52 = getelementptr inbounds i8, i8* %51, i32 1
store i8* %52, i8** %6
%53 = load i8, i8* %51
%54 = sext i8 %53 to i32
%55 = sub nsw i32 %54, 48
%56 = load i32, i32* %7
%57 = add i32 %56, %55
store i32 %57, i32* %7
br label %36
58: ; preds = %46
%59 = load i32, i32* %5
%60 = add nsw i32 %59, 1
store i32 %60, i32* %5
%61 = load i32, i32* %4
%62 = shl i32 %61, 8
store i32 %62, i32* %4
%63 = load i32, i32* %7
%64 = load i32, i32* %4
%65 = or i32 %64, %63
store i32 %65, i32* %4
%66 = load i8*, i8** %6
%67 = getelementptr inbounds i8, i8* %66, i32 1
store i8* %67, i8** %6
%68 = load i8, i8* %66
%69 = sext i8 %68 to i32
%70 = icmp ne i32 %69, 46
br i1 %70, label %71, label %72
71: ; preds = %58
br label %73
72: ; preds = %58
br label %18
73: ; preds = %71, %28
%74 = load i32, i32* %5
%75 = icmp slt i32 %74, 3
br i1 %75, label %76, label %82
76: ; preds = %73
%77 = load i32, i32* %5
%78 = sub nsw i32 3, %77
%79 = mul nsw i32 8, %78
%80 = load i32, i32* %4
%81 = shl i32 %80, %79
store i32 %81, i32* %4
br label %82
82: ; preds = %76, %73
%83 = load i32, i32* %4
%84 = icmp ult i32 %83, 131584
br i1 %84, label %85, label %87
85: ; preds = %82
%86 = call i32 @_fail(i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str, i64 0, i64 0))
br label %87
87: ; preds = %85, %82
%88 = call i32 (...) @pass()
%89 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [204 x i8] c"at /scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/01org/KVMGT-qemu/refs/heads/162/Codes/xen-4.3.1/tools/qemu-xen/tests/tcg/cris/check_glibc_kernelversion.c:113 \00"
define i32 @main() {
%1 = alloca [64 x i8]
%2 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 0
store i8 50, i8* %2
%3 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 1
store i8 46, i8* %3
%4 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 2
store i8 54, i8* %4
%5 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 3
store i8 46, i8* %5
%6 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 4
store i8 50, i8* %6
%7 = getelementptr inbounds [64 x i8], [64 x i8]* %1, i64 0, i64 5
store i8 50, i8* %7
br label %8
8: ; preds = %0, %40
%9 = phi i8* [ %2, %0 ], [ %38, %40 ]
%10 = phi i32 [ 0, %0 ], [ %35, %40 ]
%11 = phi i32 [ 0, %0 ], [ %37, %40 ]
%12 = phi i8 [ 50, %0 ], [ %41, %40 ]
%13 = zext i8 %12 to i32
%14 = add nsw i32 %13, -48
%15 = getelementptr inbounds i8, i8* %9, i64 1
%16 = load i8, i8* %15
%17 = add i8 %16, -48
%18 = icmp ult i8 %17, 10
br i1 %18, label %19, label %31
19: ; preds = %8, %19
%20 = phi i8 [ %28, %19 ], [ %16, %8 ]
%21 = phi i8* [ %27, %19 ], [ %15, %8 ]
%22 = phi i32 [ %26, %19 ], [ %14, %8 ]
%23 = zext i8 %20 to i32
%24 = mul i32 %22, 10
%25 = add i32 %24, -48
%26 = add i32 %25, %23
%27 = getelementptr inbounds i8, i8* %21, i64 1
%28 = load i8, i8* %27
%29 = add i8 %28, -48
%30 = icmp ult i8 %29, 10
br i1 %30, label %19, label %31
31: ; preds = %19, %8
%32 = phi i8* [ %9, %8 ], [ %21, %19 ]
%33 = phi i32 [ %14, %8 ], [ %26, %19 ]
%34 = phi i8 [ %16, %8 ], [ %28, %19 ]
%35 = add nuw nsw i32 %10, 1
%36 = shl i32 %11, 8
%37 = or i32 %33, %36
%38 = getelementptr inbounds i8, i8* %32, i64 2
%39 = icmp eq i8 %34, 46
br i1 %39, label %40, label %44
40: ; preds = %31
%41 = load i8, i8* %38
%42 = add i8 %41, -48
%43 = icmp ult i8 %42, 10
br i1 %43, label %8, label %44
44: ; preds = %31, %40
%45 = icmp ult i32 %10, 2
%46 = mul i32 %35, -8
%47 = add i32 %46, 24
%48 = select i1 %45, i32 %47, i32 0
%49 = shl i32 %37, %48
%50 = icmp ult i32 %49, 131584
br i1 %50, label %51, label %53
51: ; preds = %44
%52 = tail call i32 @_fail(i8* getelementptr inbounds ([204 x i8], [204 x i8]* @.str, i64 0, i64 0))
br label %53
53: ; preds = %51, %44
%54 = tail call i32 (...) @pass()
%55 = tail call i32 @exit(i32 0)
unreachable
}