xunge/DecIR huggingface dataset:
/* Variables and functions */
int __infer_nondet_int();
int rename(const char *old, const char *new) {
  int n;
  n = __infer_nondet_int();
  if (n)
    return 0;
  else
    return -1;
}


x86 assembly (clang, -O0):
<rename>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    $0x0,%al
call   1030 <__infer_nondet_int@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0x0,-0x1c(%rbp)
je     1140 <rename+0x30>
movl   $0x0,-0x4(%rbp)
jmp    1147 <rename+0x37>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rename>:
push   %rax
xor    %eax,%eax
call   1030 <__infer_nondet_int@plt>
cmp    $0x1,%eax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @rename(i8* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 (...) @__infer_nondet_int()
%4 = icmp eq i32 %3, 0
%5 = sext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
bool glmAny3f(const bool x[3]) { return x[0] || x[1] || x[2]; }


x86 assembly (clang, -O0):
<glmAny3f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmpl   $0x0,(%rcx)
mov    %al,-0x9(%rbp)
jne    113b <glmAny3f+0x3b>
mov    -0x8(%rbp),%rcx
mov    $0x1,%al
cmpl   $0x0,0x4(%rcx)
mov    %al,-0x9(%rbp)
jne    113b <glmAny3f+0x3b>
mov    -0x8(%rbp),%rax
cmpl   $0x0,0x8(%rax)
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmAny3f>:
mov    $0x1,%eax
cmpl   $0x0,(%rdi)
je     110b <glmAny3f+0xb>
ret
cmpl   $0x0,0x4(%rdi)
jne    110a <glmAny3f+0xa>
xor    %eax,%eax
cmpl   $0x0,0x8(%rdi)
setne  %al
ret

LLVM IR (-O0):
define i32 @glmAny3f(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %17, label %7
7: ; preds = %1
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load i32, i32* %9
%11 = icmp ne i32 %10, 0
br i1 %11, label %17, label %12
12: ; preds = %7
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 2
%15 = load i32, i32* %14
%16 = icmp ne i32 %15, 0
br label %17
17: ; preds = %12, %7, %1
%18 = phi i1 [ true, %7 ], [ true, %1 ], [ %16, %12 ]
%19 = zext i1 %18 to i32
ret i32 %19
}

LLVM IR (-O2):
define i32 @glmAny3f(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %13
4: ; preds = %1
%5 = getelementptr inbounds i32, i32* %0, i64 1
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %13
8: ; preds = %4
%9 = getelementptr inbounds i32, i32* %0, i64 2
%10 = load i32, i32* %9
%11 = icmp ne i32 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %8, %4, %1
%14 = phi i32 [ 1, %4 ], [ 1, %1 ], [ %12, %8 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *xmalloc(size_t n) {
  void *p = malloc(n);
  if (!p && n != 0) {
    fprintf(stderr, "malloc failed, memory exhausted\n");
    abort();
  }
  return p;
}


x86 assembly (clang, -O0):
<xmalloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117b <xmalloc+0x4b>
cmpq   $0x0,-0x8(%rbp)
je     117b <xmalloc+0x4b>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
lea    0xe91(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xmalloc>:
push   %rbx
mov    %rdi,%rbx
call   1050 <malloc@plt>
test   %rbx,%rbx
je     1143 <xmalloc+0x13>
test   %rax,%rax
je     1145 <xmalloc+0x15>
pop    %rbx
ret
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
lea    0xeab(%rip),%rsi
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"malloc failed, memory exhausted\0A\00"
define i8* @xmalloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %15, label %8
8: ; preds = %1
%9 = load i64, i64* %2
%10 = icmp ne i64 %9, 0
br i1 %10, label %11, label %15
11: ; preds = %8
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%14 = call i32 (...) @abort()
unreachable
15: ; preds = %8, %1
%16 = load i8*, i8** %3
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"malloc failed, memory exhausted\0A\00"
define noalias i8* @xmalloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
%4 = icmp ne i64 %0, 0
%5 = and i1 %4, %3
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 (...) @abort()
unreachable
10: ; preds = %1
ret i8* %2
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void p264_cpu_restore(uint32_t cpu) {}


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

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

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

LLVM IR (-O2):
define void @p264_cpu_restore(i32 %0) {
ret void
}
/* Variables and functions */
int strcmp(char *const, char *const);
int qsort_strcmp(const void *a, const void *b) {
  char *const *_a = a;
  char *const *_b = b;
  return strcmp(*_a, *_b);
}


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

x86 assembly (clang, -O2):
<qsort_strcmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @qsort_strcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
int my_str_islower(char *str) {
  int i;
  i = 0;
  while (str[i]) {
    if (str[i] < 'a' || str[i] > 'z')
      return (0);
    ++i;
  }
  return (1);
}


x86 assembly (clang, -O0):
<my_str_islower>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1165 <my_str_islower+0x65>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x61,%eax
jl     114b <my_str_islower+0x4b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7a,%eax
jle    1157 <my_str_islower+0x57>
movl   $0x0,-0x4(%rbp)
jmp    116c <my_str_islower+0x6c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <my_str_islower+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_str_islower>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <my_str_islower+0x23>
add    $0x1,%rdi
nop
add    $0x85,%cl
cmp    $0xe5,%cl
jbe    1124 <my_str_islower+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <my_str_islower+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @my_str_islower(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 0, i32* %4
br label %5
5: ; preds = %29, %1
%6 = load i8*, i8** %3
%7 = load i32, i32* %4
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %6, i64 %8
%10 = load i8, i8* %9
%11 = icmp ne i8 %10, 0
br i1 %11, label %12, label %32
12: ; preds = %5
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = sext i32 %14 to i64
%16 = getelementptr inbounds i8, i8* %13, i64 %15
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp slt i32 %18, 97
br i1 %19, label %28, label %20
20: ; preds = %12
%21 = load i8*, i8** %3
%22 = load i32, i32* %4
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp sgt i32 %26, 122
br i1 %27, label %28, label %29
28: ; preds = %20, %12
store i32 0, i32* %2
br label %33
29: ; preds = %20
%30 = load i32, i32* %4
%31 = add nsw i32 %30, 1
store i32 %31, i32* %4
br label %5
32: ; preds = %5
store i32 1, i32* %2
br label %33
33: ; preds = %32, %28
%34 = load i32, i32* %2
ret i32 %34
}

LLVM IR (-O2):
define i32 @my_str_islower(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -123
%12 = icmp ult i8 %11, -26
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int bfin_gpio_request(unsigned int);
int gpio_request(unsigned gpio, const char *label) {
  return bfin_gpio_request(gpio);
}


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

x86 assembly (clang, -O2):
<gpio_request>:
jmp    1030 <bfin_gpio_request@plt>

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

LLVM IR (-O2):
define i32 @gpio_request(i32 %0, i8* nocapture readnone %1) {
%3 = tail call i32 @bfin_gpio_request(i32 %0)
ret i32 %3
}
/* Variables and functions */
int error(char *, char const *);
int config_error_nonbool(const char *var) {
  return error("Missing value for '%s'", var);
}


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"Missing value for '%s'\00"
define i32 @config_error_nonbool(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %3)
ret i32 %4
}

LLVM IR (-O2):
@.str = [23 x i8] c"Missing value for '%s'\00"
define i32 @config_error_nonbool(i8* %0) {
%2 = tail call i32 @error(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %2
}
void val_delete_clunit_db(void *v) { (void)v; }


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

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

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

LLVM IR (-O2):
define void @val_delete_clunit_db(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int IPC_CREAT;
int *shmat(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
int shmget(int, int, int);
int shm_init() {
  int shmid = shmget(1234, 512, IPC_CREAT | 0600);
  int *max = shmat(shmid, NULL, 0);
  (*max) = 0;
  return 0;
}


x86 assembly (clang, -O0):
<shm_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    0x2eb1(%rip),%rax
mov    (%rax),%edx
or     $0x180,%edx
mov    $0x4d2,%edi
mov    $0x200,%esi
call   1040 <shmget@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <shmat@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x0,(%rax)
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shm_init>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    $0x180,%edx
or     (%rax),%edx
mov    $0x4d2,%edi
mov    $0x200,%esi
call   1040 <shmget@plt>
mov    %eax,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <shmat@plt>
movl   $0x0,(%rax)
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@IPC_CREAT = global i32 0
define i32 @shm_init() {
%1 = alloca i32
%2 = alloca i32*
%3 = load i32, i32* @IPC_CREAT
%4 = or i32 %3, 384
%5 = call i32 @shmget(i32 1234, i32 512, i32 %4)
store i32 %5, i32* %1
%6 = load i32, i32* %1
%7 = call i32* @shmat(i32 %6, i32* null, i32 0)
store i32* %7, i32** %2
%8 = load i32*, i32** %2
store i32 0, i32* %8
ret i32 0
}

LLVM IR (-O2):
@IPC_CREAT = global i32 0
define i32 @shm_init() {
%1 = load i32, i32* @IPC_CREAT
%2 = or i32 %1, 384
%3 = tail call i32 @shmget(i32 1234, i32 512, i32 %2)
%4 = tail call i32* @shmat(i32 %3, i32* null, i32 0)
store i32 0, i32* %4
ret i32 0
}
/* Variables and functions */
int f(int *, int *, int **);
int main(void) {
  int a[10];
  int m[10][3];
  int x = f(a, a, m);
  {
    int k[x];
    k[2] = 12;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
lea    -0x30(%rbp),%rsi
lea    -0xb0(%rbp),%rdx
mov    %rsi,%rdi
call   1030 <f@plt>
mov    %eax,-0xb4(%rbp)
mov    -0xb4(%rbp),%eax
mov    %eax,%ecx
mov    %rsp,%rax
mov    %rax,-0xc0(%rbp)
lea    0xf(,%rcx,4),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rax
sub    %rdx,%rax
mov    %rax,%rsp
mov    %rcx,-0xc8(%rbp)
movl   $0xc,0x8(%rax)
mov    -0xc0(%rbp),%rax
mov    %rax,%rsp
xor    %eax,%eax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0xa8,%rsp
mov    %rsp,%rdi
lea    0x30(%rsp),%rdx
mov    %rdi,%rsi
call   1030 <f@plt>
xor    %eax,%eax
add    $0xa8,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca [10 x [3 x i32]]
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
%6 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%7 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%8 = getelementptr inbounds [10 x [3 x i32]], [10 x [3 x i32]]* %2, i64 0, i64 0
%9 = bitcast [3 x i32]* %8 to i32**
%10 = call i32 @f(i32* %6, i32* %7, i32** %9)
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = zext i32 %11 to i64
%13 = call i8* @llvm.stacksave()
store i8* %13, i8** %4
%14 = alloca i32, i64 %12
store i64 %12, i64* %5
%15 = getelementptr inbounds i32, i32* %14, i64 2
store i32 12, i32* %15
%16 = load i8*, i8** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [10 x i32]
%2 = alloca [10 x [3 x i32]]
%3 = bitcast [10 x i32]* %1 to i8*
%4 = bitcast [10 x [3 x i32]]* %2 to i8*
%5 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%6 = bitcast [10 x [3 x i32]]* %2 to i32**
%7 = call i32 @f(i32* %5, i32* %5, i32** %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
int main() {
  int i, startNum, endNum;
  int sum;
  sum = 0;
  startNum = 10;
  endNum = 99;
  for (i = startNum; i <= endNum; i++) {
    sum = sum + i;
  }
  printf("%d+%d+...+%d+%d=%d\n", startNum, startNum + 1, endNum - 1, endNum,
         sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x14(%rbp)
movl   $0xa,-0xc(%rbp)
movl   $0x63,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x10(%rbp),%eax
jg     115d <main+0x4d>
mov    -0x14(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    113a <main+0x2a>
mov    -0xc(%rbp),%esi
mov    -0xc(%rbp),%edx
add    $0x1,%edx
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
lea    0xe85(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xa,%esi
mov    $0xb,%edx
mov    $0x62,%ecx
mov    $0x63,%r8d
mov    $0x1329,%r9d
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"%d+%d+...+%d+%d=%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %5
store i32 10, i32* %3
store i32 99, i32* %4
%6 = load i32, i32* %3
store i32 %6, i32* %2
br label %7
7: ; preds = %15, %0
%8 = load i32, i32* %2
%9 = load i32, i32* %4
%10 = icmp sle i32 %8, %9
br i1 %10, label %11, label %18
11: ; preds = %7
%12 = load i32, i32* %5
%13 = load i32, i32* %2
%14 = add nsw i32 %12, %13
store i32 %14, i32* %5
br label %15
15: ; preds = %11
%16 = load i32, i32* %2
%17 = add nsw i32 %16, 1
store i32 %17, i32* %2
br label %7
18: ; preds = %7
%19 = load i32, i32* %3
%20 = load i32, i32* %3
%21 = add nsw i32 %20, 1
%22 = load i32, i32* %4
%23 = sub nsw i32 %22, 1
%24 = load i32, i32* %4
%25 = load i32, i32* %5
%26 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %19, i32 %21, i32 %23, i32 %24, i32 %25)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"%d+%d+...+%d+%d=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 10, i32 11, i32 98, i32 99, i32 4905)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ by_ptr(int /*<<< orphan*/);
void and_by_ptr(uint32_t x) {
  by_ptr(x);
  and();
}


x86 assembly (clang, -O0):
<and_by_ptr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <by_ptr@plt>
mov    $0x0,%al
call   1040 <and@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @and_by_ptr(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @by_ptr(i32 %3)
%5 = call i32 (...) @and()
ret void
}

LLVM IR (-O2):
define void @and_by_ptr(i32 %0) {
%2 = tail call i32 @by_ptr(i32 %0)
%3 = tail call i32 (...) @and()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ add_chr_to_buffer(char const);
void add_str_to_buffer(const char *s) {
  while (s && *s) {
    add_chr_to_buffer(*s);
    s++;
  }
}


x86 assembly (clang, -O0):
<add_str_to_buffer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     113c <add_str_to_buffer+0x2c>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
test   $0x1,%al
jne    114c <add_str_to_buffer+0x3c>
jmp    1169 <add_str_to_buffer+0x59>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <add_chr_to_buffer@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    111c <add_str_to_buffer+0xc>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_str_to_buffer>:
push   %rbx
test   %rdi,%rdi
je     1143 <add_str_to_buffer+0x33>
mov    %rdi,%rbx
mov    (%rdi),%al
test   %al,%al
je     1143 <add_str_to_buffer+0x33>
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl %al,%edi
call   1030 <add_chr_to_buffer@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <add_str_to_buffer+0x20>
pop    %rbx
ret

LLVM IR (-O0):
define void @add_str_to_buffer(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %13, %1
%4 = load i8*, i8** %2
%5 = icmp ne i8* %4, null
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = load i8*, i8** %2
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br label %11
11: ; preds = %6, %3
%12 = phi i1 [ false, %3 ], [ %10, %6 ]
br i1 %12, label %13, label %19
13: ; preds = %11
%14 = load i8*, i8** %2
%15 = load i8, i8* %14
%16 = call i32 @add_chr_to_buffer(i8 signext %15)
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %11
ret void
}

LLVM IR (-O2):
define void @add_str_to_buffer(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %11, %6 ], [ %4, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = tail call i32 @add_chr_to_buffer(i8 signext %7)
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(void **);
void *unused_pop(void **stack) {
  void *ptr;
  assert(stack);
  ptr = *stack;
  *stack = *(void **)ptr;
  return ptr;
}


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

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

LLVM IR (-O0):
define i8* @unused_pop(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = call i32 @assert(i8** %4)
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i8**
%10 = load i8*, i8** %9
%11 = load i8**, i8*** %2
store i8* %10, i8** %11
%12 = load i8*, i8** %3
ret i8* %12
}

LLVM IR (-O2):
define i8* @unused_pop(i8** %0) {
%2 = tail call i32 @assert(i8** %0)
%3 = load i8*, i8** %0
%4 = bitcast i8* %3 to i8**
%5 = load i8*, i8** %4
store i8* %5, i8** %0
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ nxtDisplayCenteredTextLine(int, char *);
int /*<<< orphan*/ wait1Msec(int);
void movesEnd() {
  nxtDisplayCenteredTextLine(5, "Ending");
  wait1Msec(5000);
}


x86 assembly (clang, -O0):
<movesEnd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x5,%edi
lea    0xed0(%rip),%rsi
call   1030 <nxtDisplayCenteredTextLine@plt>
mov    $0x1388,%edi
call   1040 <wait1Msec@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<movesEnd>:
push   %rax
lea    0xed8(%rip),%rsi
mov    $0x5,%edi
call   1030 <nxtDisplayCenteredTextLine@plt>
mov    $0x1388,%edi
pop    %rax
jmp    1040 <wait1Msec@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"Ending\00"
define void @movesEnd() {
%1 = call i32 @nxtDisplayCenteredTextLine(i32 5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @wait1Msec(i32 5000)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"Ending\00"
define void @movesEnd() {
%1 = tail call i32 @nxtDisplayCenteredTextLine(i32 5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @wait1Msec(i32 5000)
ret void
}
void foo709(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo709(i32 %0) {
ret void
}
/* Variables and functions */
char *malloc(int);
int /*<<< orphan*/ printf(char *, char *);
char *strcat(char *, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int main() {
  char *s1 = "hello ";
  char *s2 = "world";
  char *s = malloc(sizeof(strlen(s1) + strlen(s2) + 1));
  strcpy(s, s1);
  char *r = strcat(s, s2);
  printf("%s\n", r);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rax
mov    %rax,-0x10(%rbp)
lea    0xea6(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    $0x8,%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1060 <strcat@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe71(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x8,%edi
call   1060 <malloc@plt>
mov    %rax,%rbx
lea    0xeab(%rip),%rsi
mov    %rax,%rdi
call   1030 <strcpy@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
movl   $0x6c726f77,(%rbx,%rax,1)
movw   $0x64,0x4(%rbx,%rax,1)
lea    0xe93(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hello \00"
@.str.1 = [6 x i8] c"world\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i32 0, i32* %1
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %2
store i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8** %3
%6 = call i8* @malloc(i32 8)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = load i8*, i8** %2
%9 = call i32 @strcpy(i8* %7, i8* %8)
%10 = load i8*, i8** %4
%11 = load i8*, i8** %3
%12 = call i8* @strcat(i8* %10, i8* %11)
store i8* %12, i8** %5
%13 = load i8*, i8** %5
%14 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"hello \00"
@.str.1 = [6 x i8] c"world\00"
@.str.2 = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = tail call dereferenceable_or_null(8) i8* @malloc(i32 8)
%2 = tail call i32 @strcpy(i8* %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 @strlen(i8* dereferenceable(1) %1)
%4 = getelementptr i8, i8* %1, i64 %3
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 1 dereferenceable(6) %4, i8* align 1 dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 6, i1 false)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ IPC_NOWAIT;
int msgsnd(int, void *, int, int /*<<< orphan*/);
int CommSendNoBlock(int channel_id, void *message, int size) {
  if (msgsnd(channel_id, message, size - sizeof(long), IPC_NOWAIT) == -1) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<CommSendNoBlock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
movslq -0x14(%rbp),%rax
sub    $0x8,%rax
mov    %eax,%edx
mov    0x2eb6(%rip),%rax
mov    (%rax),%ecx
call   1030 <msgsnd@plt>
cmp    $0xffffffff,%eax
jne    1156 <CommSendNoBlock+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <CommSendNoBlock+0x4d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<CommSendNoBlock>:
push   %rax
add    $0xfffffff8,%edx
mov    0x2ed5(%rip),%rax
mov    (%rax),%ecx
call   1030 <msgsnd@plt>
xor    %ecx,%ecx
cmp    $0xffffffff,%eax
sete   %cl
neg    %ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@IPC_NOWAIT = global i32 0
define i32 @CommSendNoBlock(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = load i32, i32* %7
%11 = sext i32 %10 to i64
%12 = sub i64 %11, 8
%13 = trunc i64 %12 to i32
%14 = load i32, i32* @IPC_NOWAIT
%15 = call i32 @msgsnd(i32 %8, i8* %9, i32 %13, i32 %14)
%16 = icmp eq i32 %15, -1
br i1 %16, label %17, label %18
17: ; preds = %3
store i32 -1, i32* %4
br label %19
18: ; preds = %3
store i32 0, i32* %4
br label %19
19: ; preds = %18, %17
%20 = load i32, i32* %4
ret i32 %20
}

LLVM IR (-O2):
@IPC_NOWAIT = global i32 0
define i32 @CommSendNoBlock(i32 %0, i8* %1, i32 %2) {
%4 = add i32 %2, -8
%5 = load i32, i32* @IPC_NOWAIT
%6 = tail call i32 @msgsnd(i32 %0, i8* %1, i32 %4, i32 %5)
%7 = icmp eq i32 %6, -1
%8 = sext i1 %7 to i32
ret i32 %8
}
OP(dd, e6) { op_e6(); }


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

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

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

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @op_e6()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ move(int, int);
void console_move(int x, int y) { move(y, x); }


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

x86 assembly (clang, -O2):
<console_move>:
mov    %edi,%eax
mov    %esi,%edi
mov    %eax,%esi
jmp    1030 <move@plt>

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

LLVM IR (-O2):
define void @console_move(i32 %0, i32 %1) {
%3 = tail call i32 @move(i32 %1, i32 %0)
ret void
}
int sse4a_pop_i(int a) { return __builtin_popcount(a); }


x86 assembly (clang, -O0):
<sse4a_pop_i>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    %ecx,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%ecx
mov    %ecx,%eax
and    $0x33333333,%eax
shr    $0x2,%ecx
and    $0x33333333,%ecx
add    %ecx,%eax
mov    %eax,%ecx
shr    $0x4,%ecx
add    %ecx,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sse4a_pop_i>:
mov    %edi,%eax
shr    %eax
and    $0x55555555,%eax
sub    %eax,%edi
mov    %edi,%eax
and    $0x33333333,%eax
shr    $0x2,%edi
and    $0x33333333,%edi
add    %eax,%edi
mov    %edi,%eax
shr    $0x4,%eax
add    %edi,%eax
and    $0xf0f0f0f,%eax
imul   $0x1010101,%eax,%eax
shr    $0x18,%eax
ret

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

LLVM IR (-O2):
define i32 @sse4a_pop_i(i32 %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ add_word(char *);
void cm_point(int arg) {
  if (arg == 1)
    add_word("-!-");
}


x86 assembly (clang, -O0):
<cm_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x1,-0x4(%rbp)
jne    1131 <cm_point+0x21>
lea    0xed4(%rip),%rdi
call   1030 <add_word@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cm_point>:
cmp    $0x1,%edi
jne    1121 <cm_point+0x11>
lea    0xee4(%rip),%rdi
jmp    1030 <add_word@plt>
ret

LLVM IR (-O0):
@.str = [4 x i8] c"-!-\00"
define void @cm_point(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @add_word(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"-!-\00"
define void @cm_point(i32 %0) {
%2 = icmp eq i32 %0, 1
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @add_word(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %1
ret void
}
void InitThreads(void) {}


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

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

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

LLVM IR (-O2):
define void @InitThreads() {
ret void
}
/* Type definitions */
struct Storage {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ _storage_init(struct Storage *, size_t);
void storage_init(struct Storage *s, size_t nmemb) { _storage_init(s, nmemb); }


x86 assembly (clang, -O0):
<storage_init>:
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 <_storage_init@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<storage_init>:
jmp    1030 <_storage_init@plt>

LLVM IR (-O0):
%struct.Storage = type { i32 }
define void @storage_init(%struct.Storage* %0, i64 %1) {
%3 = alloca %struct.Storage*
%4 = alloca i64
store %struct.Storage* %0, %struct.Storage** %3
store i64 %1, i64* %4
%5 = load %struct.Storage*, %struct.Storage** %3
%6 = load i64, i64* %4
%7 = call i32 @_storage_init(%struct.Storage* %5, i64 %6)
ret void
}

LLVM IR (-O2):
%struct.Storage = type { i32 }
define void @storage_init(%struct.Storage* %0, i64 %1) {
%3 = tail call i32 @_storage_init(%struct.Storage* %0, i64 %1)
ret void
}
char *strcat(char *destination, const char *append) {
  char *save = destination;
  while (*destination++ != '\0')
    ;
  destination--;
  while ((*destination++ = *append++) != '\0')
    ;
  return (save);
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1134 <strcat+0x34>
jmp    1114 <strcat+0x14>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1173 <strcat+0x73>
jmp    1140 <strcat+0x40>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
mov    %rdi,%rax
mov    %rdi,%rcx
cs nopw 0x0(%rax,%rax,1)
cmpb   $0x0,(%rcx)
lea    0x1(%rcx),%rcx
jne    1110 <strcat+0x10>
xor    %edx,%edx
nopl   0x0(%rax,%rax,1)
movzbl (%rsi,%rdx,1),%edi
mov    %dil,-0x1(%rcx,%rdx,1)
add    $0x1,%rdx
test   %dil,%dil
jne    1120 <strcat+0x20>
ret

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

LLVM IR (-O2):
define i8* @strcat(i8* returned %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %5, %3 ]
%5 = getelementptr inbounds i8, i8* %4, i64 1
%6 = load i8, i8* %4
%7 = icmp eq i8 %6, 0
br i1 %7, label %8, label %3
8: ; preds = %3, %8
%9 = phi i8* [ %11, %8 ], [ %1, %3 ]
%10 = phi i8* [ %13, %8 ], [ %4, %3 ]
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = load i8, i8* %9
%13 = getelementptr inbounds i8, i8* %10, i64 1
store i8 %12, i8* %10
%14 = icmp eq i8 %12, 0
br i1 %14, label %15, label %8
15: ; preds = %8
ret i8* %0
}
void _Unwind_FindEnclosingFunction() {}


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

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

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

LLVM IR (-O2):
define void @_Unwind_FindEnclosingFunction() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ putchar(int);
main() {
  int i;
  for (i = 0; i < 66536; i++)
    putchar(0xff);
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x103e8,-0x8(%rbp)
jge    115b <main+0x3b>
mov    $0xff,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1136 <main+0x16>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x103e8,%ebx
cs nopw 0x0(%rax,%rax,1)
mov    $0xff,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebx
jne    1130 <main+0x10>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %8, %0
%4 = load i32, i32* %2
%5 = icmp slt i32 %4, 66536
br i1 %5, label %6, label %11
6: ; preds = %3
%7 = call i32 @putchar(i32 255)
br label %8
8: ; preds = %6
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 1
store i32 %10, i32* %2
br label %3
11: ; preds = %3
%12 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @putchar(i32 255)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 66536
br i1 %5, label %6, label %1
6: ; preds = %1
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int parse_expense(int /*<<< orphan*/ *);
int parse_input_file(FILE *f) { return parse_expense(f); }


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

x86 assembly (clang, -O2):
<parse_input_file>:
jmp    1030 <parse_expense@plt>

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

LLVM IR (-O2):
define i32 @parse_input_file(i32* %0) {
%2 = tail call i32 @parse_expense(i32* %0)
ret i32 %2
}
/* Variables and functions */
void *test_ptr_alloc_align(int);
void *passthrought(int a) { return test_ptr_alloc_align(a); }


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

x86 assembly (clang, -O2):
<passthrought>:
jmp    1030 <test_ptr_alloc_align@plt>

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

LLVM IR (-O2):
define i8* @passthrought(i32 %0) {
%2 = tail call i8* @test_ptr_alloc_align(i32 %0)
ret i8* %2
}
int sys$setdfprot(struct _fab *fab, void *err, void *suc) {
  return ({
    unsigned long resultvar;
    register long int _a3 asm("rdx") = (long)(suc);
    register long int _a2 asm("rsi") = (long)(err);
    register long int _a1 asm("rdi") = (long)(fab);
    asm volatile("movq %1, %%rax\n\t"
                 "int $0x82\n\t"
                 : "=a"(resultvar)
                 : "i"(32), "r"(_a1), "r"(_a2), "r"(_a3)
                 : "memory", "cc", "r11", "cx");
    (long)resultvar;
  });
}


x86 assembly (clang, -O0):
<sys$setdfprot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x28(%rbp),%rdx
mov    $0x20,%rax
int    $0x82
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys$setdfprot>:
mov    $0x20,%rax
int    $0x82
ret

LLVM IR (-O0):
%struct._fab = type opaque
define i32 @"sys$setdfprot"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = alloca %struct._fab*
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64
%11 = alloca i64
store %struct._fab* %0, %struct._fab** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%12 = load i8*, i8** %6
%13 = ptrtoint i8* %12 to i64
store i64 %13, i64* %8
%14 = load i8*, i8** %5
%15 = ptrtoint i8* %14 to i64
store i64 %15, i64* %9
%16 = load %struct._fab*, %struct._fab** %4
%17 = ptrtoint %struct._fab* %16 to i64
store i64 %17, i64* %10
%18 = load i64, i64* %10
%19 = load i64, i64* %9
%20 = load i64, i64* %8
%21 = call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 32, i64 %18, i64 %19, i64 %20)
store i64 %21, i64* %7
%22 = load i64, i64* %7
store i64 %22, i64* %11
%23 = load i64, i64* %11
%24 = trunc i64 %23 to i32
ret i32 %24
}

LLVM IR (-O2):
%struct._fab = type opaque
define i32 @"sys$setdfprot"(%struct._fab* %0, i8* %1, i8* %2) {
%4 = ptrtoint i8* %2 to i64
%5 = ptrtoint i8* %1 to i64
%6 = ptrtoint %struct._fab* %0 to i64
%7 = tail call i64 asm sideeffect "movq $1, %rax\0A\09int $$0x82\0A\09", "={ax},i,{rdi},{rsi},{rdx},~{memory},~{cc},~{r11},~{cx},~{dirflag},~{fpsr},~{flags}"(i32 32, i64 %6, i64 %5, i64 %4)
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
short or_h(short *, short *);
short intr_wrap_548(short p1, short p2) { return or_h(&p1, &p2); }


x86 assembly (clang, -O0):
<intr_wrap_548>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x2(%rbp)
mov    %ax,-0x4(%rbp)
lea    -0x2(%rbp),%rdi
lea    -0x4(%rbp),%rsi
call   1030 <or_h@plt>
cwtl
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intr_wrap_548>:
push   %rax
mov    %di,0x6(%rsp)
mov    %si,0x4(%rsp)
lea    0x6(%rsp),%rdi
lea    0x4(%rsp),%rsi
call   1030 <or_h@plt>
pop    %rcx
ret

LLVM IR (-O0):
define signext i16 @intr_wrap_548(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call signext i16 @or_h(i16* %3, i16* %4)
ret i16 %5
}

LLVM IR (-O2):
define signext i16 @intr_wrap_548(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
store i16 %0, i16* %3
store i16 %1, i16* %4
%5 = call signext i16 @or_h(i16* %3, i16* %4)
ret i16 %5
}
int test_imm_8Dint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x8D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_8Dint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 605590388736
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct peEventLoop {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void fun_peFinalizerProc(struct peEventLoop *el, void *clientData) {
  ((void)el);
  ((void)clientData);
  printf("peFinalizerProc runned!!!\n");
}


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

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

LLVM IR (-O0):
%struct.peEventLoop = type { i32 }
@.str = [27 x i8] c"peFinalizerProc runned!!!\0A\00"
define void @fun_peFinalizerProc(%struct.peEventLoop* %0, i8* %1) {
%3 = alloca %struct.peEventLoop*
%4 = alloca i8*
store %struct.peEventLoop* %0, %struct.peEventLoop** %3
store i8* %1, i8** %4
%5 = load %struct.peEventLoop*, %struct.peEventLoop** %3
%6 = load i8*, i8** %4
%7 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.peEventLoop = type { i32 }
@str = [26 x i8] c"peFinalizerProc runned!!!\00"
define void @fun_peFinalizerProc(%struct.peEventLoop* nocapture readnone %0, i8* nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct timespec {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ SYS_futex;
long syscall(int /*<<< orphan*/, void *, int, int, struct timespec *, void *,
             int);
long sys_futex(void *addr1, int op, int val1, struct timespec *timeout,
               void *addr2, int val3) {
  return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3);
}


x86 assembly (clang, -O0):
<sys_futex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
mov    -0x10(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x20(%rbp),%r9
mov    -0x24(%rbp),%eax
mov    %eax,(%rsp)
call   1030 <syscall@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_futex>:
push   %rax
mov    %r8,%rax
mov    %rcx,%r8
mov    %edx,%ecx
mov    %esi,%edx
mov    %rdi,%rsi
mov    0x2ebb(%rip),%rdi
mov    (%rdi),%edi
mov    %r9d,(%rsp)
mov    %rax,%r9
call   1030 <syscall@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.timespec = type { i32 }
@SYS_futex = global i32 0
define i64 @sys_futex(i8* %0, i32 %1, i32 %2, %struct.timespec* %3, i8* %4, i32 %5) {
%7 = alloca i8*
%8 = alloca i32
%9 = alloca i32
%10 = alloca %struct.timespec*
%11 = alloca i8*
%12 = alloca i32
store i8* %0, i8** %7
store i32 %1, i32* %8
store i32 %2, i32* %9
store %struct.timespec* %3, %struct.timespec** %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%13 = load i32, i32* @SYS_futex
%14 = load i8*, i8** %7
%15 = load i32, i32* %8
%16 = load i32, i32* %9
%17 = load %struct.timespec*, %struct.timespec** %10
%18 = load i8*, i8** %11
%19 = load i32, i32* %12
%20 = call i64 @syscall(i32 %13, i8* %14, i32 %15, i32 %16, %struct.timespec* %17, i8* %18, i32 %19)
ret i64 %20
}

LLVM IR (-O2):
%struct.timespec = type { i32 }
@SYS_futex = global i32 0
define i64 @sys_futex(i8* %0, i32 %1, i32 %2, %struct.timespec* %3, i8* %4, i32 %5) {
%7 = load i32, i32* @SYS_futex
%8 = tail call i64 @syscall(i32 %7, i8* %0, i32 %1, i32 %2, %struct.timespec* %3, i8* %4, i32 %5)
ret i64 %8
}