xunge/DecIR huggingface dataset:
/* Type definitions */
struct __pthread_cleanup_frame {
  int /*<<< orphan*/ __cancel_arg;
  int /*<<< orphan*/ (*__cancel_routine)(int /*<<< orphan*/);
  scalar_t__ __do_it;
};

/* Variables and functions */
int /*<<< orphan*/ stub1(int /*<<< orphan*/);
void __pthread_cleanup_routine(struct __pthread_cleanup_frame *f) {
  if (f->__do_it)
    f->__cancel_routine(f->__cancel_arg);
}


x86 assembly (clang, -O0):
<__pthread_cleanup_routine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,0x10(%rax)
je     112b <__pthread_cleanup_routine+0x2b>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rax
mov    -0x8(%rbp),%rcx
mov    (%rcx),%edi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__pthread_cleanup_routine>:
cmpq   $0x0,0x10(%rdi)
je     110f <__pthread_cleanup_routine+0xf>
mov    %rdi,%rax
mov    (%rdi),%edi
jmp    *0x8(%rax)
ret

LLVM IR (-O0):
%struct.__pthread_cleanup_frame = type { i32, i32 (i32)*, i64 }
define void @__pthread_cleanup_routine(%struct.__pthread_cleanup_frame* %0) {
%2 = alloca %struct.__pthread_cleanup_frame*
store %struct.__pthread_cleanup_frame* %0, %struct.__pthread_cleanup_frame** %2
%3 = load %struct.__pthread_cleanup_frame*, %struct.__pthread_cleanup_frame** %2
%4 = getelementptr inbounds %struct.__pthread_cleanup_frame, %struct.__pthread_cleanup_frame* %3, i32 0, i32 2
%5 = load i64, i64* %4
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load %struct.__pthread_cleanup_frame*, %struct.__pthread_cleanup_frame** %2
%9 = getelementptr inbounds %struct.__pthread_cleanup_frame, %struct.__pthread_cleanup_frame* %8, i32 0, i32 1
%10 = load i32 (i32)*, i32 (i32)** %9
%11 = load %struct.__pthread_cleanup_frame*, %struct.__pthread_cleanup_frame** %2
%12 = getelementptr inbounds %struct.__pthread_cleanup_frame, %struct.__pthread_cleanup_frame* %11, i32 0, i32 0
%13 = load i32, i32* %12
%14 = call i32 %10(i32 %13)
br label %15
15: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
%struct.__pthread_cleanup_frame = type { i32, i32 (i32)*, i64 }
define void @__pthread_cleanup_routine(%struct.__pthread_cleanup_frame* nocapture %0) {
%2 = getelementptr inbounds %struct.__pthread_cleanup_frame, %struct.__pthread_cleanup_frame* %0, i64 0, i32 2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %11, label %5
5: ; preds = %1
%6 = getelementptr inbounds %struct.__pthread_cleanup_frame, %struct.__pthread_cleanup_frame* %0, i64 0, i32 1
%7 = load i32 (i32)*, i32 (i32)** %6
%8 = getelementptr inbounds %struct.__pthread_cleanup_frame, %struct.__pthread_cleanup_frame* %0, i64 0, i32 0
%9 = load i32, i32* %8
%10 = tail call i32 %7(i32 %9)
br label %11
11: ; preds = %5, %1
ret void
}
int exists(char *a, char ch) {
  int i = 0;
  while (a[i] != '\0') {
    if (a[i] == ch)
      return 1;
    i++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<exists>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     115c <exists+0x5c>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
movsbl -0x11(%rbp),%ecx
cmp    %ecx,%eax
jne    114e <exists+0x4e>
movl   $0x1,-0x4(%rbp)
jmp    1163 <exists+0x63>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1115 <exists+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<exists>:
mov    (%rdi),%cl
xor    %eax,%eax
test   %cl,%cl
je     1120 <exists+0x20>
add    $0x1,%rdi
nopl   0x0(%rax)
cmp    %sil,%cl
je     1121 <exists+0x21>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <exists+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @exists(i8* nocapture %0, i8 signext %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %14, label %9
5: ; preds = %9
%6 = getelementptr inbounds i8, i8* %0, i64 %13
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2, %5
%10 = phi i64 [ %13, %5 ], [ 0, %2 ]
%11 = phi i8 [ %7, %5 ], [ %3, %2 ]
%12 = icmp eq i8 %11, %1
%13 = add nuw i64 %10, 1
br i1 %12, label %14, label %5
14: ; preds = %9, %5, %2
%15 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %9 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ ft_putstr(char *);
int /*<<< orphan*/ ft_putstr_from(char *, int);
void ft_ls_helper_2(char *s) {
  if (s[0] == '/')
    ft_putstr(s);
  else
    ft_putstr_from(s, 2);
  ft_putstr(":\n");
}


x86 assembly (clang, -O0):
<ft_ls_helper_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    114a <ft_ls_helper_2+0x2a>
mov    -0x8(%rbp),%rdi
call   1040 <ft_putstr@plt>
jmp    1158 <ft_ls_helper_2+0x38>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
call   1030 <ft_putstr_from@plt>
lea    0xea1(%rip),%rdi
call   1040 <ft_putstr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ls_helper_2>:
push   %rax
cmpb   $0x2f,(%rdi)
jne    112d <ft_ls_helper_2+0xd>
call   1040 <ft_putstr@plt>
jmp    1137 <ft_ls_helper_2+0x17>
mov    $0x2,%esi
call   1030 <ft_putstr_from@plt>
lea    0xec2(%rip),%rdi
pop    %rax
jmp    1040 <ft_putstr@plt>

LLVM IR (-O0):
@.str = [3 x i8] c":\0A\00"
define void @ft_ls_helper_2(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, 47
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i32 @ft_putstr(i8* %9)
br label %14
11: ; preds = %1
%12 = load i8*, i8** %2
%13 = call i32 @ft_putstr_from(i8* %12, i32 2)
br label %14
14: ; preds = %11, %8
%15 = call i32 @ft_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c":\0A\00"
define void @ft_ls_helper_2(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 47
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @ft_putstr(i8* %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @ft_putstr_from(i8* %0, i32 2)
br label %8
8: ; preds = %6, %4
%9 = tail call i32 @ft_putstr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct chirp_client {
  int dummy;
};
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ chirp_client_hash(struct chirp_client *, char const *,
                                     char *, unsigned char *,
                                     int /*<<< orphan*/);
int64_t chirp_client_md5(struct chirp_client *c, const char *path,
                         unsigned char digest[16], time_t stoptime) {
  return chirp_client_hash(c, path, "md5", digest, stoptime);
}


x86 assembly (clang, -O0):
<chirp_client_md5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
lea    0xec2(%rip),%rdx
call   1030 <chirp_client_hash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chirp_client_md5>:
mov    %ecx,%r8d
mov    %rdx,%rcx
lea    0xee3(%rip),%rdx
jmp    1030 <chirp_client_hash@plt>

LLVM IR (-O0):
%struct.chirp_client = type { i32 }
@.str = [4 x i8] c"md5\00"
define i32 @chirp_client_md5(%struct.chirp_client* %0, i8* %1, i8* %2, i32 %3) {
%5 = alloca %struct.chirp_client*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
store %struct.chirp_client* %0, %struct.chirp_client** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load %struct.chirp_client*, %struct.chirp_client** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i32, i32* %8
%13 = call i32 @chirp_client_hash(%struct.chirp_client* %9, i8* %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.chirp_client = type { i32 }
@.str = [4 x i8] c"md5\00"
define i32 @chirp_client_md5(%struct.chirp_client* %0, i8* %1, i8* %2, i32 %3) {
%5 = tail call i32 @chirp_client_hash(%struct.chirp_client* %0, i8* %1, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2, i32 %3)
ret i32 %5
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int rotate_r(int, int);
uint64_t s0(uint64_t a) { return rotate_r(a, 1) ^ rotate_r(a, 8) ^ a >> 7; }


x86 assembly (clang, -O0):
<s0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <rotate_r@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x8,%esi
call   1030 <rotate_r@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x7,%ecx
xor    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<s0>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0x1,%esi
call   1030 <rotate_r@plt>
mov    %eax,%ebp
mov    %ebx,%edi
mov    $0x8,%esi
call   1030 <rotate_r@plt>
sar    $0x7,%ebx
xor    %ebp,%ebx
xor    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @s0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @rotate_r(i32 %3, i32 1)
%5 = load i32, i32* %2
%6 = call i32 @rotate_r(i32 %5, i32 8)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = ashr i32 %8, 7
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @s0(i32 %0) {
%2 = tail call i32 @rotate_r(i32 %0, i32 1)
%3 = tail call i32 @rotate_r(i32 %0, i32 8)
%4 = ashr i32 %0, 7
%5 = xor i32 %2, %4
%6 = xor i32 %5, %3
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ dnorm2(unsigned int, double const *);
double sqrt(int /*<<< orphan*/);
double dnorm(unsigned int n, const double *dx) { return sqrt(dnorm2(n, dx)); }


x86 assembly (clang, -O0):
<dnorm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1040 <dnorm2@plt>
mov    %eax,%edi
call   1030 <sqrt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dnorm>:
push   %rax
call   1040 <dnorm2@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @dnorm(i32 %0, double* %1) {
%3 = alloca i32
%4 = alloca double*
store i32 %0, i32* %3
store double* %1, double** %4
%5 = load i32, i32* %3
%6 = load double*, double** %4
%7 = call i32 @dnorm2(i32 %5, double* %6)
%8 = call double @sqrt(i32 %7)
ret double %8
}

LLVM IR (-O2):
define double @dnorm(i32 %0, double* %1) {
%3 = tail call i32 @dnorm2(i32 %0, double* %1)
%4 = tail call double @sqrt(i32 %3)
ret double %4
}
void foo() {
  int i;
  int a[100];
  int temp;
  int t2;
  temp = 1;
  t2 = temp;
  for (i = 0; i <= 98; i += 1) {
    temp = a[i];
    a[i + 1] += temp + 1;
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x130,%rsp
movl   $0x1,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%eax
mov    %eax,-0x1a8(%rbp)
movl   $0x0,-0x4(%rbp)
cmpl   $0x62,-0x4(%rbp)
jg     1170 <foo+0x70>
movslq -0x4(%rbp),%rax
mov    -0x1a0(%rbp,%rax,4),%eax
mov    %eax,-0x1a4(%rbp)
mov    -0x1a4(%rbp),%ecx
add    $0x1,%ecx
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cltq
add    -0x1a0(%rbp,%rax,4),%ecx
mov    %ecx,-0x1a0(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1128 <foo+0x28>
add    $0x130,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
sub    $0x118,%rsp
mov    $0x3,%eax
nopl   0x0(%rax)
mov    -0x88(%rsp,%rax,4),%edx
mov    -0x84(%rsp,%rax,4),%esi
lea    (%rcx,%rdx,1),%edi
add    $0x1,%edi
add    %edx,%ecx
mov    %edi,-0x88(%rsp,%rax,4)
lea    (%rsi,%rcx,1),%edx
add    $0x1,%edx
lea    0x2(%rsi,%rcx,1),%ecx
mov    %ecx,-0x84(%rsp,%rax,4)
mov    -0x80(%rsp,%rax,4),%ecx
add    %edx,%ecx
add    $0x2,%ecx
mov    %ecx,-0x80(%rsp,%rax,4)
add    $0x3,%rax
cmp    $0x66,%rax
jne    1110 <foo+0x10>
add    $0x118,%rsp
ret

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca [100 x i32]
%3 = alloca i32
%4 = alloca i32
store i32 1, i32* %3
%5 = load i32, i32* %3
store i32 %5, i32* %4
store i32 0, i32* %1
br label %6
6: ; preds = %22, %0
%7 = load i32, i32* %1
%8 = icmp sle i32 %7, 98
br i1 %8, label %9, label %25
9: ; preds = %6
%10 = load i32, i32* %1
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %11
%13 = load i32, i32* %12
store i32 %13, i32* %3
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
%16 = load i32, i32* %1
%17 = add nsw i32 %16, 1
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds [100 x i32], [100 x i32]* %2, i64 0, i64 %18
%20 = load i32, i32* %19
%21 = add nsw i32 %20, %15
store i32 %21, i32* %19
br label %22
22: ; preds = %9
%23 = load i32, i32* %1
%24 = add nsw i32 %23, 1
store i32 %24, i32* %1
br label %6
25: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @foo() {
%1 = alloca [100 x i32]
%2 = bitcast [100 x i32]* %1 to i8*
br label %3
3: ; preds = %3, %0
%4 = phi i32 [ undef, %0 ], [ %20, %3 ]
%5 = phi i64 [ 0, %0 ], [ %17, %3 ]
%6 = add nsw i32 %4, 1
%7 = add nuw nsw i64 %5, 1
%8 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %7
%9 = load i32, i32* %8
%10 = add nsw i32 %6, %9
store i32 %10, i32* %8
%11 = add nsw i32 %10, 1
%12 = add nuw nsw i64 %5, 2
%13 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %12
%14 = load i32, i32* %13
%15 = add nsw i32 %11, %14
store i32 %15, i32* %13
%16 = add nsw i32 %15, 1
%17 = add nuw nsw i64 %5, 3
%18 = getelementptr inbounds [100 x i32], [100 x i32]* %1, i64 0, i64 %17
%19 = load i32, i32* %18
%20 = add nsw i32 %16, %19
store i32 %20, i32* %18
%21 = icmp eq i64 %17, 99
br i1 %21, label %22, label %3
22: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ send_text(char *);
void HardFault_Handler(void) {
  send_text("Hard Fault.\n");
  while (1) {
  }
}


x86 assembly (clang, -O0):
<HardFault_Handler>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <send_text@plt>
jmp    1120 <HardFault_Handler+0x10>

x86 assembly (clang, -O2):
<HardFault_Handler>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <send_text@plt>
nopl   (%rax)
jmp    1120 <HardFault_Handler+0x10>

LLVM IR (-O0):
@.str = [13 x i8] c"Hard Fault.\0A\00"
define void @HardFault_Handler() {
%1 = call i32 @send_text(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
@.str = [13 x i8] c"Hard Fault.\0A\00"
define void @HardFault_Handler() {
%1 = tail call i32 @send_text(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %2
2: ; preds = %0, %2
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ notify_pvcall(char *);
int pvSetMultipleExposureTimes(char byBoardNum, unsigned int nExposureMode,
                               char byNumTimes, double *dExpStartTimes,
                               double *dExpEndTimes) {
  notify_pvcall("f");
  return (0);
}


x86 assembly (clang, -O0):
<pvSetMultipleExposureTimes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
lea    0xecb(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pvSetMultipleExposureTimes>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <notify_pvcall@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"f\00"
define i32 @pvSetMultipleExposureTimes(i8 signext %0, i32 %1, i8 signext %2, double* %3, double* %4) {
%6 = alloca i8
%7 = alloca i32
%8 = alloca i8
%9 = alloca double*
%10 = alloca double*
store i8 %0, i8* %6
store i32 %1, i32* %7
store i8 %2, i8* %8
store double* %3, double** %9
store double* %4, double** %10
%11 = call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"f\00"
define i32 @pvSetMultipleExposureTimes(i8 signext %0, i32 %1, i8 signext %2, double* nocapture readnone %3, double* nocapture readnone %4) {
%6 = tail call i32 @notify_pvcall(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int SendAsync_Sample();
int main(void) { return SendAsync_Sample(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <SendAsync_Sample@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @SendAsync_Sample()
ret i32 %2
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @SendAsync_Sample()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ terminate();
void use_die(const char *msg) {
  fprintf(stderr, "%s\n", msg);
  terminate();
}


x86 assembly (clang, -O0):
<use_die>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x0,%al
call   1040 <terminate@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<use_die>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <terminate@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @use_die(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 (...) @terminate()
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @use_die(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 (...) @terminate()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void *fp() {
  printf("a");
  return (void *)0;
}


x86 assembly (clang, -O0):
<fp>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fp>:
push   %rax
mov    $0x61,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
define i8* @fp() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @fp() {
%1 = tail call i32 @putchar(i32 97)
ret i8* null
}
void plugin_exit() {}


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

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

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

LLVM IR (-O2):
define void @plugin_exit() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t __UXTB(uint32_t op1) { return op1 & 0xFF; }


x86 assembly (clang, -O0):
<__UXTB>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__UXTB>:
movzbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @__UXTB(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
ret i32 %4
}

LLVM IR (-O2):
define i32 @__UXTB(i32 %0) {
%2 = and i32 %0, 255
ret i32 %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fwrite(unsigned char *, int, int, int /*<<< orphan*/ *);
void fa_write_ushort(unsigned short in, FILE *fp) {
  unsigned char temp[2];
  temp[0] = in & 0xff;
  in >>= 8;
  temp[1] = in & 0xff;
  fwrite(temp, sizeof(*temp), 2, fp);
}


x86 assembly (clang, -O0):
<fa_write_ushort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x12(%rbp)
movzwl -0x2(%rbp),%eax
sar    $0x8,%eax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
and    $0xff,%eax
mov    %al,-0x11(%rbp)
lea    -0x12(%rbp),%rdi
mov    -0x10(%rbp),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fwrite@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fa_write_ushort>:
push   %rax
mov    %rsi,%rcx
mov    %di,0x6(%rsp)
lea    0x6(%rsp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fwrite@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @fa_write_ushort(i16 zeroext %0, i32* %1) {
%3 = alloca i16
%4 = alloca i32*
%5 = alloca [2 x i8]
store i16 %0, i16* %3
store i32* %1, i32** %4
%6 = load i16, i16* %3
%7 = zext i16 %6 to i32
%8 = and i32 %7, 255
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
store i8 %9, i8* %10
%11 = load i16, i16* %3
%12 = zext i16 %11 to i32
%13 = ashr i32 %12, 8
%14 = trunc i32 %13 to i16
store i16 %14, i16* %3
%15 = load i16, i16* %3
%16 = zext i16 %15 to i32
%17 = and i32 %16, 255
%18 = trunc i32 %17 to i8
%19 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
store i8 %18, i8* %19
%20 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%21 = load i32*, i32** %4
%22 = call i32 @fwrite(i8* %20, i32 1, i32 2, i32* %21)
ret void
}

LLVM IR (-O2):
define void @fa_write_ushort(i16 zeroext %0, i32* nocapture %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = trunc i16 %0 to i8
store i8 %5, i8* %4
%6 = lshr i16 %0, 8
%7 = trunc i16 %6 to i8
%8 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 1
store i8 %7, i8* %8
%9 = call i32 @fwrite(i8* %4, i32 1, i32 2, i32* %1)
ret void
}
/* Variables and functions */
float exp(float);
float log(float);
float potencia(float x, float y) {
  float resp;
  resp = exp(log(x) * y);
  return (resp);
}


x86 assembly (clang, -O0):
<potencia>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1040 <log@plt>
mulss  -0x8(%rbp),%xmm0
call   1030 <exp@plt>
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<potencia>:
push   %rax
movss  %xmm1,0x4(%rsp)
call   1040 <log@plt>
mulss  0x4(%rsp),%xmm0
pop    %rax
jmp    1030 <exp@plt>

LLVM IR (-O0):
define float @potencia(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = call float @log(float %6)
%8 = load float, float* %4
%9 = fmul float %7, %8
%10 = call float @exp(float %9)
store float %10, float* %5
%11 = load float, float* %5
ret float %11
}

LLVM IR (-O2):
define float @potencia(float %0, float %1) {
%3 = tail call float @log(float %0)
%4 = fmul float %3, %1
%5 = tail call float @exp(float %4)
ret float %5
}
/* Variables and functions */
float tanf(float);
float nvg__tanf(float a) { return tanf(a); }


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

x86 assembly (clang, -O2):
<nvg__tanf>:
jmp    1030 <tanf@plt>

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

LLVM IR (-O2):
define float @nvg__tanf(float %0) {
%2 = tail call float @tanf(float %0)
ret float %2
}
void ar9003_mci_set_full_sleep(struct ath_hw *ah) {}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
%struct.ath_hw = type opaque
define void @ar9003_mci_set_full_sleep(%struct.ath_hw* nocapture %0) {
ret void
}
int main(void) {
  if (f() != f)
    abort();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <f@plt>
cltq
mov    0x2ea1(%rip),%rcx
cmp    %rcx,%rax
je     114d <main+0x2d>
call   1030 <abort@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <f@plt>
cltq
cmp    0x2eaf(%rip),%rax
jne    113a <main+0x1a>
xor    %edi,%edi
call   1040 <exit@plt>
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @f()
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32 (...)*
%5 = icmp ne i32 (...)* %4, @f
br i1 %5, label %6, label %7
6: ; preds = %0
unreachable
7: ; preds = %0
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
%2 = sext i32 %1 to i64
%3 = inttoptr i64 %2 to i32 (...)*
%4 = icmp eq i32 (...)* %3, @f
br i1 %4, label %6, label %5
5: ; preds = %0
tail call void @abort()
unreachable
6: ; preds = %0
tail call void @exit(i32 0)
unreachable
}
void gdk_window_resize() {}


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

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

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

LLVM IR (-O2):
define void @gdk_window_resize() {
ret void
}
int main(void) {
  char from[1000] = {'a'};
  char to[1000] = {'c'};
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x7e0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1030 <memset@plt>
movb   $0x61,-0x3f0(%rbp)
lea    -0x7e0(%rbp),%rdi
xor    %esi,%esi
mov    $0x3e8,%edx
call   1030 <memset@plt>
movb   $0x63,-0x7e0(%rbp)
xor    %eax,%eax
add    $0x7e0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1000 x i8]
%3 = alloca [1000 x i8]
store i32 0, i32* %1
%4 = bitcast [1000 x i8]* %2 to i8*
%5 = bitcast i8* %4 to <{ i8, [999 x i8] }>*
%6 = getelementptr inbounds <{ i8, [999 x i8] }>, <{ i8, [999 x i8] }>* %5, i32 0, i32 0
store i8 97, i8* %6
%7 = bitcast [1000 x i8]* %3 to i8*
%8 = bitcast i8* %7 to <{ i8, [999 x i8] }>*
%9 = getelementptr inbounds <{ i8, [999 x i8] }>, <{ i8, [999 x i8] }>* %8, i32 0, i32 0
store i8 99, i8* %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int EOF;
int getchar();
int /*<<< orphan*/ putchar(int /*<<< orphan*/);
int /*<<< orphan*/ tolower(int);
main() {
  int c;
  while ((c = getchar()) != EOF) {
    putchar(tolower(c));
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0x8(%rbp)
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
je     116c <main+0x3c>
mov    -0x8(%rbp),%edi
call   1050 <tolower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
jmp    113f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <getchar@plt>
mov    0x2ea9(%rip),%rbx
cmp    (%rbx),%eax
je     1169 <main+0x39>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %eax,%edi
call   1050 <tolower@plt>
mov    %eax,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    (%rbx),%eax
jne    1150 <main+0x20>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call i32 (...) @getchar()
store i32 %4, i32* %2
%5 = load i32, i32* @EOF
%6 = icmp ne i32 %4, %5
br i1 %6, label %7, label %11
7: ; preds = %3
%8 = load i32, i32* %2
%9 = call i32 @tolower(i32 %8)
%10 = call i32 @putchar(i32 %9)
br label %3
11: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @getchar()
%2 = load i32, i32* @EOF
%3 = icmp eq i32 %1, %2
br i1 %3, label %11, label %4
4: ; preds = %0, %4
%5 = phi i32 [ %8, %4 ], [ %1, %0 ]
%6 = tail call i32 @tolower(i32 %5)
%7 = tail call i32 @putchar(i32 %6)
%8 = tail call i32 (...) @getchar()
%9 = load i32, i32* @EOF
%10 = icmp eq i32 %8, %9
br i1 %10, label %11, label %4
11: ; preds = %4, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ print_array();
int main(void) {
  int arr[] = {1, 1, 2, 5, 8, 13};
  print_array();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <print_array@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.arr = [6 x i32] [i32 1, i32 1, i32 2, i32 5, i32 8, i32 13]
define i32 @main() {
%1 = alloca [6 x i32]
%2 = bitcast [6 x i32]* %1 to i8*
%3 = call i32 (...) @print_array()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @print_array()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *cmd) {
  fprintf(
      stderr,
      "Usage: %s [ -h ] [ -n iterations ] [ -d delay ] [ -r header_repeat ]\n"
      "    -n iterations     How many rows of data to print.\n"
      "    -d delay          How long to sleep between rows.\n"
      "    -r header_repeat  How many rows to print before repeating\n"
      "                      the header.  Zero means never repeat.\n"
      "    -h                Displays this help screen.\n",
      cmd);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [349 x i8] c"Usage: %s [ -h ] [ -n iterations ] [ -d delay ] [ -r header_repeat ]\0A -n iterations How many rows of data to print.\0A -d delay How long to sleep between rows.\0A -r header_repeat How many rows to print before repeating\0A the header. Zero means never repeat.\0A -h Displays this help screen.\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([349 x i8], [349 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [349 x i8] c"Usage: %s [ -h ] [ -n iterations ] [ -d delay ] [ -r header_repeat ]\0A -n iterations How many rows of data to print.\0A -d delay How long to sleep between rows.\0A -r header_repeat How many rows to print before repeating\0A the header. Zero means never repeat.\0A -h Displays this help screen.\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([349 x i8], [349 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void FP_array_access3_Ok(int x, int *y) {
  int a[1];
  *y = x + 1;
  if (x + 1 == 1) {
    if (*y != 1) {
      a[3] = 0;
    }
  }
}


x86 assembly (clang, -O0):
<FP_array_access3_Ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
add    $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
cmp    $0x1,%eax
jne    113f <FP_array_access3_Ok+0x3f>
mov    -0x10(%rbp),%rax
cmpl   $0x1,(%rax)
je     113a <FP_array_access3_Ok+0x3a>
movl   $0x0,-0x8(%rbp)
jmp    113f <FP_array_access3_Ok+0x3f>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FP_array_access3_Ok>:
add    $0x1,%edi
mov    %edi,(%rsi)
ret

LLVM IR (-O0):
define void @FP_array_access3_Ok(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca [1 x i32]
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
%8 = load i32*, i32** %4
store i32 %7, i32* %8
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 1
%11 = icmp eq i32 %10, 1
br i1 %11, label %12, label %19
12: ; preds = %2
%13 = load i32*, i32** %4
%14 = load i32, i32* %13
%15 = icmp ne i32 %14, 1
br i1 %15, label %16, label %18
16: ; preds = %12
%17 = getelementptr inbounds [1 x i32], [1 x i32]* %5, i64 0, i64 3
store i32 0, i32* %17
br label %18
18: ; preds = %16, %12
br label %19
19: ; preds = %18, %2
ret void
}

LLVM IR (-O2):
define void @FP_array_access3_Ok(i32 %0, i32* nocapture writeonly %1) {
%3 = add nsw i32 %0, 1
store i32 %3, i32* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ args;

/* Variables and functions */
int spawn(int, char **);
int main(int argc, char *argv[]) {
  char *args[] = {"/usr/local/bin/bash", "-l", NULL};
  return (spawn((sizeof(args) / sizeof((args)[0])) - 1, args));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2cd3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0x2cd0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0x2ccd(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    -0x30(%rbp),%rsi
mov    $0x2,%edi
call   1030 <spawn@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0x2cf5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cd9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rsi
mov    $0x2,%edi
call   1030 <spawn@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [20 x i8] c"/usr/local/bin/bash\00"
@.str.1 = [3 x i8] c"-l\00"
@__const.main.args = [3 x i8*] [i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8* null]
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [3 x i8*]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [3 x i8*]* %6 to i8*
%8 = getelementptr inbounds [3 x i8*], [3 x i8*]* %6, i64 0, i64 0
%9 = call i32 @spawn(i32 2, i8** %8)
ret i32 %9
}

LLVM IR (-O2):
@.str = [20 x i8] c"/usr/local/bin/bash\00"
@.str.1 = [3 x i8] c"-l\00"
@__const.main.args = [3 x i8*] [i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8* null]
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [3 x i8*]
%4 = bitcast [3 x i8*]* %3 to i8*
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%6 = call i32 @spawn(i32 2, i8** %5)
ret i32 %6
}
void I444ToABGR() {}


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

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

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

LLVM IR (-O2):
define void @I444ToABGR() {
ret void
}
char *f(char outstr[]) { return outstr; }


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

x86 assembly (clang, -O2):
<f>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
ret i8* %3
}

LLVM IR (-O2):
define i8* @f(i8* readnone returned %0) {
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ tlsio_openssl_deinit();
void platform_deinit(void) { tlsio_openssl_deinit(); }


x86 assembly (clang, -O0):
<platform_deinit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <tlsio_openssl_deinit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<platform_deinit>:
xor    %eax,%eax
jmp    1030 <tlsio_openssl_deinit@plt>

LLVM IR (-O0):
define void @platform_deinit() {
%1 = call i32 (...) @tlsio_openssl_deinit()
ret void
}

LLVM IR (-O2):
define void @platform_deinit() {
%1 = tail call i32 (...) @tlsio_openssl_deinit()
ret void
}
DECLARE_INTERFACE_(IVPVBIConfig, IVPBaseConfig) {}


x86 assembly (clang, -O0):
<DECLARE_INTERFACE_>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @DECLARE_INTERFACE_(i32 %0, i32 %1) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ ev_arc4random_buf(void *, size_t);
void evutil_secure_rng_get_bytes(void *buf, size_t n) {
  ev_arc4random_buf(buf, n);
}


x86 assembly (clang, -O0):
<evutil_secure_rng_get_bytes>:
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 <ev_arc4random_buf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<evutil_secure_rng_get_bytes>:
jmp    1030 <ev_arc4random_buf@plt>

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

LLVM IR (-O2):
define void @evutil_secure_rng_get_bytes(i8* %0, i64 %1) {
%3 = tail call i32 @ev_arc4random_buf(i8* %0, i64 %1)
ret void
}
void wifi_rsp_sme_set_password(
    const struct wifi_msg_sme_set_password_rsp_t *msg) {}


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

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

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

LLVM IR (-O2):
%struct.wifi_msg_sme_set_password_rsp_t = type opaque
define void @wifi_rsp_sme_set_password(%struct.wifi_msg_sme_set_password_rsp_t* nocapture %0) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int override_redirect;
};
typedef TYPE_1__ XMapEvent;

/* Variables and functions */
void set_XMapEvent_override_redirect(void *_p, int _v) {
  ((XMapEvent *)_p)->override_redirect = (int)_v;
}


x86 assembly (clang, -O0):
<set_XMapEvent_override_redirect>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XMapEvent_override_redirect>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XMapEvent_override_redirect(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XMapEvent_override_redirect(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
/* Variables and functions */
char **malloc(int);
char **clibf_heap_table(char **table, int len) {
  char **result = malloc(len * sizeof(char));
  int i;
  for (i = 0; i < len; i++)
    result[i] = table[i];
  return result;
}


x86 assembly (clang, -O0):
<clibf_heap_table>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    116b <clibf_heap_table+0x5b>
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1139 <clibf_heap_table+0x29>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clibf_heap_table>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebp
mov    %rdi,%r14
mov    %esi,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %ebp,%ebp
jle    1148 <clibf_heap_table+0x28>
mov    %ebp,%edx
shl    $0x3,%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <memcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i8** @clibf_heap_table(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i8** %0, i8*** %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = mul i64 %8, 1
%10 = trunc i64 %9 to i32
%11 = call i8** @malloc(i32 %10)
store i8** %11, i8*** %5
store i32 0, i32* %6
br label %12
12: ; preds = %26, %2
%13 = load i32, i32* %6
%14 = load i32, i32* %4
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %29
16: ; preds = %12
%17 = load i8**, i8*** %3
%18 = load i32, i32* %6
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8*, i8** %17, i64 %19
%21 = load i8*, i8** %20
%22 = load i8**, i8*** %5
%23 = load i32, i32* %6
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds i8*, i8** %22, i64 %24
store i8* %21, i8** %25
br label %26
26: ; preds = %16
%27 = load i32, i32* %6
%28 = add nsw i32 %27, 1
store i32 %28, i32* %6
br label %12
29: ; preds = %12
%30 = load i8**, i8*** %5
ret i8** %30
}

LLVM IR (-O2):
define noalias i8** @clibf_heap_table(i8** nocapture %0, i32 %1) {
%3 = tail call i8** @malloc(i32 %1)
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %10
5: ; preds = %2
%6 = bitcast i8** %3 to i8*
%7 = bitcast i8** %0 to i8*
%8 = zext i32 %1 to i64
%9 = shl nuw nsw i64 %8, 3
br label %10
10: ; preds = %5, %2
ret i8** %3
}
void foo(unsigned __int128 x) {
  if (x > (unsigned __int128)-3)
    return;
  unsigned __int128 y = 2 * x;
  if (y == 42)
    fn1call();
  else
    fn2call();
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rcx
mov    %rcx,-0x18(%rbp)
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rcx
mov    -0x18(%rbp),%rax
sub    $0xfffffffffffffffe,%rcx
sbb    $0xffffffffffffffff,%rax
jb     1160 <foo+0x40>
jmp    115b <foo+0x3b>
jmp    11b1 <foo+0x91>
mov    -0x20(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    %rdx,%rax
add    %rax,%rax
shld   $0x1,%rdx,%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
movaps -0x30(%rbp),%xmm0
movaps 0xe7a(%rip),%xmm1
pcmpeqb %xmm1,%xmm0
pmovmskb %xmm0,%eax
sub    $0xffff,%eax
jne    11aa <foo+0x8a>
jmp    119e <foo+0x7e>
mov    $0x0,%al
call   1040 <fn1call@plt>
jmp    11b1 <foo+0x91>
mov    $0x0,%al
call   1030 <fn2call@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    $0xfffffffffffffffd,%rax
cmp    %rdi,%rax
mov    $0xffffffffffffffff,%rax
sbb    %rsi,%rax
jae    1137 <foo+0x17>
ret
movabs $0x7fffffffffffffff,%rax
ff ff 7f
and    %rax,%rsi
xor    $0x15,%rdi
xor    %eax,%eax
or     %rsi,%rdi
jne    1154 <foo+0x34>
jmp    1040 <fn1call@plt>
jmp    1030 <fn2call@plt>

LLVM IR (-O0):
define void @foo(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = bitcast i128* %3 to { i64, i64 }*
%7 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %6, i32 0, i32 0
store i64 %0, i64* %7
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %6, i32 0, i32 1
store i64 %1, i64* %8
%9 = load i128, i128* %3
store i128 %9, i128* %4
%10 = load i128, i128* %4
%11 = icmp ugt i128 %10, -3
br i1 %11, label %12, label %13
12: ; preds = %2
br label %22
13: ; preds = %2
%14 = load i128, i128* %4
%15 = mul i128 2, %14
store i128 %15, i128* %5
%16 = load i128, i128* %5
%17 = icmp eq i128 %16, 42
br i1 %17, label %18, label %20
18: ; preds = %13
%19 = call i32 (...) @fn1call()
br label %22
20: ; preds = %13
%21 = call i32 (...) @fn2call()
br label %22
22: ; preds = %12, %20, %18
ret void
}

LLVM IR (-O2):
define void @foo(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = icmp ugt i128 %6, -3
br i1 %7, label %15, label %8
8: ; preds = %2
%9 = and i128 %6, 170141183460469231731687303715884105727
%10 = icmp eq i128 %9, 21
br i1 %10, label %11, label %13
11: ; preds = %8
%12 = tail call i32 (...) @fn1call()
br label %15
13: ; preds = %8
%14 = tail call i32 (...) @fn2call()
br label %15
15: ; preds = %11, %13, %2
ret void
}
/* Variables and functions */
int CHAR_BIT;
int main(void) {
  int s = sizeof(int) * CHAR_BIT;
  1 >> s;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    0x2ece(%rip),%rax
movslq (%rax),%rax
shl    $0x2,%rax
mov    %eax,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@CHAR_BIT = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* @CHAR_BIT
%4 = sext i32 %3 to i64
%5 = mul i64 4, %4
%6 = trunc i64 %5 to i32
store i32 %6, i32* %2
%7 = load i32, i32* %2
%8 = ashr i32 1, %7
ret i32 0
}

LLVM IR (-O2):
@CHAR_BIT = global i32 0
define i32 @main() {
ret i32 0
}
void workshare_exit() { ("workshare_exit"); }


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

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

LLVM IR (-O0):
@.str = [15 x i8] c"workshare_exit\00"
define void @workshare_exit() {
ret void
}

LLVM IR (-O2):
define void @workshare_exit() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int sweep_get_number_of_equations(int *n) {
  int fail, *b;
  double *c;
  fail = _ada_use_c2phc4c(612, n, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<sweep_get_number_of_equations>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x264,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sweep_get_number_of_equations>:
mov    %rdi,%rsi
mov    $0x264,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

LLVM IR (-O0):
define i32 @sweep_get_number_of_equations(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32*
%5 = alloca double*
store i32* %0, i32** %2
%6 = load i32*, i32** %2
%7 = load i32*, i32** %4
%8 = load double*, double** %5
%9 = call i32 @_ada_use_c2phc4c(i32 612, i32* %6, i32* %7, double* %8, i32 0)
store i32 %9, i32* %3
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @sweep_get_number_of_equations(i32* %0) {
%2 = tail call i32 @_ada_use_c2phc4c(i32 612, i32* %0, i32* undef, double* undef, i32 0)
ret i32 %2
}