xunge/DecIR huggingface dataset:
int is_null(unsigned char *key, int size) {
  for (int i = 0; i < size; i++) {
    if (*key != 0) {
      return 0;
    }
    key++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_null>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1154 <is_null+0x54>
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
je     113a <is_null+0x3a>
movl   $0x0,-0x4(%rbp)
jmp    115b <is_null+0x5b>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <is_null+0x12>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_null>:
test   %esi,%esi
jle    110c <is_null+0xc>
xor    %eax,%eax
cmpb   $0x0,(%rdi)
je     1112 <is_null+0x12>
ret
mov    $0x1,%eax
ret
mov    %esi,%eax
mov    $0x1,%edx
nopl   0x0(%rax)
mov    %rdx,%rcx
cmp    %ecx,%eax
je     1131 <is_null+0x31>
lea    0x1(%rcx),%rdx
cmpb   $0x0,(%rdi,%rcx,1)
je     1120 <is_null+0x20>
xor    %eax,%eax
cmp    %esi,%ecx
setge  %al
ret

LLVM IR (-O0):
define i32 @is_null(i8* %0, i32 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 0, i32* %6
br label %7
7: ; preds = %20, %2
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %23
11: ; preds = %7
%12 = load i8*, i8** %4
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %11
store i32 0, i32* %3
br label %24
17: ; preds = %11
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %4
br label %20
20: ; preds = %17
%21 = load i32, i32* %6
%22 = add nsw i32 %21, 1
store i32 %22, i32* %6
br label %7
23: ; preds = %7
store i32 1, i32* %3
br label %24
24: ; preds = %23, %16
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @is_null(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %19
4: ; preds = %2
%5 = load i8, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %10, label %19
7: ; preds = %10
%8 = load i8, i8* %13
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %4, %7
%11 = phi i8* [ %13, %7 ], [ %0, %4 ]
%12 = phi i32 [ %14, %7 ], [ 0, %4 ]
%13 = getelementptr inbounds i8, i8* %11, i64 1
%14 = add nuw nsw i32 %12, 1
%15 = icmp eq i32 %14, %1
br i1 %15, label %16, label %7
16: ; preds = %10, %7
%17 = icmp sge i32 %14, %1
%18 = zext i1 %17 to i32
br label %19
19: ; preds = %16, %4, %2
%20 = phi i32 [ 1, %2 ], [ 0, %4 ], [ %18, %16 ]
ret i32 %20
}
/* Variables and functions */
int /*<<< orphan*/ send_control_event(int, int, char *);
int control_event_my_descriptor_changed(void) {
  send_control_event(0x000E, 1, "650 DESCCHANGED\r\n");
  return 0;
}


x86 assembly (clang, -O0):
<control_event_my_descriptor_changed>:
push   %rbp
mov    %rsp,%rbp
mov    $0xe,%edi
mov    $0x1,%esi
lea    0xedb(%rip),%rdx
call   1030 <send_control_event@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<control_event_my_descriptor_changed>:
push   %rax
lea    0xee8(%rip),%rdx
mov    $0xe,%edi
mov    $0x1,%esi
call   1030 <send_control_event@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"650 DESCCHANGED\0D\0A\00"
define i32 @control_event_my_descriptor_changed() {
%1 = call i32 @send_control_event(i32 14, i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [18 x i8] c"650 DESCCHANGED\0D\0A\00"
define i32 @control_event_my_descriptor_changed() {
%1 = tail call i32 @send_control_event(i32 14, i32 1, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void g_strreverse() {}


x86 assembly (clang, -O0):
<g_strreverse>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<g_strreverse>:
ret

LLVM IR (-O0):
define void @g_strreverse() {
ret void
}

LLVM IR (-O2):
define void @g_strreverse() {
ret void
}
/* Variables and functions */
double exp(double);
double Bbp0a(double x) { return exp(x) - 1.0; }


x86 assembly (clang, -O0):
<Bbp0a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movsd  0xed1(%rip),%xmm1
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Bbp0a>:
push   %rax
call   1030 <exp@plt>
addsd  0xee2(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @Bbp0a(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @exp(double %3)
%5 = fsub double %4, 1.000000e+00
ret double %5
}

LLVM IR (-O2):
define double @Bbp0a(double %0) {
%2 = tail call double @exp(double %0)
%3 = fadd double %2, -1.000000e+00
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
struct tm *get_current_time() {
  time_t rawtime;
  struct tm *current_time;
  time(&rawtime);
  current_time = localtime(&rawtime);
  return current_time;
}


x86 assembly (clang, -O0):
<get_current_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_current_time>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define %struct.tm* @get_current_time() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
ret %struct.tm* %5
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define %struct.tm* @get_current_time() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
ret %struct.tm* %4
}
/* Variables and functions */
int /*<<< orphan*/ uwsgi_init(int, char **, char **);
int main(int argc, char **argv, char **environ) {
  uwsgi_init(argc, argv, environ);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <uwsgi_init@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1030 <uwsgi_init@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8**
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i8** %2, i8*** %6
%7 = load i32, i32* %4
%8 = load i8**, i8*** %5
%9 = load i8**, i8*** %6
%10 = call i32 @uwsgi_init(i32 %7, i8** %8, i8** %9)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = tail call i32 @uwsgi_init(i32 %0, i8** %1, i8** %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ proc6(int, int, int);
void proc4() {
  proc6(0x403000, 0x403000, 0x400000);
  return;
}


x86 assembly (clang, -O0):
<proc4>:
push   %rbp
mov    %rsp,%rbp
mov    $0x403000,%esi
mov    $0x400000,%edx
mov    %esi,%edi
call   1030 <proc6@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc4>:
mov    $0x403000,%edi
mov    $0x403000,%esi
mov    $0x400000,%edx
jmp    1030 <proc6@plt>

LLVM IR (-O0):
define void @proc4() {
%1 = call i32 @proc6(i32 4206592, i32 4206592, i32 4194304)
ret void
}

LLVM IR (-O2):
define void @proc4() {
%1 = tail call i32 @proc6(i32 4206592, i32 4206592, i32 4194304)
ret void
}
/* Type definitions */
struct sched_param {
  int dummy;
};
typedef int /*<<< orphan*/ pthread_t;

/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ printf(char *);
int pthread_getschedparam(pthread_t thread, int *policy,
                          struct sched_param *param) {
  printf("FIXME: pthread_getschedparam called\n");
  abort();
}


x86 assembly (clang, -O0):
<pthread_getschedparam>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<pthread_getschedparam>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <puts@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
%struct.sched_param = type { i32 }
@.str = [37 x i8] c"FIXME: pthread_getschedparam called\0A\00"
define i32 @pthread_getschedparam(i32 %0, i32* %1, %struct.sched_param* %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca %struct.sched_param*
store i32 %0, i32* %4
store i32* %1, i32** %5
store %struct.sched_param* %2, %struct.sched_param** %6
%7 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
%8 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
%struct.sched_param = type { i32 }
@str = [36 x i8] c"FIXME: pthread_getschedparam called\00"
define i32 @pthread_getschedparam(i32 %0, i32* nocapture readnone %1, %struct.sched_param* nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int CheckPassword(char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char str[11];
  scanf("%s", str);
  int res = CheckPassword(str);
  if (res == 0) {
    printf("REJECTED\n");
  } else {
    printf("ACCEPTED\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xf(%rbp),%rsi
lea    0xeb6(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xf(%rbp),%rdi
call   1030 <CheckPassword@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1176 <main+0x46>
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
jmp    1182 <main+0x52>
lea    0xe90(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0x5(%rsp),%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <CheckPassword@plt>
test   %eax,%eax
lea    0xeb2(%rip),%rax
lea    0xea2(%rip),%rdi
cmove  %rax,%rdi
call   1040 <puts@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [10 x i8] c"REJECTED\0A\00"
@.str.2 = [10 x i8] c"ACCEPTED\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [11 x i8]
%3 = alloca i32
store i32 0, i32* %1
%4 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %2, i64 0, i64 0
%7 = call i32 @CheckPassword(i8* %6)
store i32 %7, i32* %3
%8 = load i32, i32* %3
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %0
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
br label %14
12: ; preds = %0
%13 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
br label %14
14: ; preds = %12, %10
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@str = [9 x i8] c"ACCEPTED\00"
@str.3 = [9 x i8] c"REJECTED\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @CheckPassword(i8* %2)
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str.3, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0)
%7 = call i32 @puts(i8* dereferenceable(1) %6)
ret i32 0
}
char *strchr(const char *s, int c) {
  while (*s && *s != c) {
    s++;
  }
  return (char *)(*s ? s : (c ? ((void *)0) : s));
}


x86 assembly (clang, -O0):
<strchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1130 <strchr+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <strchr+0x40>
jmp    1151 <strchr+0x51>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <strchr+0xb>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     116e <strchr+0x6e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1193 <strchr+0x93>
cmpl   $0x0,-0xc(%rbp)
je     1183 <strchr+0x83>
xor    %eax,%eax
mov    %rax,-0x20(%rbp)
jmp    118b <strchr+0x8b>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strchr>:
add    $0xffffffffffffffff,%rdi
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movsbl 0x1(%rdi),%ecx
add    $0x1,%rdi
test   %ecx,%ecx
je     1120 <strchr+0x20>
cmp    %esi,%ecx
jne    1110 <strchr+0x10>
xor    %eax,%eax
test   %esi,%esi
cmove  %rdi,%rax
test   %cl,%cl
cmovne %rdi,%rax
ret

LLVM IR (-O0):
define i8* @strchr(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %18, %2
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %16
10: ; preds = %5
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = load i32, i32* %4
%15 = icmp ne i32 %13, %14
br label %16
16: ; preds = %10, %5
%17 = phi i1 [ false, %5 ], [ %15, %10 ]
br i1 %17, label %18, label %21
18: ; preds = %16
%19 = load i8*, i8** %3
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %3
br label %5
21: ; preds = %16
%22 = load i8*, i8** %3
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp ne i32 %24, 0
br i1 %25, label %26, label %28
26: ; preds = %21
%27 = load i8*, i8** %3
br label %36
28: ; preds = %21
%29 = load i32, i32* %4
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %32
31: ; preds = %28
br label %34
32: ; preds = %28
%33 = load i8*, i8** %3
br label %34
34: ; preds = %32, %31
%35 = phi i8* [ null, %31 ], [ %33, %32 ]
br label %36
36: ; preds = %34, %26
%37 = phi i8* [ %27, %26 ], [ %35, %34 ]
ret i8* %37
}

LLVM IR (-O2):
define i8* @strchr(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = icmp eq i32 %7, %1
%9 = or i1 %6, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
%12 = icmp eq i32 %1, 0
%13 = select i1 %12, i8* %4, i8* null
%14 = select i1 %6, i8* %13, i8* %4
ret i8* %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  char a[4];
  char *p = 0;
  *p = 'a';
  a[5] = '1';
  printf("Hello World\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x61,(%rax)
movb   $0x31,-0x3(%rbp)
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
%3 = alloca i8*
store i32 0, i32* %1
store i8* null, i8** %3
%4 = load i8*, i8** %3
store i8 97, i8* %4
%5 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 5
store i8 49, i8* %5
%6 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
adr0adrx1(r0, r1, x0, x1, p0, p1) unsigned int r0, r1;
unsigned int *p0, *p1;
{
  if ((*((unsigned int *)10000000)) <= (((unsigned int *)11111111)[x1]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<adr0adrx1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    $0x989680,%eax
mov    (%rax),%eax
movslq -0x14(%rbp),%rdx
mov    $0xa98ac7,%ecx
cmp    (%rcx,%rdx,4),%eax
ja     113d <adr0adrx1+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1144 <adr0adrx1+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adr0adrx1>:
mov    0x989680,%edx
movslq %ecx,%rcx
xor    %eax,%eax
cmp    0xa98ac7(,%rcx,4),%edx
setbe  %al
ret

LLVM IR (-O0):
define i32 @adr0adrx1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32, i32* inttoptr (i64 10000000 to i32*)
%15 = load i32, i32* %11
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %16
%18 = load i32, i32* %17
%19 = icmp ule i32 %14, %18
br i1 %19, label %20, label %21
20: ; preds = %6
store i32 1, i32* %7
br label %22
21: ; preds = %6
store i32 0, i32* %7
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @adr0adrx1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture readnone %5) {
%7 = load i32, i32* inttoptr (i64 10000000 to i32*)
%8 = sext i32 %3 to i64
%9 = getelementptr inbounds i32, i32* inttoptr (i64 11111111 to i32*), i64 %8
%10 = load i32, i32* %9
%11 = icmp ule i32 %7, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
typedef int /*<<< orphan*/ uint64_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
size_t write_FP_BE(int /*<<< orphan*/ *, int /*<<< orphan*/ const *, int);
size_t uint64WriteToFP(FILE *fp, const uint64_t *data) {
  return write_FP_BE(fp, data, sizeof(uint64_t));
}


x86 assembly (clang, -O0):
<uint64WriteToFP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x4,%edx
call   1030 <write_FP_BE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint64WriteToFP>:
mov    $0x4,%edx
jmp    1030 <write_FP_BE@plt>

LLVM IR (-O0):
define i64 @uint64WriteToFP(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %4
%7 = call i64 @write_FP_BE(i32* %5, i32* %6, i32 4)
ret i64 %7
}

LLVM IR (-O2):
define i64 @uint64WriteToFP(i32* %0, i32* %1) {
%3 = tail call i64 @write_FP_BE(i32* %0, i32* %1, i32 4)
ret i64 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ free(void *);
int /*<<< orphan*/ pthread_mutex_destroy(int /*<<< orphan*/ *);
void el_mutex_destroy(void *hmutex) {
  pthread_mutex_destroy((pthread_mutex_t *)hmutex);
  free(hmutex);
}


x86 assembly (clang, -O0):
<el_mutex_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <pthread_mutex_destroy@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<el_mutex_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <pthread_mutex_destroy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @el_mutex_destroy(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = call i32 @pthread_mutex_destroy(i32* %4)
%6 = load i8*, i8** %2
%7 = call i32 @free(i8* %6)
ret void
}

LLVM IR (-O2):
define void @el_mutex_destroy(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @pthread_mutex_destroy(i32* %2)
%4 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
float exp(float);
float call_expf(float x) { return exp((float)x); }


x86 assembly (clang, -O0):
<call_expf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_expf>:
jmp    1030 <exp@plt>

LLVM IR (-O0):
define float @call_expf(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @exp(float %3)
ret float %4
}

LLVM IR (-O2):
define float @call_expf(float %0) {
%2 = tail call float @exp(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ pthread_exit(void *);
int /*<<< orphan*/ sleep(int);
void *thr_fn1(void *arg) {
  sleep(2);
  printf("This is 1 thread\n");
  pthread_exit((void *)2);
  return ((void *)2);
}


x86 assembly (clang, -O0):
<thr_fn1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2,%edi
call   1050 <sleep@plt>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
mov    $0x2,%edi
call   1040 <pthread_exit@plt>
mov    $0x2,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thr_fn1>:
push   %rax
mov    $0x2,%edi
call   1050 <sleep@plt>
lea    0xebe(%rip),%rdi
call   1030 <puts@plt>
mov    $0x2,%edi
call   1040 <pthread_exit@plt>
mov    $0x2,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"This is 1 thread\0A\00"
define i8* @thr_fn1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @sleep(i32 2)
%4 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @pthread_exit(i8* inttoptr (i64 2 to i8*))
ret i8* inttoptr (i64 2 to i8*)
}

LLVM IR (-O2):
@str = [17 x i8] c"This is 1 thread\00"
define i8* @thr_fn1(i8* nocapture readnone %0) {
%2 = tail call i32 @sleep(i32 2)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
%4 = tail call i32 @pthread_exit(i8* inttoptr (i64 2 to i8*))
ret i8* inttoptr (i64 2 to i8*)
}
/* Variables and functions */
int /*<<< orphan*/ yy_push_state(int);
void asn1p_lexer_hack_push_encoding_control() { yy_push_state(6); }


x86 assembly (clang, -O0):
<asn1p_lexer_hack_push_encoding_control>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6,%edi
call   1030 <yy_push_state@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<asn1p_lexer_hack_push_encoding_control>:
mov    $0x6,%edi
jmp    1030 <yy_push_state@plt>

LLVM IR (-O0):
define void @asn1p_lexer_hack_push_encoding_control() {
%1 = call i32 @yy_push_state(i32 6)
ret void
}

LLVM IR (-O2):
define void @asn1p_lexer_hack_push_encoding_control() {
%1 = tail call i32 @yy_push_state(i32 6)
ret void
}
void foo607(int p) {}


x86 assembly (clang, -O0):
<foo607>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo607>:
ret

LLVM IR (-O0):
define void @foo607(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
ret void
}

LLVM IR (-O2):
define void @foo607(i32 %0) {
ret void
}
int is_digit(char c) {
  if (c >= '0' && c <= '9')
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x30,%eax
jl     1130 <is_digit+0x30>
movsbl -0x5(%rbp),%eax
cmp    $0x39,%eax
jg     1130 <is_digit+0x30>
movl   $0x1,-0x4(%rbp)
jmp    1137 <is_digit+0x37>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_digit(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp sge i32 %5, 48
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp sle i32 %9, 57
br i1 %10, label %11, label %12
11: ; preds = %7
store i32 1, i32* %2
br label %13
12: ; preds = %7, %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @is_digit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ minprintf(char *, int, double, int, int, double, double);
int main() {
  int i = 48;
  double d = 1.03;
  minprintf("%d,%f,%x,%c,%e,%g\n", i, d, i, i, d, d);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x30,-0x8(%rbp)
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
movsd  -0x10(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm2
lea    0xeb6(%rip),%rdi
call   1030 <minprintf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xef0(%rip),%rdi
movsd  0xee0(%rip),%xmm0
mov    $0x30,%esi
mov    $0x30,%edx
mov    $0x30,%ecx
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <minprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"%d,%f,%x,%c,%e,%g\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca double
store i32 0, i32* %1
store i32 48, i32* %2
store double 1.030000e+00, double* %3
%4 = load i32, i32* %2
%5 = load double, double* %3
%6 = load i32, i32* %2
%7 = load i32, i32* %2
%8 = load double, double* %3
%9 = load double, double* %3
%10 = call i32 @minprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %4, double %5, i32 %6, i32 %7, double %8, double %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"%d,%f,%x,%c,%e,%g\0A\00"
define i32 @main() {
%1 = tail call i32 @minprintf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 48, double 1.030000e+00, i32 48, i32 48, double 1.030000e+00, double 1.030000e+00)
ret i32 0
}
int fun1382() { return 1382; }


x86 assembly (clang, -O0):
<fun1382>:
push   %rbp
mov    %rsp,%rbp
mov    $0x566,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1382>:
mov    $0x566,%eax
ret

LLVM IR (-O0):
define i32 @fun1382() {
ret i32 1382
}

LLVM IR (-O2):
define i32 @fun1382() {
ret i32 1382
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sumarr(int *, int);
void f(void) {
  int sum = 0;
  int arr[5];
  arr[0] = 4;
  arr[1] = -7;
  arr[2] = 2;
  arr[3] = 3;
  arr[4] = 9;
  sum = sumarr(arr, 5);
  printf("sum = %d\n", sum);
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x20(%rbp)
movl   $0xfffffff9,-0x1c(%rbp)
movl   $0x2,-0x18(%rbp)
movl   $0x3,-0x14(%rbp)
movl   $0x9,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <sumarr@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x9,0x10(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <sumarr@plt>
lea    0xec5(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [10 x i8] c"sum = %d\0A\00"
define void @f() {
%1 = alloca i32
%2 = alloca [5 x i32]
store i32 0, i32* %1
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
store i32 4, i32* %3
%4 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 1
store i32 -7, i32* %4
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 2
store i32 2, i32* %5
%6 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 3
store i32 3, i32* %6
%7 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 4
store i32 9, i32* %7
%8 = getelementptr inbounds [5 x i32], [5 x i32]* %2, i64 0, i64 0
%9 = call i32 @sumarr(i32* %8, i32 5)
store i32 %9, i32* %1
%10 = load i32, i32* %1
%11 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %10)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"sum = %d\0A\00"
define void @f() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = bitcast [5 x i32]* %1 to <4 x i32>*
store <4 x i32> <i32 4, i32 -7, i32 2, i32 3>, <4 x i32>* %4
%5 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 4
store i32 9, i32* %5
%6 = call i32 @sumarr(i32* %3, i32 5)
%7 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ waiter1(int /*<<< orphan*/);
int /*<<< orphan*/ waiter2(int /*<<< orphan*/);
int /*<<< orphan*/ waker1(int /*<<< orphan*/);
int /*<<< orphan*/ waker2(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_1:
  waiter1(0);
__CPROVER_ASYNC_2:
  waiter2(0);
__CPROVER_ASYNC_3:
  waker1(0);
__CPROVER_ASYNC_4:
  waker2(0);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
xor    %edi,%edi
call   1060 <waiter1@plt>
xor    %edi,%edi
call   1040 <waiter2@plt>
xor    %edi,%edi
call   1050 <waker1@plt>
xor    %edi,%edi
call   1030 <waker2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1060 <waiter1@plt>
xor    %edi,%edi
call   1040 <waiter2@plt>
xor    %edi,%edi
call   1050 <waker1@plt>
xor    %edi,%edi
call   1030 <waker2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %0
%3 = call i32 @waiter1(i32 0)
br label %4
4: ; preds = %2
%5 = call i32 @waiter2(i32 0)
br label %6
6: ; preds = %4
%7 = call i32 @waker1(i32 0)
br label %8
8: ; preds = %6
%9 = call i32 @waker2(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @waiter1(i32 0)
%2 = tail call i32 @waiter2(i32 0)
%3 = tail call i32 @waker1(i32 0)
%4 = tail call i32 @waker2(i32 0)
ret i32 0
}
int test_01(int a) { return a <= 0 ? a : 0; }


x86 assembly (clang, -O0):
<test_01>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jg     111c <test_01+0x1c>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <test_01+0x26>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <test_01+0x26>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_01>:
mov    %edi,%eax
sar    $0x1f,%eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @test_01(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = load i32, i32* %2
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %5
%9 = phi i32 [ %6, %5 ], [ 0, %7 ]
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_01(i32 %0) {
%2 = icmp slt i32 %0, 0
%3 = select i1 %2, i32 %0, i32 0
ret i32 %3
}
int is_argument(const char *arg) { return arg[0] == '-'; }


x86 assembly (clang, -O0):
<is_argument>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_argument>:
xor    %eax,%eax
cmpb   $0x2d,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @is_argument(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 45
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_argument(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 45
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct rlimit {
  int /*<<< orphan*/ rlim_max;
  int /*<<< orphan*/ rlim_cur;
};

/* Variables and functions */
int /*<<< orphan*/ RLIMIT_STACK;
int /*<<< orphan*/ getrlimit(int /*<<< orphan*/, struct rlimit *);
int /*<<< orphan*/ setrlimit(int /*<<< orphan*/, struct rlimit *);
void setstacksizeunlimited(void) {
  struct rlimit limit;
  getrlimit(RLIMIT_STACK, &limit);
  limit.rlim_cur = limit.rlim_max;
  setrlimit(RLIMIT_STACK, &limit);
}


x86 assembly (clang, -O0):
<setstacksizeunlimited>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1040 <getrlimit@plt>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    -0x8(%rbp),%rsi
call   1030 <setrlimit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setstacksizeunlimited>:
push   %r14
push   %rbx
push   %rax
mov    0x2eb5(%rip),%r14
mov    (%r14),%edi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1040 <getrlimit@plt>
mov    (%rsp),%eax
mov    %eax,0x4(%rsp)
mov    (%r14),%edi
mov    %rbx,%rsi
call   1030 <setrlimit@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.rlimit = type { i32, i32 }
@RLIMIT_STACK = global i32 0
define void @setstacksizeunlimited() {
%1 = alloca %struct.rlimit
%2 = load i32, i32* @RLIMIT_STACK
%3 = call i32 @getrlimit(i32 %2, %struct.rlimit* %1)
%4 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i32 0, i32 0
%5 = load i32, i32* %4
%6 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i32 0, i32 1
store i32 %5, i32* %6
%7 = load i32, i32* @RLIMIT_STACK
%8 = call i32 @setrlimit(i32 %7, %struct.rlimit* %1)
ret void
}

LLVM IR (-O2):
%struct.rlimit = type { i32, i32 }
@RLIMIT_STACK = global i32 0
define void @setstacksizeunlimited() {
%1 = alloca %struct.rlimit
%2 = bitcast %struct.rlimit* %1 to i8*
%3 = load i32, i32* @RLIMIT_STACK
%4 = call i32 @getrlimit(i32 %3, %struct.rlimit* %1)
%5 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i64 0, i32 0
%6 = load i32, i32* %5
%7 = getelementptr inbounds %struct.rlimit, %struct.rlimit* %1, i64 0, i32 1
store i32 %6, i32* %7
%8 = load i32, i32* @RLIMIT_STACK
%9 = call i32 @setrlimit(i32 %8, %struct.rlimit* %1)
ret void
}
/* Variables and functions */
double nextafterf_custom(double, double);
double nextDown_d(float d) {
  double result = d;
  if (result < d)
    return result;
  return nextafterf_custom(result, result - 1000000);
}


x86 assembly (clang, -O0):
<nextDown_d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1152 <nextDown_d+0x42>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1172 <nextDown_d+0x62>
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm1
movsd  0xe9c(%rip),%xmm2
subsd  %xmm2,%xmm1
call   1030 <nextafterf_custom@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextDown_d>:
cvtss2sd %xmm0,%xmm0
movsd  0xee4(%rip),%xmm1
addsd  %xmm0,%xmm1
jmp    1030 <nextafterf_custom@plt>

LLVM IR (-O0):
define double @nextDown_d(float %0) {
%2 = alloca double
%3 = alloca float
%4 = alloca double
store float %0, float* %3
%5 = load float, float* %3
%6 = fpext float %5 to double
store double %6, double* %4
%7 = load double, double* %4
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fcmp olt double %7, %9
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load double, double* %4
store double %12, double* %2
br label %18
13: ; preds = %1
%14 = load double, double* %4
%15 = load double, double* %4
%16 = fsub double %15, 1.000000e+06
%17 = call double @nextafterf_custom(double %14, double %16)
store double %17, double* %2
br label %18
18: ; preds = %13, %11
%19 = load double, double* %2
ret double %19
}

LLVM IR (-O2):
define double @nextDown_d(float %0) {
%2 = fpext float %0 to double
%3 = fadd double %2, -1.000000e+06
%4 = tail call double @nextafterf_custom(double %2, double %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ clog_write(int *, char *);
void CLOG_WRITE_(int *clen, char *c) { clog_write(clen, c); }


x86 assembly (clang, -O0):
<CLOG_WRITE_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <clog_write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CLOG_WRITE_>:
jmp    1030 <clog_write@plt>

LLVM IR (-O0):
define void @CLOG_WRITE_(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
store i32* %0, i32** %3
store i8* %1, i8** %4
%5 = load i32*, i32** %3
%6 = load i8*, i8** %4
%7 = call i32 @clog_write(i32* %5, i8* %6)
ret void
}

LLVM IR (-O2):
define void @CLOG_WRITE_(i32* %0, i8* %1) {
%3 = tail call i32 @clog_write(i32* %0, i8* %1)
ret void
}
/* Variables and functions */
double sqrt(double);
double calculate_second_root(double a, double b, double discriminant) {
  return (-b - sqrt(discriminant)) / (2 * a);
}


x86 assembly (clang, -O0):
<calculate_second_root>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
call   1030 <sqrt@plt>
movaps %xmm0,%xmm1
movsd  -0x20(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  0xe9a(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculate_second_root>:
sub    $0x28,%rsp
xorpd  0xee4(%rip),%xmm1
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm0,%xmm2
jb     1133 <calculate_second_root+0x23>
xorps  %xmm0,%xmm0
sqrtsd %xmm2,%xmm0
jmp    1154 <calculate_second_root+0x44>
movapd %xmm2,%xmm0
movapd %xmm1,0x10(%rsp)
movsd  %xmm3,0x8(%rsp)
call   1030 <sqrt@plt>
movsd  0x8(%rsp),%xmm3
movapd 0x10(%rsp),%xmm1
subsd  %xmm0,%xmm1
addsd  %xmm3,%xmm3
divsd  %xmm3,%xmm1
movapd %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @calculate_second_root(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = fneg double %7
%9 = load double, double* %6
%10 = call double @sqrt(double %9)
%11 = fsub double %8, %10
%12 = load double, double* %4
%13 = fmul double 2.000000e+00, %12
%14 = fdiv double %11, %13
ret double %14
}

LLVM IR (-O2):
define double @calculate_second_root(double %0, double %1, double %2) {
%4 = fneg double %1
%5 = tail call double @sqrt(double %2)
%6 = fsub double %4, %5
%7 = fmul double %0, 2.000000e+00
%8 = fdiv double %6, %7
ret double %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int ftrylockfile(int /*<<< orphan*/ *);
int main(void) {
  FILE *file = NULL;
  int ret = ftrylockfile(file);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <ftrylockfile@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %edi,%edi
jmp    1030 <ftrylockfile@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32
store i32 0, i32* %1
store i32* null, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @ftrylockfile(i32* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @ftrylockfile(i32* null)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_250() {
  Assert_real((isqrt(250) == 15),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              1255, ("Integer square root of 250 should be 15"));
}


x86 assembly (clang, -O0):
<t_sqrt_250>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfa,%edi
call   1030 <isqrt@plt>
cmp    $0xf,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x4e7,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_250>:
push   %rax
mov    $0xfa,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xf,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x4e7,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 250 should be 15\00"
define void @t_sqrt_250() {
%1 = call i32 @isqrt(i32 250)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1255, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 250 should be 15\00"
define void @t_sqrt_250() {
%1 = tail call i32 @isqrt(i32 250)
%2 = icmp eq i32 %1, 15
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 1255, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int acpi_lid_notifier_unregister(struct notifier_block *notifier) { return 0; }


x86 assembly (clang, -O0):
<acpi_lid_notifier_unregister>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<acpi_lid_notifier_unregister>:
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.notifier_block = type opaque
define i32 @acpi_lid_notifier_unregister(%struct.notifier_block* %0) {
%2 = alloca %struct.notifier_block*
store %struct.notifier_block* %0, %struct.notifier_block** %2
ret i32 0
}

LLVM IR (-O2):
%struct.notifier_block = type opaque
define i32 @acpi_lid_notifier_unregister(%struct.notifier_block* nocapture readnone %0) {
ret i32 0
}
int foo(float num) { return (int)num; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @foo(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fptosi float %3 to i32
ret i32 %4
}

LLVM IR (-O2):
define i32 @foo(float %0) {
%2 = fptosi float %0 to i32
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0x0f() {
  Assert_real((ispunct(15) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              80, ("ispunct should be 0 for 0x0f"));
}


x86 assembly (clang, -O0):
<t_ispunct_0x0f>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x50,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0x0f>:
push   %rax
mov    $0xf,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x50,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x0f\00"
define void @t_ispunct_0x0f() {
%1 = call i64 @ispunct(i32 15)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0x0f\00"
define void @t_ispunct_0x0f() {
%1 = tail call i64 @ispunct(i32 15)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 80, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int eg_indirect_table_get(unsigned int, int, unsigned int, int, unsigned int *);
int eg_class_lut_table_get(unsigned int dev_id, unsigned int index,
                           unsigned int *pentry) {
  if ((index < 0) || (index > 47)) {
    return -1;
  }
  return eg_indirect_table_get(dev_id, 1, index, 14, pentry);
}


x86 assembly (clang, -O0):
<eg_class_lut_table_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jb     1136 <eg_class_lut_table_get+0x26>
cmpl   $0x2f,-0xc(%rbp)
jbe    1142 <eg_class_lut_table_get+0x32>
movl   $0xffffffff,-0x4(%rbp)
jmp    115e <eg_class_lut_table_get+0x4e>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%r8
mov    $0x1,%esi
mov    $0xe,%ecx
call   1030 <eg_indirect_table_get@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eg_class_lut_table_get>:
cmp    $0x2f,%esi
jbe    111b <eg_class_lut_table_get+0xb>
mov    $0xffffffff,%eax
ret
mov    %rdx,%r8
mov    %esi,%edx
mov    $0x1,%esi
mov    $0xe,%ecx
jmp    1030 <eg_indirect_table_get@plt>

LLVM IR (-O0):
define i32 @eg_class_lut_table_get(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32* %2, i32** %7
%8 = load i32, i32* %6
%9 = icmp ult i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %3
%11 = load i32, i32* %6
%12 = icmp ugt i32 %11, 47
br i1 %12, label %13, label %14
13: ; preds = %10, %3
store i32 -1, i32* %4
br label %19
14: ; preds = %10
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = load i32*, i32** %7
%18 = call i32 @eg_indirect_table_get(i32 %15, i32 1, i32 %16, i32 14, i32* %17)
store i32 %18, i32* %4
br label %19
19: ; preds = %14, %13
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @eg_class_lut_table_get(i32 %0, i32 %1, i32* %2) {
%4 = icmp ugt i32 %1, 47
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = tail call i32 @eg_indirect_table_get(i32 %0, i32 1, i32 %1, i32 14, i32* %2)
br label %7
7: ; preds = %3, %5
%8 = phi i32 [ %6, %5 ], [ -1, %3 ]
ret i32 %8
}
int convert_and_sum(int *px, int m, int b, int number_of_x_values) { return 0; }


x86 assembly (clang, -O0):
<convert_and_sum>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert_and_sum>:
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @convert_and_sum(i32* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
ret i32 0
}

LLVM IR (-O2):
define i32 @convert_and_sum(i32* nocapture readnone %0, i32 %1, i32 %2, i32 %3) {
ret i32 0
}
void gtk_dialog_add_button() {}


x86 assembly (clang, -O0):
<gtk_dialog_add_button>:
push   %rbp
mov    %rsp,%rbp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gtk_dialog_add_button>:
ret

LLVM IR (-O0):
define void @gtk_dialog_add_button() {
ret void
}

LLVM IR (-O2):
define void @gtk_dialog_add_button() {
ret void
}