xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ wait1Msec(int);
void timeCondition(int value) { wait1Msec(value); }


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

x86 assembly (clang, -O2):
<timeCondition>:
jmp    1030 <wait1Msec@plt>

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

LLVM IR (-O2):
define void @timeCondition(i32 %0) {
%2 = tail call i32 @wait1Msec(i32 %0)
ret void
}
int shlib_shlibcalled() { return 5; }


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

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

LLVM IR (-O0):
define i32 @shlib_shlibcalled() {
ret i32 5
}

LLVM IR (-O2):
define i32 @shlib_shlibcalled() {
ret i32 5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void cls(void) { printf("\033[1;1H"); }


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

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

LLVM IR (-O0):
@.str = [7 x i8] c"\1B[1;1H\00"
define void @cls() {
%1 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\1B[1;1H\00"
define void @cls() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
_Bool SignalingLess(float f1, float f2) { return f1 < f2; }


x86 assembly (clang, -O0):
<SignalingLess>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
ucomiss %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<SignalingLess>:
ucomiss %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define zeroext i1 @SignalingLess(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = fcmp olt float %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @SignalingLess(float %0, float %1) {
%3 = fcmp olt float %0, %1
ret i1 %3
}
void gdk_input_source_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_input_source_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help(void) {
  printf("usage: b2c [options]\n"
         "\n"
         "-h                     show this help\n"
         "-l <line length>       line length\n"
         "-n <name>              array name and length prefix\n"
         "-s <suffix>            length suffix (default: \"len\")\n"
         "-q <qualifiers>        array and length qualifiers\n"
         "-p                     print length\n"
         "-f <character format>  printf format for each character\n"
         "-t <length type>       length type (default: size_t)\n"
         "-b <buffer length>     input buffer length\n");
}


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

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

LLVM IR (-O0):
@.str = [441 x i8] c"usage: b2c [options]\0A\0A-h show this help\0A-l <line length> line length\0A-n <name> array name and length prefix\0A-s <suffix> length suffix (default: \22len\22)\0A-q <qualifiers> array and length qualifiers\0A-p print length\0A-f <character format> printf format for each character\0A-t <length type> length type (default: size_t)\0A-b <buffer length> input buffer length\0A\00"
define void @help() {
%1 = call i32 @printf(i8* getelementptr inbounds ([441 x i8], [441 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [440 x i8] c"usage: b2c [options]\0A\0A-h show this help\0A-l <line length> line length\0A-n <name> array name and length prefix\0A-s <suffix> length suffix (default: \22len\22)\0A-q <qualifiers> array and length qualifiers\0A-p print length\0A-f <character format> printf format for each character\0A-t <length type> length type (default: size_t)\0A-b <buffer length> input buffer length\00"
define void @help() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([440 x i8], [440 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ nim_core_shutdown();
void test_class_teardown(void) { nim_core_shutdown(); }


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

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

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

LLVM IR (-O2):
define void @test_class_teardown() {
%1 = tail call i32 (...) @nim_core_shutdown()
ret void
}
void bset(cp, n, v) register unsigned char *cp;
register int n;
register int v;
{
  while (n-- > 0)
    *cp++ = v;
}


x86 assembly (clang, -O0):
<bset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0xc(%rbp)
cmp    $0x0,%eax
jle    113d <bset+0x3d>
mov    -0x10(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    110e <bset+0xe>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bset>:
test   %esi,%esi
jle    1125 <bset+0x15>
push   %rax
mov    %esi,%eax
mov    %edx,%esi
mov    %rax,%rdx
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @bset(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %1, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = trunc i32 %2 to i8
%7 = zext i32 %1 to i64
br label %8
8: ; preds = %5, %3
ret void
}
/* Variables and functions */
int mdc(long long, long long);
int /*<<< orphan*/ printf(char *, long long);
int /*<<< orphan*/ scanf(char *, long long *, long long *);
int main() {
  long long int n, m, x;
  scanf("%lld %lld", &n, &m);
  x = m;
  while (mdc(n, x) > 1)
    --x;
  printf("%lld\n", x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeba(%rip),%rdi
lea    -0x10(%rbp),%rsi
lea    -0x18(%rbp),%rdx
call   1040 <scanf@plt>
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   1050 <mdc@plt>
cmp    $0x1,%eax
jle    1182 <main+0x52>
mov    -0x20(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x20(%rbp)
jmp    115b <main+0x2b>
mov    -0x20(%rbp),%rsi
lea    0xe7d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec4(%rip),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1040 <scanf@plt>
mov    (%rsp),%rbx
nopl   (%rax)
mov    0x8(%rsp),%rdi
mov    %rbx,%rsi
call   1050 <mdc@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%eax
jg     1150 <main+0x20>
add    $0x1,%rbx
lea    0xe99(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%lld %lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i64
store i32 0, i32* %1
%5 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64* %2, i64* %3)
%6 = load i64, i64* %3
store i64 %6, i64* %4
br label %7
7: ; preds = %12, %0
%8 = load i64, i64* %2
%9 = load i64, i64* %4
%10 = call i32 @mdc(i64 %8, i64 %9)
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %15
12: ; preds = %7
%13 = load i64, i64* %4
%14 = add nsw i64 %13, -1
store i64 %14, i64* %4
br label %7
15: ; preds = %7
%16 = load i64, i64* %4
%17 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %16)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%lld %lld\00"
@.str.1 = [6 x i8] c"%lld\0A\00"
define i32 @main() {
%1 = alloca i64
%2 = alloca i64
%3 = bitcast i64* %1 to i8*
%4 = bitcast i64* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i64* %1, i64* %2)
%6 = load i64, i64* %2
br label %7
7: ; preds = %7, %0
%8 = phi i64 [ %6, %0 ], [ %12, %7 ]
%9 = load i64, i64* %1
%10 = call i32 @mdc(i64 %9, i64 %8)
%11 = icmp sgt i32 %10, 1
%12 = add nsw i64 %8, -1
br i1 %11, label %7, label %13
13: ; preds = %7
%14 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 %8)
ret i32 0
}
void reduce(int numerator, int denominator, int *reduced_numerator,
            int *reduced_denominator) {
  int r;
  int n = denominator;
  int m = numerator;
  while (n != 0) {
    r = m % n;
    m = n;
    n = r;
  }
  numerator /= m;
  *reduced_numerator = numerator;
  denominator /= m;
  *reduced_denominator = denominator;
}


x86 assembly (clang, -O0):
<reduce>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x24(%rbp)
cmpl   $0x0,-0x20(%rbp)
je     1143 <reduce+0x43>
mov    -0x24(%rbp),%eax
cltd
idivl  -0x20(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
jmp    111e <reduce+0x1e>
mov    -0x24(%rbp),%ecx
mov    -0x4(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x24(%rbp),%ecx
mov    -0x8(%rbp),%eax
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<reduce>:
mov    %rdx,%r8
mov    %esi,%r9d
mov    %edi,%esi
test   %r9d,%r9d
je     112b <reduce+0x2b>
mov    %esi,%eax
mov    %r9d,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %edx,%edi
cltd
idiv   %edi
mov    %edi,%eax
test   %edx,%edx
jne    1120 <reduce+0x20>
mov    %esi,%eax
cltd
idiv   %edi
mov    %eax,(%r8)
mov    %r9d,%eax
cltd
idiv   %edi
mov    %eax,(%rcx)
ret

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

LLVM IR (-O2):
define void @reduce(i32 %0, i32 %1, i32* nocapture writeonly %2, i32* nocapture writeonly %3) {
%5 = icmp eq i32 %1, 0
br i1 %5, label %11, label %6
6: ; preds = %4, %6
%7 = phi i32 [ %8, %6 ], [ %0, %4 ]
%8 = phi i32 [ %9, %6 ], [ %1, %4 ]
%9 = srem i32 %7, %8
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %6
11: ; preds = %6, %4
%12 = phi i32 [ %0, %4 ], [ %8, %6 ]
%13 = sdiv i32 %0, %12
store i32 %13, i32* %2
%14 = sdiv i32 %1, %12
store i32 %14, i32* %3
ret void
}
void foo5() {
  switch (0) {
  default:
    if (0) {
    }
  }
}


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

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

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

LLVM IR (-O2):
define void @foo5() {
ret void
}
/* Variables and functions */
scalar_t__ malloc(int);
int faucet(void) {
  int *x = (int *)malloc(sizeof(int) * 24);
  return 3;
}


x86 assembly (clang, -O0):
<faucet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x60,%edi
call   1030 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    $0x3,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<faucet>:
push   %rax
mov    $0x60,%edi
call   1030 <malloc@plt>
mov    $0x3,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @faucet() {
%1 = alloca i32*
%2 = call i64 @malloc(i32 96)
%3 = inttoptr i64 %2 to i32*
store i32* %3, i32** %1
ret i32 3
}

LLVM IR (-O2):
define i32 @faucet() {
%1 = tail call i64 @malloc(i32 96)
ret i32 3
}
/* Variables and functions */
int /*<<< orphan*/ malloc(int);
void malloc_stub(void) { malloc(1); }


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

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

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

LLVM IR (-O2):
define void @malloc_stub() {
%1 = tail call i32 @malloc(i32 1)
ret void
}
int isdigit(int ch) { return ch >= 0x30 && ch <= 0x39; }


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

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

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

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char *, long *);
long ToNumber(char *buf) {
  long result = 0;
  if (buf[1] == 'x' || buf[1] == 'X') {
    sscanf(buf, "%lx", &result);
  } else {
    sscanf(buf, "%ld", &result);
  }
  return result;
}


x86 assembly (clang, -O0):
<ToNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x78,%eax
je     1146 <ToNumber+0x36>
mov    -0x8(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x58,%eax
jne    115f <ToNumber+0x4f>
mov    -0x8(%rbp),%rdi
lea    0xeaf(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <sscanf@plt>
jmp    1173 <ToNumber+0x63>
mov    -0x8(%rbp),%rdi
lea    0xe9a(%rip),%rsi
lea    -0x10(%rbp),%rdx
call   1030 <sscanf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToNumber>:
push   %rax
movq   $0x0,(%rsp)
mov    0x1(%rdi),%al
and    $0xdf,%al
cmp    $0x58,%al
lea    0xed9(%rip),%rax
lea    0xed6(%rip),%rsi
cmove  %rax,%rsi
mov    %rsp,%rdx
call   1030 <sscanf@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lx\00"
@.str.1 = [4 x i8] c"%ld\00"
define i64 @ToNumber(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
store i64 0, i64* %3
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = icmp eq i32 %7, 120
br i1 %8, label %15, label %9
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 88
br i1 %14, label %15, label %18
15: ; preds = %9, %1
%16 = load i8*, i8** %2
%17 = call i32 @sscanf(i8* %16, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
br label %21
18: ; preds = %9
%19 = load i8*, i8** %2
%20 = call i32 @sscanf(i8* %19, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i64* %3)
br label %21
21: ; preds = %18, %15
%22 = load i64, i64* %3
ret i64 %22
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lx\00"
@.str.1 = [4 x i8] c"%ld\00"
define i64 @ToNumber(i8* nocapture %0) {
%2 = alloca i64
%3 = bitcast i64* %2 to i8*
store i64 0, i64* %2
%4 = getelementptr inbounds i8, i8* %0, i64 1
%5 = load i8, i8* %4
%6 = and i8 %5, -33
%7 = icmp eq i8 %6, 88
%8 = select i1 %7, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0)
%9 = call i32 @sscanf(i8* %0, i8* %8, i64* %2)
%10 = load i64, i64* %2
ret i64 %10
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ caller;

/* Variables and functions */
int accept(int, struct sockaddr *, int *);
int accept_connection(int s) {
  struct sockaddr_in caller;
  int length = sizeof(caller);
  int msgsock = accept(s, (struct sockaddr *)&caller, &length);
  return msgsock;
}


x86 assembly (clang, -O0):
<accept_connection>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x4,-0xc(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
lea    -0xc(%rbp),%rdx
call   1030 <accept@plt>
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<accept_connection>:
sub    $0x18,%rsp
movl   $0x4,0xc(%rsp)
lea    0x10(%rsp),%rsi
lea    0xc(%rsp),%rdx
call   1030 <accept@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @accept_connection(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.sockaddr_in
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %2
store i32 4, i32* %4
%6 = load i32, i32* %2
%7 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%8 = call i32 @accept(i32 %6, %struct.sockaddr* %7, i32* %4)
store i32 %8, i32* %5
%9 = load i32, i32* %5
ret i32 %9
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @accept_connection(i32 %0) {
%2 = alloca %struct.sockaddr_in
%3 = alloca i32
%4 = bitcast %struct.sockaddr_in* %2 to i8*
%5 = bitcast i32* %3 to i8*
store i32 4, i32* %3
%6 = bitcast %struct.sockaddr_in* %2 to %struct.sockaddr*
%7 = call i32 @accept(i32 %0, %struct.sockaddr* %6, i32* %3)
ret i32 %7
}
/* Variables and functions */
unsigned char gfMult2(unsigned char);
unsigned char gfMult3(unsigned char x) { return gfMult2(x) ^ x; }


x86 assembly (clang, -O0):
<gfMult3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <gfMult2@plt>
movzbl %al,%eax
movzbl -0x1(%rbp),%ecx
xor    %ecx,%eax
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gfMult3>:
push   %rbx
mov    %edi,%ebx
call   1030 <gfMult2@plt>
xor    %bl,%al
pop    %rbx
ret

LLVM IR (-O0):
define zeroext i8 @gfMult3(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call zeroext i8 @gfMult2(i8 zeroext %3)
%5 = zext i8 %4 to i32
%6 = load i8, i8* %2
%7 = zext i8 %6 to i32
%8 = xor i32 %5, %7
%9 = trunc i32 %8 to i8
ret i8 %9
}

LLVM IR (-O2):
define zeroext i8 @gfMult3(i8 zeroext %0) {
%2 = tail call zeroext i8 @gfMult2(i8 zeroext %0)
%3 = xor i8 %2, %0
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ free_list();
int /*<<< orphan*/ populate();
int /*<<< orphan*/ print_entries_all();
int /*<<< orphan*/ printf(char *);
void test_clear_program() {
  printf(
      "====================================================================\n");
  printf("TESTING CLEAR PROGRAM...\n");
  populate();
  free_list();
  print_entries_all();
}


x86 assembly (clang, -O0):
<test_clear_program>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
lea    0xeef(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <populate@plt>
mov    $0x0,%al
call   1060 <free_list@plt>
mov    $0x0,%al
call   1030 <print_entries_all@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_clear_program>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <puts@plt>
lea    0xef1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <populate@plt>
xor    %eax,%eax
call   1060 <free_list@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <print_entries_all@plt>

LLVM IR (-O0):
@.str = [70 x i8] c"====================================================================\0A\00"
@.str.1 = [26 x i8] c"TESTING CLEAR PROGRAM...\0A\00"
define void @test_clear_program() {
%1 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @populate()
%4 = call i32 (...) @free_list()
%5 = call i32 (...) @print_entries_all()
ret void
}

LLVM IR (-O2):
@str = [69 x i8] c"====================================================================\00"
@str.2 = [25 x i8] c"TESTING CLEAR PROGRAM...\00"
define void @test_clear_program() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 (...) @populate()
%4 = tail call i32 (...) @free_list()
%5 = tail call i32 (...) @print_entries_all()
ret void
}
int main() {
  int length = sizeof(int);
  char c1[length];
  char c2[sizeof(int)];
  return sizeof c1;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x10(%rbp)
mov    %rax,-0x18(%rbp)
mov    %eax,-0x4(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rsp
mov    -0x4(%rbp),%eax
mov    %rbp,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca [4 x i8]
store i32 0, i32* %1
store i32 4, i32* %2
%6 = load i32, i32* %2
%7 = zext i32 %6 to i64
%8 = call i8* @llvm.stacksave()
store i8* %8, i8** %3
%9 = alloca i8, i64 %7
store i64 %7, i64* %4
%10 = trunc i64 %7 to i32
store i32 %10, i32* %1
%11 = load i8*, i8** %3
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @main() {
ret i32 4
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void barebox_free(void *ptr) { free(ptr); }


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

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

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

LLVM IR (-O2):
define void @barebox_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setuid(int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
int main() {
  setuid(0);
  system("python /home/santiago/.xmonad/brightness_adjust.py +");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [53 x i8] c"python /home/santiago/.xmonad/brightness_adjust.py +\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @setuid(i32 0)
%3 = call i32 @system(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [53 x i8] c"python /home/santiago/.xmonad/brightness_adjust.py +\00"
define i32 @main() {
%1 = tail call i32 @setuid(i32 0)
%2 = tail call i32 @system(i8* getelementptr inbounds ([53 x i8], [53 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
scalar_t__ big_inversion_thread(int);
void *big_inversion_thread_wrap(void *v) {
  return (void *)(intptr_t)big_inversion_thread((int)(intptr_t)v);
}


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

x86 assembly (clang, -O2):
<big_inversion_thread_wrap>:
jmp    1030 <big_inversion_thread@plt>

LLVM IR (-O0):
define i8* @big_inversion_thread_wrap(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = trunc i64 %4 to i32
%6 = call i64 @big_inversion_thread(i32 %5)
%7 = inttoptr i64 %6 to i8*
ret i8* %7
}

LLVM IR (-O2):
define i8* @big_inversion_thread_wrap(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i64 @big_inversion_thread(i32 %3)
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
float sqrtf(float);
float vec3_length(float *a) {
  float x = a[0];
  float y = a[1];
  float z = a[2];
  return sqrtf(x * x + y * y + z * z);
}


x86 assembly (clang, -O0):
<vec3_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0xc(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm0
mulss  -0x10(%rbp),%xmm0
mulss  %xmm2,%xmm1
addss  %xmm0,%xmm1
movss  -0x14(%rbp),%xmm0
movss  -0x14(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
call   1030 <sqrtf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<vec3_length>:
movss  (%rdi),%xmm1
movss  0x4(%rdi),%xmm2
movss  0x8(%rdi),%xmm0
mulss  %xmm2,%xmm2
mulss  %xmm1,%xmm1
addss  %xmm2,%xmm1
mulss  %xmm0,%xmm0
addss  %xmm1,%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     113f <vec3_length+0x2f>
sqrtss %xmm0,%xmm0
ret
jmp    1030 <sqrtf@plt>

LLVM IR (-O0):
define float @vec3_length(float* %0) {
%2 = alloca float*
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float* %0, float** %2
%6 = load float*, float** %2
%7 = getelementptr inbounds float, float* %6, i64 0
%8 = load float, float* %7
store float %8, float* %3
%9 = load float*, float** %2
%10 = getelementptr inbounds float, float* %9, i64 1
%11 = load float, float* %10
store float %11, float* %4
%12 = load float*, float** %2
%13 = getelementptr inbounds float, float* %12, i64 2
%14 = load float, float* %13
store float %14, float* %5
%15 = load float, float* %3
%16 = load float, float* %3
%17 = load float, float* %4
%18 = load float, float* %4
%19 = fmul float %17, %18
%20 = call float @llvm.fmuladd.f32(float %15, float %16, float %19)
%21 = load float, float* %5
%22 = load float, float* %5
%23 = call float @llvm.fmuladd.f32(float %21, float %22, float %20)
%24 = call float @sqrtf(float %23)
ret float %24
}

LLVM IR (-O2):
define float @vec3_length(float* nocapture %0) {
%2 = load float, float* %0
%3 = getelementptr inbounds float, float* %0, i64 1
%4 = load float, float* %3
%5 = getelementptr inbounds float, float* %0, i64 2
%6 = load float, float* %5
%7 = fmul float %4, %4
%8 = tail call float @llvm.fmuladd.f32(float %2, float %2, float %7)
%9 = tail call float @llvm.fmuladd.f32(float %6, float %6, float %8)
%10 = tail call float @sqrtf(float %9)
ret float %10
}
unsigned short int to_shortintconvertor(unsigned char array[]) {
  unsigned short int n;
  n = array[0];
  n <<= 8;
  n |= array[1];
  return n;
}


x86 assembly (clang, -O0):
<to_shortintconvertor>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
shl    $0x8,%eax
mov    %ax,-0xa(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x1(%rax),%ecx
movzwl -0xa(%rbp),%eax
or     %ecx,%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<to_shortintconvertor>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

LLVM IR (-O0):
define zeroext i16 @to_shortintconvertor(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
store i16 %7, i16* %3
%8 = load i16, i16* %3
%9 = zext i16 %8 to i32
%10 = shl i32 %9, 8
%11 = trunc i32 %10 to i16
store i16 %11, i16* %3
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 1
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = load i16, i16* %3
%17 = zext i16 %16 to i32
%18 = or i32 %17, %15
%19 = trunc i32 %18 to i16
store i16 %19, i16* %3
%20 = load i16, i16* %3
ret i16 %20
}

LLVM IR (-O2):
define zeroext i16 @to_shortintconvertor(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *, size_t);
void oom_error(const char *fn, size_t size) {
  printf("%s: unable to allocate %zu bytes: %m\n", fn, size);
  exit(1);
}


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

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

LLVM IR (-O0):
@.str = [38 x i8] c"%s: unable to allocate %zu bytes: %m\0A\00"
define void @oom_error(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %5, i64 %6)
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [38 x i8] c"%s: unable to allocate %zu bytes: %m\0A\00"
define void @oom_error(i8* %0, i64 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %1)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ addnchar(char *, long);
int /*<<< orphan*/ closeandpush();
char *luaL_check_lstr(int, long *);
scalar_t__ luaL_check_number(int);
int /*<<< orphan*/ luaL_resetbuffer();
void str_rep(void) {
  long l;
  char *s = luaL_check_lstr(1, &l);
  int n = (int)luaL_check_number(2);
  luaL_resetbuffer();
  while (n-- > 0)
    addnchar(s, l);
  closeandpush();
}


x86 assembly (clang, -O0):
<str_rep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    $0x1,%edi
lea    -0x8(%rbp),%rsi
call   1070 <luaL_check_lstr@plt>
mov    %rax,-0x10(%rbp)
mov    $0x2,%edi
call   1040 <luaL_check_number@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1060 <luaL_resetbuffer@plt>
mov    -0x14(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x14(%rbp)
cmp    $0x0,%eax
jle    11a4 <str_rep+0x54>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <addnchar@plt>
jmp    117e <str_rep+0x2e>
mov    $0x0,%al
call   1050 <closeandpush@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_rep>:
push   %r14
push   %rbx
push   %rax
mov    %rsp,%rsi
mov    $0x1,%edi
call   1070 <luaL_check_lstr@plt>
mov    %rax,%r14
mov    $0x2,%edi
call   1040 <luaL_check_number@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <luaL_resetbuffer@plt>
test   %ebx,%ebx
jle    1194 <str_rep+0x44>
add    $0x1,%ebx
nop
mov    (%rsp),%rsi
mov    %r14,%rdi
call   1030 <addnchar@plt>
add    $0xffffffff,%ebx
cmp    $0x1,%ebx
ja     1180 <str_rep+0x30>
xor    %eax,%eax
call   1050 <closeandpush@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @str_rep() {
%1 = alloca i64
%2 = alloca i8*
%3 = alloca i32
%4 = call i8* @luaL_check_lstr(i32 1, i64* %1)
store i8* %4, i8** %2
%5 = call i64 @luaL_check_number(i32 2)
%6 = trunc i64 %5 to i32
store i32 %6, i32* %3
%7 = call i32 (...) @luaL_resetbuffer()
br label %8
8: ; preds = %12, %0
%9 = load i32, i32* %3
%10 = add nsw i32 %9, -1
store i32 %10, i32* %3
%11 = icmp sgt i32 %9, 0
br i1 %11, label %12, label %16
12: ; preds = %8
%13 = load i8*, i8** %2
%14 = load i64, i64* %1
%15 = call i32 @addnchar(i8* %13, i64 %14)
br label %8
16: ; preds = %8
%17 = call i32 (...) @closeandpush()
ret void
}

LLVM IR (-O2):
define void @str_rep() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i8* @luaL_check_lstr(i32 1, i64* %1)
%4 = call i64 @luaL_check_number(i32 2)
%5 = trunc i64 %4 to i32
%6 = call i32 (...) @luaL_resetbuffer()
%7 = icmp sgt i32 %5, 0
br i1 %7, label %8, label %14
8: ; preds = %0, %8
%9 = phi i32 [ %10, %8 ], [ %5, %0 ]
%10 = add nsw i32 %9, -1
%11 = load i64, i64* %1
%12 = call i32 @addnchar(i8* %3, i64 %11)
%13 = icmp ugt i32 %9, 1
br i1 %13, label %8, label %14
14: ; preds = %8, %0
%15 = call i32 (...) @closeandpush()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ MD5_CTX;

/* Variables and functions */
int /*<<< orphan*/ md5_block_data_order(int /*<<< orphan*/ *,
                                        unsigned char const *, int);
void MD5_Transform(MD5_CTX *c, const unsigned char *data) {
  md5_block_data_order(c, data, 1);
}


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

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

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

LLVM IR (-O2):
define void @MD5_Transform(i32* %0, i8* %1) {
%3 = tail call i32 @md5_block_data_order(i32* %0, i8* %1, i32 1)
ret void
}
void ff_hevc_put_hevc_qpel_v12_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_qpel_v12_10_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int i;
  switch (i) {
  case 0:
  case 1:
    assert(i == 0 || i == 1);
    break;
  case 2:
    assert(i == 2);
    break;
  default:
    assert(i != 0 && i != 1 && i != 2);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
sub    $0x2,%eax
jb     1144 <main+0x34>
jmp    1133 <main+0x23>
mov    -0xc(%rbp),%eax
sub    $0x2,%eax
je     116f <main+0x5f>
jmp    1185 <main+0x75>
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xd(%rbp)
je     115d <main+0x4d>
cmpl   $0x1,-0x8(%rbp)
sete   %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    11ba <main+0xaa>
cmpl   $0x2,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
jmp    11ba <main+0xaa>
xor    %eax,%eax
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0xe(%rbp)
je     11ad <main+0x9d>
xor    %eax,%eax
cmpl   $0x1,-0x8(%rbp)
mov    %al,-0xe(%rbp)
je     11ad <main+0x9d>
cmpl   $0x2,-0x8(%rbp)
setne  %al
mov    %al,-0xe(%rbp)
mov    -0xe(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%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
%2 = alloca i32
store i32 0, i32* %1
%3 = load i32, i32* %2
switch i32 %3, label %19 [
i32 0, label %4
i32 1, label %4
i32 2, label %14
]
4: ; preds = %0, %0
%5 = load i32, i32* %2
%6 = icmp eq i32 %5, 0
br i1 %6, label %10, label %7
7: ; preds = %4
%8 = load i32, i32* %2
%9 = icmp eq i32 %8, 1
br label %10
10: ; preds = %7, %4
%11 = phi i1 [ true, %4 ], [ %9, %7 ]
%12 = zext i1 %11 to i32
%13 = call i32 @assert(i32 %12)
br label %32
14: ; preds = %0
%15 = load i32, i32* %2
%16 = icmp eq i32 %15, 2
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
br label %32
19: ; preds = %0
%20 = load i32, i32* %2
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %28
22: ; preds = %19
%23 = load i32, i32* %2
%24 = icmp ne i32 %23, 1
br i1 %24, label %25, label %28
25: ; preds = %22
%26 = load i32, i32* %2
%27 = icmp ne i32 %26, 2
br label %28
28: ; preds = %25, %22, %19
%29 = phi i1 [ false, %22 ], [ false, %19 ], [ %27, %25 ]
%30 = zext i1 %29 to i32
%31 = call i32 @assert(i32 %30)
br label %32
32: ; preds = %28, %14, %10
%33 = load i32, i32* %1
ret i32 %33
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
int do_606() { return 606; }


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

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

LLVM IR (-O0):
define i32 @do_606() {
ret i32 606
}

LLVM IR (-O2):
define i32 @do_606() {
ret i32 606
}
void vsi_core_close_user(void) { return; }


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

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

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

LLVM IR (-O2):
define void @vsi_core_close_user() {
ret void
}
void subvf(double *result, const double *s1, const double s2) {
  result[0] = s1[0] - s2;
  result[1] = s1[1] - s2;
  result[2] = s1[2] - s2;
}


x86 assembly (clang, -O0):
<subvf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x8(%rax)
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
subsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,0x10(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<subvf>:
movsd  (%rsi),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,(%rdi)
movsd  0x8(%rsi),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x8(%rdi)
movsd  0x10(%rsi),%xmm1
subsd  %xmm0,%xmm1
movsd  %xmm1,0x10(%rdi)
ret

LLVM IR (-O0):
define void @subvf(double* %0, double* %1, double %2) {
%4 = alloca double*
%5 = alloca double*
%6 = alloca double
store double* %0, double** %4
store double* %1, double** %5
store double %2, double* %6
%7 = load double*, double** %5
%8 = getelementptr inbounds double, double* %7, i64 0
%9 = load double, double* %8
%10 = load double, double* %6
%11 = fsub double %9, %10
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 0
store double %11, double* %13
%14 = load double*, double** %5
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = load double, double* %6
%18 = fsub double %16, %17
%19 = load double*, double** %4
%20 = getelementptr inbounds double, double* %19, i64 1
store double %18, double* %20
%21 = load double*, double** %5
%22 = getelementptr inbounds double, double* %21, i64 2
%23 = load double, double* %22
%24 = load double, double* %6
%25 = fsub double %23, %24
%26 = load double*, double** %4
%27 = getelementptr inbounds double, double* %26, i64 2
store double %25, double* %27
ret void
}

LLVM IR (-O2):
define void @subvf(double* nocapture writeonly %0, double* nocapture %1, double %2) {
%4 = load double, double* %1
%5 = fsub double %4, %2
store double %5, double* %0
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = fsub double %7, %2
%9 = getelementptr inbounds double, double* %0, i64 1
store double %8, double* %9
%10 = getelementptr inbounds double, double* %1, i64 2
%11 = load double, double* %10
%12 = fsub double %11, %2
%13 = getelementptr inbounds double, double* %0, i64 2
store double %12, double* %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void safefree(char *fv) {
  if (fv != NULL)
    free(fv);
}


x86 assembly (clang, -O0):
<safefree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1130 <safefree+0x20>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safefree>:
test   %rdi,%rdi
je     111a <safefree+0xa>
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @safefree(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ increment(int *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i = 10;
  printf("%d\n", i);
  increment(&i);
  printf("%d\n", i);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0xa,0xc(%rsp)
lea    0xecc(%rip),%rbx
mov    %rbx,%rdi
mov    $0xa,%esi
call   1040 <printf@plt>
lea    0xc(%rsp),%rdi
call   1030 <increment@plt>
mov    0xc(%rsp),%esi
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 10, i32* %1
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 10)
%4 = call i32 @increment(i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
_Bool add_overflow_long_long(long long a, long long b) {
  return (b > 0 && a > 0x7fffffffffffffffLL - b) ||
         (b < 0 && a < (-0x7fffffffffffffffLL - 1) - b);
}


x86 assembly (clang, -O0):
<add_overflow_long_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jle    1137 <add_overflow_long_long+0x37>
mov    -0x8(%rbp),%rcx
movabs $0x7fffffffffffffff,%rdx
ff ff 7f
sub    -0x10(%rbp),%rdx
mov    $0x1,%al
cmp    %rdx,%rcx
mov    %al,-0x11(%rbp)
jg     1168 <add_overflow_long_long+0x68>
xor    %eax,%eax
cmpq   $0x0,-0x10(%rbp)
mov    %al,-0x12(%rbp)
jge    1162 <add_overflow_long_long+0x62>
mov    -0x8(%rbp),%rax
movabs $0x8000000000000000,%rcx
sub    -0x10(%rbp),%rcx
cmp    %rcx,%rax
setl   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_overflow_long_long>:
movabs $0x7fffffffffffffff,%rcx
ff ff 7f
sub    %rsi,%rcx
test   %rsi,%rsi
jle    111a <add_overflow_long_long+0x1a>
mov    $0x1,%al
cmp    %rdi,%rcx
jge    111a <add_overflow_long_long+0x1a>
ret
test   %rsi,%rsi
sets   %dl
add    $0x1,%rcx
cmp    %rdi,%rcx
setg   %al
and    %dl,%al
ret

LLVM IR (-O0):
define zeroext i1 @add_overflow_long_long(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = icmp sgt i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = sub nsw i64 9223372036854775807, %9
%11 = icmp sgt i64 %8, %10
br i1 %11, label %22, label %12
12: ; preds = %7, %2
%13 = load i64, i64* %4
%14 = icmp slt i64 %13, 0
br i1 %14, label %15, label %20
15: ; preds = %12
%16 = load i64, i64* %3
%17 = load i64, i64* %4
%18 = sub nsw i64 -9223372036854775808, %17
%19 = icmp slt i64 %16, %18
br label %20
20: ; preds = %15, %12
%21 = phi i1 [ false, %12 ], [ %19, %15 ]
br label %22
22: ; preds = %20, %7
%23 = phi i1 [ true, %7 ], [ %21, %20 ]
ret i1 %23
}

LLVM IR (-O2):
define zeroext i1 @add_overflow_long_long(i64 %0, i64 %1) {
%3 = icmp sgt i64 %1, 0
%4 = sub nsw i64 9223372036854775807, %1
%5 = icmp slt i64 %4, %0
%6 = select i1 %3, i1 %5, i1 false
br i1 %6, label %12, label %7
7: ; preds = %2
%8 = icmp slt i64 %1, 0
%9 = sub nsw i64 -9223372036854775808, %1
%10 = icmp sgt i64 %9, %0
%11 = select i1 %8, i1 %10, i1 false
br label %12
12: ; preds = %2, %7
%13 = phi i1 [ %11, %7 ], [ true, %2 ]
ret i1 %13
}
/* Variables and functions */
int /*<<< orphan*/ nmm_get_cpu(int *, int *);
void NMM_GET_CPU_(int *c, int *i) { nmm_get_cpu(c, i); }


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

x86 assembly (clang, -O2):
<NMM_GET_CPU_>:
jmp    1030 <nmm_get_cpu@plt>

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

LLVM IR (-O2):
define void @NMM_GET_CPU_(i32* %0, i32* %1) {
%3 = tail call i32 @nmm_get_cpu(i32* %0, i32* %1)
ret void
}