xunge/DecIR huggingface dataset:
AR0A1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{
  if ((p0[10000000]) <= (*((int *)11111111)))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0A1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    0x2625a00(%rax),%eax
mov    $0xa98ac7,%ecx
cmp    (%rcx),%eax
jg     113b <AR0A1+0x3b>
movl   $0x1,-0x4(%rbp)
jmp    1142 <AR0A1+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0A1>:
mov    0x2625a00(%r8),%ecx
xor    %eax,%eax
cmp    0xa98ac7,%ecx
setle  %al
ret

LLVM IR (-O0):
define i32 @AR0A1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %12
%15 = getelementptr inbounds i32, i32* %14, i64 10000000
%16 = load i32, i32* %15
%17 = load i32, i32* inttoptr (i64 11111111 to i32*)
%18 = icmp sle i32 %16, %17
br i1 %18, label %19, label %20
19: ; preds = %6
store i32 1, i32* %7
br label %21
20: ; preds = %6
store i32 0, i32* %7
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %7
ret i32 %22
}

LLVM IR (-O2):
define i32 @AR0A1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture %4, i32* nocapture readnone %5) {
%7 = getelementptr inbounds i32, i32* %4, i64 10000000
%8 = load i32, i32* %7
%9 = load i32, i32* inttoptr (i64 11111111 to i32*)
%10 = icmp sle i32 %8, %9
%11 = zext i1 %10 to i32
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ SetMemPatchable(unsigned char *, int);
void DoGatePatch(unsigned char *target, void *callback) {
  SetMemPatchable(target, 20);
  target[0] = 0xFF;
  target[1] = 0x25;
  *(void **)(&target[2]) = callback;
}


x86 assembly (clang, -O0):
<DoGatePatch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x14,%esi
call   1030 <SetMemPatchable@plt>
mov    -0x8(%rbp),%rax
movb   $0xff,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x25,0x1(%rax)
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,0x2(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DoGatePatch>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x14,%esi
call   1030 <SetMemPatchable@plt>
movw   $0x25ff,(%rbx)
mov    %r14,0x2(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @DoGatePatch(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = call i32 @SetMemPatchable(i8* %5, i32 20)
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
store i8 -1, i8* %8
%9 = load i8*, i8** %3
%10 = getelementptr inbounds i8, i8* %9, i64 1
store i8 37, i8* %10
%11 = load i8*, i8** %4
%12 = load i8*, i8** %3
%13 = getelementptr inbounds i8, i8* %12, i64 2
%14 = bitcast i8* %13 to i8**
store i8* %11, i8** %14
ret void
}

LLVM IR (-O2):
define void @DoGatePatch(i8* %0, i8* %1) {
%3 = tail call i32 @SetMemPatchable(i8* %0, i32 20)
store i8 -1, i8* %0
%4 = getelementptr inbounds i8, i8* %0, i64 1
store i8 37, i8* %4
%5 = getelementptr inbounds i8, i8* %0, i64 2
%6 = bitcast i8* %5 to i8**
store i8* %1, i8** %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void qfits_memory_fdealloc(void *ptr, size_t offs, size_t size,
                           const char *filename, int lineno) {
  free(ptr);
}


x86 assembly (clang, -O0):
<qfits_memory_fdealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qfits_memory_fdealloc>:
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @qfits_memory_fdealloc(i8* %0, i64 %1, i64 %2, i8* %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8*
%10 = alloca i32
store i8* %0, i8** %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i8* %3, i8** %9
store i32 %4, i32* %10
%11 = load i8*, i8** %6
%12 = call i32 @free(i8* %11)
ret void
}

LLVM IR (-O2):
define void @qfits_memory_fdealloc(i8* nocapture %0, i64 %1, i64 %2, i8* nocapture readnone %3, i32 %4) {
%6 = tail call i32 @free(i8* %0)
ret void
}
int mlx5e_ipsec_get_count(struct mlx5e_priv *priv) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.mlx5e_priv = type opaque
define i32 @mlx5e_ipsec_get_count(%struct.mlx5e_priv* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int ue(unsigned char const *, int, int, int *);
unsigned int read_ue(const unsigned char *buffer, int *bits_offset,
                     int *total_bits) {
  int val, bits;
  val = ue(buffer, *bits_offset, *total_bits, &bits);
  *bits_offset += bits;
  *total_bits -= bits;
  return val;
}


x86 assembly (clang, -O0):
<read_ue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
lea    -0x20(%rbp),%rcx
call   1030 <ue@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%edx
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
sub    %edx,%ecx
mov    %ecx,(%rax)
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_ue>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rsi,%rbx
mov    (%rsi),%esi
mov    (%rdx),%edx
lea    0x4(%rsp),%rcx
call   1030 <ue@plt>
mov    0x4(%rsp),%ecx
add    %ecx,(%rbx)
sub    %ecx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @read_ue(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%9 = load i8*, i8** %4
%10 = load i32*, i32** %5
%11 = load i32, i32* %10
%12 = load i32*, i32** %6
%13 = load i32, i32* %12
%14 = call i32 @ue(i8* %9, i32 %11, i32 %13, i32* %8)
store i32 %14, i32* %7
%15 = load i32, i32* %8
%16 = load i32*, i32** %5
%17 = load i32, i32* %16
%18 = add nsw i32 %17, %15
store i32 %18, i32* %16
%19 = load i32, i32* %8
%20 = load i32*, i32** %6
%21 = load i32, i32* %20
%22 = sub nsw i32 %21, %19
store i32 %22, i32* %20
%23 = load i32, i32* %7
ret i32 %23
}

LLVM IR (-O2):
define i32 @read_ue(i8* %0, i32* nocapture %1, i32* nocapture %2) {
%4 = alloca i32
%5 = bitcast i32* %4 to i8*
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @ue(i8* %0, i32 %6, i32 %7, i32* %4)
%9 = load i32, i32* %4
%10 = load i32, i32* %1
%11 = add nsw i32 %10, %9
store i32 %11, i32* %1
%12 = load i32, i32* %2
%13 = sub nsw i32 %12, %9
store i32 %13, i32* %2
ret i32 %8
}
void empty(void) {}


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

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

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

LLVM IR (-O2):
define void @empty() {
ret void
}
int egsy_gcm_csr_dataout0_set(unsigned int dev_id,
                              union egsy_gcm_csr_dataout0_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<egsy_gcm_csr_dataout0_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.egsy_gcm_csr_dataout0_u = type opaque
define i32 @egsy_gcm_csr_dataout0_set(i32 %0, %union.egsy_gcm_csr_dataout0_u* %1) {
%3 = alloca i32
%4 = alloca %union.egsy_gcm_csr_dataout0_u*
store i32 %0, i32* %3
store %union.egsy_gcm_csr_dataout0_u* %1, %union.egsy_gcm_csr_dataout0_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.egsy_gcm_csr_dataout0_u = type opaque
define i32 @egsy_gcm_csr_dataout0_set(i32 %0, %union.egsy_gcm_csr_dataout0_u* nocapture readnone %1) {
ret i32 1
}
void CtpForwardingEngineP$0$CtpInfo$recomputeRoutes(void) {
  CtpRoutingEngineP$0$CtpInfo$recomputeRoutes();
}


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

x86 assembly (clang, -O2):
<CtpForwardingEngineP$0$CtpInfo$recomputeRoutes>:
xor    %eax,%eax
jmp    1030 <CtpRoutingEngineP$0$CtpInfo$recomputeRoutes@plt>

LLVM IR (-O0):
define void @"CtpForwardingEngineP$0$CtpInfo$recomputeRoutes"() {
%1 = call i32 (...) @"CtpRoutingEngineP$0$CtpInfo$recomputeRoutes"()
ret void
}

LLVM IR (-O2):
define void @"CtpForwardingEngineP$0$CtpInfo$recomputeRoutes"() {
%1 = tail call i32 (...) @"CtpRoutingEngineP$0$CtpInfo$recomputeRoutes"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void emit_help(void) {
  fprintf(stderr, "Usage: FIXME TODO\n");
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<emit_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<emit_help>:
push   %rax
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Usage: FIXME TODO\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = call i32 @exit(i32 %3)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Usage: FIXME TODO\0A\00"
@EX_USAGE = global i32 0
define void @emit_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EX_USAGE
%4 = tail call i32 @exit(i32 %3)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int /*<<< orphan*/ tm_sec;
  int /*<<< orphan*/ tm_min;
  int /*<<< orphan*/ tm_hour;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void io_time(void) {
  time_t t;
  struct tm *s;
  time(&t);
  s = localtime(&t);
  lua_pushnumber(s->tm_hour);
  lua_pushnumber(s->tm_min);
  lua_pushnumber(s->tm_sec);
}


x86 assembly (clang, -O0):
<io_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
call   1040 <time@plt>
lea    -0x4(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%edi
call   1050 <lua_pushnumber@plt>
mov    -0x10(%rbp),%rax
mov    0x4(%rax),%edi
call   1050 <lua_pushnumber@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1050 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<io_time>:
push   %rbx
sub    $0x10,%rsp
lea    0xc(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <time@plt>
mov    %rbx,%rdi
call   1030 <localtime@plt>
mov    %rax,%rbx
mov    0x8(%rax),%edi
call   1050 <lua_pushnumber@plt>
mov    0x4(%rbx),%edi
call   1050 <lua_pushnumber@plt>
mov    (%rbx),%edi
call   1050 <lua_pushnumber@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.tm = type { i32, i32, i32 }
define void @io_time() {
%1 = alloca i32
%2 = alloca %struct.tm*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
store %struct.tm* %4, %struct.tm** %2
%5 = load %struct.tm*, %struct.tm** %2
%6 = getelementptr inbounds %struct.tm, %struct.tm* %5, i32 0, i32 2
%7 = load i32, i32* %6
%8 = call i32 @lua_pushnumber(i32 %7)
%9 = load %struct.tm*, %struct.tm** %2
%10 = getelementptr inbounds %struct.tm, %struct.tm* %9, i32 0, i32 1
%11 = load i32, i32* %10
%12 = call i32 @lua_pushnumber(i32 %11)
%13 = load %struct.tm*, %struct.tm** %2
%14 = getelementptr inbounds %struct.tm, %struct.tm* %13, i32 0, i32 0
%15 = load i32, i32* %14
%16 = call i32 @lua_pushnumber(i32 %15)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32, i32, i32 }
define void @io_time() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @time(i32* %1)
%4 = call %struct.tm* @localtime(i32* %1)
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 2
%6 = load i32, i32* %5
%7 = call i32 @lua_pushnumber(i32 %6)
%8 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 1
%9 = load i32, i32* %8
%10 = call i32 @lua_pushnumber(i32 %9)
%11 = getelementptr inbounds %struct.tm, %struct.tm* %4, i64 0, i32 0
%12 = load i32, i32* %11
%13 = call i32 @lua_pushnumber(i32 %12)
ret void
}
void barrier(void) { asm volatile("" : : : "memory"); }


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

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

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

LLVM IR (-O2):
define void @barrier() {
tail call void asm sideeffect "", "~{memory},~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Type definitions */
struct iio_context {
  int dummy;
};

/* Variables and functions */
char *getenv(char *);
struct iio_context *iio_create_local_context();
struct iio_context *iio_create_default_context(void) {
  char *hostname = getenv("IIOD_REMOTE");
  if (hostname) {
  }
  return iio_create_local_context();
}


x86 assembly (clang, -O0):
<iio_create_default_context>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <getenv@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1148 <iio_create_default_context+0x28>
jmp    1148 <iio_create_default_context+0x28>
mov    $0x0,%al
call   1040 <iio_create_local_context@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<iio_create_default_context>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <getenv@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <iio_create_local_context@plt>

LLVM IR (-O0):
%struct.iio_context = type { i32 }
@.str = [12 x i8] c"IIOD_REMOTE\00"
define %struct.iio_context* @iio_create_default_context() {
%1 = alloca i8*
%2 = call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %6
5: ; preds = %0
br label %6
6: ; preds = %5, %0
%7 = call %struct.iio_context* (...) @iio_create_local_context()
ret %struct.iio_context* %7
}

LLVM IR (-O2):
%struct.iio_context = type { i32 }
@.str = [12 x i8] c"IIOD_REMOTE\00"
define %struct.iio_context* @iio_create_default_context() {
%1 = tail call i8* @getenv(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call %struct.iio_context* (...) @iio_create_local_context()
ret %struct.iio_context* %2
}
/* Type definitions */
struct defmodule {
  int dummy;
};

/* Variables and functions */
scalar_t__ EnvFindDefmodule(void *, char *);
int /*<<< orphan*/ EnvFocus(void *, void *);
void ClearDefrules(void *theEnv) {
  struct defmodule *theModule;
  theModule = (struct defmodule *)EnvFindDefmodule(theEnv, "MAIN");
  EnvFocus(theEnv, (void *)theModule);
}


x86 assembly (clang, -O0):
<ClearDefrules>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xec9(%rip),%rsi
call   1040 <EnvFindDefmodule@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <EnvFocus@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearDefrules>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rsi
call   1040 <EnvFindDefmodule@plt>
mov    %rbx,%rdi
mov    %rax,%rsi
pop    %rbx
jmp    1030 <EnvFocus@plt>

LLVM IR (-O0):
%struct.defmodule = type { i32 }
@.str = [5 x i8] c"MAIN\00"
define void @ClearDefrules(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.defmodule*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @EnvFindDefmodule(i8* %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%6 = inttoptr i64 %5 to %struct.defmodule*
store %struct.defmodule* %6, %struct.defmodule** %3
%7 = load i8*, i8** %2
%8 = load %struct.defmodule*, %struct.defmodule** %3
%9 = bitcast %struct.defmodule* %8 to i8*
%10 = call i32 @EnvFocus(i8* %7, i8* %9)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"MAIN\00"
define void @ClearDefrules(i8* %0) {
%2 = tail call i64 @EnvFindDefmodule(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%3 = inttoptr i64 %2 to i8*
%4 = tail call i32 @EnvFocus(i8* %0, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ puts(char *);
void printUsage(const char *prog) {
  puts("");
  printf("Usage: %s [po po ... ]\n", prog);
  puts("    where po == port number to be queried\n"
       "    po has range [1..7]\n"
       "    A port is the connector cabled to a sensor board.");
  printf("    Example: %s 1 2 3 4 5 6 7\n\n", prog);
  exit(1);
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xf6c(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rsi
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
lea    0xeb9(%rip),%rdi
call   1030 <puts@plt>
mov    -0x8(%rbp),%rsi
lea    0xf21(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<printUsage>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeab(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
lea    0xeb4(%rip),%rdi
call   1040 <puts@plt>
lea    0xf20(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [24 x i8] c"Usage: %s [po po ... ]\0A\00"
@.str.2 = [120 x i8] c" where po == port number to be queried\0A po has range [1..7]\0A A port is the connector cabled to a sensor board.\00"
@.str.3 = [32 x i8] c" Example: %s 1 2 3 4 5 6 7\0A\0A\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @puts(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%6 = call i32 @puts(i8* getelementptr inbounds ([120 x i8], [120 x i8]* @.str.2, i64 0, i64 0))
%7 = load i8*, i8** %2
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %7)
%9 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str.1 = [24 x i8] c"Usage: %s [po po ... ]\0A\00"
@.str.2 = [120 x i8] c" where po == port number to be queried\0A po has range [1..7]\0A A port is the connector cabled to a sensor board.\00"
@.str.3 = [32 x i8] c" Example: %s 1 2 3 4 5 6 7\0A\0A\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @putchar(i32 10)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([120 x i8], [120 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%6 = tail call i32 @exit(i32 1)
unreachable
}
void defer_compaction(struct zone *zone, int order) {}


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

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

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

LLVM IR (-O2):
%struct.zone = type opaque
define void @defer_compaction(%struct.zone* nocapture %0, i32 %1) {
ret void
}
int test_imm_5Dint8_reg(signed char val) {
  return ((val) & (0x5D << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_5Dint8_reg(i8 signext %0) {
%2 = and i8 %0, 93
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int main1() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @main1() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ execlp(char *, char *, int /*<<< orphan*/ *);
int main() {
  execlp("top", "top", NULL);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"top\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @execlp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* null)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"top\00"
define i32 @main() {
%1 = tail call i32 @execlp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32* null)
ret i32 0
}
int poly(int j) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @poly(i32 %0) {
ret i32 0
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMR69_set(void) { return U_WMRCORENONE_set("U_WMR69"); }


x86 assembly (clang, -O0):
<U_WMR69_set>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <U_WMRCORENONE_set@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMR69\00"
define i8* @U_WMR69_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMR69\00"
define i8* @U_WMR69_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
int ffs(unsigned int input) {
  int bit;
  if (input == 0) {
    return 0;
  }
  for (bit = 1; !(input & 1); bit++) {
    input >>= 1;
  }
  return bit;
}


x86 assembly (clang, -O0):
<ffs>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    111d <ffs+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    115c <ffs+0x5c>
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    $0x1,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    113f <ffs+0x3f>
jmp    1156 <ffs+0x56>
mov    -0x8(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1124 <ffs+0x24>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ffs>:
test   %edi,%edi
je     112e <ffs+0x2e>
mov    $0x1,%eax
test   $0x1,%dil
jne    112d <ffs+0x2d>
mov    $0x1,%eax
mov    %edi,%ecx
cs nopw 0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
test   $0x2,%dil
mov    %ecx,%edi
je     1120 <ffs+0x20>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ffs(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %13, label %3
3: ; preds = %1
%4 = and i32 %0, 1
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %13
6: ; preds = %3, %6
%7 = phi i32 [ %10, %6 ], [ 1, %3 ]
%8 = phi i32 [ %9, %6 ], [ %0, %3 ]
%9 = lshr i32 %8, 1
%10 = add nuw nsw i32 %7, 1
%11 = and i32 %8, 2
%12 = icmp eq i32 %11, 0
br i1 %12, label %6, label %13
13: ; preds = %6, %3, %1
%14 = phi i32 [ 0, %1 ], [ 1, %3 ], [ %10, %6 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_attr_t;

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int pthread_attr_init(int /*<<< orphan*/ *);
void attr_init(pthread_attr_t *attr) {
  int err = pthread_attr_init(attr);
  if (err != 0) {
    perror("pthread_attr_init");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<attr_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <pthread_attr_init@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     116c <attr_init+0x3c>
lea    0xea7(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e7b(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<attr_init>:
push   %rax
call   1030 <pthread_attr_init@plt>
test   %eax,%eax
jne    113c <attr_init+0xc>
pop    %rax
ret
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@.str = [18 x i8] c"pthread_attr_init\00"
@EXIT_FAILURE = global i32 0
define void @attr_init(i32* %0) {
%2 = tail call i32 @pthread_attr_init(i32* %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ deletesprite(int);
int popNumber();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basDeleteSprite() {
  int n;
  n = popNumber();
  pushNumber(deletesprite(n));
}


x86 assembly (clang, -O0):
<basDeleteSprite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1050 <popNumber@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <deletesprite@plt>
mov    %eax,%edi
call   1030 <pushNumber@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<basDeleteSprite>:
push   %rax
xor    %eax,%eax
call   1050 <popNumber@plt>
mov    %eax,%edi
call   1040 <deletesprite@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <pushNumber@plt>

LLVM IR (-O0):
define void @basDeleteSprite() {
%1 = alloca i32
%2 = call i32 (...) @popNumber()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @deletesprite(i32 %3)
%5 = call i32 @pushNumber(i32 %4)
ret void
}

LLVM IR (-O2):
define void @basDeleteSprite() {
%1 = tail call i32 (...) @popNumber()
%2 = tail call i32 @deletesprite(i32 %1)
%3 = tail call i32 @pushNumber(i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ Pe();
scalar_t__ PintegerToken();
PscaledInteger() {
  int b = -1;
  ;
  b = PintegerToken() || Pe();
  return (b);
}


x86 assembly (clang, -O0):
<PscaledInteger>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0xffffffff,-0x4(%rbp)
mov    $0x0,%al
call   1030 <PintegerToken@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x5(%rbp)
jne    1159 <PscaledInteger+0x39>
mov    $0x0,%al
call   1040 <Pe@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PscaledInteger>:
push   %rax
xor    %eax,%eax
call   1030 <PintegerToken@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <PscaledInteger+0x17>
pop    %rcx
ret
xor    %eax,%eax
call   1040 <Pe@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret

LLVM IR (-O0):
define i32 @PscaledInteger() {
%1 = alloca i32
store i32 -1, i32* %1
%2 = call i64 (...) @PintegerToken()
%3 = icmp ne i64 %2, 0
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = call i64 (...) @Pe()
%6 = icmp ne i64 %5, 0
br label %7
7: ; preds = %4, %0
%8 = phi i1 [ true, %0 ], [ %6, %4 ]
%9 = zext i1 %8 to i32
store i32 %9, i32* %1
%10 = load i32, i32* %1
ret i32 %10
}

LLVM IR (-O2):
define i32 @PscaledInteger() {
%1 = tail call i64 (...) @PintegerToken()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i64 (...) @Pe()
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 1, %0 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main(void) {
  int a, b, c;
  printf("Enter a two digit number: ");
  scanf("%d", &a);
  b = a / 10;
  c = a % 10;
  printf("Reversed: %d%d\n", c, b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed7(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %edx,-0x10(%rbp)
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xea8(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee5(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rsi
imul   $0x66666667,%rsi,%rdx
mov    %rdx,%rax
shr    $0x3f,%rax
sar    $0x22,%rdx
add    %eax,%edx
lea    (%rdx,%rdx,1),%eax
lea    (%rax,%rax,4),%eax
sub    %eax,%esi
lea    0xeb6(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Enter a two digit number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"Reversed: %d%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %2
%8 = sdiv i32 %7, 10
store i32 %8, i32* %3
%9 = load i32, i32* %2
%10 = srem i32 %9, 10
store i32 %10, i32* %4
%11 = load i32, i32* %4
%12 = load i32, i32* %3
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %11, i32 %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"Enter a two digit number: \00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [16 x i8] c"Reversed: %d%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = sdiv i32 %5, 10
%7 = srem i32 %5, 10
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %6)
ret i32 0
}
const char *ccnxPortalAbout_LongNotice(void) {
  return "Copyright (c) 2017 Cisco and/or its affiliates.\nLicensed under the "
         "Apache License, Version 2.0 (the \"License\");\nyou may not use this "
         "file except in compliance with the License.\nYou may obtain a copy "
         "of the License at:\n\n    "
         "http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by "
         "applicable law or agreed to in writing, software\ndistributed under "
         "the License is distributed on an \"AS IS\" BASIS,\nWITHOUT "
         "WARRANTIES OR CONDITIONS OF ANY KIND, either express or "
         "implied.\nSee the License for the specific language governing "
         "permissions and\nlimitations under the License.\n";
}


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

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

LLVM IR (-O0):
@.str = [574 x i8] c"Copyright (c) 2017 Cisco and/or its affiliates.\0ALicensed under the Apache License, Version 2.0 (the \22License\22);\0Ayou may not use this file except in compliance with the License.\0AYou may obtain a copy of the License at:\0A\0A http://www.apache.org/licenses/LICENSE-2.0\0A\0AUnless required by applicable law or agreed to in writing, software\0Adistributed under the License is distributed on an \22AS IS\22 BASIS,\0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\0ASee the License for the specific language governing permissions and\0Alimitations under the License.\0A\00"
define i8* @ccnxPortalAbout_LongNotice() {
ret i8* getelementptr inbounds ([574 x i8], [574 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [574 x i8] c"Copyright (c) 2017 Cisco and/or its affiliates.\0ALicensed under the Apache License, Version 2.0 (the \22License\22);\0Ayou may not use this file except in compliance with the License.\0AYou may obtain a copy of the License at:\0A\0A http://www.apache.org/licenses/LICENSE-2.0\0A\0AUnless required by applicable law or agreed to in writing, software\0Adistributed under the License is distributed on an \22AS IS\22 BASIS,\0AWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\0ASee the License for the specific language governing permissions and\0Alimitations under the License.\0A\00"
define i8* @ccnxPortalAbout_LongNotice() {
ret i8* getelementptr inbounds ([574 x i8], [574 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
int b_read(int, char *, int);
unsigned int b_seek(int, unsigned int, int /*<<< orphan*/);
int b_seek_read(unsigned int offset, char *buf, int len) {
  if (b_seek(1, offset, SEEK_SET) != offset)
    return -1;
  return b_read(1, buf, len);
}


x86 assembly (clang, -O0):
<b_seek_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%esi
mov    0x2ea4(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
call   1040 <b_seek@plt>
cmp    -0x8(%rbp),%eax
je     115d <b_seek_read+0x3d>
movl   $0xffffffff,-0x4(%rbp)
jmp    1171 <b_seek_read+0x51>
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x1,%edi
call   1030 <b_read@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_seek_read>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    0x2ead(%rip),%rax
mov    (%rax),%edx
mov    $0x1,%edi
mov    %ebp,%esi
call   1040 <b_seek@plt>
cmp    %ebp,%eax
jne    1159 <b_seek_read+0x39>
mov    $0x1,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <b_read@plt>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@SEEK_SET = global i32 0
define i32 @b_seek_read(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 i32, i32* @SEEK_SET
%10 = call i32 @b_seek(i32 1, i32 %8, i32 %9)
%11 = load i32, i32* %5
%12 = icmp ne i32 %10, %11
br i1 %12, label %13, label %14
13: ; preds = %3
store i32 -1, i32* %4
br label %18
14: ; preds = %3
%15 = load i8*, i8** %6
%16 = load i32, i32* %7
%17 = call i32 @b_read(i32 1, i8* %15, i32 %16)
store i32 %17, i32* %4
br label %18
18: ; preds = %14, %13
%19 = load i32, i32* %4
ret i32 %19
}

LLVM IR (-O2):
@SEEK_SET = global i32 0
define i32 @b_seek_read(i32 %0, i8* %1, i32 %2) {
%4 = load i32, i32* @SEEK_SET
%5 = tail call i32 @b_seek(i32 1, i32 %0, i32 %4)
%6 = icmp eq i32 %5, %0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @b_read(i32 1, i8* %1, i32 %2)
br label %9
9: ; preds = %3, %7
%10 = phi i32 [ %8, %7 ], [ -1, %3 ]
ret i32 %10
}
void integrator_part2() {}


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

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

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

LLVM IR (-O2):
define void @integrator_part2() {
ret void
}
int f(__builtin_va_list l) { __builtin_va_end(l); }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i32 @f(%struct.__va_list_tag* %0) {
%2 = alloca i32
%3 = alloca %struct.__va_list_tag*
store %struct.__va_list_tag* %0, %struct.__va_list_tag** %3
%4 = load %struct.__va_list_tag*, %struct.__va_list_tag** %3
%5 = bitcast %struct.__va_list_tag* %4 to i8*
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
%struct.__va_list_tag = type { i32, i32, i8*, i8* }
define i32 @f(%struct.__va_list_tag* %0) {
%2 = bitcast %struct.__va_list_tag* %0 to i8*
tail call void @llvm.va_end(i8* %2)
ret i32 undef
}
void __libc_fatal(message) const char *message;
{ abort(); }


x86 assembly (clang, -O0):
<__libc_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__libc_fatal>:
push   %rax
call   1030 <abort@plt>

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

LLVM IR (-O2):
define void @__libc_fatal(i8* nocapture readnone %0) {
tail call void @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ ExecCfg(char *);
void SoftDlgProc(void) { ExecCfg("CFG"); }


x86 assembly (clang, -O0):
<SoftDlgProc>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <ExecCfg@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"CFG\00"
define void @SoftDlgProc() {
%1 = call i32 @ExecCfg(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"CFG\00"
define void @SoftDlgProc() {
%1 = tail call i32 @ExecCfg(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
int nnrk(int a, int b) { return ~(a & b) ? 23 : 42; }


x86 assembly (clang, -O0):
<nnrk>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edx
and    -0x8(%rbp),%edx
xor    $0xffffffff,%edx
mov    $0x2a,%eax
mov    $0x17,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nnrk>:
and    %esi,%edi
cmp    $0xffffffff,%edi
mov    $0x2a,%ecx
mov    $0x17,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @nnrk(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = and i32 %5, %6
%8 = xor i32 %7, -1
%9 = icmp ne i32 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 23, i32 42
ret i32 %11
}

LLVM IR (-O2):
define i32 @nnrk(i32 %0, i32 %1) {
%3 = and i32 %1, %0
%4 = icmp eq i32 %3, -1
%5 = select i1 %4, i32 42, i32 23
ret i32 %5
}
void str_cat(dst, s1, s2) char *dst;
char *s1;
char *s2;
{
  while (*dst = *s1) {
    s1++;
    dst++;
  }
  while (*dst++ = *s2++)
    ;
}


x86 assembly (clang, -O0):
<str_cat>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     1141 <str_cat+0x41>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <str_cat+0x10>
jmp    1146 <str_cat+0x46>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
cmp    $0x0,%al
je     1175 <str_cat+0x75>
jmp    1146 <str_cat+0x46>
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_cat>:
mov    (%rsi),%al
mov    %al,(%rdi)
test   %al,%al
je     1122 <str_cat+0x22>
add    $0x1,%rsi
nopl   0x0(%rax)
movzbl (%rsi),%eax
mov    %al,0x1(%rdi)
add    $0x1,%rdi
add    $0x1,%rsi
test   %al,%al
jne    1110 <str_cat+0x10>
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl (%rdx,%rax,1),%ecx
mov    %cl,(%rdi,%rax,1)
add    $0x1,%rax
test   %cl,%cl
jne    1130 <str_cat+0x30>
ret

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

LLVM IR (-O2):
define void @str_cat(i8* nocapture writeonly %0, i8* nocapture %1, i8* nocapture %2) {
%4 = load i8, i8* %1
store i8 %4, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %13, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %9, %6 ], [ %1, %3 ]
%8 = phi i8* [ %10, %6 ], [ %0, %3 ]
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = getelementptr inbounds i8, i8* %8, i64 1
%11 = load i8, i8* %9
store i8 %11, i8* %10
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %6
13: ; preds = %6, %3
%14 = phi i8* [ %0, %3 ], [ %10, %6 ]
br label %15
15: ; preds = %13, %15
%16 = phi i8* [ %20, %15 ], [ %14, %13 ]
%17 = phi i8* [ %18, %15 ], [ %2, %13 ]
%18 = getelementptr inbounds i8, i8* %17, i64 1
%19 = load i8, i8* %17
%20 = getelementptr inbounds i8, i8* %16, i64 1
store i8 %19, i8* %16
%21 = icmp eq i8 %19, 0
br i1 %21, label %22, label %15
22: ; preds = %15
ret void
}
void unlink(char *ofname) {}


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

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

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

LLVM IR (-O2):
define void @unlink(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int random();
int rand_key_int() { return random(); }


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

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

LLVM IR (-O0):
define i32 @rand_key_int() {
%1 = call i32 (...) @random()
ret i32 %1
}

LLVM IR (-O2):
define i32 @rand_key_int() {
%1 = tail call i32 (...) @random()
ret i32 %1
}
int fci_bypass_init(void *hDevice, int speed, int slaveaddr) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @fci_bypass_init(i8* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 0
}
/* Variables and functions */
int getStartValueImpl();
int getEndValue() { return getStartValueImpl(); }


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

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

LLVM IR (-O0):
define i32 @getEndValue() {
%1 = call i32 (...) @getStartValueImpl()
ret i32 %1
}

LLVM IR (-O2):
define i32 @getEndValue() {
%1 = tail call i32 (...) @getStartValueImpl()
ret i32 %1
}