xunge/DecIR huggingface dataset:
/* Variables and functions */
int strlen(char *);
int name_score(char *name) {
  int score = 0;
  for (int i = 0; i < strlen(name); i++)
    score += (name[i] - '0') - 16;
  return score;
}


x86 assembly (clang, -O0):
<name_score>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
cmp    %ecx,%eax
jge    116c <name_score+0x5c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
sub    $0x30,%eax
sub    $0x10,%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112a <name_score+0x1a>
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<name_score>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1151 <name_score+0x41>
xor    %ebx,%ebx
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
movsbl (%r14,%rbx,1),%eax
add    %eax,%r15d
add    $0xffffffc0,%r15d
add    $0x1,%rbx
mov    %r14,%rdi
call   1030 <strlen@plt>
cltq
cmp    %rax,%rbx
jl     1130 <name_score+0x20>
jmp    1154 <name_score+0x44>
xor    %r15d,%r15d
mov    %r15d,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i32 @name_score(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %6, %1
%5 = phi i32 [ 0, %1 ], [ %13, %6 ]
ret i32 %5
6: ; preds = %1, %6
%7 = phi i64 [ %14, %6 ], [ 0, %1 ]
%8 = phi i32 [ %13, %6 ], [ 0, %1 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %7
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = add i32 %8, -64
%13 = add i32 %12, %11
%14 = add nuw nsw i64 %7, 1
%15 = tail call i32 @strlen(i8* %0)
%16 = sext i32 %15 to i64
%17 = icmp slt i64 %14, %16
br i1 %17, label %6, label %4
}
void foo068(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo068(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int rand();
int rand_range(int min_n, int max_n) {
  assert(min_n <= max_n);
  return rand() % (max_n - min_n + 1) + min_n;
}


x86 assembly (clang, -O0):
<rand_range>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
setle  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    $0x0,%al
call   1040 <rand@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rand_range>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %edi,%edi
sub    %ebp,%ebx
setge  %dil
call   1030 <assert@plt>
xor    %eax,%eax
call   1040 <rand@plt>
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @rand_range(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 = icmp sle i32 %5, %6
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = call i32 (...) @rand()
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = sub nsw i32 %11, %12
%14 = add nsw i32 %13, 1
%15 = srem i32 %10, %14
%16 = load i32, i32* %3
%17 = add nsw i32 %15, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @rand_range(i32 %0, i32 %1) {
%3 = icmp sge i32 %1, %0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 (...) @rand()
%7 = sub i32 1, %0
%8 = add i32 %7, %1
%9 = srem i32 %6, %8
%10 = add nsw i32 %9, %0
ret i32 %10
}
/* Type definitions */
struct mat2 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ mat2_inverse(float *, float *);
__attribute__((always_)) struct mat2 *psmat2_inverse(struct mat2 *result,
                                                     struct mat2 *m) {
  mat2_inverse((float *)result, (float *)m);
  return result;
}


x86 assembly (clang, -O0):
<psmat2_inverse>:
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 <mat2_inverse@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<psmat2_inverse>:
push   %rbx
mov    %rdi,%rbx
call   1030 <mat2_inverse@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.mat2 = type { i32 }
define %struct.mat2* @psmat2_inverse(%struct.mat2* %0, %struct.mat2* %1) {
%3 = alloca %struct.mat2*
%4 = alloca %struct.mat2*
store %struct.mat2* %0, %struct.mat2** %3
store %struct.mat2* %1, %struct.mat2** %4
%5 = load %struct.mat2*, %struct.mat2** %3
%6 = bitcast %struct.mat2* %5 to float*
%7 = load %struct.mat2*, %struct.mat2** %4
%8 = bitcast %struct.mat2* %7 to float*
%9 = call i32 @mat2_inverse(float* %6, float* %8)
%10 = load %struct.mat2*, %struct.mat2** %3
ret %struct.mat2* %10
}

LLVM IR (-O2):
%struct.mat2 = type { i32 }
define %struct.mat2* @psmat2_inverse(%struct.mat2* returned %0, %struct.mat2* %1) {
%3 = bitcast %struct.mat2* %0 to float*
%4 = bitcast %struct.mat2* %1 to float*
%5 = tail call i32 @mat2_inverse(float* %3, float* %4)
ret %struct.mat2* %0
}
/* Variables and functions */
int _tfsclose(int, char *);
int /*<<< orphan*/ monLock();
int /*<<< orphan*/ monUnlock();
int mon_tfsclose(int fd, char *info) {
  int ret;
  monLock();
  ret = _tfsclose(fd, info);
  monUnlock();
  return (ret);
}


x86 assembly (clang, -O0):
<mon_tfsclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <monLock@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <_tfsclose@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1040 <monUnlock@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mon_tfsclose>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <monLock@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <_tfsclose@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1040 <monUnlock@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @mon_tfsclose(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = call i32 (...) @monLock()
%7 = load i32, i32* %3
%8 = load i8*, i8** %4
%9 = call i32 @_tfsclose(i32 %7, i8* %8)
store i32 %9, i32* %5
%10 = call i32 (...) @monUnlock()
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @mon_tfsclose(i32 %0, i8* %1) {
%3 = tail call i32 (...) @monLock()
%4 = tail call i32 @_tfsclose(i32 %0, i8* %1)
%5 = tail call i32 (...) @monUnlock()
ret i32 %4
}
void basic(char *a) {
  a++;
  while (*a) {
    a++;
  }
}


x86 assembly (clang, -O0):
<basic>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1132 <basic+0x32>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1114 <basic+0x14>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @basic(i8* nocapture %0) {
ret void
}
/* Variables and functions */
char *b64encode(char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
char *base64encode(char *src) { return b64encode(src, strlen(src)); }


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

x86 assembly (clang, -O2):
<base64encode>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <b64encode@plt>

LLVM IR (-O0):
define i8* @base64encode(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i8* @b64encode(i8* %3, i32 %5)
ret i8* %6
}

LLVM IR (-O2):
define i8* @base64encode(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @b64encode(i8* %0, i32 %2)
ret i8* %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t reverseBits_std(uint32_t n) {
  uint32_t result = 0;
  int i;
  for (i = 0; i < 32; i++) {
    if ((n & (1 << i)))
      result |= 1 << (31 - i);
  }
  return result;
}


x86 assembly (clang, -O0):
<reverseBits_std>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x20,-0xc(%rbp)
jge    1161 <reverseBits_std+0x61>
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
cmp    $0x0,%eax
je     114e <reverseBits_std+0x4e>
mov    $0x1f,%ecx
sub    -0xc(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
or     -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    1153 <reverseBits_std+0x53>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1115 <reverseBits_std+0x15>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverseBits_std>:
xor    %r8d,%r8d
xor    %edx,%edx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
mov    $0x80000000,%esi
mov    %edx,%ecx
shr    %cl,%esi
bt     %edx,%edi
cmovae %r8d,%esi
or     %eax,%esi
lea    0x1(%rdx),%eax
movzbl %al,%ecx
mov    $0x80000000,%eax
shr    %cl,%eax
bt     %ecx,%edi
cmovae %r8d,%eax
or     %esi,%eax
add    $0x2,%edx
cmp    $0x20,%edx
jne    1110 <reverseBits_std+0x10>
ret

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

LLVM IR (-O2):
define i32 @reverseBits_std(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ 0, %1 ], [ %18, %2 ]
%4 = phi i32 [ 0, %1 ], [ %17, %2 ]
%5 = shl nuw i32 1, %3
%6 = and i32 %5, %0
%7 = icmp eq i32 %6, 0
%8 = lshr i32 -2147483648, %3
%9 = select i1 %7, i32 0, i32 %8
%10 = or i32 %9, %4
%11 = or i32 %3, 1
%12 = shl nuw i32 1, %11
%13 = and i32 %12, %0
%14 = icmp eq i32 %13, 0
%15 = lshr i32 -2147483648, %11
%16 = select i1 %14, i32 0, i32 %15
%17 = or i32 %16, %10
%18 = add nuw nsw i32 %3, 2
%19 = icmp eq i32 %18, 32
br i1 %19, label %20, label %2
20: ; preds = %2
ret i32 %17
}
/* Variables and functions */
int type1(int *, int, int /*<<< orphan*/);
int type(int *msgvec) { return (type1(msgvec, 1, 0)); }


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

x86 assembly (clang, -O2):
<type>:
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <type1@plt>

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

LLVM IR (-O2):
define i32 @type(i32* %0) {
%2 = tail call i32 @type1(i32* %0, i32 1, i32 0)
ret i32 %2
}
void *carre(void *arg) {
  long num = (long)arg;
  return (void *)(num * num);
}


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

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

LLVM IR (-O0):
define i8* @carre(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = load i64, i64* %3
%8 = mul nsw i64 %6, %7
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @carre(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = mul nsw i64 %2, %2
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main() {
  int i, j;
  int *p;
  p = &i;
  *p = 5;
  j = i;
  printf("%d %d %d\n", i, j, *p);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [10 x i8] c"%d %d %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 5, i32 5, i32 5)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void printUsage(char *programName) {
  printf("\n Usage: %s [Integer: 0 < Sleep Time < 50] \n\n", programName);
  exit(1);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"\0A Usage: %s [Integer: 0 < Sleep Time < 50] \0A\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [46 x i8] c"\0A Usage: %s [Integer: 0 < Sleep Time < 50] \0A\0A\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ mp_hal_disableTimer(int /*<<< orphan*/);
int /*<<< orphan*/ mp_hal_enableTimerAsTimer(int /*<<< orphan*/, int, int,
                                             int /*<<< orphan*/);
void testTimersSetup(void) {
  mp_hal_disableTimer(0);
  mp_hal_enableTimerAsTimer(0, 1000, 1000, 0);
}


x86 assembly (clang, -O0):
<testTimersSetup>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <mp_hal_disableTimer@plt>
xor    %ecx,%ecx
mov    $0x3e8,%edx
mov    %ecx,%edi
mov    %edx,%esi
call   1040 <mp_hal_enableTimerAsTimer@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testTimersSetup>:
push   %rax
xor    %edi,%edi
call   1030 <mp_hal_disableTimer@plt>
xor    %edi,%edi
mov    $0x3e8,%esi
mov    $0x3e8,%edx
xor    %ecx,%ecx
pop    %rax
jmp    1040 <mp_hal_enableTimerAsTimer@plt>

LLVM IR (-O0):
define void @testTimersSetup() {
%1 = call i32 @mp_hal_disableTimer(i32 0)
%2 = call i32 @mp_hal_enableTimerAsTimer(i32 0, i32 1000, i32 1000, i32 0)
ret void
}

LLVM IR (-O2):
define void @testTimersSetup() {
%1 = tail call i32 @mp_hal_disableTimer(i32 0)
%2 = tail call i32 @mp_hal_enableTimerAsTimer(i32 0, i32 1000, i32 1000, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ run_Tests(int /*<<< orphan*/, char *, char *,
                             int /*<<< orphan*/ *);
void *run_MT_Tests(void *arg) {
  run_Tests(0, (char *)arg, "none", NULL);
  return NULL;
}


x86 assembly (clang, -O0):
<run_MT_Tests>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %edi,%edi
lea    0xed7(%rip),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <run_Tests@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [5 x i8] c"none\00"
define i8* @run_MT_Tests(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @run_Tests(i32 0, i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* null)
ret i8* null
}

LLVM IR (-O2):
@.str = [5 x i8] c"none\00"
define noalias i8* @run_MT_Tests(i8* %0) {
%2 = tail call i32 @run_Tests(i32 0, i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32* null)
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ bus_i2c_init();
int /*<<< orphan*/ pulse_leds();
int main(int argc, char **argv) {
  bus_i2c_init();
  pulse_leds();
  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)
mov    $0x0,%al
call   1040 <bus_i2c_init@plt>
mov    $0x0,%al
call   1030 <pulse_leds@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <bus_i2c_init@plt>
xor    %eax,%eax
call   1030 <pulse_leds@plt>
xor    %eax,%eax
pop    %rcx
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 (...) @bus_i2c_init()
%7 = call i32 (...) @pulse_leds()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @bus_i2c_init()
%4 = tail call i32 (...) @pulse_leds()
ret i32 0
}
__attribute__((no)) double sin(double a) { return a; }


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

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

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

LLVM IR (-O2):
define double @sin(double returned %0) {
ret double %0
}
void rl_insert_text(char *foo) {}


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

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

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

LLVM IR (-O2):
define void @rl_insert_text(i8* nocapture %0) {
ret void
}
void RTTimerDestroy(void) {}


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

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

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

LLVM IR (-O2):
define void @RTTimerDestroy() {
ret void
}
/* Type definitions */
typedef char int16_t;

/* Variables and functions */
size_t int16PackSize(char *);
size_t int16Unpack(const char *buffer, size_t size, int16_t *data) {
  size_t req = int16PackSize(data);
  if (size >= req) {
    *data = (buffer[0] << 8) | (buffer[1]);
  }
  return req;
}


x86 assembly (clang, -O0):
<int16Unpack>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <int16PackSize@plt>
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x20(%rbp),%rax
jb     115b <int16Unpack+0x4b>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x18(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int16Unpack>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rdx,%rdi
call   1030 <int16PackSize@plt>
cmp    %r15,%rax
ja     1131 <int16Unpack+0x21>
mov    0x1(%r14),%cl
mov    %cl,(%rbx)
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i64 @int16Unpack(i8* nocapture %0, i64 %1, i8* %2) {
%4 = tail call i64 @int16PackSize(i8* %2)
%5 = icmp ugt i64 %4, %1
br i1 %5, label %9, label %6
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
store i8 %8, i8* %2
br label %9
9: ; preds = %6, %3
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int open(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ read(int, char *, int);
int main() {
  char zone[11];
  int tub;
  tub = open("fictub", O_RDONLY);
  read(tub, zone, 10);
  printf("processus lecteur du tube fictub: j’ai lu %s", zone);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2ea9(%rip),%rax
mov    (%rax),%esi
lea    0xeb8(%rip),%rdi
call   1050 <open@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
lea    -0xb(%rbp),%rsi
mov    $0xa,%edx
call   1040 <read@plt>
lea    -0xb(%rbp),%rsi
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
lea    0xebb(%rip),%rdi
call   1050 <open@plt>
lea    0x5(%rsp),%rbx
mov    %eax,%edi
mov    %rbx,%rsi
mov    $0xa,%edx
call   1040 <read@plt>
lea    0xea2(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"fictub\00"
@O_RDONLY = global i32 0
@.str.1 = [47 x i8] c"processus lecteur du tube fictub: j\E2\80\99ai lu %s\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = alloca i32
%3 = load i32, i32* @O_RDONLY
%4 = call i32 @open(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%7 = call i32 @read(i32 %5, i8* %6, i32 10)
%8 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%9 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i8* %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"fictub\00"
@O_RDONLY = global i32 0
@.str.1 = [47 x i8] c"processus lecteur du tube fictub: j\E2\80\99ai lu %s\00"
define i32 @main() {
%1 = alloca [11 x i8]
%2 = getelementptr inbounds [11 x i8], [11 x i8]* %1, i64 0, i64 0
%3 = load i32, i32* @O_RDONLY
%4 = tail call i32 @open(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = call i32 @read(i32 %4, i8* %2, i32 10)
%6 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i8* %2)
ret i32 0
}
void ARGBToYRow_Any_AVX2() {}


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

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

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

LLVM IR (-O2):
define void @ARGBToYRow_Any_AVX2() {
ret void
}
int kill(int pid, int sig) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @kill(i32 %0, i32 %1) {
ret i32 -1
}
int cairo_code_draw_pwrupLabel_get_width() { return 271; }


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

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

LLVM IR (-O0):
define i32 @cairo_code_draw_pwrupLabel_get_width() {
ret i32 271
}

LLVM IR (-O2):
define i32 @cairo_code_draw_pwrupLabel_get_width() {
ret i32 271
}
int mm_isupper(char c) { return (c >= 'A' && c <= 'Z'); }


x86 assembly (clang, -O0):
<mm_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x41,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <mm_isupper+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mm_isupper>:
add    $0xbf,%dil
xor    %eax,%eax
cmp    $0x1a,%dil
setb   %al
ret

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

LLVM IR (-O2):
define i32 @mm_isupper(i8 signext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
int mscb_release(int fd) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @mscb_release(i32 %0) {
ret i32 1
}
/* Variables and functions */
scalar_t__ Check_ifuserallowed(char *);
int Check_ifuserdenied(char *);
int Check_user(char *ConnectingUser) {
  if (Check_ifuserdenied(ConnectingUser) == 1)
    return 1;
  if (Check_ifuserallowed(ConnectingUser) == 0)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<Check_user>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <Check_ifuserdenied@plt>
cmp    $0x1,%eax
jne    114a <Check_user+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1170 <Check_user+0x50>
mov    -0x10(%rbp),%rdi
call   1040 <Check_ifuserallowed@plt>
cmp    $0x0,%rax
jne    1169 <Check_user+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1170 <Check_user+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Check_user>:
push   %rbx
mov    %rdi,%rbx
call   1030 <Check_ifuserdenied@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    $0x1,%ecx
je     1148 <Check_user+0x28>
mov    %rbx,%rdi
call   1040 <Check_ifuserallowed@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @Check_user(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i32 @Check_ifuserdenied(i8* %4)
%6 = icmp eq i32 %5, 1
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %14
8: ; preds = %1
%9 = load i8*, i8** %3
%10 = call i64 @Check_ifuserallowed(i8* %9)
%11 = icmp eq i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %8
store i32 1, i32* %2
br label %14
13: ; preds = %8
store i32 0, i32* %2
br label %14
14: ; preds = %13, %12, %7
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @Check_user(i8* %0) {
%2 = tail call i32 @Check_ifuserdenied(i8* %0)
%3 = icmp eq i32 %2, 1
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i64 @Check_ifuserallowed(i8* %0)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int f346(int *);
int f347(int *p) { return f346(p); }


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

x86 assembly (clang, -O2):
<f347>:
jmp    1030 <f346@plt>

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

LLVM IR (-O2):
define i32 @f347(i32* %0) {
%2 = tail call i32 @f346(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
void yyerror(char const *x) {
  printf("Error %s\n", x);
  exit(1);
}


x86 assembly (clang, -O0):
<yyerror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<yyerror>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"Error %s\0A\00"
define void @yyerror(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct raw_event {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ q_push(struct raw_event *);
void dsp_dispatch(struct raw_event *event) { q_push(event); }


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

x86 assembly (clang, -O2):
<dsp_dispatch>:
jmp    1030 <q_push@plt>

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

LLVM IR (-O2):
%struct.raw_event = type { i32 }
define void @dsp_dispatch(%struct.raw_event* %0) {
%2 = tail call i32 @q_push(%struct.raw_event* %0)
ret void
}
int rb_isprint(int c) { return ' ' <= c && c <= '\x7e'; }


x86 assembly (clang, -O0):
<rb_isprint>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x20,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jg     1124 <rb_isprint+0x24>
cmpl   $0x7e,-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):
<rb_isprint>:
add    $0xffffffe0,%edi
xor    %eax,%eax
cmp    $0x5f,%edi
setb   %al
ret

LLVM IR (-O0):
define i32 @rb_isprint(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 32, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 126
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 @rb_isprint(i32 %0) {
%2 = add i32 %0, -32
%3 = icmp ult i32 %2, 95
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void __attribute__((constructor)) libtest2_ctor(void) {
  printf("libtest2: constructor!\n");
}


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

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

LLVM IR (-O0):
@.str = [24 x i8] c"libtest2: constructor!\0A\00"
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @libtest2_ctor, i8* null }]
define void @libtest2_ctor() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @libtest2_ctor, i8* null }]
@str = [23 x i8] c"libtest2: constructor!\00"
define void @libtest2_ctor() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
ret void
}
float obdConvert_44(unsigned int A, unsigned int B, unsigned int C,
                    unsigned int D) {
  return ((float)A * 256.0f + (float)B) * 0.0000305f;
}


x86 assembly (clang, -O0):
<obdConvert_44>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cvtsi2ss %rax,%xmm0
mov    -0x8(%rbp),%eax
cvtsi2ss %rax,%xmm1
movss  0xedc(%rip),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  0xec8(%rip),%xmm1
mulss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<obdConvert_44>:
mov    %edi,%eax
cvtsi2ss %rax,%xmm0
mov    %esi,%eax
cvtsi2ss %rax,%xmm1
mulss  0xeea(%rip),%xmm0
addss  %xmm1,%xmm0
mulss  0xee2(%rip),%xmm0
ret

LLVM IR (-O0):
define float @obdConvert_44(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = uitofp i32 %9 to float
%11 = load i32, i32* %6
%12 = uitofp i32 %11 to float
%13 = call float @llvm.fmuladd.f32(float %10, float 2.560000e+02, float %12)
%14 = fmul float %13, 0x3EFFFB4800000000
ret float %14
}

LLVM IR (-O2):
define float @obdConvert_44(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = uitofp i32 %0 to float
%6 = uitofp i32 %1 to float
%7 = tail call float @llvm.fmuladd.f32(float %5, float 2.560000e+02, float %6)
%8 = fmul float %7, 0x3EFFFB4800000000
ret float %8
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR6F_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR6F_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR6F_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
int __attribute__((no, noclone)) foo(int *p, int *q) {
  *p = 1;
  *q = 0;
  return *p;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x1,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
movl   $0x1,(%rdi)
movl   $0x0,(%rsi)
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @foo(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
store i32 1, i32* %5
%6 = load i32*, i32** %4
store i32 0, i32* %6
%7 = load i32*, i32** %3
%8 = load i32, i32* %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0, i32* nocapture writeonly %1) {
store i32 1, i32* %0
store i32 0, i32* %1
%3 = load i32, i32* %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ fftss_cleanup_threads();
void dfftss_cleanup_threads_(void) { fftss_cleanup_threads(); }


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

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

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

LLVM IR (-O2):
define void @dfftss_cleanup_threads_() {
%1 = tail call i32 (...) @fftss_cleanup_threads()
ret void
}
double deg2rad(double angle) {
  return 3.1415926535897932384626433832795029L * angle / 180.0;
}


x86 assembly (clang, -O0):
<deg2rad>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
fldl   -0x8(%rbp)
fldt   0xeee(%rip)
fmulp  %st,%st(1)
flds   0xef6(%rip)
fdivrp %st,%st(1)
fstpl  -0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<deg2rad>:
movsd  %xmm0,-0x8(%rsp)
fldt   0xef4(%rip)
fmull  -0x8(%rsp)
fdivs  0xefa(%rip)
fstpl  -0x10(%rsp)
movsd  -0x10(%rsp),%xmm0
ret

LLVM IR (-O0):
define double @deg2rad(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fpext double %3 to x86_fp80
%5 = fmul x86_fp80 0xK4000C90FDAA22168C235, %4
%6 = fdiv x86_fp80 %5, 0xK4006B400000000000000
%7 = fptrunc x86_fp80 %6 to double
ret double %7
}

LLVM IR (-O2):
define double @deg2rad(double %0) {
%2 = fpext double %0 to x86_fp80
%3 = fmul x86_fp80 %2, 0xK4000C90FDAA22168C235
%4 = fdiv x86_fp80 %3, 0xK4006B400000000000000
%5 = fptrunc x86_fp80 %4 to double
ret double %5
}
int right(int index) { return index * 2 + 1; }


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

x86 assembly (clang, -O2):
<right>:
lea    (%rdi,%rdi,1),%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @right(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 2
%5 = add nsw i32 %4, 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @right(i32 %0) {
%2 = shl nsw i32 %0, 1
%3 = or i32 %2, 1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ led_test();
int /*<<< orphan*/ myputc(char);
int /*<<< orphan*/ myputs(char *);
int /*<<< orphan*/ uart_init();
int main() {
  uart_init();
  myputc('1');
  myputc('2');
  myputc('3');
  myputc('4');
  myputc('5');
  myputc('6');
  myputs("hello world!\n");
  led_test();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <uart_init@plt>
mov    $0x31,%edi
call   1040 <myputc@plt>
mov    $0x32,%edi
call   1040 <myputc@plt>
mov    $0x33,%edi
call   1040 <myputc@plt>
mov    $0x34,%edi
call   1040 <myputc@plt>
mov    $0x35,%edi
call   1040 <myputc@plt>
mov    $0x36,%edi
call   1040 <myputc@plt>
lea    0xe67(%rip),%rdi
call   1030 <myputs@plt>
mov    $0x0,%al
call   1060 <led_test@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <uart_init@plt>
mov    $0x31,%edi
call   1040 <myputc@plt>
mov    $0x32,%edi
call   1040 <myputc@plt>
mov    $0x33,%edi
call   1040 <myputc@plt>
mov    $0x34,%edi
call   1040 <myputc@plt>
mov    $0x35,%edi
call   1040 <myputc@plt>
mov    $0x36,%edi
call   1040 <myputc@plt>
lea    0xe75(%rip),%rdi
call   1030 <myputs@plt>
xor    %eax,%eax
call   1060 <led_test@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"hello world!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @uart_init()
%3 = call i32 @myputc(i8 signext 49)
%4 = call i32 @myputc(i8 signext 50)
%5 = call i32 @myputc(i8 signext 51)
%6 = call i32 @myputc(i8 signext 52)
%7 = call i32 @myputc(i8 signext 53)
%8 = call i32 @myputc(i8 signext 54)
%9 = call i32 @myputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%10 = call i32 (...) @led_test()
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"hello world!\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @uart_init()
%2 = tail call i32 @myputc(i8 signext 49)
%3 = tail call i32 @myputc(i8 signext 50)
%4 = tail call i32 @myputc(i8 signext 51)
%5 = tail call i32 @myputc(i8 signext 52)
%6 = tail call i32 @myputc(i8 signext 53)
%7 = tail call i32 @myputc(i8 signext 54)
%8 = tail call i32 @myputs(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (...) @led_test()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ test_lr();
int main(void) {
  test_lr();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_lr()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int32_t get_cpu(void) {
  int32_t which = 0;
  return which;
}


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

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

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

LLVM IR (-O2):
define i32 @get_cpu() {
ret i32 0
}
/* Variables and functions */
char *current_page();
int /*<<< orphan*/ display_file(char *, int);
int /*<<< orphan*/ hidden_globals();
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ show_directories();
void compose_bug_report(void) {
  show_directories();
  printf("<form method=POST action=\"%s\">\n", current_page());
  display_file("/reportform.html", 1);
  hidden_globals();
  printf("</form>\n");
}


x86 assembly (clang, -O0):
<compose_bug_report>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <show_directories@plt>
mov    $0x0,%al
call   1060 <current_page@plt>
mov    %rax,%rsi
lea    0xe94(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xea6(%rip),%rdi
mov    $0x1,%esi
call   1070 <display_file@plt>
mov    $0x0,%al
call   1050 <hidden_globals@plt>
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<compose_bug_report>:
push   %rax
xor    %eax,%eax
call   1050 <show_directories@plt>
xor    %eax,%eax
call   1070 <current_page@plt>
lea    0xe8a(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe99(%rip),%rdi
mov    $0x1,%esi
call   1080 <display_file@plt>
xor    %eax,%eax
call   1060 <hidden_globals@plt>
lea    0xe92(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"<form method=POST action=\22%s\22>\0A\00"
@.str.1 = [17 x i8] c"/reportform.html\00"
@.str.2 = [9 x i8] c"</form>\0A\00"
define void @compose_bug_report() {
%1 = call i32 (...) @show_directories()
%2 = call i8* (...) @current_page()
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @display_file(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = call i32 (...) @hidden_globals()
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"<form method=POST action=\22%s\22>\0A\00"
@.str.1 = [17 x i8] c"/reportform.html\00"
@str = [8 x i8] c"</form>\00"
define void @compose_bug_report() {
%1 = tail call i32 (...) @show_directories()
%2 = tail call i8* (...) @current_page()
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @display_file(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 1)
%5 = tail call i32 (...) @hidden_globals()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int sayici, toplam = 0;
  for (sayici = 2; sayici <= 30; sayici = sayici + 2) {
    toplam = toplam + sayici;
  }
  printf("2 den 30 a kadar olan sayilarin toplami %d dir.", toplam);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x2,-0x8(%rbp)
cmpl   $0x1e,-0x8(%rbp)
jg     114e <main+0x3e>
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [48 x i8] c"2 den 30 a kadar olan sayilarin toplami %d dir.\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %3
store i32 2, i32* %2
br label %4
4: ; preds = %11, %0
%5 = load i32, i32* %2
%6 = icmp sle i32 %5, 30
br i1 %6, label %7, label %14
7: ; preds = %4
%8 = load i32, i32* %3
%9 = load i32, i32* %2
%10 = add nsw i32 %8, %9
store i32 %10, i32* %3
br label %11
11: ; preds = %7
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 2
store i32 %13, i32* %2
br label %4
14: ; preds = %4
%15 = load i32, i32* %3
%16 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 %15)
ret i32 0
}

LLVM IR (-O2):
@.str = [48 x i8] c"2 den 30 a kadar olan sayilarin toplami %d dir.\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i32 240)
ret i32 0
}