xunge/DecIR huggingface dataset:
/* Type definitions */
struct wbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int wbuf_write(struct wbuf *, char const *, int /*<<< orphan*/);
int wbuf_write_str(struct wbuf *wbuf, const char *str) {
  return wbuf_write(wbuf, str, strlen(str));
}


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

x86 assembly (clang, -O2):
<wbuf_write_str>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
call   1030 <strlen@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <wbuf_write@plt>

LLVM IR (-O0):
%struct.wbuf = type { i32 }
define i32 @wbuf_write_str(%struct.wbuf* %0, i8* %1) {
%3 = alloca %struct.wbuf*
%4 = alloca i8*
store %struct.wbuf* %0, %struct.wbuf** %3
store i8* %1, i8** %4
%5 = load %struct.wbuf*, %struct.wbuf** %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @wbuf_write(%struct.wbuf* %5, i8* %6, i32 %8)
ret i32 %9
}

LLVM IR (-O2):
%struct.wbuf = type { i32 }
define i32 @wbuf_write_str(%struct.wbuf* %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @wbuf_write(%struct.wbuf* %0, i8* %1, i32 %3)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ abort();
scalar_t__ foo(int);
int main() {
  if (foo(1) != 0)
    abort();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <foo@plt>
test   %rax,%rax
jne    1134 <main+0x14>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @foo(i32 1)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i32 (...) @abort()
unreachable
5: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *, int,
                           char const *);
int /*<<< orphan*/ stderr;
char *zconf_curname();
int zconf_lineno();
void zconferror(const char *err) {
  fprintf(stderr, "%s:%d: %s\n", zconf_curname(), zconf_lineno() + 1, err);
}


x86 assembly (clang, -O0):
<zconferror>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <zconf_curname@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1030 <zconf_lineno@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %eax,%ecx
add    $0x1,%ecx
mov    -0x8(%rbp),%r8
lea    0xe8f(%rip),%rsi
call   1040 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zconferror>:
push   %rbp
push   %r14
push   %rbx
mov    %rdi,%r14
mov    0x2ea2(%rip),%rax
mov    (%rax),%ebp
xor    %eax,%eax
call   1050 <zconf_curname@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1030 <zconf_lineno@plt>
lea    0x1(%rax),%ecx
lea    0xea5(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %r14,%r8
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [11 x i8] c"%s:%d: %s\0A\00"
define void @zconferror(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = call i8* (...) @zconf_curname()
%5 = call i32 (...) @zconf_lineno()
%6 = add nsw i32 %5, 1
%7 = load i8*, i8** %2
%8 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6, i8* %7)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [11 x i8] c"%s:%d: %s\0A\00"
define void @zconferror(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* (...) @zconf_curname()
%4 = tail call i32 (...) @zconf_lineno()
%5 = add nsw i32 %4, 1
%6 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %3, i32 %5, i8* %0)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t rev_byte_6(uint8_t x) {
  uint8_t i;
  uint8_t r = 0;
  for (i = 0; i < 8; i++) {
    r |= (x & (1 << i)) >> (7 - i);
  }
  return r;
}


x86 assembly (clang, -O0):
<rev_byte_6>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jge    114e <rev_byte_6+0x4e>
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
mov    $0x7,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1115 <rev_byte_6+0x15>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rev_byte_6>:
mov    %edi,%eax
shr    $0x3,%eax
and    $0x2,%eax
mov    %edi,%ecx
shr    $0x2,%ecx
and    $0x8,%ecx
or     %eax,%ecx
mov    %edi,%eax
shr    %eax
and    $0x20,%eax
or     %ecx,%eax
and    $0x80,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rev_byte_6(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %18, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 8
br i1 %7, label %8, label %21
8: ; preds = %5
%9 = load i32, i32* %2
%10 = load i32, i32* %3
%11 = shl i32 1, %10
%12 = and i32 %9, %11
%13 = load i32, i32* %3
%14 = sub nsw i32 7, %13
%15 = ashr i32 %12, %14
%16 = load i32, i32* %4
%17 = or i32 %16, %15
store i32 %17, i32* %4
br label %18
18: ; preds = %8
%19 = load i32, i32* %3
%20 = add nsw i32 %19, 1
store i32 %20, i32* %3
br label %5
21: ; preds = %5
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @rev_byte_6(i32 %0) {
%2 = lshr i32 %0, 3
%3 = and i32 %2, 2
%4 = lshr i32 %0, 2
%5 = and i32 %4, 8
%6 = or i32 %5, %3
%7 = lshr i32 %0, 1
%8 = and i32 %7, 32
%9 = or i32 %8, %6
%10 = and i32 %0, 128
%11 = or i32 %10, %9
ret i32 %11
}
/* Type definitions */
typedef scalar_t__ time_t;
struct timeval {
  scalar_t__ tv_sec;
};

/* Variables and functions */
int gettimeofday(struct timeval *, int /*<<< orphan*/);
time_t time(time_t *p) {
  struct timeval tv;
  time_t ret;
  if (gettimeofday(&tv, 0) == -1)
    ret = (time_t)-1;
  else
    ret = tv.tv_sec;
  if (p)
    *p = ret;
  return ret;
}


x86 assembly (clang, -O0):
<time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cmp    $0xffffffff,%eax
jne    113d <time+0x2d>
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
jmp    1145 <time+0x35>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     115b <time+0x4b>
mov    -0x18(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<time>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
mov    %eax,%ecx
mov    $0xffffffffffffffff,%rax
cmp    $0xffffffff,%ecx
je     1137 <time+0x27>
mov    0x8(%rsp),%rax
test   %rbx,%rbx
je     113f <time+0x2f>
mov    %rax,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
%struct.timeval = type { i64 }
define i64 @time(i64* writeonly %0) {
%2 = alloca %struct.timeval
%3 = bitcast %struct.timeval* %2 to i8*
%4 = call i32 @gettimeofday(%struct.timeval* %2, i32 0)
%5 = icmp eq i32 %4, -1
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %2, i64 0, i32 0
%7 = load i64, i64* %6
%8 = select i1 %5, i64 -1, i64 %7
%9 = icmp eq i64* %0, null
br i1 %9, label %11, label %10
10: ; preds = %1
store i64 %8, i64* %0
br label %11
11: ; preds = %10, %1
ret i64 %8
}
/* Variables and functions */
int /*<<< orphan*/ bar(int *);
int /*<<< orphan*/ foo(int *);
scalar_t__ malloc(int);
int main() {
  int *mem = (int *)malloc(100);
  foo(mem);
  bar(mem);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1050 <foo@plt>
mov    -0x10(%rbp),%rdi
call   1030 <bar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0x64,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <foo@plt>
mov    %rbx,%rdi
call   1030 <bar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
store i32 0, i32* %1
%3 = call i64 @malloc(i32 100)
%4 = inttoptr i64 %3 to i32*
store i32* %4, i32** %2
%5 = load i32*, i32** %2
%6 = call i32 @foo(i32* %5)
%7 = load i32*, i32** %2
%8 = call i32 @bar(i32* %7)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @malloc(i32 100)
%2 = inttoptr i64 %1 to i32*
%3 = tail call i32 @foo(i32* %2)
%4 = tail call i32 @bar(i32* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ symful();
int /*<<< orphan*/ symless();
int main(void) {
  symless();
  symful();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @symless()
%2 = tail call i32 (...) @symful()
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int /*<<< orphan*/ SIG_SETMASK;
int sys_sigprocmask(int /*<<< orphan*/ const *, int /*<<< orphan*/);
int sys_sigsetmask(const sigset_t *set) {
  return sys_sigprocmask(set, SIG_SETMASK);
}


x86 assembly (clang, -O0):
<sys_sigsetmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2ec1(%rip),%rax
mov    (%rax),%esi
call   1030 <sys_sigprocmask@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sys_sigsetmask>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%esi
jmp    1030 <sys_sigprocmask@plt>

LLVM IR (-O0):
@SIG_SETMASK = global i32 0
define i32 @sys_sigsetmask(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* @SIG_SETMASK
%5 = call i32 @sys_sigprocmask(i32* %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SIG_SETMASK = global i32 0
define i32 @sys_sigsetmask(i32* %0) {
%2 = load i32, i32* @SIG_SETMASK
%3 = tail call i32 @sys_sigprocmask(i32* %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void disArrTest(int arr[], int size) {
  for (int i = 0; i < size; i++)
    printf("%d\n", arr[i]);
}


x86 assembly (clang, -O0):
<disArrTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1157 <disArrTest+0x47>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <disArrTest+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<disArrTest>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1145 <disArrTest+0x35>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <disArrTest+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @disArrTest(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i32, i32* %0, i64 %8
%10 = load i32, i32* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Variables and functions */
scalar_t__ Cyc_Character_islower(unsigned char);
int Cyc_Character_isupper(unsigned char);
int Cyc_Character_isalpha(unsigned char c) {
  return Cyc_Character_islower(c) ? 1 : Cyc_Character_isupper(c);
}


x86 assembly (clang, -O0):
<Cyc_Character_isalpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <Cyc_Character_islower@plt>
cmp    $0x0,%rax
je     114e <Cyc_Character_isalpha+0x2e>
mov    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    115a <Cyc_Character_isalpha+0x3a>
movzbl -0x1(%rbp),%edi
call   1040 <Cyc_Character_isupper@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Cyc_Character_isalpha>:
push   %rbx
mov    %edi,%ebx
call   1030 <Cyc_Character_islower@plt>
test   %rax,%rax
je     1134 <Cyc_Character_isalpha+0x14>
mov    $0x1,%eax
pop    %rbx
ret
movzbl %bl,%edi
pop    %rbx
jmp    1040 <Cyc_Character_isupper@plt>

LLVM IR (-O0):
define i32 @Cyc_Character_isalpha(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @Cyc_Character_islower(i8 zeroext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
br label %10
7: ; preds = %1
%8 = load i8, i8* %2
%9 = call i32 @Cyc_Character_isupper(i8 zeroext %8)
br label %10
10: ; preds = %7, %6
%11 = phi i32 [ 1, %6 ], [ %9, %7 ]
ret i32 %11
}

LLVM IR (-O2):
define i32 @Cyc_Character_isalpha(i8 zeroext %0) {
%2 = tail call i64 @Cyc_Character_islower(i8 zeroext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @Cyc_Character_isupper(i8 zeroext %0)
br label %6
6: ; preds = %1, %4
%7 = phi i32 [ %5, %4 ], [ 1, %1 ]
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_epi32(int /*<<< orphan*/, int);
void x(int n) {
  __m128i a;
  a = _mm_slli_epi32(a, n);
}


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

x86 assembly (clang, -O2):
<x>:
mov    %edi,%esi
jmp    1030 <_mm_slli_epi32@plt>

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

LLVM IR (-O2):
define void @x(i32 %0) {
%2 = tail call i32 @_mm_slli_epi32(i32 undef, i32 %0)
ret void
}
/* Variables and functions */
int munlock(void *, unsigned int);
int unlock_memory(void *addr, size_t size) {
  return munlock(addr, (unsigned int)size);
}


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

x86 assembly (clang, -O2):
<unlock_memory>:
jmp    1030 <munlock@plt>

LLVM IR (-O0):
define i32 @unlock_memory(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = trunc i64 %6 to i32
%8 = call i32 @munlock(i8* %5, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @unlock_memory(i8* %0, i64 %1) {
%3 = trunc i64 %1 to i32
%4 = tail call i32 @munlock(i8* %0, i32 %3)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ volatile uint32_t;

/* Variables and functions */
void SysCtlIntEnable(uint32_t ui32Ints) {
  (*((volatile uint32_t *)(0x400FE054))) |= ui32Ints;
}


x86 assembly (clang, -O0):
<SysCtlIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x400fe054,%ecx
mov    (%rcx),%ecx
or     %eax,%ecx
mov    $0x400fe054,%eax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SysCtlIntEnable>:
mov    %edi,-0x4(%rsp)
mov    -0x4(%rsp),%eax
or     %eax,0x400fe054
ret

LLVM IR (-O0):
define void @SysCtlIntEnable(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = load volatile i32, i32* inttoptr (i64 1074782292 to i32*)
%5 = or i32 %4, %3
store volatile i32 %5, i32* inttoptr (i64 1074782292 to i32*)
ret void
}

LLVM IR (-O2):
define void @SysCtlIntEnable(i32 %0) {
%2 = alloca i32
store volatile i32 %0, i32* %2
%3 = load volatile i32, i32* %2
%4 = load volatile i32, i32* inttoptr (i64 1074782292 to i32*)
%5 = or i32 %4, %3
store volatile i32 %5, i32* inttoptr (i64 1074782292 to i32*)
ret void
}
/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, unsigned int, int);
int /*<<< orphan*/ sleep(int);
void bombTimer(unsigned int starter) {
  for (unsigned int i = starter; i > 0; --i) {
    printf("%u - %d\n", i, getpid());
    sleep(1);
  }
}


x86 assembly (clang, -O0):
<bombTimer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jbe    1181 <bombTimer+0x51>
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    -0xc(%rbp),%esi
mov    %eax,%edx
lea    0xe9c(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1141 <bombTimer+0x11>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bombTimer>:
push   %r14
push   %rbx
push   %rax
test   %edi,%edi
je     1172 <bombTimer+0x42>
mov    %edi,%ebx
lea    0xebf(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %r14,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
add    $0xffffffff,%ebx
jne    1150 <bombTimer+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"%u - %d\0A\00"
define void @bombTimer(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %3, label %4
3: ; preds = %4, %1
ret void
4: ; preds = %1, %4
%5 = phi i32 [ %9, %4 ], [ %0, %1 ]
%6 = tail call i32 (...) @getpid()
%7 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
%8 = tail call i32 @sleep(i32 1)
%9 = add i32 %5, -1
%10 = icmp eq i32 %9, 0
br i1 %10, label %3, label %4
}
/* Variables and functions */
int /*<<< orphan*/ EP();
int /*<<< orphan*/ F();
int /*<<< orphan*/ printf(char *);
void E() {
  printf("E -> FE'\n");
  F();
  EP();
}


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"E -> FE'\0A\00"
define void @E() {
%1 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @F()
%3 = call i32 (...) @EP()
ret void
}

LLVM IR (-O2):
@str = [9 x i8] c"E -> FE'\00"
define void @E() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 (...) @F()
%3 = tail call i32 (...) @EP()
ret void
}
long core___core__Float___Object__object_id(double self) {
  long var;
  long var1;
  var1 = (double)self;
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


x86 assembly (clang, -O0):
<core___core__Float___Object__object_id>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
cvttsd2si -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<core___core__Float___Object__object_id>:
cvttsd2si %xmm0,%rax
ret

LLVM IR (-O0):
define i64 @core___core__Float___Object__object_id(double %0) {
%2 = alloca double
%3 = alloca i64
%4 = alloca i64
store double %0, double* %2
%5 = load double, double* %2
%6 = fptosi double %5 to i64
store i64 %6, i64* %4
%7 = load i64, i64* %4
store i64 %7, i64* %3
br label %8
8: ; preds = %1
%9 = load i64, i64* %3
ret i64 %9
}

LLVM IR (-O2):
define i64 @core___core__Float___Object__object_id(double %0) {
%2 = fptosi double %0 to i64
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char const *argv[]) {
  int distance = 100;
  printf("You are %d kilometres away\n", distance);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x64,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xec9(%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    $0x64,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"You are %d kilometres away\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 100, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [28 x i8] c"You are %d kilometres away\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 100)
ret i32 0
}
void _InterlockedExchangeAdd(int *lockedvar, int num) { *lockedvar += num; }


x86 assembly (clang, -O0):
<_InterlockedExchangeAdd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<_InterlockedExchangeAdd>:
add    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @_InterlockedExchangeAdd(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 = load i32, i32* %6
%8 = add nsw i32 %7, %5
store i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @_InterlockedExchangeAdd(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = add nsw i32 %3, %1
store i32 %4, i32* %0
ret void
}
void store(int *p, int q) { *p = q; }


x86 assembly (clang, -O0):
<store>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<store>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @store(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
store i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @store(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
__attribute__((weak)) void PIOC_IrqHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<PIOC_IrqHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <PIOC_IrqHandler+0x9>
jmp    1109 <PIOC_IrqHandler+0x9>

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

LLVM IR (-O0):
define weak void @PIOC_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define weak void @PIOC_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
size_t max(size_t x, size_t y) { return (x > y) ? x : y; }


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1127 <max+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <max+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @max(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ugt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @max(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
int check_pipe(char *ip) {
  if (strstr(ip, "|") != NULL)
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<check_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
je     1142 <check_pipe+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <check_pipe+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_pipe>:
push   %rax
mov    $0x7c,%esi
call   1030 <strchr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @check_pipe(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i32 124)
%3 = icmp ne i8* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint64_t;
typedef scalar_t__ time_t;

/* Variables and functions */
double matlab_timestamp(uint64_t timestamp, time_t local_offset) {
  return 719529 +
         (1e-6 * (double)timestamp + (double)local_offset) / (24 * 60 * 60);
}


x86 assembly (clang, -O0):
<matlab_timestamp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm1
cvtsi2sdq -0x10(%rbp),%xmm0
movsd  0xef0(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  0xed8(%rip),%xmm0
divsd  %xmm0,%xmm1
movsd  0xec4(%rip),%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<matlab_timestamp>:
cvtsi2sd %rdi,%xmm0
cvtsi2sd %rsi,%xmm1
mulsd  0xeee(%rip),%xmm0
addsd  %xmm1,%xmm0
divsd  0xeea(%rip),%xmm0
addsd  0xeea(%rip),%xmm0
ret

LLVM IR (-O0):
define double @matlab_timestamp(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
%7 = load i64, i64* %4
%8 = sitofp i64 %7 to double
%9 = call double @llvm.fmuladd.f64(double 0x3EB0C6F7A0B5ED8D, double %6, double %8)
%10 = fdiv double %9, 8.640000e+04
%11 = fadd double 7.195290e+05, %10
ret double %11
}

LLVM IR (-O2):
define double @matlab_timestamp(i64 %0, i64 %1) {
%3 = sitofp i64 %0 to double
%4 = sitofp i64 %1 to double
%5 = tail call double @llvm.fmuladd.f64(double %3, double 0x3EB0C6F7A0B5ED8D, double %4)
%6 = fdiv double %5, 8.640000e+04
%7 = fadd double %6, 7.195290e+05
ret double %7
}
int main() {
  union {
    void *p0;
    struct {
      char c[2];
      void *p1;
      void *p2;
    } str;
  } data;
  data.p0 = malloc(37U);
  data.str.p2 = &data;
  void *ptr = data.p0;
  data.str.c[1] = sizeof data.str.p1;
  free(data.p0);
  free(ptr);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x25,%edi
call   1040 <malloc@plt>
mov    %rax,-0x20(%rbp)
lea    -0x20(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
movb   $0x8,-0x1f(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    $0x25,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%rax
mov    %rax,0x18(%rsp)
movb   $0x8,0x9(%rsp)
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
call   1030 <free@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
%union.anon = type { %struct.anon }
%struct.anon = type { [2 x i8], i8*, i8* }
define i32 @main() {
%1 = alloca %union.anon
%2 = getelementptr inbounds %union.anon, %union.anon* %1, i64 0, i32 0, i32 0, i64 0
%3 = tail call dereferenceable_or_null(37) i8* @malloc(i64 37)
%4 = bitcast %union.anon* %1 to i8**
store i8* %3, i8** %4
%5 = getelementptr inbounds %union.anon, %union.anon* %1, i64 0, i32 0, i32 2
store i8* %2, i8** %5
%6 = getelementptr inbounds %union.anon, %union.anon* %1, i64 0, i32 0, i32 0, i64 1
store i8 8, i8* %6
%7 = load i8*, i8** %4
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __emit_string_literal_range(char *, int, int, int);
void test_stringified_token_3(int x) {
  __emit_string_literal_range("123456789", 2, 2, 3);
}


x86 assembly (clang, -O0):
<test_stringified_token_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xede(%rip),%rdi
mov    $0x2,%edx
mov    $0x3,%ecx
mov    %edx,%esi
call   1030 <__emit_string_literal_range@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_stringified_token_3>:
lea    0xee9(%rip),%rdi
mov    $0x2,%esi
mov    $0x2,%edx
mov    $0x3,%ecx
jmp    1030 <__emit_string_literal_range@plt>

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

LLVM IR (-O2):
@.str = [10 x i8] c"123456789\00"
define void @test_stringified_token_3(i32 %0) {
%2 = tail call i32 @__emit_string_literal_range(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 2, i32 2, i32 3)
ret void
}
unsigned getbits(unsigned x, int p, int n) {
  return (x >> (p + 1 - n) & ~(~0 << n));
}


x86 assembly (clang, -O0):
<getbits>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x1,%ecx
sub    -0xc(%rbp),%ecx
shr    %cl,%eax
mov    -0xc(%rbp),%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getbits>:
sub    %edx,%esi
lea    0x1(%rsi),%ecx
shr    %cl,%edi
mov    $0xffffffff,%eax
mov    %edx,%ecx
shl    %cl,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @getbits(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 %8, 1
%10 = load i32, i32* %6
%11 = sub nsw i32 %9, %10
%12 = lshr i32 %7, %11
%13 = load i32, i32* %6
%14 = shl i32 -1, %13
%15 = xor i32 %14, -1
%16 = and i32 %12, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @getbits(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, 1
%5 = sub i32 %4, %2
%6 = lshr i32 %0, %5
%7 = shl nsw i32 -1, %2
%8 = xor i32 %7, -1
%9 = and i32 %6, %8
ret i32 %9
}
int f4(char c, int i) { ; }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @f4(i8 signext %0, i32 %1) {
ret i32 undef
}
const char *unqlite_lib_signature(void) { return "unqlite/1.1.1"; }


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"unqlite/1.1.1\00"
define i8* @unqlite_lib_signature() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [14 x i8] c"unqlite/1.1.1\00"
define i8* @unqlite_lib_signature() {
ret i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int, int, int);
int main() {
  int i, startNum, endNum;
  int sum;
  sum = 0;
  startNum = 1;
  endNum = 100;
  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   $0x1,-0xc(%rbp)
movl   $0x64,-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    $0x1,%esi
mov    $0x2,%edx
mov    $0x63,%ecx
mov    $0x64,%r8d
mov    $0x13ba,%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 1, i32* %3
store i32 100, 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 1, i32 2, i32 99, i32 100, i32 5050)
ret i32 0
}
void rpm_sysfs_remove(struct device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define void @rpm_sysfs_remove(%struct.device* nocapture %0) {
ret void
}
void X509_EXTENSION_set_object(void) {}


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

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

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

LLVM IR (-O2):
define void @X509_EXTENSION_set_object() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned int);
int /*<<< orphan*/ put8(int);
void mov_reg32_preg32x4pimm32(int reg1, int reg2, unsigned int imm32) {
  put8(0x8B);
  put8((reg1 << 3) | 4);
  put8(0x80 | (reg2 << 3) | 5);
  put32(imm32);
}


x86 assembly (clang, -O0):
<mov_reg32_preg32x4pimm32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    $0x8b,%edi
call   1030 <put8@plt>
mov    -0x4(%rbp),%edi
shl    $0x3,%edi
or     $0x4,%edi
call   1030 <put8@plt>
mov    -0x8(%rbp),%edi
shl    $0x3,%edi
or     $0x80,%edi
or     $0x5,%edi
call   1030 <put8@plt>
mov    -0xc(%rbp),%edi
call   1040 <put32@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mov_reg32_preg32x4pimm32>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
mov    $0x8b,%edi
call   1030 <put8@plt>
lea    0x4(,%rbx,8),%edi
call   1030 <put8@plt>
shl    $0x3,%ebp
or     $0x85,%ebp
mov    %ebp,%edi
call   1030 <put8@plt>
mov    %r14d,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @mov_reg32_preg32x4pimm32(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 = call i32 @put8(i32 139)
%8 = load i32, i32* %4
%9 = shl i32 %8, 3
%10 = or i32 %9, 4
%11 = call i32 @put8(i32 %10)
%12 = load i32, i32* %5
%13 = shl i32 %12, 3
%14 = or i32 128, %13
%15 = or i32 %14, 5
%16 = call i32 @put8(i32 %15)
%17 = load i32, i32* %6
%18 = call i32 @put32(i32 %17)
ret void
}

LLVM IR (-O2):
define void @mov_reg32_preg32x4pimm32(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @put8(i32 139)
%5 = shl i32 %0, 3
%6 = or i32 %5, 4
%7 = tail call i32 @put8(i32 %6)
%8 = shl i32 %1, 3
%9 = or i32 %8, 133
%10 = tail call i32 @put8(i32 %9)
%11 = tail call i32 @put32(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _I8080_XRI();
void do0xEE() { _I8080_XRI(); }


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

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

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

LLVM IR (-O2):
define void @do0xEE() {
%1 = tail call i32 (...) @_I8080_XRI()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char const *, unsigned int);
char *xmalloc(unsigned int);
char *xstrndup(const char *str, unsigned int length) {
  char *result;
  result = xmalloc(length + 1);
  if (length > 0)
    strncpy(result, str, length);
  result[length] = '\0';
  return result;
}


x86 assembly (clang, -O0):
<xstrndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <xmalloc@plt>
mov    %rax,-0x18(%rbp)
cmpl   $0x0,-0xc(%rbp)
jbe    1158 <xstrndup+0x38>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstrndup>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %rdi,%r15
lea    0x1(%rbx),%edi
call   1040 <xmalloc@plt>
mov    %rax,%r14
test   %ebx,%ebx
je     1146 <xstrndup+0x26>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1030 <strncpy@plt>
mov    %ebx,%eax
movb   $0x0,(%r14,%rax,1)
mov    %r14,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @xstrndup(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
store i8* %0, i8** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = add i32 %6, 1
%8 = call i8* @xmalloc(i32 %7)
store i8* %8, i8** %5
%9 = load i32, i32* %4
%10 = icmp ugt i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %2
%12 = load i8*, i8** %5
%13 = load i8*, i8** %3
%14 = load i32, i32* %4
%15 = call i32 @strncpy(i8* %12, i8* %13, i32 %14)
br label %16
16: ; preds = %11, %2
%17 = load i8*, i8** %5
%18 = load i32, i32* %4
%19 = zext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
store i8 0, i8* %20
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
define i8* @xstrndup(i8* %0, i32 %1) {
%3 = add i32 %1, 1
%4 = tail call i8* @xmalloc(i32 %3)
%5 = icmp eq i32 %1, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @strncpy(i8* %4, i8* %0, i32 %1)
br label %8
8: ; preds = %6, %2
%9 = zext i32 %1 to i64
%10 = getelementptr inbounds i8, i8* %4, i64 %9
store i8 0, i8* %10
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_usage(char *file) {
  printf("Usage:\n");
  printf("%s <r8 | r16 | r32> <phy addr> [num]\n", file);
  printf("%s <w8 | w16 |w32> <phy addr> <val>\n", file);
}


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

x86 assembly (clang, -O2):
<print_usage>:
push   %rbx
mov    %rdi,%rbx
lea    0xf20(%rip),%rdi
call   1030 <puts@plt>
lea    0xec9(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xede(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"Usage:\0A\00"
@.str.1 = [38 x i8] c"%s <r8 | r16 | r32> <phy addr> [num]\0A\00"
@.str.2 = [37 x i8] c"%s <w8 | w16 |w32> <phy addr> <val>\0A\00"
define void @print_usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %6)
ret void
}

LLVM IR (-O2):
@.str.1 = [38 x i8] c"%s <r8 | r16 | r32> <phy addr> [num]\0A\00"
@.str.2 = [37 x i8] c"%s <w8 | w16 |w32> <phy addr> <val>\0A\00"
@str = [7 x i8] c"Usage:\00"
define void @print_usage(i8* %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %0)
ret void
}
int stupid_hash(void *elem) {
  int e = *(int *)elem;
  return 5741 * e;
}


x86 assembly (clang, -O0):
<stupid_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
imul   $0x166d,-0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stupid_hash>:
imul   $0x166d,(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @stupid_hash(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to i32*
%6 = load i32, i32* %5
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = mul nsw i32 5741, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @stupid_hash(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = mul nsw i32 %3, 5741
ret i32 %4
}