xunge/DecIR huggingface dataset:
void foo(const int *p) {
  __builtin_prefetch(p, 0 + 1, 0 + 3);
  __builtin_prefetch(p, 1 - 0, 3 - 0);
  __builtin_prefetch(p, 1 * 1, 1 * 3);
  __builtin_prefetch(p, 1 / 1, 3 / 1);
  __builtin_prefetch(p, 3 % 2, 3 % 1);
  __builtin_prefetch(p, 0U + 1U, 0U + 3U);
  __builtin_prefetch(p, 1U - 0U, 3U - 0U);
  __builtin_prefetch(p, 1U * 1U, 1U * 3U);
  __builtin_prefetch(p, 1U / 1U, 3U / 1U);
  __builtin_prefetch(p, 3U % 2U, 3U % 1U);
}


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

x86 assembly (clang, -O2):
<foo>:
prefetcht0 (%rdi)
prefetcht0 (%rdi)
prefetcht0 (%rdi)
prefetcht0 (%rdi)
prefetchnta (%rdi)
prefetcht0 (%rdi)
prefetcht0 (%rdi)
prefetcht0 (%rdi)
prefetcht0 (%rdi)
prefetchnta (%rdi)
ret

LLVM IR (-O0):
define void @foo(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = bitcast i32* %3 to i8*
%5 = load i32*, i32** %2
%6 = bitcast i32* %5 to i8*
%7 = load i32*, i32** %2
%8 = bitcast i32* %7 to i8*
%9 = load i32*, i32** %2
%10 = bitcast i32* %9 to i8*
%11 = load i32*, i32** %2
%12 = bitcast i32* %11 to i8*
%13 = load i32*, i32** %2
%14 = bitcast i32* %13 to i8*
%15 = load i32*, i32** %2
%16 = bitcast i32* %15 to i8*
%17 = load i32*, i32** %2
%18 = bitcast i32* %17 to i8*
%19 = load i32*, i32** %2
%20 = bitcast i32* %19 to i8*
%21 = load i32*, i32** %2
%22 = bitcast i32* %21 to i8*
ret void
}

LLVM IR (-O2):
define void @foo(i32* nocapture %0) {
%2 = bitcast i32* %0 to i8*
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 3, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 3, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 3, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 3, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 0, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 3, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 3, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 3, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 3, i32 1)
tail call void @llvm.prefetch.p0i8(i8* %2, i32 1, i32 0, i32 1)
ret void
}
int dec_lv(char x, char c, int lv) {
  if (x == c)
    --lv;
  return lv;
}


