xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_177() {
  Assert_real((isqrt(177) == 13),
              "/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/stdlib/isqrt.c",
              890, ("Integer square root of 177 should be 13"));
}


x86 assembly (clang, -O0):
<t_sqrt_177>:
push   %rbp
mov    %rsp,%rbp
mov    $0xb1,%edi
call   1030 <isqrt@plt>
cmp    $0xd,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x37a,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_177>:
push   %rax
mov    $0xb1,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xd,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x37a,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 177 should be 13\00"
define void @t_sqrt_177() {
%1 = call i32 @isqrt(i32 177)
%2 = icmp eq i32 %1, 13
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 890, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 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/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 177 should be 13\00"
define void @t_sqrt_177() {
%1 = tail call i32 @isqrt(i32 177)
%2 = icmp eq i32 %1, 13
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 890, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int wint_t;

/* Variables and functions */
wint_t towupper(wint_t x) {
  if (x >= L'a' && x <= L'z')
    x = (x - L'a') + L'A';
  return x;
}


x86 assembly (clang, -O0):
<towupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x61,-0x4(%rbp)
jl     1127 <towupper+0x27>
cmpl   $0x7a,-0x4(%rbp)
jg     1127 <towupper+0x27>
mov    -0x4(%rbp),%eax
sub    $0x61,%eax
add    $0x41,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<towupper>:
lea    -0x61(%rdi),%ecx
lea    -0x20(%rdi),%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @towupper(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 97
br i1 %4, label %5, label %12
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 122
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = load i32, i32* %2
%10 = sub nsw i32 %9, 97
%11 = add nsw i32 %10, 65
store i32 %11, i32* %2
br label %12
12: ; preds = %8, %5, %1
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @towupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = add nsw i32 %0, -32
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Variables and functions */
int startTest(char const *);
int main() {
  const char *vf = "vectors/gcm_test_vectors.bin";
  return startTest(vf);
}


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

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

LLVM IR (-O0):
@.str = [29 x i8] c"vectors/gcm_test_vectors.bin\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @startTest(i8* %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [29 x i8] c"vectors/gcm_test_vectors.bin\00"
define i32 @main() {
%1 = tail call i32 @startTest(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
int main() {
  int *a;
  a = 0;
  int *c;
  c = 4;
  int b = 0;
  for (;;) {
    b++;
    *c++;
    *a++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x4,%eax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x30(%rbp)
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
mov    %rax,-0x10(%rbp)
jmp    1123 <main+0x23>

x86 assembly (clang, -O2):
<main>:
jmp    1100 <main>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i32*
%4 = alloca i32
store i32 0, i32* %1
store i32* null, i32** %2
store i32* inttoptr (i64 4 to i32*), i32** %3
store i32 0, i32* %4
br label %5
5: ; preds = %5, %0
%6 = load i32, i32* %4
%7 = add nsw i32 %6, 1
store i32 %7, i32* %4
%8 = load i32*, i32** %3
%9 = getelementptr inbounds i32, i32* %8, i32 1
store i32* %9, i32** %3
%10 = load i32, i32* %8
%11 = load i32*, i32** %2
%12 = getelementptr inbounds i32, i32* %11, i32 1
store i32* %12, i32** %2
%13 = load i32, i32* %11
br label %5
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
const char *Doc_Brief(void) { return "Provides Documentation"; }


x86 assembly (clang, -O0):
<Doc_Brief>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Doc_Brief>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [23 x i8] c"Provides Documentation\00"
define i8* @Doc_Brief() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [23 x i8] c"Provides Documentation\00"
define i8* @Doc_Brief() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char);
int /*<<< orphan*/ scanf(char *, char *, char *);
int main(int argc, char const *argv[]) {
  char c_1, c_2;
  scanf("%c %c", &c_1, &c_2);
  if (c_1 == 'J' && c_2 == 'J')
    c_2 = 'Q';
  printf("%c %c\n", c_1, c_2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xec3(%rip),%rdi
lea    -0x11(%rbp),%rsi
lea    -0x12(%rbp),%rdx
call   1040 <scanf@plt>
movsbl -0x11(%rbp),%eax
cmp    $0x4a,%eax
jne    1168 <main+0x48>
movsbl -0x12(%rbp),%eax
cmp    $0x4a,%eax
jne    1168 <main+0x48>
movb   $0x51,-0x12(%rbp)
mov    -0x11(%rbp),%al
lea    0xe94(%rip),%rdi
movsbl %al,%esi
movsbl -0x12(%rbp),%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x7(%rsp),%rsi
lea    0x6(%rsp),%rdx
call   1040 <scanf@plt>
mov    0x7(%rsp),%al
mov    0x6(%rsp),%cl
cmp    $0x4a,%al
jne    114f <main+0x2f>
cmp    $0x4a,%cl
jne    114f <main+0x2f>
movb   $0x51,0x6(%rsp)
mov    $0x51,%cl
movsbl %al,%esi
movsbl %cl,%edx
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%c %c\00"
@.str.1 = [7 x i8] c"%c %c\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i8
%4 = alloca i8
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %4)
%6 = load i8, i8* %3
%7 = icmp eq i8 %6, 74
%8 = load i8, i8* %4
%9 = icmp eq i8 %8, 74
%10 = select i1 %7, i1 %9, i1 false
br i1 %10, label %11, label %12
11: ; preds = %2
store i8 81, i8* %4
br label %12
12: ; preds = %11, %2
%13 = phi i8 [ 81, %11 ], [ %8, %2 ]
%14 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8 signext %6, i8 signext %13)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ key_t;

/* Variables and functions */
int semget(int /*<<< orphan*/, int, int);
int bin_sem_alloc(key_t key, int sem_flags) {
  return semget(key, 1, sem_flags);
}


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

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

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

LLVM IR (-O2):
define i32 @bin_sem_alloc(i32 %0, i32 %1) {
%3 = tail call i32 @semget(i32 %0, i32 1, i32 %1)
ret i32 %3
}
/* Variables and functions */
char peek8(char const *);
int /*<<< orphan*/ putc(char);
int puts(const char *s) {
  short i = 0;
  char c;
  while ((c = peek8(s))) {
    ++i;
    putc(c);
    ++s;
  }
  return i;
}


x86 assembly (clang, -O0):
<puts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <peek8@plt>
mov    %al,-0xb(%rbp)
cmp    $0x0,%al
je     116c <puts+0x4c>
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
movsbl -0xb(%rbp),%edi
call   1030 <putc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <puts+0x12>
movswl -0xa(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<puts>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <peek8@plt>
test   %al,%al
je     115e <puts+0x3e>
add    $0x1,%r14
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
movsbl %al,%edi
call   1030 <putc@plt>
lea    (%r14,%rbx,1),%rdi
call   1040 <peek8@plt>
add    $0x1,%rbx
test   %al,%al
jne    1140 <puts+0x20>
movswl %bx,%eax
jmp    1160 <puts+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i32 @puts(i8* %0) {
%2 = tail call signext i8 @peek8(i8* %0)
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %11, %4 ], [ %2, %1 ]
%6 = phi i8* [ %10, %4 ], [ %0, %1 ]
%7 = phi i16 [ %8, %4 ], [ 0, %1 ]
%8 = add i16 %7, 1
%9 = tail call i32 @putc(i8 signext %5)
%10 = getelementptr inbounds i8, i8* %6, i64 1
%11 = tail call signext i8 @peek8(i8* %10)
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %4
13: ; preds = %4
%14 = sext i16 %8 to i32
br label %15
15: ; preds = %13, %1
%16 = phi i32 [ 0, %1 ], [ %14, %13 ]
ret i32 %16
}
/* Variables and functions */
int /*<<< orphan*/ mk_crctbl(int);
void init_crc(void) { mk_crctbl(0x864cfbL); }


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

x86 assembly (clang, -O2):
<init_crc>:
mov    $0x864cfb,%edi
jmp    1030 <mk_crctbl@plt>

LLVM IR (-O0):
define void @init_crc() {
%1 = call i32 @mk_crctbl(i32 8801531)
ret void
}

LLVM IR (-O2):
define void @init_crc() {
%1 = tail call i32 @mk_crctbl(i32 8801531)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_dump_path();
void test_2(int flag) {
  if (flag)
    __analyzer_dump_path();
}


x86 assembly (clang, -O0):
<test_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112c <test_2+0x1c>
mov    $0x0,%al
call   1030 <__analyzer_dump_path@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_2>:
test   %edi,%edi
je     111b <test_2+0xb>
xor    %eax,%eax
jmp    1030 <__analyzer_dump_path@plt>
ret

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

LLVM IR (-O2):
define void @test_2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 (...) @__analyzer_dump_path()
br label %5
5: ; preds = %3, %1
ret void
}
int __default_match__(void *_a, void *_b) {
  long a = (long)_a;
  long b = (long)_b;
  int res = a > b ? (-1) : a == b ? (0) : (1);
  return res;
}


x86 assembly (clang, -O0):
<__default_match__>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
cmp    -0x20(%rbp),%rax
jle    1137 <__default_match__+0x37>
mov    $0xffffffff,%eax
mov    %eax,-0x28(%rbp)
jmp    114f <__default_match__+0x4f>
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rsi
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    %rsi,%rdx
cmove  %ecx,%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__default_match__>:
xor    %ecx,%ecx
cmp    %rsi,%rdi
setne  %cl
mov    $0xffffffff,%eax
cmovle %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @__default_match__(i8* readnone %0, i8* readnone %1) {
%3 = icmp sgt i8* %0, %1
%4 = icmp ne i8* %0, %1
%5 = zext i1 %4 to i32
%6 = select i1 %3, i32 -1, i32 %5
ret i32 %6
}
long READA(fd, buf, nbyte, status, signo)
long *fd, *buf, *nbyte, *status, *signo;
{ return ((long)reada(*fd, (char *)buf, *nbyte, status, *signo)); }


x86 assembly (clang, -O0):
<READA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    (%rax),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%rax
mov    (%rax),%r8
mov    $0x0,%al
call   1030 <reada@plt>
cltq
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<READA>:
push   %rax
mov    (%rdi),%rdi
mov    (%rdx),%rdx
mov    (%r8),%r8
xor    %eax,%eax
call   1030 <reada@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @READA(i64* %0, i64* %1, i64* %2, i64* %3, i64* %4) {
%6 = alloca i64*
%7 = alloca i64*
%8 = alloca i64*
%9 = alloca i64*
%10 = alloca i64*
store i64* %0, i64** %6
store i64* %1, i64** %7
store i64* %2, i64** %8
store i64* %3, i64** %9
store i64* %4, i64** %10
%11 = load i64*, i64** %6
%12 = load i64, i64* %11
%13 = load i64*, i64** %7
%14 = bitcast i64* %13 to i8*
%15 = load i64*, i64** %8
%16 = load i64, i64* %15
%17 = load i64*, i64** %9
%18 = load i64*, i64** %10
%19 = load i64, i64* %18
%20 = call i32 (i64, i8*, i64, i64*, i64, ...) bitcast (i32 (...)* @reada to i32 (i64, i8*, i64, i64*, i64, ...)*)(i64 %12, i8* %14, i64 %16, i64* %17, i64 %19)
%21 = sext i32 %20 to i64
ret i64 %21
}

LLVM IR (-O2):
define i64 @READA(i64* nocapture %0, i64* %1, i64* nocapture %2, i64* %3, i64* nocapture %4) {
%6 = load i64, i64* %0
%7 = bitcast i64* %1 to i8*
%8 = load i64, i64* %2
%9 = load i64, i64* %4
%10 = tail call i32 (i64, i8*, i64, i64*, i64, ...) bitcast (i32 (...)* @reada to i32 (i64, i8*, i64, i64*, i64, ...)*)(i64 %6, i8* %7, i64 %8, i64* %3, i64 %9)
%11 = sext i32 %10 to i64
ret i64 %11
}
/* Variables and functions */
int /*<<< orphan*/ StabilizationStatusHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void StabilizationStatusUpdated() {
  UAVObjUpdated(StabilizationStatusHandle());
}


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

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

LLVM IR (-O0):
define void @StabilizationStatusUpdated() {
%1 = call i32 (...) @StabilizationStatusHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @StabilizationStatusUpdated() {
%1 = tail call i32 (...) @StabilizationStatusHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int syscall(int, int, unsigned int, char const *, void const *, int);
int fsconfig(int fsfd, unsigned int cmd, const char *key, const void *val,
             int aux) {
  return syscall(-1, fsfd, cmd, key, val, aux);
}


x86 assembly (clang, -O0):
<fsconfig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    -0x1c(%rbp),%r9d
mov    $0xffffffff,%edi
call   1030 <syscall@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsconfig>:
mov    %r8d,%r9d
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %esi,%edx
mov    %edi,%esi
mov    $0xffffffff,%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
define i32 @fsconfig(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i8* %2, i8** %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i32, i32* %6
%12 = load i32, i32* %7
%13 = load i8*, i8** %8
%14 = load i8*, i8** %9
%15 = load i32, i32* %10
%16 = call i32 @syscall(i32 -1, i32 %11, i32 %12, i8* %13, i8* %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @fsconfig(i32 %0, i32 %1, i8* %2, i8* %3, i32 %4) {
%6 = tail call i32 @syscall(i32 -1, i32 %0, i32 %1, i8* %2, i8* %3, i32 %4)
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ sigaddset(int /*<<< orphan*/ *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int /*<<< orphan*/ sigprocmask(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void child_block(int type) {
  sigset_t mask;
  sigemptyset(&mask);
  sigaddset(&mask, SIGCHLD);
  sigprocmask(type, &mask, 0);
}


x86 assembly (clang, -O0):
<child_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
lea    -0x8(%rbp),%rdi
call   1050 <sigaddset@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<child_block>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
lea    0x4(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sigemptyset@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
mov    %rbx,%rdi
call   1050 <sigaddset@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <sigprocmask@plt>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@SIGCHLD = global i32 0
define void @child_block(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @sigemptyset(i32* %3)
%5 = load i32, i32* @SIGCHLD
%6 = call i32 @sigaddset(i32* %3, i32 %5)
%7 = load i32, i32* %2
%8 = call i32 @sigprocmask(i32 %7, i32* %3, i32 0)
ret void
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
define void @child_block(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @sigemptyset(i32* %2)
%5 = load i32, i32* @SIGCHLD
%6 = call i32 @sigaddset(i32* %2, i32 %5)
%7 = call i32 @sigprocmask(i32 %0, i32* %2, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void minitiff_default_error_handler(const char *msg) {
  fprintf(stderr, "** Error: %s\n", msg);
  exit(EXIT_FAILURE);
}


x86 assembly (clang, -O0):
<minitiff_default_error_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e8c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<minitiff_default_error_handler>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"** Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @minitiff_default_error_handler(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EXIT_FAILURE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"** Error: %s\0A\00"
@EXIT_FAILURE = global i32 0
define void @minitiff_default_error_handler(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EXIT_FAILURE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ *malloc(int);
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, int, int);
uint8_t *ts_section_data_alloc_packet() {
  uint8_t *data = malloc(5120);
  memset(data, 0x31, 5120);
  return data;
}


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

x86 assembly (clang, -O2):
<ts_section_data_alloc_packet>:
push   %rbx
mov    $0x1400,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    $0x31,%esi
mov    $0x1400,%edx
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i32* @ts_section_data_alloc_packet() {
%1 = alloca i32*
%2 = call i32* @malloc(i32 5120)
store i32* %2, i32** %1
%3 = load i32*, i32** %1
%4 = call i32 @memset(i32* %3, i32 49, i32 5120)
%5 = load i32*, i32** %1
ret i32* %5
}

LLVM IR (-O2):
define i32* @ts_section_data_alloc_packet() {
%1 = tail call i32* @malloc(i32 5120)
%2 = tail call i32 @memset(i32* %1, i32 49, i32 5120)
ret i32* %1
}
long va_long(__builtin_va_list l) { return __builtin_va_arg(l, long); }


x86 assembly (clang, -O0):
<va_long>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
cmp    $0x28,%eax
ja     113a <va_long+0x3a>
mov    -0x18(%rbp),%rcx
mov    -0xc(%rbp),%edx
movslq %edx,%rax
add    0x10(%rcx),%rax
add    $0x8,%edx
mov    %edx,(%rcx)
mov    %rax,-0x20(%rbp)
jmp    1151 <va_long+0x51>
mov    -0x18(%rbp),%rcx
mov    0x8(%rcx),%rdx
mov    %rdx,%rax
add    $0x8,%rdx
mov    %rdx,0x8(%rcx)
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<va_long>:
mov    (%rdi),%ecx
cmp    $0x28,%rcx
ja     1118 <va_long+0x18>
mov    %rcx,%rax
add    0x10(%rdi),%rax
add    $0x8,%ecx
mov    %ecx,(%rdi)
mov    (%rax),%rax
ret
mov    0x8(%rdi),%rax
lea    0x8(%rax),%rcx
mov    %rcx,0x8(%rdi)
mov    (%rax),%rax
ret

LLVM IR (-O0):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i64 @va_long(%struct.__va_list_tag* %0) {
%2 = alloca %struct.__va_list_tag*
store %struct.__va_list_tag* %0, %struct.__va_list_tag** %2
%3 = load %struct.__va_list_tag*, %struct.__va_list_tag** %2
%4 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %3, i32 0, i32 0
%5 = load i32, i32* %4
%6 = icmp ule i32 %5, 40
br i1 %6, label %7, label %13
7: ; preds = %1
%8 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %3, i32 0, i32 3
%9 = load i8*, i8** %8
%10 = getelementptr i8, i8* %9, i32 %5
%11 = bitcast i8* %10 to i64*
%12 = add i32 %5, 8
store i32 %12, i32* %4
br label %18
13: ; preds = %1
%14 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %3, i32 0, i32 2
%15 = load i8*, i8** %14
%16 = bitcast i8* %15 to i64*
%17 = getelementptr i8, i8* %15, i32 8
store i8* %17, i8** %14
br label %18
18: ; preds = %13, %7
%19 = phi i64* [ %11, %7 ], [ %16, %13 ]
%20 = load i64, i64* %19
ret i64 %20
}

LLVM IR (-O2):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i64 @va_long(%struct.__va_list_tag* nocapture %0) {
%2 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %0, i64 0, i32 0
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 41
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %0, i64 0, i32 3
%7 = load i8*, i8** %6
%8 = zext i32 %3 to i64
%9 = getelementptr i8, i8* %7, i64 %8
%10 = add nuw nsw i32 %3, 8
store i32 %10, i32* %2
br label %15
11: ; preds = %1
%12 = getelementptr inbounds %struct.__va_list_tag, %struct.__va_list_tag* %0, i64 0, i32 2
%13 = load i8*, i8** %12
%14 = getelementptr i8, i8* %13, i64 8
store i8* %14, i8** %12
br label %15
15: ; preds = %11, %5
%16 = phi i8* [ %9, %5 ], [ %13, %11 ]
%17 = bitcast i8* %16 to i64*
%18 = load i64, i64* %17
ret i64 %18
}
/* Type definitions */
struct sigaction {
  void (*sa_handler)(int);
  int /*<<< orphan*/ sa_mask;
  scalar_t__ sa_flags;
};

/* Variables and functions */
int sigaction(int, struct sigaction *, int /*<<< orphan*/);
int /*<<< orphan*/ sigemptyset(int /*<<< orphan*/ *);
int set_handler(int sig, void (*handler)(int sig)) {
  struct sigaction action;
  action.sa_handler = handler;
  action.sa_flags = 0;
  sigemptyset(&action.sa_mask);
  return sigaction(sig, &action, 0);
}


x86 assembly (clang, -O0):
<set_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
movq   $0x0,-0x18(%rbp)
lea    -0x28(%rbp),%rdi
add    $0x8,%rdi
call   1040 <sigemptyset@plt>
mov    -0x4(%rbp),%edi
lea    -0x28(%rbp),%rsi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_handler>:
push   %rbx
sub    $0x20,%rsp
mov    %edi,%ebx
mov    %rsi,0x8(%rsp)
movq   $0x0,0x18(%rsp)
lea    0x10(%rsp),%rdi
call   1040 <sigemptyset@plt>
lea    0x8(%rsp),%rsi
mov    %ebx,%edi
xor    %edx,%edx
call   1030 <sigaction@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.sigaction = type { void (i32)*, i32, i64 }
define i32 @set_handler(i32 %0, void (i32)* %1) {
%3 = alloca i32
%4 = alloca void (i32)*
%5 = alloca %struct.sigaction
store i32 %0, i32* %3
store void (i32)* %1, void (i32)** %4
%6 = load void (i32)*, void (i32)** %4
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 0
store void (i32)* %6, void (i32)** %7
%8 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 2
store i64 0, i64* %8
%9 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %5, i32 0, i32 1
%10 = call i32 @sigemptyset(i32* %9)
%11 = load i32, i32* %3
%12 = call i32 @sigaction(i32 %11, %struct.sigaction* %5, i32 0)
ret i32 %12
}

LLVM IR (-O2):
%struct.sigaction = type { void (i32)*, i32, i64 }
define i32 @set_handler(i32 %0, void (i32)* %1) {
%3 = alloca %struct.sigaction
%4 = bitcast %struct.sigaction* %3 to i8*
%5 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 0
store void (i32)* %1, void (i32)** %5
%6 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 2
store i64 0, i64* %6
%7 = getelementptr inbounds %struct.sigaction, %struct.sigaction* %3, i64 0, i32 1
%8 = call i32 @sigemptyset(i32* %7)
%9 = call i32 @sigaction(i32 %0, %struct.sigaction* %3, i32 0)
ret i32 %9
}
/* Variables and functions */
int mul(int, int);
int add(int arg1, int arg2) {
  int result = mul(arg1, arg2) + arg1 + arg2;
  return result;
}


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

x86 assembly (clang, -O2):
<add>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <mul@plt>
add    %ebp,%ebx
add    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @add(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 = call i32 @mul(i32 %6, i32 %7)
%9 = load i32, i32* %3
%10 = add nsw i32 %8, %9
%11 = load i32, i32* %4
%12 = add nsw i32 %10, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1) {
%3 = tail call i32 @mul(i32 %0, i32 %1)
%4 = add i32 %1, %0
%5 = add i32 %4, %3
ret i32 %5
}
int test_imm_74int8_reg(signed char val) {
  return ((val) & (0x74 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_74int8_reg(i8 signext %0) {
%2 = and i8 %0, 116
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void redisAddServerCommand(struct masterClient *c) {}


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

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

LLVM IR (-O0):
%struct.masterClient = type opaque
define void @redisAddServerCommand(%struct.masterClient* %0) {
%2 = alloca %struct.masterClient*
store %struct.masterClient* %0, %struct.masterClient** %2
ret void
}

LLVM IR (-O2):
%struct.masterClient = type opaque
define void @redisAddServerCommand(%struct.masterClient* nocapture %0) {
ret void
}
void rop3_174_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk3 = ~T;
  stk2 = S & stk3;
  stk1 = *D | stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_174_0_0>:
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
xor    $0xffffffff,%eax
mov    %al,-0xd(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
movzbl -0xc(%rbp),%ecx
or     %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_174_0_0>:
not    %dl
and    %sil,%dl
or     %dl,(%rdi)
ret

LLVM IR (-O0):
define void @rop3_174_0_0(i8* %0, i8 zeroext %1, i8 zeroext %2) {
%4 = alloca i8*
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
%8 = alloca i8
%9 = alloca i8
store i8* %0, i8** %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%10 = load i8, i8* %6
%11 = zext i8 %10 to i32
%12 = xor i32 %11, -1
%13 = trunc i32 %12 to i8
store i8 %13, i8* %9
%14 = load i8, i8* %5
%15 = zext i8 %14 to i32
%16 = load i8, i8* %9
%17 = zext i8 %16 to i32
%18 = and i32 %15, %17
%19 = trunc i32 %18 to i8
store i8 %19, i8* %8
%20 = load i8*, i8** %4
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = load i8, i8* %8
%24 = zext i8 %23 to i32
%25 = or i32 %22, %24
%26 = trunc i32 %25 to i8
store i8 %26, i8* %7
%27 = load i8, i8* %7
%28 = load i8*, i8** %4
store i8 %27, i8* %28
ret void
}

LLVM IR (-O2):
define void @rop3_174_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = xor i8 %2, -1
%5 = and i8 %4, %1
%6 = load i8, i8* %0
%7 = or i8 %6, %5
store i8 %7, i8* %0
ret void
}
/* Variables and functions */
scalar_t__ __cmpsf2(long, double);
long __negsf2(long);
long __abssf2(long a1) {
  if (__cmpsf2(a1, 0.0) < 0)
    return __negsf2(a1);
  else
    return a1;
}


x86 assembly (clang, -O0):
<__abssf2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xorps  %xmm0,%xmm0
call   1030 <__cmpsf2@plt>
cmp    $0x0,%rax
jge    1154 <__abssf2+0x34>
mov    -0x10(%rbp),%rdi
call   1040 <__negsf2@plt>
mov    %rax,-0x8(%rbp)
jmp    115c <__abssf2+0x3c>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__abssf2>:
push   %rbx
mov    %rdi,%rbx
xorps  %xmm0,%xmm0
call   1030 <__cmpsf2@plt>
test   %rax,%rax
js     1136 <__abssf2+0x16>
mov    %rbx,%rax
pop    %rbx
ret
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <__negsf2@plt>

LLVM IR (-O0):
define i64 @__abssf2(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = call i64 @__cmpsf2(i64 %4, double 0.000000e+00)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i64, i64* %3
%9 = call i64 @__negsf2(i64 %8)
store i64 %9, i64* %2
br label %12
10: ; preds = %1
%11 = load i64, i64* %3
store i64 %11, i64* %2
br label %12
12: ; preds = %10, %7
%13 = load i64, i64* %2
ret i64 %13
}

LLVM IR (-O2):
define i64 @__abssf2(i64 %0) {
%2 = tail call i64 @__cmpsf2(i64 %0, double 0.000000e+00)
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i64 @__negsf2(i64 %0)
br label %6
6: ; preds = %1, %4
%7 = phi i64 [ %5, %4 ], [ %0, %1 ]
ret i64 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void do_separator_line(FILE *fout) {
  (void)fprintf(fout, "--------------------------------------------------------"
                      "-----------------------\n");
}


x86 assembly (clang, -O0):
<do_separator_line>:
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):
<do_separator_line>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x50,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

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

LLVM IR (-O2):
@.str = [81 x i8] c"-------------------------------------------------------------------------------\0A\00"
define void @do_separator_line(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str, i64 0, i64 0), i64 80, i64 1, i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;
typedef int /*<<< orphan*/ clockid_t;

/* Variables and functions */
int /*<<< orphan*/ ENOTSUP;
int /*<<< orphan*/ errno;
int pthread_condattr_setclock(pthread_condattr_t *attr, clockid_t clock_id) {
  errno = ENOTSUP;
  return -1;
}


x86 assembly (clang, -O0):
<pthread_condattr_setclock>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2ed6(%rip),%rax
mov    (%rax),%ecx
mov    0x2ebd(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_condattr_setclock>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @pthread_condattr_setclock(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32, i32* @ENOTSUP
store i32 %5, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOTSUP = global i32 0
@errno = global i32 0
define i32 @pthread_condattr_setclock(i32* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @ENOTSUP
store i32 %3, i32* @errno
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ printf(char *, float);
main() {
  int num1;
  float flo1;
  float flo2;
  num1 = 1 + 2 + 3 + 4 + 5;
  flo1 = (1.0 + 1.1 + 1.2 + 1.3 + 1.4 + 1.5) / 6;
  flo2 = (1.6 + 1.7 + 1.8 + 1.9 + 2.0) / 5;
  printf("The Sum of the integers 1 - 5 is %d\n", num1);
  printf("The Average of the floats is %f", (flo1 + flo2) / 2);
  getchar();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xf,-0x4(%rbp)
movss  0xed1(%rip),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  0xec0(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
cvtsi2ssl -0x4(%rbp),%xmm0
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
movss  0xe94(%rip),%xmm1
divss  %xmm1,%xmm0
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
movss  0xed0(%rip),%xmm0
call   1030 <printf@plt>
lea    0xef1(%rip),%rdi
movss  0xec0(%rip),%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [37 x i8] c"The Sum of the integers 1 - 5 is %d\0A\00"
@.str.1 = [32 x i8] c"The Average of the floats is %f\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
store i32 15, i32* %1
store float 1.250000e+00, float* %2
store float 0x3FFCCCCCC0000000, float* %3
%4 = load i32, i32* %1
%5 = sitofp i32 %4 to float
%6 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), float %5)
%7 = load float, float* %2
%8 = load float, float* %3
%9 = fadd float %7, %8
%10 = fdiv float %9, 2.000000e+00
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), float %10)
%12 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [37 x i8] c"The Sum of the integers 1 - 5 is %d\0A\00"
@.str.1 = [32 x i8] c"The Average of the floats is %f\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), float 1.500000e+01)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), float 0x3FF8666660000000)
%3 = tail call i32 (...) @getchar()
ret i32 0
}
void somc_usb_unregister(struct smbchg_chip *chip) {}


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

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

LLVM IR (-O0):
%struct.smbchg_chip = type opaque
define void @somc_usb_unregister(%struct.smbchg_chip* %0) {
%2 = alloca %struct.smbchg_chip*
store %struct.smbchg_chip* %0, %struct.smbchg_chip** %2
ret void
}

LLVM IR (-O2):
%struct.smbchg_chip = type opaque
define void @somc_usb_unregister(%struct.smbchg_chip* nocapture %0) {
ret void
}
/* Variables and functions */
char *my_malloc(size_t);
int /*<<< orphan*/ strcpy(char *, char *);
size_t strlen(char *);
char *my_strdup(char *ptr) {
  size_t len;
  char *dup;
  if (!ptr)
    return NULL;
  len = strlen(ptr);
  dup = my_malloc(len + 1);
  strcpy(dup, ptr);
  return dup;
}


x86 assembly (clang, -O0):
<my_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1154 <my_strdup+0x24>
movq   $0x0,-0x8(%rbp)
jmp    1187 <my_strdup+0x57>
mov    -0x10(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
call   1030 <my_malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcpy@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_strdup>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     115a <my_strdup+0x2a>
mov    %rdi,%rbx
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
call   1030 <my_malloc@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %rbx,%rsi
call   1040 <strcpy@plt>
jmp    115d <my_strdup+0x2d>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @my_strdup(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = tail call i64 @strlen(i8* %0)
%5 = add i64 %4, 1
%6 = tail call i8* @my_malloc(i64 %5)
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
br label %8
8: ; preds = %1, %3
%9 = phi i8* [ %6, %3 ], [ null, %1 ]
ret i8* %9
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int recv(int, char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
int peer_recv(int sockfd) {
  int r;
  char buf[500];
  if ((r = recv(sockfd, buf, 500, 0)) < 0) {
    fprintf(stderr, "Error: Unable to receive message\n");
    return 0;
  }
  return 1;
}


x86 assembly (clang, -O0):
<peer_recv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x200,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
lea    -0x200(%rbp),%rsi
mov    $0x1f4,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,-0xc(%rbp)
cmp    $0x0,%eax
jge    1171 <peer_recv+0x51>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1178 <peer_recv+0x58>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x200,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<peer_recv>:
sub    $0x1f8,%rsp
mov    %rsp,%rsi
mov    $0x1f4,%edx
xor    %ecx,%ecx
call   1030 <recv@plt>
mov    %eax,%ecx
mov    $0x1,%eax
test   %ecx,%ecx
js     1149 <peer_recv+0x29>
add    $0x1f8,%rsp
ret
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
lea    0xea7(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
add    $0x1f8,%rsp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [34 x i8] c"Error: Unable to receive message\0A\00"
define i32 @peer_recv(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca [500 x i8]
store i32 %0, i32* %3
%6 = load i32, i32* %3
%7 = getelementptr inbounds [500 x i8], [500 x i8]* %5, i64 0, i64 0
%8 = call i32 @recv(i32 %6, i8* %7, i32 500, i32 0)
store i32 %8, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* @stderr
%12 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %2
br label %14
13: ; preds = %1
store i32 1, i32* %2
br label %14
14: ; preds = %13, %10
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [34 x i8] c"Error: Unable to receive message\0A\00"
define i32 @peer_recv(i32 %0) {
%2 = alloca [500 x i8]
%3 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 0
%4 = call i32 @recv(i32 %0, i8* %3, i32 500, i32 0)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %1, %6
%10 = phi i32 [ 0, %6 ], [ 1, %1 ]
ret i32 %10
}
/* Variables and functions */
unsigned int exynos_5410_gpio_read(unsigned int);
unsigned int odroid_xu_gpio_read_23() {
  unsigned int bank_offset = 0x0C40;
  unsigned int bit_index = 2;
  return (exynos_5410_gpio_read(bank_offset) >> bit_index) & 0x1;
}


x86 assembly (clang, -O0):
<odroid_xu_gpio_read_23>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xc40,-0x4(%rbp)
movl   $0x2,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <exynos_5410_gpio_read@plt>
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
and    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<odroid_xu_gpio_read_23>:
push   %rax
mov    $0xc40,%edi
call   1030 <exynos_5410_gpio_read@plt>
shr    $0x2,%eax
and    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @odroid_xu_gpio_read_23() {
%1 = alloca i32
%2 = alloca i32
store i32 3136, i32* %1
store i32 2, i32* %2
%3 = load i32, i32* %1
%4 = call i32 @exynos_5410_gpio_read(i32 %3)
%5 = load i32, i32* %2
%6 = lshr i32 %4, %5
%7 = and i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @odroid_xu_gpio_read_23() {
%1 = tail call i32 @exynos_5410_gpio_read(i32 3136)
%2 = lshr i32 %1, 2
%3 = and i32 %2, 1
ret i32 %3
}
double geom_dA2_cart(double *x, double dx1, double dx3) { return dx1 * dx3; }


x86 assembly (clang, -O0):
<geom_dA2_cart>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_dA2_cart>:
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @geom_dA2_cart(double* %0, double %1, double %2) {
%4 = alloca double*
%5 = alloca double
%6 = alloca double
store double* %0, double** %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %5
%8 = load double, double* %6
%9 = fmul double %7, %8
ret double %9
}

LLVM IR (-O2):
define double @geom_dA2_cart(double* nocapture readnone %0, double %1, double %2) {
%4 = fmul double %1, %2
ret double %4
}