xunge/DecIR huggingface dataset:
long long BootImageSize(int media, unsigned int len) {
  long long ret;
  switch (media & 0xf) {
  case 0:
    ret = len;
    break;
  case 1:
    ret = 80 * 2 * 15;
    break;
  case 2:
    ret = 80 * 2 * 18;
    break;
  case 3:
    ret = 80 * 2 * 36;
    break;
  case 4:
    ret = len;
    break;
  default:
    ret = len;
  }
  return ret;
}


x86 assembly (clang, -O0):
<BootImageSize>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xf,%eax
mov    %rax,-0x18(%rbp)
sub    $0x4,%eax
ja     1170 <BootImageSize+0x70>
mov    -0x18(%rbp),%rax
lea    0xed8(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
jmp    1177 <BootImageSize+0x77>
movq   $0x960,-0x10(%rbp)
jmp    1177 <BootImageSize+0x77>
movq   $0xb40,-0x10(%rbp)
jmp    1177 <BootImageSize+0x77>
movq   $0x1680,-0x10(%rbp)
jmp    1177 <BootImageSize+0x77>
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
jmp    1177 <BootImageSize+0x77>
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<BootImageSize>:
and    $0xf,%edi
add    $0xffffffff,%edi
cmp    $0x2,%edi
ja     1118 <BootImageSize+0x18>
movslq %edi,%rax
lea    0xeeb(%rip),%rcx
mov    (%rcx,%rax,4),%esi
mov    %esi,%eax
ret

LLVM IR (-O0):
define i64 @BootImageSize(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = and i32 %6, 15
switch i32 %7, label %17 [
i32 0, label %8
i32 1, label %11
i32 2, label %12
i32 3, label %13
i32 4, label %14
]
8: ; preds = %2
%9 = load i32, i32* %4
%10 = zext i32 %9 to i64
store i64 %10, i64* %5
br label %20
11: ; preds = %2
store i64 2400, i64* %5
br label %20
12: ; preds = %2
store i64 2880, i64* %5
br label %20
13: ; preds = %2
store i64 5760, i64* %5
br label %20
14: ; preds = %2
%15 = load i32, i32* %4
%16 = zext i32 %15 to i64
store i64 %16, i64* %5
br label %20
17: ; preds = %2
%18 = load i32, i32* %4
%19 = zext i32 %18 to i64
store i64 %19, i64* %5
br label %20
20: ; preds = %17, %14, %13, %12, %11, %8
%21 = load i64, i64* %5
ret i64 %21
}

LLVM IR (-O2):
@switch.table.BootImageSize = [3 x i32] [i32 2400, i32 2880, i32 5760]
define i64 @BootImageSize(i32 %0, i32 %1) {
%3 = and i32 %0, 15
%4 = add nsw i32 %3, -1
%5 = icmp ult i32 %4, 3
br i1 %5, label %6, label %10
6: ; preds = %2
%7 = sext i32 %4 to i64
%8 = getelementptr inbounds [3 x i32], [3 x i32]* @switch.table.BootImageSize, i64 0, i64 %7
%9 = load i32, i32* %8
br label %10
10: ; preds = %6, %2
%11 = phi i32 [ %1, %2 ], [ %9, %6 ]
%12 = zext i32 %11 to i64
ret i64 %12
}
int main() {
  int a;
  a = 1;
  int b;
  b = 0;
  return a / (b + 1);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
add    $0x1,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
store i32 0, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = add nsw i32 %5, 1
%7 = sdiv i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @main() {
ret i32 1
}
/* Type definitions */
struct queue {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct queue *);
int /*<<< orphan*/ queue_clear(struct queue *);
void queue_free(struct queue *queue) {
  if (queue != NULL) {
    queue_clear(queue);
    free(queue);
  }
}


x86 assembly (clang, -O0):
<queue_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1149 <queue_free+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <queue_clear@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<queue_free>:
test   %rdi,%rdi
je     1137 <queue_free+0x17>
push   %rbx
mov    %rdi,%rbx
call   1040 <queue_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.queue = type { i32 }
define void @queue_free(%struct.queue* %0) {
%2 = alloca %struct.queue*
store %struct.queue* %0, %struct.queue** %2
%3 = load %struct.queue*, %struct.queue** %2
%4 = icmp ne %struct.queue* %3, null
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load %struct.queue*, %struct.queue** %2
%7 = call i32 @queue_clear(%struct.queue* %6)
%8 = load %struct.queue*, %struct.queue** %2
%9 = call i32 @free(%struct.queue* %8)
br label %10
10: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.queue = type { i32 }
define void @queue_free(%struct.queue* %0) {
%2 = icmp eq %struct.queue* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @queue_clear(%struct.queue* %0)
%5 = tail call i32 @free(%struct.queue* %0)
br label %6
6: ; preds = %3, %1
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int s(int, int);
uint32_t s_0(uint32_t x) { return s(x, 2) ^ s(x, 13) ^ s(x, 22); }


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

x86 assembly (clang, -O2):
<s_0>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%ebx
mov    $0x2,%esi
call   1030 <s@plt>
mov    %eax,%r14d
mov    %ebx,%edi
mov    $0xd,%esi
call   1030 <s@plt>
mov    %eax,%ebp
xor    %r14d,%ebp
mov    %ebx,%edi
mov    $0x16,%esi
call   1030 <s@plt>
xor    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @s_0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @s(i32 %3, i32 2)
%5 = load i32, i32* %2
%6 = call i32 @s(i32 %5, i32 13)
%7 = xor i32 %4, %6
%8 = load i32, i32* %2
%9 = call i32 @s(i32 %8, i32 22)
%10 = xor i32 %7, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @s_0(i32 %0) {
%2 = tail call i32 @s(i32 %0, i32 2)
%3 = tail call i32 @s(i32 %0, i32 13)
%4 = xor i32 %3, %2
%5 = tail call i32 @s(i32 %0, i32 22)
%6 = xor i32 %4, %5
ret i32 %6
}
char int_to_leds_m$leds$green_on(void) {
  char result;
  result = leds$leds$green_on();
  return result;
}


x86 assembly (clang, -O0):
<int_to_leds_m$leds$green_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <leds$leds$green_on@plt>
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<int_to_leds_m$leds$green_on>:
push   %rax
xor    %eax,%eax
call   1030 <leds$leds$green_on@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i8 @"int_to_leds_m$leds$green_on"() {
%1 = alloca i8
%2 = call i32 (...) @"leds$leds$green_on"()
%3 = trunc i32 %2 to i8
store i8 %3, i8* %1
%4 = load i8, i8* %1
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @"int_to_leds_m$leds$green_on"() {
%1 = tail call i32 (...) @"leds$leds$green_on"()
%2 = trunc i32 %1 to i8
ret i8 %2
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
uint64_t ch(uint64_t h4, uint64_t h5, uint64_t h6) {
  return h6 ^ (h4 & (h6 ^ h5));
}


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

x86 assembly (clang, -O2):
<ch>:
mov    %esi,%eax
xor    %edx,%eax
and    %edi,%eax
xor    %edx,%eax
ret

LLVM IR (-O0):
define i32 @ch(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* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %6
%10 = load i32, i32* %5
%11 = xor i32 %9, %10
%12 = and i32 %8, %11
%13 = xor i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @ch(i32 %0, i32 %1, i32 %2) {
%4 = xor i32 %2, %1
%5 = and i32 %4, %0
%6 = xor i32 %5, %2
ret i32 %6
}
/* Variables and functions */
int _strcspn(char *, char *);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char *s1 = "iphone 3gs";
  char *s2 = "fuck8g";
  int n = _strcspn(s1, s2);
  printf("%d\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <_strcspn@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xeb3(%rip),%rdi
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    0xedc(%rip),%rsi
call   1040 <_strcspn@plt>
lea    0xed7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"iphone 3gs\00"
@.str.1 = [7 x i8] c"fuck8g\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i32
store i32 0, i32* %1
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8** %3
%5 = load i8*, i8** %2
%6 = load i8*, i8** %3
%7 = call i32 @_strcspn(i8* %5, i8* %6)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"iphone 3gs\00"
@.str.1 = [7 x i8] c"fuck8g\00"
@.str.2 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @_strcspn(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ outbyte(int);
nl() { outbyte(10); }


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

x86 assembly (clang, -O2):
<nl>:
mov    $0xa,%edi
jmp    1030 <outbyte@plt>

LLVM IR (-O0):
define i32 @nl() {
%1 = alloca i32
%2 = call i32 @outbyte(i32 10)
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @nl() {
%1 = tail call i32 @outbyte(i32 10)
ret i32 undef
}
int wrap(int x, int min, int max) {
  return (x >= max) ? (x + min - max) : ((x < min) ? (x + max - min) : x);
}


x86 assembly (clang, -O0):
<wrap>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0xc(%rbp),%eax
jl     112a <wrap+0x2a>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    1153 <wrap+0x53>
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1147 <wrap+0x47>
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    114d <wrap+0x4d>
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wrap>:
mov    %edi,%eax
cmp    %edx,%edi
jge    1111 <wrap+0x11>
mov    %eax,%ecx
sub    %esi,%ecx
jge    1110 <wrap+0x10>
add    %edx,%ecx
mov    %ecx,%eax
ret
add    %eax,%esi
sub    %edx,%esi
mov    %esi,%eax
ret

LLVM IR (-O0):
define i32 @wrap(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* %6
%9 = icmp sge i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %3
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = add nsw i32 %11, %12
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
br label %30
16: ; preds = %3
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = icmp slt i32 %17, %18
br i1 %19, label %20, label %26
20: ; preds = %16
%21 = load i32, i32* %4
%22 = load i32, i32* %6
%23 = add nsw i32 %21, %22
%24 = load i32, i32* %5
%25 = sub nsw i32 %23, %24
br label %28
26: ; preds = %16
%27 = load i32, i32* %4
br label %28
28: ; preds = %26, %20
%29 = phi i32 [ %25, %20 ], [ %27, %26 ]
br label %30
30: ; preds = %28, %10
%31 = phi i32 [ %15, %10 ], [ %29, %28 ]
ret i32 %31
}

LLVM IR (-O2):
define i32 @wrap(i32 %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %0, %2
br i1 %4, label %8, label %5
5: ; preds = %3
%6 = add nsw i32 %1, %0
%7 = sub i32 %6, %2
br label %13
8: ; preds = %3
%9 = icmp slt i32 %0, %1
br i1 %9, label %10, label %13
10: ; preds = %8
%11 = sub i32 %0, %1
%12 = add i32 %11, %2
br label %13
13: ; preds = %8, %10, %5
%14 = phi i32 [ %7, %5 ], [ %12, %10 ], [ %0, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printReverserPosition(int);
int /*<<< orphan*/ printf(char *, int);
void redisplayReverserPosition(int reverser) {
  printf("\x1b[%d;1H", 3);
  printReverserPosition(reverser);
  printf("\x1b[%d;1H", 14);
  return;
}


x86 assembly (clang, -O0):
<redisplayReverserPosition>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%edi
call   1040 <printReverserPosition@plt>
lea    0xeb5(%rip),%rdi
mov    $0xe,%esi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<redisplayReverserPosition>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xed3(%rip),%r14
mov    %r14,%rdi
mov    $0x3,%esi
call   1030 <printf@plt>
mov    %ebx,%edi
call   1040 <printReverserPosition@plt>
mov    %r14,%rdi
mov    $0xe,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"\1B[%d;1H\00"
define void @redisplayReverserPosition(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 3)
%4 = load i32, i32* %2
%5 = call i32 @printReverserPosition(i32 %4)
%6 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 14)
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"\1B[%d;1H\00"
define void @redisplayReverserPosition(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 3)
%3 = tail call i32 @printReverserPosition(i32 %0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 14)
ret void
}
void func_devptr(int dev_a[100]) {
  int i;
#pragma acc declare deviceptr(dev_a)
#pragma acc parallel loop
  for (i = 0; i < 100; i++) {
    dev_a[i] += i * 3 + 1;
  }
}


x86 assembly (clang, -O0):
<func_devptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x64,-0xc(%rbp)
jge    113c <func_devptr+0x3c>
imul   $0x3,-0xc(%rbp),%edx
add    $0x1,%edx
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <func_devptr+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<func_devptr>:
movdqa 0xef8(%rip),%xmm0
mov    $0x4,%eax
pcmpeqd %xmm1,%xmm1
movdqa 0xef7(%rip),%xmm2
movdqa 0xeff(%rip),%xmm3
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movdqu -0x10(%rdi,%rax,4),%xmm5
movdqa %xmm0,%xmm4
paddd  %xmm0,%xmm4
paddd  %xmm0,%xmm4
paddd  %xmm4,%xmm5
psubd  %xmm1,%xmm5
movdqu %xmm5,-0x10(%rdi,%rax,4)
cmp    $0x64,%rax
je     1172 <func_devptr+0x72>
movdqu (%rdi,%rax,4),%xmm5
paddd  %xmm5,%xmm4
paddd  %xmm2,%xmm4
movdqu %xmm4,(%rdi,%rax,4)
paddd  %xmm3,%xmm0
add    $0x8,%rax
jmp    1130 <func_devptr+0x30>
ret

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

LLVM IR (-O2):
define void @func_devptr(i32* nocapture %0) {
br label %2
2: ; preds = %14, %1
%3 = phi i64 [ 0, %1 ], [ %22, %14 ]
%4 = phi <4 x i32> [ <i32 0, i32 1, i32 2, i32 3>, %1 ], [ %23, %14 ]
%5 = getelementptr inbounds i32, i32* %0, i64 %3
%6 = bitcast i32* %5 to <4 x i32>*
%7 = load <4 x i32>, <4 x i32>* %6
%8 = mul <4 x i32> %4, <i32 3, i32 3, i32 3, i32 3>
%9 = add <4 x i32> %8, <i32 1, i32 1, i32 1, i32 1>
%10 = add nsw <4 x i32> %9, %7
%11 = bitcast i32* %5 to <4 x i32>*
store <4 x i32> %10, <4 x i32>* %11
%12 = or i64 %3, 4
%13 = icmp eq i64 %12, 100
br i1 %13, label %24, label %14
14: ; preds = %2
%15 = getelementptr inbounds i32, i32* %0, i64 %12
%16 = bitcast i32* %15 to <4 x i32>*
%17 = load <4 x i32>, <4 x i32>* %16
%18 = mul <4 x i32> %4, <i32 3, i32 3, i32 3, i32 3>
%19 = add <4 x i32> %18, <i32 13, i32 13, i32 13, i32 13>
%20 = add nsw <4 x i32> %19, %17
%21 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> %20, <4 x i32>* %21
%22 = add nuw nsw i64 %3, 8
%23 = add <4 x i32> %4, <i32 8, i32 8, i32 8, i32 8>
br label %2
24: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3) {
  (void)(NotUsed);
  (void)(NotUsed2);
  (void)(NotUsed3);
  return 0;
}


x86 assembly (clang, -O0):
<unixGetLastError>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @unixGetLastError(i32* nocapture readnone %0, i32 %1, i8* nocapture readnone %2) {
ret i32 0
}
int ft_tolower(char c) { return (c + (('A' <= c && c <= 'Z') ? 32 : 0)); }


x86 assembly (clang, -O0):
<ft_tolower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
mov    %eax,-0x8(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x41,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
jg     1134 <ft_tolower+0x34>
movsbl -0x1(%rbp),%eax
cmp    $0x5a,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x2(%rbp),%sil
xor    %ecx,%ecx
mov    $0x20,%edx
test   $0x1,%sil
cmovne %edx,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_tolower>:
lea    -0x41(%rdi),%ecx
xor    %eax,%eax
cmp    $0x1a,%cl
setb   %al
shl    $0x5,%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @ft_tolower(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = icmp sle i32 65, %6
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8, i8* %2
%10 = sext i8 %9 to i32
%11 = icmp sle i32 %10, 90
br label %12
12: ; preds = %8, %1
%13 = phi i1 [ false, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i64
%15 = select i1 %13, i32 32, i32 0
%16 = add nsw i32 %4, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @ft_tolower(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = add i8 %0, -65
%4 = icmp ult i8 %3, 26
%5 = select i1 %4, i32 32, i32 0
%6 = add nsw i32 %5, %2
ret i32 %6
}
int normal(x, y, z) { return x + y + z; }


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

x86 assembly (clang, -O2):
<normal>:
lea    (%rdi,%rsi,1),%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @normal(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 = add nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @normal(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ longjmp(int /*<<< orphan*/, unsigned int);
void exception_handling(jmp_buf env) {
  static unsigned i = 0;
  for (; i >= 0; i++) {
    longjmp(env, i);
  }
}


x86 assembly (clang, -O0):
<exception_handling>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,0x2f0a(%rip)
jb     1136 <exception_handling+0x26>
mov    -0x4(%rbp),%edi
mov    0x2efb(%rip),%esi
call   1030 <longjmp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exception_handling>:
push   %rax
xor    %esi,%esi
call   1030 <longjmp@plt>

LLVM IR (-O0):
@exception_handling.i = internal global i32 0
define void @exception_handling(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %10, %1
%4 = load i32, i32* @exception_handling.i
%5 = icmp uge i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* @exception_handling.i
%9 = call i32 @longjmp(i32 %7, i32 %8)
unreachable
10: ; No predecessors!
%11 = load i32, i32* @exception_handling.i
%12 = add i32 %11, 1
store i32 %12, i32* @exception_handling.i
br label %3
13: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @exception_handling(i32 %0) {
%2 = tail call i32 @longjmp(i32 %0, i32 0)
unreachable
}
/* Variables and functions */
int getPT_L();
int /*<<< orphan*/ putCMD(int);
int /*<<< orphan*/ putPT(int);
int _dos_version(void) {
  putCMD(0x83);
  putPT(0x1a);
  return getPT_L();
}


x86 assembly (clang, -O0):
<_dos_version>:
push   %rbp
mov    %rsp,%rbp
mov    $0x83,%edi
call   1050 <putCMD@plt>
mov    $0x1a,%edi
call   1030 <putPT@plt>
mov    $0x0,%al
call   1040 <getPT_L@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<_dos_version>:
push   %rax
mov    $0x83,%edi
call   1050 <putCMD@plt>
mov    $0x1a,%edi
call   1030 <putPT@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <getPT_L@plt>

LLVM IR (-O0):
define i32 @_dos_version() {
%1 = call i32 @putCMD(i32 131)
%2 = call i32 @putPT(i32 26)
%3 = call i32 (...) @getPT_L()
ret i32 %3
}

LLVM IR (-O2):
define i32 @_dos_version() {
%1 = tail call i32 @putCMD(i32 131)
%2 = tail call i32 @putPT(i32 26)
%3 = tail call i32 (...) @getPT_L()
ret i32 %3
}
void foo560(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo560(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mstw_free();
int /*<<< orphan*/ mstw_stop();
void mshetsched_destroy(void) {
  mstw_stop();
  mstw_free();
}


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

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

LLVM IR (-O0):
define void @mshetsched_destroy() {
%1 = call i32 (...) @mstw_stop()
%2 = call i32 (...) @mstw_free()
ret void
}

LLVM IR (-O2):
define void @mshetsched_destroy() {
%1 = tail call i32 (...) @mstw_stop()
%2 = tail call i32 (...) @mstw_free()
ret void
}
/* Variables and functions */
char *iupStrGetSmallMem();
int /*<<< orphan*/ sprintf(char *, char *, int);
char *iupStrReturnInt(int i) {
  char *str = iupStrGetSmallMem();
  sprintf(str, "%d", i);
  return str;
}


x86 assembly (clang, -O0):
<iupStrReturnInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <iupStrGetSmallMem@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x4(%rbp),%edx
lea    0xebc(%rip),%rsi
call   1040 <sprintf@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iupStrReturnInt>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <iupStrGetSmallMem@plt>
mov    %rax,%rbx
lea    0xeca(%rip),%rsi
mov    %rax,%rdi
mov    %ebp,%edx
call   1040 <sprintf@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i8* @iupStrReturnInt(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* (...) @iupStrGetSmallMem()
store i8* %4, i8** %3
%5 = load i8*, i8** %3
%6 = load i32, i32* %2
%7 = call i32 @sprintf(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %6)
%8 = load i8*, i8** %3
ret i8* %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i8* @iupStrReturnInt(i32 %0) {
%2 = tail call i8* (...) @iupStrGetSmallMem()
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %2, i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ loop();
void __attribute__((weak)) vApplicationIdleHook() { loop(); }


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

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

LLVM IR (-O0):
define weak void @vApplicationIdleHook() {
%1 = call i32 (...) @loop()
ret void
}

LLVM IR (-O2):
define weak void @vApplicationIdleHook() {
%1 = tail call i32 (...) @loop()
ret void
}
/* Variables and functions */
char *strchr(char *, char);
const char *split_by_char(char *lineBuf, char separator) {
  char *lineEndPtr = strchr(lineBuf, separator);
  if (lineEndPtr) {
    *lineEndPtr = '\0';
    return lineEndPtr + 1;
  } else {
    return NULL;
  }
}


x86 assembly (clang, -O0):
<split_by_char>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %sil,%al
mov    %rdi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    -0x10(%rbp),%rdi
movsbl -0x11(%rbp),%esi
call   1030 <strchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1156 <split_by_char+0x46>
mov    -0x20(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    115e <split_by_char+0x4e>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<split_by_char>:
push   %rax
call   1030 <strchr@plt>
test   %rax,%rax
je     1124 <split_by_char+0x14>
movb   $0x0,(%rax)
add    $0x1,%rax
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i8* @split_by_char(i8* %0, i8 signext %1) {
%3 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %7, label %5
5: ; preds = %2
store i8 0, i8* %3
%6 = getelementptr inbounds i8, i8* %3, i64 1
br label %7
7: ; preds = %2, %5
%8 = phi i8* [ %6, %5 ], [ null, %2 ]
ret i8* %8
}
/* Variables and functions */
int strcmp(char const *, char const *);
int strqcmp(const char *s1, const char *s2) {
  int erg = (*s1) - (*s2);
  return (erg != 0) ? erg : strcmp(s1, s2);
}


x86 assembly (clang, -O0):
<strqcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0x10(%rbp),%rcx
movsbl (%rcx),%ecx
sub    %ecx,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1148 <strqcmp+0x38>
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    1158 <strqcmp+0x48>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strqcmp>:
movsbl (%rdi),%eax
movsbl (%rsi),%ecx
sub    %ecx,%eax
je     111b <strqcmp+0xb>
ret
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @strqcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = sext i8 %3 to i32
%5 = load i8, i8* %1
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %4, %6
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = tail call i32 @strcmp(i8* %0, i8* %1)
br label %11
11: ; preds = %2, %9
%12 = phi i32 [ %10, %9 ], [ %7, %2 ]
ret i32 %12
}
void orr_1(int *a) {
  for (int i = 0; i < 1024; i++)
    a[i] |= 0x0000cd00;
}


x86 assembly (clang, -O0):
<orr_1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x400,-0xc(%rbp)
jge    113e <orr_1+0x3e>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
or     $0xcd00,%edx
mov    %edx,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <orr_1+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<orr_1>:
xor    %eax,%eax
movaps 0xef7(%rip),%xmm0
nopl   0x0(%rax)
movups (%rdi,%rax,4),%xmm1
movups 0x10(%rdi,%rax,4),%xmm2
movups 0x20(%rdi,%rax,4),%xmm3
movups 0x30(%rdi,%rax,4),%xmm4
orps   %xmm0,%xmm1
orps   %xmm0,%xmm2
movups %xmm1,(%rdi,%rax,4)
movups %xmm2,0x10(%rdi,%rax,4)
orps   %xmm0,%xmm3
orps   %xmm0,%xmm4
movups %xmm3,0x20(%rdi,%rax,4)
movups %xmm4,0x30(%rdi,%rax,4)
add    $0x10,%rax
cmp    $0x400,%rax
jne    1110 <orr_1+0x10>
ret

LLVM IR (-O0):
define void @orr_1(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
store i32 0, i32* %3
br label %4
4: ; preds = %14, %1
%5 = load i32, i32* %3
%6 = icmp slt i32 %5, 1024
br i1 %6, label %7, label %17
7: ; preds = %4
%8 = load i32*, i32** %2
%9 = load i32, i32* %3
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i32, i32* %8, i64 %10
%12 = load i32, i32* %11
%13 = or i32 %12, 52480
store i32 %13, i32* %11
br label %14
14: ; preds = %7
%15 = load i32, i32* %3
%16 = add nsw i32 %15, 1
store i32 %16, i32* %3
br label %4
17: ; preds = %4
ret void
}

LLVM IR (-O2):
define void @orr_1(i32* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %25, %2 ]
%4 = getelementptr inbounds i32, i32* %0, i64 %3
%5 = bitcast i32* %4 to <4 x i32>*
%6 = load <4 x i32>, <4 x i32>* %5
%7 = getelementptr inbounds i32, i32* %4, i64 4
%8 = bitcast i32* %7 to <4 x i32>*
%9 = load <4 x i32>, <4 x i32>* %8
%10 = or <4 x i32> %6, <i32 52480, i32 52480, i32 52480, i32 52480>
%11 = or <4 x i32> %9, <i32 52480, i32 52480, i32 52480, i32 52480>
%12 = bitcast i32* %4 to <4 x i32>*
store <4 x i32> %10, <4 x i32>* %12
%13 = bitcast i32* %7 to <4 x i32>*
store <4 x i32> %11, <4 x i32>* %13
%14 = or i64 %3, 8
%15 = getelementptr inbounds i32, i32* %0, i64 %14
%16 = bitcast i32* %15 to <4 x i32>*
%17 = load <4 x i32>, <4 x i32>* %16
%18 = getelementptr inbounds i32, i32* %15, i64 4
%19 = bitcast i32* %18 to <4 x i32>*
%20 = load <4 x i32>, <4 x i32>* %19
%21 = or <4 x i32> %17, <i32 52480, i32 52480, i32 52480, i32 52480>
%22 = or <4 x i32> %20, <i32 52480, i32 52480, i32 52480, i32 52480>
%23 = bitcast i32* %15 to <4 x i32>*
store <4 x i32> %21, <4 x i32>* %23
%24 = bitcast i32* %18 to <4 x i32>*
store <4 x i32> %22, <4 x i32>* %24
%25 = add nuw nsw i64 %3, 16
%26 = icmp eq i64 %25, 1024
br i1 %26, label %27, label %2
27: ; preds = %2
ret void
}
void foo_2_2_1_2_2_1_2_1_1() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_2_1_2_2_1_2_1_1() {
ret void
}
long long uuzz() { return 0x7fff7fff00000000LL; }


x86 assembly (clang, -O0):
<uuzz>:
push   %rbp
mov    %rsp,%rbp
movabs $0x7fff7fff00000000,%rax
7f ff 7f
pop    %rbp
ret

x86 assembly (clang, -O2):
<uuzz>:
movabs $0x7fff7fff00000000,%rax
7f ff 7f
ret

LLVM IR (-O0):
define i64 @uuzz() {
ret i64 9223231295071453184
}

LLVM IR (-O2):
define i64 @uuzz() {
ret i64 9223231295071453184
}
char *strrchr(const char *s, int c) {
  const char *ret = 0;
  do {
    if (*s == (char)c)
      ret = s;
  } while (*s++);
  return (char *)ret;
}


x86 assembly (clang, -O0):
<strrchr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
mov    -0xc(%rbp),%ecx
movsbl %cl,%ecx
cmp    %ecx,%eax
jne    1130 <strrchr+0x30>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1135 <strrchr+0x35>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
cmpb   $0x0,(%rax)
jne    1113 <strrchr+0x13>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strrchr>:
movsbl %sil,%ecx
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
movsbl (%rdi),%edx
cmp    %edx,%ecx
cmove  %rdi,%rax
add    $0x1,%rdi
test   %edx,%edx
jne    1110 <strrchr+0x10>
ret

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

LLVM IR (-O2):
define i8* @strrchr(i8* %0, i32 %1) {
%3 = shl i32 %1, 24
%4 = ashr exact i32 %3, 24
br label %5
5: ; preds = %5, %2
%6 = phi i8* [ %0, %2 ], [ %12, %5 ]
%7 = phi i8* [ null, %2 ], [ %11, %5 ]
%8 = load i8, i8* %6
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %4, %9
%11 = select i1 %10, i8* %6, i8* %7
%12 = getelementptr inbounds i8, i8* %6, i64 1
%13 = icmp eq i8 %8, 0
br i1 %13, label %14, label %5
14: ; preds = %5
ret i8* %11
}
void MOT16(void *msg_buf) {}


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

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

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

LLVM IR (-O2):
define void @MOT16(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _getch();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void fun3() {
  system("cls");
  printf("function 3 \n");
  _getch();
}


x86 assembly (clang, -O0):
<fun3>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <system@plt>
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <_getch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun3>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <system@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <_getch@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
@.str.1 = [13 x i8] c"function 3 \0A\00"
define void @fun3() {
%1 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @_getch()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
@str = [12 x i8] c"function 3 \00"
define void @fun3() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @_getch()
ret void
}
/* Variables and functions */
int SIGTSTP;
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ esh_signal_fg(int);
void esh_signal_handler_stop(int sig) {
  assert(sig == SIGTSTP);
  esh_signal_fg(sig);
}


x86 assembly (clang, -O0):
<esh_signal_handler_stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2eb3(%rip),%rcx
cmp    (%rcx),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%edi
call   1030 <esh_signal_fg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<esh_signal_handler_stop>:
push   %rbx
mov    %edi,%ebx
mov    0x2ebe(%rip),%rax
xor    %edi,%edi
cmp    %ebx,(%rax)
sete   %dil
call   1040 <assert@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <esh_signal_fg@plt>

LLVM IR (-O0):
@SIGTSTP = global i32 0
define void @esh_signal_handler_stop(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGTSTP
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %2
%9 = call i32 @esh_signal_fg(i32 %8)
ret void
}

LLVM IR (-O2):
@SIGTSTP = global i32 0
define void @esh_signal_handler_stop(i32 %0) {
%2 = load i32, i32* @SIGTSTP
%3 = icmp eq i32 %2, %0
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i32 @esh_signal_fg(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ windup();
void xsd_clear(void) { windup(); }


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

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

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

LLVM IR (-O2):
define void @xsd_clear() {
%1 = tail call i32 (...) @windup()
ret void
}
void ff_hevc_put_hevc_uni_epel_hv48_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_hv48_10_avx2() {
ret void
}
/* Variables and functions */
float fastInvSqrt(float);
float fastSqrt(float x) { return 1.0f / fastInvSqrt(x); }


x86 assembly (clang, -O0):
<fastSqrt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <fastInvSqrt@plt>
movaps %xmm0,%xmm1
movss  0xece(%rip),%xmm0
divss  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fastSqrt>:
push   %rax
call   1030 <fastInvSqrt@plt>
movss  0xee2(%rip),%xmm1
divss  %xmm0,%xmm1
movaps %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @fastSqrt(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call float @fastInvSqrt(float %3)
%5 = fdiv float 1.000000e+00, %4
ret float %5
}

LLVM IR (-O2):
define float @fastSqrt(float %0) {
%2 = tail call float @fastInvSqrt(float %0)
%3 = fdiv float 1.000000e+00, %2
ret float %3
}
int isTrip(int a, int b, int c) { return (c * c) == ((a * a) + (b * b)); }


x86 assembly (clang, -O0):
<isTrip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
imul   -0xc(%rbp),%eax
mov    -0x4(%rbp),%ecx
imul   -0x4(%rbp),%ecx
mov    -0x8(%rbp),%edx
imul   -0x8(%rbp),%edx
add    %edx,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isTrip>:
imul   %edx,%edx
imul   %edi,%edi
imul   %esi,%esi
add    %edi,%esi
xor    %eax,%eax
cmp    %esi,%edx
sete   %al
ret

LLVM IR (-O0):
define i32 @isTrip(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* %6
%8 = load i32, i32* %6
%9 = mul nsw i32 %7, %8
%10 = load i32, i32* %4
%11 = load i32, i32* %4
%12 = mul nsw i32 %10, %11
%13 = load i32, i32* %5
%14 = load i32, i32* %5
%15 = mul nsw i32 %13, %14
%16 = add nsw i32 %12, %15
%17 = icmp eq i32 %9, %16
%18 = zext i1 %17 to i32
ret i32 %18
}

LLVM IR (-O2):
define i32 @isTrip(i32 %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %2, %2
%5 = mul nsw i32 %0, %0
%6 = mul nsw i32 %1, %1
%7 = add nuw nsw i32 %6, %5
%8 = icmp eq i32 %4, %7
%9 = zext i1 %8 to i32
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ key_tasklist_scroll(char);
void key_tasklist_scroll_home(void) { key_tasklist_scroll('h'); }


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

x86 assembly (clang, -O2):
<key_tasklist_scroll_home>:
mov    $0x68,%edi
jmp    1030 <key_tasklist_scroll@plt>

LLVM IR (-O0):
define void @key_tasklist_scroll_home() {
%1 = call i32 @key_tasklist_scroll(i8 signext 104)
ret void
}

LLVM IR (-O2):
define void @key_tasklist_scroll_home() {
%1 = tail call i32 @key_tasklist_scroll(i8 signext 104)
ret void
}
/* Variables and functions */
int fsync(int);
int txc_libc_fsync(int fd) { return fsync(fd); }


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

x86 assembly (clang, -O2):
<txc_libc_fsync>:
jmp    1030 <fsync@plt>

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

LLVM IR (-O2):
define i32 @txc_libc_fsync(i32 %0) {
%2 = tail call i32 @fsync(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char const *);
int compare_strings(const void *k1, const void *k2) {
  if (k1 == k2)
    return 1;
  else if (k1 == 0 || k2 == 0)
    return 0;
  else
    return !strcmp((const char *)k1, (const char *)k2);
}


x86 assembly (clang, -O0):
<compare_strings>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    113a <compare_strings+0x2a>
movl   $0x1,-0x4(%rbp)
jmp    1179 <compare_strings+0x69>
cmpq   $0x0,-0x10(%rbp)
je     1150 <compare_strings+0x40>
cmpq   $0x0,-0x18(%rbp)
jne    115c <compare_strings+0x4c>
movl   $0x0,-0x4(%rbp)
jmp    1179 <compare_strings+0x69>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcmp@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):
<compare_strings>:
cmp    %rsi,%rdi
je     1135 <compare_strings+0x25>
xor    %eax,%eax
test   %rdi,%rdi
je     1134 <compare_strings+0x24>
test   %rsi,%rsi
je     1134 <compare_strings+0x24>
push   %rax
call   1030 <strcmp@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 @compare_strings(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** %4
%7 = load i8*, i8** %5
%8 = icmp eq i8* %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %24
10: ; preds = %2
%11 = load i8*, i8** %4
%12 = icmp eq i8* %11, null
br i1 %12, label %16, label %13
13: ; preds = %10
%14 = load i8*, i8** %5
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %17
16: ; preds = %13, %10
store i32 0, i32* %3
br label %24
17: ; preds = %13
%18 = load i8*, i8** %4
%19 = load i8*, i8** %5
%20 = call i32 @strcmp(i8* %18, i8* %19)
%21 = icmp ne i32 %20, 0
%22 = xor i1 %21, true
%23 = zext i1 %22 to i32
store i32 %23, i32* %3
br label %24
24: ; preds = %17, %16, %9
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
define i32 @compare_strings(i8* %0, i8* %1) {
%3 = icmp eq i8* %0, %1
br i1 %3, label %12, label %4
4: ; preds = %2
%5 = icmp eq i8* %0, null
%6 = icmp eq i8* %1, null
%7 = or i1 %5, %6
br i1 %7, label %12, label %8
8: ; preds = %4
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %4, %2, %8
%13 = phi i32 [ %11, %8 ], [ 1, %2 ], [ 0, %4 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int yes(void) {
  printf("YESYES!\n");
  return 1;
}


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

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

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

LLVM IR (-O2):
@str = [8 x i8] c"YESYES!\00"
define i32 @yes() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
void bar(int n, int *a) {
  int(*p)[n] = &a;
#pragma omp parallel if (0)
  if (p == &a) {
  }
}


x86 assembly (clang, -O0):
<bar>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
lea    -0x10(%rbp),%rcx
cmp    %rcx,%rax
jne    1129 <bar+0x29>
jmp    1129 <bar+0x29>
pop    %rbp
ret

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

LLVM IR (-O0):
define void @bar(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 = zext i32 %6 to i64
%8 = bitcast i32** %4 to i32*
store i32* %8, i32** %5
%9 = load i32*, i32** %5
%10 = bitcast i32** %4 to i32*
%11 = icmp eq i32* %9, %10
br i1 %11, label %12, label %13
12: ; preds = %2
br label %13
13: ; preds = %12, %2
ret void
}

LLVM IR (-O2):
define void @bar(i32 %0, i32* nocapture %1) {
ret void
}
int isquare(int a) { return a * a; }


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

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

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

LLVM IR (-O2):
define i32 @isquare(i32 %0) {
%2 = mul nsw i32 %0, %0
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() { printf("2+2=%d\n", 2 * 2); }


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"2+2=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 4)
ret i32 0
}