xunge/DecIR huggingface dataset:
int main() {
  fun\U000000e7\U000000e3o1();
  done();
  fun\U000000e7\U000000e3o2();
  my_fun\U000000e7\U000000e3o();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <função1@plt>
mov    $0x0,%al
call   1040 <done@plt>
mov    $0x0,%al
call   1050 <função2@plt>
mov    $0x0,%al
call   1030 <my_função@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <função1@plt>
xor    %eax,%eax
call   1040 <done@plt>
xor    %eax,%eax
call   1050 <função2@plt>
xor    %eax,%eax
call   1030 <my_função@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @"fun\C3\A7\C3\A3o1"()
%3 = call i32 (...) @done()
%4 = call i32 (...) @"fun\C3\A7\C3\A3o2"()
%5 = call i32 (...) @"my_fun\C3\A7\C3\A3o"()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @"fun\C3\A7\C3\A3o1"()
%2 = tail call i32 (...) @done()
%3 = tail call i32 (...) @"fun\C3\A7\C3\A3o2"()
%4 = tail call i32 (...) @"my_fun\C3\A7\C3\A3o"()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ quick_sortR(int *, int /*<<< orphan*/, int);
void t_quick_sort(int n, int tab[]) { quick_sortR(tab, 0, n - 1); }


x86 assembly (clang, -O0):
<t_quick_sort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
sub    $0x1,%edx
xor    %esi,%esi
call   1030 <quick_sortR@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_quick_sort>:
lea    -0x1(%rdi),%edx
mov    %rsi,%rdi
xor    %esi,%esi
jmp    1030 <quick_sortR@plt>

LLVM IR (-O0):
define void @t_quick_sort(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %3
%7 = sub nsw i32 %6, 1
%8 = call i32 @quick_sortR(i32* %5, i32 0, i32 %7)
ret void
}

LLVM IR (-O2):
define void @t_quick_sort(i32 %0, i32* %1) {
%3 = add nsw i32 %0, -1
%4 = tail call i32 @quick_sortR(i32* %1, i32 0, i32 %3)
ret void
}
int test_bit(int nr, void *addr) {
  unsigned int *p = (unsigned int *)addr;
  return ((p[nr >> 5] >> (nr & 0x1f)) & 1) != 0;
}


x86 assembly (clang, -O0):
<test_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x4(%rbp),%ecx
sar    $0x5,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x4(%rbp),%ecx
and    $0x1f,%ecx
shr    %cl,%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_bit>:
mov    %edi,%ecx
mov    %edi,%eax
sar    $0x5,%eax
cltq
mov    (%rsi,%rax,4),%eax
shr    %cl,%eax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @test_bit(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = bitcast i8* %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %5
%9 = load i32, i32* %3
%10 = ashr i32 %9, 5
%11 = sext i32 %10 to i64
%12 = getelementptr inbounds i32, i32* %8, i64 %11
%13 = load i32, i32* %12
%14 = load i32, i32* %3
%15 = and i32 %14, 31
%16 = lshr i32 %13, %15
%17 = and i32 %16, 1
%18 = icmp ne i32 %17, 0
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @test_bit(i32 %0, i8* nocapture %1) {
%3 = bitcast i8* %1 to i32*
%4 = ashr i32 %0, 5
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i32, i32* %3, i64 %5
%7 = load i32, i32* %6
%8 = and i32 %0, 31
%9 = lshr i32 %7, %8
%10 = and i32 %9, 1
ret i32 %10
}
int ti_min_start(double const *options) { return (int)options[0] - 1; }


x86 assembly (clang, -O0):
<ti_min_start>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvttsd2si (%rax),%eax
sub    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ti_min_start>:
cvttsd2si (%rdi),%eax
add    $0xffffffff,%eax
ret

LLVM IR (-O0):
define i32 @ti_min_start(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = fptosi double %5 to i32
%7 = sub nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @ti_min_start(double* nocapture %0) {
%2 = load double, double* %0
%3 = fptosi double %2 to i32
%4 = add nsw i32 %3, -1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bit_hl(int);
void opcb_7e() { bit_hl(7); }


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

x86 assembly (clang, -O2):
<opcb_7e>:
mov    $0x7,%edi
jmp    1030 <bit_hl@plt>

LLVM IR (-O0):
define void @opcb_7e() {
%1 = call i32 @bit_hl(i32 7)
ret void
}

LLVM IR (-O2):
define void @opcb_7e() {
%1 = tail call i32 @bit_hl(i32 7)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fileno(int /*<<< orphan*/);
int read(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stdin;
int gsdll_stdin(void *instance, char *buf, int len) {
  return read(fileno(stdin), buf, len);
}


x86 assembly (clang, -O0):
<gsdll_stdin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
call   1040 <fileno@plt>
mov    %eax,%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gsdll_stdin>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
mov    %rsi,%rbx
mov    0x2eb9(%rip),%rax
mov    (%rax),%edi
call   1040 <fileno@plt>
mov    %eax,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <read@plt>

LLVM IR (-O0):
@stdin = global i32 0
define i32 @gsdll_stdin(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 i32, i32* @stdin
%8 = call i32 @fileno(i32 %7)
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @read(i32 %8, i8* %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @gsdll_stdin(i8* nocapture readnone %0, i8* nocapture %1, i32 %2) {
%4 = load i32, i32* @stdin
%5 = tail call i32 @fileno(i32 %4)
%6 = tail call i32 @read(i32 %5, i8* %1, i32 %2)
ret i32 %6
}
void security_inode_free(struct inode *inode) {}


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

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

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

LLVM IR (-O2):
%struct.inode = type opaque
define void @security_inode_free(%struct.inode* nocapture %0) {
ret void
}
/* Variables and functions */
char *malloc(size_t);
char *memcpy(char *, char const *, size_t);
size_t strlen(char const *);
char *__strdup(const char *s) {
  size_t l = strlen(s);
  char *d = malloc(l + 1);
  if (!d)
    return NULL;
  return memcpy(d, s, l + 1);
}


x86 assembly (clang, -O0):
<__strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1172 <__strdup+0x42>
movq   $0x0,-0x8(%rbp)
jmp    118b <__strdup+0x5b>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
add    $0x1,%rdx
call   1040 <memcpy@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__strdup>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %rax,%rbx
add    $0x1,%rbx
mov    %rbx,%rdi
call   1050 <malloc@plt>
mov    %rax,%r15
test   %rax,%rax
je     1162 <__strdup+0x32>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
call   1040 <memcpy@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @__strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i64 @strlen(i8* %6)
store i64 %7, i64* %4
%8 = load i64, i64* %4
%9 = add i64 %8, 1
%10 = call i8* @malloc(i64 %9)
store i8* %10, i8** %5
%11 = load i8*, i8** %5
%12 = icmp ne i8* %11, null
br i1 %12, label %14, label %13
13: ; preds = %1
store i8* null, i8** %2
br label %20
14: ; preds = %1
%15 = load i8*, i8** %5
%16 = load i8*, i8** %3
%17 = load i64, i64* %4
%18 = add i64 %17, 1
%19 = call i8* @memcpy(i8* %15, i8* %16, i64 %18)
store i8* %19, i8** %2
br label %20
20: ; preds = %14, %13
%21 = load i8*, i8** %2
ret i8* %21
}

LLVM IR (-O2):
define noalias i8* @__strdup(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %1
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 %4, i8* align 1 %0, i64 %3, i1 false)
br label %7
7: ; preds = %1, %6
ret i8* %4
}
/* Variables and functions */
double geom_l2distance(int, double const *, double const *);
double distance(void *user_data, const void *p1, const void *p2) {
  return geom_l2distance((128), (const double *)p1, (const double *)p2);
}


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

x86 assembly (clang, -O2):
<distance>:
mov    $0x80,%edi
jmp    1030 <geom_l2distance@plt>

LLVM IR (-O0):
define double @distance(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = bitcast i8* %7 to double*
%9 = load i8*, i8** %6
%10 = bitcast i8* %9 to double*
%11 = call double @geom_l2distance(i32 128, double* %8, double* %10)
ret double %11
}

LLVM IR (-O2):
define double @distance(i8* nocapture readnone %0, i8* %1, i8* %2) {
%4 = bitcast i8* %1 to double*
%5 = bitcast i8* %2 to double*
%6 = tail call double @geom_l2distance(i32 128, double* %4, double* %5)
ret double %6
}
void copy_mem(unsigned char *dst, unsigned char *src, unsigned int size) {
  *((unsigned char *)0x2181) = (((unsigned long)dst)) & 0xff;
  *((unsigned char *)0x2182) = ((((unsigned long)dst)) >> 8) & 0xff;
  *((unsigned char *)0x2183) = ((((unsigned long)dst)) >> 16) & 0xff;
  ;
  *((unsigned short *)(0x4300 | ((7) << 4))) = (0x8000);
  ;
  *((void **)(0x4302 | ((7) << 4))) = ((unsigned char *)src);
  ;
  *((unsigned short *)(0x4305 | ((7) << 4))) = (size);
  ;
  *((unsigned char *)0x420b) = (1 << 7);
  ;
}


x86 assembly (clang, -O0):
<copy_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    %al,%cl
mov    $0x2181,%eax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
and    $0xff,%rax
mov    %al,%cl
mov    $0x2182,%eax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
shr    $0x10,%rax
and    $0xff,%rax
mov    %al,%cl
mov    $0x2183,%eax
mov    %cl,(%rax)
mov    $0x4370,%eax
movw   $0x8000,(%rax)
mov    -0x10(%rbp),%rcx
mov    $0x4372,%eax
mov    %rcx,(%rax)
mov    -0x14(%rbp),%eax
mov    %ax,%cx
mov    $0x4375,%eax
mov    %cx,(%rax)
mov    $0x420b,%eax
movb   $0x80,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_mem>:
mov    %rdi,%rax
mov    %al,0x2181
mov    %ah,0x2182
shr    $0x10,%rax
mov    %al,0x2183
movw   $0x8000,0x4370
mov    %rsi,0x4372
mov    %dx,0x4375
movb   $0x80,0x420b
80
ret

LLVM IR (-O0):
define void @copy_mem(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 = ptrtoint i8* %7 to i64
%9 = and i64 %8, 255
%10 = trunc i64 %9 to i8
store i8 %10, i8* inttoptr (i64 8577 to i8*)
%11 = load i8*, i8** %4
%12 = ptrtoint i8* %11 to i64
%13 = lshr i64 %12, 8
%14 = and i64 %13, 255
%15 = trunc i64 %14 to i8
store i8 %15, i8* inttoptr (i64 8578 to i8*)
%16 = load i8*, i8** %4
%17 = ptrtoint i8* %16 to i64
%18 = lshr i64 %17, 16
%19 = and i64 %18, 255
%20 = trunc i64 %19 to i8
store i8 %20, i8* inttoptr (i64 8579 to i8*)
store i16 -32768, i16* inttoptr (i64 17264 to i16*)
%21 = load i8*, i8** %5
store i8* %21, i8** inttoptr (i64 17266 to i8**)
%22 = load i32, i32* %6
%23 = trunc i32 %22 to i16
store i16 %23, i16* inttoptr (i64 17269 to i16*)
store i8 -128, i8* inttoptr (i64 16907 to i8*)
ret void
}

LLVM IR (-O2):
define void @copy_mem(i8* %0, i8* %1, i32 %2) {
%4 = ptrtoint i8* %0 to i64
%5 = trunc i64 %4 to i8
store i8 %5, i8* inttoptr (i64 8577 to i8*)
%6 = lshr i64 %4, 8
%7 = trunc i64 %6 to i8
store i8 %7, i8* inttoptr (i64 8578 to i8*)
%8 = lshr i64 %4, 16
%9 = trunc i64 %8 to i8
store i8 %9, i8* inttoptr (i64 8579 to i8*)
store i16 -32768, i16* inttoptr (i64 17264 to i16*)
store i8* %1, i8** inttoptr (i64 17266 to i8**)
%10 = trunc i32 %2 to i16
store i16 %10, i16* inttoptr (i64 17269 to i16*)
store i8 -128, i8* inttoptr (i64 16907 to i8*)
ret void
}
/* Variables and functions */
scalar_t__ isnumchar(char);
int leftNumIndex(char str[200], int start) {
  int i = start - 1;
  while (isnumchar(str[i])) {
    i--;
  }
  return i + 1;
}


x86 assembly (clang, -O0):
<leftNumIndex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1030 <isnumchar@plt>
cmp    $0x0,%rax
je     1151 <leftNumIndex+0x41>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1128 <leftNumIndex+0x18>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<leftNumIndex>:
push   %rbp
push   %rbx
push   %rax
movslq %esi,%rax
lea    0x1(%rax),%ebp
lea    (%rax,%rdi,1),%rbx
add    $0xffffffffffffffff,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsbl (%rbx),%edi
call   1030 <isnumchar@plt>
add    $0xffffffff,%ebp
add    $0xffffffffffffffff,%rbx
test   %rax,%rax
jne    1130 <leftNumIndex+0x20>
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @leftNumIndex(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %6, %4 ], [ %3, %2 ]
%6 = add nsw i64 %5, -1
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = tail call i64 @isnumchar(i8 signext %8)
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4
%12 = trunc i64 %5 to i32
ret i32 %12
}
int increase_with_restrict(int *restrict a, int *restrict b, int *restrict c) {
  *a = *a + *c;
  *b = *b + *c;
}


x86 assembly (clang, -O0):
<increase_with_restrict>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
add    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    -0x20(%rbp),%rax
add    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<increase_with_restrict>:
mov    (%rdx),%eax
add    %eax,(%rdi)
add    %eax,(%rsi)
ret

LLVM IR (-O0):
define i32 @increase_with_restrict(i32* noalias %0, i32* noalias %1, i32* noalias %2) {
%4 = alloca i32
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i32* %2, i32** %7
%8 = load i32*, i32** %5
%9 = load i32, i32* %8
%10 = load i32*, i32** %7
%11 = load i32, i32* %10
%12 = add nsw i32 %9, %11
%13 = load i32*, i32** %5
store i32 %12, i32* %13
%14 = load i32*, i32** %6
%15 = load i32, i32* %14
%16 = load i32*, i32** %7
%17 = load i32, i32* %16
%18 = add nsw i32 %15, %17
%19 = load i32*, i32** %6
store i32 %18, i32* %19
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
define i32 @increase_with_restrict(i32* noalias nocapture %0, i32* noalias nocapture %1, i32* noalias nocapture %2) {
%4 = load i32, i32* %0
%5 = load i32, i32* %2
%6 = add nsw i32 %5, %4
store i32 %6, i32* %0
%7 = load i32, i32* %1
%8 = add nsw i32 %7, %5
store i32 %8, i32* %1
ret i32 undef
}
/* Variables and functions */
long func();
int main() {
  long a = func();
  long b = func();
  return a == b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <func@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <func@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1030 <func@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <func@plt>
xor    %ecx,%ecx
cmp    %rax,%rbx
sete   %cl
mov    %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
store i32 0, i32* %1
%4 = call i64 (...) @func()
store i64 %4, i64* %2
%5 = call i64 (...) @func()
store i64 %5, i64* %3
%6 = load i64, i64* %2
%7 = load i64, i64* %3
%8 = icmp eq i64 %6, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 (...) @func()
%2 = tail call i64 (...) @func()
%3 = icmp eq i64 %1, %2
%4 = zext i1 %3 to i32
ret i32 %4
}
int sha512_test(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @sha512_test() {
ret i32 2
}

LLVM IR (-O2):
define i32 @sha512_test() {
ret i32 2
}
int fn7(int x, int y) {
  int tem1 = y ^ ~x;
  int tem2 = x | y;
  return tem1 & tem2;
}


x86 assembly (clang, -O0):
<fn7>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x4(%rbp),%ecx
xor    $0xffffffff,%ecx
xor    %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn7>:
mov    %edi,%eax
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @fn7(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = xor i32 %8, -1
%10 = xor i32 %7, %9
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = or i32 %11, %12
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = and i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @fn7(i32 %0, i32 %1) {
%3 = and i32 %1, %0
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int8_t;

/* Variables and functions */
char *itob(int /*<<< orphan*/, int, char *);
char *int8tob(int8_t in, char *out) { return itob(in, 8, out); }


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

x86 assembly (clang, -O2):
<int8tob>:
mov    %rsi,%rdx
mov    $0x8,%esi
jmp    1030 <itob@plt>

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

LLVM IR (-O2):
define i8* @int8tob(i32 %0, i8* %1) {
%3 = tail call i8* @itob(i32 %0, i32 8, i8* %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int sum_array(int *, int);
int main(void) {
  int array[3] = {1, 2, 3};
  printf("sum: %d\n", sum_array(array, 3));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec8(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x3,%esi
call   1030 <sum_array@plt>
mov    %eax,%esi
lea    0xeb2(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xede(%rip),%eax
mov    %eax,0x10(%rsp)
mov    0xecb(%rip),%rax
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rdi
mov    $0x3,%esi
call   1030 <sum_array@plt>
lea    0xebc(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [3 x i32] [i32 1, i32 2, i32 3]
@.str = [9 x i8] c"sum: %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i32]
store i32 0, i32* %1
%3 = bitcast [3 x i32]* %2 to i8*
%4 = getelementptr inbounds [3 x i32], [3 x i32]* %2, i64 0, i64 0
%5 = call i32 @sum_array(i32* %4, i32 3)
%6 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [3 x i32] [i32 1, i32 2, i32 3]
@.str = [9 x i8] c"sum: %d\0A\00"
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
%3 = getelementptr inbounds [3 x i32], [3 x i32]* %1, i64 0, i64 0
%4 = call i32 @sum_array(i32* %3, i32 3)
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar_framebuffer_wob(char *);
int kputchar(char c) {
  putchar_framebuffer_wob(&c);
  return 1;
}


x86 assembly (clang, -O0):
<kputchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    -0x1(%rbp),%rdi
call   1030 <putchar_framebuffer_wob@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kputchar>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%rdi
call   1030 <putchar_framebuffer_wob@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @kputchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @putchar_framebuffer_wob(i8* %2)
ret i32 1
}

LLVM IR (-O2):
define i32 @kputchar(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @putchar_framebuffer_wob(i8* %2)
ret i32 1
}
void set_bit(unsigned int nr, volatile unsigned long *addr) {
  if ((__builtin_constant_p(nr))) {
    asm volatile("\n\tlock; "
                 "orb %1,%0"
                 : "+m"(*(volatile long *)((void *)(addr) + ((nr) >> 3)))
                 : "iq"((unsigned char)(1 << ((nr)&7)))
                 : "memory");
  } else {
    asm volatile("\n\tlock; "
                 "bts %1,%0"
                 : "+m"(*(volatile long *)(addr))
                 : "Ir"(nr)
                 : "memory");
  }
}


x86 assembly (clang, -O0):
<set_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%ecx
lock bts %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_bit>:
lock bts %edi,(%rsi)
ret

LLVM IR (-O0):
define void @set_bit(i32 %0, i64* %1) {
%3 = alloca i32
%4 = alloca i64*
store i32 %0, i32* %3
store i64* %1, i64** %4
%5 = load i32, i32* %3
%6 = call i1 @llvm.is.constant.i32(i32 %5)
br i1 %6, label %7, label %19
7: ; preds = %2
%8 = load i64*, i64** %4
%9 = bitcast i64* %8 to i8*
%10 = load i32, i32* %3
%11 = lshr i32 %10, 3
%12 = zext i32 %11 to i64
%13 = getelementptr i8, i8* %9, i64 %12
%14 = bitcast i8* %13 to i64*
%15 = load i32, i32* %3
%16 = and i32 %15, 7
%17 = shl i32 1, %16
%18 = trunc i32 %17 to i8
br label %22
19: ; preds = %2
%20 = load i64*, i64** %4
%21 = load i32, i32* %3
br label %22
22: ; preds = %19, %7
ret void
}

LLVM IR (-O2):
define void @set_bit(i32 %0, i64* %1) {
tail call void asm sideeffect "\0A\09lock; bts $1,$0", "=*m,Ir,*m,~{memory},~{dirflag},~{fpsr},~{flags}"(i64* elementtype(i64) %1, i32 %0, i64* elementtype(i64) %1)
ret void
}
void putfoo(struct foo *foop) {}


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

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

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

LLVM IR (-O2):
%struct.foo = type opaque
define void @putfoo(%struct.foo* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uid_t;

/* Variables and functions */
int /*<<< orphan*/ setenv(char *, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, int);
void fsfr_set_uid(char *name, uid_t uid) {
  char buff[22];
  sprintf(buff, "%i", uid);
  setenv(name, buff, 1);
}


x86 assembly (clang, -O0):
<fsfr_set_uid>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
lea    -0x30(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xec3(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x30(%rbp),%rsi
mov    $0x1,%edx
call   1030 <setenv@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsfr_set_uid>:
push   %r14
push   %rbx
sub    $0x18,%rsp
mov    %esi,%edx
mov    %rdi,%rbx
lea    0xecd(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%edx
call   1030 <setenv@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%i\00"
define void @fsfr_set_uid(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca [22 x i8]
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = getelementptr inbounds [22 x i8], [22 x i8]* %5, i64 0, i64 0
%7 = load i32, i32* %4
%8 = call i32 @sprintf(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %7)
%9 = load i8*, i8** %3
%10 = getelementptr inbounds [22 x i8], [22 x i8]* %5, i64 0, i64 0
%11 = call i32 @setenv(i8* %9, i8* %10, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
define void @fsfr_set_uid(i8* %0, i32 %1) {
%3 = alloca [22 x i8]
%4 = getelementptr inbounds [22 x i8], [22 x i8]* %3, i64 0, i64 0
%5 = call i32 @sprintf(i8* %4, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = call i32 @setenv(i8* %0, i8* %4, i32 1)
ret void
}
void log_reopen() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ localtime_r(int /*<<< orphan*/ *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void getCurrentTime(struct tm *result) {
  time_t currentunixtime;
  time(&currentunixtime);
  localtime_r(&currentunixtime, result);
}


x86 assembly (clang, -O0):
<getCurrentTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
call   1040 <time@plt>
mov    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdi
call   1030 <localtime_r@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getCurrentTime>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <time@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <localtime_r@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define void @getCurrentTime(%struct.tm* %0) {
%2 = alloca %struct.tm*
%3 = alloca i32
store %struct.tm* %0, %struct.tm** %2
%4 = call i32 @time(i32* %3)
%5 = load %struct.tm*, %struct.tm** %2
%6 = call i32 @localtime_r(i32* %3, %struct.tm* %5)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
define void @getCurrentTime(%struct.tm* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @time(i32* %2)
%5 = call i32 @localtime_r(i32* %2, %struct.tm* %0)
ret void
}
void security_file_free(struct file *file) {}


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

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

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

LLVM IR (-O2):
%struct.file = type opaque
define void @security_file_free(%struct.file* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ find(char *);
void find_index_large_test() {
  find("benchmarks"
       ".index.large");
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"benchmarks.index.large\00"
define void @find_index_large_test() {
%1 = call i32 @find(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"benchmarks.index.large\00"
define void @find_index_large_test() {
%1 = tail call i32 @find(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
int foo(int len) {
  char array[1000];
  bzero(array, len);
  return 0;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1030 <bzero@plt>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @foo(i32 %0) {
%2 = alloca i32
%3 = alloca [1000 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [1000 x i8], [1000 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @bzero(i8* %4, i32 %5)
ret i32 0
}

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 0
}
void MSP430TimerM$CompareB1$fired(void) {
  MSP430TimerM$CompareB1$default$fired();
}


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

x86 assembly (clang, -O2):
<MSP430TimerM$CompareB1$fired>:
xor    %eax,%eax
jmp    1030 <MSP430TimerM$CompareB1$default$fired@plt>

LLVM IR (-O0):
define void @"MSP430TimerM$CompareB1$fired"() {
%1 = call i32 (...) @"MSP430TimerM$CompareB1$default$fired"()
ret void
}

LLVM IR (-O2):
define void @"MSP430TimerM$CompareB1$fired"() {
%1 = tail call i32 (...) @"MSP430TimerM$CompareB1$default$fired"()
ret void
}
int nor(int register2, int register3) { return (~(register2 | register3)); }


x86 assembly (clang, -O0):
<nor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
or     -0x8(%rbp),%eax
xor    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nor>:
mov    %edi,%eax
or     %esi,%eax
not    %eax
ret

LLVM IR (-O0):
define i32 @nor(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 = or i32 %5, %6
%8 = xor i32 %7, -1
ret i32 %8
}

LLVM IR (-O2):
define i32 @nor(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = xor i32 %3, -1
ret i32 %4
}
/* Type definitions */
struct eembed_log {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ eembed_sprintf_append(struct eembed_log *, char *,
                                         long double);
void eembed_sprintf_append_f(struct eembed_log *log, long double f) {
  eembed_sprintf_append(log, "%Lg", f);
}


x86 assembly (clang, -O0):
<eembed_sprintf_append_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
fldt   0x10(%rbp)
mov    %rdi,-0x8(%rbp)
fstpt  -0x20(%rbp)
mov    -0x8(%rbp),%rdi
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
lea    0xecb(%rip),%rsi
call   1030 <eembed_sprintf_append@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eembed_sprintf_append_f>:
lea    0xee9(%rip),%rsi
jmp    1030 <eembed_sprintf_append@plt>

LLVM IR (-O0):
%struct.eembed_log = type { i32 }
@.str = [4 x i8] c"%Lg\00"
define void @eembed_sprintf_append_f(%struct.eembed_log* %0, x86_fp80 %1) {
%3 = alloca %struct.eembed_log*
%4 = alloca x86_fp80
store %struct.eembed_log* %0, %struct.eembed_log** %3
store x86_fp80 %1, x86_fp80* %4
%5 = load %struct.eembed_log*, %struct.eembed_log** %3
%6 = load x86_fp80, x86_fp80* %4
%7 = call i32 @eembed_sprintf_append(%struct.eembed_log* %5, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %6)
ret void
}

LLVM IR (-O2):
%struct.eembed_log = type { i32 }
@.str = [4 x i8] c"%Lg\00"
define void @eembed_sprintf_append_f(%struct.eembed_log* %0, x86_fp80 %1) {
%3 = tail call i32 @eembed_sprintf_append(%struct.eembed_log* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fread(void *, int, int, int /*<<< orphan*/ *);
int Sys_StreamedRead(void *buffer, int size, int count, FILE *f) {
  return fread(buffer, size, count, f);
}


x86 assembly (clang, -O0):
<Sys_StreamedRead>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x18(%rbp),%rcx
call   1030 <fread@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Sys_StreamedRead>:
jmp    1030 <fread@plt>

LLVM IR (-O0):
define i32 @Sys_StreamedRead(i8* %0, i32 %1, i32 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load i32*, i32** %8
%13 = call i32 @fread(i8* %9, i32 %10, i32 %11, i32* %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @Sys_StreamedRead(i8* nocapture %0, i32 %1, i32 %2, i32* nocapture %3) {
%5 = tail call i32 @fread(i8* %0, i32 %1, i32 %2, i32* %3)
ret i32 %5
}
unsigned long long lsb(unsigned long long mask) { return mask & (0 - mask); }


x86 assembly (clang, -O0):
<lsb>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
xor    %ecx,%ecx
sub    -0x8(%rbp),%rcx
and    %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i64 @lsb(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* %2
%5 = sub i64 0, %4
%6 = and i64 %3, %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @lsb(i64 %0) {
%2 = sub i64 0, %0
%3 = and i64 %2, %0
ret i64 %3
}
void target_before_init_debug(void) { return; }


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

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

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

LLVM IR (-O2):
define void @target_before_init_debug() {
ret void
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, size_t);
void *calloc(size_t n, size_t size) {
  char *ptr = malloc(n * size);
  if (!ptr)
    return NULL;
  memset(ptr, 0, n * size);
  return (void *)ptr;
}


x86 assembly (clang, -O0):
<calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
imul   -0x18(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    115a <calloc+0x3a>
movq   $0x0,-0x8(%rbp)
jmp    1176 <calloc+0x56>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rdx
imul   -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <malloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1148 <calloc+0x28>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
br label %8
8: ; preds = %2, %6
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void recurse() {
  char *s = "Hurrey, I am learning recursion!";
  printf("%s\n", s);
  recurse();
}


x86 assembly (clang, -O0):
<recurse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xee3(%rip),%rdi
call   1040 <printf@plt>
call   1030 <recurse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recurse>:
push   %r14
push   %rbx
push   %rax
lea    0xf06(%rip),%r14
lea    0xede(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
jmp    1130 <recurse+0x20>

LLVM IR (-O0):
@.str = [33 x i8] c"Hurrey, I am learning recursion!\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @recurse() {
%1 = alloca i8*
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i8*, i8** %1
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"Hurrey, I am learning recursion!\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @recurse() {
br label %1
1: ; preds = %1, %0
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %1
}
long long r11(void *x) { return *(long long *)(x + 32757); }


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

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

LLVM IR (-O0):
define i64 @r11(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr i8, i8* %3, i64 32757
%5 = bitcast i8* %4 to i64*
%6 = load i64, i64* %5
ret i64 %6
}

LLVM IR (-O2):
define i64 @r11(i8* nocapture %0) {
%2 = getelementptr i8, i8* %0, i64 32757
%3 = bitcast i8* %2 to i64*
%4 = load i64, i64* %3
ret i64 %4
}
void breakpoint_hw_clone(struct task *task) { (void)task; }


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

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

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

LLVM IR (-O2):
%struct.task = type opaque
define void @breakpoint_hw_clone(%struct.task* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ stdout;
int /*<<< orphan*/ vfprintf(int /*<<< orphan*/, char const *,
                            int /*<<< orphan*/);
void fprint_message_to_stdout(const char *format, va_list arg_ptr) {
  (void)vfprintf(stdout, format, arg_ptr);
}


x86 assembly (clang, -O0):
<fprint_message_to_stdout>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <vfprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprint_message_to_stdout>:
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
jmp    1030 <vfprintf@plt>

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

LLVM IR (-O2):
@stdout = global i32 0
define void @fprint_message_to_stdout(i8* %0, i32 %1) {
%3 = load i32, i32* @stdout
%4 = tail call i32 @vfprintf(i32 %3, i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Drive(int, int);
int /*<<< orphan*/ wait1Msec(int);
void DriveTime(int move, int rotate1, int mSec) {
  Drive(move, rotate1);
  wait1Msec(mSec);
  Drive(0, 0);
}


x86 assembly (clang, -O0):
<DriveTime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <Drive@plt>
mov    -0xc(%rbp),%edi
call   1040 <wait1Msec@plt>
xor    %esi,%esi
mov    %esi,%edi
call   1030 <Drive@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DriveTime>:
push   %rbx
mov    %edx,%ebx
call   1030 <Drive@plt>
mov    %ebx,%edi
call   1040 <wait1Msec@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rbx
jmp    1030 <Drive@plt>

LLVM IR (-O0):
define void @DriveTime(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 = call i32 @Drive(i32 %7, i32 %8)
%10 = load i32, i32* %6
%11 = call i32 @wait1Msec(i32 %10)
%12 = call i32 @Drive(i32 0, i32 0)
ret void
}

LLVM IR (-O2):
define void @DriveTime(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @Drive(i32 %0, i32 %1)
%5 = tail call i32 @wait1Msec(i32 %2)
%6 = tail call i32 @Drive(i32 0, i32 0)
ret void
}
/* Variables and functions */
int *mmod(int /*<<< orphan*/);
int /*<<< orphan*/ umod(int *);
int f(int *x) {
  (void)umod(mmod(umod(x)));
  return *x;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <umod@plt>
mov    %eax,%edi
call   1030 <mmod@plt>
mov    %rax,%rdi
call   1040 <umod@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
mov    %rdi,%rbx
call   1040 <umod@plt>
mov    %eax,%edi
call   1030 <mmod@plt>
mov    %rax,%rdi
call   1040 <umod@plt>
mov    (%rbx),%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @umod(i32* %3)
%5 = call i32* @mmod(i32 %4)
%6 = call i32 @umod(i32* %5)
%7 = load i32*, i32** %2
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @f(i32* %0) {
%2 = tail call i32 @umod(i32* %0)
%3 = tail call i32* @mmod(i32 %2)
%4 = tail call i32 @umod(i32* %3)
%5 = load i32, i32* %0
ret i32 %5
}
void ramster_cpu_up(int cpu) {}


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

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

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

LLVM IR (-O2):
define void @ramster_cpu_up(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ft_putchar(char);
int /*<<< orphan*/ ft_putstr(char *);
int main(int argc, char **argv) {
  int index;
  index = 1;
  while (index <= (argc - 1)) {
    ft_putstr(argv[index]);
    ft_putchar('\n');
    index++;
  }
  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)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
cmp    %ecx,%eax
jg     1177 <main+0x57>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1040 <ft_putstr@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    113d <main+0x1d>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
cmp    $0x2,%edi
jl     115c <main+0x3c>
mov    %rsi,%r14
mov    %edi,%r15d
mov    $0x1,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%r14,%rbx,8),%rdi
call   1040 <ft_putstr@plt>
mov    $0xa,%edi
call   1030 <ft_putchar@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1140 <main+0x20>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @ft_putstr(i8* %9)
%11 = tail call i32 @ft_putchar(i8 signext 10)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int wattrset(int /*<<< orphan*/ *, int);
int ncurses_wattrset(WINDOW *win, int attr) { return wattrset(win, attr); }


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

x86 assembly (clang, -O2):
<ncurses_wattrset>:
jmp    1030 <wattrset@plt>

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

LLVM IR (-O2):
define i32 @ncurses_wattrset(i32* %0, i32 %1) {
%3 = tail call i32 @wattrset(i32* %0, i32 %1)
ret i32 %3
}
void cpu_dmb(void) { __asm__ volatile("" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @cpu_dmb() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}