xunge/DecIR huggingface dataset:
void airkiss_record_move_ones(void *base_addr, int record_num) {
  int i;
  unsigned short *record_base = base_addr;
  for (i = 0; i < record_num; i++) {
    record_base[i] = record_base[i + 1];
  }
}


x86 assembly (clang, -O0):
<airkiss_record_move_ones>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1151 <airkiss_record_move_ones+0x51>
mov    -0x18(%rbp),%rax
mov    -0x10(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,2),%dx
mov    -0x18(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    %dx,(%rax,%rcx,2)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    111a <airkiss_record_move_ones+0x1a>
pop    %rbp
ret

x86 assembly (clang, -O2):
<airkiss_record_move_ones>:
test   %esi,%esi
jle    112a <airkiss_record_move_ones+0x1a>
push   %rax
lea    0x2(%rdi),%rax
mov    %esi,%edx
add    %rdx,%rdx
mov    %rax,%rsi
call   1030 <memmove@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @airkiss_record_move_ones(i8* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = getelementptr i8, i8* %0, i64 2
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 1
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
size_t strlen(const char *s) {
  size_t rc = 0;
  while (s[rc]) {
    ++rc;
  }
  return rc;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1133 <strlen+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int f(int, int);
int main(void) {
  if (f(1, 1) != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x1,%esi
mov    %esi,%edi
call   1040 <f@plt>
cmp    $0x1,%eax
je     114b <main+0x2b>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x1,%esi
call   1040 <f@plt>
cmp    $0x1,%eax
jne    1139 <main+0x19>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @f(i32 1, i32 1)
%3 = icmp ne i32 %2, 1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 (...) @abort()
unreachable
6: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 1, i32 1)
%2 = icmp eq i32 %1, 1
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
void balk() {}


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

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

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

LLVM IR (-O2):
define void @balk() {
ret void
}
int strcmp(const char *s1, const char *s2) {
  while (*s1 != 0 && *s1 == *s2) {
    ++s1;
    ++s2;
  }
  return (unsigned char)*s1 - (unsigned char)*s2;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1137 <strcmp+0x37>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1147 <strcmp+0x47>
jmp    1164 <strcmp+0x64>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110c <strcmp+0xc>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movzbl (%rcx),%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
mov    (%rdi),%al
test   %al,%al
je     1123 <strcmp+0x23>
add    $0x1,%rdi
nopw   0x0(%rax,%rax,1)
cmp    (%rsi),%al
jne    1125 <strcmp+0x25>
add    $0x1,%rsi
movzbl (%rdi),%eax
add    $0x1,%rdi
test   %al,%al
jne    1110 <strcmp+0x10>
xor    %eax,%eax
movzbl %al,%eax
movzbl (%rsi),%ecx
sub    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %16, label %5
5: ; preds = %2, %11
%6 = phi i8 [ %14, %11 ], [ %3, %2 ]
%7 = phi i8* [ %13, %11 ], [ %1, %2 ]
%8 = phi i8* [ %12, %11 ], [ %0, %2 ]
%9 = load i8, i8* %7
%10 = icmp eq i8 %6, %9
br i1 %10, label %11, label %16
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = getelementptr inbounds i8, i8* %7, i64 1
%14 = load i8, i8* %12
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %5
16: ; preds = %5, %11, %2
%17 = phi i8* [ %1, %2 ], [ %13, %11 ], [ %7, %5 ]
%18 = phi i8 [ 0, %2 ], [ 0, %11 ], [ %6, %5 ]
%19 = zext i8 %18 to i32
%20 = load i8, i8* %17
%21 = zext i8 %20 to i32
%22 = sub nsw i32 %19, %21
ret i32 %22
}
/* Variables and functions */
int /*<<< orphan*/ test_named();
int /*<<< orphan*/ test_unnamed();
int main(void) {
  test_unnamed();
  test_named();
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_unnamed()
%2 = tail call i32 (...) @test_named()
ret i32 0
}
/* Variables and functions */
int EXIT_FAILURE;
scalar_t__ EXIT_SUCCESS;
scalar_t__ ft_putchar_fd(char, int);
int ft_putnchar_fd(char, size_t, int);
int ft_putncharl_fd(char c, size_t n, int fd) {
  int ret;
  ret = ft_putnchar_fd(c, n, fd);
  ret = ft_putchar_fd('\n', fd) == EXIT_SUCCESS ? ret : EXIT_FAILURE;
  return (ret);
}


x86 assembly (clang, -O0):
<ft_putncharl_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x1(%rbp),%al
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
movsbl %al,%edi
call   1030 <ft_putnchar_fd@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%esi
mov    $0xa,%edi
call   1040 <ft_putchar_fd@plt>
mov    0x2e7a(%rip),%rcx
cmp    (%rcx),%rax
jne    1172 <ft_putncharl_fd+0x52>
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
jmp    117e <ft_putncharl_fd+0x5e>
mov    0x2e67(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putncharl_fd>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebp
call   1030 <ft_putnchar_fd@plt>
mov    %eax,%ebx
mov    $0xa,%edi
mov    %ebp,%esi
call   1040 <ft_putchar_fd@plt>
mov    0x2e99(%rip),%rcx
cmp    (%rcx),%rax
je     114d <ft_putncharl_fd+0x2d>
mov    0x2e95(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putncharl_fd(i8 signext %0, i64 %1, i32 %2) {
%4 = alloca i8
%5 = alloca i64
%6 = alloca i32
%7 = alloca i32
store i8 %0, i8* %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%8 = load i8, i8* %4
%9 = load i64, i64* %5
%10 = load i32, i32* %6
%11 = call i32 @ft_putnchar_fd(i8 signext %8, i64 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %6
%13 = call i64 @ft_putchar_fd(i8 signext 10, i32 %12)
%14 = load i64, i64* @EXIT_SUCCESS
%15 = icmp eq i64 %13, %14
br i1 %15, label %16, label %18
16: ; preds = %3
%17 = load i32, i32* %7
br label %20
18: ; preds = %3
%19 = load i32, i32* @EXIT_FAILURE
br label %20
20: ; preds = %18, %16
%21 = phi i32 [ %17, %16 ], [ %19, %18 ]
store i32 %21, i32* %7
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i64 0
@EXIT_FAILURE = global i32 0
define i32 @ft_putncharl_fd(i8 signext %0, i64 %1, i32 %2) {
%4 = tail call i32 @ft_putnchar_fd(i8 signext %0, i64 %1, i32 %2)
%5 = tail call i64 @ft_putchar_fd(i8 signext 10, i32 %2)
%6 = load i64, i64* @EXIT_SUCCESS
%7 = icmp eq i64 %5, %6
%8 = load i32, i32* @EXIT_FAILURE
%9 = select i1 %7, i32 %4, i32 %8
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ ispunct(int);
void t_ispunct_0xa1() {
  Assert_real((ispunct(161) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_ispunct.c",
              810, ("ispunct should be 0 for 0xa1"));
}


x86 assembly (clang, -O0):
<t_ispunct_0xa1>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa1,%edi
call   1030 <ispunct@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x32a,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_ispunct_0xa1>:
push   %rax
mov    $0xa1,%edi
call   1030 <ispunct@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x32a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xa1\00"
define void @t_ispunct_0xa1() {
%1 = call i64 @ispunct(i32 161)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 810, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_ispunct.c\00"
@.str.1 = [29 x i8] c"ispunct should be 0 for 0xa1\00"
define void @t_ispunct_0xa1() {
%1 = tail call i64 @ispunct(i32 161)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 810, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
double absVal(double val) { return ((val < 0) ? (-val) : (val)); }


x86 assembly (clang, -O0):
<absVal>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    113d <absVal+0x3d>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  %xmm0,-0x10(%rbp)
jmp    1147 <absVal+0x47>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<absVal>:
movapd 0xef8(%rip),%xmm2
xorpd  %xmm0,%xmm2
xorpd  %xmm3,%xmm3
movapd %xmm0,%xmm1
cmpltsd %xmm3,%xmm1
andpd  %xmm1,%xmm2
andnpd %xmm0,%xmm1
orpd   %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @absVal(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fcmp olt double %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load double, double* %2
%7 = fneg double %6
br label %10
8: ; preds = %1
%9 = load double, double* %2
br label %10
10: ; preds = %8, %5
%11 = phi double [ %7, %5 ], [ %9, %8 ]
ret double %11
}

LLVM IR (-O2):
define double @absVal(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
%3 = fneg double %0
%4 = select i1 %2, double %3, double %0
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void printer(char *text) { printf("%s", text); }


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

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

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
define void @printer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @printer(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
size_t aeron_str_to_ptr_hash_map_hash_key(uint64_t key, size_t mask) {
  return (key * 31) & mask;
}


x86 assembly (clang, -O0):
<aeron_str_to_ptr_hash_map_hash_key>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
imul   $0x1f,-0x4(%rbp),%eax
cltq
and    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aeron_str_to_ptr_hash_map_hash_key>:
mov    %edi,%eax
shl    $0x5,%eax
sub    %edi,%eax
cltq
and    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @aeron_str_to_ptr_hash_map_hash_key(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
%5 = load i32, i32* %3
%6 = mul nsw i32 %5, 31
%7 = sext i32 %6 to i64
%8 = load i64, i64* %4
%9 = and i64 %7, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @aeron_str_to_ptr_hash_map_hash_key(i32 %0, i64 %1) {
%3 = mul nsw i32 %0, 31
%4 = sext i32 %3 to i64
%5 = and i64 %4, %1
ret i64 %5
}
int test_imm_31uint64_lowword_reg(unsigned long long val) {
  return ((val) & (0x31 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_31uint64_lowword_reg(i64 %0) {
%2 = and i64 %0, 49
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
unsigned xrop3_183_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  stk2 = D ^ T;
  stk1 = S & stk2;
  stk1 = ~stk1;
  return (stk1 & (~S) & (~T)) | (D & S) | (D & T);
}


x86 assembly (clang, -O0):
<xrop3_183_1_1>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0xc(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x10(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0x10(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_183_1_1>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %esi,%eax
shl    $0x8,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%esi
or     %esi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_183_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%10 = load i8, i8* %3
%11 = zext i8 %10 to i32
%12 = shl i32 %11, 8
%13 = load i8, i8* %3
%14 = zext i8 %13 to i32
%15 = or i32 %12, %14
store i32 %15, i32* %6
%16 = load i8, i8* %4
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = load i8, i8* %4
%20 = zext i8 %19 to i32
%21 = or i32 %18, %20
store i32 %21, i32* %7
%22 = load i32, i32* %5
%23 = load i32, i32* %7
%24 = xor i32 %22, %23
store i32 %24, i32* %9
%25 = load i32, i32* %6
%26 = load i32, i32* %9
%27 = and i32 %25, %26
store i32 %27, i32* %8
%28 = load i32, i32* %8
%29 = xor i32 %28, -1
store i32 %29, i32* %8
%30 = load i32, i32* %8
%31 = load i32, i32* %6
%32 = xor i32 %31, -1
%33 = and i32 %30, %32
%34 = load i32, i32* %7
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = and i32 %37, %38
%40 = or i32 %36, %39
%41 = load i32, i32* %5
%42 = load i32, i32* %7
%43 = and i32 %41, %42
%44 = or i32 %40, %43
ret i32 %44
}

LLVM IR (-O2):
define i32 @xrop3_183_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = mul nuw nsw i32 %5, 257
%7 = or i32 %6, %4
%8 = xor i32 %7, -1
%9 = or i8 %1, %0
%10 = zext i8 %9 to i32
%11 = or i32 %10, %8
ret i32 %11
}
/* Type definitions */
struct tc_tree {
  int dummy;
};
struct tc_node {
  int dummy;
};

/* Variables and functions */
struct tc_node *tc_new_node(struct tc_tree *, int /*<<< orphan*/,
                            int /*<<< orphan*/, int /*<<< orphan*/ *);
struct tc_node *tc_new_leaf(struct tc_tree *tree) {
  return tc_new_node(tree, 0, 0, NULL);
}


x86 assembly (clang, -O0):
<tc_new_leaf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %edx,%edx
xor    %eax,%eax
mov    %eax,%ecx
mov    %edx,%esi
call   1030 <tc_new_node@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tc_new_leaf>:
xor    %esi,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <tc_new_node@plt>

LLVM IR (-O0):
%struct.tc_node = type { i32 }
%struct.tc_tree = type { i32 }
define %struct.tc_node* @tc_new_leaf(%struct.tc_tree* %0) {
%2 = alloca %struct.tc_tree*
store %struct.tc_tree* %0, %struct.tc_tree** %2
%3 = load %struct.tc_tree*, %struct.tc_tree** %2
%4 = call %struct.tc_node* @tc_new_node(%struct.tc_tree* %3, i32 0, i32 0, i32* null)
ret %struct.tc_node* %4
}

LLVM IR (-O2):
%struct.tc_node = type { i32 }
%struct.tc_tree = type { i32 }
define %struct.tc_node* @tc_new_leaf(%struct.tc_tree* %0) {
%2 = tail call %struct.tc_node* @tc_new_node(%struct.tc_tree* %0, i32 0, i32 0, i32* null)
ret %struct.tc_node* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ SEEK_CUR;
int /*<<< orphan*/ fread(int *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ fseek(int /*<<< orphan*/ *, int, int /*<<< orphan*/);
int qemu_peek_byte(FILE *f, int offset) {
  int val;
  fseek(f, offset, SEEK_CUR);
  fread(&val, 1, 1, f);
  fseek(f, -(offset + 1), SEEK_CUR);
  return val;
}


x86 assembly (clang, -O0):
<qemu_peek_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    0x2eab(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x8(%rbp),%rcx
lea    -0x10(%rbp),%rdi
mov    $0x1,%edx
mov    %edx,%esi
call   1030 <fread@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%eax
add    $0x1,%eax
xor    %esi,%esi
sub    %eax,%esi
mov    0x2e7b(%rip),%rax
mov    (%rax),%edx
call   1040 <fseek@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qemu_peek_byte>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%ebx
mov    %rdi,%r14
mov    0x2eb3(%rip),%r15
mov    (%r15),%edx
call   1040 <fseek@plt>
lea    0xc(%rsp),%rdi
mov    $0x1,%esi
mov    $0x1,%edx
mov    %r14,%rcx
call   1030 <fread@plt>
not    %ebx
mov    (%r15),%edx
mov    %r14,%rdi
mov    %ebx,%esi
call   1040 <fseek@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@SEEK_CUR = global i32 0
define i32 @qemu_peek_byte(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** %3
%7 = load i32, i32* %4
%8 = load i32, i32* @SEEK_CUR
%9 = call i32 @fseek(i32* %6, i32 %7, i32 %8)
%10 = load i32*, i32** %3
%11 = call i32 @fread(i32* %5, i32 1, i32 1, i32* %10)
%12 = load i32*, i32** %3
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
%15 = sub nsw i32 0, %14
%16 = load i32, i32* @SEEK_CUR
%17 = call i32 @fseek(i32* %12, i32 %15, i32 %16)
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
@SEEK_CUR = global i32 0
define i32 @qemu_peek_byte(i32* nocapture %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = load i32, i32* @SEEK_CUR
%6 = tail call i32 @fseek(i32* %0, i32 %1, i32 %5)
%7 = call i32 @fread(i32* %3, i32 1, i32 1, i32* %0)
%8 = xor i32 %1, -1
%9 = load i32, i32* @SEEK_CUR
%10 = tail call i32 @fseek(i32* %0, i32 %8, i32 %9)
%11 = load i32, i32* %3
ret i32 %11
}
_Complex double dfn_rcd(void) {
  return ({
    _Complex double x;
    __real__(x) = (11), __imag__(x) == (12);
    x;
  });
}


x86 assembly (clang, -O0):
<dfn_rcd>:
push   %rbp
mov    %rsp,%rbp
movabs $0x4026000000000000,%rax
mov    %rax,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movsd  %xmm1,-0x30(%rbp)
movsd  %xmm0,-0x28(%rbp)
movsd  -0x30(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
pop    %rbp
ret

x86 assembly (clang, -O2):
<dfn_rcd>:
movsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define { double, double } @dfn_rcd() {
%1 = alloca { double, double }
%2 = alloca { double, double }
%3 = alloca { double, double }
%4 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
store double 1.100000e+01, double* %4
%5 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
%6 = load double, double* %5
%7 = fcmp oeq double %6, 1.200000e+01
%8 = zext i1 %7 to i32
%9 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 0
%10 = load double, double* %9
%11 = getelementptr inbounds { double, double }, { double, double }* %2, i32 0, i32 1
%12 = load double, double* %11
%13 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%14 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
store double %10, double* %13
store double %12, double* %14
%15 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 0
%16 = load double, double* %15
%17 = getelementptr inbounds { double, double }, { double, double }* %3, i32 0, i32 1
%18 = load double, double* %17
%19 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 0
%20 = getelementptr inbounds { double, double }, { double, double }* %1, i32 0, i32 1
store double %16, double* %19
store double %18, double* %20
%21 = load { double, double }, { double, double }* %1
ret { double, double } %21
}

LLVM IR (-O2):
define { double, double } @dfn_rcd() {
ret { double, double } { double 1.100000e+01, double undef }
}
int main() { return sizeof(short int); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 2
}
/* Variables and functions */
int /*<<< orphan*/ scanf(char *, int *);
void getArr(int A[]) {
  int i;
  for (i = 0; i < 5; ++i)
    scanf("%d", &A[i]);
}


x86 assembly (clang, -O0):
<getArr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1156 <getArr+0x46>
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    %rax,%rsi
lea    0xebd(%rip),%rdi
call   1030 <scanf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1123 <getArr+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getArr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xee2(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <scanf@plt>
lea    0x4(%rbx),%rsi
mov    %r14,%rdi
call   1030 <scanf@plt>
lea    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1030 <scanf@plt>
lea    0xc(%rbx),%rsi
mov    %r14,%rdi
call   1030 <scanf@plt>
add    $0x10,%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <scanf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @getArr(i32* %0) {
%2 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %0)
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%5 = getelementptr inbounds i32, i32* %0, i64 2
%6 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %5)
%7 = getelementptr inbounds i32, i32* %0, i64 3
%8 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %7)
%9 = getelementptr inbounds i32, i32* %0, i64 4
%10 = tail call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %9)
ret void
}
void alarm_handler(int signum) {}


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

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

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

LLVM IR (-O2):
define void @alarm_handler(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ *get_su_passwd(char *);
int is_sysop(char *name) {
  if (name == NULL || !*name || get_su_passwd(name) == NULL)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_sysop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1147 <is_sysop+0x37>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1147 <is_sysop+0x37>
mov    -0x10(%rbp),%rdi
call   1030 <get_su_passwd@plt>
cmp    $0x0,%rax
jne    1153 <is_sysop+0x43>
movl   $0x0,-0x4(%rbp)
jmp    115a <is_sysop+0x4a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sysop>:
push   %rax
xor    %eax,%eax
test   %rdi,%rdi
je     112d <is_sysop+0x1d>
cmpb   $0x0,(%rdi)
je     112d <is_sysop+0x1d>
call   1030 <get_su_passwd@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @is_sysop(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %3
%7 = tail call i32* @get_su_passwd(i8* %0)
%8 = icmp ne i32* %7, null
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %1, %3
%11 = phi i32 [ 0, %3 ], [ 0, %1 ], [ %9, %6 ]
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_AVTransport_GetCurrentTransportActions(void *,
                                                                       char *);
int /*<<< orphan*/ printf(char *, unsigned int);
void UPnPAVTransport_GetCurrentTransportActions(void *upnptoken,
                                                unsigned int InstanceID) {
  printf("Invoke: UPnPAVTransport_GetCurrentTransportActions(%u);\r\n",
         InstanceID);
  UPnPResponse_AVTransport_GetCurrentTransportActions(upnptoken,
                                                      "Sample String");
}


x86 assembly (clang, -O0):
<UPnPAVTransport_GetCurrentTransportActions>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
lea    0xef1(%rip),%rsi
call   1040 <UPnPResponse_AVTransport_GetCurrentTransportActions@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPAVTransport_GetCurrentTransportActions>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
lea    0xf03(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UPnPResponse_AVTransport_GetCurrentTransportActions@plt>

LLVM IR (-O0):
@.str = [58 x i8] c"Invoke: UPnPAVTransport_GetCurrentTransportActions(%u);\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UPnPAVTransport_GetCurrentTransportActions(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i32 @UPnPResponse_AVTransport_GetCurrentTransportActions(i8* %7, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [58 x i8] c"Invoke: UPnPAVTransport_GetCurrentTransportActions(%u);\0D\0A\00"
@.str.1 = [14 x i8] c"Sample String\00"
define void @UPnPAVTransport_GetCurrentTransportActions(i8* %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = tail call i32 @UPnPResponse_AVTransport_GetCurrentTransportActions(i8* %0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int EnDrv(int, double, double, double *);
int E_modeShapeDrv(int p, double *L, double drv[2]) {
  return EnDrv(p - 2, L[0], L[1], drv);
}


x86 assembly (clang, -O0):
<E_modeShapeDrv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x2,%edi
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x18(%rbp),%rsi
call   1030 <EnDrv@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<E_modeShapeDrv>:
add    $0xfffffffe,%edi
movsd  (%rsi),%xmm0
movsd  0x8(%rsi),%xmm1
mov    %rdx,%rsi
jmp    1030 <EnDrv@plt>

LLVM IR (-O0):
define i32 @E_modeShapeDrv(i32 %0, double* %1, double* %2) {
%4 = alloca i32
%5 = alloca double*
%6 = alloca double*
store i32 %0, i32* %4
store double* %1, double** %5
store double* %2, double** %6
%7 = load i32, i32* %4
%8 = sub nsw i32 %7, 2
%9 = load double*, double** %5
%10 = getelementptr inbounds double, double* %9, i64 0
%11 = load double, double* %10
%12 = load double*, double** %5
%13 = getelementptr inbounds double, double* %12, i64 1
%14 = load double, double* %13
%15 = load double*, double** %6
%16 = call i32 @EnDrv(i32 %8, double %11, double %14, double* %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @E_modeShapeDrv(i32 %0, double* nocapture %1, double* %2) {
%4 = add nsw i32 %0, -2
%5 = load double, double* %1
%6 = getelementptr inbounds double, double* %1, i64 1
%7 = load double, double* %6
%8 = tail call i32 @EnDrv(i32 %4, double %5, double %7, double* %2)
ret i32 %8
}
int Mini_AigLit2Var(int Lit) { return Lit >> 1; }


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

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

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

LLVM IR (-O2):
define i32 @Mini_AigLit2Var(i32 %0) {
%2 = ashr i32 %0, 1
ret i32 %2
}
/* Variables and functions */
int next_utf8(char const *, int *);
int fn_ch_40(const char *text) {
  int pos = 0;
  if (next_utf8(text, &pos) == 40)
    return pos;
  return -1;
}


x86 assembly (clang, -O0):
<fn_ch_40>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x14(%rbp),%rsi
call   1030 <next_utf8@plt>
cmp    $0x28,%eax
jne    1144 <fn_ch_40+0x34>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    114b <fn_ch_40+0x3b>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fn_ch_40>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
call   1030 <next_utf8@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
cmp    $0x28,%ecx
jne    1133 <fn_ch_40+0x23>
mov    0x4(%rsp),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @fn_ch_40(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @next_utf8(i8* %0, i32* %2)
%5 = icmp eq i32 %4, 40
%6 = load i32, i32* %2
%7 = select i1 %5, i32 %6, i32 -1
ret i32 %7
}
void rop3_150_0_1(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  stk2 = T ^ S;
  stk1 = *D ^ stk2;
  *D = (stk1 & S) | (stk1 & (~T)) | (T & (~S) & *D);
}


x86 assembly (clang, -O0):
<rop3_150_0_1>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
movzbl -0x9(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
movzbl -0x9(%rbp),%ecx
and    %ecx,%eax
movzbl -0xb(%rbp),%ecx
movzbl -0xa(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
movzbl -0x9(%rbp),%edx
xor    $0xffffffff,%edx
and    %edx,%ecx
mov    -0x8(%rbp),%rdx
movzbl (%rdx),%edx
and    %edx,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_150_0_1>:
mov    %edx,%eax
xor    %sil,%al
mov    (%rdi),%r8b
xor    %r8b,%al
mov    %edx,%ecx
not    %cl
or     %sil,%cl
and    %al,%cl
not    %sil
and    %dl,%sil
and    %r8b,%sil
or     %cl,%sil
mov    %sil,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_150_0_1(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%9 = load i8, i8* %6
%10 = zext i8 %9 to i32
%11 = load i8, i8* %5
%12 = zext i8 %11 to i32
%13 = xor i32 %10, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %8
%15 = load i8*, i8** %4
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = load i8, i8* %8
%19 = zext i8 %18 to i32
%20 = xor i32 %17, %19
%21 = trunc i32 %20 to i8
store i8 %21, i8* %7
%22 = load i8, i8* %7
%23 = zext i8 %22 to i32
%24 = load i8, i8* %5
%25 = zext i8 %24 to i32
%26 = and i32 %23, %25
%27 = load i8, i8* %7
%28 = zext i8 %27 to i32
%29 = load i8, i8* %6
%30 = zext i8 %29 to i32
%31 = xor i32 %30, -1
%32 = and i32 %28, %31
%33 = or i32 %26, %32
%34 = load i8, i8* %6
%35 = zext i8 %34 to i32
%36 = load i8, i8* %5
%37 = zext i8 %36 to i32
%38 = xor i32 %37, -1
%39 = and i32 %35, %38
%40 = load i8*, i8** %4
%41 = load i8, i8* %40
%42 = zext i8 %41 to i32
%43 = and i32 %39, %42
%44 = or i32 %33, %43
%45 = trunc i32 %44 to i8
%46 = load i8*, i8** %4
store i8 %45, i8* %46
ret void
}

LLVM IR (-O2):
define void @rop3_150_0_1(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, %1
%5 = load i8, i8* %0
%6 = xor i8 %4, %5
%7 = xor i8 %2, -1
%8 = or i8 %7, %1
%9 = and i8 %6, %8
%10 = xor i8 %1, -1
%11 = and i8 %10, %2
%12 = and i8 %11, %5
%13 = or i8 %9, %12
store i8 %13, i8* %0
ret void
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int set_dobldobl_state_to_silent(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc4c(658, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<set_dobldobl_state_to_silent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x292,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_dobldobl_state_to_silent>:
mov    $0x292,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc4c@plt>

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

LLVM IR (-O2):
define i32 @set_dobldobl_state_to_silent() {
%1 = tail call i32 @_ada_use_c2phc4c(i32 658, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Type definitions */
struct cmd {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/);
struct cmd *parse_cmd(char *);
int /*<<< orphan*/ stdin;
struct cmd *read_cmd(void) {
  static char buf[2048];
  if (fgets(buf, 2048, stdin) == NULL) {
    exit(0);
  }
  return parse_cmd(buf);
}


x86 assembly (clang, -O0):
<read_cmd>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
lea    0x2f0c(%rip),%rdi
mov    $0x800,%esi
call   1040 <fgets@plt>
cmp    $0x0,%rax
jne    115f <read_cmd+0x2f>
xor    %edi,%edi
call   1050 <exit@plt>
lea    0x2eea(%rip),%rdi
call   1030 <parse_cmd@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_cmd>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edx
lea    0x2f0f(%rip),%rdi
mov    $0x800,%esi
call   1040 <fgets@plt>
test   %rax,%rax
je     115d <read_cmd+0x2d>
lea    0x2ef9(%rip),%rdi
pop    %rax
jmp    1030 <parse_cmd@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
%struct.cmd = type { i32 }
@read_cmd.buf = internal global [2048 x i8] zeroinitializer
@stdin = global i32 0
define %struct.cmd* @read_cmd() {
%1 = load i32, i32* @stdin
%2 = call i32* @fgets(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @read_cmd.buf, i64 0, i64 0), i32 2048, i32 %1)
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @exit(i32 0)
unreachable
6: ; preds = %0
%7 = call %struct.cmd* @parse_cmd(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @read_cmd.buf, i64 0, i64 0))
ret %struct.cmd* %7
}

LLVM IR (-O2):
%struct.cmd = type { i32 }
@read_cmd.buf = internal global [2048 x i8] zeroinitializer
@stdin = global i32 0
define %struct.cmd* @read_cmd() {
%1 = load i32, i32* @stdin
%2 = tail call i32* @fgets(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @read_cmd.buf, i64 0, i64 0), i32 2048, i32 %1)
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = tail call i32 @exit(i32 0)
unreachable
6: ; preds = %0
%7 = tail call %struct.cmd* @parse_cmd(i8* getelementptr inbounds ([2048 x i8], [2048 x i8]* @read_cmd.buf, i64 0, i64 0))
ret %struct.cmd* %7
}
/* Variables and functions */
int /*<<< orphan*/ vfddTransRead();
void transRead() { vfddTransRead(); }


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

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

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

LLVM IR (-O2):
define void @transRead() {
%1 = tail call i32 (...) @vfddTransRead()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ PKCS7;

/* Variables and functions */
int /*<<< orphan*/ *ASN1_item_dup(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int /*<<< orphan*/ PKCS7_it;
PKCS7 *PKCS7_dup(PKCS7 *x) { return ASN1_item_dup(&PKCS7_it, x); }


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

x86 assembly (clang, -O2):
<PKCS7_dup>:
mov    %rdi,%rsi
mov    0x2ec6(%rip),%rdi
jmp    1030 <ASN1_item_dup@plt>

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

LLVM IR (-O2):
@PKCS7_it = global i32 0
define i32* @PKCS7_dup(i32* %0) {
%2 = tail call i32* @ASN1_item_dup(i32* @PKCS7_it, i32* %0)
ret i32* %2
}
void on_error_callback(void *arg) { printf("error in %s\n", arg); }


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

x86 assembly (clang, -O2):
<on_error_callback>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
xor    %eax,%eax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"error in %s\0A\00"
define void @on_error_callback(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"error in %s\0A\00"
define void @on_error_callback(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main() {
  int foo[][2] = {{1, 2}, {3, 4}};
  assert(foo[0][0] == 1);
  assert(foo[0][1] == 2);
  assert(foo[1][0] == 3);
  assert(foo[1][1] == 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
cmpl   $0x1,-0x20(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x2,-0x1c(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x3,-0x18(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x4,-0x14(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.foo = [2 x [2 x i32]] [[2 x i32] [i32 1, i32 2], [2 x i32] [i32 3, i32 4]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [2 x [2 x i32]]
store i32 0, i32* %1
%3 = bitcast [2 x [2 x i32]]* %2 to i8*
%4 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %2, i64 0, i64 0
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %4, i64 0, i64 0
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 1
%8 = zext i1 %7 to i32
%9 = call i32 @assert(i32 %8)
%10 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %2, i64 0, i64 0
%11 = getelementptr inbounds [2 x i32], [2 x i32]* %10, i64 0, i64 1
%12 = load i32, i32* %11
%13 = icmp eq i32 %12, 2
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %2, i64 0, i64 1
%17 = getelementptr inbounds [2 x i32], [2 x i32]* %16, i64 0, i64 0
%18 = load i32, i32* %17
%19 = icmp eq i32 %18, 3
%20 = zext i1 %19 to i32
%21 = call i32 @assert(i32 %20)
%22 = getelementptr inbounds [2 x [2 x i32]], [2 x [2 x i32]]* %2, i64 0, i64 1
%23 = getelementptr inbounds [2 x i32], [2 x i32]* %22, i64 0, i64 1
%24 = load i32, i32* %23
%25 = icmp eq i32 %24, 4
%26 = zext i1 %25 to i32
%27 = call i32 @assert(i32 %26)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 1)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
%4 = tail call i32 @assert(i32 1)
ret i32 0
}