x86 assembly (clang, -O0):
<dec_lv>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %edx,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
movsbl -0x2(%rbp),%ecx
cmp    %ecx,%eax
jne    112c <dec_lv+0x2c>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dec_lv>:
mov    %edx,%eax
xor    %ecx,%ecx
cmp    %sil,%dil
sete   %cl
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @dec_lv(i8 signext %0, i8 signext %1, i32 %2) {
%4 = icmp eq i8 %0, %1
%5 = sext i1 %4 to i32
%6 = add nsw i32 %5, %2
ret i32 %6
}
int test_imm_27int8_reg(signed char val) {
  return ((val) & (0x27 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_27int8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, 39
%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_27int8_reg(i8 signext %0) {
%2 = and i8 %0, 39
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ midi_clock_get_tempo();
int /*<<< orphan*/ song_set_tempo(int /*<<< orphan*/);
void midi_clock_tap_locked(void) { song_set_tempo(midi_clock_get_tempo()); }


x86 assembly (clang, -O0):
<midi_clock_tap_locked>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <midi_clock_get_tempo@plt>
mov    %eax,%edi
call   1030 <song_set_tempo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<midi_clock_tap_locked>:
push   %rax
xor    %eax,%eax
call   1040 <midi_clock_get_tempo@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <song_set_tempo@plt>

LLVM IR (-O0):
define void @midi_clock_tap_locked() {
%1 = call i32 (...) @midi_clock_get_tempo()
%2 = call i32 @song_set_tempo(i32 %1)
ret void
}

LLVM IR (-O2):
define void @midi_clock_tap_locked() {
%1 = tail call i32 (...) @midi_clock_get_tempo()
%2 = tail call i32 @song_set_tempo(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
int get_plugin_info(int opcode, char *buf, int buflen) {
  switch (opcode) {
  case 0:
    strncpy(buf, "feature vector postprocess plugin for Julius", buflen);
    break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<get_plugin_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
test   %eax,%eax
jne    1145 <get_plugin_info+0x35>
jmp    1132 <get_plugin_info+0x22>
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
lea    0xec0(%rip),%rsi
call   1030 <strncpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_plugin_info>:
test   %edi,%edi
je     1117 <get_plugin_info+0x7>
xor    %eax,%eax
ret
push   %rax
lea    0xee1(%rip),%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <strncpy@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [45 x i8] c"feature vector postprocess plugin for Julius\00"
define i32 @get_plugin_info(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
switch i32 %7, label %12 [
i32 0, label %8
]
8: ; preds = %3
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @strncpy(i8* %9, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %10)
br label %12
12: ; preds = %3, %8
ret i32 0
}

LLVM IR (-O2):
@.str = [45 x i8] c"feature vector postprocess plugin for Julius\00"
define i32 @get_plugin_info(i32 %0, i8* %1, i32 %2) {
%4 = icmp eq i32 %0, 0
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @strncpy(i8* %1, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i32 %2)
br label %7
7: ; preds = %3, %5
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ munmap(char *, int const);
void file_manager_release(char *c, const int length) { munmap(c, length); }


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

x86 assembly (clang, -O2):
<file_manager_release>:
jmp    1030 <munmap@plt>

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

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


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

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

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

LLVM IR (-O2):
define void @GCI_marquardt_cleanup() {
ret void
}
int ads(int argc, char **argv) { return 0; }


x86 assembly (clang, -O0):
<ads>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @ads(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void gsm_task() { printf("gsm_task\n"); }


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

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

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

LLVM IR (-O2):
@str = [9 x i8] c"gsm_task\00"
define void @gsm_task() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *getMethodName(unsigned short);
int /*<<< orphan*/ printROMStr(char *);
int /*<<< orphan*/ printShort(unsigned short);
void reportStackTraceElement(unsigned short methodIndex, unsigned short pc) {
  printROMStr("   at ");
  printROMStr(getMethodName(methodIndex));
  printROMStr("(:");
  printShort(pc);
  printROMStr(")\n");
}


x86 assembly (clang, -O0):
<reportStackTraceElement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
lea    0xeb3(%rip),%rdi
call   1050 <printROMStr@plt>
movzwl -0x2(%rbp),%edi
call   1040 <getMethodName@plt>
mov    %rax,%rdi
call   1050 <printROMStr@plt>
lea    0xe9d(%rip),%rdi
call   1050 <printROMStr@plt>
movzwl -0x4(%rbp),%edi
call   1030 <printShort@plt>
lea    0xe8b(%rip),%rdi
call   1050 <printROMStr@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<reportStackTraceElement>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xec2(%rip),%rdi
call   1050 <printROMStr@plt>
mov    %ebp,%edi
call   1040 <getMethodName@plt>
mov    %rax,%rdi
call   1050 <printROMStr@plt>
lea    0xeae(%rip),%rdi
call   1050 <printROMStr@plt>
mov    %ebx,%edi
call   1030 <printShort@plt>
lea    0xe9e(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <printROMStr@plt>

LLVM IR (-O0):
@.str = [7 x i8] c" at \00"
@.str.1 = [3 x i8] c"(:\00"
@.str.2 = [3 x i8] c")\0A\00"
define void @reportStackTraceElement(i16 zeroext %0, i16 zeroext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call i32 @printROMStr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%6 = load i16, i16* %3
%7 = call i8* @getMethodName(i16 zeroext %6)
%8 = call i32 @printROMStr(i8* %7)
%9 = call i32 @printROMStr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%10 = load i16, i16* %4
%11 = call i32 @printShort(i16 zeroext %10)
%12 = call i32 @printROMStr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c" at \00"
@.str.1 = [3 x i8] c"(:\00"
@.str.2 = [3 x i8] c")\0A\00"
define void @reportStackTraceElement(i16 zeroext %0, i16 zeroext %1) {
%3 = tail call i32 @printROMStr(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%4 = tail call i8* @getMethodName(i16 zeroext %0)
%5 = tail call i32 @printROMStr(i8* %4)
%6 = tail call i32 @printROMStr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @printShort(i16 zeroext %1)
%8 = tail call i32 @printROMStr(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}
/* Variables and functions */
float sinf(float const);
void glmSin3f(float out[3], const float angle[3]) {
  for (size_t i = 0; i < 3; ++i)
    out[i] = sinf(angle[i]);
}


x86 assembly (clang, -O0):
<glmSin3f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
cmpq   $0x3,-0x18(%rbp)
jae    1163 <glmSin3f+0x53>
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
call   1030 <sinf@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
movss  %xmm0,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1128 <glmSin3f+0x18>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmSin3f>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
movss  (%rsi),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,(%r14)
movss  0x4(%rbx),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,0x4(%r14)
movss  0x8(%rbx),%xmm0
call   1030 <sinf@plt>
movss  %xmm0,0x8(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @glmSin3f(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca i64
store float* %0, float** %3
store float* %1, float** %4
store i64 0, i64* %5
br label %6
6: ; preds = %18, %2
%7 = load i64, i64* %5
%8 = icmp ult i64 %7, 3
br i1 %8, label %9, label %21
9: ; preds = %6
%10 = load float*, float** %4
%11 = load i64, i64* %5
%12 = getelementptr inbounds float, float* %10, i64 %11
%13 = load float, float* %12
%14 = call float @sinf(float %13)
%15 = load float*, float** %3
%16 = load i64, i64* %5
%17 = getelementptr inbounds float, float* %15, i64 %16
store float %14, float* %17
br label %18
18: ; preds = %9
%19 = load i64, i64* %5
%20 = add i64 %19, 1
store i64 %20, i64* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @glmSin3f(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = tail call float @sinf(float %3)
store float %4, float* %0
%5 = getelementptr inbounds float, float* %1, i64 1
%6 = load float, float* %5
%7 = tail call float @sinf(float %6)
%8 = getelementptr inbounds float, float* %0, i64 1
store float %7, float* %8
%9 = getelementptr inbounds float, float* %1, i64 2
%10 = load float, float* %9
%11 = tail call float @sinf(float %10)
%12 = getelementptr inbounds float, float* %0, i64 2
store float %11, float* %12
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void foo(void) { printf("foo called.\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"foo called.\0A\00"
define void @foo() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"foo called.\00"
define void @foo() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
void free_2darray(unsigned char **array, int x) {
  int i;
  for (i = 0; i < x; i++)
    free(array[i]);
  free(array);
}


x86 assembly (clang, -O0):
<free_2darray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <free_2darray+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <free_2darray+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<free_2darray>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <free_2darray+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <free_2darray+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

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

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

/* Variables and functions */
int isspace(int);
int iswspace(wint_t c) { return c <= 255 ? isspace(c) : 0; }


x86 assembly (clang, -O0):
<iswspace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jg     1138 <iswspace+0x28>
mov    -0x4(%rbp),%edi
call   1030 <isspace@plt>
mov    %eax,-0x8(%rbp)
jmp    1142 <iswspace+0x32>
xor    %eax,%eax
mov    %eax,-0x8(%rbp)
jmp    1142 <iswspace+0x32>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iswspace>:
cmp    $0xff,%edi
jg     111d <iswspace+0xd>
jmp    1030 <isspace@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @iswspace(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sle i32 %3, 255
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 @isspace(i32 %6)
br label %9
8: ; preds = %1
br label %9
9: ; preds = %8, %5
%10 = phi i32 [ %7, %5 ], [ 0, %8 ]
ret i32 %10
}

LLVM IR (-O2):
define i32 @iswspace(i32 %0) {
%2 = icmp slt i32 %0, 256
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @isspace(i32 %0)
br label %5
5: ; preds = %1, %3
%6 = phi i32 [ %4, %3 ], [ 0, %1 ]
ret i32 %6
}
/* Variables and functions */
scalar_t__ isspace(char);
char *prv_end_of_space(char *buffer) {
  while (isspace(buffer[0] & 0xff)) {
    buffer++;
  }
  return buffer;
}


x86 assembly (clang, -O0):
<prv_end_of_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
and    $0xff,%eax
movsbl %al,%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     114b <prv_end_of_space+0x3b>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <prv_end_of_space+0xc>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prv_end_of_space>:
push   %rbx
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rbx
nopl   0x0(%rax,%rax,1)
movsbl 0x1(%rbx),%edi
add    $0x1,%rbx
call   1030 <isspace@plt>
test   %rax,%rax
jne    1120 <prv_end_of_space+0x10>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @prv_end_of_space(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %7, %2 ]
%4 = load i8, i8* %3
%5 = tail call i64 @isspace(i8 signext %4)
%6 = icmp eq i64 %5, 0
%7 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i8* %3
}
/* Variables and functions */
char *malloc(int);
int rand();
char *realloc(char *, int);
int /*<<< orphan*/ strcpy(char *, char *);
char *fn70() {
  char *result;
  result = malloc(20 + rand() % 20);
  result = realloc(result, 30 + rand() % 20);
  strcpy((char *)result, "fn70");
  return result;
}


x86 assembly (clang, -O0):
<fn70>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <rand@plt>
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x10(%rbp),%rdi
mov    $0x14,%ecx
cltd
idiv   %ecx
mov    %edx,%esi
add    $0x1e,%esi
call   1050 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xe67(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn70>:
push   %rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%edi
add    $0x14,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1060 <rand@plt>
cltq
imul   $0x66666667,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x23,%rcx
add    %edx,%ecx
shl    $0x2,%ecx
lea    (%rcx,%rcx,4),%ecx
neg    %ecx
lea    (%rax,%rcx,1),%esi
add    $0x1e,%esi
mov    %rbx,%rdi
call   1050 <realloc@plt>
mov    %rax,%rbx
lea    0xe4f(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"fn70\00"
define i8* @fn70() {
%1 = alloca i8*
%2 = call i32 (...) @rand()
%3 = srem i32 %2, 20
%4 = add nsw i32 20, %3
%5 = call i8* @malloc(i32 %4)
store i8* %5, i8** %1
%6 = load i8*, i8** %1
%7 = call i32 (...) @rand()
%8 = srem i32 %7, 20
%9 = add nsw i32 30, %8
%10 = call i8* @realloc(i8* %6, i32 %9)
store i8* %10, i8** %1
%11 = load i8*, i8** %1
%12 = call i32 @strcpy(i8* %11, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%13 = load i8*, i8** %1
ret i8* %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"fn70\00"
define i8* @fn70() {
%1 = tail call i32 (...) @rand()
%2 = srem i32 %1, 20
%3 = add nsw i32 %2, 20
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 (...) @rand()
%6 = srem i32 %5, 20
%7 = add nsw i32 %6, 30
%8 = tail call i8* @realloc(i8* %4, i32 %7)
%9 = tail call i32 @strcpy(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret i8* %8
}
/* Variables and functions */
int /*<<< orphan*/ F_OK;
scalar_t__ access(char const *, int /*<<< orphan*/);
bool w_path_exists(const char *path) { return access(path, F_OK) == 0; }


x86 assembly (clang, -O0):
<w_path_exists>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<w_path_exists>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@F_OK = global i32 0
define i32 @w_path_exists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @F_OK
%5 = call i64 @access(i8* %3, i32 %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@F_OK = global i32 0
define i32 @w_path_exists(i8* nocapture %0) {
%2 = load i32, i32* @F_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sock_sendline(char *, char *, char *);
void ircproto_identify(char *nickserv_nick, char *password) {
  sock_sendline("PRIVMSG %s IDENTIFY %s", nickserv_nick, password);
}


x86 assembly (clang, -O0):
<ircproto_identify>:
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    0xed1(%rip),%rdi
call   1030 <sock_sendline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ircproto_identify>:
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee3(%rip),%rdi
jmp    1030 <sock_sendline@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"PRIVMSG %s IDENTIFY %s\00"
define void @ircproto_identify(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 = load i8*, i8** %4
%7 = call i32 @sock_sendline(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"PRIVMSG %s IDENTIFY %s\00"
define void @ircproto_identify(i8* %0, i8* %1) {
%3 = tail call i32 @sock_sendline(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret void
}
int find_increase(int field, int toadd, int max) {
  if (field == max)
    return 0;
  if (field <= max - toadd) {
    return toadd;
  } else {
    return field + toadd - max;
  }
}


x86 assembly (clang, -O0):
<find_increase>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jne    1125 <find_increase+0x25>
movl   $0x0,-0x4(%rbp)
jmp    114d <find_increase+0x4d>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    -0xc(%rbp),%ecx
cmp    %ecx,%eax
jg     1141 <find_increase+0x41>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114d <find_increase+0x4d>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_increase>:
xor    %eax,%eax
cmp    %edx,%edi
je     1114 <find_increase+0x14>
mov    %edx,%eax
sub    %esi,%eax
cmp    %edi,%eax
jge    1112 <find_increase+0x12>
add    %edi,%esi
sub    %edx,%esi
mov    %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @find_increase(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %0, %2
br i1 %4, label %11, label %5
5: ; preds = %3
%6 = sub nsw i32 %2, %1
%7 = icmp slt i32 %6, %0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = add nsw i32 %1, %0
%10 = sub i32 %9, %2
br label %11
11: ; preds = %5, %3, %8
%12 = phi i32 [ %10, %8 ], [ 0, %3 ], [ %1, %5 ]
ret i32 %12
}
int main() {
  int sum = 0;
  do {
    sum += 1;
    break;
  } while (1);
  return sum;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %6, %0
%4 = load i32, i32* %2
%5 = add nsw i32 %4, 1
store i32 %5, i32* %2
br label %7
6: ; No predecessors!
br i1 true, label %3, label %7
7: ; preds = %6, %3
%8 = load i32, i32* %2
ret i32 %8
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Variables and functions */
int SIGINT;
int /*<<< orphan*/ printf(char *);
void sig_usr(int signo) {
  if (signo == SIGINT)
    printf("sig_usr: SIGINT abgefangen\n");
  return;
}


x86 assembly (clang, -O0):
<sig_usr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%eax
jne    1139 <sig_usr+0x29>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_usr>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    1127 <sig_usr+0x17>
lea    0xede(%rip),%rdi
jmp    1030 <puts@plt>
ret

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

LLVM IR (-O2):
@SIGINT = global i32 0
@str = [27 x i8] c"sig_usr: SIGINT abgefangen\00"
define void @sig_usr(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ BIO_METHOD;

/* Variables and functions */
int /*<<< orphan*/ free(int /*<<< orphan*/ *);
void BIO_meth_free(BIO_METHOD *biom) { free(biom); }


x86 assembly (clang, -O0):
<BIO_meth_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):
<BIO_meth_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @BIO_meth_free(i32* nocapture %0) {
%2 = tail call i32 @free(i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ m68k_disassemble(char *, unsigned int, unsigned int);
char *m68ki_disassemble_quick(unsigned int pc, unsigned int cpu_type) {
  static char buff[100];
  buff[0] = 0;
  m68k_disassemble(buff, pc, cpu_type);
  return buff;
}


x86 assembly (clang, -O0):
<m68ki_disassemble_quick>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movb   $0x0,0x2f1b(%rip)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0x2f0e(%rip),%rdi
call   1030 <m68k_disassemble@plt>
lea    0x2f02(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68ki_disassemble_quick>:
push   %rbx
mov    %esi,%edx
mov    %edi,%esi
movb   $0x0,0x2f24(%rip)
lea    0x2f1d(%rip),%rbx
mov    %rbx,%rdi
call   1030 <m68k_disassemble@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@m68ki_disassemble_quick.buff = internal global [100 x i8] zeroinitializer
define i8* @m68ki_disassemble_quick(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @m68ki_disassemble_quick.buff, i64 0, i64 0)
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = call i32 @m68k_disassemble(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @m68ki_disassemble_quick.buff, i64 0, i64 0), i32 %5, i32 %6)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @m68ki_disassemble_quick.buff, i64 0, i64 0)
}

LLVM IR (-O2):
@m68ki_disassemble_quick.buff = internal global [100 x i8] zeroinitializer
define i8* @m68ki_disassemble_quick(i32 %0, i32 %1) {
store i8 0, i8* getelementptr inbounds ([100 x i8], [100 x i8]* @m68ki_disassemble_quick.buff, i64 0, i64 0)
%3 = tail call i32 @m68k_disassemble(i8* getelementptr inbounds ([100 x i8], [100 x i8]* @m68ki_disassemble_quick.buff, i64 0, i64 0), i32 %0, i32 %1)
ret i8* getelementptr inbounds ([100 x i8], [100 x i8]* @m68ki_disassemble_quick.buff, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ dsyrk_(char *, char *, int *, int *, double *, double *,
                          int *, double *, double *, int *);
void wcc_dsyrk_(char *UPLO, char *TRANS, int *N, int *K, char *ALPHA, char *A,
                int *LDA, char *BETA, char *C, int *LDC) {
  dsyrk_(UPLO, TRANS, N, K, (double *)ALPHA, (double *)A, LDA, (double *)BETA,
         (double *)C, LDC);
}


x86 assembly (clang, -O0):
<wcc_dsyrk_>:
push   %rbp
mov    %rsp,%rbp
push   %rbx
sub    $0x58,%rsp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%rax
mov    0x18(%rbp),%rax
mov    0x10(%rbp),%rax
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %rcx,-0x28(%rbp)
mov    %r8,-0x30(%rbp)
mov    %r9,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
mov    -0x30(%rbp),%r8
mov    -0x38(%rbp),%r9
mov    0x10(%rbp),%rbx
mov    0x18(%rbp),%r11
mov    0x20(%rbp),%r10
mov    0x28(%rbp),%rax
mov    %rbx,(%rsp)
mov    %r11,0x8(%rsp)
mov    %r10,0x10(%rsp)
mov    %rax,0x18(%rsp)
call   1030 <dsyrk_@plt>
add    $0x58,%rsp
pop    %rbx
pop    %rbp
ret

x86 assembly (clang, -O2):
<wcc_dsyrk_>:
jmp    1030 <dsyrk_@plt>

LLVM IR (-O0):
define void @wcc_dsyrk_(i8* %0, i8* %1, i32* %2, i32* %3, i8* %4, i8* %5, i32* %6, i8* %7, i8* %8, i32* %9) {
%11 = alloca i8*
%12 = alloca i8*
%13 = alloca i32*
%14 = alloca i32*
%15 = alloca i8*
%16 = alloca i8*
%17 = alloca i32*
%18 = alloca i8*
%19 = alloca i8*
%20 = alloca i32*
store i8* %0, i8** %11
store i8* %1, i8** %12
store i32* %2, i32** %13
store i32* %3, i32** %14
store i8* %4, i8** %15
store i8* %5, i8** %16
store i32* %6, i32** %17
store i8* %7, i8** %18
store i8* %8, i8** %19
store i32* %9, i32** %20
%21 = load i8*, i8** %11
%22 = load i8*, i8** %12
%23 = load i32*, i32** %13
%24 = load i32*, i32** %14
%25 = load i8*, i8** %15
%26 = bitcast i8* %25 to double*
%27 = load i8*, i8** %16
%28 = bitcast i8* %27 to double*
%29 = load i32*, i32** %17
%30 = load i8*, i8** %18
%31 = bitcast i8* %30 to double*
%32 = load i8*, i8** %19
%33 = bitcast i8* %32 to double*
%34 = load i32*, i32** %20
%35 = call i32 @dsyrk_(i8* %21, i8* %22, i32* %23, i32* %24, double* %26, double* %28, i32* %29, double* %31, double* %33, i32* %34)
ret void
}

LLVM IR (-O2):
define void @wcc_dsyrk_(i8* %0, i8* %1, i32* %2, i32* %3, i8* %4, i8* %5, i32* %6, i8* %7, i8* %8, i32* %9) {
%11 = bitcast i8* %4 to double*
%12 = bitcast i8* %5 to double*
%13 = bitcast i8* %7 to double*
%14 = bitcast i8* %8 to double*
%15 = tail call i32 @dsyrk_(i8* %0, i8* %1, i32* %2, i32* %3, double* %11, double* %12, i32* %6, double* %13, double* %14, i32* %9)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ my_longjmp();
void calls_noreturn() { my_longjmp(); }


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

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

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

LLVM IR (-O2):
define void @calls_noreturn() {
%1 = tail call i32 (...) @my_longjmp()
ret void
}
/* Variables and functions */
int to_fixnum(int);
int vector_length(int *v) { return to_fixnum(v[0]); }


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

x86 assembly (clang, -O2):
<vector_length>:
mov    (%rdi),%edi
jmp    1030 <to_fixnum@plt>

LLVM IR (-O0):
define i32 @vector_length(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = call i32 @to_fixnum(i32 %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @vector_length(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = tail call i32 @to_fixnum(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ useek(int /*<<< orphan*/);
void urewind() { useek(0); }


x86 assembly (clang, -O0):
<urewind>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <useek@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<urewind>:
xor    %edi,%edi
jmp    1030 <useek@plt>

LLVM IR (-O0):
define void @urewind() {
%1 = call i32 @useek(i32 0)
ret void
}

LLVM IR (-O2):
define void @urewind() {
%1 = tail call i32 @useek(i32 0)
ret void
}
/* Variables and functions */
scalar_t__ extern_const(int);
int __attribute__((no)) foo3(int n) {
  int ret = 0;
  int i;
  for (i = 0; extern_const(i + n); n++)
    ret += extern_const(i);
  return ret;
}


x86 assembly (clang, -O0):
<foo3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    -0x4(%rbp),%edi
call   1030 <extern_const@plt>
cmp    $0x0,%rax
je     1161 <foo3+0x51>
mov    -0xc(%rbp),%edi
call   1030 <extern_const@plt>
mov    %rax,%rcx
movslq -0x8(%rbp),%rax
add    %rcx,%rax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1129 <foo3+0x19>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo3>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
call   1030 <extern_const@plt>
test   %rax,%rax
je     114a <foo3+0x3a>
add    $0x1,%ebx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %edi,%edi
call   1030 <extern_const@plt>
add    %eax,%ebp
mov    %ebx,%edi
call   1030 <extern_const@plt>
add    $0x1,%ebx
test   %rax,%rax
jne    1130 <foo3+0x20>
jmp    114c <foo3+0x3c>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @foo3(i32 %0) {
%2 = tail call i64 @extern_const(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %10, %4 ], [ %0, %1 ]
%6 = phi i32 [ %9, %4 ], [ 0, %1 ]
%7 = tail call i64 @extern_const(i32 0)
%8 = trunc i64 %7 to i32
%9 = add i32 %6, %8
%10 = add nsw i32 %5, 1
%11 = tail call i64 @extern_const(i32 %10)
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4, %1
%14 = phi i32 [ 0, %1 ], [ %9, %4 ]
ret i32 %14
}
/* Variables and functions */
int rnd_coder();
int rnd2(int min, int max) {
  if (max < min) {
    max ^= min;
    min ^= max;
    max ^= min;
  }
  return ((rnd_coder() % (max - min + 1)) + min);
}


x86 assembly (clang, -O0):
<rnd2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1145 <rnd2+0x35>
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rnd_coder@plt>
mov    -0x8(%rbp),%ecx
sub    -0x4(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
mov    %edx,%eax
add    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd2>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
cmp    %edi,%esi
mov    %edi,%ebp
cmovl  %esi,%ebp
cmovl  %edi,%ebx
xor    %eax,%eax
call   1030 <rnd_coder@plt>
sub    %ebp,%ebx
add    $0x1,%ebx
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @rnd2(i32 %0, i32 %1) {
%3 = icmp slt i32 %1, %0
%4 = select i1 %3, i32 %1, i32 %0
%5 = select i1 %3, i32 %0, i32 %1
%6 = tail call i32 (...) @rnd_coder()
%7 = sub i32 1, %4
%8 = add i32 %7, %5
%9 = srem i32 %6, %8
%10 = add nsw i32 %9, %4
ret i32 %10
}
/* Variables and functions */
int foo(int);
int xxx(void) {
  int x = 45;
  int sum;
  while (x >>= 1)
    sum += foo(x) * 2;
  return sum;
}


x86 assembly (clang, -O0):
<xxx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x2d,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     1147 <xxx+0x37>
mov    -0x4(%rbp),%edi
call   1030 <foo@plt>
shl    $0x1,%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
jmp    111f <xxx+0xf>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xxx>:
push   %rax
mov    $0x16,%edi
call   1030 <foo@plt>
mov    $0xb,%edi
call   1030 <foo@plt>
mov    $0x5,%edi
call   1030 <foo@plt>
mov    $0x2,%edi
call   1030 <foo@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <foo@plt>

LLVM IR (-O0):
define i32 @xxx() {
%1 = alloca i32
%2 = alloca i32
store i32 45, i32* %1
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %1
%5 = ashr i32 %4, 1
store i32 %5, i32* %1
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %13
7: ; preds = %3
%8 = load i32, i32* %1
%9 = call i32 @foo(i32 %8)
%10 = mul nsw i32 %9, 2
%11 = load i32, i32* %2
%12 = add nsw i32 %11, %10
store i32 %12, i32* %2
br label %3
13: ; preds = %3
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @xxx() {
%1 = tail call i32 @foo(i32 22)
%2 = tail call i32 @foo(i32 11)
%3 = tail call i32 @foo(i32 5)
%4 = tail call i32 @foo(i32 2)
%5 = tail call i32 @foo(i32 1)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int tr_ortho_usage() {
  fprintf(stderr, "Usage: treebest ortho <tree>\n");
  return 1;
}


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

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

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [30 x i8] c"Usage: treebest ortho <tree>\0A\00"
define i32 @tr_ortho_usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
void XSyncSetPriority() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @gtk_tree_view_column_get_width() {
ret void
}
int foo(int a) {
  int b = a + 10;
  return b;
}


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

x86 assembly (clang, -O2):
<foo>:
lea    0xa(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
%2 = add nsw i32 %0, 10
ret i32 %2
}
/* Type definitions */
struct linux_dirent64 {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ __NR_getdents64;
int syscall(int /*<<< orphan*/, unsigned int, struct linux_dirent64 *,
            unsigned int);
int __getdents64(unsigned int fd, struct linux_dirent64 *dirp,
                 unsigned int count) {
  return syscall(__NR_getdents64, fd, dirp, count);
}


x86 assembly (clang, -O0):
<__getdents64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eb7(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getdents64>:
mov    %edx,%ecx
mov    %rsi,%rdx
mov    %edi,%esi
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
%struct.linux_dirent64 = type { i32 }
@__NR_getdents64 = global i32 0
define i32 @__getdents64(i32 %0, %struct.linux_dirent64* %1, i32 %2) {
%4 = alloca i32
%5 = alloca %struct.linux_dirent64*
%6 = alloca i32
store i32 %0, i32* %4
store %struct.linux_dirent64* %1, %struct.linux_dirent64** %5
store i32 %2, i32* %6
%7 = load i32, i32* @__NR_getdents64
%8 = load i32, i32* %4
%9 = load %struct.linux_dirent64*, %struct.linux_dirent64** %5
%10 = load i32, i32* %6
%11 = call i32 @syscall(i32 %7, i32 %8, %struct.linux_dirent64* %9, i32 %10)
ret i32 %11
}

LLVM IR (-O2):
%struct.linux_dirent64 = type { i32 }
@__NR_getdents64 = global i32 0
define i32 @__getdents64(i32 %0, %struct.linux_dirent64* %1, i32 %2) {
%4 = load i32, i32* @__NR_getdents64
%5 = tail call i32 @syscall(i32 %4, i32 %0, %struct.linux_dirent64* %1, i32 %2)
ret i32 %5
}
/* Variables and functions */
int atan(int);
int internal_atan_i(int value) { return atan(value); }


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

x86 assembly (clang, -O2):
<internal_atan_i>:
jmp    1030 <atan@plt>

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

LLVM IR (-O2):
define i32 @internal_atan_i(i32 %0) {
%2 = tail call i32 @atan(i32 %0)
ret i32 %2
}