xunge/DecIR huggingface dataset:
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/);
void delay_ms(const int ms) {
  struct timespec ts;
  assert(ms >= 0);
  ts.tv_sec = ms / 1000;
  ts.tv_nsec = (ms % 1000) * 1000 * 1000;
  nanosleep(&ts, 0);
}


x86 assembly (clang, -O0):
<delay_ms>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0x3e8,%edx,%eax
imul   $0x3e8,%eax,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<delay_ms>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
not    %edi
shr    $0x1f,%edi
call   1040 <assert@plt>
movslq %ebx,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
mov    %ecx,0x8(%rsp)
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
imul   $0xf4240,%eax,%eax
mov    %eax,0xc(%rsp)
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @delay_ms(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
%6 = zext i1 %5 to i32
%7 = call i32 @assert(i32 %6)
%8 = load i32, i32* %2
%9 = sdiv i32 %8, 1000
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %9, i32* %10
%11 = load i32, i32* %2
%12 = srem i32 %11, 1000
%13 = mul nsw i32 %12, 1000
%14 = mul nsw i32 %13, 1000
%15 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 %14, i32* %15
%16 = call i32 @nanosleep(%struct.timespec* %3, i32 0)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @delay_ms(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = xor i32 %0, -1
%5 = lshr i32 %4, 31
%6 = tail call i32 @assert(i32 %5)
%7 = sdiv i32 %0, 1000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %7, i32* %8
%9 = srem i32 %0, 1000
%10 = mul nsw i32 %9, 1000000
%11 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %10, i32* %11
%12 = call i32 @nanosleep(%struct.timespec* %2, i32 0)
ret void
}
int m32r_cannot_fetch_register(int regno) { return (regno >= 25); }


x86 assembly (clang, -O0):
<m32r_cannot_fetch_register>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x19,-0x4(%rbp)
setge  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<m32r_cannot_fetch_register>:
xor    %eax,%eax
cmp    $0x19,%edi
setge  %al
ret

LLVM IR (-O0):
define i32 @m32r_cannot_fetch_register(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 25
%5 = zext i1 %4 to i32
ret i32 %5
}

LLVM IR (-O2):
define i32 @m32r_cannot_fetch_register(i32 %0) {
%2 = icmp sgt i32 %0, 24
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
scalar_t__ EBADF;
int close(int);
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, int, int, scalar_t__);
void check_close(int fd) {
  int status;
  status = close(fd);
  if (status >= 0 || errno != EBADF) {
    printf("Error: close(%d) = %d, errno = %d\n", fd, status, errno);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<check_close>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <close@plt>
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    116a <check_close+0x3a>
mov    0x2e89(%rip),%rax
mov    (%rax),%rax
mov    0x2e77(%rip),%rcx
cmp    (%rcx),%rax
je     1190 <check_close+0x60>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    0x2e69(%rip),%rax
mov    (%rax),%rcx
lea    0xe7f(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check_close>:
push   %rbx
mov    %edi,%ebx
call   1040 <close@plt>
mov    0x2ea1(%rip),%rcx
mov    (%rcx),%rcx
test   %eax,%eax
jns    1154 <check_close+0x24>
mov    0x2e8b(%rip),%rdx
cmp    (%rdx),%rcx
jne    1154 <check_close+0x24>
pop    %rbx
ret
lea    0xea5(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i64 0
@EBADF = global i64 0
@.str = [35 x i8] c"Error: close(%d) = %d, errno = %d\0A\00"
define void @check_close(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @close(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp sge i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i64, i64* @errno
%10 = load i64, i64* @EBADF
%11 = icmp ne i64 %9, %10
br i1 %11, label %12, label %18
12: ; preds = %8, %1
%13 = load i32, i32* %2
%14 = load i32, i32* %3
%15 = load i64, i64* @errno
%16 = call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14, i64 %15)
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %8
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@EBADF = global i64 0
@.str = [35 x i8] c"Error: close(%d) = %d, errno = %d\0A\00"
define void @check_close(i32 %0) {
%2 = tail call i32 @close(i32 %0)
%3 = icmp slt i32 %2, 0
%4 = load i64, i64* @errno
%5 = load i64, i64* @EBADF
%6 = icmp eq i64 %4, %5
%7 = select i1 %3, i1 %6, i1 false
br i1 %7, label %11, label %8
8: ; preds = %1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %2, i64 %4)
%10 = tail call i32 @exit(i32 1)
unreachable
11: ; preds = %1
ret void
}
void UART_2_ScbModeStop(void) {}


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

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

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

LLVM IR (-O2):
define void @UART_2_ScbModeStop() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int a, b, max;
  scanf("%i", &a);
  scanf("%i", &b);
  if (a > b)
    max = a;
  else
    max = b;
  printf("%d", max);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
lea    0xeba(%rip),%rdi
lea    -0xc(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jle    1166 <main+0x46>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
jmp    116c <main+0x4c>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%esi
lea    0xe8d(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xed4(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
call   1040 <scanf@plt>
mov    0xc(%rsp),%eax
mov    0x8(%rsp),%esi
cmp    %esi,%eax
cmovg  %eax,%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%i\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%6 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%7 = load i32, i32* %1
%8 = load i32, i32* %2
%9 = icmp sgt i32 %7, %8
%10 = select i1 %9, i32 %7, i32 %8
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %10)
ret i32 0
}
/* Variables and functions */
char *dlerror();
void *dlsym(void *, char *);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *, char *);
void load_ptr(void *lib, char *data_string, void **ptr) {
  *ptr = dlsym(lib, data_string);
  if (ptr == NULL) {
    printf("dlsym failed: %s\n", dlerror());
    exit(1);
  }
}


x86 assembly (clang, -O0):
<load_ptr>:
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),%rsi
call   1050 <dlsym@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
mov    %rcx,(%rax)
cmpq   $0x0,-0x18(%rbp)
jne    1196 <load_ptr+0x56>
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,%rsi
lea    0xe79(%rip),%rdi
call   1040 <printf@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<load_ptr>:
push   %rbx
mov    %rdx,%rbx
call   1030 <dlsym@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"dlsym failed: %s\0A\00"
define void @load_ptr(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** %4
%8 = load i8*, i8** %5
%9 = call i8* @dlsym(i8* %7, i8* %8)
%10 = load i8**, i8*** %6
store i8* %9, i8** %10
%11 = load i8**, i8*** %6
%12 = icmp eq i8** %11, null
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = call i8* (...) @dlerror()
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %14)
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @load_ptr(i8* %0, i8* %1, i8** nocapture writeonly %2) {
%4 = tail call i8* @dlsym(i8* %0, i8* %1)
store i8* %4, i8** %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
int ftruncate(int, int /*<<< orphan*/);
int outside_ftruncate(int fd, off_t length) { return ftruncate(fd, length); }


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

x86 assembly (clang, -O2):
<outside_ftruncate>:
jmp    1030 <ftruncate@plt>

LLVM IR (-O0):
define i32 @outside_ftruncate(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 = call i32 @ftruncate(i32 %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @outside_ftruncate(i32 %0, i32 %1) {
%3 = tail call i32 @ftruncate(i32 %0, i32 %1)
ret i32 %3
}
double calcTimeJulianCent(double jd) {
  double T = (jd - 2451545.0) / 36525.0;
  return T;
}


x86 assembly (clang, -O0):
<calcTimeJulianCent>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xef2(%rip),%xmm1
subsd  %xmm1,%xmm0
movsd  0xede(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calcTimeJulianCent>:
addsd  0xef8(%rip),%xmm0
divsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @calcTimeJulianCent(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fsub double %4, 0x4142B42C80000000
%6 = fdiv double %5, 3.652500e+04
store double %6, double* %3
%7 = load double, double* %3
ret double %7
}

LLVM IR (-O2):
define double @calcTimeJulianCent(double %0) {
%2 = fadd double %0, 0xC142B42C80000000
%3 = fdiv double %2, 3.652500e+04
ret double %3
}
/* Type definitions */
typedef scalar_t__ off_t;

/* Variables and functions */
int /*<<< orphan*/ SEEK_SET;
scalar_t__ errno;
int /*<<< orphan*/ exit(int);
scalar_t__ lseek(int, scalar_t__, int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
void lseek_or_exit(int fd, off_t offset) {
  off_t result = -1;
  errno = 0;
  result = lseek(fd, offset, SEEK_SET);
  if (result < 0) {
    perror("Can't lseek");
    exit(8);
  }
}


x86 assembly (clang, -O0):
<lseek_or_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0xffffffffffffffff,-0x18(%rbp)
ff
mov    0x2e92(%rip),%rax
movq   $0x0,(%rax)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    0x2e75(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jge    118f <lseek_or_exit+0x5f>
lea    0xe80(%rip),%rdi
call   1040 <perror@plt>
mov    $0x8,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lseek_or_exit>:
push   %rax
mov    0x2ea8(%rip),%rax
movq   $0x0,(%rax)
mov    0x2e92(%rip),%rax
mov    (%rax),%edx
call   1030 <lseek@plt>
test   %rax,%rax
js     1154 <lseek_or_exit+0x24>
pop    %rax
ret
lea    0xea5(%rip),%rdi
call   1040 <perror@plt>
mov    $0x8,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i64 0
@SEEK_SET = global i32 0
@.str = [12 x i8] c"Can't lseek\00"
define void @lseek_or_exit(i32 %0, i64 %1) {
%3 = alloca i32
%4 = alloca i64
%5 = alloca i64
store i32 %0, i32* %3
store i64 %1, i64* %4
store i64 -1, i64* %5
store i64 0, i64* @errno
%6 = load i32, i32* %3
%7 = load i64, i64* %4
%8 = load i32, i32* @SEEK_SET
%9 = call i64 @lseek(i32 %6, i64 %7, i32 %8)
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %15
12: ; preds = %2
%13 = call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%14 = call i32 @exit(i32 8)
unreachable
15: ; preds = %2
ret void
}

LLVM IR (-O2):
@errno = global i64 0
@SEEK_SET = global i32 0
@.str = [12 x i8] c"Can't lseek\00"
define void @lseek_or_exit(i32 %0, i64 %1) {
store i64 0, i64* @errno
%3 = load i32, i32* @SEEK_SET
%4 = tail call i64 @lseek(i32 %0, i64 %1, i32 %3)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = tail call i32 @perror(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%8 = tail call i32 @exit(i32 8)
unreachable
9: ; preds = %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int AwSensorFromFile(char *, int /*<<< orphan*/ *, char **, char **, char **);
int AwSensorSoftware(time_t *last, char *tbcur[], char *tbdel[],
                     char *tbnew[]) {
  return AwSensorFromFile("discoversoft.txt", last, tbcur, tbdel, tbnew);
}


x86 assembly (clang, -O0):
<AwSensorSoftware>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0xec1(%rip),%rdi
call   1030 <AwSensorFromFile@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AwSensorSoftware>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xedd(%rip),%rdi
jmp    1030 <AwSensorFromFile@plt>

LLVM IR (-O0):
@.str = [17 x i8] c"discoversoft.txt\00"
define i32 @AwSensorSoftware(i32* %0, i8** %1, i8** %2, i8** %3) {
%5 = alloca i32*
%6 = alloca i8**
%7 = alloca i8**
%8 = alloca i8**
store i32* %0, i32** %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
store i8** %3, i8*** %8
%9 = load i32*, i32** %5
%10 = load i8**, i8*** %6
%11 = load i8**, i8*** %7
%12 = load i8**, i8*** %8
%13 = call i32 @AwSensorFromFile(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32* %9, i8** %10, i8** %11, i8** %12)
ret i32 %13
}

LLVM IR (-O2):
@.str = [17 x i8] c"discoversoft.txt\00"
define i32 @AwSensorSoftware(i32* %0, i8** %1, i8** %2, i8** %3) {
%5 = tail call i32 @AwSensorFromFile(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32* %0, i8** %1, i8** %2, i8** %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ nlopt_srand(unsigned long);
void nlosr(const int *seed) { nlopt_srand((unsigned long)*seed); }


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

x86 assembly (clang, -O2):
<nlosr>:
movslq (%rdi),%rdi
jmp    1030 <nlopt_srand@plt>

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

LLVM IR (-O2):
define void @nlosr(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = sext i32 %2 to i64
%4 = tail call i32 @nlopt_srand(i64 %3)
ret void
}
/* Variables and functions */
int judgeCircle(char *);
char *whenLR_ShouldReturnTrue() {
  int result = judgeCircle("LR");
  do {
    if (!(1 == result))
      return "When moves are UP-DOWN, the result should be 1";
  } while (0);
  return 0;
}


x86 assembly (clang, -O0):
<whenLR_ShouldReturnTrue>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
call   1030 <judgeCircle@plt>
mov    %eax,-0xc(%rbp)
mov    $0x1,%eax
cmp    -0xc(%rbp),%eax
je     1145 <whenLR_ShouldReturnTrue+0x35>
lea    0xec7(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1152 <whenLR_ShouldReturnTrue+0x42>
jmp    114a <whenLR_ShouldReturnTrue+0x3a>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<whenLR_ShouldReturnTrue>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <judgeCircle@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
lea    0xeda(%rip),%rax
cmovne %rax,%rcx
mov    %rcx,%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"LR\00"
@.str.1 = [47 x i8] c"When moves are UP-DOWN, the result should be 1\00"
define i8* @whenLR_ShouldReturnTrue() {
%1 = alloca i8*
%2 = alloca i32
%3 = call i32 @judgeCircle(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 %3, i32* %2
br label %4
4: ; preds = %0
%5 = load i32, i32* %2
%6 = icmp eq i32 1, %5
br i1 %6, label %8, label %7
7: ; preds = %4
store i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %10
8: ; preds = %4
br label %9
9: ; preds = %8
store i8* null, i8** %1
br label %10
10: ; preds = %9, %7
%11 = load i8*, i8** %1
ret i8* %11
}

LLVM IR (-O2):
@.str = [3 x i8] c"LR\00"
@.str.1 = [47 x i8] c"When moves are UP-DOWN, the result should be 1\00"
define i8* @whenLR_ShouldReturnTrue() {
%1 = tail call i32 @judgeCircle(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%2 = icmp eq i32 %1, 1
%3 = select i1 %2, i8* null, i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ appendCODE(int /*<<< orphan*/);
int /*<<< orphan*/ makeCODEldc_int(int, int /*<<< orphan*/ *);
void code_ldc_int(int arg) { appendCODE(makeCODEldc_int(arg, NULL)); }


x86 assembly (clang, -O0):
<code_ldc_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <makeCODEldc_int@plt>
mov    %eax,%edi
call   1030 <appendCODE@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<code_ldc_int>:
push   %rax
xor    %esi,%esi
call   1040 <makeCODEldc_int@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <appendCODE@plt>

LLVM IR (-O0):
define void @code_ldc_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @makeCODEldc_int(i32 %3, i32* null)
%5 = call i32 @appendCODE(i32 %4)
ret void
}

LLVM IR (-O2):
define void @code_ldc_int(i32 %0) {
%2 = tail call i32 @makeCODEldc_int(i32 %0, i32* null)
%3 = tail call i32 @appendCODE(i32 %2)
ret void
}
void gtk_window_group_new() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_group_new() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
int /*<<< orphan*/ mbus_remote_register_write(int, int, int);
void reset_pmu_solar_short() {
  mbus_remote_register_write(
      0x8, 0x0E, ((1 << 10) | (1 << 9) | (0 << 8) | (1 << 4) | (0)));
  delay(200);
  mbus_remote_register_write(
      0x8, 0x0E, ((1 << 10) | (1 << 9) | (0 << 8) | (1 << 4) | (0)));
  delay(200);
  mbus_remote_register_write(
      0x8, 0x0E, ((1 << 10) | (0 << 9) | (0 << 8) | (1 << 4) | (0)));
  delay(200);
}


x86 assembly (clang, -O0):
<reset_pmu_solar_short>:
push   %rbp
mov    %rsp,%rbp
mov    $0x8,%edi
mov    $0xe,%esi
mov    $0x610,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0x8,%edi
mov    $0xe,%esi
mov    $0x610,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0x8,%edi
mov    $0xe,%esi
mov    $0x410,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reset_pmu_solar_short>:
push   %rax
mov    $0x8,%edi
mov    $0xe,%esi
mov    $0x610,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0x8,%edi
mov    $0xe,%esi
mov    $0x610,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
call   1030 <delay@plt>
mov    $0x8,%edi
mov    $0xe,%esi
mov    $0x410,%edx
call   1040 <mbus_remote_register_write@plt>
mov    $0xc8,%edi
pop    %rax
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @reset_pmu_solar_short() {
%1 = call i32 @mbus_remote_register_write(i32 8, i32 14, i32 1552)
%2 = call i32 @delay(i32 200)
%3 = call i32 @mbus_remote_register_write(i32 8, i32 14, i32 1552)
%4 = call i32 @delay(i32 200)
%5 = call i32 @mbus_remote_register_write(i32 8, i32 14, i32 1040)
%6 = call i32 @delay(i32 200)
ret void
}

LLVM IR (-O2):
define void @reset_pmu_solar_short() {
%1 = tail call i32 @mbus_remote_register_write(i32 8, i32 14, i32 1552)
%2 = tail call i32 @delay(i32 200)
%3 = tail call i32 @mbus_remote_register_write(i32 8, i32 14, i32 1552)
%4 = tail call i32 @delay(i32 200)
%5 = tail call i32 @mbus_remote_register_write(i32 8, i32 14, i32 1040)
%6 = tail call i32 @delay(i32 200)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *x_malloc(size_t size) {
  void *r = malloc(size);
  if (!r) {
    fprintf(stderr, "Fatal: malloc(%lu) failed\n", size);
    exit(EXIT_FAILURE);
  }
  return r;
}


x86 assembly (clang, -O0):
<x_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    117b <x_malloc+0x4b>
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe98(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e64(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_malloc>:
push   %rbx
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <x_malloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [27 x i8] c"Fatal: malloc(%lu) failed\0A\00"
@EXIT_FAILURE = global i32 0
define noalias i8* @x_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %9
4: ; preds = %1
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i64 %0)
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %1
ret i8* %2
}
void INT_Excep_TPU2_TCI2U(void) {}


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TPU2_TCI2U() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t _byteswap32(uint32_t x) {
  return ((x & 0x000000ff) << 24) | ((x & 0x0000ff00) << 8) |
         ((x & 0x00ff0000) >> 8) | ((x & 0xff000000) >> 24);
}


x86 assembly (clang, -O0):
<_byteswap32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
shl    $0x18,%eax
mov    -0x4(%rbp),%ecx
and    $0xff00,%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff0000,%ecx
sar    $0x8,%ecx
or     %ecx,%eax
mov    -0x4(%rbp),%ecx
and    $0xff000000,%ecx
shr    $0x18,%ecx
or     %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @_byteswap32(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 255
%5 = shl i32 %4, 24
%6 = load i32, i32* %2
%7 = and i32 %6, 65280
%8 = shl i32 %7, 8
%9 = or i32 %5, %8
%10 = load i32, i32* %2
%11 = and i32 %10, 16711680
%12 = ashr i32 %11, 8
%13 = or i32 %9, %12
%14 = load i32, i32* %2
%15 = and i32 %14, -16777216
%16 = lshr i32 %15, 24
%17 = or i32 %13, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @_byteswap32(i32 %0) {
%2 = tail call i32 @llvm.bswap.i32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int main(int argc, char **argv) {
  (void)argc;
  (void)argv;
  exit(1);
}


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)
mov    $0x1,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
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 = load i8**, i8*** %5
%8 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
struct ip6_rthdr0 {
  int dummy;
};
struct in6_addr {
  int dummy;
};
typedef int socklen_t;

/* Variables and functions */
#define IPV6_RTHDR_TYPE_0 128
socklen_t inet6_rth_space(int type, int segments) {
  switch (type) {
  case IPV6_RTHDR_TYPE_0:
    if (segments < 0 || segments > 127)
      return 0;
    return sizeof(struct ip6_rthdr0) + segments * sizeof(struct in6_addr);
  }
  return 0;
}


x86 assembly (clang, -O0):
<inet6_rth_space>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x80,%eax
jne    1151 <inet6_rth_space+0x51>
jmp    111d <inet6_rth_space+0x1d>
cmpl   $0x0,-0xc(%rbp)
jl     1131 <inet6_rth_space+0x31>
cmpl   $0x7f,-0xc(%rbp)
jle    113d <inet6_rth_space+0x3d>
movl   $0x0,-0x4(%rbp)
jmp    1158 <inet6_rth_space+0x58>
movslq -0xc(%rbp),%rax
shl    $0x2,%rax
add    $0x4,%rax
mov    %eax,-0x4(%rbp)
jmp    1158 <inet6_rth_space+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<inet6_rth_space>:
xor    %ecx,%ecx
cmp    $0x7f,%esi
lea    0x4(,%rsi,4),%eax
cmova  %ecx,%eax
cmp    $0x80,%edi
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @inet6_rth_space(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
switch i32 %6, label %20 [
i32 128, label %7
]
7: ; preds = %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 0
br i1 %9, label %13, label %10
10: ; preds = %7
%11 = load i32, i32* %5
%12 = icmp sgt i32 %11, 127
br i1 %12, label %13, label %14
13: ; preds = %10, %7
store i32 0, i32* %3
br label %21
14: ; preds = %10
%15 = load i32, i32* %5
%16 = sext i32 %15 to i64
%17 = mul i64 %16, 4
%18 = add i64 4, %17
%19 = trunc i64 %18 to i32
store i32 %19, i32* %3
br label %21
20: ; preds = %2
store i32 0, i32* %3
br label %21
21: ; preds = %20, %14, %13
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @inet6_rth_space(i32 %0, i32 %1) {
%3 = icmp ne i32 %0, 128
%4 = icmp ugt i32 %1, 127
%5 = or i1 %3, %4
%6 = shl i32 %1, 2
%7 = add i32 %6, 4
%8 = select i1 %5, i32 0, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, size_t);
void strf2c(char *cstr, char *fstr, size_t len) {
  strncpy(cstr, fstr, len - 1);
  cstr[len - 1] = '\0';
}


x86 assembly (clang, -O0):
<strf2c>:
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),%rsi
mov    -0x18(%rbp),%rdx
sub    $0x1,%rdx
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strf2c>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
add    $0xffffffffffffffff,%rdx
call   1030 <strncpy@plt>
movb   $0x0,-0x1(%rbx,%r14,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @strf2c(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = sub i64 %9, 1
%11 = call i32 @strncpy(i8* %7, i8* %8, i64 %10)
%12 = load i8*, i8** %4
%13 = load i64, i64* %6
%14 = sub i64 %13, 1
%15 = getelementptr inbounds i8, i8* %12, i64 %14
store i8 0, i8* %15
ret void
}

LLVM IR (-O2):
define void @strf2c(i8* %0, i8* %1, i64 %2) {
%4 = add i64 %2, -1
%5 = tail call i32 @strncpy(i8* %0, i8* %1, i64 %4)
%6 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 0, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fun();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  int ret = 0;
  long nr_of_reductions = 1;
  fun();
  printf("RETURNED %d\n", ret);
  if (ret != 3) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
movq   $0x1,-0x20(%rbp)
mov    $0x0,%al
call   1030 <fun@plt>
mov    -0x14(%rbp),%esi
lea    0xeaa(%rip),%rdi
call   1040 <printf@plt>
cmpl   $0x3,-0x14(%rbp)
je     1171 <main+0x51>
movl   $0x1,-0x4(%rbp)
jmp    1178 <main+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"RETURNED %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @fun()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 0)
ret i32 1
}
void RTLockValidatorClassRetain(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @currentVirtualTerminal_BaseScreen() {
ret i32 0
}
/* Variables and functions */
int ENODEV;
int qpnp_pon_is_warm_reset(void) { return -ENODEV; }


x86 assembly (clang, -O0):
<qpnp_pon_is_warm_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    0x2ed3(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<qpnp_pon_is_warm_reset>:
mov    0x2ed9(%rip),%rcx
xor    %eax,%eax
sub    (%rcx),%eax
ret

LLVM IR (-O0):
@ENODEV = global i32 0
define i32 @qpnp_pon_is_warm_reset() {
%1 = load i32, i32* @ENODEV
%2 = sub nsw i32 0, %1
ret i32 %2
}

LLVM IR (-O2):
@ENODEV = global i32 0
define i32 @qpnp_pon_is_warm_reset() {
%1 = load i32, i32* @ENODEV
%2 = sub nsw i32 0, %1
ret i32 %2
}
/* Variables and functions */
int initClient();
int createClient(char *name) {
  int retValue_acc;
  int client;
  int tmp;
  {
    {
      tmp = initClient();
      client = tmp;
      retValue_acc = client;
    }
    return (retValue_acc);
    return (retValue_acc);
  }
}


x86 assembly (clang, -O0):
<createClient>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <initClient@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @createClient(i8* nocapture readnone %0) {
%2 = tail call i32 (...) @initClient()
ret i32 %2
}
/* Type definitions */
typedef int __le16;

/* Variables and functions */
int cpu_to_le16(int);
int ieee80211_is_rts(__le16 fc) {
  return (fc & cpu_to_le16(0x000c | 0x00f0)) == cpu_to_le16(0x0004 | 0x00B0);
}


x86 assembly (clang, -O0):
<ieee80211_is_rts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
and    %ecx,%eax
mov    %eax,-0x8(%rbp)
mov    $0xb4,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ieee80211_is_rts>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
mov    $0xfc,%edi
call   1030 <cpu_to_le16@plt>
mov    %eax,%ebp
and    %ebx,%ebp
mov    $0xb4,%edi
call   1030 <cpu_to_le16@plt>
xor    %ecx,%ecx
cmp    %eax,%ebp
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @ieee80211_is_rts(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @cpu_to_le16(i32 252)
%5 = and i32 %3, %4
%6 = call i32 @cpu_to_le16(i32 180)
%7 = icmp eq i32 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ieee80211_is_rts(i32 %0) {
%2 = tail call i32 @cpu_to_le16(i32 252)
%3 = and i32 %2, %0
%4 = tail call i32 @cpu_to_le16(i32 180)
%5 = icmp eq i32 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
scalar_t__ strcmp(char *, char *);
int string_equal(void *string1, void *string2) {
  return strcmp((char *)string1, (char *)string2) == 0;
}


x86 assembly (clang, -O0):
<string_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_equal>:
push   %rax
call   1030 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @string_equal(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 = load i8*, i8** %4
%7 = call i64 @strcmp(i8* %5, i8* %6)
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @string_equal(i8* %0, i8* %1) {
%3 = tail call i64 @strcmp(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
void DestroyBiTree() {}


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

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

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

LLVM IR (-O2):
define void @DestroyBiTree() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ os_free(void *);
int /*<<< orphan*/ os_memset(void *, int /*<<< orphan*/, int);
void aes_encrypt_deinit(void *ctx) {
  os_memset(ctx, 0, (4 * 44));
  os_free(ctx);
}


x86 assembly (clang, -O0):
<aes_encrypt_deinit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0xb0,%edx
call   1040 <os_memset@plt>
mov    -0x8(%rbp),%rdi
call   1030 <os_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<aes_encrypt_deinit>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0xb0,%edx
call   1040 <os_memset@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <os_free@plt>

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

LLVM IR (-O2):
define void @aes_encrypt_deinit(i8* %0) {
%2 = tail call i32 @os_memset(i8* %0, i32 0, i32 176)
%3 = tail call i32 @os_free(i8* %0)
ret void
}
void *xset(void *d, const char c, int n) {
  char *dp = d;
  while (n--)
    *dp++ = c;
  return d;
}


x86 assembly (clang, -O0):
<xset>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,%ecx
add    $0xffffffff,%ecx
mov    %ecx,-0x10(%rbp)
cmp    $0x0,%eax
je     1146 <xset+0x46>
mov    -0x9(%rbp),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1119 <xset+0x19>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xset>:
push   %rbx
mov    %rdi,%rbx
test   %edx,%edx
je     1126 <xset+0x16>
mov    %edx,%edx
movzbl %sil,%esi
mov    %rbx,%rdi
call   1030 <memset@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @xset(i8* returned writeonly %0, i8 signext %1, i32 %2) {
%4 = icmp eq i32 %2, 0
br i1 %4, label %7, label %5
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %3
ret i8* %0
}
int pointerComp(const void *a, const void *b) {
  return (const char *)a - (const char *)b;
}


x86 assembly (clang, -O0):
<pointerComp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pointerComp>:
mov    %rdi,%rax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @pointerComp(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 = load i8*, i8** %4
%7 = ptrtoint i8* %5 to i64
%8 = ptrtoint i8* %6 to i64
%9 = sub i64 %7, %8
%10 = trunc i64 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @pointerComp(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub i64 %3, %4
%6 = trunc i64 %5 to i32
ret i32 %6
}
void pbstr(in) char *in;
{
  register int i;
  for (i = (int)strlen(in) - 1; i >= 0; i--)
    pushback(in[i] & 0xFF);
}


x86 assembly (clang, -O0):
<pbstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     116c <pbstr+0x4c>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
and    $0xff,%edi
mov    $0x0,%al
call   1040 <pushback@plt>
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    113b <pbstr+0x1b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pbstr>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <strlen@plt>
test   %eax,%eax
jle    1159 <pbstr+0x39>
mov    %eax,%ebx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
lea    -0x2(%rbx),%eax
movzbl (%r14,%rax,1),%edi
xor    %eax,%eax
call   1040 <pushback@plt>
add    $0xffffffffffffffff,%rbx
cmp    $0x1,%rbx
ja     1140 <pbstr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @pbstr(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = trunc i64 %5 to i32
%7 = sub nsw i32 %6, 1
store i32 %7, i32* %3
br label %8
8: ; preds = %20, %1
%9 = load i32, i32* %3
%10 = icmp sge i32 %9, 0
br i1 %10, label %11, label %23
11: ; preds = %8
%12 = load i8*, i8** %2
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %12, i64 %14
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = and i32 %17, 255
%19 = call i32 (i32, ...) bitcast (i32 (...)* @pushback to i32 (i32, ...)*)(i32 %18)
br label %20
20: ; preds = %11
%21 = load i32, i32* %3
%22 = add nsw i32 %21, -1
store i32 %22, i32* %3
br label %8
23: ; preds = %8
ret void
}

LLVM IR (-O2):
define void @pbstr(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = trunc i64 %2 to i32
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %16
5: ; preds = %1
%6 = and i64 %2, 4294967295
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ %6, %5 ], [ %9, %7 ]
%9 = add nsw i64 %8, -1
%10 = and i64 %9, 4294967295
%11 = getelementptr inbounds i8, i8* %0, i64 %10
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = tail call i32 (i32, ...) bitcast (i32 (...)* @pushback to i32 (i32, ...)*)(i32 %13)
%15 = icmp ugt i64 %8, 1
br i1 %15, label %7, label %16
16: ; preds = %7, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int test() {
  char *array[100];
  printf("sizeof(array) = %d\n", (sizeof((array)) / sizeof((array)[0])));
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x330,%rsp
lea    0xede(%rip),%rdi
mov    $0x64,%esi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x330,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
lea    0xee9(%rip),%rdi
mov    $0x64,%esi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"sizeof(array) = %d\0A\00"
define i32 @test() {
%1 = alloca i32
%2 = alloca [100 x i8*]
%3 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 100)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [20 x i8] c"sizeof(array) = %d\0A\00"
define i32 @test() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 100)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ WNOHANG;
int errno;
scalar_t__ waitpid(int, int /*<<< orphan*/ *, int /*<<< orphan*/);
void chld_reaper(int sig) {
  int saved_errno;
  saved_errno = errno;
  while (waitpid(-1, NULL, WNOHANG) > 0)
    continue;
  errno = saved_errno;
}


x86 assembly (clang, -O0):
<chld_reaper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%edx
mov    $0xffffffff,%edi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <waitpid@plt>
cmp    $0x0,%rax
jle    114d <chld_reaper+0x3d>
jmp    1127 <chld_reaper+0x17>
mov    -0x8(%rbp),%ecx
mov    0x2e81(%rip),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chld_reaper>:
push   %rbp
push   %r14
push   %rbx
mov    0x2ebd(%rip),%r14
mov    (%r14),%ebp
mov    0x2ec3(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    (%rbx),%edx
mov    $0xffffffff,%edi
xor    %esi,%esi
call   1030 <waitpid@plt>
test   %rax,%rax
jg     1130 <chld_reaper+0x20>
mov    %ebp,(%r14)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@errno = global i32 0
@WNOHANG = global i32 0
define void @chld_reaper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* @errno
store i32 %4, i32* %3
br label %5
5: ; preds = %9, %1
%6 = load i32, i32* @WNOHANG
%7 = call i64 @waitpid(i32 -1, i32* null, i32 %6)
%8 = icmp sgt i64 %7, 0
br i1 %8, label %9, label %10
9: ; preds = %5
br label %5
10: ; preds = %5
%11 = load i32, i32* %3
store i32 %11, i32* @errno
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@WNOHANG = global i32 0
define void @chld_reaper(i32 %0) {
%2 = load i32, i32* @errno
br label %3
3: ; preds = %3, %1
%4 = load i32, i32* @WNOHANG
%5 = tail call i64 @waitpid(i32 -1, i32* null, i32 %4)
%6 = icmp sgt i64 %5, 0
br i1 %6, label %3, label %7
7: ; preds = %3
store i32 %2, i32* @errno
ret void
}
void ff_hevc_put_hevc_uni_epel_v64_10_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_epel_v64_10_sse4() {
ret void
}