xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
void reverse() {
  char a;
  scanf("%c", &a);
  if (a != '\n') {
    reverse();
    printf("%c", a);
  }
}


x86 assembly (clang, -O0):
<reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x1(%rbp),%rsi
call   1050 <scanf@plt>
movsbl -0x1(%rbp),%eax
cmp    $0xa,%eax
je     116a <reverse+0x3a>
call   1030 <reverse@plt>
lea    0xe9f(%rip),%rdi
movsbl -0x1(%rbp),%esi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reverse>:
push   %rax
lea    0xec8(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
cmpb   $0xa,0x7(%rsp)
je     115f <reverse+0x2f>
call   1030 <reverse@plt>
movsbl 0x7(%rsp),%esi
lea    0xea6(%rip),%rdi
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @reverse() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sext i8 %3 to i32
%5 = icmp ne i32 %4, 10
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i8, i8* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %7)
br label %9
9: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @reverse() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 10
br i1 %4, label %8, label %5
5: ; preds = %0
%6 = load i8, i8* %1
%7 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %6)
br label %8
8: ; preds = %5, %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ tasks_foo1();
void *tasks_parFun_a1a1(void *voidArgs) {
  tasks_foo1();
  return 0;
}


x86 assembly (clang, -O0):
<tasks_parFun_a1a1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <tasks_foo1@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @tasks_parFun_a1a1(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (...) @tasks_foo1()
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @tasks_parFun_a1a1(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @tasks_foo1()
ret i8* null
}
int qsort_int_cmp(const void *a, const void *b) {
  return *((int *)a) - *((int *)b);
}


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

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

LLVM IR (-O0):
define i32 @qsort_int_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = bitcast i8* %5 to i32*
%7 = load i32, i32* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to i32*
%10 = load i32, i32* %9
%11 = sub nsw i32 %7, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @qsort_int_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() { printf("Hi!, GIt"); }


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

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

LLVM IR (-O0):
@.str = [9 x i8] c"Hi!, GIt\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Hi!, GIt\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void _pset(void **p0, void *p1) { *p0 = p1; }


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

x86 assembly (clang, -O2):
<_pset>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @_pset(i8** nocapture writeonly %0, i8* %1) {
store i8* %1, i8** %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void stsn_usage(void) {
  printf("  stsn - Use a socket based TSN connection\n");
  printf("    stsn:interface:clientmac   STSN server\n");
  printf("    stsn:interface:servermac   STSN client\n");
}


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

x86 assembly (clang, -O2):
<stsn_usage>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf07(%rip),%rdi
call   1030 <puts@plt>
lea    0xf26(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [44 x i8] c" stsn - Use a socket based TSN connection\0A\00"
@.str.1 = [44 x i8] c" stsn:interface:clientmac STSN server\0A\00"
@.str.2 = [44 x i8] c" stsn:interface:servermac STSN client\0A\00"
define void @stsn_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [43 x i8] c" stsn - Use a socket based TSN connection\00"
@str.3 = [43 x i8] c" stsn:interface:clientmac STSN server\00"
@str.4 = [43 x i8] c" stsn:interface:servermac STSN client\00"
define void @stsn_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str.4, i64 0, i64 0))
ret void
}
int stringlen(char *texto) {
  int size;
  for (size = 0; texto[size] != '\0'; size++)
    ;
  return size;
}


x86 assembly (clang, -O0):
<stringlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1137 <stringlen+0x37>
jmp    1129 <stringlen+0x29>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <stringlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stringlen>:
mov    $0xffffffff,%eax
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%eax
cmpb   $0x0,(%rdi)
lea    0x1(%rdi),%rdi
jne    1110 <stringlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @stringlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ %7, %2 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add nuw i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
%9 = trunc i64 %3 to i32
ret i32 %9
}
/* Type definitions */
typedef double clock_t;

/* Variables and functions */
double clock();
void stub1(int *, int);
int timing(int *a, int length, void (*pointer)(int *, int)) {
  clock_t startClock = clock();
  (*pointer)(a, length);
  clock_t endClock = clock();
  return (endClock - startClock) / 1000.0;
}


