xunge/DecIR huggingface dataset:
int odml_get_vstream_id(int id, unsigned char res[]) {
  unsigned char *p = (unsigned char *)&id;
  id = (id);
  if (p[2] == 'd') {
    if (res) {
      res[0] = p[0];
      res[1] = p[1];
    }
    return 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<odml_get_vstream_id>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x18(%rbp),%rax
movzbl 0x2(%rax),%eax
cmp    $0x64,%eax
jne    115b <odml_get_vstream_id+0x5b>
cmpq   $0x0,-0x10(%rbp)
je     114f <odml_get_vstream_id+0x4f>
mov    -0x18(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
mov    0x1(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
movl   $0x1,-0x4(%rbp)
jmp    1162 <odml_get_vstream_id+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<odml_get_vstream_id>:
mov    %edi,%ecx
and    $0xff0000,%ecx
xor    %eax,%eax
cmp    $0x640000,%ecx
jne    1127 <odml_get_vstream_id+0x27>
mov    $0x1,%eax
test   %rsi,%rsi
je     1127 <odml_get_vstream_id+0x27>
mov    %edi,%ecx
shr    $0x8,%ecx
mov    %dil,(%rsi)
mov    %cl,0x1(%rsi)
ret

LLVM IR (-O0):
define i32 @odml_get_vstream_id(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
store i32 %0, i32* %4
store i8* %1, i8** %5
%7 = bitcast i32* %4 to i8*
store i8* %7, i8** %6
%8 = load i32, i32* %4
store i32 %8, i32* %4
%9 = load i8*, i8** %6
%10 = getelementptr inbounds i8, i8* %9, i64 2
%11 = load i8, i8* %10
%12 = zext i8 %11 to i32
%13 = icmp eq i32 %12, 100
br i1 %13, label %14, label %29
14: ; preds = %2
%15 = load i8*, i8** %5
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %28
17: ; preds = %14
%18 = load i8*, i8** %6
%19 = getelementptr inbounds i8, i8* %18, i64 0
%20 = load i8, i8* %19
%21 = load i8*, i8** %5
%22 = getelementptr inbounds i8, i8* %21, i64 0
store i8 %20, i8* %22
%23 = load i8*, i8** %6
%24 = getelementptr inbounds i8, i8* %23, i64 1
%25 = load i8, i8* %24
%26 = load i8*, i8** %5
%27 = getelementptr inbounds i8, i8* %26, i64 1
store i8 %25, i8* %27
br label %28
28: ; preds = %17, %14
store i32 1, i32* %3
br label %30
29: ; preds = %2
store i32 0, i32* %3
br label %30
30: ; preds = %29, %28
%31 = load i32, i32* %3
ret i32 %31
}

LLVM IR (-O2):
define i32 @odml_get_vstream_id(i32 %0, i8* writeonly %1) {
%3 = trunc i32 %0 to i8
%4 = lshr i32 %0, 8
%5 = trunc i32 %4 to i8
%6 = and i32 %0, 16711680
%7 = icmp eq i32 %6, 6553600
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = icmp eq i8* %1, null
br i1 %9, label %12, label %10
10: ; preds = %8
store i8 %3, i8* %1
%11 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %5, i8* %11
br label %12
12: ; preds = %2, %8, %10
%13 = phi i32 [ 1, %10 ], [ 1, %8 ], [ 0, %2 ]
ret i32 %13
}
unsigned long long horizontal_mirror(unsigned long long b) {
  b = ((b >> 1) & 0x5555555555555555ULL) | ((b << 1) & 0xAAAAAAAAAAAAAAAAULL);
  b = ((b >> 2) & 0x3333333333333333ULL) | ((b << 2) & 0xCCCCCCCCCCCCCCCCULL);
  b = ((b >> 4) & 0x0F0F0F0F0F0F0F0FULL) | ((b << 4) & 0xF0F0F0F0F0F0F0F0ULL);
  return b;
}


x86 assembly (clang, -O0):
<horizontal_mirror>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
movabs $0x5555555555555555,%rcx
55 55 55
and    %rcx,%rax
mov    -0x8(%rbp),%rcx
shl    $0x1,%rcx
movabs $0xaaaaaaaaaaaaaaaa,%rdx
aa aa aa
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x2,%rax
movabs $0x3333333333333333,%rcx
33 33 33
and    %rcx,%rax
mov    -0x8(%rbp),%rcx
shl    $0x2,%rcx
movabs $0xcccccccccccccccc,%rdx
cc cc cc
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x4,%rax
movabs $0xf0f0f0f0f0f0f0f,%rcx
0f 0f 0f
and    %rcx,%rax
mov    -0x8(%rbp),%rcx
shl    $0x4,%rcx
movabs $0xf0f0f0f0f0f0f0f0,%rdx
f0 f0 f0
and    %rdx,%rcx
or     %rcx,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<horizontal_mirror>:
movabs $0xd555555555555555,%rax
55 55 d5
and    %rdi,%rax
shr    %rdi
movabs $0x5555555555555555,%rcx
55 55 55
and    %rdi,%rcx
lea    (%rcx,%rax,2),%rax
movabs $0xf333333333333333,%rcx
33 33 f3
and    %rax,%rcx
shr    $0x2,%rax
movabs $0x3333333333333333,%rdx
33 33 33
and    %rax,%rdx
lea    (%rdx,%rcx,4),%rcx
mov    %rcx,%rax
shr    $0x4,%rax
movabs $0xf0f0f0f0f0f0f0f,%rdx
0f 0f 0f
and    %rax,%rdx
shl    $0x4,%rcx
movabs $0xf0f0f0f0f0f0f0f0,%rax
f0 f0 f0
and    %rcx,%rax
or     %rdx,%rax
ret

LLVM IR (-O0):
define i64 @horizontal_mirror(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 1
%5 = and i64 %4, 6148914691236517205
%6 = load i64, i64* %2
%7 = shl i64 %6, 1
%8 = and i64 %7, -6148914691236517206
%9 = or i64 %5, %8
store i64 %9, i64* %2
%10 = load i64, i64* %2
%11 = lshr i64 %10, 2
%12 = and i64 %11, 3689348814741910323
%13 = load i64, i64* %2
%14 = shl i64 %13, 2
%15 = and i64 %14, -3689348814741910324
%16 = or i64 %12, %15
store i64 %16, i64* %2
%17 = load i64, i64* %2
%18 = lshr i64 %17, 4
%19 = and i64 %18, 1085102592571150095
%20 = load i64, i64* %2
%21 = shl i64 %20, 4
%22 = and i64 %21, -1085102592571150096
%23 = or i64 %19, %22
store i64 %23, i64* %2
%24 = load i64, i64* %2
ret i64 %24
}

LLVM IR (-O2):
define i64 @horizontal_mirror(i64 %0) {
%2 = lshr i64 %0, 1
%3 = and i64 %2, 6148914691236517205
%4 = shl i64 %0, 1
%5 = and i64 %4, -6148914691236517206
%6 = or i64 %3, %5
%7 = lshr i64 %6, 2
%8 = and i64 %7, 3689348814741910323
%9 = shl i64 %6, 2
%10 = and i64 %9, -3689348814741910324
%11 = or i64 %8, %10
%12 = lshr i64 %11, 4
%13 = and i64 %12, 1085102592571150095
%14 = shl i64 %11, 4
%15 = and i64 %14, -1085102592571150096
%16 = or i64 %13, %15
ret i64 %16
}
/* Variables and functions */
int dointtest(int, int, int, int, int);
bool inttest() { return dointtest(123, 456, 789, 4444, 55555); }


x86 assembly (clang, -O0):
<inttest>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7b,%edi
mov    $0x1c8,%esi
mov    $0x315,%edx
mov    $0x115c,%ecx
mov    $0xd903,%r8d
call   1030 <dointtest@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<inttest>:
mov    $0x7b,%edi
mov    $0x1c8,%esi
mov    $0x315,%edx
mov    $0x115c,%ecx
mov    $0xd903,%r8d
jmp    1030 <dointtest@plt>

LLVM IR (-O0):
define i32 @inttest() {
%1 = call i32 @dointtest(i32 123, i32 456, i32 789, i32 4444, i32 55555)
ret i32 %1
}

LLVM IR (-O2):
define i32 @inttest() {
%1 = tail call i32 @dointtest(i32 123, i32 456, i32 789, i32 4444, i32 55555)
ret i32 %1
}
void g_io_channel_get_encoding() {}


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

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

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

LLVM IR (-O2):
define void @g_io_channel_get_encoding() {
ret void
}
void fence() { __asm volatile("mfence" ::: "memory"); }


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

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

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

LLVM IR (-O2):
define void @fence() {
tail call void asm sideeffect "mfence", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int omap_rev();
int is_omap242x(void) {
  return (((omap_rev() >> 20) & 0x0fff) == (0x242)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<is_omap242x>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <omap_rev@plt>
mov    %eax,%edx
sar    $0x14,%edx
and    $0xfff,%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x242,%edx
cmove  %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_omap242x>:
push   %rax
xor    %eax,%eax
call   1030 <omap_rev@plt>
and    $0xfff00000,%eax
xor    %ecx,%ecx
cmp    $0x24200000,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_omap242x() {
%1 = call i32 (...) @omap_rev()
%2 = ashr i32 %1, 20
%3 = and i32 %2, 4095
%4 = icmp eq i32 %3, 578
%5 = zext i1 %4 to i64
%6 = select i1 %4, i32 1, i32 0
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_omap242x() {
%1 = tail call i32 (...) @omap_rev()
%2 = and i32 %1, -1048576
%3 = icmp eq i32 %2, 606076928
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ia64_pal_halt_light();
void arch_safe_halt(void) { ia64_pal_halt_light(); }


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

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

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

LLVM IR (-O2):
define void @arch_safe_halt() {
%1 = tail call i32 (...) @ia64_pal_halt_light()
ret void
}
int main() {
  int x;
  x = 0;
  x += 2;
  x += 2;
  if (x != 4)
    return 1;
  x -= 1;
  if (x != 3)
    return 2;
  x *= 2;
  if (x != 6)
    return 3;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x4,-0x8(%rbp)
je     113a <main+0x3a>
movl   $0x1,-0x4(%rbp)
jmp    117f <main+0x7f>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x3,-0x8(%rbp)
je     1159 <main+0x59>
movl   $0x2,-0x4(%rbp)
jmp    117f <main+0x7f>
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x6,-0x8(%rbp)
je     1178 <main+0x78>
movl   $0x3,-0x4(%rbp)
jmp    117f <main+0x7f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
hash(s) unsigned char *s;
{
  register unsigned int h;
  for (h = 0; *s;)
    h += *s++;
  return h % 50;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1139 <hash+0x39>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movzbl (%rax),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    110f <hash+0xf>
mov    -0xc(%rbp),%eax
mov    $0x32,%ecx
xor    %edx,%edx
div    %ecx
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1133 <hash+0x33>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
movzbl %cl,%ecx
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
mov    %eax,%ecx
imul   $0x51eb851f,%rcx,%rcx
shr    $0x24,%rcx
imul   $0x32,%ecx,%ecx
sub    %ecx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i32 [ %10, %4 ], [ 0, %1 ]
%7 = phi i8* [ %8, %4 ], [ %0, %1 ]
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = zext i8 %5 to i32
%10 = add i32 %6, %9
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = urem i32 %10, 50
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 0, %1 ], [ %14, %13 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2(float);
int main(void) {
  test1();
  test2(3.14f);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test1@plt>
movss  0xed0(%rip),%xmm0
call   1040 <test2@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test1()
%2 = tail call i32 @test2(float 0x40091EB860000000)
ret i32 0
}
__attribute__((always_)) int process_exit(void) {
  int ret;
  asm volatile("int $0x80" : "=a"(ret) : "0"(7));
  return ret;
}


x86 assembly (clang, -O0):
<process_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x7,%eax
int    $0x80
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_exit>:
mov    $0x7,%eax
int    $0x80
ret

LLVM IR (-O0):
define i32 @process_exit() {
%1 = alloca i32
%2 = call i32 asm sideeffect "int $$0x80", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i32 7)
store i32 %2, i32* %1
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @process_exit() {
%1 = tail call i32 asm sideeffect "int $$0x80", "={ax},0,~{dirflag},~{fpsr},~{flags}"(i32 7)
ret i32 %1
}
/* Variables and functions */
int funca();
int funcb();
int funcc();
int main(void) { return funca() + funcb() + funcc(); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <funca@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1050 <funcb@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <funcc@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <funca@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <funcb@plt>
mov    %eax,%ebp
add    %ebx,%ebp
xor    %eax,%eax
call   1040 <funcc@plt>
add    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @funca()
%3 = call i32 (...) @funcb()
%4 = add nsw i32 %2, %3
%5 = call i32 (...) @funcc()
%6 = add nsw i32 %4, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @funca()
%2 = tail call i32 (...) @funcb()
%3 = add nsw i32 %2, %1
%4 = tail call i32 (...) @funcc()
%5 = add nsw i32 %3, %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ blur();
int /*<<< orphan*/ zoom();
void blurzoomcore() {
  blur();
  zoom();
}


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

x86 assembly (clang, -O2):
<blurzoomcore>:
push   %rax
xor    %eax,%eax
call   1040 <blur@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <zoom@plt>

LLVM IR (-O0):
define void @blurzoomcore() {
%1 = call i32 (...) @blur()
%2 = call i32 (...) @zoom()
ret void
}

LLVM IR (-O2):
define void @blurzoomcore() {
%1 = tail call i32 (...) @blur()
%2 = tail call i32 (...) @zoom()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int sock_op_get_creds(int sock_fd, int conn_id, int *p_pid, int *p_uid,
                      int *p_gid) {
  abort();
}


x86 assembly (clang, -O0):
<sock_op_get_creds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<sock_op_get_creds>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @sock_op_get_creds(i32 %0, i32 %1, i32* %2, i32* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32* %2, i32** %8
store i32* %3, i32** %9
store i32* %4, i32** %10
%11 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @sock_op_get_creds(i32 %0, i32 %1, i32* nocapture readnone %2, i32* nocapture readnone %3, i32* nocapture readnone %4) {
%6 = tail call i32 (...) @abort()
unreachable
}
int break_here_before_inc(void) {
  asm volatile("");
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @break_here_before_inc() {
tail call void asm sideeffect "", "~{dirflag},~{fpsr},~{flags}"()
ret i32 0
}
/* Variables and functions */
size_t strlen(char *);
scalar_t__ strncmp(char *, char *, size_t);
int libbun_endsWith(char *self, char *suffix) {
  size_t tlen = strlen(self);
  size_t slen = strlen(suffix);
  return strncmp(self + tlen - slen, suffix, slen) == 0;
}


x86 assembly (clang, -O0):
<libbun_endsWith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
add    -0x18(%rbp),%rdi
xor    %eax,%eax
sub    -0x20(%rbp),%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libbun_endsWith>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <strlen@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <strlen@plt>
add    %r15,%rbx
sub    %rax,%rbx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @libbun_endsWith(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
store i64 %8, i64* %5
%9 = load i8*, i8** %4
%10 = call i64 @strlen(i8* %9)
store i64 %10, i64* %6
%11 = load i8*, i8** %3
%12 = load i64, i64* %5
%13 = getelementptr inbounds i8, i8* %11, i64 %12
%14 = load i64, i64* %6
%15 = sub i64 0, %14
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8*, i8** %4
%18 = load i64, i64* %6
%19 = call i64 @strncmp(i8* %16, i8* %17, i64 %18)
%20 = icmp eq i64 %19, 0
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
define i32 @libbun_endsWith(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%5 = getelementptr inbounds i8, i8* %0, i64 %3
%6 = sub i64 0, %4
%7 = getelementptr inbounds i8, i8* %5, i64 %6
%8 = tail call i64 @strncmp(i8* %7, i8* %1, i64 %4)
%9 = icmp eq i64 %8, 0
%10 = zext i1 %9 to i32
ret i32 %10
}
void test45_Test4_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test45_Test4_targetInit__I() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int main(void) {
  bar(128);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @bar(i32 128)
ret i32 0
}
int __cmpfunc(void *key1, void *key2) { return (*(int *)key1 - *(int *)key2); }


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

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

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

LLVM IR (-O2):
define i32 @__cmpfunc(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = sub nsw i32 %4, %6
ret i32 %7
}
int main(int argc, char const *argv[]) {
  int c;
  int flag;
  c = 2 + 3 * 4;
  if ((2 - 2) * 9) {
  }
  if (1) {
    c = 2;
  } else {
    c = 3;
  }
  if (flag) {
    return 0;
    c = c + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0xe,-0x14(%rbp)
movl   $0x2,-0x14(%rbp)
cmpl   $0x0,-0x18(%rbp)
je     1136 <main+0x36>
movl   $0x0,-0x4(%rbp)
jmp    113d <main+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ log_msg(char *);
int /*<<< orphan*/ sprintf(char *, char *, int);
void log_ackFrameReceived(int frame) {
  char buffer[70];
  sprintf(buffer, "DAT: ACK for sequence %d successfully received", frame);
  log_msg(buffer);
}


x86 assembly (clang, -O0):
<log_ackFrameReceived>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x50(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x50(%rbp),%rdi
call   1030 <log_msg@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_ackFrameReceived>:
push   %rbx
sub    $0x50,%rsp
mov    %edi,%edx
lea    0xed2(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <log_msg@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"DAT: ACK for sequence %d successfully received\00"
define void @log_ackFrameReceived(i32 %0) {
%2 = alloca i32
%3 = alloca [70 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [70 x i8], [70 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @sprintf(i8* %4, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [70 x i8], [70 x i8]* %3, i64 0, i64 0
%8 = call i32 @log_msg(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [47 x i8] c"DAT: ACK for sequence %d successfully received\00"
define void @log_ackFrameReceived(i32 %0) {
%2 = alloca [70 x i8]
%3 = getelementptr inbounds [70 x i8], [70 x i8]* %2, i64 0, i64 0
%4 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @log_msg(i8* %3)
ret void
}
void gtk_file_chooser_unselect_all() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_unselect_all() {
ret void
}
/* Variables and functions */
int get_response(char *, int);
int /*<<< orphan*/ set_cr_noecho_mode();
int /*<<< orphan*/ set_nodelay_mode();
int /*<<< orphan*/ tty_mode(int);
int main(int argc, char *argv[]) {
  int res;
  tty_mode(0);
  set_cr_noecho_mode();
  set_nodelay_mode();
  res = get_response("Do you want another transaction", 3);
  tty_mode(1);
  return res;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %edi,%edi
call   1060 <tty_mode@plt>
mov    $0x0,%al
call   1050 <set_cr_noecho_mode@plt>
mov    $0x0,%al
call   1040 <set_nodelay_mode@plt>
lea    0xe8e(%rip),%rdi
mov    $0x3,%esi
call   1030 <get_response@plt>
mov    %eax,-0x14(%rbp)
mov    $0x1,%edi
call   1060 <tty_mode@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1060 <tty_mode@plt>
xor    %eax,%eax
call   1050 <set_cr_noecho_mode@plt>
xor    %eax,%eax
call   1040 <set_nodelay_mode@plt>
lea    0xea3(%rip),%rdi
mov    $0x3,%esi
call   1030 <get_response@plt>
mov    %eax,%ebx
mov    $0x1,%edi
call   1060 <tty_mode@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [32 x i8] c"Do you want another transaction\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @tty_mode(i32 0)
%8 = call i32 (...) @set_cr_noecho_mode()
%9 = call i32 (...) @set_nodelay_mode()
%10 = call i32 @get_response(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 3)
store i32 %10, i32* %6
%11 = call i32 @tty_mode(i32 1)
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
@.str = [32 x i8] c"Do you want another transaction\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @tty_mode(i32 0)
%4 = tail call i32 (...) @set_cr_noecho_mode()
%5 = tail call i32 (...) @set_nodelay_mode()
%6 = tail call i32 @get_response(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 3)
%7 = tail call i32 @tty_mode(i32 1)
ret i32 %6
}
void wpas_wps_update_ap_info(struct wpa_supplicant *wpa_s,
                             struct wpa_scan_results *scan_res) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @print_base16()
ret i32 0
}
/* Variables and functions */
int privsep_getfd_1int(int, int const);
int scamper_privsep_open_icmp(const int domain) {
  return privsep_getfd_1int(0x04U, domain);
}


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

x86 assembly (clang, -O2):
<scamper_privsep_open_icmp>:
mov    %edi,%esi
mov    $0x4,%edi
jmp    1030 <privsep_getfd_1int@plt>

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

LLVM IR (-O2):
define i32 @scamper_privsep_open_icmp(i32 %0) {
%2 = tail call i32 @privsep_getfd_1int(i32 4, i32 %0)
ret i32 %2
}
void fbcs_init(void) {
  (*(volatile unsigned int *)(void *)(0x80000000 + 0x000500)) =
      ((0xFE000000) & 0xFFFF0000);
  (*(volatile unsigned int *)(void *)(0x80000000 + 0x000508)) =
      ((0x0080) | (0x00000100) | (((7) & 0x0000003F) << 10));
  (*(volatile unsigned int *)(void *)(0x80000000 + 0x000504)) =
      ((0x01FF0000) | (0x00000001));
}


x86 assembly (clang, -O0):
<fbcs_init>:
push   %rbp
mov    %rsp,%rbp
mov    $0x80000500,%eax
movl   $0xfe000000,(%rax)
mov    $0x80000508,%eax
movl   $0x1d80,(%rax)
mov    $0x80000504,%eax
movl   $0x1ff0001,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fbcs_init>:
mov    $0x80000500,%eax
movl   $0xfe000000,(%rax)
movl   $0x1d80,0x8(%rax)
movl   $0x1ff0001,0x4(%rax)
ret

LLVM IR (-O0):
define void @fbcs_init() {
store volatile i32 -33554432, i32* inttoptr (i64 2147484928 to i32*)
store volatile i32 7552, i32* inttoptr (i64 2147484936 to i32*)
store volatile i32 33488897, i32* inttoptr (i64 2147484932 to i32*)
ret void
}

LLVM IR (-O2):
define void @fbcs_init() {
store volatile i32 -33554432, i32* inttoptr (i64 2147484928 to i32*)
store volatile i32 7552, i32* inttoptr (i64 2147484936 to i32*)
store volatile i32 33488897, i32* inttoptr (i64 2147484932 to i32*)
ret void
}
/* Type definitions */
struct Var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pA(char *, char const *, char const *, char const *);
void __func_div_ptr(struct Var *avar, const char *areg, const char *lreg,
                    const char *rreg) {
  pA("%s = %s / %s;", areg, lreg, rreg);
}


x86 assembly (clang, -O0):
<__func_div_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xec5(%rip),%rdi
call   1030 <pA@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s / %s;\00"
define void @__func_div_ptr(%struct.Var* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca %struct.Var*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store %struct.Var* %0, %struct.Var** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10, i8* %11)
ret void
}

LLVM IR (-O2):
%struct.Var = type { i32 }
@.str = [14 x i8] c"%s = %s / %s;\00"
define void @__func_div_ptr(%struct.Var* nocapture readnone %0, i8* %1, i8* %2, i8* %3) {
%5 = tail call i32 @pA(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ myHello();
int main() {
  myHello();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @myHello()
ret i32 0
}
void gtk_text_buffer_insert_interactive() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_buffer_insert_interactive() {
ret void
}
void disable_int() { __asm__ __volatile__("cli"); }


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

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

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

LLVM IR (-O2):
define void @disable_int() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gen(char *);
void cgpush(void) { gen("push\tax"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"push\09ax\00"
define void @cgpush() {
%1 = call i32 @gen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"push\09ax\00"
define void @cgpush() {
%1 = tail call i32 @gen(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
void tlvh_set_version(uint8_t *p_tlv, uint8_t i_version) {
  p_tlv[0] = i_version;
}


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

x86 assembly (clang, -O2):
<tlvh_set_version>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @tlvh_set_version(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 = getelementptr inbounds i32, i32* %6, i64 0
store i32 %5, i32* %7
ret void
}

LLVM IR (-O2):
define void @tlvh_set_version(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
int hoc_copyfile(const char *src, const char *dest) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @hoc_copyfile(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int writeInt(char *, unsigned char);
int exportPWM(unsigned char n) {
  return writeInt("/sys/class/pwm/pwmchip0/export", n);
}


x86 assembly (clang, -O0):
<exportPWM>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
lea    0xedb(%rip),%rdi
movzbl -0x1(%rbp),%esi
call   1030 <writeInt@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exportPWM>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <writeInt@plt>

LLVM IR (-O0):
@.str = [31 x i8] c"/sys/class/pwm/pwmchip0/export\00"
define i32 @exportPWM(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @writeInt(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8 zeroext %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [31 x i8] c"/sys/class/pwm/pwmchip0/export\00"
define i32 @exportPWM(i8 zeroext %0) {
%2 = tail call i32 @writeInt(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8 zeroext %0)
ret i32 %2
}
void dev_printer_reset(void *dev) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @ARGBToARGB1555Row_NEON() {
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
void UARTIntClear(uint32_t ui32Base, uint32_t ui32IntFlags) {
  ;
  (*((volatile unsigned long *)(ui32Base + 0x00000044))) = ui32IntFlags;
}


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

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

LLVM IR (-O0):
define void @UARTIntClear(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 = load i64, i64* %3
%7 = add i64 %6, 68
%8 = inttoptr i64 %7 to i64*
store volatile i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @UARTIntClear(i64 %0, i64 %1) {
%3 = add i64 %0, 68
%4 = inttoptr i64 %3 to i64*
store volatile i64 %1, i64* %4
ret void
}
int addThree(int num) { return (num + 3); }


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

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

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

LLVM IR (-O2):
define i32 @addThree(i32 %0) {
%2 = add nsw i32 %0, 3
ret i32 %2
}
/* Variables and functions */
double sqrt(double);
double distance(double x_1, double x_2, double y_1, double y_2) {
  double deltax, deltay;
  deltax = x_1 - x_2;
  deltay = y_1 - y_2;
  return (sqrt(deltax * deltax + deltay * deltay));
}


x86 assembly (clang, -O0):
<distance>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
subsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
movsd  -0x28(%rbp),%xmm0
movsd  -0x28(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm1
mulsd  -0x30(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
call   1030 <sqrt@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<distance>:
subsd  %xmm1,%xmm0
subsd  %xmm3,%xmm2
mulsd  %xmm2,%xmm2
mulsd  %xmm0,%xmm0
addsd  %xmm2,%xmm0
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jb     1133 <distance+0x23>
sqrtsd %xmm0,%xmm0
ret
jmp    1030 <sqrt@plt>

LLVM IR (-O0):
define double @distance(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%11 = load double, double* %5
%12 = load double, double* %6
%13 = fsub double %11, %12
store double %13, double* %9
%14 = load double, double* %7
%15 = load double, double* %8
%16 = fsub double %14, %15
store double %16, double* %10
%17 = load double, double* %9
%18 = load double, double* %9
%19 = load double, double* %10
%20 = load double, double* %10
%21 = fmul double %19, %20
%22 = call double @llvm.fmuladd.f64(double %17, double %18, double %21)
%23 = call double @sqrt(double %22)
ret double %23
}

LLVM IR (-O2):
define double @distance(double %0, double %1, double %2, double %3) {
%5 = fsub double %0, %1
%6 = fsub double %2, %3
%7 = fmul double %6, %6
%8 = tail call double @llvm.fmuladd.f64(double %5, double %5, double %7)
%9 = tail call double @sqrt(double %8)
ret double %9
}
/* Variables and functions */
int istrsenvisx(char *, int /*<<< orphan*/ *, char const *, int /*<<< orphan*/,
                int, char const *, int /*<<< orphan*/ *);
int strsvis(char *mbdst, const char *mbsrc, int flags, const char *mbextra) {
  return istrsenvisx(mbdst, NULL, mbsrc, 0, flags, mbextra, NULL);
}


x86 assembly (clang, -O0):
<strsvis>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%r8d
mov    -0x20(%rbp),%r9
xor    %eax,%eax
mov    %eax,%esi
xor    %ecx,%ecx
movq   $0x0,(%rsp)
call   1030 <istrsenvisx@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strsvis>:
push   %rax
mov    %rcx,%r9
mov    %edx,%r8d
mov    %rsi,%rdx
movq   $0x0,(%rsp)
xor    %esi,%esi
xor    %ecx,%ecx
call   1030 <istrsenvisx@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @strsvis(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = tail call i32 @istrsenvisx(i8* %0, i32* null, i8* %1, i32 0, i32 %2, i8* %3, i32* null)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void ascii_contour(FILE *f, const char **opts, int xsz, int ysz, double d[]) {}


x86 assembly (clang, -O0):
<ascii_contour>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @ascii_contour(i32* %0, i8** %1, i32 %2, i32 %3, double* %4) {
%6 = alloca i32*
%7 = alloca i8**
%8 = alloca i32
%9 = alloca i32
%10 = alloca double*
store i32* %0, i32** %6
store i8** %1, i8*** %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store double* %4, double** %10
ret void
}

LLVM IR (-O2):
define void @ascii_contour(i32* nocapture %0, i8** nocapture %1, i32 %2, i32 %3, double* nocapture %4) {
ret void
}
int I2B(int x) { return x * (12.6 / 1440.0); }


x86 assembly (clang, -O0):
<I2B>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
movsd  0xeec(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2B>:
cvtsi2sd %edi,%xmm0
mulsd  0xef4(%rip),%xmm0
cvttsd2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @I2B(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
%5 = fmul double %4, 0x3F81EB851EB851EB
%6 = fptosi double %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @I2B(i32 %0) {
%2 = sitofp i32 %0 to double
%3 = fmul double %2, 0x3F81EB851EB851EB
%4 = fptosi double %3 to i32
ret i32 %4
}
/* Variables and functions */
int strlen(char const *const);
size_t astringPackSize(const char *const *data) {
  return (*data == NULL) ? 4 : 4 + strlen(*data);
}


x86 assembly (clang, -O0):
<astringPackSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
jne    1137 <astringPackSize+0x27>
mov    $0x4,%eax
mov    %eax,-0xc(%rbp)
jmp    1149 <astringPackSize+0x39>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
add    $0x4,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<astringPackSize>:
push   %rax
mov    (%rdi),%rdi
test   %rdi,%rdi
je     1125 <astringPackSize+0x15>
call   1030 <strlen@plt>
add    $0x4,%eax
cltq
pop    %rcx
ret
mov    $0x4,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i64 @astringPackSize(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = load i8**, i8*** %2
%4 = load i8*, i8** %3
%5 = icmp eq i8* %4, null
br i1 %5, label %6, label %7
6: ; preds = %1
br label %12
7: ; preds = %1
%8 = load i8**, i8*** %2
%9 = load i8*, i8** %8
%10 = call i32 @strlen(i8* %9)
%11 = add nsw i32 4, %10
br label %12
12: ; preds = %7, %6
%13 = phi i32 [ 4, %6 ], [ %11, %7 ]
%14 = sext i32 %13 to i64
ret i64 %14
}

LLVM IR (-O2):
define i64 @astringPackSize(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = icmp eq i8* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %2)
%6 = add nsw i32 %5, 4
%7 = sext i32 %6 to i64
br label %8
8: ; preds = %1, %4
%9 = phi i64 [ %7, %4 ], [ 4, %1 ]
ret i64 %9
}
void replicationUnsetMaster(void) {
  _serverPanic("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
               "outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/"
               "heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c",
               112, "Function '%s' is disabled.", __func__);
}


x86 assembly (clang, -O0):
<replicationUnsetMaster>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x70,%esi
lea    0xf79(%rip),%rdx
lea    0xf8d(%rip),%rcx
mov    $0x0,%al
call   1030 <_serverPanic@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<replicationUnsetMaster>:
lea    0xee9(%rip),%rdi
lea    0xf82(%rip),%rdx
lea    0xf96(%rip),%rcx
mov    $0x70,%esi
xor    %eax,%eax
jmp    1030 <_serverPanic@plt>

LLVM IR (-O0):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.replicationUnsetMaster = [23 x i8] c"replicationUnsetMaster\00"
define void @replicationUnsetMaster() {
%1 = call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 112, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__func__.replicationUnsetMaster, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/CodisLabs/redis-port/refs/heads/redis-4.x-cgo/pkg/rdb/cgo_glue_meow.c\00"
@.str.1 = [27 x i8] c"Function '%s' is disabled.\00"
@__func__.replicationUnsetMaster = [23 x i8] c"replicationUnsetMaster\00"
define void @replicationUnsetMaster() {
%1 = tail call i32 (i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_serverPanic to i32 (i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 112, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @__func__.replicationUnsetMaster, i64 0, i64 0))
ret void
}