xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(char *, int, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(char *, char, int);
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *popen(char const *, char *);
void executeShell(const char *shell, char *buf) {
  FILE *stream;
  memset(buf, '\0', 1024);
  stream = popen(shell, "r");
  fread(buf, sizeof(char), 1024, stream);
  pclose(stream);
}


x86 assembly (clang, -O0):
<executeShell>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
mov    -0x8(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1060 <popen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rcx
mov    $0x1,%esi
mov    $0x400,%edx
call   1030 <fread@plt>
mov    -0x18(%rbp),%rdi
call   1040 <pclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<executeShell>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r15
mov    %rdi,%r14
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x400,%edx
call   1050 <memset@plt>
lea    0xe9f(%rip),%rsi
mov    %r14,%rdi
call   1060 <popen@plt>
mov    %rax,%rbx
mov    %r15,%rdi
mov    $0x1,%esi
mov    $0x400,%edx
mov    %rax,%rcx
call   1030 <fread@plt>
mov    %rbx,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <pclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"r\00"
define void @executeShell(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32*
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %4
%7 = call i32 @memset(i8* %6, i8 signext 0, i32 1024)
%8 = load i8*, i8** %3
%9 = call i32* @popen(i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %9, i32** %5
%10 = load i8*, i8** %4
%11 = load i32*, i32** %5
%12 = call i32 @fread(i8* %10, i32 1, i32 1024, i32* %11)
%13 = load i32*, i32** %5
%14 = call i32 @pclose(i32* %13)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"r\00"
define void @executeShell(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @memset(i8* %1, i8 signext 0, i32 1024)
%4 = tail call i32* @popen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @fread(i8* %1, i32 1, i32 1024, i32* %4)
%6 = tail call i32 @pclose(i32* %4)
ret void
}
int gen_indirected(struct symbol *s) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.symbol = type opaque
define i32 @gen_indirected(%struct.symbol* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void rectangle() {
  printf("___________\n");
  printf("|          |\n");
  printf("|          |\n");
  printf("|          |\n");
  printf("|__________|\n");
}


x86 assembly (clang, -O0):
<rectangle>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
lea    0xed0(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<rectangle>:
push   %rbx
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xee8(%rip),%rbx
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
lea    0xed6(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"___________\0A\00"
@.str.1 = [14 x i8] c"| |\0A\00"
@.str.2 = [14 x i8] c"|__________|\0A\00"
define void @rectangle() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"___________\00"
@str.5 = [13 x i8] c"| |\00"
@str.6 = [13 x i8] c"|__________|\00"
define void @rectangle() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.5, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.5, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str.6, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int classcmp(void const *ap, void const *bp) {
  uint16_t const *a = ap;
  uint16_t const *b = bp;
  return (*a << 8) - (*b << 8);
}


x86 assembly (clang, -O0):
<classcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
shl    $0x8,%eax
mov    -0x20(%rbp),%rcx
mov    (%rcx),%ecx
shl    $0x8,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<classcmp>:
mov    (%rdi),%eax
sub    (%rsi),%eax
shl    $0x8,%eax
ret

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

LLVM IR (-O2):
define i32 @classcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = bitcast i8* %1 to i32*
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = sub i32 %5, %6
%8 = shl i32 %7, 8
ret i32 %8
}
/* Variables and functions */
int _ada_use_c2phc4c(int, int *, int *, double *, int /*<<< orphan*/);
int padcon_get_standard_series_step(double *step) {
  int fail;
  int precision = 0;
  int *b;
  fail = _ada_use_c2phc4c(885, &precision, b, step, 0);
  return fail;
}


x86 assembly (clang, -O0):
<padcon_get_standard_series_step>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x18(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    $0x375,%edi
lea    -0x10(%rbp),%rsi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<padcon_get_standard_series_step>:
push   %rax
mov    %rdi,%rcx
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x375,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc4c@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @padcon_get_standard_series_step(double* %0) {
%2 = alloca double*
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store double* %0, double** %2
store i32 0, i32* %4
%6 = load i32*, i32** %5
%7 = load double*, double** %2
%8 = call i32 @_ada_use_c2phc4c(i32 885, i32* %4, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @padcon_get_standard_series_step(double* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 0, i32* %2
%4 = call i32 @_ada_use_c2phc4c(i32 885, i32* %2, i32* undef, double* %0, i32 0)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ unlink(char *);
void stopit(int sig __attribute__((unused))) {
  unlink("/etc/nologin");
  unlink("/fastboot");
  unlink("/forcefsck");
  unlink("/var/run/shutdown.pid");
  printf("\r\nShutdown cancelled.\r\n");
  exit(0);
}


x86 assembly (clang, -O0):
<stopit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xebe(%rip),%rdi
call   1030 <unlink@plt>
lea    0xebf(%rip),%rdi
call   1030 <unlink@plt>
lea    0xebd(%rip),%rdi
call   1030 <unlink@plt>
lea    0xebc(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
xor    %edi,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<stopit>:
push   %rax
lea    0xec8(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec9(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec7(%rip),%rdi
call   1030 <unlink@plt>
lea    0xec6(%rip),%rdi
call   1030 <unlink@plt>
lea    0xed0(%rip),%rdi
call   1040 <puts@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"/etc/nologin\00"
@.str.1 = [10 x i8] c"/fastboot\00"
@.str.2 = [11 x i8] c"/forcefsck\00"
@.str.3 = [22 x i8] c"/var/run/shutdown.pid\00"
@.str.4 = [24 x i8] c"\0D\0AShutdown cancelled.\0D\0A\00"
define void @stopit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%5 = call i32 @unlink(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @unlink(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [13 x i8] c"/etc/nologin\00"
@.str.1 = [10 x i8] c"/fastboot\00"
@.str.2 = [11 x i8] c"/forcefsck\00"
@.str.3 = [22 x i8] c"/var/run/shutdown.pid\00"
@str = [23 x i8] c"\0D\0AShutdown cancelled.\0D\00"
define void @stopit(i32 %0) {
%2 = tail call i32 @unlink(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @unlink(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @unlink(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @unlink(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.3, i64 0, i64 0))
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ FAIL(char *);
void stuff() { FAIL("rpath-install-name"); }


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

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

LLVM IR (-O0):
@.str = [19 x i8] c"rpath-install-name\00"
define void @stuff() {
%1 = call i32 @FAIL(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"rpath-install-name\00"
define void @stuff() {
%1 = tail call i32 @FAIL(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ r_cons_printf(char *, char const *);
scalar_t__ strlen(char *);
int /*<<< orphan*/ strncmp(char const *, char *, scalar_t__);
int stdprintifunion(void *p, const char *k, const char *v) {
  if (!strncmp(v, "union", strlen("union") + 1))
    r_cons_printf("%s\n", k);
  return 1;
}


x86 assembly (clang, -O0):
<stdprintifunion>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
lea    0xead(%rip),%rdi
call   1050 <strlen@plt>
mov    -0x20(%rbp),%rdi
mov    %rax,%rdx
add    $0x1,%rdx
lea    0xe96(%rip),%rsi
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    1188 <stdprintifunion+0x58>
mov    -0x10(%rbp),%rsi
lea    0xe83(%rip),%rdi
call   1030 <r_cons_printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stdprintifunion>:
push   %rbx
mov    %rdx,%rdi
mov    %rsi,%rbx
lea    0xed2(%rip),%rsi
mov    $0x6,%edx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    114b <stdprintifunion+0x2b>
lea    0xec3(%rip),%rdi
mov    %rbx,%rsi
call   1030 <r_cons_printf@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"union\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @stdprintifunion(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
%7 = load i8*, i8** %6
%8 = call i64 @strlen(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%9 = add nsw i64 %8, 1
%10 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 %9)
%11 = icmp ne i32 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %3
%13 = load i8*, i8** %5
%14 = call i32 @r_cons_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %12, %3
ret i32 1
}

LLVM IR (-O2):
@.str = [6 x i8] c"union\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @stdprintifunion(i8* nocapture readnone %0, i8* %1, i8* nocapture %2) {
%4 = tail call i32 @strncmp(i8* dereferenceable(1) %2, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i64 6)
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @r_cons_printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %1)
br label %8
8: ; preds = %6, %3
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ is_pow2(unsigned long long);
int log2i(unsigned long long);
unsigned long long ceil_pow2(unsigned long long x) {
  if (!is_pow2(x))
    return (unsigned long long)1 << (log2i(x) + 1);
  else
    return x;
}


x86 assembly (clang, -O0):
<ceil_pow2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <is_pow2@plt>
cmp    $0x0,%eax
jne    115f <ceil_pow2+0x3f>
mov    -0x10(%rbp),%rdi
call   1030 <log2i@plt>
add    $0x1,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    $0x1,%eax
shl    %cl,%rax
mov    %rax,-0x8(%rbp)
jmp    1167 <ceil_pow2+0x47>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ceil_pow2>:
push   %rbx
mov    %rdi,%rbx
call   1040 <is_pow2@plt>
test   %eax,%eax
jne    1140 <ceil_pow2+0x20>
mov    %rbx,%rdi
call   1030 <log2i@plt>
lea    0x1(%rax),%ecx
mov    $0x1,%ebx
shl    %cl,%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @ceil_pow2(i64 %0) {
%2 = alloca i64
%3 = alloca i64
store i64 %0, i64* %3
%4 = load i64, i64* %3
%5 = call i32 @is_pow2(i64 %4)
%6 = icmp ne i32 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1
%8 = load i64, i64* %3
%9 = call i32 @log2i(i64 %8)
%10 = add nsw i32 %9, 1
%11 = zext i32 %10 to i64
%12 = shl i64 1, %11
store i64 %12, i64* %2
br label %15
13: ; preds = %1
%14 = load i64, i64* %3
store i64 %14, i64* %2
br label %15
15: ; preds = %13, %7
%16 = load i64, i64* %2
ret i64 %16
}

LLVM IR (-O2):
define i64 @ceil_pow2(i64 %0) {
%2 = tail call i32 @is_pow2(i64 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = tail call i32 @log2i(i64 %0)
%6 = add nsw i32 %5, 1
%7 = zext i32 %6 to i64
%8 = shl nuw i64 1, %7
br label %9
9: ; preds = %1, %4
%10 = phi i64 [ %8, %4 ], [ %0, %1 ]
ret i64 %10
}
/* Variables and functions */
int /*<<< orphan*/ getfuncinfo(int /*<<< orphan*/);
int /*<<< orphan*/ luaL_functionarg(int);
int /*<<< orphan*/ lua_pushobject(int /*<<< orphan*/);
void funcinfo(void) { lua_pushobject(getfuncinfo(luaL_functionarg(1))); }


x86 assembly (clang, -O0):
<funcinfo>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <luaL_functionarg@plt>
mov    %eax,%edi
call   1040 <getfuncinfo@plt>
mov    %eax,%edi
call   1050 <lua_pushobject@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<funcinfo>:
push   %rax
mov    $0x1,%edi
call   1030 <luaL_functionarg@plt>
mov    %eax,%edi
call   1040 <getfuncinfo@plt>
mov    %eax,%edi
pop    %rax
jmp    1050 <lua_pushobject@plt>

LLVM IR (-O0):
define void @funcinfo() {
%1 = call i32 @luaL_functionarg(i32 1)
%2 = call i32 @getfuncinfo(i32 %1)
%3 = call i32 @lua_pushobject(i32 %2)
ret void
}

LLVM IR (-O2):
define void @funcinfo() {
%1 = tail call i32 @luaL_functionarg(i32 1)
%2 = tail call i32 @getfuncinfo(i32 %1)
%3 = tail call i32 @lua_pushobject(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ getchar();
int /*<<< orphan*/ puts(char const *);
int main(void) {
  const char *strings[] = {"Type something", "C:\\>", "."};
  puts(strings[0]);
  puts(strings[1]);
  puts(strings[2]);
  getchar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2cca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0x2cc7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0x2cc4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x18(%rbp),%rdi
call   1030 <puts@plt>
mov    -0x10(%rbp),%rdi
call   1030 <puts@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [15 x i8] c"Type something\00"
@.str.1 = [5 x i8] c"C:\\>\00"
@.str.2 = [2 x i8] c".\00"
@__const.main.strings = [3 x i8*] [i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i32 0, i32 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i32 0, i32 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i32 0, i32 0)]
define i32 @main() {
%1 = alloca i32
%2 = alloca [3 x i8*]
store i32 0, i32* %1
%3 = bitcast [3 x i8*]* %2 to i8*
%4 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 0
%5 = load i8*, i8** %4
%6 = call i32 @puts(i8* %5)
%7 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 1
%8 = load i8*, i8** %7
%9 = call i32 @puts(i8* %8)
%10 = getelementptr inbounds [3 x i8*], [3 x i8*]* %2, i64 0, i64 2
%11 = load i8*, i8** %10
%12 = call i32 @puts(i8* %11)
%13 = call i32 (...) @getchar()
ret i32 0
}

LLVM IR (-O2):
@.str = [15 x i8] c"Type something\00"
@.str.1 = [5 x i8] c"C:\\>\00"
@.str.2 = [2 x i8] c".\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 (...) @getchar()
ret i32 0
}
/* Type definitions */
struct demod_state {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ pocsag_deinit(struct demod_state *);
void poc12_deinit(struct demod_state *s) { pocsag_deinit(s); }


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

x86 assembly (clang, -O2):
<poc12_deinit>:
jmp    1030 <pocsag_deinit@plt>

LLVM IR (-O0):
%struct.demod_state = type { i32 }
define void @poc12_deinit(%struct.demod_state* %0) {
%2 = alloca %struct.demod_state*
store %struct.demod_state* %0, %struct.demod_state** %2
%3 = load %struct.demod_state*, %struct.demod_state** %2
%4 = call i32 @pocsag_deinit(%struct.demod_state* %3)
ret void
}

LLVM IR (-O2):
%struct.demod_state = type { i32 }
define void @poc12_deinit(%struct.demod_state* %0) {
%2 = tail call i32 @pocsag_deinit(%struct.demod_state* %0)
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int64_t cfs_stub_lsetxattr(const char *path, const char *name, const void *data,
                           size_t size, int flags) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<cfs_stub_lsetxattr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    0x2ec9(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb0(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cfs_stub_lsetxattr>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @cfs_stub_lsetxattr(i8* %0, i8* %1, i8* %2, i64 %3, i32 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i64
%10 = alloca i32
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i64 %3, i64* %9
store i32 %4, i32* %10
%11 = load i32, i32* @ENOSYS
store i32 %11, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @cfs_stub_lsetxattr(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i64 %3, i32 %4) {
%6 = load i32, i32* @ENOSYS
store i32 %6, i32* @errno
ret i32 -1
}
/* Variables and functions */
scalar_t__ isspace(char const);
int n_names(const char *s) {
  int cnt = 0;
  while (*s) {
    if (isspace(*s)) {
      cnt++;
    }
    s++;
  }
  return cnt;
}


x86 assembly (clang, -O0):
<n_names>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1160 <n_names+0x50>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%rax
je     114f <n_names+0x3f>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1123 <n_names+0x13>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<n_names>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     114c <n_names+0x3c>
mov    %rdi,%rbx
add    $0x1,%rbx
xor    %ebp,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movsbl %al,%edi
call   1030 <isspace@plt>
cmp    $0x1,%rax
sbb    $0xffffffff,%ebp
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <n_names+0x20>
jmp    114e <n_names+0x3e>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @n_names(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %13, %4 ], [ %2, %1 ]
%6 = phi i32 [ %11, %4 ], [ 0, %1 ]
%7 = phi i8* [ %12, %4 ], [ %0, %1 ]
%8 = tail call i64 @isspace(i8 signext %5)
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i32
%11 = add nuw nsw i32 %6, %10
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 0, %1 ], [ %11, %4 ]
ret i32 %16
}
/* Variables and functions */
int rand();
int RandomNumber(int min_num, int max_num) {
  int result = 0, low_num = 0, hi_num = 0;
  if (min_num < max_num) {
    low_num = min_num;
    hi_num = max_num + 1;
  } else {
    low_num = max_num + 1;
    hi_num = min_num;
  }
  result = (rand() % (hi_num - low_num)) + low_num;
  return result;
}


x86 assembly (clang, -O0):
<RandomNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1153 <RandomNumber+0x43>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1162 <RandomNumber+0x52>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
mov    -0x14(%rbp),%ecx
sub    -0x10(%rbp),%ecx
cltd
idiv   %ecx
add    -0x10(%rbp),%edx
mov    %edx,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RandomNumber>:
push   %rbp
push   %rbx
push   %rax
lea    0x1(%rsi),%ebp
cmp    %esi,%edi
mov    %ebp,%ebx
cmovl  %edi,%ebx
cmovge %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
sub    %ebx,%ebp
cltd
idiv   %ebp
add    %edx,%ebx
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @RandomNumber(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
store i32 0, i32* %6
store i32 0, i32* %7
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %15
11: ; preds = %2
%12 = load i32, i32* %3
store i32 %12, i32* %6
%13 = load i32, i32* %4
%14 = add nsw i32 %13, 1
store i32 %14, i32* %7
br label %19
15: ; preds = %2
%16 = load i32, i32* %4
%17 = add nsw i32 %16, 1
store i32 %17, i32* %6
%18 = load i32, i32* %3
store i32 %18, i32* %7
br label %19
19: ; preds = %15, %11
%20 = call i32 (...) @rand()
%21 = load i32, i32* %7
%22 = load i32, i32* %6
%23 = sub nsw i32 %21, %22
%24 = srem i32 %20, %23
%25 = load i32, i32* %6
%26 = add nsw i32 %24, %25
store i32 %26, i32* %5
%27 = load i32, i32* %5
ret i32 %27
}

LLVM IR (-O2):
define i32 @RandomNumber(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = add nsw i32 %1, 1
%5 = select i1 %3, i32 %0, i32 %4
%6 = select i1 %3, i32 %4, i32 %0
%7 = tail call i32 (...) @rand()
%8 = sub nsw i32 %6, %5
%9 = srem i32 %7, %8
%10 = add nsw i32 %9, %5
ret i32 %10
}
int bar(void) { return 7; }


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

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

LLVM IR (-O0):
define i32 @bar() {
ret i32 7
}

LLVM IR (-O2):
define i32 @bar() {
ret i32 7
}
/* Variables and functions */
int /*<<< orphan*/ expint(int, int);
void main(void) { expint(50, 1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x32,%edi
mov    $0x1,%esi
call   1030 <expint@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x32,%edi
mov    $0x1,%esi
jmp    1030 <expint@plt>

LLVM IR (-O0):
define void @main() {
%1 = call i32 @expint(i32 50, i32 1)
ret void
}

LLVM IR (-O2):
define void @main() {
%1 = tail call i32 @expint(i32 50, i32 1)
ret void
}
int do_636() { return 636; }


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

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

LLVM IR (-O0):
define i32 @do_636() {
ret i32 636
}

LLVM IR (-O2):
define i32 @do_636() {
ret i32 636
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void cleanup(int sig) {
  if (sig)
    exit(1);
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <cleanup+0x1f>
mov    $0x1,%edi
call   1030 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
test   %edi,%edi
jne    1115 <cleanup+0x5>
ret
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @cleanup(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @exit(i32 1)
unreachable
7: ; preds = %1
ret void
}

LLVM IR (-O2):
define void @cleanup(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @exit(i32 1)
unreachable
5: ; preds = %1
ret void
}
void newline() {}


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

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

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

LLVM IR (-O2):
define void @newline() {
ret void
}
int test_imm_3Fint32_reg(int val) { return ((val) & (0x3F << 0)) ? -20 : -40; }


x86 assembly (clang, -O0):
<test_imm_3Fint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0x3f,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_3Fint32_reg(i32 %0) {
%2 = and i32 %0, 63
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
int is_stamsg(int msg) {
  return msg == 1005 || msg == 1006 || msg == 1007 || msg == 1008 ||
         msg == 1033;
}


x86 assembly (clang, -O0):
<is_stamsg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x1,%al
cmpl   $0x3ed,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_stamsg+0x5c>
mov    $0x1,%al
cmpl   $0x3ee,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_stamsg+0x5c>
mov    $0x1,%al
cmpl   $0x3ef,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_stamsg+0x5c>
mov    $0x1,%al
cmpl   $0x3f0,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     115c <is_stamsg+0x5c>
cmpl   $0x409,-0x4(%rbp)
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_stamsg>:
lea    -0x3ed(%rdi),%eax
cmp    $0x4,%eax
setb   %al
cmp    $0x409,%edi
sete   %cl
or     %al,%cl
movzbl %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @is_stamsg(i32 %0) {
%2 = add i32 %0, -1005
%3 = icmp ult i32 %2, 4
%4 = icmp eq i32 %0, 1033
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ e_imm();
int /*<<< orphan*/ e_ldx();
void e_ldx_imm() {
  e_imm();
  e_ldx();
}


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

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

LLVM IR (-O0):
define void @e_ldx_imm() {
%1 = call i32 (...) @e_imm()
%2 = call i32 (...) @e_ldx()
ret void
}

LLVM IR (-O2):
define void @e_ldx_imm() {
%1 = tail call i32 (...) @e_imm()
%2 = tail call i32 (...) @e_ldx()
ret void
}
void dealloc2d_f(float **buf, int n) {
  int i;
  for (i = 0; i < n; i++) {
    free(buf[i]);
  }
  free(buf);
}


x86 assembly (clang, -O0):
<dealloc2d_f>:
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    1151 <dealloc2d_f+0x41>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <dealloc2d_f+0x16>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dealloc2d_f>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
test   %esi,%esi
jle    1142 <dealloc2d_f+0x32>
mov    %esi,%r15d
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1130 <dealloc2d_f+0x20>
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @dealloc2d_f(float** %0, i32 %1) {
%3 = alloca float**
%4 = alloca i32
%5 = alloca i32
store float** %0, float*** %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 float**, float*** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float*, float** %11, i64 %13
%15 = load float*, float** %14
%16 = bitcast float* %15 to i8*
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
%21 = load float**, float*** %3
%22 = bitcast float** %21 to i8*
ret void
}

LLVM IR (-O2):
define void @dealloc2d_f(float** nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds float*, float** %0, i64 %7
%9 = bitcast float** %8 to i8**
%10 = load i8*, i8** %9
tail call void @free(i8* %10)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = bitcast float** %0 to i8*
tail call void @free(i8* %14)
ret void
}
/* Variables and functions */
char *calloc(scalar_t__, int);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *strdup(const char *s) {
  char *d = calloc(strlen(s) + 1, 1);
  strcpy(d, s);
  return d;
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
call   1050 <calloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i8* @calloc(i64 %6, i32 1)
store i8* %7, i8** %3
%8 = load i8*, i8** %3
%9 = load i8*, i8** %2
%10 = call i32 @strcpy(i8* %8, i8* %9)
%11 = load i8*, i8** %3
ret i8* %11
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @calloc(i64 %3, i32 1)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
int map_update(struct map_ent **mpp, char *devnm, char *metadata, int *uuid,
               char *path) {
  return 0;
}


x86 assembly (clang, -O0):
<map_update>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.map_ent = type opaque
define i32 @map_update(%struct.map_ent** %0, i8* %1, i8* %2, i32* %3, i8* %4) {
%6 = alloca %struct.map_ent**
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32*
%10 = alloca i8*
store %struct.map_ent** %0, %struct.map_ent*** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32* %3, i32** %9
store i8* %4, i8** %10
ret i32 0
}

LLVM IR (-O2):
%struct.map_ent = type opaque
define i32 @map_update(%struct.map_ent** nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i32* nocapture readnone %3, i8* nocapture readnone %4) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cgscale();
int /*<<< orphan*/ gentext();
void genscale(void) {
  gentext();
  cgscale();
}


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

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

LLVM IR (-O0):
define void @genscale() {
%1 = call i32 (...) @gentext()
%2 = call i32 (...) @cgscale()
ret void
}

LLVM IR (-O2):
define void @genscale() {
%1 = tail call i32 (...) @gentext()
%2 = tail call i32 (...) @cgscale()
ret void
}
void sioWriteStat16(unsigned short value) {}


x86 assembly (clang, -O0):
<sioWriteStat16>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @sioWriteStat16(i16 zeroext %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  if (argc > 2) {
    printf("Hello World\n");
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
jle    113c <main+0x2c>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x3,%edi
jl     1126 <main+0x16>
push   %rax
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
add    $0x8,%rsp
xor    %eax,%eax
ret

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

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = icmp sgt i32 %0, 2
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
br label %6
6: ; preds = %4, %2
ret i32 0
}
/* Variables and functions */
double roundZero(double);
double roundRoot(double r) { return roundZero(r); }


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

x86 assembly (clang, -O2):
<roundRoot>:
jmp    1030 <roundZero@plt>

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

LLVM IR (-O2):
define double @roundRoot(double %0) {
%2 = tail call double @roundZero(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void test(long x) {
  unsigned a = 0x10203040;
  unsigned b = (a << 16);
  unsigned long long al = a;
  unsigned long long bl = al << 16;
  assert(b == (unsigned)bl);
  assert(b == 0x30400000);
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x10203040,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x10,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
shl    $0x10,%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x20(%rbp),%rcx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpl   $0x30400000,-0x10(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0x1,%edi
call   1030 <assert@plt>
mov    $0x1,%edi
pop    %rax
jmp    1030 <assert@plt>

LLVM IR (-O0):
define void @test(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %2
store i32 270544960, i32* %3
%7 = load i32, i32* %3
%8 = shl i32 %7, 16
store i32 %8, i32* %4
%9 = load i32, i32* %3
%10 = zext i32 %9 to i64
store i64 %10, i64* %5
%11 = load i64, i64* %5
%12 = shl i64 %11, 16
store i64 %12, i64* %6
%13 = load i32, i32* %4
%14 = load i64, i64* %6
%15 = trunc i64 %14 to i32
%16 = icmp eq i32 %13, %15
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 809500672
%21 = zext i1 %20 to i32
%22 = call i32 @assert(i32 %21)
ret void
}

LLVM IR (-O2):
define void @test(i64 %0) {
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bar(int, char *);
int /*<<< orphan*/ foo();
int /*<<< orphan*/ marker();
int main(void) {
  char s[4];
  bar(4, s);
  foo();
  marker();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x4(%rsp),%rsi
mov    $0x4,%edi
call   1030 <bar@plt>
xor    %eax,%eax
call   1040 <foo@plt>
xor    %eax,%eax
call   1050 <marker@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @bar(i32 4, i8* %3)
%5 = call i32 (...) @foo()
%6 = call i32 (...) @marker()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [4 x i8]
%2 = getelementptr inbounds [4 x i8], [4 x i8]* %1, i64 0, i64 0
%3 = call i32 @bar(i32 4, i8* %2)
%4 = call i32 (...) @foo()
%5 = call i32 (...) @marker()
ret i32 0
}
int get_3() { return 2; }


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

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

LLVM IR (-O0):
define i32 @get_3() {
ret i32 2
}

LLVM IR (-O2):
define i32 @get_3() {
ret i32 2
}
__attribute__((no)) int foo3(void) { return 6; }


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

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

LLVM IR (-O0):
define i32 @foo3() {
ret i32 6
}

LLVM IR (-O2):
define i32 @foo3() {
ret i32 6
}
__attribute__((always_)) unsigned int generic_hweight16(unsigned int w) {
  unsigned int res = (w & 0x5555) + ((w >> 1) & 0x5555);
  res = (res & 0x3333) + ((res >> 2) & 0x3333);
  res = (res & 0x0F0F) + ((res >> 4) & 0x0F0F);
  return (res & 0x00FF) + ((res >> 8) & 0x00FF);
}


x86 assembly (clang, -O0):
<generic_hweight16>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x5555,%eax
mov    -0x4(%rbp),%ecx
shr    $0x1,%ecx
and    $0x5555,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0x3333,%eax
mov    -0x8(%rbp),%ecx
shr    $0x2,%ecx
and    $0x3333,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xf0f,%eax
mov    -0x8(%rbp),%ecx
shr    $0x4,%ecx
and    $0xf0f,%ecx
add    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    -0x8(%rbp),%ecx
shr    $0x8,%ecx
and    $0xff,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<generic_hweight16>:
mov    %edi,%eax
and    $0x5555,%eax
shr    %edi
and    $0x5555,%edi
add    %edi,%eax
mov    %eax,%ecx
and    $0x3333,%ecx
shr    $0x2,%eax
and    $0x3333,%eax
add    %ecx,%eax
mov    %eax,%ecx
and    $0x707,%ecx
shr    $0x4,%eax
and    $0x707,%eax
add    %ecx,%eax
movzbl %al,%ecx
shr    $0x8,%eax
add    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @generic_hweight16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 21845
%6 = load i32, i32* %2
%7 = lshr i32 %6, 1
%8 = and i32 %7, 21845
%9 = add i32 %5, %8
store i32 %9, i32* %3
%10 = load i32, i32* %3
%11 = and i32 %10, 13107
%12 = load i32, i32* %3
%13 = lshr i32 %12, 2
%14 = and i32 %13, 13107
%15 = add i32 %11, %14
store i32 %15, i32* %3
%16 = load i32, i32* %3
%17 = and i32 %16, 3855
%18 = load i32, i32* %3
%19 = lshr i32 %18, 4
%20 = and i32 %19, 3855
%21 = add i32 %17, %20
store i32 %21, i32* %3
%22 = load i32, i32* %3
%23 = and i32 %22, 255
%24 = load i32, i32* %3
%25 = lshr i32 %24, 8
%26 = and i32 %25, 255
%27 = add i32 %23, %26
ret i32 %27
}

LLVM IR (-O2):
define i32 @generic_hweight16(i32 %0) {
%2 = and i32 %0, 21845
%3 = lshr i32 %0, 1
%4 = and i32 %3, 21845
%5 = add nuw nsw i32 %4, %2
%6 = and i32 %5, 13107
%7 = lshr i32 %5, 2
%8 = and i32 %7, 13107
%9 = add nuw nsw i32 %8, %6
%10 = and i32 %9, 1799
%11 = lshr i32 %9, 4
%12 = and i32 %11, 1799
%13 = add nuw nsw i32 %12, %10
%14 = and i32 %13, 15
%15 = lshr i32 %13, 8
%16 = add nuw nsw i32 %14, %15
ret i32 %16
}
void wx11mp() {}


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

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

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

LLVM IR (-O2):
define void @wx11mp() {
ret void
}
/* Variables and functions */
int f335(int *);
int f336(int *p) { return f335(p); }


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

x86 assembly (clang, -O2):
<f336>:
jmp    1030 <f335@plt>

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

LLVM IR (-O2):
define i32 @f336(i32* %0) {
%2 = tail call i32 @f335(i32* %0)
ret i32 %2
}
void kodak_jpeg_load_raw() {}


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

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

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

LLVM IR (-O2):
define void @kodak_jpeg_load_raw() {
ret void
}
int execute_getegid() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @execute_getegid() {
ret i32 0
}
const char *ss(int num) { return num == 1 ? "" : "s"; }


x86 assembly (clang, -O0):
<ss>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xeef(%rip),%rax
lea    0xee9(%rip),%rcx
cmp    $0x1,%edx
cmove  %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ss>:
cmp    $0x1,%edi
lea    0xef7(%rip),%rcx
lea    0xeef(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"s\00"
define i8* @ss(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 1
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [2 x i8] c"s\00"
define i8* @ss(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}