x86 assembly (clang, -O0):
<timing>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    $0x0,%al
call   1030 <clock@plt>
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   *%rax
mov    $0x0,%al
call   1030 <clock@plt>
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  0xea6(%rip),%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timing>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <clock@plt>
movsd  %xmm0,0x8(%rsp)
mov    %rbx,%rdi
mov    %ebp,%esi
call   *%r14
xor    %eax,%eax
call   1030 <clock@plt>
subsd  0x8(%rsp),%xmm0
divsd  0xeb6(%rip),%xmm0
cvttsd2si %xmm0,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @timing(i32* %0, i32 %1, void (i32*, i32)* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca void (i32*, i32)*
%7 = alloca double
%8 = alloca double
store i32* %0, i32** %4
store i32 %1, i32* %5
store void (i32*, i32)* %2, void (i32*, i32)** %6
%9 = call double (...) @clock()
store double %9, double* %7
%10 = load void (i32*, i32)*, void (i32*, i32)** %6
%11 = load i32*, i32** %4
%12 = load i32, i32* %5
%13 = call double (...) @clock()
store double %13, double* %8
%14 = load double, double* %8
%15 = load double, double* %7
%16 = fsub double %14, %15
%17 = fdiv double %16, 1.000000e+03
%18 = fptosi double %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @timing(i32* %0, i32 %1, void (i32*, i32)* nocapture %2) {
%4 = tail call double (...) @clock()
tail call void %2(i32* %0, i32 %1)
%5 = tail call double (...) @clock()
%6 = fsub double %5, %4
%7 = fdiv double %6, 1.000000e+03
%8 = fptosi double %7 to i32
ret i32 %8
}
int test_005(int a, int c, int b, int d) { return a + b + (d & 1) + c; }


x86 assembly (clang, -O0):
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
add    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
and    $0x1,%ecx
add    %ecx,%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
and    $0x1,%ecx
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_005(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 = load i32, i32* %7
%11 = add nsw i32 %9, %10
%12 = load i32, i32* %8
%13 = and i32 %12, 1
%14 = add nsw i32 %11, %13
%15 = load i32, i32* %6
%16 = add nsw i32 %14, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @test_005(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %3, 1
%6 = add i32 %1, %0
%7 = add i32 %6, %2
%8 = add i32 %7, %5
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ handle_cmd_client(int);
void *command_listener(void *unused) {
  int client = 0;
  while (1)
    if (!handle_cmd_client(client))
      break;
  return NULL;
}


x86 assembly (clang, -O0):
<command_listener>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1030 <handle_cmd_client@plt>
cmp    $0x0,%eax
jne    1139 <command_listener+0x29>
jmp    113e <command_listener+0x2e>
jmp    1123 <command_listener+0x13>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<command_listener>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
call   1030 <handle_cmd_client@plt>
test   %eax,%eax
jne    1120 <command_listener+0x10>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define noalias i8* @command_listener(i8* nocapture readnone %0) {
br label %2
2: ; preds = %2, %1
%3 = tail call i32 @handle_cmd_client(i32 0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %2
5: ; preds = %2
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, float);
void main() {
  struct emp {
    char emp[20];
    int empno;
    float sal;
  };
  struct emp member = {"TIGER"};
  printf(" %d %f", member.empno, member.sal);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0xee1(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xede(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xedb(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xed9(%rip),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%esi
movss  -0x8(%rbp),%xmm0
lea    0xecb(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
xorps  %xmm0,%xmm0
xor    %esi,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
%struct.emp = type { [20 x i8], i32, float }
@__const.main.member = %struct.emp { [20 x i8] c"TIGER\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00", i32 0, float 0.000000e+00 }
@.str = [7 x i8] c" %d %f\00"
define void @main() {
%1 = alloca %struct.emp
%2 = bitcast %struct.emp* %1 to i8*
%3 = getelementptr inbounds %struct.emp, %struct.emp* %1, i32 0, i32 1
%4 = load i32, i32* %3
%5 = getelementptr inbounds %struct.emp, %struct.emp* %1, i32 0, i32 2
%6 = load float, float* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %4, float %6)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c" %d %f\00"
define void @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 0, float 0.000000e+00)
ret void
}
int bar(unsigned word) { return ((int)word << 24) >> 24; }


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

x86 assembly (clang, -O2):
<bar>:
movsbl %dil,%eax
ret

LLVM IR (-O0):
define i32 @bar(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 24
%5 = ashr i32 %4, 24
ret i32 %5
}

LLVM IR (-O2):
define i32 @bar(i32 %0) {
%2 = shl i32 %0, 24
%3 = ashr exact i32 %2, 24
ret i32 %3
}
const char *C_Float_Description(void) {
  return "The `C_Float` class should be overridden by types which are "
         "representable "
         "as a C style Float of the type `double`.";
}


x86 assembly (clang, -O0):
<C_Float_Description>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<C_Float_Description>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [115 x i8] c"The `C_Float` class should be overridden by types which are representable as a C style Float of the type `double`.\00"
define i8* @C_Float_Description() {
ret i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [115 x i8] c"The `C_Float` class should be overridden by types which are representable as a C style Float of the type `double`.\00"
define i8* @C_Float_Description() {
ret i8* getelementptr inbounds ([115 x i8], [115 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
__attribute__((section(".after_vectors"))) void DebugMon_Handler(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<DebugMon_Handler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <DebugMon_Handler+0x9>
jmp    1109 <DebugMon_Handler+0x9>

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

LLVM IR (-O0):
define void @DebugMon_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @DebugMon_Handler() section ".after_vectors" {
br label %1
1: ; preds = %0, %1
br label %1
}
int config_READER_DRE(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @config_READER_DRE() {
ret i32 0
}
unsigned char value2char(unsigned char val) {
  if (val >= 0 && val <= 9) {
    return (val + '0');
  }
  if (val >= 0x0a && val <= 0x0f) {
    return (val + 'A' - 0x0a);
  }
  return 0;
}


x86 assembly (clang, -O0):
<value2char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x0,%eax
jl     1133 <value2char+0x33>
movzbl -0x2(%rbp),%eax
cmp    $0x9,%eax
jg     1133 <value2char+0x33>
movzbl -0x2(%rbp),%eax
add    $0x30,%eax
mov    %al,-0x1(%rbp)
jmp    1163 <value2char+0x63>
movzbl -0x2(%rbp),%eax
cmp    $0xa,%eax
jl     115f <value2char+0x5f>
movzbl -0x2(%rbp),%eax
cmp    $0xf,%eax
jg     115f <value2char+0x5f>
movzbl -0x2(%rbp),%eax
add    $0x41,%eax
sub    $0xa,%eax
mov    %al,-0x1(%rbp)
jmp    1163 <value2char+0x63>
movb   $0x0,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<value2char>:
lea    0x30(%rdi),%eax
lea    0x37(%rdi),%ecx
xor    %edx,%edx
cmp    $0x10,%dil
movzbl %cl,%ecx
cmovae %edx,%ecx
cmp    $0xa,%dil
movzbl %al,%eax
cmovae %ecx,%eax
ret

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

LLVM IR (-O2):
define zeroext i8 @value2char(i8 zeroext %0) {
%2 = icmp ult i8 %0, 10
%3 = add i8 %0, 48
%4 = icmp ult i8 %0, 16
%5 = add i8 %0, 55
%6 = select i1 %4, i8 %5, i8 0
%7 = select i1 %2, i8 %3, i8 %6
ret i8 %7
}
int __CS_pthread_cond_init(unsigned char *cond, void *attr) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__CS_pthread_cond_init(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
void xxx(int argc) {
  int x;
#pragma omp sections
  { argc = x; }
}


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

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

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

LLVM IR (-O2):
define void @xxx(i32 %0) {
ret void
}
void gtk_text_iter_get_visible_line_index() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_get_visible_line_index() {
ret void
}
/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_bus_emit_interfaces_added_strv(void *bus, const char *path,
                                  char **interfaces) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_bus_emit_interfaces_added_strv>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
mov    0x2ec7(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sd_bus_emit_interfaces_added_strv>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_bus_emit_interfaces_added_strv(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 i32, i32* @EINVAL
%8 = sub nsw i32 0, %7
ret i32 %8
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_bus_emit_interfaces_added_strv(i8* nocapture readnone %0, i8* nocapture readnone %1, i8** nocapture readnone %2) {
%4 = load i32, i32* @EINVAL
%5 = sub nsw i32 0, %4
ret i32 %5
}
void kasan_poison_kfree(void *ptr, unsigned long ip) {}


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

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

LLVM IR (-O0):
define void @kasan_poison_kfree(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @kasan_poison_kfree(i8* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
int combinations(int, int);
int notop(int n) {
  int i, prod;
  prod = 1;
  for (i = 2; i <= n; i++)
    prod *= combinations(i, 2);
  return prod;
}


x86 assembly (clang, -O0):
<notop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0xc(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jg     1157 <notop+0x47>
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1030 <combinations@plt>
imul   -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1129 <notop+0x19>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<notop>:
push   %rbp
push   %r14
push   %rbx
mov    $0x1,%ebp
cmp    $0x2,%edi
jl     1152 <notop+0x42>
mov    %edi,%r14d
neg    %r14d
mov    $0x2,%ebx
mov    $0x1,%ebp
xchg   %ax,%ax
mov    %ebx,%edi
mov    $0x2,%esi
call   1030 <combinations@plt>
imul   %eax,%ebp
lea    (%r14,%rbx,1),%eax
add    $0x1,%eax
mov    %ebx,%ecx
add    $0x1,%ecx
mov    %ecx,%ebx
cmp    $0x1,%eax
jne    1130 <notop+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @notop(i32 %0) {
%2 = icmp slt i32 %0, 2
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 1, %1 ]
%5 = phi i32 [ %8, %3 ], [ 2, %1 ]
%6 = tail call i32 @combinations(i32 %5, i32 2)
%7 = mul nsw i32 %6, %4
%8 = add nuw i32 %5, 1
%9 = icmp eq i32 %5, %0
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 1, %1 ], [ %7, %3 ]
ret i32 %11
}
int *fun_0(int *a, int *b) {
  b[0] = a[0] ^ a[1] ^ a[2];
  return &a[3];
}


x86 assembly (clang, -O0):
<fun_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x8(%rbp),%rax
xor    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
xor    0x8(%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
add    $0xc,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_0>:
mov    0x4(%rdi),%eax
xor    (%rdi),%eax
xor    0x8(%rdi),%eax
mov    %eax,(%rsi)
lea    0xc(%rdi),%rax
ret

LLVM IR (-O0):
define i32* @fun_0(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 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load i32, i32* %6
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = xor i32 %7, %10
%12 = load i32*, i32** %3
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = xor i32 %11, %14
%16 = load i32*, i32** %4
%17 = getelementptr inbounds i32, i32* %16, i64 0
store i32 %15, i32* %17
%18 = load i32*, i32** %3
%19 = getelementptr inbounds i32, i32* %18, i64 3
ret i32* %19
}

LLVM IR (-O2):
define i32* @fun_0(i32* %0, i32* nocapture writeonly %1) {
%3 = load i32, i32* %0
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = xor i32 %5, %3
%7 = getelementptr inbounds i32, i32* %0, i64 2
%8 = load i32, i32* %7
%9 = xor i32 %6, %8
store i32 %9, i32* %1
%10 = getelementptr inbounds i32, i32* %0, i64 3
ret i32* %10
}
int test_imm_14uint8_reg(unsigned char val) {
  return ((val) & (0x14 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_14uint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edx
and    $0x14,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_14uint8_reg>:
test   $0x14,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_14uint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 20
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_14uint8_reg(i8 zeroext %0) {
%2 = and i8 %0, 20
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int f150(int *);
int f151(int *p) { return f150(p); }


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

x86 assembly (clang, -O2):
<f151>:
jmp    1030 <f150@plt>

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

LLVM IR (-O2):
define i32 @f151(i32* %0) {
%2 = tail call i32 @f150(i32* %0)
ret i32 %2
}
void test_ar_2_USHRT(void *d, unsigned short n) {
  if ((0x7fff * 2 + 1) - 2 <= n && n <= (0x7fff * 2 + 1) - 1)
    n = (0x7fff * 2 + 1) - 3;
  __builtin_memset(d, 0, n);
}


x86 assembly (clang, -O0):
<test_ar_2_USHRT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %rdi,-0x8(%rbp)
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%ecx
mov    $0xfffd,%eax
cmp    %ecx,%eax
jg     1149 <test_ar_2_USHRT+0x39>
movzwl -0xa(%rbp),%eax
cmp    $0xfffe,%eax
jg     1149 <test_ar_2_USHRT+0x39>
movw   $0xfffc,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
movzwl -0xa(%rbp),%eax
mov    %eax,%edx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_ar_2_USHRT>:
lea    0x3(%rsi),%eax
cmp    $0x2,%ax
mov    $0xfffc,%edx
cmovae %esi,%edx
xor    %esi,%esi
jmp    1030 <memset@plt>

LLVM IR (-O0):
define void @test_ar_2_USHRT(i8* %0, i16 zeroext %1) {
%3 = alloca i8*
%4 = alloca i16
store i8* %0, i8** %3
store i16 %1, i16* %4
%5 = load i16, i16* %4
%6 = zext i16 %5 to i32
%7 = icmp sle i32 65533, %6
br i1 %7, label %8, label %13
8: ; preds = %2
%9 = load i16, i16* %4
%10 = zext i16 %9 to i32
%11 = icmp sle i32 %10, 65534
br i1 %11, label %12, label %13
12: ; preds = %8
store i16 -4, i16* %4
br label %13
13: ; preds = %12, %8, %2
%14 = load i8*, i8** %3
%15 = load i16, i16* %4
%16 = zext i16 %15 to i64
ret void
}

LLVM IR (-O2):
define void @test_ar_2_USHRT(i8* nocapture writeonly %0, i16 zeroext %1) {
%3 = add i16 %1, 3
%4 = icmp ult i16 %3, 2
%5 = select i1 %4, i16 -4, i16 %1
%6 = zext i16 %5 to i64
tail call void @llvm.memset.p0i8.i64(i8* align 1 %0, i8 0, i64 %6, i1 false)
ret void
}
void spmemvfsDebug(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @spmemvfsDebug(i8* nocapture %0, ...) {
ret void
}
double interp2_k_linear2(double x) {
  double result = 0.0;
  if ((x >= 0.0) && (x < 1.0)) {
    result = 1.0 - x;
  }
  return result;
}


x86 assembly (clang, -O0):
<interp2_k_linear2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1148 <interp2_k_linear2+0x48>
movsd  0xed5(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1148 <interp2_k_linear2+0x48>
movsd  0xec2(%rip),%xmm0
subsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<interp2_k_linear2>:
movsd  0xef8(%rip),%xmm2
movapd %xmm0,%xmm1
cmpltsd %xmm2,%xmm1
subsd  %xmm0,%xmm2
andpd  %xmm1,%xmm2
xorpd  %xmm1,%xmm1
cmplesd %xmm0,%xmm1
andpd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @interp2_k_linear2(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
store double 0.000000e+00, double* %3
%4 = load double, double* %2
%5 = fcmp oge double %4, 0.000000e+00
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load double, double* %2
%8 = fcmp olt double %7, 1.000000e+00
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load double, double* %2
%11 = fsub double 1.000000e+00, %10
store double %11, double* %3
br label %12
12: ; preds = %9, %6, %1
%13 = load double, double* %3
ret double %13
}

LLVM IR (-O2):
define double @interp2_k_linear2(double %0) {
%2 = fcmp oge double %0, 0.000000e+00
%3 = fcmp olt double %0, 1.000000e+00
%4 = and i1 %2, %3
%5 = fsub double 1.000000e+00, %0
%6 = select i1 %4, double %5, double 0.000000e+00
ret double %6
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ y;
};
struct TYPE_4__ {
  TYPE_1__ min_aspect;
};
typedef TYPE_2__ XSizeHints;

/* Variables and functions */
int get_XSizeHints_min_aspect_y(void *_p) {
  return (int)((XSizeHints *)_p)->min_aspect.y;
}


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

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

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

LLVM IR (-O2):
define i32 @get_XSizeHints_min_aspect_y(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_pointer(const void *p) {
  if (p == NULL) {
    printf("(nil)");
    return;
  }
  printf("%p", p);
}


x86 assembly (clang, -O0):
<print_pointer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113a <print_pointer+0x2a>
lea    0xed2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    114c <print_pointer+0x3c>
mov    -0x8(%rbp),%rsi
lea    0xec1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_pointer>:
test   %rdi,%rdi
je     1126 <print_pointer+0x16>
mov    %rdi,%rsi
lea    0xee7(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>
lea    0xed3(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"(nil)\00"
@.str.1 = [3 x i8] c"%p\00"
define void @print_pointer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %10
7: ; preds = %1
%8 = load i8*, i8** %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"(nil)\00"
@.str.1 = [3 x i8] c"%p\00"
define void @print_pointer(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %7
7: ; preds = %5, %3
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ COMP_CTX;

/* Variables and functions */
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char *, unsigned int);
int rle_compress_block(COMP_CTX *ctx, unsigned char *out, unsigned int olen,
                       unsigned char *in, unsigned int ilen) {
  if (olen < (ilen + 1)) {
    return (-1);
  }
  *(out++) = 0;
  memcpy(out, in, ilen);
  return (ilen + 1);
}


x86 assembly (clang, -O0):
<rle_compress_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8d,-0x2c(%rbp)
mov    -0x1c(%rbp),%eax
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
cmp    %ecx,%eax
jae    1148 <rle_compress_block+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1173 <rle_compress_block+0x63>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x2c(%rbp),%edx
call   1030 <memcpy@plt>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rle_compress_block>:
push   %rbx
lea    0x1(%r8),%ebx
mov    $0xffffffff,%eax
cmp    %edx,%ebx
ja     1135 <rle_compress_block+0x25>
movb   $0x0,(%rsi)
add    $0x1,%rsi
mov    %rsi,%rdi
mov    %rcx,%rsi
mov    %r8d,%edx
call   1030 <memcpy@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @rle_compress_block(i32* nocapture readnone %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = add i32 %4, 1
%7 = icmp ugt i32 %6, %2
br i1 %7, label %11, label %8
8: ; preds = %5
%9 = getelementptr inbounds i8, i8* %1, i64 1
store i8 0, i8* %1
%10 = tail call i32 @memcpy(i8* %9, i8* %3, i32 %4)
br label %11
11: ; preds = %5, %8
%12 = phi i32 [ %6, %8 ], [ -1, %5 ]
ret i32 %12
}
void arch_alloc_page(struct page *page, int order) {}


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

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

LLVM IR (-O0):
%struct.page = type opaque
define void @arch_alloc_page(%struct.page* %0, i32 %1) {
%3 = alloca %struct.page*
%4 = alloca i32
store %struct.page* %0, %struct.page** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.page = type opaque
define void @arch_alloc_page(%struct.page* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  assert((1 << 1) == 0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
/* Variables and functions */
int rand();
int clock() { return rand(); }


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

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

LLVM IR (-O0):
define i32 @clock() {
%1 = call i32 (...) @rand()
ret i32 %1
}

LLVM IR (-O2):
define i32 @clock() {
%1 = tail call i32 (...) @rand()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int usage() {
  fprintf(stderr, "mkdir <target>\n");
  return -1;
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%edi
lea    0xedf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"mkdir <target>\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"mkdir <target>\0A\00"
define i32 @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ dead();
void live() { dead(); }


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

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

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

LLVM IR (-O2):
define void @live() {
%1 = tail call i32 (...) @dead()
ret void
}
void i2c_ASN1_BIT_STRING(void) {}


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

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

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

LLVM IR (-O2):
define void @i2c_ASN1_BIT_STRING() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __log(int /*<<< orphan*/, char *, char const *,
                         int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ stderr;
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void __err(const char *msg) { __log(stderr, "%s: %s", msg, strerror(errno)); }


x86 assembly (clang, -O0):
<__err>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %eax,%ecx
lea    0xea2(%rip),%rsi
call   1030 <__log@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__err>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2eb3(%rip),%rax
mov    (%rax),%ebp
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xebc(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <__log@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [7 x i8] c"%s: %s\00"
@errno = global i32 0
define void @__err(i8* %0) {
%2 = load i32, i32* @stderr
%3 = load i32, i32* @errno
%4 = tail call i32 @strerror(i32 %3)
%5 = tail call i32 @__log(i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
int /*<<< orphan*/ srand(unsigned int);
unsigned int time(int /*<<< orphan*/ *);
void inital(void) {
  unsigned int seed;
  seed = time(NULL);
  printf("Semance aleatoire : %u\n", seed);
  srand(seed);
}


x86 assembly (clang, -O0):
<inital>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %eax,%eax
mov    %eax,%edi
call   1050 <time@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xeb2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <srand@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inital>:
push   %rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%ebx
lea    0xebf(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <srand@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"Semance aleatoire : %u\0A\00"
define void @inital() {
%1 = alloca i32
%2 = call i32 @time(i32* null)
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = load i32, i32* %1
%6 = call i32 @srand(i32 %5)
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"Semance aleatoire : %u\0A\00"
define void @inital() {
%1 = tail call i32 @time(i32* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @srand(i32 %1)
ret void
}
int dbg_check_dir_size(struct ubifs_info *c, const struct inode *dir) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.ubifs_info = type opaque
%struct.inode = type opaque
define i32 @dbg_check_dir_size(%struct.ubifs_info* %0, %struct.inode* %1) {
%3 = alloca %struct.ubifs_info*
%4 = alloca %struct.inode*
store %struct.ubifs_info* %0, %struct.ubifs_info** %3
store %struct.inode* %1, %struct.inode** %4
ret i32 0
}

LLVM IR (-O2):
%struct.ubifs_info = type opaque
%struct.inode = type opaque
define i32 @dbg_check_dir_size(%struct.ubifs_info* nocapture readnone %0, %struct.inode* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ execvp(char *, char **);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ usleep(int);
void *funcT(void *param) {
  char *argv[3] = {"echo", "42", NULL};
  usleep(200000);
  execvp("/bin/echo", argv);
  perror("execvp");
  return NULL;
}


x86 assembly (clang, -O0):
<funcT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2cbd(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cba(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cb7(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    $0x30d40,%edi
call   1050 <usleep@plt>
lea    -0x20(%rbp),%rsi
lea    0xe91(%rip),%rdi
call   1040 <execvp@plt>
lea    0xe8f(%rip),%rdi
call   1030 <perror@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcT>:
sub    $0x18,%rsp
mov    0x2cd5(%rip),%rax
mov    %rax,0x10(%rsp)
movaps 0x2cb9(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    $0x30d40,%edi
call   1050 <usleep@plt>
lea    0xea7(%rip),%rdi
mov    %rsp,%rsi
call   1040 <execvp@plt>
lea    0xea2(%rip),%rdi
call   1030 <perror@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [5 x i8] c"echo\00"
@.str.1 = [3 x i8] c"42\00"
@__const.funcT.argv = [3 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8* null]
@.str.2 = [10 x i8] c"/bin/echo\00"
@.str.3 = [7 x i8] c"execvp\00"
define i8* @funcT(i8* %0) {
%2 = alloca i8*
%3 = alloca [3 x i8*]
store i8* %0, i8** %2
%4 = bitcast [3 x i8*]* %3 to i8*
%5 = call i32 @usleep(i32 200000)
%6 = getelementptr inbounds [3 x i8*], [3 x i8*]* %3, i64 0, i64 0
%7 = call i32 @execvp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %6)
%8 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
ret i8* null
}

LLVM IR (-O2):
@.str = [5 x i8] c"echo\00"
@.str.1 = [3 x i8] c"42\00"
@__const.funcT.argv = [3 x i8*] [i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0), i8* null]
@.str.2 = [10 x i8] c"/bin/echo\00"
@.str.3 = [7 x i8] c"execvp\00"
define noalias i8* @funcT(i8* nocapture readnone %0) {
%2 = alloca [3 x i8*]
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = tail call i32 @usleep(i32 200000)
%5 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%6 = call i32 @execvp(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i8** %5)
%7 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0))
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ program();
void parser_start() { program(); }


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

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

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

LLVM IR (-O2):
define void @parser_start() {
%1 = tail call i32 (...) @program()
ret void
}