#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
typedef int /*<<< orphan*/ predef_info;
struct TYPE_3__ {
  int value;
  char *name;
  char *description;
};

/* Variables and functions */
int /*<<< orphan*/ create_predef_entries();
TYPE_1__ *generated_predef_info;
unsigned int generated_predef_info_count;
int /*<<< orphan*/ predef_info_compare;
int /*<<< orphan*/ printf(char *, char *, int, ...);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ qsort(TYPE_1__ *, unsigned int, int, int /*<<< orphan*/);
int main() {
  unsigned x = 0;
  create_predef_entries();
  qsort(generated_predef_info, generated_predef_info_count, sizeof(predef_info),
        predef_info_compare);
  puts("** Detected **");
  for (x = 0; x < generated_predef_info_count; ++x) {
    if (generated_predef_info[x].value > 0)
      printf("%s = %u (%u,%u,%u) | %s\n", generated_predef_info[x].name,
             generated_predef_info[x].value,
             (generated_predef_info[x].value / 10000000) % 100,
             (generated_predef_info[x].value / 100000) % 100,
             (generated_predef_info[x].value) % 100000,
             generated_predef_info[x].description);
  }
  puts("** Not Detected **");
  for (x = 0; x < generated_predef_info_count; ++x) {
    if (generated_predef_info[x].value == 0)
      printf("%s = %u | %s\n", generated_predef_info[x].name,
             generated_predef_info[x].value,
             generated_predef_info[x].description);
  }
  if (generated_predef_info_count > 0)
    return 0;
  else
    return 1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1060 <create_predef_entries@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%rdi
mov    0x2e72(%rip),%rax
mov    (%rax),%esi
mov    0x2e61(%rip),%rax
mov    (%rax),%ecx
mov    $0x4,%edx
call   1040 <qsort@plt>
lea    0xe76(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2e40(%rip),%rcx
cmp    (%rcx),%eax
jae    12a8 <main+0x168>
mov    0x2e41(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%ecx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
cmpl   $0x0,(%rax)
jle    1295 <main+0x155>
mov    0x2e24(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%ecx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rsi
mov    0x2e0c(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%ecx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    0x2df3(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%ecx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%eax
mov    $0x989680,%ecx
cltd
idiv   %ecx
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %edx,%ecx
mov    0x2dcb(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%edx
imul   $0x18,%rdx,%rdx
add    %rdx,%rax
mov    (%rax),%eax
mov    $0x186a0,%edi
cltd
idiv   %edi
mov    $0x64,%edi
cltd
idiv   %edi
mov    %edx,%r8d
mov    0x2da2(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%edx
imul   $0x18,%rdx,%rdx
add    %rdx,%rax
mov    (%rax),%eax
mov    $0x186a0,%edi
cltd
idiv   %edi
mov    %edx,%r9d
mov    -0xc(%rbp),%edx
mov    0x2d7e(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%edi
imul   $0x18,%rdi,%rdi
add    %rdi,%rax
mov    0x10(%rax),%rax
lea    0xd85(%rip),%rdi
mov    %rax,(%rsp)
mov    $0x0,%al
call   1050 <printf@plt>
jmp    129a <main+0x15a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1196 <main+0x56>
lea    0xd79(%rip),%rdi
call   1030 <puts@plt>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    0x2d1b(%rip),%rcx
cmp    (%rcx),%eax
jae    1351 <main+0x211>
mov    0x2d1c(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%ecx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
cmpl   $0x0,(%rax)
jne    133e <main+0x1fe>
mov    0x2cff(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%ecx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x8(%rax),%rsi
mov    0x2ce7(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%ecx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    (%rax),%edx
mov    0x2cd1(%rip),%rax
mov    (%rax),%rax
mov    -0x8(%rbp),%ecx
imul   $0x18,%rcx,%rcx
add    %rcx,%rax
mov    0x10(%rax),%rcx
lea    0xd04(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
jmp    1343 <main+0x203>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    12bb <main+0x17b>
mov    0x2c88(%rip),%rax
cmpl   $0x0,(%rax)
jbe    136d <main+0x22d>
movl   $0x0,-0x4(%rbp)
jmp    1374 <main+0x234>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
xor    %r13d,%r13d
xor    %eax,%eax
call   1060 <create_predef_entries@plt>
mov    0x2e94(%rip),%r14
mov    (%r14),%rdi
mov    0x2e7a(%rip),%r12
mov    (%r12),%esi
mov    0x2e67(%rip),%rax
mov    (%rax),%ecx
mov    $0x4,%edx
call   1040 <qsort@plt>
lea    0xe7c(%rip),%rdi
call   1030 <puts@plt>
mov    (%r12),%ecx
test   %ecx,%ecx
je     1247 <main+0x107>
mov    (%r14),%r10
mov    $0x10,%ebx
lea    0xe6b(%rip),%r15
xor    %ebp,%ebp
jmp    11c3 <main+0x83>
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
mov    %ecx,%eax
add    $0x18,%rbx
cmp    %rax,%rbp
jae    1247 <main+0x107>
mov    -0x10(%r10,%rbx,1),%edx
test   %edx,%edx
jle    11b0 <main+0x70>
mov    %edx,%ecx
imul   $0x6b5fca6b,%rcx,%rcx
shr    $0x36,%rcx
movzbl %cl,%esi
lea    (%rsi,%rsi,4),%edi
lea    (%rsi,%rdi,8),%esi
movzwl %si,%esi
shr    $0xc,%esi
imul   $0x64,%esi,%esi
sub    %sil,%cl
movzbl %cl,%ecx
mov    %edx,%esi
shr    $0x5,%esi
imul   $0xa7c5ac5,%rsi,%rsi
shr    $0x27,%rsi
mov    %esi,%edi
shr    $0x2,%edi
imul   $0x147b,%edi,%edi
shr    $0x11,%edi
imul   $0x64,%edi,%edi
imul   $0x186a0,%esi,%eax
sub    %edi,%esi
movzwl %si,%r8d
mov    %edx,%r9d
sub    %eax,%r9d
mov    -0x8(%r10,%rbx,1),%rsi
mov    (%r10,%rbx,1),%rax
mov    %rax,(%rsp)
mov    %r15,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%r10
mov    (%r12),%ecx
jmp    11b0 <main+0x70>
lea    0xdda(%rip),%rdi
call   1030 <puts@plt>
mov    (%r12),%ecx
test   %ecx,%ecx
je     12b5 <main+0x175>
mov    (%r14),%rax
mov    $0x10,%ebx
lea    0xdd1(%rip),%r15
mov    %ecx,%r13d
xor    %ebp,%ebp
jmp    1290 <main+0x150>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
mov    %r13d,%ecx
add    $0x18,%rbx
cmp    %rcx,%rbp
jae    12b5 <main+0x175>
cmpl   $0x0,-0x10(%rax,%rbx,1)
jne    1280 <main+0x140>
mov    -0x8(%rax,%rbx,1),%rsi
mov    (%rax,%rbx,1),%rcx
mov    %r15,%rdi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    (%r14),%rax
mov    (%r12),%r13d
jmp    1280 <main+0x140>
xor    %eax,%eax
test   %r13d,%r13d
sete   %al
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i32, i8*, i8* }
@generated_predef_info = global %struct.TYPE_3__* null
@generated_predef_info_count = global i32 0
@predef_info_compare = global i32 0
@.str = [15 x i8] c"** Detected **\00"
@.str.1 = [25 x i8] c"%s = %u (%u,%u,%u) | %s\0A\00"
@.str.2 = [19 x i8] c"** Not Detected **\00"
@.str.3 = [14 x i8] c"%s = %u | %s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 (...) @create_predef_entries()
%4 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%5 = load i32, i32* @generated_predef_info_count
%6 = load i32, i32* @predef_info_compare
%7 = call i32 @qsort(%struct.TYPE_3__* %4, i32 %5, i32 4, i32 %6)
%8 = call i32 @puts(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %9
9: ; preds = %65, %0
%10 = load i32, i32* %2
%11 = load i32, i32* @generated_predef_info_count
%12 = icmp ult i32 %10, %11
br i1 %12, label %13, label %68
13: ; preds = %9
%14 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%15 = load i32, i32* %2
%16 = zext i32 %15 to i64
%17 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %14, i64 %16
%18 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %17, i32 0, i32 0
%19 = load i32, i32* %18
%20 = icmp sgt i32 %19, 0
br i1 %20, label %21, label %64
21: ; preds = %13
%22 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%23 = load i32, i32* %2
%24 = zext i32 %23 to i64
%25 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %22, i64 %24
%26 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %25, i32 0, i32 1
%27 = load i8*, i8** %26
%28 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%29 = load i32, i32* %2
%30 = zext i32 %29 to i64
%31 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %28, i64 %30
%32 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %31, i32 0, i32 0
%33 = load i32, i32* %32
%34 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%35 = load i32, i32* %2
%36 = zext i32 %35 to i64
%37 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %34, i64 %36
%38 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %37, i32 0, i32 0
%39 = load i32, i32* %38
%40 = sdiv i32 %39, 10000000
%41 = srem i32 %40, 100
%42 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%43 = load i32, i32* %2
%44 = zext i32 %43 to i64
%45 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %42, i64 %44
%46 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %45, i32 0, i32 0
%47 = load i32, i32* %46
%48 = sdiv i32 %47, 100000
%49 = srem i32 %48, 100
%50 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%51 = load i32, i32* %2
%52 = zext i32 %51 to i64
%53 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %50, i64 %52
%54 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %53, i32 0, i32 0
%55 = load i32, i32* %54
%56 = srem i32 %55, 100000
%57 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%58 = load i32, i32* %2
%59 = zext i32 %58 to i64
%60 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %57, i64 %59
%61 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %60, i32 0, i32 2
%62 = load i8*, i8** %61
%63 = call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %27, i32 %33, i32 %41, i32 %49, i32 %56, i8* %62)
br label %64
64: ; preds = %21, %13
br label %65
65: ; preds = %64
%66 = load i32, i32* %2
%67 = add i32 %66, 1
store i32 %67, i32* %2
br label %9
68: ; preds = %9
%69 = call i32 @puts(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
store i32 0, i32* %2
br label %70
70: ; preds = %103, %68
%71 = load i32, i32* %2
%72 = load i32, i32* @generated_predef_info_count
%73 = icmp ult i32 %71, %72
br i1 %73, label %74, label %106
74: ; preds = %70
%75 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%76 = load i32, i32* %2
%77 = zext i32 %76 to i64
%78 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %75, i64 %77
%79 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %78, i32 0, i32 0
%80 = load i32, i32* %79
%81 = icmp eq i32 %80, 0
br i1 %81, label %82, label %102
82: ; preds = %74
%83 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%84 = load i32, i32* %2
%85 = zext i32 %84 to i64
%86 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %83, i64 %85
%87 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %86, i32 0, i32 1
%88 = load i8*, i8** %87
%89 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%90 = load i32, i32* %2
%91 = zext i32 %90 to i64
%92 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %89, i64 %91
%93 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %92, i32 0, i32 0
%94 = load i32, i32* %93
%95 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%96 = load i32, i32* %2
%97 = zext i32 %96 to i64
%98 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %95, i64 %97
%99 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %98, i32 0, i32 2
%100 = load i8*, i8** %99
%101 = call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* %88, i32 %94, i8* %100)
br label %102
102: ; preds = %82, %74
br label %103
103: ; preds = %102
%104 = load i32, i32* %2
%105 = add i32 %104, 1
store i32 %105, i32* %2
br label %70
106: ; preds = %70
%107 = load i32, i32* @generated_predef_info_count
%108 = icmp ugt i32 %107, 0
br i1 %108, label %109, label %110
109: ; preds = %106
store i32 0, i32* %1
br label %111
110: ; preds = %106
store i32 1, i32* %1
br label %111
111: ; preds = %110, %109
%112 = load i32, i32* %1
ret i32 %112
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i32, i8*, i8* }
@generated_predef_info = global %struct.TYPE_3__* null
@generated_predef_info_count = global i32 0
@predef_info_compare = global i32 0
@.str = [15 x i8] c"** Detected **\00"
@.str.1 = [25 x i8] c"%s = %u (%u,%u,%u) | %s\0A\00"
@.str.2 = [19 x i8] c"** Not Detected **\00"
@.str.3 = [14 x i8] c"%s = %u | %s\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @create_predef_entries()
%2 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%3 = load i32, i32* @generated_predef_info_count
%4 = load i32, i32* @predef_info_compare
%5 = tail call i32 @qsort(%struct.TYPE_3__* %2, i32 %3, i32 4, i32 %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @generated_predef_info_count
%8 = icmp eq i32 %7, 0
br i1 %8, label %41, label %9
9: ; preds = %0
%10 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
br label %11
11: ; preds = %9, %35
%12 = phi i32 [ %7, %9 ], [ %36, %35 ]
%13 = phi %struct.TYPE_3__* [ %10, %9 ], [ %37, %35 ]
%14 = phi i64 [ 0, %9 ], [ %38, %35 ]
%15 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %13, i64 %14, i32 0
%16 = load i32, i32* %15
%17 = icmp sgt i32 %16, 0
br i1 %17, label %18, label %35
18: ; preds = %11
%19 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %13, i64 %14, i32 1
%20 = load i8*, i8** %19
%21 = udiv i32 %16, 10000000
%22 = trunc i32 %21 to i8
%23 = urem i8 %22, 100
%24 = zext i8 %23 to i32
%25 = udiv i32 %16, 100000
%26 = trunc i32 %25 to i16
%27 = urem i16 %26, 100
%28 = zext i16 %27 to i32
%29 = urem i32 %16, 100000
%30 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %13, i64 %14, i32 2
%31 = load i8*, i8** %30
%32 = tail call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0), i8* %20, i32 %16, i32 %24, i32 %28, i32 %29, i8* %31)
%33 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%34 = load i32, i32* @generated_predef_info_count
br label %35
35: ; preds = %11, %18
%36 = phi i32 [ %12, %11 ], [ %34, %18 ]
%37 = phi %struct.TYPE_3__* [ %13, %11 ], [ %33, %18 ]
%38 = add nuw nsw i64 %14, 1
%39 = zext i32 %36 to i64
%40 = icmp ult i64 %38, %39
br i1 %40, label %11, label %41
41: ; preds = %35, %0
%42 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%43 = load i32, i32* @generated_predef_info_count
%44 = icmp eq i32 %43, 0
br i1 %44, label %68, label %45
45: ; preds = %41
%46 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
br label %47
47: ; preds = %45, %62
%48 = phi i32 [ %43, %45 ], [ %63, %62 ]
%49 = phi %struct.TYPE_3__* [ %46, %45 ], [ %64, %62 ]
%50 = phi i64 [ 0, %45 ], [ %65, %62 ]
%51 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %49, i64 %50, i32 0
%52 = load i32, i32* %51
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %62
54: ; preds = %47
%55 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %49, i64 %50, i32 1
%56 = load i8*, i8** %55
%57 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %49, i64 %50, i32 2
%58 = load i8*, i8** %57
%59 = tail call i32 (i8*, i8*, i32, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.3, i64 0, i64 0), i8* %56, i32 0, i8* %58)
%60 = load %struct.TYPE_3__*, %struct.TYPE_3__** @generated_predef_info
%61 = load i32, i32* @generated_predef_info_count
br label %62
62: ; preds = %47, %54
%63 = phi i32 [ %48, %47 ], [ %61, %54 ]
%64 = phi %struct.TYPE_3__* [ %49, %47 ], [ %60, %54 ]
%65 = add nuw nsw i64 %50, 1
%66 = zext i32 %63 to i64
%67 = icmp ult i64 %65, %66
br i1 %67, label %47, label %68
68: ; preds = %62, %41
%69 = phi i32 [ 0, %41 ], [ %63, %62 ]
%70 = icmp eq i32 %69, 0
%71 = zext i1 %70 to i32
ret i32 %71
}