xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ recurser_void2(int);
int /*<<< orphan*/ track(int);
void recurser_void1(int n) {
  if (n == 0 || n == 7 || n == 8)
    track(n);
  if (n == 10)
    return;
  recurser_void2(n + 1);
}


x86 assembly (clang, -O0):
<recurser_void1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1149 <recurser_void1+0x29>
cmpl   $0x7,-0x4(%rbp)
je     1149 <recurser_void1+0x29>
cmpl   $0x8,-0x4(%rbp)
jne    1151 <recurser_void1+0x31>
mov    -0x4(%rbp),%edi
call   1040 <track@plt>
cmpl   $0xa,-0x4(%rbp)
jne    1160 <recurser_void1+0x40>
jmp    116b <recurser_void1+0x4b>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1030 <recurser_void2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recurser_void1>:
push   %rbx
mov    %edi,%ebx
lea    -0x7(%rbx),%eax
cmp    $0x2,%eax
jb     1134 <recurser_void1+0x14>
cmp    $0xa,%ebx
je     1146 <recurser_void1+0x26>
test   %ebx,%ebx
jne    113b <recurser_void1+0x1b>
mov    %ebx,%edi
call   1040 <track@plt>
add    $0x1,%ebx
mov    %ebx,%edi
pop    %rbx
jmp    1030 <recurser_void2@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @recurser_void1(i32 %0) {
switch i32 %0, label %4 [
i32 8, label %2
i32 7, label %2
i32 0, label %2
i32 10, label %7
]
2: ; preds = %1, %1, %1
%3 = tail call i32 @track(i32 %0)
br label %4
4: ; preds = %2, %1
%5 = add nsw i32 %0, 1
%6 = tail call i32 @recurser_void2(i32 %5)
br label %7
7: ; preds = %1, %4
ret void
}
int dec(int x, int y) { return x - y; }


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

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

LLVM IR (-O0):
define i32 @dec(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 = sub nsw i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @dec(i32 %0, i32 %1) {
%3 = sub nsw i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void Pass_by_value(int x, int y, int z) {
  printf("In Pass_by_value, x = %d, y = %d, z = %d\n", x, y, z);
  x = 2 + x;
  y = y - 3;
  z = 7 + z;
  printf("In Pass_by_value, x = %d, y = %d, z = %d\n\n", x, y, z);
}


x86 assembly (clang, -O0):
<Pass_by_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Pass_by_value>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xede(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
call   1030 <printf@plt>
add    $0x2,%ebx
add    $0xfffffffd,%ebp
add    $0x7,%r14d
lea    0xeeb(%rip),%rdi
mov    %ebx,%esi
mov    %ebp,%edx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [42 x i8] c"In Pass_by_value, x = %d, y = %d, z = %d\0A\00"
@.str.1 = [43 x i8] c"In Pass_by_value, x = %d, y = %d, z = %d\0A\0A\00"
define void @Pass_by_value(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %9)
%11 = load i32, i32* %4
%12 = add nsw i32 2, %11
store i32 %12, i32* %4
%13 = load i32, i32* %5
%14 = sub nsw i32 %13, 3
store i32 %14, i32* %5
%15 = load i32, i32* %6
%16 = add nsw i32 7, %15
store i32 %16, i32* %6
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = load i32, i32* %6
%20 = call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %17, i32 %18, i32 %19)
ret void
}

LLVM IR (-O2):
@.str = [42 x i8] c"In Pass_by_value, x = %d, y = %d, z = %d\0A\00"
@.str.1 = [43 x i8] c"In Pass_by_value, x = %d, y = %d, z = %d\0A\0A\00"
define void @Pass_by_value(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %2)
%5 = add nsw i32 %0, 2
%6 = add nsw i32 %1, -3
%7 = add nsw i32 %2, 7
%8 = tail call i32 @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %6, i32 %7)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ ferror(int /*<<< orphan*/ *);
size_t fread(void *, size_t, size_t, int /*<<< orphan*/ *);
int /*<<< orphan*/ perrordie(char *);
size_t safe_fread(void *ptr, size_t size, size_t nmemb, FILE *f) {
  size_t r = fread(ptr, size, nmemb, f);
  if (r == 0 && ferror(f))
    perrordie("fread");
  return r;
}


