xunge/DecIR huggingface dataset:
int any_negative(double *A, int n, int L) {
  int i;
  for (i = 0; i < n * L; i++) {
    if (A[i] <= 0.0)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<any_negative>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x14(%rbp),%ecx
imul   -0x18(%rbp),%ecx
cmp    %ecx,%eax
jge    115c <any_negative+0x5c>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
xorps  %xmm0,%xmm0
ucomisd (%rax,%rcx,8),%xmm0
jb     1149 <any_negative+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1163 <any_negative+0x63>
jmp    114e <any_negative+0x4e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1115 <any_negative+0x15>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<any_negative>:
imul   %edx,%esi
test   %esi,%esi
jle    1120 <any_negative+0x20>
mov    %esi,%eax
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
nop
ucomisd (%rdi,%rcx,8),%xmm0
jae    1123 <any_negative+0x23>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <any_negative+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @any_negative(double* nocapture %0, i32 %1, i32 %2) {
%4 = mul i32 %2, %1
%5 = icmp sgt i32 %4, 0
br i1 %5, label %6, label %16
6: ; preds = %3
%7 = zext i32 %4 to i64
br label %10
8: ; preds = %10
%9 = icmp eq i64 %15, %7
br i1 %9, label %16, label %10
10: ; preds = %6, %8
%11 = phi i64 [ 0, %6 ], [ %15, %8 ]
%12 = getelementptr inbounds double, double* %0, i64 %11
%13 = load double, double* %12
%14 = fcmp ugt double %13, 0.000000e+00
%15 = add nuw nsw i64 %11, 1
br i1 %14, label %8, label %16
16: ; preds = %10, %8, %3
%17 = phi i32 [ 0, %3 ], [ 0, %8 ], [ 1, %10 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ STDOUT_FILENO;
int /*<<< orphan*/ ft_putnstr_fd(char const *, size_t, int /*<<< orphan*/);
void ft_putnstr(char const *str, size_t str_len) {
  ft_putnstr_fd(str, str_len, STDOUT_FILENO);
}


x86 assembly (clang, -O0):
<ft_putnstr>:
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    0x2ec1(%rip),%rax
mov    (%rax),%edx
call   1030 <ft_putnstr_fd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putnstr>:
mov    0x2ed9(%rip),%rax
mov    (%rax),%edx
jmp    1030 <ft_putnstr_fd@plt>

LLVM IR (-O0):
@STDOUT_FILENO = global i32 0
define void @ft_putnstr(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 = load i32, i32* @STDOUT_FILENO
%8 = call i32 @ft_putnstr_fd(i8* %5, i64 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@STDOUT_FILENO = global i32 0
define void @ft_putnstr(i8* %0, i64 %1) {
%3 = load i32, i32* @STDOUT_FILENO
%4 = tail call i32 @ft_putnstr_fd(i8* %0, i64 %1, i32 %3)
ret void
}
/* Variables and functions */
double exp(double const);
double pexp(const double x, const double lambda) {
  return 1.0 - exp(-lambda * x);
}


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

x86 assembly (clang, -O2):
<pexp>:
push   %rax
xorpd  0xee7(%rip),%xmm1
mulsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xee6(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @pexp(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %4
%6 = fneg double %5
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = call double @exp(double %8)
%10 = fsub double 1.000000e+00, %9
ret double %10
}

LLVM IR (-O2):
define double @pexp(double %0, double %1) {
%3 = fneg double %1
%4 = fmul double %3, %0
%5 = tail call double @exp(double %4)
%6 = fsub double 1.000000e+00, %5
ret double %6
}
/* Type definitions */
typedef int /*<<< orphan*/ ulong;

/* Variables and functions */
ulong __VERIFIER_nondet_ulong() { return 0; }


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

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

LLVM IR (-O0):
define i32 @__VERIFIER_nondet_ulong() {
ret i32 0
}

LLVM IR (-O2):
define i32 @__VERIFIER_nondet_ulong() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void smash() {
  printf("I've been smashed!\n");
  exit(0);
}


x86 assembly (clang, -O0):
<smash>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [20 x i8] c"I've been smashed!\0A\00"
define void @smash() {
%1 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@str = [19 x i8] c"I've been smashed!\00"
define void @smash() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ DrawHorizontalLine(int, int /*<<< orphan*/, int,
                                      int /*<<< orphan*/);
void DrawFilledRectangle(int x, int y, int xsize, int ysize, uint8_t color) {
  while (ysize--)
    DrawHorizontalLine(x, y++, xsize, color);
}


x86 assembly (clang, -O0):
<DrawFilledRectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x10(%rbp)
cmp    $0x0,%eax
je     115a <DrawFilledRectangle+0x4a>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    %esi,%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <DrawHorizontalLine@plt>
jmp    1128 <DrawFilledRectangle+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawFilledRectangle>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %ecx,%ecx
je     1148 <DrawFilledRectangle+0x38>
mov    %r8d,%r14d
mov    %ecx,%ebp
mov    %edx,%r15d
mov    %edi,%r12d
nopw   0x0(%rax,%rax,1)
lea    0x1(%rsi),%ebx
mov    %r12d,%edi
mov    %r15d,%edx
mov    %r14d,%ecx
call   1030 <DrawHorizontalLine@plt>
mov    %ebx,%esi
add    $0xffffffff,%ebp
jne    1130 <DrawFilledRectangle+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @DrawFilledRectangle(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
br label %11
11: ; preds = %15, %5
%12 = load i32, i32* %9
%13 = add nsw i32 %12, -1
store i32 %13, i32* %9
%14 = icmp ne i32 %12, 0
br i1 %14, label %15, label %22
15: ; preds = %11
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = add nsw i32 %17, 1
store i32 %18, i32* %7
%19 = load i32, i32* %8
%20 = load i32, i32* %10
%21 = call i32 @DrawHorizontalLine(i32 %16, i32 %17, i32 %19, i32 %20)
br label %11
22: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @DrawFilledRectangle(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp eq i32 %3, 0
br i1 %6, label %14, label %7
7: ; preds = %5, %7
%8 = phi i32 [ %11, %7 ], [ %1, %5 ]
%9 = phi i32 [ %10, %7 ], [ %3, %5 ]
%10 = add nsw i32 %9, -1
%11 = add nsw i32 %8, 1
%12 = tail call i32 @DrawHorizontalLine(i32 %0, i32 %8, i32 %2, i32 %4)
%13 = icmp eq i32 %10, 0
br i1 %13, label %14, label %7
14: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  register int i;
  i = 100;
  i = i + 50;
  i = i + 20;
  printf("%d\n", i);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x64,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x32,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x14,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xaa,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 100, i32* %1
%2 = load i32, i32* %1
%3 = add nsw i32 %2, 50
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 20
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 170)
ret i32 0
}
void ff_hevc_put_hevc_bi_epel_hv48_12_sse4() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_drag_source_add_image_targets() {
ret void
}
int fun1210() { return 1210; }


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

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

LLVM IR (-O0):
define i32 @fun1210() {
ret i32 1210
}

LLVM IR (-O2):
define i32 @fun1210() {
ret i32 1210
}
/* Variables and functions */
int /*<<< orphan*/ lcd_wr_command(int);
void lcd_clear() { lcd_wr_command(0x01); }


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

x86 assembly (clang, -O2):
<lcd_clear>:
mov    $0x1,%edi
jmp    1030 <lcd_wr_command@plt>

LLVM IR (-O0):
define void @lcd_clear() {
%1 = call i32 @lcd_wr_command(i32 1)
ret void
}

LLVM IR (-O2):
define void @lcd_clear() {
%1 = tail call i32 @lcd_wr_command(i32 1)
ret void
}
char ch2hex(char ch) {
  if (ch <= '9') {
    ch = ch - '0';
  } else if ((ch <= 'z') && (ch >= 'a')) {
    ch = ch - 'a' + 10U;
  } else {
    ch = ch - 'A' + 10U;
  }
  return ch;
}


x86 assembly (clang, -O0):
<ch2hex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
jg     1126 <ch2hex+0x26>
movsbl -0x1(%rbp),%eax
sub    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1164 <ch2hex+0x64>
movsbl -0x1(%rbp),%eax
cmp    $0x7a,%eax
jg     1152 <ch2hex+0x52>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1152 <ch2hex+0x52>
movsbl -0x1(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    115f <ch2hex+0x5f>
movsbl -0x1(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    1164 <ch2hex+0x64>
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ch2hex>:
lea    -0x61(%rdi),%eax
cmp    $0x1a,%al
setae  %al
shl    $0x5,%al
add    $0xa9,%al
cmp    $0x3a,%dil
movzbl %al,%ecx
mov    $0xd0,%eax
cmovge %ecx,%eax
add    %dil,%al
ret

LLVM IR (-O0):
define signext i8 @ch2hex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 %4, 57
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = sub nsw i32 %8, 48
%10 = trunc i32 %9 to i8
store i8 %10, i8* %2
br label %32
11: ; preds = %1
%12 = load i8, i8* %2
%13 = sext i8 %12 to i32
%14 = icmp sle i32 %13, 122
br i1 %14, label %15, label %25
15: ; preds = %11
%16 = load i8, i8* %2
%17 = sext i8 %16 to i32
%18 = icmp sge i32 %17, 97
br i1 %18, label %19, label %25
19: ; preds = %15
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = sub nsw i32 %21, 97
%23 = add i32 %22, 10
%24 = trunc i32 %23 to i8
store i8 %24, i8* %2
br label %31
25: ; preds = %15, %11
%26 = load i8, i8* %2
%27 = sext i8 %26 to i32
%28 = sub nsw i32 %27, 65
%29 = add i32 %28, 10
%30 = trunc i32 %29 to i8
store i8 %30, i8* %2
br label %31
31: ; preds = %25, %19
br label %32
32: ; preds = %31, %6
%33 = load i8, i8* %2
ret i8 %33
}

LLVM IR (-O2):
define signext i8 @ch2hex(i8 signext %0) {
%2 = icmp slt i8 %0, 58
%3 = add nsw i8 %0, -97
%4 = icmp ult i8 %3, 26
%5 = select i1 %4, i8 -87, i8 -55
%6 = select i1 %2, i8 -48, i8 %5
%7 = add i8 %6, %0
ret i8 %7
}
/* Variables and functions */
int countDigits(unsigned long);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, unsigned long *);
int main() {
  unsigned long n;
  printf("\nEnter a number\n");
  scanf("%lu", &n);
  printf("\nThe number of digits is --> %d\n", countDigits(n));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x10(%rbp),%rdi
call   1040 <countDigits@plt>
mov    %eax,%esi
lea    0xea6(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xeac(%rip),%rdi
mov    %rsp,%rsi
call   1060 <scanf@plt>
mov    (%rsp),%rdi
call   1050 <countDigits@plt>
lea    0xe98(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"\0AEnter a number\0A\00"
@.str.1 = [4 x i8] c"%lu\00"
@.str.2 = [33 x i8] c"\0AThe number of digits is --> %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %2)
%5 = load i64, i64* %2
%6 = call i32 @countDigits(i64 %5)
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [4 x i8] c"%lu\00"
@.str.2 = [33 x i8] c"\0AThe number of digits is --> %d\0A\00"
@str = [16 x i8] c"\0AEnter a number\00"
define i32 @main() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %1)
%5 = load i64, i64* %1
%6 = call i32 @countDigits(i64 %5)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.2, i64 0, i64 0), i32 %6)
ret i32 0
}
void smacUartDebug_state(char byte) {}


x86 assembly (clang, -O0):
<smacUartDebug_state>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @smacUartDebug_state(i8 signext %0) {
ret void
}
void *netsnmp_generic_row_first(void *table) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @netsnmp_generic_row_first(i8* nocapture readnone %0) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ decrRefCount(void *);
void dictRedisObjectDestructor(void *privdata, void *val) {
  if (val == NULL)
    return;
  decrRefCount(val);
}


x86 assembly (clang, -O0):
<dictRedisObjectDestructor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1130 <dictRedisObjectDestructor+0x20>
jmp    1139 <dictRedisObjectDestructor+0x29>
mov    -0x10(%rbp),%rdi
call   1030 <decrRefCount@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dictRedisObjectDestructor>:
test   %rsi,%rsi
je     111d <dictRedisObjectDestructor+0xd>
mov    %rsi,%rdi
jmp    1030 <decrRefCount@plt>
ret

LLVM IR (-O0):
define void @dictRedisObjectDestructor(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp eq i8* %5, null
br i1 %6, label %7, label %8
7: ; preds = %2
br label %11
8: ; preds = %2
%9 = load i8*, i8** %4
%10 = call i32 @decrRefCount(i8* %9)
br label %11
11: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
define void @dictRedisObjectDestructor(i8* nocapture readnone %0, i8* %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @decrRefCount(i8* %1)
br label %6
6: ; preds = %2, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ command(char *);
syst() { (void)command("SYST"); }


x86 assembly (clang, -O0):
<syst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <command@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syst>:
lea    0xee9(%rip),%rdi
jmp    1030 <command@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"SYST\00"
define i32 @syst() {
%1 = alloca i32
%2 = call i32 @command(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [5 x i8] c"SYST\00"
define i32 @syst() {
%1 = tail call i32 @command(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ WINS_Init();
int /*<<< orphan*/ WINS_MyAddress();
int /*<<< orphan*/ WinPrint(char *, int /*<<< orphan*/);
int Net_Setup(void) {
  if (!WINS_Init()) {
    return 0;
  }
  WinPrint("my address is %s\n", WINS_MyAddress());
  return 1;
}


x86 assembly (clang, -O0):
<Net_Setup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <WINS_Init@plt>
cmp    $0x0,%eax
jne    1154 <Net_Setup+0x24>
movl   $0x0,-0x4(%rbp)
jmp    1170 <Net_Setup+0x40>
mov    $0x0,%al
call   1030 <WINS_MyAddress@plt>
mov    %eax,%esi
lea    0xe9c(%rip),%rdi
call   1050 <WinPrint@plt>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Net_Setup>:
push   %rbx
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <WINS_Init@plt>
test   %eax,%eax
je     1158 <Net_Setup+0x28>
xor    %eax,%eax
call   1030 <WINS_MyAddress@plt>
lea    0xeb4(%rip),%rdi
mov    %eax,%esi
call   1050 <WinPrint@plt>
mov    $0x1,%ebx
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"my address is %s\0A\00"
define i32 @Net_Setup() {
%1 = alloca i32
%2 = call i32 (...) @WINS_Init()
%3 = icmp ne i32 %2, 0
br i1 %3, label %5, label %4
4: ; preds = %0
store i32 0, i32* %1
br label %8
5: ; preds = %0
%6 = call i32 (...) @WINS_MyAddress()
%7 = call i32 @WinPrint(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %6)
store i32 1, i32* %1
br label %8
8: ; preds = %5, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [18 x i8] c"my address is %s\0A\00"
define i32 @Net_Setup() {
%1 = tail call i32 (...) @WINS_Init()
%2 = icmp eq i32 %1, 0
br i1 %2, label %6, label %3
3: ; preds = %0
%4 = tail call i32 (...) @WINS_MyAddress()
%5 = tail call i32 @WinPrint(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %4)
br label %6
6: ; preds = %0, %3
%7 = phi i32 [ 1, %3 ], [ 0, %0 ]
ret i32 %7
}
/* Variables and functions */
int getpagesize();
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  printf("this will show the page size in your system,\n");
  printf("getpagesize(): %d \n", getpagesize());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getpagesize@plt>
mov    %eax,%esi
lea    0xeec(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xedc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <getpagesize@plt>
lea    0xeb5(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [46 x i8] c"this will show the page size in your system,\0A\00"
@.str.1 = [20 x i8] c"getpagesize(): %d \0A\00"
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @getpagesize()
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [20 x i8] c"getpagesize(): %d \0A\00"
@str = [45 x i8] c"this will show the page size in your system,\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @getpagesize()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0), i32 %2)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ a;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  char a = 'a';
  printf("%zd\n", sizeof(char));
  printf("%zd\n", sizeof(a));
  printf("%zd\n", sizeof('a'));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x61,-0x1(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xecc(%rip),%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
lea    0xebb(%rip),%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x1,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x4,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%zd\0A\00"
define i32 @main() {
%1 = alloca i8
store i8 97, i8* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c"%zd\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}
/* Variables and functions */
void add_entry(char *file, int line, void *memory, size_t size) {}


x86 assembly (clang, -O0):
<add_entry>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @add_entry(i8* nocapture %0, i32 %1, i8* nocapture %2, i64 %3) {
ret void
}
int passes_sa_constraints_none(int **walk_points, int curr_num_pts) {
  return 1;
}


x86 assembly (clang, -O0):
<passes_sa_constraints_none>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @passes_sa_constraints_none(i32** nocapture readnone %0, i32 %1) {
ret i32 1
}
/* Variables and functions */
char const *cc_traverse_chars(char const *const, char const *const, int);
char const *cc_skip_chars(char const *const restrict pos,
                          char const *const restrict seps) {
  return cc_traverse_chars(pos, seps, true);
}


x86 assembly (clang, -O0):
<cc_skip_chars>:
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    $0x1,%edx
call   1030 <cc_traverse_chars@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cc_skip_chars>:
mov    $0x1,%edx
jmp    1030 <cc_traverse_chars@plt>

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

LLVM IR (-O2):
define i8* @cc_skip_chars(i8* noalias %0, i8* noalias %1) {
%3 = tail call i8* @cc_traverse_chars(i8* %0, i8* %1, i32 1)
ret i8* %3
}
float scalar_product(v1, v2)
float v1[3], v2[3];
{
  int k;
  float x;
  x = 0.0;
  for (k = 0; k < 3; k++)
    x = x + v1[k] * v2[k];
  return (x);
}


x86 assembly (clang, -O0):
<scalar_product>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xorps  %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x3,-0x14(%rbp)
jge    115f <scalar_product+0x5f>
movss  -0x18(%rbp),%xmm1
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    111b <scalar_product+0x1b>
movss  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<scalar_product>:
movss  (%rdi),%xmm0
movss  0x4(%rdi),%xmm1
mulss  (%rsi),%xmm0
xorps  %xmm2,%xmm2
addss  %xmm0,%xmm2
mulss  0x4(%rsi),%xmm1
addss  %xmm2,%xmm1
movss  0x8(%rdi),%xmm0
mulss  0x8(%rsi),%xmm0
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @scalar_product(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca i32
%6 = alloca float
store float* %0, float** %3
store float* %1, float** %4
store float 0.000000e+00, float* %6
store i32 0, i32* %5
br label %7
7: ; preds = %23, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 3
br i1 %9, label %10, label %26
10: ; preds = %7
%11 = load float, float* %6
%12 = load float*, float** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds float, float* %12, i64 %14
%16 = load float, float* %15
%17 = load float*, float** %4
%18 = load i32, i32* %5
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds float, float* %17, i64 %19
%21 = load float, float* %20
%22 = call float @llvm.fmuladd.f32(float %16, float %21, float %11)
store float %22, float* %6
br label %23
23: ; preds = %10
%24 = load i32, i32* %5
%25 = add nsw i32 %24, 1
store i32 %25, i32* %5
br label %7
26: ; preds = %7
%27 = load float, float* %6
ret float %27
}

LLVM IR (-O2):
define float @scalar_product(float* nocapture %0, float* nocapture %1) {
%3 = load float, float* %0
%4 = load float, float* %1
%5 = tail call float @llvm.fmuladd.f32(float %3, float %4, float 0.000000e+00)
%6 = getelementptr inbounds float, float* %0, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %1, i64 1
%9 = load float, float* %8
%10 = tail call float @llvm.fmuladd.f32(float %7, float %9, float %5)
%11 = getelementptr inbounds float, float* %0, i64 2
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 2
%14 = load float, float* %13
%15 = tail call float @llvm.fmuladd.f32(float %12, float %14, float %10)
ret float %15
}
/* Variables and functions */
int /*<<< orphan*/ _hmt_register_covercase(char *, char *);
void _hmt_covercase_HMM_Power_init(void) {
  _hmt_register_covercase("HMM_Power", "2");
}


x86 assembly (clang, -O0):
<_hmt_covercase_HMM_Power_init>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
lea    0xee8(%rip),%rsi
call   1030 <_hmt_register_covercase@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_hmt_covercase_HMM_Power_init>:
lea    0xee9(%rip),%rdi
lea    0xeec(%rip),%rsi
jmp    1030 <_hmt_register_covercase@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"HMM_Power\00"
@.str.1 = [2 x i8] c"2\00"
define void @_hmt_covercase_HMM_Power_init() {
%1 = call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"HMM_Power\00"
@.str.1 = [2 x i8] c"2\00"
define void @_hmt_covercase_HMM_Power_init() {
%1 = tail call i32 @_hmt_register_covercase(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pic_disable(int);
void interrupt_disable(int i) {
  if (i < 32) {
  } else {
    pic_disable(i - 32);
  }
}


x86 assembly (clang, -O0):
<interrupt_disable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x20,-0x4(%rbp)
jge    112a <interrupt_disable+0x1a>
jmp    1135 <interrupt_disable+0x25>
mov    -0x4(%rbp),%edi
sub    $0x20,%edi
call   1030 <pic_disable@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<interrupt_disable>:
cmp    $0x20,%edi
jge    1116 <interrupt_disable+0x6>
ret
add    $0xffffffe0,%edi
jmp    1030 <pic_disable@plt>

LLVM IR (-O0):
define void @interrupt_disable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 32
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = sub nsw i32 %7, 32
%9 = call i32 @pic_disable(i32 %8)
br label %10
10: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
define void @interrupt_disable(i32 %0) {
%2 = icmp slt i32 %0, 32
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -32
%5 = tail call i32 @pic_disable(i32 %4)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ listFiles(char *);
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  if (argc < 2)
    printf("Pass directory path as an argument  \"directory path\"\n");
  else
    listFiles(argv[1]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jge    1151 <main+0x31>
lea    0xeb9(%rip),%rdi
call   1040 <printf@plt>
jmp    115e <main+0x3e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1030 <listFiles@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cmp    $0x1,%edi
jg     1134 <main+0x14>
lea    0xed3(%rip),%rdi
call   1030 <puts@plt>
jmp    113d <main+0x1d>
mov    0x8(%rsi),%rdi
call   1040 <listFiles@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [54 x i8] c"Pass directory path as an argument \22directory path\22\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = icmp slt i32 %6, 2
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str, i64 0, i64 0))
br label %15
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
%14 = call i32 @listFiles(i8* %13)
br label %15
15: ; preds = %10, %8
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
@str = [53 x i8] c"Pass directory path as an argument \22directory path\22\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp slt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str, i64 0, i64 0))
br label %10
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %1, i64 1
%8 = load i8*, i8** %7
%9 = tail call i32 @listFiles(i8* %8)
br label %10
10: ; preds = %6, %4
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ x;
};
struct TYPE_4__ {
  TYPE_1__ xcrossing;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xcrossing_x(void *_p) {
  return (int)((XEvent *)_p)->xcrossing.x;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xcrossing_x>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xcrossing_x(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xcrossing_x(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int mocksuspend_release_wake_lock(const char *name) {
  printf("mocksuspend release wake lock %s\n", name);
  return 0;
}


x86 assembly (clang, -O0):
<mocksuspend_release_wake_lock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mocksuspend_release_wake_lock>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"mocksuspend release wake lock %s\0A\00"
define i32 @mocksuspend_release_wake_lock(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"mocksuspend release wake lock %s\0A\00"
define i32 @mocksuspend_release_wake_lock(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
void view_hide() {}


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

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

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

LLVM IR (-O2):
define void @view_hide() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *strerror(int const);
void PrintError(const int error) { printf("Error: %s", strerror(error)); }


x86 assembly (clang, -O0):
<PrintError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <strerror@plt>
mov    %rax,%rsi
lea    0xec3(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PrintError>:
push   %rax
call   1040 <strerror@plt>
lea    0xed3(%rip),%rdi
mov    %rax,%rsi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"Error: %s\00"
define void @PrintError(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i8* @strerror(i32 %3)
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"Error: %s\00"
define void @PrintError(i32 %0) {
%2 = tail call i8* @strerror(i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __console_tx_char(unsigned char);
void __console_tx_string(char *str) {
  unsigned char ch;
  while ((ch = *str++) != '\0') {
    __console_tx_char(ch);
  }
}


x86 assembly (clang, -O0):
<__console_tx_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movzbl %al,%eax
cmp    $0x0,%eax
je     114a <__console_tx_string+0x3a>
movzbl -0x9(%rbp),%edi
call   1030 <__console_tx_char@plt>
jmp    111c <__console_tx_string+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__console_tx_string>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <__console_tx_string+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movzbl %al,%edi
call   1030 <__console_tx_char@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <__console_tx_string+0x10>
pop    %rbx
ret

LLVM IR (-O0):
define void @__console_tx_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
store i8* %0, i8** %2
br label %4
4: ; preds = %10, %1
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i32 1
store i8* %6, i8** %2
%7 = load i8, i8* %5
store i8 %7, i8* %3
%8 = zext i8 %7 to i32
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %4
%11 = load i8, i8* %3
%12 = call i32 @__console_tx_char(i8 zeroext %11)
br label %4
13: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @__console_tx_string(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %9, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = tail call i32 @__console_tx_char(i8 zeroext %5)
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
ret void
}
void pointer_arith2_Ok(int x) {
  int len = 5;
  char p[5];
  (p + x)[3 - x] = 0;
}


x86 assembly (clang, -O0):
<pointer_arith2_Ok>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
lea    -0xd(%rbp),%rax
movslq -0x4(%rbp),%rcx
add    %rcx,%rax
mov    $0x3,%ecx
sub    -0x4(%rbp),%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @pointer_arith2_Ok(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca [5 x i8]
store i32 %0, i32* %2
store i32 5, i32* %3
%5 = getelementptr inbounds [5 x i8], [5 x i8]* %4, i64 0, i64 0
%6 = load i32, i32* %2
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i32, i32* %2
%10 = sub nsw i32 3, %9
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i8, i8* %8, i64 %11
store i8 0, i8* %12
ret void
}

LLVM IR (-O2):
define void @pointer_arith2_Ok(i32 %0) {
ret void
}
/* Type definitions */
struct img_pixmap {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ img_setpixel4f(struct img_pixmap *, int, int, float, float,
                                  float, float);
void img_setpixel1f(struct img_pixmap *img, int x, int y, float pix) {
  img_setpixel4f(img, x, y, pix, pix, pix, pix);
}


x86 assembly (clang, -O0):
<img_setpixel1f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
movss  %xmm0,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
movss  -0x14(%rbp),%xmm2
movss  -0x14(%rbp),%xmm3
call   1030 <img_setpixel4f@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<img_setpixel1f>:
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
movaps %xmm0,%xmm3
jmp    1030 <img_setpixel4f@plt>

LLVM IR (-O0):
%struct.img_pixmap = type { i32 }
define void @img_setpixel1f(%struct.img_pixmap* %0, i32 %1, i32 %2, float %3) {
%5 = alloca %struct.img_pixmap*
%6 = alloca i32
%7 = alloca i32
%8 = alloca float
store %struct.img_pixmap* %0, %struct.img_pixmap** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store float %3, float* %8
%9 = load %struct.img_pixmap*, %struct.img_pixmap** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load float, float* %8
%13 = load float, float* %8
%14 = load float, float* %8
%15 = load float, float* %8
%16 = call i32 @img_setpixel4f(%struct.img_pixmap* %9, i32 %10, i32 %11, float %12, float %13, float %14, float %15)
ret void
}

LLVM IR (-O2):
%struct.img_pixmap = type { i32 }
define void @img_setpixel1f(%struct.img_pixmap* %0, i32 %1, i32 %2, float %3) {
%5 = tail call i32 @img_setpixel4f(%struct.img_pixmap* %0, i32 %1, i32 %2, float %3, float %3, float %3, float %3)
ret void
}
void log_debug2(const char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @log_debug2(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cleanupPlatformSockets();
void cleanupPlatform(void) { cleanupPlatformSockets(); }


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

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

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

LLVM IR (-O2):
define void @cleanupPlatform() {
%1 = tail call i32 (...) @cleanupPlatformSockets()
ret void
}
int __attribute__((target("tune=sandybridge"))) walrus(int a) { return 4; }


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

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

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

LLVM IR (-O2):
define i32 @walrus(i32 %0) {
ret i32 4
}
void charProp(char *p, int c, int prop) { p[c] |= prop; }


x86 assembly (clang, -O0):
<charProp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
or     %esi,%edx
mov    %dl,(%rax,%rcx,1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<charProp>:
movslq %esi,%rax
or     %dl,(%rdi,%rax,1)
ret

LLVM IR (-O0):
define void @charProp(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = load i32, i32* %5
%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 = or i32 %13, %7
%15 = trunc i32 %14 to i8
store i8 %15, i8* %11
ret void
}

LLVM IR (-O2):
define void @charProp(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = trunc i32 %2 to i8
%8 = or i8 %6, %7
store i8 %8, i8* %5
ret void
}
char *get_first(string, src)
char *string, *src;
{
  char *ptr;
  ptr = strtok(string, src);
  return (ptr);
}


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

x86 assembly (clang, -O2):
<get_first>:
jmp    1030 <strtok@plt>

LLVM IR (-O0):
define i8* @get_first(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = load i8*, i8** %4
%8 = call i8* @strtok(i8* %6, i8* %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
ret i8* %9
}

LLVM IR (-O2):
define i8* @get_first(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strtok(i8* %0, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ test_parser_sourcefile(char *, char *);
int /*<<< orphan*/ test_parser_verify_entity(int /*<<< orphan*/, char *,
                                             char *);
void test_clojure_comment_entities() {
  test_parser_verify_entity(test_parser_sourcefile("clojure", " ;comment"),
                            "comment", ";comment");
}


x86 assembly (clang, -O0):
<test_clojure_comment_entities>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed6(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
mov    %eax,%edi
lea    0xeca(%rip),%rsi
lea    0xec2(%rip),%rdx
call   1040 <test_parser_verify_entity@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_clojure_comment_entities>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed9(%rip),%rsi
call   1030 <test_parser_sourcefile@plt>
lea    0xecf(%rip),%rsi
lea    0xec7(%rip),%rdx
mov    %eax,%edi
pop    %rax
jmp    1040 <test_parser_verify_entity@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"clojure\00"
@.str.1 = [10 x i8] c" ;comment\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [9 x i8] c";comment\00"
define void @test_clojure_comment_entities() {
%1 = call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"clojure\00"
@.str.1 = [10 x i8] c" ;comment\00"
@.str.2 = [8 x i8] c"comment\00"
@.str.3 = [9 x i8] c";comment\00"
define void @test_clojure_comment_entities() {
%1 = tail call i32 @test_parser_sourcefile(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @test_parser_verify_entity(i32 %1, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
ret void
}