xunge/DecIR huggingface dataset:
int util_utf16_byte_len(unsigned char *utf16) {
  unsigned char *src = utf16;
  int len = 0;
  while (1) {
    if ((src[0] == 0) && (src[1] == 0))
      return len;
    len += 2;
    src += 2;
  }
  return len;
}


x86 assembly (clang, -O0):
<util_utf16_byte_len>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%eax
cmp    $0x0,%eax
jne    113d <util_utf16_byte_len+0x3d>
mov    -0x10(%rbp),%rax
movzbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    113d <util_utf16_byte_len+0x3d>
mov    -0x14(%rbp),%eax
pop    %rbp
ret
mov    -0x14(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x10(%rbp)
jmp    1117 <util_utf16_byte_len+0x17>

x86 assembly (clang, -O2):
<util_utf16_byte_len>:
xor    %eax,%eax
jmp    1114 <util_utf16_byte_len+0x14>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
add    $0x2,%rax
cmpb   $0x0,(%rdi,%rax,1)
jne    1110 <util_utf16_byte_len+0x10>
cmpb   $0x0,0x1(%rdi,%rax,1)
jne    1110 <util_utf16_byte_len+0x10>
ret

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

LLVM IR (-O2):
define i32 @util_utf16_byte_len(i8* nocapture %0) {
br label %2
2: ; preds = %12, %1
%3 = phi i8* [ %0, %1 ], [ %14, %12 ]
%4 = phi i32 [ 0, %1 ], [ %13, %12 ]
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %3, i64 1
%9 = load i8, i8* %8
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %7
ret i32 %4
12: ; preds = %7, %2
%13 = add nuw nsw i32 %4, 2
%14 = getelementptr inbounds i8, i8* %3, i64 2
br label %2
}
/* Type definitions */
typedef int /*<<< orphan*/ string;

/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
int main(int argc, char *argv[]) {
  char string[] = "Hello everybody!\n";
  write(1, string, sizeof(string));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed3(%rip),%rax
mov    %rax,-0x30(%rbp)
mov    0xed0(%rip),%rax
mov    %rax,-0x28(%rbp)
mov    0xecd(%rip),%ax
mov    %ax,-0x20(%rbp)
lea    -0x30(%rbp),%rsi
mov    $0x1,%edi
mov    $0x12,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xee5(%rip),%xmm0
movaps %xmm0,(%rsp)
movw   $0xa,0x10(%rsp)
mov    %rsp,%rsi
mov    $0x1,%edi
mov    $0x12,%edx
call   1030 <write@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.string = [18 x i8] c"Hello everybody!\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [18 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [18 x i8]* %6 to i8*
%8 = getelementptr inbounds [18 x i8], [18 x i8]* %6, i64 0, i64 0
%9 = call i32 @write(i32 1, i8* %8, i32 18)
ret i32 0
}

LLVM IR (-O2):
@__const.main.string = [18 x i8] c"Hello everybody!\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [18 x i8]
%4 = getelementptr inbounds [18 x i8], [18 x i8]* %3, i64 0, i64 0
%5 = call i32 @write(i32 1, i8* %4, i32 18)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ KeSetEvent(int, int /*<<< orphan*/, int /*<<< orphan*/);
int KbFilter_Complete(int DeviceObject, int Irp, int Context) {
  int event;
  {
    {
      event = Context;
      KeSetEvent(event, 0, 0);
    }
    return (-1073741802);
  }
}


x86 assembly (clang, -O0):
<KbFilter_Complete>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%edi
xor    %edx,%edx
mov    %edx,%esi
call   1030 <KeSetEvent@plt>
mov    $0xc0000016,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KbFilter_Complete>:
push   %rax
mov    %edx,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <KeSetEvent@plt>
mov    $0xc0000016,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @KbFilter_Complete(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
store i32 %8, i32* %7
%9 = load i32, i32* %7
%10 = call i32 @KeSetEvent(i32 %9, i32 0, i32 0)
ret i32 -1073741802
}

LLVM IR (-O2):
define i32 @KbFilter_Complete(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @KeSetEvent(i32 %2, i32 0, i32 0)
ret i32 -1073741802
}
/* Variables and functions */
float log(float);
float f(float x) { return (x + log(x) - 2.0); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <log@plt>
movaps %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
addss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeb7(%rip),%xmm1
subsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
movss  %xmm0,0x4(%rsp)
call   1030 <log@plt>
addss  0x4(%rsp),%xmm0
addss  0xed6(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @f(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = call float @log(float %4)
%6 = fadd float %3, %5
%7 = fpext float %6 to double
%8 = fsub double %7, 2.000000e+00
%9 = fptrunc double %8 to float
ret float %9
}

LLVM IR (-O2):
define float @f(float %0) {
%2 = tail call float @log(float %0)
%3 = fadd float %2, %0
%4 = fadd float %3, -2.000000e+00
ret float %4
}
int test_imm_89int64_midword_mem(long long *val) {
  return ((*val >> 16) & (0x89 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_89int64_midword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x10,%rdx
and    $0x89,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_89int64_midword_mem>:
testb  $0x89,0x2(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_89int64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 8978432
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
int main(void) {
  int x = 100;
  printf("dec = %d; octal = %o; hex = %x\n", x, x, x);
  printf("dec = %d; octal = %#o; hex = %#x\n", x, x, x);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [32 x i8] c"dec = %d; octal = %o; hex = %x\0A\00"
@.str.1 = [34 x i8] c"dec = %d; octal = %#o; hex = %#x\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 100, i32 100, i32 100)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 100, i32 100, i32 100)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void const *, unsigned int const);
void copy_to_little_endian_64(void *out, const void *in, const unsigned n) {
  memcpy(out, in, n * 8);
}


x86 assembly (clang, -O0):
<copy_to_little_endian_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
shl    $0x3,%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_to_little_endian_64>:
shl    $0x3,%edx
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @copy_to_little_endian_64(i8* %0, i8* %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 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = mul i32 %9, 8
%11 = call i32 @memcpy(i8* %7, i8* %8, i32 %10)
ret void
}

LLVM IR (-O2):
define void @copy_to_little_endian_64(i8* %0, i8* %1, i32 %2) {
%4 = shl i32 %2, 3
%5 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void malicious() { printf("\n\tHow did we get here??\n\n"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"\0A\09How did we get here??\0A\0A\00"
define void @malicious() {
%1 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"\0A\09How did we get here??\0A\00"
define void @malicious() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
ret void
}
void inc_zcache_pageframes_alloced(void) {}


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

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

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

LLVM IR (-O2):
define void @inc_zcache_pageframes_alloced() {
ret void
}
int tegra_core_cap_debug_init(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @tegra_core_cap_debug_init() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ tor_log_set_sigsafe_err_fds(int *, int);
void tor_log_reset_sigsafe_err_fds(void) {
  int fds[] = {2};
  tor_log_set_sigsafe_err_fds(fds, 1);
}


x86 assembly (clang, -O0):
<tor_log_reset_sigsafe_err_fds>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0xee2(%rip),%eax
mov    %eax,-0x4(%rbp)
lea    -0x4(%rbp),%rdi
mov    $0x1,%esi
call   1030 <tor_log_set_sigsafe_err_fds@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tor_log_reset_sigsafe_err_fds>:
push   %rax
movl   $0x2,0x4(%rsp)
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
call   1030 <tor_log_set_sigsafe_err_fds@plt>
pop    %rax
ret

LLVM IR (-O0):
@__const.tor_log_reset_sigsafe_err_fds.fds = [1 x i32] [i32 2]
define void @tor_log_reset_sigsafe_err_fds() {
%1 = alloca [1 x i32]
%2 = bitcast [1 x i32]* %1 to i8*
%3 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
%4 = call i32 @tor_log_set_sigsafe_err_fds(i32* %3, i32 1)
ret void
}

LLVM IR (-O2):
define void @tor_log_reset_sigsafe_err_fds() {
%1 = alloca [1 x i32]
%2 = bitcast [1 x i32]* %1 to i8*
%3 = getelementptr inbounds [1 x i32], [1 x i32]* %1, i64 0, i64 0
store i32 2, i32* %3
%4 = call i32 @tor_log_set_sigsafe_err_fds(i32* %3, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hola Munro\n"); }


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

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

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

LLVM IR (-O2):
@str = [11 x i8] c"Hola Munro\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret i32 0
}
void _farpokel(unsigned short selector, unsigned long offset,
               unsigned long value) {
  __asm__ __volatile__("movw %w0,%%fs \n"
                       "	.byte 0x64 \n"
                       "	movl %k1,(%k2)"
                       :
                       : "rm"(selector), "ri"(value), "r"(offset));
}


x86 assembly (clang, -O0):
<_farpokel>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x2(%rbp),%dx
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    %dx,-0x1a(%rbp)
mov    -0x1a(%rbp),%fs
mov    %eax,%fs:(%ecx)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_farpokel>:
mov    %di,-0x2(%rsp)
mov    -0x2(%rsp),%fs
mov    %edx,%fs:(%esi)
ret

LLVM IR (-O0):
define void @_farpokel(i16 zeroext %0, i64 %1, i64 %2) {
%4 = alloca i16
%5 = alloca i64
%6 = alloca i64
store i16 %0, i16* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i16, i16* %4
%8 = load i64, i64* %6
%9 = load i64, i64* %5
ret void
}

LLVM IR (-O2):
define void @_farpokel(i16 zeroext %0, i64 %1, i64 %2) {
tail call void asm sideeffect "movw ${0:w},%fs \0A\09.byte 0x64 \0A\09movl ${1:k},(${2:k})", "rm,ri,r,~{dirflag},~{fpsr},~{flags}"(i16 %0, i64 %2, i64 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ keyedit_trap_exit(int /*<<< orphan*/);
void op_keyedit() { keyedit_trap_exit(0); }


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

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

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

LLVM IR (-O2):
define void @op_keyedit() {
%1 = tail call i32 @keyedit_trap_exit(i32 0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mpfr_t;

/* Variables and functions */
int /*<<< orphan*/ MPFR_RNDN;
int /*<<< orphan*/ mpfr_out_str(int /*<<< orphan*/, int, int,
                                int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ stdout;
void mpfroutstr(mpfr_t r1, int *nd) {
  int n1;
  n1 = *nd;
  mpfr_out_str(stdout, 10, n1, r1, MPFR_RNDN);
  putchar('\n');
}


x86 assembly (clang, -O0):
<mpfroutstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
mov    -0x14(%rbp),%edx
mov    -0x4(%rbp),%ecx
mov    0x2e9a(%rip),%rax
mov    (%rax),%r8d
mov    $0xa,%esi
call   1040 <mpfr_out_str@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mpfroutstr>:
push   %rax
mov    %edi,%ecx
mov    (%rsi),%edx
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
mov    0x2eb3(%rip),%rax
mov    (%rax),%r8d
mov    $0xa,%esi
call   1040 <mpfr_out_str@plt>
mov    $0xa,%edi
pop    %rax
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@stdout = global i32 0
@MPFR_RNDN = global i32 0
define void @mpfroutstr(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
store i32 %0, i32* %3
store i32* %1, i32** %4
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
store i32 %7, i32* %5
%8 = load i32, i32* @stdout
%9 = load i32, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* @MPFR_RNDN
%12 = call i32 @mpfr_out_str(i32 %8, i32 10, i32 %9, i32 %10, i32 %11)
%13 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@stdout = global i32 0
@MPFR_RNDN = global i32 0
define void @mpfroutstr(i32 %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* @stdout
%5 = load i32, i32* @MPFR_RNDN
%6 = tail call i32 @mpfr_out_str(i32 %4, i32 10, i32 %3, i32 %0, i32 %5)
%7 = tail call i32 @putchar(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
scalar_t__ strncasecmp(char *, char *, int);
void strncasecmp_diff_length_0() {
  char *x = "abcde";
  char *y = "aBd";
  clang_analyzer_eval(strncasecmp(x, y, 5) < 0);
}


x86 assembly (clang, -O0):
<strncasecmp_diff_length_0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xecc(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x5,%edx
call   1030 <strncasecmp@plt>
cmp    $0x0,%rax
setl   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncasecmp_diff_length_0>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed7(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncasecmp@plt>
shr    $0x3f,%rax
mov    %eax,%edi
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [4 x i8] c"aBd\00"
define void @strncasecmp_diff_length_0() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i64 @strncasecmp(i8* %3, i8* %4, i32 5)
%6 = icmp slt i64 %5, 0
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"abcde\00"
@.str.1 = [4 x i8] c"aBd\00"
define void @strncasecmp_diff_length_0() {
%1 = tail call i64 @strncasecmp(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 5)
%2 = lshr i64 %1, 63
%3 = trunc i64 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
/* Variables and functions */
int __DI_Initialize();
int /*<<< orphan*/ write(char *);
int main(void) {
  write("$IOSVersion: DIPP: "
        "Mar 19 2022"
        " "
        "00:01:35"
        " 64M$\n");
  return __DI_Initialize();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <write@plt>
mov    $0x0,%al
call   1040 <__DI_Initialize@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <write@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__DI_Initialize@plt>

LLVM IR (-O0):
@.str = [46 x i8] c"$IOSVersion: DIPP: Mar 19 2022 00:01:35 64M$\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @write(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @__DI_Initialize()
ret i32 %3
}

LLVM IR (-O2):
@.str = [46 x i8] c"$IOSVersion: DIPP: Mar 19 2022 00:01:35 64M$\0A\00"
define i32 @main() {
%1 = tail call i32 @write(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @__DI_Initialize()
ret i32 %2
}
int dbl(int x, int (*y)(int, int)) { return y(x, x); }


x86 assembly (clang, -O0):
<dbl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%edi
mov    -0x4(%rbp),%esi
call   *%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbl>:
mov    %rsi,%rax
mov    %edi,%esi
jmp    *%rax

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

LLVM IR (-O2):
define i32 @dbl(i32 %0, i32 (i32, i32)* nocapture %1) {
%3 = tail call i32 %1(i32 %0, i32 %0)
ret i32 %3
}
/* Type definitions */
struct task_struct {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ irqtime_account_irq(struct task_struct *);
int /*<<< orphan*/ vtime_account_system(struct task_struct *);
void vtime_account_irq_exit(struct task_struct *tsk) {
  vtime_account_system(tsk);
  irqtime_account_irq(tsk);
}


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

x86 assembly (clang, -O2):
<vtime_account_irq_exit>:
push   %rbx
mov    %rdi,%rbx
call   1040 <vtime_account_system@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <irqtime_account_irq@plt>

LLVM IR (-O0):
%struct.task_struct = type { i32 }
define void @vtime_account_irq_exit(%struct.task_struct* %0) {
%2 = alloca %struct.task_struct*
store %struct.task_struct* %0, %struct.task_struct** %2
%3 = load %struct.task_struct*, %struct.task_struct** %2
%4 = call i32 @vtime_account_system(%struct.task_struct* %3)
%5 = load %struct.task_struct*, %struct.task_struct** %2
%6 = call i32 @irqtime_account_irq(%struct.task_struct* %5)
ret void
}

LLVM IR (-O2):
%struct.task_struct = type { i32 }
define void @vtime_account_irq_exit(%struct.task_struct* %0) {
%2 = tail call i32 @vtime_account_system(%struct.task_struct* %0)
%3 = tail call i32 @irqtime_account_irq(%struct.task_struct* %0)
ret void
}
void *_dlopen(const char *str, int x) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @_dlopen(i8* nocapture readnone %0, i32 %1) {
ret i8* undef
}
/* Variables and functions */
void *malloc(unsigned long);
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, unsigned long);
void *zalloc(unsigned long x) {
  void *p = malloc(x);
  memset(p, 0, x);
  return p;
}


x86 assembly (clang, -O0):
<zalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zalloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r14,%rdx
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @zalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i64, i64* %2
%8 = call i32 @memset(i8* %6, i32 0, i64 %7)
%9 = load i8*, i8** %3
ret i8* %9
}

LLVM IR (-O2):
define i8* @zalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = tail call i32 @memset(i8* %2, i32 0, i64 %0)
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ ofl_group_type_print(int /*<<< orphan*/ *,
                                        int /*<<< orphan*/);
int /*<<< orphan*/ *open_memstream(char **, size_t *);
char *ofl_group_type_to_string(uint8_t type) {
  char *str;
  size_t str_size;
  FILE *stream = open_memstream(&str, &str_size);
  ofl_group_type_print(stream, type);
  fclose(stream);
  return str;
}


x86 assembly (clang, -O0):
<ofl_group_type_to_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x4(%rbp),%esi
call   1050 <ofl_group_type_print@plt>
mov    -0x20(%rbp),%rdi
call   1040 <fclose@plt>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ofl_group_type_to_string>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
mov    %edi,%ebp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rsi
call   1030 <open_memstream@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %ebp,%esi
call   1050 <ofl_group_type_print@plt>
mov    %rbx,%rdi
call   1040 <fclose@plt>
mov    0x8(%rsp),%rax
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ofl_group_type_to_string(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32*
store i32 %0, i32* %2
%6 = call i32* @open_memstream(i8** %3, i64* %4)
store i32* %6, i32** %5
%7 = load i32*, i32** %5
%8 = load i32, i32* %2
%9 = call i32 @ofl_group_type_print(i32* %7, i32 %8)
%10 = load i32*, i32** %5
%11 = call i32 @fclose(i32* %10)
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @ofl_group_type_to_string(i32 %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = bitcast i8** %2 to i8*
%5 = bitcast i64* %3 to i8*
%6 = call i32* @open_memstream(i8** %2, i64* %3)
%7 = call i32 @ofl_group_type_print(i32* %6, i32 %0)
%8 = call i32 @fclose(i32* %6)
%9 = load i8*, i8** %2
ret i8* %9
}
/* Variables and functions */
char *strtok_r(char *, char const *, char **);
char *STRTOK_R(char *s, const char *delimiters, char **lasts) {
  return strtok_r(s, delimiters, lasts);
}


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

x86 assembly (clang, -O2):
<STRTOK_R>:
jmp    1030 <strtok_r@plt>

LLVM IR (-O0):
define i8* @STRTOK_R(i8* %0, i8* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8**, i8*** %6
%10 = call i8* @strtok_r(i8* %7, i8* %8, i8** %9)
ret i8* %10
}

LLVM IR (-O2):
define i8* @STRTOK_R(i8* %0, i8* nocapture %1, i8** %2) {
%4 = tail call i8* @strtok_r(i8* %0, i8* %1, i8** %2)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int /*<<< orphan*/ g(int);
int /*<<< orphan*/ h(int);
void main(int i) {
  f(1);
  f(1);
  g(1);
  h(1);
  h(1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x1,%edi
call   1040 <f@plt>
mov    $0x1,%edi
call   1040 <f@plt>
mov    $0x1,%edi
call   1050 <g@plt>
mov    $0x1,%edi
call   1030 <h@plt>
mov    $0x1,%edi
call   1030 <h@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <f@plt>
mov    $0x1,%edi
call   1040 <f@plt>
mov    $0x1,%edi
call   1050 <g@plt>
mov    $0x1,%edi
call   1030 <h@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <h@plt>

LLVM IR (-O0):
define void @main(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @f(i32 1)
%4 = call i32 @f(i32 1)
%5 = call i32 @g(i32 1)
%6 = call i32 @h(i32 1)
%7 = call i32 @h(i32 1)
ret void
}

LLVM IR (-O2):
define void @main(i32 %0) {
%2 = tail call i32 @f(i32 1)
%3 = tail call i32 @f(i32 1)
%4 = tail call i32 @g(i32 1)
%5 = tail call i32 @h(i32 1)
%6 = tail call i32 @h(i32 1)
ret void
}
unsigned char signed_char_to_unsigned_char(signed char src) { return src; }


x86 assembly (clang, -O0):
<signed_char_to_unsigned_char>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<signed_char_to_unsigned_char>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i8 @signed_char_to_unsigned_char(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
ret i8 %3
}

LLVM IR (-O2):
define zeroext i8 @signed_char_to_unsigned_char(i8 returned signext %0) {
ret i8 %0
}
void sg_win32_end_capture() {}


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

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

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

LLVM IR (-O2):
define void @sg_win32_end_capture() {
ret void
}
void index2triplet(int index, int n_motifs, int *i123) {
  int i1, i2, i3;
  int temp;
  i3 = index % n_motifs;
  temp = (index - i3) / n_motifs;
  i2 = temp % n_motifs + 1;
  i1 = (temp + 1 - i2) / n_motifs + 1;
  i123[0] = i1;
  i123[1] = i2;
  i123[2] = i3;
}


x86 assembly (clang, -O0):
<index2triplet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x1c(%rbp),%eax
cltd
idivl  -0x8(%rbp)
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cltd
idivl  -0x8(%rbp)
add    $0x1,%edx
mov    %edx,-0x18(%rbp)
mov    -0x20(%rbp),%eax
add    $0x1,%eax
sub    -0x18(%rbp),%eax
cltd
idivl  -0x8(%rbp)
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x1c(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,0x8(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<index2triplet>:
mov    %rdx,%rcx
mov    %edi,%eax
cltd
idiv   %esi
mov    %edx,%edi
cltd
idiv   %esi
add    $0x1,%edx
add    $0x1,%eax
mov    %eax,(%rcx)
mov    %edx,0x4(%rcx)
mov    %edi,0x8(%rcx)
ret

LLVM IR (-O0):
define void @index2triplet(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = srem i32 %11, %12
store i32 %13, i32* %9
%14 = load i32, i32* %4
%15 = load i32, i32* %9
%16 = sub nsw i32 %14, %15
%17 = load i32, i32* %5
%18 = sdiv i32 %16, %17
store i32 %18, i32* %10
%19 = load i32, i32* %10
%20 = load i32, i32* %5
%21 = srem i32 %19, %20
%22 = add nsw i32 %21, 1
store i32 %22, i32* %8
%23 = load i32, i32* %10
%24 = add nsw i32 %23, 1
%25 = load i32, i32* %8
%26 = sub nsw i32 %24, %25
%27 = load i32, i32* %5
%28 = sdiv i32 %26, %27
%29 = add nsw i32 %28, 1
store i32 %29, i32* %7
%30 = load i32, i32* %7
%31 = load i32*, i32** %6
%32 = getelementptr inbounds i32, i32* %31, i64 0
store i32 %30, i32* %32
%33 = load i32, i32* %8
%34 = load i32*, i32** %6
%35 = getelementptr inbounds i32, i32* %34, i64 1
store i32 %33, i32* %35
%36 = load i32, i32* %9
%37 = load i32*, i32** %6
%38 = getelementptr inbounds i32, i32* %37, i64 2
store i32 %36, i32* %38
ret void
}

LLVM IR (-O2):
define void @index2triplet(i32 %0, i32 %1, i32* nocapture writeonly %2) {
%4 = srem i32 %0, %1
%5 = sdiv i32 %0, %1
%6 = srem i32 %5, %1
%7 = add nsw i32 %6, 1
%8 = sdiv i32 %5, %1
%9 = add nsw i32 %8, 1
store i32 %9, i32* %2
%10 = getelementptr inbounds i32, i32* %2, i64 1
store i32 %7, i32* %10
%11 = getelementptr inbounds i32, i32* %2, i64 2
store i32 %4, i32* %11
ret void
}
void WatchdogEnable(void) {
  (*((volatile unsigned long
          *)(((unsigned long)(0x40080000 + 0x00000008) & 0xF0000000) |
             0x02000000 |
             (((unsigned long)(0x40080000 + 0x00000008) & 0x000FFFFF) << 5) |
             ((0) << 2)))) = 1;
}


x86 assembly (clang, -O0):
<WatchdogEnable>:
push   %rbp
mov    %rsp,%rbp
mov    $0x43000100,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<WatchdogEnable>:
movq   $0x1,0x43000100
ret

LLVM IR (-O0):
define void @WatchdogEnable() {
store volatile i64 1, i64* inttoptr (i64 1124073728 to i64*)
ret void
}

LLVM IR (-O2):
define void @WatchdogEnable() {
store volatile i64 1, i64* inttoptr (i64 1124073728 to i64*)
ret void
}
void glutPositionWindow(int x, int y) {}


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

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

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

LLVM IR (-O2):
define void @glutPositionWindow(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ chtype;
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int /*<<< orphan*/ mvwaddch(int /*<<< orphan*/ *, int, int, int /*<<< orphan*/);
void my_mvwhline(WINDOW *win, int y, int x, chtype ch, int num) {
  int i;
  for (i = 0; i < num; i++)
    mvwaddch(win, y, (x + i), ch);
}


x86 assembly (clang, -O0):
<my_mvwhline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    115f <my_mvwhline+0x4f>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
add    -0x1c(%rbp),%edx
mov    -0x14(%rbp),%ecx
call   1030 <mvwaddch@plt>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1130 <my_mvwhline+0x20>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_mvwhline>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
test   %r8d,%r8d
jle    1148 <my_mvwhline+0x38>
mov    %r8d,%ebx
mov    %ecx,%r14d
mov    %edx,%ebp
mov    %esi,%r15d
mov    %rdi,%r12
nopl   0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %r15d,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <mvwaddch@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
jne    1130 <my_mvwhline+0x20>
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @my_mvwhline(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
%11 = 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
store i32 0, i32* %11
br label %12
12: ; preds = %24, %5
%13 = load i32, i32* %11
%14 = load i32, i32* %10
%15 = icmp slt i32 %13, %14
br i1 %15, label %16, label %27
16: ; preds = %12
%17 = load i32*, i32** %6
%18 = load i32, i32* %7
%19 = load i32, i32* %8
%20 = load i32, i32* %11
%21 = add nsw i32 %19, %20
%22 = load i32, i32* %9
%23 = call i32 @mvwaddch(i32* %17, i32 %18, i32 %21, i32 %22)
br label %24
24: ; preds = %16
%25 = load i32, i32* %11
%26 = add nsw i32 %25, 1
store i32 %26, i32* %11
br label %12
27: ; preds = %12
ret void
}

LLVM IR (-O2):
define void @my_mvwhline(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = icmp sgt i32 %4, 0
br i1 %6, label %7, label %13
7: ; preds = %5, %7
%8 = phi i32 [ %11, %7 ], [ 0, %5 ]
%9 = add nsw i32 %8, %2
%10 = tail call i32 @mvwaddch(i32* %0, i32 %1, i32 %9, i32 %3)
%11 = add nuw nsw i32 %8, 1
%12 = icmp eq i32 %11, %4
br i1 %12, label %13, label %7
13: ; preds = %7, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("Give some arguments\nUSAGE: stegtool.exe <--encrypt|--decrypt> "
         "<TextToCrypt>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@.str = [77 x i8] c"Give some arguments\0AUSAGE: stegtool.exe <--encrypt|--decrypt> <TextToCrypt>\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([77 x i8], [77 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [76 x i8] c"Give some arguments\0AUSAGE: stegtool.exe <--encrypt|--decrypt> <TextToCrypt>\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([76 x i8], [76 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ teste_fatoracao_3x3();
int /*<<< orphan*/ teste_fatoracao_4x4();
int /*<<< orphan*/ teste_interpolacao_grau_4();
int /*<<< orphan*/ teste_solucao_linear_2x2();
int /*<<< orphan*/ teste_solucao_linear_3x3();
int /*<<< orphan*/ teste_solucao_linear_4x4();
int main(void) {
  teste_fatoracao_3x3();
  teste_fatoracao_4x4();
  teste_solucao_linear_2x2();
  teste_solucao_linear_3x3();
  teste_solucao_linear_4x4();
  teste_interpolacao_grau_4();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <teste_fatoracao_3x3@plt>
mov    $0x0,%al
call   1070 <teste_fatoracao_4x4@plt>
mov    $0x0,%al
call   1060 <teste_solucao_linear_2x2@plt>
mov    $0x0,%al
call   1080 <teste_solucao_linear_3x3@plt>
mov    $0x0,%al
call   1050 <teste_solucao_linear_4x4@plt>
mov    $0x0,%al
call   1030 <teste_interpolacao_grau_4@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <teste_fatoracao_3x3@plt>
xor    %eax,%eax
call   1070 <teste_fatoracao_4x4@plt>
xor    %eax,%eax
call   1060 <teste_solucao_linear_2x2@plt>
xor    %eax,%eax
call   1080 <teste_solucao_linear_3x3@plt>
xor    %eax,%eax
call   1050 <teste_solucao_linear_4x4@plt>
xor    %eax,%eax
call   1030 <teste_interpolacao_grau_4@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @teste_fatoracao_3x3()
%3 = call i32 (...) @teste_fatoracao_4x4()
%4 = call i32 (...) @teste_solucao_linear_2x2()
%5 = call i32 (...) @teste_solucao_linear_3x3()
%6 = call i32 (...) @teste_solucao_linear_4x4()
%7 = call i32 (...) @teste_interpolacao_grau_4()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @teste_fatoracao_3x3()
%2 = tail call i32 (...) @teste_fatoracao_4x4()
%3 = tail call i32 (...) @teste_solucao_linear_2x2()
%4 = tail call i32 (...) @teste_solucao_linear_3x3()
%5 = tail call i32 (...) @teste_solucao_linear_4x4()
%6 = tail call i32 (...) @teste_interpolacao_grau_4()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void svg_export_end(FILE *f) { fprintf(f, "</svg>\n"); }


x86 assembly (clang, -O0):
<svg_export_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<svg_export_end>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x7,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"</svg>\0A\00"
define void @svg_export_end(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"</svg>\0A\00"
define void @svg_export_end(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i64 7, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *, void *);
void check_lib_symbol(void *s, char *name) {
  printf("Symbol '%s' loaded at %p\n", name, s);
}


x86 assembly (clang, -O0):
<check_lib_symbol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%rdx
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_lib_symbol>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [26 x i8] c"Symbol '%s' loaded at %p\0A\00"
define void @check_lib_symbol(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Symbol '%s' loaded at %p\0A\00"
define void @check_lib_symbol(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ dummy(void (*)());
void fptr2(void (*fp)(void)) {
  int i;
  void (*fp2)(void) = fp;
  for (i = 0; i < 50; i++)
    dummy(fp2);
}


x86 assembly (clang, -O0):
<fptr2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x32,-0xc(%rbp)
jge    114c <fptr2+0x3c>
mov    -0x18(%rbp),%rdi
call   1030 <dummy@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <fptr2+0x1b>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fptr2>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x32,%ebp
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   1030 <dummy@plt>
add    $0xffffffff,%ebp
jne    1120 <fptr2+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @fptr2(void ()* %0) {
%2 = alloca void ()*
%3 = alloca i32
%4 = alloca void ()*
store void ()* %0, void ()** %2
%5 = load void ()*, void ()** %2
store void ()* %5, void ()** %4
store i32 0, i32* %3
br label %6
6: ; preds = %13, %1
%7 = load i32, i32* %3
%8 = icmp slt i32 %7, 50
br i1 %8, label %9, label %16
9: ; preds = %6
%10 = load void ()*, void ()** %4
%11 = bitcast void ()* %10 to void (...)*
%12 = call i32 @dummy(void (...)* %11)
br label %13
13: ; preds = %9
%14 = load i32, i32* %3
%15 = add nsw i32 %14, 1
store i32 %15, i32* %3
br label %6
16: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @fptr2(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
br label %3
3: ; preds = %1, %3
%4 = phi i32 [ 0, %1 ], [ %6, %3 ]
%5 = tail call i32 @dummy(void (...)* %2)
%6 = add nuw nsw i32 %4, 1
%7 = icmp eq i32 %6, 50
br i1 %7, label %8, label %3
8: ; preds = %3
ret void
}
/* Type definitions */
struct shdata {
  int dummy;
};

/* Variables and functions */
struct shdata *shdata_create(char const *, scalar_t__);
scalar_t__ strlen(char const *);
struct shdata *shdata_create_from_string(const char *src) {
  return shdata_create(src, strlen(src) + 1);
}


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

x86 assembly (clang, -O2):
<shdata_create_from_string>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
lea    0x1(%rax),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <shdata_create@plt>

LLVM IR (-O0):
%struct.shdata = type { i32 }
define %struct.shdata* @shdata_create_from_string(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call %struct.shdata* @shdata_create(i8* %3, i64 %6)
ret %struct.shdata* %7
}

LLVM IR (-O2):
%struct.shdata = type { i32 }
define %struct.shdata* @shdata_create_from_string(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call %struct.shdata* @shdata_create(i8* %0, i64 %3)
ret %struct.shdata* %4
}
/* Variables and functions */
int /*<<< orphan*/ outl(long, int);
int /*<<< orphan*/ outw(long, int);
void cwstore(long cfgadr, long value) {
  outl((cfgadr | 0x80000000) & ~3, 0xcf8);
  outw(value, (0xcfc + (cfgadr & 3)));
}


x86 assembly (clang, -O0):
<cwstore>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movabs $0x80000000,%rdi
or     -0x8(%rbp),%rdi
and    $0xfffffffffffffffc,%rdi
mov    $0xcf8,%esi
call   1030 <outl@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rax
and    $0x3,%rax
add    $0xcfc,%rax
mov    %eax,%esi
call   1040 <outw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cwstore>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movabs $0xffffffff7ffffffc,%rax
ff ff ff
and    %rdi,%rax
mov    $0x80000000,%edi
or     %rax,%rdi
mov    $0xcf8,%esi
call   1030 <outl@plt>
or     $0xcfc,%ebx
and    $0xcff,%ebx
mov    %r14,%rdi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <outw@plt>

LLVM IR (-O0):
define void @cwstore(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = or i64 %5, 2147483648
%7 = and i64 %6, -4
%8 = call i32 @outl(i64 %7, i32 3320)
%9 = load i64, i64* %4
%10 = load i64, i64* %3
%11 = and i64 %10, 3
%12 = add nsw i64 3324, %11
%13 = trunc i64 %12 to i32
%14 = call i32 @outw(i64 %9, i32 %13)
ret void
}

LLVM IR (-O2):
define void @cwstore(i64 %0, i64 %1) {
%3 = and i64 %0, -2147483652
%4 = or i64 %3, 2147483648
%5 = tail call i32 @outl(i64 %4, i32 3320)
%6 = trunc i64 %0 to i32
%7 = and i32 %6, 3
%8 = or i32 %7, 3324
%9 = tail call i32 @outw(i64 %1, i32 %8)
ret void
}
int f4(int a, unsigned int b) { return a - (a & b); }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x4(%rbp),%ecx
and    -0x8(%rbp),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    %esi,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = and i32 %6, %7
%9 = sub i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = and i32 %3, %0
ret i32 %4
}
unsigned get_frac(unsigned uf) { return uf & ((1 << 23) - 1); }


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

x86 assembly (clang, -O2):
<get_frac>:
mov    %edi,%eax
and    $0x7fffff,%eax
ret

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

LLVM IR (-O2):
define i32 @get_frac(i32 %0) {
%2 = and i32 %0, 8388607
ret i32 %2
}