x86 assembly (clang, -O0):
<safe_fread>:
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    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1040 <fread@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    118b <safe_fread+0x5b>
mov    -0x20(%rbp),%rdi
call   1030 <ferror@plt>
cmp    $0x0,%rax
je     118b <safe_fread+0x5b>
lea    0xe7a(%rip),%rdi
call   1050 <perrordie@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_fread>:
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
call   1040 <fread@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    115d <safe_fread+0x2d>
mov    %r14,%rdi
call   1030 <ferror@plt>
test   %rax,%rax
je     115d <safe_fread+0x2d>
lea    0xea8(%rip),%rdi
call   1050 <perrordie@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [6 x i8] c"fread\00"
define i64 @safe_fread(i8* %0, i64 %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i64
store i8* %0, i8** %5
store i64 %1, i64* %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%10 = load i8*, i8** %5
%11 = load i64, i64* %6
%12 = load i64, i64* %7
%13 = load i32*, i32** %8
%14 = call i64 @fread(i8* %10, i64 %11, i64 %12, i32* %13)
store i64 %14, i64* %9
%15 = load i64, i64* %9
%16 = icmp eq i64 %15, 0
br i1 %16, label %17, label %23
17: ; preds = %4
%18 = load i32*, i32** %8
%19 = call i64 @ferror(i32* %18)
%20 = icmp ne i64 %19, 0
br i1 %20, label %21, label %23
21: ; preds = %17
%22 = call i32 @perrordie(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %23
23: ; preds = %21, %17, %4
%24 = load i64, i64* %9
ret i64 %24
}

LLVM IR (-O2):
@.str = [6 x i8] c"fread\00"
define i64 @safe_fread(i8* nocapture %0, i64 %1, i64 %2, i32* nocapture %3) {
%5 = tail call i64 @fread(i8* %0, i64 %1, i64 %2, i32* %3)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %12
7: ; preds = %4
%8 = tail call i64 @ferror(i32* %3)
%9 = icmp eq i64 %8, 0
br i1 %9, label %12, label %10
10: ; preds = %7
%11 = tail call i32 @perrordie(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10, %7, %4
ret i64 %5
}
unsigned short int showbug(unsigned short int *a, unsigned short int *b) {
  *a += *b - 8;
  return (*a >= 8);
}


x86 assembly (clang, -O0):
<showbug>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzwl (%rax),%edx
sub    $0x8,%edx
mov    -0x8(%rbp),%rax
movzwl (%rax),%ecx
add    %edx,%ecx
mov    %cx,(%rax)
mov    -0x8(%rbp),%rax
movzwl (%rax),%eax
cmp    $0x8,%eax
setge  %al
and    $0x1,%al
movzbl %al,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<showbug>:
movzwl (%rsi),%ecx
add    (%rdi),%cx
add    $0xfffffff8,%ecx
mov    %cx,(%rdi)
xor    %eax,%eax
cmp    $0x8,%cx
setae  %al
ret

LLVM IR (-O0):
define zeroext i16 @showbug(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
store i16* %0, i16** %3
store i16* %1, i16** %4
%5 = load i16*, i16** %4
%6 = load i16, i16* %5
%7 = zext i16 %6 to i32
%8 = sub nsw i32 %7, 8
%9 = load i16*, i16** %3
%10 = load i16, i16* %9
%11 = zext i16 %10 to i32
%12 = add nsw i32 %11, %8
%13 = trunc i32 %12 to i16
store i16 %13, i16* %9
%14 = load i16*, i16** %3
%15 = load i16, i16* %14
%16 = zext i16 %15 to i32
%17 = icmp sge i32 %16, 8
%18 = zext i1 %17 to i32
%19 = trunc i32 %18 to i16
ret i16 %19
}

LLVM IR (-O2):
define zeroext i16 @showbug(i16* nocapture %0, i16* nocapture %1) {
%3 = load i16, i16* %1
%4 = add i16 %3, -8
%5 = load i16, i16* %0
%6 = add i16 %4, %5
store i16 %6, i16* %0
%7 = icmp ugt i16 %6, 7
%8 = zext i1 %7 to i16
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ debugPrintStr(char *, char *);
void contactStatusRecvd(char *line) {
  debugPrintStr("command parser: contactStatusRecvd: ", line);
}


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

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

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

LLVM IR (-O2):
@.str = [37 x i8] c"command parser: contactStatusRecvd: \00"
define void @contactStatusRecvd(i8* %0) {
%2 = tail call i32 @debugPrintStr(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
unsigned long LSWAPIL(unsigned long a) {
  return (((a >> 8) & 0xff00) + ((a & 0xff00) << 8) + (a << 24) + (a >> 24));
}


x86 assembly (clang, -O0):
<LSWAPIL>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x8,%rax
and    $0xff00,%rax
mov    -0x8(%rbp),%rcx
and    $0xff00,%rcx
shl    $0x8,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
shl    $0x18,%rcx
add    %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x18,%rcx
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<LSWAPIL>:
mov    %rdi,%rax
shr    $0x8,%rax
and    $0xff00,%eax
mov    %edi,%ecx
shl    $0x8,%ecx
and    $0xff0000,%ecx
or     %rax,%rcx
mov    %rdi,%rax
shl    $0x18,%rax
shr    $0x18,%rdi
add    %rdi,%rax
add    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @LSWAPIL(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = lshr i64 %3, 8
%5 = and i64 %4, 65280
%6 = load i64, i64* %2
%7 = and i64 %6, 65280
%8 = shl i64 %7, 8
%9 = add i64 %5, %8
%10 = load i64, i64* %2
%11 = shl i64 %10, 24
%12 = add i64 %9, %11
%13 = load i64, i64* %2
%14 = lshr i64 %13, 24
%15 = add i64 %12, %14
ret i64 %15
}

LLVM IR (-O2):
define i64 @LSWAPIL(i64 %0) {
%2 = lshr i64 %0, 8
%3 = and i64 %2, 65280
%4 = shl i64 %0, 8
%5 = and i64 %4, 16711680
%6 = or i64 %3, %5
%7 = shl i64 %0, 24
%8 = lshr i64 %0, 24
%9 = add i64 %8, %7
%10 = add i64 %9, %6
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ INFINITY;
double nextafter(double, int /*<<< orphan*/);
double coq_next_up(double x) { return nextafter(x, INFINITY); }


x86 assembly (clang, -O0):
<coq_next_up>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    0x2ebf(%rip),%rax
mov    (%rax),%edi
call   1030 <nextafter@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<coq_next_up>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nextafter@plt>

LLVM IR (-O0):
@INFINITY = global i32 0
define double @coq_next_up(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load i32, i32* @INFINITY
%5 = call double @nextafter(double %3, i32 %4)
ret double %5
}

LLVM IR (-O2):
@INFINITY = global i32 0
define double @coq_next_up(double %0) {
%2 = load i32, i32* @INFINITY
%3 = tail call double @nextafter(double %0, i32 %2)
ret double %3
}
int strcmp(const char *cs, const char *ct) {
  signed char __res;
  while (1) {
    if ((__res = *cs - *ct++) != 0 || !*cs++)
      break;
  }
  return __res;
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %al,-0x11(%rbp)
movsbl %al,%eax
cmp    $0x0,%eax
jne    114e <strcmp+0x4e>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
jne    1153 <strcmp+0x53>
jmp    1158 <strcmp+0x58>
jmp    110c <strcmp+0xc>
movsbl -0x11(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl (%rdi,%rax,1),%edx
mov    %edx,%ecx
sub    (%rsi,%rax,1),%cl
test   %dl,%dl
je     1125 <strcmp+0x25>
add    $0x1,%rax
test   %cl,%cl
je     1110 <strcmp+0x10>
movsbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @strcmp(i8* nocapture %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %10, %3 ]
%5 = phi i8* [ %0, %2 ], [ %11, %3 ]
%6 = load i8, i8* %5
%7 = load i8, i8* %4
%8 = sub i8 %6, %7
%9 = icmp ne i8 %8, 0
%10 = getelementptr inbounds i8, i8* %4, i64 1
%11 = getelementptr inbounds i8, i8* %5, i64 1
%12 = icmp eq i8 %6, 0
%13 = or i1 %12, %9
br i1 %13, label %14, label %3
14: ; preds = %3
%15 = sext i8 %8 to i32
ret i32 %15
}
int get_token(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @get_token() {
ret i32 1
}

LLVM IR (-O2):
define i32 @get_token() {
ret i32 1
}
/* Variables and functions */
int yas_adxl345_read_reg_byte(int);
int /*<<< orphan*/ yas_adxl345_write_reg_byte(int, int);
int yas_adxl345_power_up(void) {
  yas_adxl345_write_reg_byte(
      0x2d, ((yas_adxl345_read_reg_byte(0x2d) & ~0x08) | ((1) << 3)));
  return (0);
}


x86 assembly (clang, -O0):
<yas_adxl345_power_up>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2d,%edi
call   1030 <yas_adxl345_read_reg_byte@plt>
mov    %eax,%esi
and    $0xfffffff7,%esi
or     $0x8,%esi
mov    $0x2d,%edi
call   1040 <yas_adxl345_write_reg_byte@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yas_adxl345_power_up>:
push   %rax
mov    $0x2d,%edi
call   1030 <yas_adxl345_read_reg_byte@plt>
or     $0x8,%eax
mov    $0x2d,%edi
mov    %eax,%esi
call   1040 <yas_adxl345_write_reg_byte@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @yas_adxl345_power_up() {
%1 = call i32 @yas_adxl345_read_reg_byte(i32 45)
%2 = and i32 %1, -9
%3 = or i32 %2, 8
%4 = call i32 @yas_adxl345_write_reg_byte(i32 45, i32 %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @yas_adxl345_power_up() {
%1 = tail call i32 @yas_adxl345_read_reg_byte(i32 45)
%2 = or i32 %1, 8
%3 = tail call i32 @yas_adxl345_write_reg_byte(i32 45, i32 %2)
ret i32 0
}
void x11_vm_exit() {}


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

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

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

LLVM IR (-O2):
define void @x11_vm_exit() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ locale_t;

/* Variables and functions */
int strcmp(char const *, char const *);
int strcoll_l(const char *s1, const char *s2, locale_t locale) {
  return strcmp(s1, s2);
}


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

x86 assembly (clang, -O2):
<strcoll_l>:
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @strcoll_l(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
ret i32 %4
}
/* Variables and functions */
int syscall2(int, int);
int close(int fildes) { return syscall2(6, fildes); }


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

x86 assembly (clang, -O2):
<close>:
mov    %edi,%esi
mov    $0x6,%edi
jmp    1030 <syscall2@plt>

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

LLVM IR (-O2):
define i32 @close(i32 %0) {
%2 = tail call i32 @syscall2(i32 6, i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ sufmatch(char const **, char const *);
int no_proxy_match(const char *host, const char **no_proxy) {
  if (!no_proxy)
    return 1;
  else
    return !sufmatch(no_proxy, host);
}


x86 assembly (clang, -O0):
<no_proxy_match>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1137 <no_proxy_match+0x27>
movl   $0x1,-0x4(%rbp)
jmp    1154 <no_proxy_match+0x44>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <sufmatch@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<no_proxy_match>:
test   %rsi,%rsi
je     1132 <no_proxy_match+0x22>
push   %rax
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
call   1030 <sufmatch@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
add    $0x8,%rsp
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @no_proxy_match(i8* %0, i8** %1) {
%3 = icmp eq i8** %1, null
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = tail call i32 @sufmatch(i8** %1, i8* %0)
%6 = icmp eq i32 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ 1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ leak_memory();
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("#### Leak Memory test ####\n");
  leak_memory();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"#### Leak Memory test ####\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (...) @leak_memory()
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"#### Leak Memory test ####\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @leak_memory()
ret i32 0
}
int func1(int m) {
  short i;
  for (i = 0; i < m; i++)
    ;
}


x86 assembly (clang, -O0):
<func1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movw   $0x0,-0xa(%rbp)
movswl -0xa(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1130 <func1+0x30>
jmp    111f <func1+0x1f>
mov    -0xa(%rbp),%ax
add    $0x1,%ax
mov    %ax,-0xa(%rbp)
jmp    110d <func1+0xd>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @func1(i32 %0) {
ret i32 undef
}
/* Variables and functions */
int u8isupperasciii(int /*<<< orphan*/);
int /*<<< orphan*/ u8tointc(char *);
int u8isupperasciic(char *c) { return u8isupperasciii(u8tointc(c)); }


x86 assembly (clang, -O0):
<u8isupperasciic>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <u8tointc@plt>
mov    %eax,%edi
call   1030 <u8isupperasciii@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u8isupperasciic>:
push   %rax
call   1040 <u8tointc@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <u8isupperasciii@plt>

LLVM IR (-O0):
define i32 @u8isupperasciic(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @u8tointc(i8* %3)
%5 = call i32 @u8isupperasciii(i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @u8isupperasciic(i8* %0) {
%2 = tail call i32 @u8tointc(i8* %0)
%3 = tail call i32 @u8isupperasciii(i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ perror(char *);
int write(int, unsigned int *, int);
bool write_serial_byte(int serial_fd, unsigned int ch) {
  if (write(serial_fd, &ch, 1) != 1) {
    perror("write");
    return false;
  }
  return true;
}


x86 assembly (clang, -O0):
<write_serial_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%edi
lea    -0xc(%rbp),%rsi
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0x1,%eax
je     1160 <write_serial_byte+0x40>
lea    0xeb1(%rip),%rdi
call   1040 <perror@plt>
movl   $0x0,-0x4(%rbp)
jmp    1167 <write_serial_byte+0x47>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_serial_byte>:
push   %rbx
sub    $0x10,%rsp
mov    %esi,0xc(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x1,%ebx
mov    $0x1,%edx
call   1030 <write@plt>
cmp    $0x1,%eax
jne    114a <write_serial_byte+0x2a>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret
lea    0xeaf(%rip),%rdi
call   1040 <perror@plt>
xor    %ebx,%ebx
jmp    1142 <write_serial_byte+0x22>

LLVM IR (-O0):
@.str = [6 x i8] c"write\00"
define i32 @write_serial_byte(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = call i32 @write(i32 %6, i32* %5, i32 1)
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 0, i32* %3
br label %12
11: ; preds = %2
store i32 1, i32* %3
br label %12
12: ; preds = %11, %9
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
@.str = [6 x i8] c"write\00"
define i32 @write_serial_byte(i32 %0, i32 %1) {
%3 = alloca i32
store i32 %1, i32* %3
%4 = call i32 @write(i32 %0, i32* %3, i32 1)
%5 = icmp eq i32 %4, 1
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %2, %6
%9 = phi i32 [ 0, %6 ], [ 1, %2 ]
ret i32 %9
}
int test_imm_22int8_mem(signed char *val) {
  return ((*val) & (0x22 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_22int8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
and    $0x22,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_22int8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 34
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int HelpItem86(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @HelpItem86() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void DriveTeslaModelE(double speed) {
  printf("The Model E has just been announced. It isn't ready yet :(\n");
}


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

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

LLVM IR (-O0):
@.str = [60 x i8] c"The Model E has just been announced. It isn't ready yet :(\0A\00"
define void @DriveTeslaModelE(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [59 x i8] c"The Model E has just been announced. It isn't ready yet :(\00"
define void @DriveTeslaModelE(double %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ loop();
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hai \n");
  printf("--PASCALS TRIANGLE CALCULATOR--\n");
  loop();
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [6 x i8] c"Hai \0A\00"
@.str.1 = [33 x i8] c"--PASCALS TRIANGLE CALCULATOR--\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (...) @loop()
ret i32 0
}

LLVM IR (-O2):
@str = [5 x i8] c"Hai \00"
@str.2 = [32 x i8] c"--PASCALS TRIANGLE CALCULATOR--\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @str.2, i64 0, i64 0))
%3 = tail call i32 (...) @loop()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strcpy(char *, char *);
void swapStrings(char string1[32], char string2[32]) {
  char temp[32];
  strcpy(temp, string1);
  strcpy(string1, string2);
  strcpy(string2, temp);
}


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

x86 assembly (clang, -O2):
<swapStrings>:
push   %r15
push   %r14
push   %rbx
sub    $0x20,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rsp,%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @swapStrings(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [32 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%7 = load i8*, i8** %3
%8 = call i32 @strcpy(i8* %6, i8* %7)
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i32 @strcpy(i8* %9, i8* %10)
%12 = load i8*, i8** %4
%13 = getelementptr inbounds [32 x i8], [32 x i8]* %5, i64 0, i64 0
%14 = call i32 @strcpy(i8* %12, i8* %13)
ret void
}

LLVM IR (-O2):
define void @swapStrings(i8* %0, i8* %1) {
%3 = alloca [32 x i8]
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcpy(i8* %4, i8* %0)
%6 = call i32 @strcpy(i8* %0, i8* %1)
%7 = call i32 @strcpy(i8* %1, i8* %4)
ret void
}
/* Variables and functions */
int yyparse();
int main() { return yyparse(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @yyparse()
ret i32 %1
}
float sq(float x) {
  x = x * x;
  return x;
}


x86 assembly (clang, -O0):
<sq>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sq>:
mulss  %xmm0,%xmm0
ret

LLVM IR (-O0):
define float @sq(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = load float, float* %2
%5 = fmul float %3, %4
store float %5, float* %2
%6 = load float, float* %2
ret float %6
}

LLVM IR (-O2):
define float @sq(float %0) {
%2 = fmul float %0, %0
ret float %2
}
/* Type definitions */
struct vec2i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ vec2i_inverse(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
__attribute__((always_)) struct vec2i *psvec2i_inverse(struct vec2i *result,
                                                       struct vec2i *a) {
  vec2i_inverse((int32_t *)result, (int32_t *)a);
  return result;
}


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

x86 assembly (clang, -O2):
<psvec2i_inverse>:
push   %rbx
mov    %rdi,%rbx
call   1030 <vec2i_inverse@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_inverse(%struct.vec2i* %0, %struct.vec2i* %1) {
%3 = alloca %struct.vec2i*
%4 = alloca %struct.vec2i*
store %struct.vec2i* %0, %struct.vec2i** %3
store %struct.vec2i* %1, %struct.vec2i** %4
%5 = load %struct.vec2i*, %struct.vec2i** %3
%6 = bitcast %struct.vec2i* %5 to i32*
%7 = load %struct.vec2i*, %struct.vec2i** %4
%8 = bitcast %struct.vec2i* %7 to i32*
%9 = call i32 @vec2i_inverse(i32* %6, i32* %8)
%10 = load %struct.vec2i*, %struct.vec2i** %3
ret %struct.vec2i* %10
}

LLVM IR (-O2):
%struct.vec2i = type { i32 }
define %struct.vec2i* @psvec2i_inverse(%struct.vec2i* returned %0, %struct.vec2i* %1) {
%3 = getelementptr %struct.vec2i, %struct.vec2i* %0, i64 0, i32 0
%4 = getelementptr %struct.vec2i, %struct.vec2i* %1, i64 0, i32 0
%5 = tail call i32 @vec2i_inverse(i32* %3, i32* %4)
ret %struct.vec2i* %0
}
/* Variables and functions */
scalar_t__ shim_enosys(int /*<<< orphan*/, int);
int shim_pkey_free(int pkey) { return (int)shim_enosys(0, pkey); }


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

x86 assembly (clang, -O2):
<shim_pkey_free>:
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
define i32 @shim_pkey_free(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @shim_enosys(i32 0, i32 %3)
%5 = trunc i64 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @shim_pkey_free(i32 %0) {
%2 = tail call i64 @shim_enosys(i32 0, i32 %0)
%3 = trunc i64 %2 to i32
ret i32 %3
}
int dbg_check_old_index(struct ubifs_info *c, struct ubifs_zbranch *zroot) {
  return 0;
}


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

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

LLVM IR (-O0):
%struct.ubifs_info = type opaque
%struct.ubifs_zbranch = type opaque
define i32 @dbg_check_old_index(%struct.ubifs_info* %0, %struct.ubifs_zbranch* %1) {
%3 = alloca %struct.ubifs_info*
%4 = alloca %struct.ubifs_zbranch*
store %struct.ubifs_info* %0, %struct.ubifs_info** %3
store %struct.ubifs_zbranch* %1, %struct.ubifs_zbranch** %4
ret i32 0
}

LLVM IR (-O2):
%struct.ubifs_info = type opaque
%struct.ubifs_zbranch = type opaque
define i32 @dbg_check_old_index(%struct.ubifs_info* nocapture readnone %0, %struct.ubifs_zbranch* nocapture readnone %1) {
ret i32 0
}
int pointRectCollision(int posX, int posY, int objX, int objY, int objW,
                       int objH) {
  int collided = 0;
  if (posX >= objX && posX <= (objX + objW)) {
    if (posY >= objY && posY <= (objY + objH)) {
      collided = 1;
    }
  }
  return collided;
}


x86 assembly (clang, -O0):
<pointRectCollision>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    %r9d,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     1165 <pointRectCollision+0x65>
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    -0x14(%rbp),%ecx
cmp    %ecx,%eax
jg     1165 <pointRectCollision+0x65>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     1160 <pointRectCollision+0x60>
mov    -0x8(%rbp),%eax
mov    -0x10(%rbp),%ecx
add    -0x18(%rbp),%ecx
cmp    %ecx,%eax
jg     1160 <pointRectCollision+0x60>
movl   $0x1,-0x1c(%rbp)
jmp    1165 <pointRectCollision+0x65>
mov    -0x1c(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointRectCollision>:
cmp    %edx,%edi
setge  %r10b
add    %edx,%r8d
cmp    %edi,%r8d
setge  %dl
cmp    %ecx,%esi
setge  %al
add    %ecx,%r9d
cmp    %esi,%r9d
setge  %cl
and    %r10b,%al
and    %dl,%al
and    %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @pointRectCollision(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5) {
%7 = icmp slt i32 %0, %2
%8 = add nsw i32 %4, %2
%9 = icmp slt i32 %8, %0
%10 = select i1 %7, i1 true, i1 %9
%11 = icmp slt i32 %1, %3
%12 = or i1 %11, %10
%13 = add nsw i32 %5, %3
%14 = icmp sge i32 %13, %1
%15 = xor i1 %12, true
%16 = select i1 %15, i1 %14, i1 false
%17 = zext i1 %16 to i32
ret i32 %17
}
/* Variables and functions */
scalar_t__ COND_LT();
int /*<<< orphan*/ EA_AY_PD_8();
int /*<<< orphan*/ m68ki_write_8(int /*<<< orphan*/, int);
void m68k_op_slt_8_pd(void) {
  m68ki_write_8(EA_AY_PD_8(), COND_LT() ? 0xff : 0);
}


x86 assembly (clang, -O0):
<m68k_op_slt_8_pd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <EA_AY_PD_8@plt>
mov    %eax,-0x4(%rbp)
mov    $0x0,%al
call   1030 <COND_LT@plt>
mov    -0x4(%rbp),%edi
mov    %rax,%rcx
xor    %esi,%esi
mov    $0xff,%eax
cmp    $0x0,%rcx
cmovne %eax,%esi
call   1050 <m68ki_write_8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<m68k_op_slt_8_pd>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %eax,%eax
call   1040 <EA_AY_PD_8@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1030 <COND_LT@plt>
test   %rax,%rax
mov    $0xff,%esi
cmove  %ebp,%esi
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1050 <m68ki_write_8@plt>

LLVM IR (-O0):
define void @m68k_op_slt_8_pd() {
%1 = call i32 (...) @EA_AY_PD_8()
%2 = call i64 (...) @COND_LT()
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 255, i32 0
%6 = call i32 @m68ki_write_8(i32 %1, i32 %5)
ret void
}

LLVM IR (-O2):
define void @m68k_op_slt_8_pd() {
%1 = tail call i32 (...) @EA_AY_PD_8()
%2 = tail call i64 (...) @COND_LT()
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 0, i32 255
%5 = tail call i32 @m68ki_write_8(i32 %1, i32 %4)
ret void
}
/* Variables and functions */
int close(int);
int OS_CloseSocket(int socket) { return (close(socket)); }


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

x86 assembly (clang, -O2):
<OS_CloseSocket>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define i32 @OS_CloseSocket(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ nokia_lcd_out_char(int /*<<< orphan*/);
void nokia_lcd_out_message(const char *message) {
  while (*message)
    nokia_lcd_out_char(*message++);
}


x86 assembly (clang, -O0):
<nokia_lcd_out_message>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1145 <nokia_lcd_out_message+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%edi
call   1030 <nokia_lcd_out_char@plt>
jmp    111c <nokia_lcd_out_message+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nokia_lcd_out_message>:
push   %rbx
mov    (%rdi),%al
test   %al,%al
je     1133 <nokia_lcd_out_message+0x23>
mov    %rdi,%rbx
add    $0x1,%rbx
xchg   %ax,%ax
movsbl %al,%edi
call   1030 <nokia_lcd_out_char@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1120 <nokia_lcd_out_message+0x10>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @nokia_lcd_out_message(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %12, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %10, %4 ], [ %2, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = sext i8 %5 to i32
%9 = tail call i32 @nokia_lcd_out_char(i32 %8)
%10 = load i8, i8* %7
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %4
12: ; preds = %4, %1
ret void
}
void undef_inst(void) {}


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

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

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

LLVM IR (-O2):
define void @undef_inst() {
ret void
}
/* Variables and functions */
int yahoo_M1Common(unsigned int, int);
int yahoo_f01_0d(int Salt, int Parameter) {
  unsigned b = Salt ^ 0x2F140A2D;
  return yahoo_M1Common(b, Parameter);
}


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

x86 assembly (clang, -O2):
<yahoo_f01_0d>:
xor    $0x2f140a2d,%edi
jmp    1030 <yahoo_M1Common@plt>

LLVM IR (-O0):
define i32 @yahoo_f01_0d(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 = xor i32 %6, 789842477
store i32 %7, i32* %5
%8 = load i32, i32* %5
%9 = load i32, i32* %4
%10 = call i32 @yahoo_M1Common(i32 %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @yahoo_f01_0d(i32 %0, i32 %1) {
%3 = xor i32 %0, 789842477
%4 = tail call i32 @yahoo_M1Common(i32 %3, i32 %1)
ret i32 %4
}
void nmk_pinctrl_db8500_init(const struct nmk_pinctrl_soc_data **soc) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
%struct.nmk_pinctrl_soc_data = type opaque
define void @nmk_pinctrl_db8500_init(%struct.nmk_pinctrl_soc_data** nocapture %0) {
ret void
}
int max_fr(int n1, int n2, int n3) {
  if (n1 > n2)
    if (n1 > n3)
      return 0;
    else
      return 2;
  else if (n2 > n3)
    return 1;
  else
    return 2;
}


x86 assembly (clang, -O0):
<max_fr>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    113d <max_fr+0x3d>
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1131 <max_fr+0x31>
movl   $0x0,-0x4(%rbp)
jmp    115c <max_fr+0x5c>
movl   $0x2,-0x4(%rbp)
jmp    115c <max_fr+0x5c>
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jle    1155 <max_fr+0x55>
movl   $0x1,-0x4(%rbp)
jmp    115c <max_fr+0x5c>
movl   $0x2,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max_fr>:
xor    %ecx,%ecx
cmp    %edx,%edi
setle  %cl
add    %ecx,%ecx
xor    %r8d,%r8d
cmp    %edx,%esi
setg   %r8b
mov    $0x2,%eax
sub    %r8d,%eax
cmp    %esi,%edi
cmovg  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @max_fr(i32 %0, i32 %1, i32 %2) {
%4 = icmp sgt i32 %0, %1
%5 = icmp sgt i32 %0, %2
%6 = select i1 %5, i32 0, i32 2
%7 = icmp sgt i32 %1, %2
%8 = select i1 %7, i32 1, i32 2
%9 = select i1 %4, i32 %6, i32 %8
ret i32 %9
}
/* Variables and functions */
unsigned int udivmodsi4(unsigned int, unsigned int, int);
unsigned int __umodsi3(unsigned int a, unsigned int b) {
  return udivmodsi4(a, b, 1);
}


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

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

LLVM IR (-O0):
define i32 @__umodsi3(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 @udivmodsi4(i32 %5, i32 %6, i32 1)
ret i32 %7
}

LLVM IR (-O2):
define i32 @__umodsi3(i32 %0, i32 %1) {
%3 = tail call i32 @udivmodsi4(i32 %0, i32 %1, i32 1)
ret i32 %3
}
double perimetroDoTrapezio(double a, double b, double c) { return a + b + c; }


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

x86 assembly (clang, -O2):
<perimetroDoTrapezio>:
addsd  %xmm1,%xmm0
addsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @perimetroDoTrapezio(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* %4
%8 = load double, double* %5
%9 = fadd double %7, %8
%10 = load double, double* %6
%11 = fadd double %9, %10
ret double %11
}

LLVM IR (-O2):
define double @perimetroDoTrapezio(double %0, double %1, double %2) {
%4 = fadd double %0, %1
%5 = fadd double %4, %2
ret double %5
}