xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char const);
void ft_putendl(char const *s) {
  int i;
  i = 0;
  while (s[i] != '\0') {
    ft_putchar(s[i]);
    i++;
  }
  ft_putchar('\n');
}


x86 assembly (clang, -O0):
<ft_putendl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1157 <ft_putendl+0x47>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <ft_putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <ft_putendl+0x13>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @ft_putendl(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8 [ %10, %4 ], [ %2, %1 ]
%7 = tail call i32 @ft_putchar(i8 signext %6)
%8 = add nuw i64 %5, 1
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
%13 = tail call i32 @ft_putchar(i8 signext 10)
ret void
}
double umrechnung_l_in_us_gal(double liter) {
  const double umrechnungsfaktor = 0.264172;
  double us_gal = liter * umrechnungsfaktor;
  return us_gal;
}


x86 assembly (clang, -O0):
<umrechnung_l_in_us_gal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xee2(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<umrechnung_l_in_us_gal>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @umrechnung_l_in_us_gal(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
store double %0, double* %2
store double 2.641720e-01, double* %3
%5 = load double, double* %2
%6 = fmul double %5, 2.641720e-01
store double %6, double* %4
%7 = load double, double* %4
ret double %7
}

LLVM IR (-O2):
define double @umrechnung_l_in_us_gal(double %0) {
%2 = fmul double %0, 2.641720e-01
ret double %2
}
int item_hash(char *key, int m) {
  char *k = key;
  int h = 0;
  for (; *k != '\0'; k++)
    h = (127 * h + *k) % m;
  return h;
}


x86 assembly (clang, -O0):
<item_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     114f <item_hash+0x4f>
imul   $0x7f,-0x1c(%rbp),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
add    %ecx,%eax
cltd
idivl  -0xc(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    111a <item_hash+0x1a>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<item_hash>:
mov    (%rdi),%al
test   %al,%al
je     112d <item_hash+0x2d>
add    $0x1,%rdi
xor    %edx,%edx
nopl   0x0(%rax)
movsbl %al,%ecx
mov    %edx,%eax
shl    $0x7,%eax
sub    %edx,%eax
add    %ecx,%eax
cltd
idiv   %esi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <item_hash+0x10>
mov    %edx,%eax
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @item_hash(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 i8*, i8** %3
store i8* %7, i8** %5
store i32 0, i32* %6
br label %8
8: ; preds = %22, %2
%9 = load i8*, i8** %5
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %25
13: ; preds = %8
%14 = load i32, i32* %6
%15 = mul nsw i32 127, %14
%16 = load i8*, i8** %5
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = add nsw i32 %15, %18
%20 = load i32, i32* %4
%21 = srem i32 %19, %20
store i32 %21, i32* %6
br label %22
22: ; preds = %13
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %5
br label %8
25: ; preds = %8
%26 = load i32, i32* %6
ret i32 %26
}

LLVM IR (-O2):
define i32 @item_hash(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %14, %5 ], [ %3, %2 ]
%7 = phi i32 [ %12, %5 ], [ 0, %2 ]
%8 = phi i8* [ %13, %5 ], [ %0, %2 ]
%9 = sext i8 %6 to i32
%10 = mul nsw i32 %7, 127
%11 = add nsw i32 %10, %9
%12 = srem i32 %11, %1
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %2
%17 = phi i32 [ 0, %2 ], [ %12, %5 ]
ret i32 %17
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
#define EOF 128
int fgetc(int /*<<< orphan*/ *);
int remove_line(FILE *f) {
  int count = 0;
  int c;
  while (1) {
    c = fgetc(f);
    ++count;
    switch (c) {
    case '\n':
      goto quit_remove_line;
    case EOF:
      --count;
      goto quit_remove_line;
    }
  }
quit_remove_line:
  return count;
}


x86 assembly (clang, -O0):
<remove_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
sub    $0xa,%eax
je     115f <remove_line+0x4f>
jmp    114c <remove_line+0x3c>
mov    -0x14(%rbp),%eax
sub    $0x80,%eax
je     1164 <remove_line+0x54>
jmp    1172 <remove_line+0x62>
jmp    1177 <remove_line+0x67>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    1177 <remove_line+0x67>
jmp    1123 <remove_line+0x13>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_line>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0xffffffff,%ebx
nopl   0x0(%rax)
mov    %r14,%rdi
call   1030 <fgetc@plt>
add    $0x1,%ebx
cmp    $0x80,%eax
je     113a <remove_line+0x2a>
cmp    $0xa,%eax
jne    1120 <remove_line+0x10>
add    $0x1,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @remove_line(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %5
5: ; preds = %1, %15
%6 = load i32*, i32** %2
%7 = call i32 @fgetc(i32* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = load i32, i32* %4
switch i32 %10, label %15 [
i32 10, label %11
i32 128, label %12
]
11: ; preds = %5
br label %16
12: ; preds = %5
%13 = load i32, i32* %3
%14 = add nsw i32 %13, -1
store i32 %14, i32* %3
br label %16
15: ; preds = %5
br label %5
16: ; preds = %12, %11
%17 = load i32, i32* %3
ret i32 %17
}

LLVM IR (-O2):
define i32 @remove_line(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %5, %2 ]
%4 = tail call i32 @fgetc(i32* %0)
%5 = add nuw nsw i32 %3, 1
switch i32 %4, label %2 [
i32 10, label %6
i32 128, label %7
]
6: ; preds = %2
br label %7
7: ; preds = %2, %6
%8 = phi i32 [ %5, %6 ], [ %3, %2 ]
ret i32 %8
}
int isdigit(const int c) { return c >= '0' && c <= '9'; }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int check_arg_count(int, int /*<<< orphan*/);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
int /*<<< orphan*/ report_status(char *);
int /*<<< orphan*/ scanw(char *, char *);
void cmd_scanw(int nargs, char **args) {
  char string[256];
  if (check_arg_count(nargs, 0) == 1)
    return;
  report_count(2);
  report_return(scanw("%s", string));
  report_status(string);
}


x86 assembly (clang, -O0):
<cmd_scanw>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
jne    117a <cmd_scanw+0x2a>
jmp    11aa <cmd_scanw+0x5a>
mov    $0x2,%edi
call   1060 <report_count@plt>
lea    -0x110(%rbp),%rsi
lea    0xe6e(%rip),%rdi
call   1070 <scanw@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
lea    -0x110(%rbp),%rdi
call   1040 <report_status@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_scanw>:
push   %rbx
sub    $0x100,%rsp
xor    %esi,%esi
call   1050 <check_arg_count@plt>
cmp    $0x1,%eax
je     118f <cmd_scanw+0x3f>
mov    $0x2,%edi
call   1060 <report_count@plt>
lea    0xe8b(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1070 <scanw@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
mov    %rbx,%rdi
call   1040 <report_status@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @cmd_scanw(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
%5 = alloca [256 x i8]
store i32 %0, i32* %3
store i8** %1, i8*** %4
%6 = load i32, i32* %3
%7 = call i32 @check_arg_count(i32 %6, i32 0)
%8 = icmp eq i32 %7, 1
br i1 %8, label %9, label %10
9: ; preds = %2
br label %17
10: ; preds = %2
%11 = call i32 @report_count(i32 2)
%12 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%13 = call i32 @scanw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @report_return(i32 %13)
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%16 = call i32 @report_status(i8* %15)
br label %17
17: ; preds = %10, %9
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @cmd_scanw(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [256 x i8]
%4 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%5 = tail call i32 @check_arg_count(i32 %0, i32 0)
%6 = icmp eq i32 %5, 1
br i1 %6, label %12, label %7
7: ; preds = %2
%8 = tail call i32 @report_count(i32 2)
%9 = call i32 @scanw(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %4)
%10 = call i32 @report_return(i32 %9)
%11 = call i32 @report_status(i8* %4)
br label %12
12: ; preds = %2, %7
ret void
}
putd(n) {
  if (n < 0) {
    putchar('-');
    n = -n;
  }
  if (n / 10)
    putd(n / 10);
  putchar(n % 10 + '0');
}


x86 assembly (clang, -O0):
<putd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1149 <putd+0x29>
mov    $0x2d,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
xor    %eax,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
cmp    $0x0,%eax
je     116f <putd+0x4f>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
call   1040 <putd@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x30,%edi
mov    $0x0,%al
call   1030 <putchar@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putd>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
test   %edi,%edi
jns    1138 <putd+0x18>
mov    $0x2d,%edi
xor    %eax,%eax
call   1030 <putchar@plt>
neg    %ebx
mov    %ebx,%r14d
cmp    $0xa,%ebx
jb     1152 <putd+0x32>
mov    $0xcccccccd,%edi
imul   %r14,%rdi
shr    $0x23,%rdi
call   1040 <putd@plt>
mov    $0xcccccccd,%eax
imul   %r14,%rax
shr    $0x23,%rax
add    %eax,%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%ebx
or     $0x30,%ebx
mov    %ebx,%edi
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define i32 @putd(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%8 = load i32, i32* %3
%9 = sub nsw i32 0, %8
store i32 %9, i32* %3
br label %10
10: ; preds = %6, %1
%11 = load i32, i32* %3
%12 = sdiv i32 %11, 10
%13 = icmp ne i32 %12, 0
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i32, i32* %3
%16 = sdiv i32 %15, 10
%17 = call i32 @putd(i32 %16)
br label %18
18: ; preds = %14, %10
%19 = load i32, i32* %3
%20 = srem i32 %19, 10
%21 = add nsw i32 %20, 48
%22 = call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %21)
%23 = load i32, i32* %2
ret i32 %23
}

LLVM IR (-O2):
define i32 @putd(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %6
3: ; preds = %1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 45)
%5 = sub nsw i32 0, %0
br label %6
6: ; preds = %3, %1
%7 = phi i32 [ %5, %3 ], [ %0, %1 ]
%8 = icmp ult i32 %7, 10
br i1 %8, label %12, label %9
9: ; preds = %6
%10 = udiv i32 %7, 10
%11 = tail call i32 @putd(i32 %10)
br label %12
12: ; preds = %9, %6
%13 = urem i32 %7, 10
%14 = or i32 %13, 48
%15 = tail call i32 (i32, ...) bitcast (i32 (...)* @putchar to i32 (i32, ...)*)(i32 %14)
ret i32 undef
}
int in_device_list(int *list, int dev_nr) {
  for (; *list; list++) {
    if (dev_nr == *list)
      return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<in_device_list>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpl   $0x0,(%rax)
je     1149 <in_device_list+0x49>
mov    -0x14(%rbp),%eax
mov    -0x10(%rbp),%rcx
cmp    (%rcx),%eax
jne    1133 <in_device_list+0x33>
movl   $0x1,-0x4(%rbp)
jmp    1150 <in_device_list+0x50>
jmp    1138 <in_device_list+0x38>
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x10(%rbp)
jmp    110b <in_device_list+0xb>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<in_device_list>:
mov    (%rdi),%ecx
xor    %eax,%eax
test   %ecx,%ecx
je     111e <in_device_list+0x1e>
add    $0x4,%rdi
nopl   0x0(%rax)
cmp    %esi,%ecx
je     111f <in_device_list+0x1f>
mov    (%rdi),%ecx
add    $0x4,%rdi
test   %ecx,%ecx
jne    1110 <in_device_list+0x10>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @in_device_list(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp eq i32 %3, 0
br i1 %4, label %13, label %8
5: ; preds = %8
%6 = load i32, i32* %12
%7 = icmp eq i32 %6, 0
br i1 %7, label %13, label %8
8: ; preds = %2, %5
%9 = phi i32 [ %6, %5 ], [ %3, %2 ]
%10 = phi i32* [ %12, %5 ], [ %0, %2 ]
%11 = icmp eq i32 %9, %1
%12 = getelementptr inbounds i32, i32* %10, i64 1
br i1 %11, label %13, label %5
13: ; preds = %8, %5, %2
%14 = phi i32 [ 0, %2 ], [ 0, %5 ], [ 1, %8 ]
ret i32 %14
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ stdout;
void update_progress(uint32_t pos, uint32_t total) {
  if (pos % (total / 100) == 0) {
    printf("\rProgress: %d%%", ((100 * pos) / total));
    fflush(stdout);
  }
}


x86 assembly (clang, -O0):
<update_progress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1174 <update_progress+0x54>
imul   $0x64,-0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,%esi
lea    0xe9f(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e73(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_progress>:
movslq %esi,%rax
imul   $0x51eb851f,%rax,%rcx
mov    %rcx,%rax
shr    $0x3f,%rax
sar    $0x25,%rcx
add    %eax,%ecx
mov    %edi,%eax
cltd
idiv   %ecx
test   %edx,%edx
je     1141 <update_progress+0x21>
ret
push   %rax
imul   $0x64,%edi,%eax
cltd
idiv   %esi
lea    0xeb1(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1040 <fflush@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"\0DProgress: %d%%\00"
@stdout = global i32 0
define void @update_progress(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sdiv i32 %6, 100
%8 = srem i32 %5, %7
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %18
10: ; preds = %2
%11 = load i32, i32* %3
%12 = mul nsw i32 100, %11
%13 = load i32, i32* %4
%14 = sdiv i32 %12, %13
%15 = call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %14)
%16 = load i32, i32* @stdout
%17 = call i32 @fflush(i32 %16)
br label %18
18: ; preds = %10, %2
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"\0DProgress: %d%%\00"
@stdout = global i32 0
define void @update_progress(i32 %0, i32 %1) {
%3 = sdiv i32 %1, 100
%4 = srem i32 %0, %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %2
%7 = mul nsw i32 %0, 100
%8 = sdiv i32 %7, %1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i32, i32* @stdout
%11 = tail call i32 @fflush(i32 %10)
br label %12
12: ; preds = %6, %2
ret void
}
/* Variables and functions */
int inb(int);
int i8042_read_data(void) { return inb(0x60); }


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

x86 assembly (clang, -O2):
<i8042_read_data>:
mov    $0x60,%edi
jmp    1030 <inb@plt>

LLVM IR (-O0):
define i32 @i8042_read_data() {
%1 = call i32 @inb(i32 96)
ret i32 %1
}

LLVM IR (-O2):
define i32 @i8042_read_data() {
%1 = tail call i32 @inb(i32 96)
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void __sched_cpufree(cpu_set_t *set) { free(set); }


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

x86 assembly (clang, -O2):
<__sched_cpufree>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @__sched_cpufree(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @free(i32* %3)
ret void
}

LLVM IR (-O2):
define void @__sched_cpufree(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
int curs_set(int visibility) {
  (void)visibility;
  return 1;
}


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

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

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

LLVM IR (-O2):
define i32 @curs_set(i32 %0) {
ret i32 1
}
/* Variables and functions */
int fio_lo_put_bytes(char const *, void *, int, char *);
int fio_append_bytes(const char *filename, void *data, int length) {
  return fio_lo_put_bytes(filename, data, length, "a");
}


x86 assembly (clang, -O0):
<fio_append_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xecb(%rip),%rcx
call   1030 <fio_lo_put_bytes@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fio_append_bytes>:
lea    0xee9(%rip),%rcx
jmp    1030 <fio_lo_put_bytes@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"a\00"
define i32 @fio_append_bytes(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @fio_lo_put_bytes(i8* %7, i8* %8, i32 %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %10
}

LLVM IR (-O2):
@.str = [2 x i8] c"a\00"
define i32 @fio_append_bytes(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @fio_lo_put_bytes(i8* %0, i8* %1, i32 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 %4
}
void log_debug(char *fmt, ...) {}


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

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

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

LLVM IR (-O2):
define void @log_debug(i8* nocapture %0, ...) {
ret void
}
/* Type definitions */
struct timezone {
  int dummy;
};
struct __kernel_old_timeval {
  int dummy;
};

/* Variables and functions */
int __cvdso_gettimeofday(struct __kernel_old_timeval *, struct timezone *);
int __vdso_gettimeofday(struct __kernel_old_timeval *tv, struct timezone *tz) {
  return __cvdso_gettimeofday(tv, tz);
}


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

x86 assembly (clang, -O2):
<__vdso_gettimeofday>:
jmp    1030 <__cvdso_gettimeofday@plt>

LLVM IR (-O0):
%struct.__kernel_old_timeval = type { i32 }
%struct.timezone = type { i32 }
define i32 @__vdso_gettimeofday(%struct.__kernel_old_timeval* %0, %struct.timezone* %1) {
%3 = alloca %struct.__kernel_old_timeval*
%4 = alloca %struct.timezone*
store %struct.__kernel_old_timeval* %0, %struct.__kernel_old_timeval** %3
store %struct.timezone* %1, %struct.timezone** %4
%5 = load %struct.__kernel_old_timeval*, %struct.__kernel_old_timeval** %3
%6 = load %struct.timezone*, %struct.timezone** %4
%7 = call i32 @__cvdso_gettimeofday(%struct.__kernel_old_timeval* %5, %struct.timezone* %6)
ret i32 %7
}

LLVM IR (-O2):
%struct.__kernel_old_timeval = type { i32 }
%struct.timezone = type { i32 }
define i32 @__vdso_gettimeofday(%struct.__kernel_old_timeval* %0, %struct.timezone* %1) {
%3 = tail call i32 @__cvdso_gettimeofday(%struct.__kernel_old_timeval* %0, %struct.timezone* %1)
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vtab;
typedef int /*<<< orphan*/ sqlite3_index_info;

/* Variables and functions */
int SQLITE_OK;
int cXBestIndex(sqlite3_vtab *pVTab, sqlite3_index_info *info) {
  return SQLITE_OK;
}


x86 assembly (clang, -O0):
<cXBestIndex>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ed5(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cXBestIndex>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@SQLITE_OK = global i32 0
define i32 @cXBestIndex(i32* nocapture readnone %0, i32* nocapture readnone %1) {
%3 = load i32, i32* @SQLITE_OK
ret i32 %3
}
/* Variables and functions */
int rand();
int rolaDados() {
  int somaDados = 0;
  int i;
  for (i = 0; i < 3; i++)
    somaDados += rand() % 6 + 1;
  return somaDados;
}


x86 assembly (clang, -O0):
<rolaDados>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
jge    1158 <rolaDados+0x48>
mov    $0x0,%al
call   1030 <rand@plt>
mov    $0x6,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    $0x1,%eax
add    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <rolaDados+0x16>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rolaDados>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%r14
imul   $0x2aaaaaab,%r14,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%r14d
xor    %eax,%eax
call   1030 <rand@plt>
movslq %eax,%rbx
imul   $0x2aaaaaab,%rbx,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
shr    $0x20,%rax
add    %ecx,%eax
add    %eax,%eax
lea    (%rax,%rax,2),%eax
sub    %eax,%ebx
add    %r14d,%ebx
xor    %eax,%eax
call   1030 <rand@plt>
cltq
imul   $0x2aaaaaab,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rcx
add    %edx,%ecx
add    %ecx,%ecx
lea    (%rcx,%rcx,2),%ecx
sub    %ecx,%eax
add    %ebx,%eax
add    $0x3,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @rolaDados() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %12, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 3
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 6
%9 = add nsw i32 %8, 1
%10 = load i32, i32* %1
%11 = add nsw i32 %10, %9
store i32 %11, i32* %1
br label %12
12: ; preds = %6
%13 = load i32, i32* %2
%14 = add nsw i32 %13, 1
store i32 %14, i32* %2
br label %3
15: ; preds = %3
%16 = load i32, i32* %1
ret i32 %16
}

LLVM IR (-O2):
define i32 @rolaDados() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 6
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, 6
%5 = add nsw i32 %2, 2
%6 = add nsw i32 %5, %4
%7 = tail call i32 (...) @rand()
%8 = srem i32 %7, 6
%9 = add nsw i32 %6, 1
%10 = add nsw i32 %9, %8
ret i32 %10
}
/* Type definitions */
struct HashTable {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ HashTable_clear(struct HashTable *);
void HashTable_deinit(struct HashTable *self) { HashTable_clear(self); }


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

x86 assembly (clang, -O2):
<HashTable_deinit>:
jmp    1030 <HashTable_clear@plt>

LLVM IR (-O0):
%struct.HashTable = type { i32 }
define void @HashTable_deinit(%struct.HashTable* %0) {
%2 = alloca %struct.HashTable*
store %struct.HashTable* %0, %struct.HashTable** %2
%3 = load %struct.HashTable*, %struct.HashTable** %2
%4 = call i32 @HashTable_clear(%struct.HashTable* %3)
ret void
}

LLVM IR (-O2):
%struct.HashTable = type { i32 }
define void @HashTable_deinit(%struct.HashTable* %0) {
%2 = tail call i32 @HashTable_clear(%struct.HashTable* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ getmaxyx(int /*<<< orphan*/ *, int, int);
void ncurses_getmaxyx(WINDOW *win, int *y, int *x) { getmaxyx(win, *y, *x); }


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

x86 assembly (clang, -O2):
<ncurses_getmaxyx>:
mov    (%rsi),%esi
mov    (%rdx),%edx
jmp    1030 <getmaxyx@plt>

LLVM IR (-O0):
define void @ncurses_getmaxyx(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = load i32*, i32** %6
%11 = load i32, i32* %10
%12 = call i32 @getmaxyx(i32* %7, i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
define void @ncurses_getmaxyx(i32* %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = load i32, i32* %2
%6 = tail call i32 @getmaxyx(i32* %0, i32 %4, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Reserved144_DriverIRQHandler();
__attribute__((weak)) void Reserved144_IRQHandler(void) {
  Reserved144_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @Reserved144_IRQHandler() {
%1 = call i32 (...) @Reserved144_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @Reserved144_IRQHandler() {
%1 = tail call i32 (...) @Reserved144_DriverIRQHandler()
ret void
}
void av_des_alloc() {}


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

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

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

LLVM IR (-O2):
define void @av_des_alloc() {
ret void
}
/* Type definitions */
struct mntent {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
struct mntent *__wrap_getmntent(FILE *fp) {
  return NULL;
}


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

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

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

LLVM IR (-O2):
%struct.mntent = type { i32 }
define noalias %struct.mntent* @__wrap_getmntent(i32* nocapture readnone %0) {
ret %struct.mntent* null
}
/* Variables and functions */
unsigned int __bextri_u32(unsigned int, int);
unsigned int ___bextri_u32(unsigned int A, int const I) {
  return __bextri_u32(A, 1);
}


x86 assembly (clang, -O0):
<___bextri_u32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <__bextri_u32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<___bextri_u32>:
mov    $0x1,%esi
jmp    1030 <__bextri_u32@plt>

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

LLVM IR (-O2):
define i32 @___bextri_u32(i32 %0, i32 %1) {
%3 = tail call i32 @__bextri_u32(i32 %0, i32 1)
ret i32 %3
}
int main(argc, argv)
int argc;
char **argv;
{
  growheap(0);
  syminit();
  etreeinit();
  ifinit();
  predefine();
  openio(argc, argv);
  codeinit();
  typeinit();
  program();
  finishup();
  return 0;
}


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)
xor    %edi,%edi
mov    $0x0,%al
call   10b0 <growheap@plt>
mov    $0x0,%al
call   1060 <syminit@plt>
mov    $0x0,%al
call   1030 <etreeinit@plt>
mov    $0x0,%al
call   1090 <ifinit@plt>
mov    $0x0,%al
call   10c0 <predefine@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <openio@plt>
mov    $0x0,%al
call   1050 <codeinit@plt>
mov    $0x0,%al
call   10a0 <typeinit@plt>
mov    $0x0,%al
call   1080 <program@plt>
mov    $0x0,%al
call   1070 <finishup@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edi,%edi
xor    %eax,%eax
call   10b0 <growheap@plt>
xor    %eax,%eax
call   1060 <syminit@plt>
xor    %eax,%eax
call   1030 <etreeinit@plt>
xor    %eax,%eax
call   1090 <ifinit@plt>
xor    %eax,%eax
call   10c0 <predefine@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <openio@plt>
xor    %eax,%eax
call   1050 <codeinit@plt>
xor    %eax,%eax
call   10a0 <typeinit@plt>
xor    %eax,%eax
call   1080 <program@plt>
xor    %eax,%eax
call   1070 <finishup@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
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 = call i32 (i32, ...) bitcast (i32 (...)* @growheap to i32 (i32, ...)*)(i32 0)
%7 = call i32 (...) @syminit()
%8 = call i32 (...) @etreeinit()
%9 = call i32 (...) @ifinit()
%10 = call i32 (...) @predefine()
%11 = load i32, i32* %4
%12 = load i8**, i8*** %5
%13 = call i32 (i32, i8**, ...) bitcast (i32 (...)* @openio to i32 (i32, i8**, ...)*)(i32 %11, i8** %12)
%14 = call i32 (...) @codeinit()
%15 = call i32 (...) @typeinit()
%16 = call i32 (...) @program()
%17 = call i32 (...) @finishup()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @growheap to i32 (i32, ...)*)(i32 0)
%4 = tail call i32 (...) @syminit()
%5 = tail call i32 (...) @etreeinit()
%6 = tail call i32 (...) @ifinit()
%7 = tail call i32 (...) @predefine()
%8 = tail call i32 (i32, i8**, ...) bitcast (i32 (...)* @openio to i32 (i32, i8**, ...)*)(i32 %0, i8** %1)
%9 = tail call i32 (...) @codeinit()
%10 = tail call i32 (...) @typeinit()
%11 = tail call i32 (...) @program()
%12 = tail call i32 (...) @finishup()
ret i32 0
}
void RTTimerLRStop(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTimerLRStop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CONF_modules_unload(int);
int /*<<< orphan*/ CRYPTO_cleanup_all_ex_data();
int /*<<< orphan*/ ENGINE_cleanup();
int /*<<< orphan*/ ERR_free_strings();
int /*<<< orphan*/ EVP_cleanup();
void destroy_dtls() {
  ENGINE_cleanup();
  CONF_modules_unload(1);
  ERR_free_strings();
  EVP_cleanup();
  CRYPTO_cleanup_all_ex_data();
}


x86 assembly (clang, -O0):
<destroy_dtls>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <ENGINE_cleanup@plt>
mov    $0x1,%edi
call   1050 <CONF_modules_unload@plt>
mov    $0x0,%al
call   1070 <ERR_free_strings@plt>
mov    $0x0,%al
call   1060 <EVP_cleanup@plt>
mov    $0x0,%al
call   1030 <CRYPTO_cleanup_all_ex_data@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<destroy_dtls>:
push   %rax
xor    %eax,%eax
call   1040 <ENGINE_cleanup@plt>
mov    $0x1,%edi
call   1050 <CONF_modules_unload@plt>
xor    %eax,%eax
call   1070 <ERR_free_strings@plt>
xor    %eax,%eax
call   1060 <EVP_cleanup@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <CRYPTO_cleanup_all_ex_data@plt>

LLVM IR (-O0):
define void @destroy_dtls() {
%1 = call i32 (...) @ENGINE_cleanup()
%2 = call i32 @CONF_modules_unload(i32 1)
%3 = call i32 (...) @ERR_free_strings()
%4 = call i32 (...) @EVP_cleanup()
%5 = call i32 (...) @CRYPTO_cleanup_all_ex_data()
ret void
}

LLVM IR (-O2):
define void @destroy_dtls() {
%1 = tail call i32 (...) @ENGINE_cleanup()
%2 = tail call i32 @CONF_modules_unload(i32 1)
%3 = tail call i32 (...) @ERR_free_strings()
%4 = tail call i32 (...) @EVP_cleanup()
%5 = tail call i32 (...) @CRYPTO_cleanup_all_ex_data()
ret void
}
int is_pld(char txt[], int start, int end) {
  while (start < end) {
    if (txt[start++] != txt[end--])
      return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_pld>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    115f <is_pld+0x5f>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
mov    %ecx,%edx
add    $0x1,%edx
mov    %edx,-0x14(%rbp)
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%edx
mov    %edx,%esi
add    $0xffffffff,%esi
mov    %esi,-0x18(%rbp)
movslq %edx,%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     115a <is_pld+0x5a>
movl   $0x0,-0x4(%rbp)
jmp    1166 <is_pld+0x66>
jmp    110e <is_pld+0xe>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_pld>:
movslq %esi,%rax
movslq %edx,%rcx
cs nopw 0x0(%rax,%rax,1)
cmp    %rcx,%rax
jge    112c <is_pld+0x2c>
movzbl (%rdi,%rax,1),%edx
add    $0x1,%rax
lea    -0x1(%rcx),%rsi
cmp    (%rdi,%rcx,1),%dl
mov    %rsi,%rcx
je     1110 <is_pld+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @is_pld(i8* nocapture %0, i32 %1, i32 %2) {
%4 = sext i32 %1 to i64
%5 = sext i32 %2 to i64
br label %6
6: ; preds = %10, %3
%7 = phi i64 [ %14, %10 ], [ %5, %3 ]
%8 = phi i64 [ %11, %10 ], [ %4, %3 ]
%9 = icmp slt i64 %8, %7
br i1 %9, label %10, label %18
10: ; preds = %6
%11 = add nsw i64 %8, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %8
%13 = load i8, i8* %12
%14 = add nsw i64 %7, -1
%15 = getelementptr inbounds i8, i8* %0, i64 %7
%16 = load i8, i8* %15
%17 = icmp eq i8 %13, %16
br i1 %17, label %6, label %18
18: ; preds = %6, %10
%19 = phi i32 [ 0, %10 ], [ 1, %6 ]
ret i32 %19
}
void dd_pbl_ios_testflight_pass_checkpoint(const char *checkpoint_name) {}


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

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

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

LLVM IR (-O2):
define void @dd_pbl_ios_testflight_pass_checkpoint(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ backpage(int, int);
int /*<<< orphan*/ nextwind(int /*<<< orphan*/, int);
int /*<<< orphan*/ prevwind(int /*<<< orphan*/, int);
nextup(int f, int n) {
  nextwind(0, 1);
  backpage(f, n);
  prevwind(0, 1);
}


x86 assembly (clang, -O0):
<nextup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <nextwind@plt>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%esi
call   1040 <backpage@plt>
xor    %edi,%edi
mov    $0x1,%esi
call   1050 <prevwind@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nextup>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <nextwind@plt>
mov    %ebp,%edi
mov    %ebx,%esi
call   1040 <backpage@plt>
xor    %edi,%edi
mov    $0x1,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <prevwind@plt>

LLVM IR (-O0):
define i32 @nextup(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 @nextwind(i32 0, i32 1)
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = call i32 @backpage(i32 %7, i32 %8)
%10 = call i32 @prevwind(i32 0, i32 1)
%11 = load i32, i32* %3
ret i32 %11
}

LLVM IR (-O2):
define i32 @nextup(i32 %0, i32 %1) {
%3 = tail call i32 @nextwind(i32 0, i32 1)
%4 = tail call i32 @backpage(i32 %0, i32 %1)
%5 = tail call i32 @prevwind(i32 0, i32 1)
ret i32 undef
}
int sample_function(int a, int b, int *pResult) {
  *pResult = a + b;
  return 0;
}


x86 assembly (clang, -O0):
<sample_function>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%ecx
add    -0x8(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sample_function>:
add    %esi,%edi
mov    %edi,(%rdx)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @sample_function(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = add nsw i32 %1, %0
store i32 %4, i32* %2
ret i32 0
}
/* Variables and functions */
int geteuid();
int getuid();
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char *argv[]) {
  printf("uid = %d, euid = %d\n", getuid(), geteuid());
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <getuid@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <geteuid@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <getuid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <geteuid@plt>
lea    0xeb8(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [21 x i8] c"uid = %d, euid = %d\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 = call i32 (...) @getuid()
%7 = call i32 (...) @geteuid()
%8 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [21 x i8] c"uid = %d, euid = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @getuid()
%4 = tail call i32 (...) @geteuid()
%5 = tail call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i32 %3, i32 %4)
ret i32 0
}
/* Type definitions */
typedef int uint64_t;
struct timeval {
  int tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int gettimeofday(struct timeval *, int /*<<< orphan*/ *);
uint64_t get_tstamp(void) {
  struct timeval tv;
  int res;
  uint64_t rv;
  res = gettimeofday(&tv, NULL);
  assert(res == 0);
  rv = (tv.tv_sec * 1000) + tv.tv_usec / 1000;
}


x86 assembly (clang, -O0):
<get_tstamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
imul   $0x3e8,-0x10(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tstamp>:
push   %rax
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
pop    %rax
jmp    1040 <assert@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i32 }
define i32 @get_tstamp() {
%1 = alloca i32
%2 = alloca %struct.timeval
%3 = alloca i32
%4 = alloca i32
%5 = call i32 @gettimeofday(%struct.timeval* %2, i32* null)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp eq i32 %6, 0
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 0
%11 = load i32, i32* %10
%12 = mul nsw i32 %11, 1000
%13 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i32 0, i32 1
%14 = load i32, i32* %13
%15 = sdiv i32 %14, 1000
%16 = add nsw i32 %12, %15
store i32 %16, i32* %4
%17 = load i32, i32* %1
ret i32 %17
}

LLVM IR (-O2):
%struct.timeval = type { i32, i32 }
define i32 @get_tstamp() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
ret i32 undef
}
void main() {
  int x;
L1:
  if (x) {
    goto L2;
  } else {
    goto L3;
  }
L2:
  if (x) {
    goto L3;
  } else {
    goto L4;
  }
L3:
  if (x) {
    goto L4;
  } else {
    goto L5;
  }
L4:
  if (x) {
    goto L5;
  } else {
    goto L1;
  }
L5:
  if (x) {
    goto L1;
  } else {
    goto L2;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
cmpl   $0x0,-0x4(%rbp)
je     1113 <main+0x13>
jmp    1118 <main+0x18>
jmp    112c <main+0x2c>
cmpl   $0x0,-0x4(%rbp)
je     1127 <main+0x27>
jmp    112c <main+0x2c>
jmp    1140 <main+0x40>
cmpl   $0x0,-0x4(%rbp)
je     113b <main+0x3b>
jmp    1140 <main+0x40>
jmp    1154 <main+0x54>
cmpl   $0x0,-0x4(%rbp)
je     114f <main+0x4f>
jmp    1154 <main+0x54>
jmp    1104 <main+0x4>
cmpl   $0x0,-0x4(%rbp)
je     1163 <main+0x63>
jmp    1104 <main+0x4>
jmp    1118 <main+0x18>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

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

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
void XcmsAddFunctionSet() {}


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

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

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

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