xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ sleep(int);
int processA(int argc, char **argv) {
  print("kill process A running\n");
  sleep(3);
  return 0;
}


x86 assembly (clang, -O0):
<processA>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeca(%rip),%rdi
call   1030 <print@plt>
mov    $0x3,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<processA>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <print@plt>
mov    $0x3,%edi
call   1040 <sleep@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [24 x i8] c"kill process A running\0A\00"
define i32 @processA(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @print(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%6 = call i32 @sleep(i32 3)
ret i32 0
}

LLVM IR (-O2):
@.str = [24 x i8] c"kill process A running\0A\00"
define i32 @processA(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @print(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @sleep(i32 3)
ret i32 0
}
double test2(double a, double b, double c) { return -a + b * c; }


x86 assembly (clang, -O0):
<test2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
movsd  -0x10(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test2>:
mulsd  %xmm2,%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @test2(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = fneg double %7
%9 = load double, double* %5
%10 = load double, double* %6
%11 = call double @llvm.fmuladd.f64(double %9, double %10, double %8)
ret double %11
}

LLVM IR (-O2):
define double @test2(double %0, double %1, double %2) {
%4 = fneg double %0
%5 = tail call double @llvm.fmuladd.f64(double %1, double %2, double %4)
ret double %5
}
/* Variables and functions */
void *sbrk(int /*<<< orphan*/);
void *mm_init(void *heap_mm) { heap_mm = sbrk(0); }


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

x86 assembly (clang, -O2):
<mm_init>:
xor    %edi,%edi
jmp    1030 <sbrk@plt>

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

LLVM IR (-O2):
define noalias i8* @mm_init(i8* nocapture readnone %0) {
%2 = tail call i8* @sbrk(i32 0)
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ non_existent(int);
void hooray() { non_existent(1); }


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

x86 assembly (clang, -O2):
<hooray>:
mov    $0x1,%edi
jmp    1030 <non_existent@plt>

LLVM IR (-O0):
define void @hooray() {
%1 = call i32 @non_existent(i32 1)
ret void
}

LLVM IR (-O2):
define void @hooray() {
%1 = tail call i32 @non_existent(i32 1)
ret void
}
/* Variables and functions */
char *malloc_char(scalar_t__);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *lisp_strdup(char *str) {
  char *newstr;
  newstr = malloc_char(strlen(str) + 1);
  strcpy(newstr, str);
  return newstr;
}


x86 assembly (clang, -O0):
<lisp_strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
call   1040 <malloc_char@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):
<lisp_strdup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1050 <strlen@plt>
lea    0x1(%rax),%rdi
call   1040 <malloc_char@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* @lisp_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* @malloc_char(i64 %6)
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* @lisp_strdup(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc_char(i64 %3)
%5 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void digitalWrite(int pin, int value) {
  printf("digitalWrite %i-%i\n", pin, value);
}


x86 assembly (clang, -O0):
<digitalWrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<digitalWrite>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"digitalWrite %i-%i\0A\00"
define void @digitalWrite(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 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %5, i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"digitalWrite %i-%i\0A\00"
define void @digitalWrite(i32 %0, i32 %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cdiStreamReadVar(int, int, int, double *, int *);
void streamReadVar(int streamID, int varID, double *data, int *nmiss) {
  cdiStreamReadVar(streamID, varID, 1, data, nmiss);
}


x86 assembly (clang, -O0):
<streamReadVar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%r8
mov    $0x1,%edx
call   1030 <cdiStreamReadVar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<streamReadVar>:
mov    %rcx,%r8
mov    %rdx,%rcx
mov    $0x1,%edx
jmp    1030 <cdiStreamReadVar@plt>

LLVM IR (-O0):
define void @streamReadVar(i32 %0, i32 %1, double* %2, i32* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
%8 = alloca i32*
store i32 %0, i32* %5
store i32 %1, i32* %6
store double* %2, double** %7
store i32* %3, i32** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load double*, double** %7
%12 = load i32*, i32** %8
%13 = call i32 @cdiStreamReadVar(i32 %9, i32 %10, i32 1, double* %11, i32* %12)
ret void
}

LLVM IR (-O2):
define void @streamReadVar(i32 %0, i32 %1, double* %2, i32* %3) {
%5 = tail call i32 @cdiStreamReadVar(i32 %0, i32 %1, i32 1, double* %2, i32* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sdhc_host_found(int /*<<< orphan*/, int, int);
void sdhc_init(void) { sdhc_host_found(0, 0xd070000, 1); }


x86 assembly (clang, -O0):
<sdhc_init>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0xd070000,%esi
mov    $0x1,%edx
call   1030 <sdhc_host_found@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdhc_init>:
xor    %edi,%edi
mov    $0xd070000,%esi
mov    $0x1,%edx
jmp    1030 <sdhc_host_found@plt>

LLVM IR (-O0):
define void @sdhc_init() {
%1 = call i32 @sdhc_host_found(i32 0, i32 218562560, i32 1)
ret void
}

LLVM IR (-O2):
define void @sdhc_init() {
%1 = tail call i32 @sdhc_host_found(i32 0, i32 218562560, i32 1)
ret void
}
/* Variables and functions */
char *malloc(int);
int strcspn(char *, char *);
int /*<<< orphan*/ strncpy(char *, char *, int);
char *chomp(char *line) {
  int idx = strcspn(line, "\r\n");
  char *newline = malloc(sizeof(char) * idx + 1);
  strncpy(newline, line, idx);
  return newline;
}


x86 assembly (clang, -O0):
<chomp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <strcspn@plt>
mov    %eax,-0xc(%rbp)
movslq -0xc(%rbp),%rax
shl    $0x0,%rax
add    $0x1,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <strncpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<chomp>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r14
lea    0xec1(%rip),%rsi
call   1040 <strcspn@plt>
mov    %eax,%r15d
lea    0x1(%r15),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1030 <strncpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"\0D\0A\00"
define i8* @chomp(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @strcspn(i8* %5, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = sext i32 %7 to i64
%9 = mul i64 1, %8
%10 = add i64 %9, 1
%11 = trunc i64 %10 to i32
%12 = call i8* @malloc(i32 %11)
store i8* %12, i8** %4
%13 = load i8*, i8** %4
%14 = load i8*, i8** %2
%15 = load i32, i32* %3
%16 = call i32 @strncpy(i8* %13, i8* %14, i32 %15)
%17 = load i8*, i8** %4
ret i8* %17
}

LLVM IR (-O2):
@.str = [3 x i8] c"\0D\0A\00"
define i8* @chomp(i8* %0) {
%2 = tail call i32 @strcspn(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = add i32 %2, 1
%4 = tail call i8* @malloc(i32 %3)
%5 = tail call i32 @strncpy(i8* %4, i8* %0, i32 %2)
ret i8* %4
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int O_CREAT;
int O_RDWR;
int /*<<< orphan*/ close(int);
char *ctime(int /*<<< orphan*/ *);
int open(char *, int);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int /*<<< orphan*/ write(int, char *, int);
void log_packet(char *data, int size) {
  time_t t;
  char *filename;
  int fd;
  t = time(0);
  filename = ctime(&t);
  fd = open(filename, O_RDWR | O_CREAT);
  write(fd, data, size);
  close(fd);
}


x86 assembly (clang, -O0):
<log_packet>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,-0x10(%rbp)
lea    -0x10(%rbp),%rdi
call   1040 <ctime@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    0x2e5f(%rip),%rax
mov    (%rax),%esi
mov    0x2e6e(%rip),%rax
or     (%rax),%esi
call   1070 <open@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <write@plt>
mov    -0x1c(%rbp),%edi
call   1050 <close@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_packet>:
push   %rbp
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %esi,%r14d
mov    %rdi,%rbx
xor    %edi,%edi
call   1060 <time@plt>
mov    %eax,0xc(%rsp)
lea    0xc(%rsp),%rdi
call   1040 <ctime@plt>
mov    0x2e66(%rip),%rcx
mov    0x2e77(%rip),%rdx
mov    (%rdx),%esi
or     (%rcx),%esi
mov    %rax,%rdi
call   1070 <open@plt>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1030 <write@plt>
mov    %ebp,%edi
call   1050 <close@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@O_RDWR = global i32 0
@O_CREAT = global i32 0
define void @log_packet(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%8 = call i32 @time(i32 0)
store i32 %8, i32* %5
%9 = call i8* @ctime(i32* %5)
store i8* %9, i8** %6
%10 = load i8*, i8** %6
%11 = load i32, i32* @O_RDWR
%12 = load i32, i32* @O_CREAT
%13 = or i32 %11, %12
%14 = call i32 @open(i8* %10, i32 %13)
store i32 %14, i32* %7
%15 = load i32, i32* %7
%16 = load i8*, i8** %3
%17 = load i32, i32* %4
%18 = call i32 @write(i32 %15, i8* %16, i32 %17)
%19 = load i32, i32* %7
%20 = call i32 @close(i32 %19)
ret void
}

LLVM IR (-O2):
@O_RDWR = global i32 0
@O_CREAT = global i32 0
define void @log_packet(i8* nocapture %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32 0)
store i32 %5, i32* %3
%6 = call i8* @ctime(i32* %3)
%7 = load i32, i32* @O_RDWR
%8 = load i32, i32* @O_CREAT
%9 = or i32 %8, %7
%10 = call i32 @open(i8* %6, i32 %9)
%11 = call i32 @write(i32 %10, i8* %0, i32 %1)
%12 = call i32 @close(i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glScalef(double, double, double);
int /*<<< orphan*/ glutSolidCube(double);
void boundingBox(void) {
  glScalef(1.9 * .6, 1.3 * .6, 1.2 * .6);
  glutSolidCube(0.9);
}


x86 assembly (clang, -O0):
<boundingBox>:
push   %rbp
mov    %rsp,%rbp
movsd  0xedc(%rip),%xmm0
movsd  0xedc(%rip),%xmm1
movsd  0xedc(%rip),%xmm2
call   1040 <glScalef@plt>
movsd  0xeb7(%rip),%xmm0
call   1030 <glutSolidCube@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<boundingBox>:
push   %rax
movsd  0xed7(%rip),%xmm0
movsd  0xed7(%rip),%xmm1
movsd  0xed7(%rip),%xmm2
call   1040 <glScalef@plt>
movsd  0xed2(%rip),%xmm0
pop    %rax
jmp    1030 <glutSolidCube@plt>

LLVM IR (-O0):
define void @boundingBox() {
%1 = call i32 @glScalef(double 1.140000e+00, double 7.800000e-01, double 0x3FE70A3D70A3D70A)
%2 = call i32 @glutSolidCube(double 9.000000e-01)
ret void
}

LLVM IR (-O2):
define void @boundingBox() {
%1 = tail call i32 @glScalef(double 1.140000e+00, double 7.800000e-01, double 0x3FE70A3D70A3D70A)
%2 = tail call i32 @glutSolidCube(double 9.000000e-01)
ret void
}
/* Type definitions */
typedef scalar_t__ dev_t;

/* Variables and functions */
scalar_t__ get_dev_id(char const *);
int /*<<< orphan*/ printf(char *, char const *, unsigned int, unsigned int,
                          char *);
void test(const char *path, dev_t slash_id) {
  dev_t dev_id;
  dev_id = get_dev_id(path);
  printf("%s (%d) vs / (%d): %s\n", path, (unsigned int)dev_id,
         (unsigned int)slash_id,
         dev_id == slash_id ? "same device" : "different device");
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <get_dev_id@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rax
mov    %eax,%edx
mov    -0x10(%rbp),%rax
mov    %eax,%ecx
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%r9
lea    0xec7(%rip),%r8
lea    0xeb4(%rip),%rax
cmp    %r9,%rdi
cmove  %rax,%r8
lea    0xe8f(%rip),%rdi
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <get_dev_id@plt>
cmp    %r14,%rax
lea    0xede(%rip),%rcx
lea    0xee3(%rip),%r8
cmove  %rcx,%r8
lea    0xeb5(%rip),%rdi
mov    %rbx,%rsi
mov    %eax,%edx
mov    %r14d,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"%s (%d) vs / (%d): %s\0A\00"
@.str.1 = [12 x i8] c"same device\00"
@.str.2 = [17 x i8] c"different device\00"
define void @test(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = call i64 @get_dev_id(i8* %6)
store i64 %7, i64* %5
%8 = load i8*, i8** %3
%9 = load i64, i64* %5
%10 = trunc i64 %9 to i32
%11 = load i64, i64* %4
%12 = trunc i64 %11 to i32
%13 = load i64, i64* %5
%14 = load i64, i64* %4
%15 = icmp eq i64 %13, %14
%16 = zext i1 %15 to i64
%17 = select i1 %15, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0)
%18 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %10, i32 %12, i8* %17)
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c"%s (%d) vs / (%d): %s\0A\00"
@.str.1 = [12 x i8] c"same device\00"
@.str.2 = [17 x i8] c"different device\00"
define void @test(i8* %0, i64 %1) {
%3 = tail call i64 @get_dev_id(i8* %0)
%4 = trunc i64 %3 to i32
%5 = trunc i64 %1 to i32
%6 = icmp eq i64 %3, %1
%7 = select i1 %6, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0)
%8 = tail call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4, i32 %5, i8* %7)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int lisys_dir_sorter_alpha(const char **name0, const char **name1) {
  return strcmp(*name0, *name1);
}


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

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

LLVM IR (-O0):
define i32 @lisys_dir_sorter_alpha(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** %5
%7 = load i8**, i8*** %4
%8 = load i8*, i8** %7
%9 = call i32 @strcmp(i8* %6, i8* %8)
ret i32 %9
}

LLVM IR (-O2):
define i32 @lisys_dir_sorter_alpha(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(1) %4)
ret i32 %5
}
/* Type definitions */
struct pattern {
  int dummy;
};

/* Variables and functions */
int countlib(int);
int offset(int /*<<< orphan*/, int, int, int);
int autohelperowl_attackpat133(struct pattern *patt, int transformation,
                               int move, int color, int action) {
  int A;
  (void)patt;
  (void)color;
  (void)action;
  A = offset(0, -1, move, transformation);
  return countlib(A) == 1;
}


x86 assembly (clang, -O0):
<autohelperowl_attackpat133>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    -0x10(%rbp),%edx
mov    -0xc(%rbp),%ecx
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1030 <offset@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%edi
call   1040 <countlib@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<autohelperowl_attackpat133>:
push   %rax
mov    %esi,%ecx
xor    %edi,%edi
mov    $0xffffffff,%esi
call   1030 <offset@plt>
mov    %eax,%edi
call   1040 <countlib@plt>
xor    %ecx,%ecx
cmp    $0x1,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat133(%struct.pattern* %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca %struct.pattern*
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store %struct.pattern* %0, %struct.pattern** %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load %struct.pattern*, %struct.pattern** %6
%13 = load i32, i32* %9
%14 = load i32, i32* %10
%15 = load i32, i32* %8
%16 = load i32, i32* %7
%17 = call i32 @offset(i32 0, i32 -1, i32 %15, i32 %16)
store i32 %17, i32* %11
%18 = load i32, i32* %11
%19 = call i32 @countlib(i32 %18)
%20 = icmp eq i32 %19, 1
%21 = zext i1 %20 to i32
ret i32 %21
}

LLVM IR (-O2):
%struct.pattern = type { i32 }
define i32 @autohelperowl_attackpat133(%struct.pattern* nocapture readnone %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @offset(i32 0, i32 -1, i32 %2, i32 %1)
%7 = tail call i32 @countlib(i32 %6)
%8 = icmp eq i32 %7, 1
%9 = zext i1 %8 to i32
ret i32 %9
}
il(pn) int pn;
{ brc(pn, 'L'); }


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

x86 assembly (clang, -O2):
<il>:
mov    $0x4c,%esi
xor    %eax,%eax
jmp    1030 <brc@plt>

LLVM IR (-O0):
define i32 @il(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i32 (i32, i32, ...) bitcast (i32 (...)* @brc to i32 (i32, i32, ...)*)(i32 %4, i32 76)
%6 = load i32, i32* %2
ret i32 %6
}

LLVM IR (-O2):
define i32 @il(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @brc to i32 (i32, i32, ...)*)(i32 %0, i32 76)
ret i32 undef
}
int do_232() { return 232; }


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

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

LLVM IR (-O0):
define i32 @do_232() {
ret i32 232
}

LLVM IR (-O2):
define i32 @do_232() {
ret i32 232
}
int op_mul(int x, int y) { return x * y; }


x86 assembly (clang, -O0):
<op_mul>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
imul   -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<op_mul>:
mov    %edi,%eax
imul   %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @op_mul(i32 %0, i32 %1) {
%3 = mul nsw i32 %1, %0
ret i32 %3
}
/* Type definitions */
struct list {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct list *);
int /*<<< orphan*/ list_clear(struct list *);
void list_destroy(struct list *list) {
  list_clear(list);
  free(list);
}


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

x86 assembly (clang, -O2):
<list_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1040 <list_clear@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.list = type { i32 }
define void @list_destroy(%struct.list* %0) {
%2 = alloca %struct.list*
store %struct.list* %0, %struct.list** %2
%3 = load %struct.list*, %struct.list** %2
%4 = call i32 @list_clear(%struct.list* %3)
%5 = load %struct.list*, %struct.list** %2
%6 = call i32 @free(%struct.list* %5)
ret void
}

LLVM IR (-O2):
%struct.list = type { i32 }
define void @list_destroy(%struct.list* %0) {
%2 = tail call i32 @list_clear(%struct.list* %0)
%3 = tail call i32 @free(%struct.list* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int class;
};
typedef TYPE_1__ Visual;

/* Variables and functions */
void set_Visual_class(void *_p, int _v) { ((Visual *)_p)->class = (int)_v; }


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

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

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_Visual_class(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_Visual_class(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
void SDCard_SaveConfig(void) {}


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

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

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

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

/* Variables and functions */
int EINVAL;
__attribute__((visibility("default"))) int
sd_event_source_set_io_events(void *s, uint32_t events) {
  return -EINVAL;
}


x86 assembly (clang, -O0):
<sd_event_source_set_io_events>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %eax,%eax
mov    0x2ecc(%rip),%rcx
sub    (%rcx),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@EINVAL = global i32 0
define i32 @sd_event_source_set_io_events(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @EINVAL
%6 = sub nsw i32 0, %5
ret i32 %6
}

LLVM IR (-O2):
@EINVAL = global i32 0
define i32 @sd_event_source_set_io_events(i8* nocapture readnone %0, i32 %1) {
%3 = load i32, i32* @EINVAL
%4 = sub nsw i32 0, %3
ret i32 %4
}
void sum_tensors_cholesky_mpi() {}


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

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

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

LLVM IR (-O2):
define void @sum_tensors_cholesky_mpi() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int socket(int, int, int);
int safe_socket(int domain, int type, int protocol) {
  int rvalue = socket(domain, type, protocol);
  if (rvalue == -1) {
    perror("safe_socket - Failed to create socket");
    exit(EXIT_FAILURE);
  }
  return rvalue;
}


x86 assembly (clang, -O0):
<safe_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1050 <socket@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    1176 <safe_socket+0x46>
lea    0xe9d(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e71(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_socket>:
push   %rax
call   1050 <socket@plt>
cmp    $0xffffffff,%eax
je     113d <safe_socket+0xd>
pop    %rcx
ret
lea    0xebc(%rip),%rdi
call   1030 <perror@plt>
mov    0x2e90(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"safe_socket - Failed to create socket\00"
@EXIT_FAILURE = global i32 0
define i32 @safe_socket(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @socket(i32 %8, i32 %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32, i32* %7
%13 = icmp eq i32 %12, -1
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = call i32 @perror(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%16 = load i32, i32* @EXIT_FAILURE
%17 = call i32 @exit(i32 %16)
unreachable
18: ; preds = %3
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@.str = [38 x i8] c"safe_socket - Failed to create socket\00"
@EXIT_FAILURE = global i32 0
define i32 @safe_socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %10
6: ; preds = %3
%7 = tail call i32 @perror(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_FAILURE
%9 = tail call i32 @exit(i32 %8)
unreachable
10: ; preds = %3
ret i32 %4
}
char *langDbgDevZ80() { return "Z80"; }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"Z80\00"
define i8* @langDbgDevZ80() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"Z80\00"
define i8* @langDbgDevZ80() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ baz();
void quux() { baz(); }


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

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

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

LLVM IR (-O2):
define void @quux() {
%1 = tail call i32 (...) @baz()
ret void
}
int main(int argc, const char *argv[]) {
  struct {
    int a;
    float b;
    double c;
  } x, y;
  x.a = 2;
  x.b = 4.0;
  x.c = 8.45;
  y.a = x.a;
  y.b = x.b;
  y.c = x.c;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x2,-0x20(%rbp)
movss  0xee7(%rip),%xmm0
movss  %xmm0,-0x1c(%rbp)
movsd  0xed2(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x20(%rbp),%eax
mov    %eax,-0x30(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.anon = type { i32, float, double }
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca %struct.anon
%7 = alloca %struct.anon
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = getelementptr inbounds %struct.anon, %struct.anon* %6, i32 0, i32 0
store i32 2, i32* %8
%9 = getelementptr inbounds %struct.anon, %struct.anon* %6, i32 0, i32 1
store float 4.000000e+00, float* %9
%10 = getelementptr inbounds %struct.anon, %struct.anon* %6, i32 0, i32 2
store double 0x4020E66666666666, double* %10
%11 = getelementptr inbounds %struct.anon, %struct.anon* %6, i32 0, i32 0
%12 = load i32, i32* %11
%13 = getelementptr inbounds %struct.anon, %struct.anon* %7, i32 0, i32 0
store i32 %12, i32* %13
%14 = getelementptr inbounds %struct.anon, %struct.anon* %6, i32 0, i32 1
%15 = load float, float* %14
%16 = getelementptr inbounds %struct.anon, %struct.anon* %7, i32 0, i32 1
store float %15, float* %16
%17 = getelementptr inbounds %struct.anon, %struct.anon* %6, i32 0, i32 2
%18 = load double, double* %17
%19 = getelementptr inbounds %struct.anon, %struct.anon* %7, i32 0, i32 2
store double %18, double* %19
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ deinitialise();
int /*<<< orphan*/ doTheBusiness();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ initialise(int, char **);
int main(int argc, char *argv[]) {
  initialise(argc, argv);
  doTheBusiness();
  deinitialise();
  exit(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)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1060 <initialise@plt>
mov    $0x0,%al
call   1050 <doTheBusiness@plt>
mov    $0x0,%al
call   1030 <deinitialise@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1060 <initialise@plt>
xor    %eax,%eax
call   1050 <doTheBusiness@plt>
xor    %eax,%eax
call   1030 <deinitialise@plt>
xor    %edi,%edi
call   1040 <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 @initialise(i32 %6, i8** %7)
%9 = call i32 (...) @doTheBusiness()
%10 = call i32 (...) @deinitialise()
%11 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @initialise(i32 %0, i8** %1)
%4 = tail call i32 (...) @doTheBusiness()
%5 = tail call i32 (...) @deinitialise()
%6 = tail call i32 @exit(i32 0)
unreachable
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ send_event;
};
struct TYPE_4__ {
  TYPE_1__ xmaprequest;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
int get_XEvent_xmaprequest_send_event(void *_p) {
  return (int)((XEvent *)_p)->xmaprequest.send_event;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xmaprequest_send_event>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i32 @get_XEvent_xmaprequest_send_event(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @get_XEvent_xmaprequest_send_event(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char *);
char *la_objsearch(const char *name, uintptr_t *cookie, unsigned int flag) {
  if (strcmp(name, "tst-audit11mod2.so") == 0) {
    return (char *)"$ORIGIN/tst-audit11mod2.so";
  }
  return (char *)name;
}


x86 assembly (clang, -O0):
<la_objsearch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeda(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
jne    114d <la_objsearch+0x3d>
lea    0xebc(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    1155 <la_objsearch+0x45>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<la_objsearch>:
push   %rbx
mov    %rdi,%rbx
lea    0xeed(%rip),%rsi
call   1030 <strcmp@plt>
test   %rax,%rax
lea    0xed6(%rip),%rax
cmovne %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"tst-audit11mod2.so\00"
@.str.1 = [27 x i8] c"$ORIGIN/tst-audit11mod2.so\00"
define i8* @la_objsearch(i8* %0, i64* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64*
%7 = alloca i32
store i8* %0, i8** %5
store i64* %1, i64** %6
store i32 %2, i32* %7
%8 = load i8*, i8** %5
%9 = call i64 @strcmp(i8* %8, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%10 = icmp eq i64 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %3
store i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8** %4
br label %14
12: ; preds = %3
%13 = load i8*, i8** %5
store i8* %13, i8** %4
br label %14
14: ; preds = %12, %11
%15 = load i8*, i8** %4
ret i8* %15
}

LLVM IR (-O2):
@.str = [19 x i8] c"tst-audit11mod2.so\00"
@.str.1 = [27 x i8] c"$ORIGIN/tst-audit11mod2.so\00"
define i8* @la_objsearch(i8* %0, i64* nocapture readnone %1, i32 %2) {
%4 = tail call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %0
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int);
unsigned int rightrot(unsigned int, int);
int main(int argc, char **argv) {
  unsigned x = 170;
  x = rightrot(x, 2);
  printf("%u\n", x);
  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   $0xaa,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x2,%esi
call   1040 <rightrot@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 170, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @rightrot(i32 %7, i32 2)
store i32 %8, i32* %6
%9 = load i32, i32* %6
%10 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%u\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @rightrot(i32 170, i32 2)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret i32 0
}
/* Variables and functions */
scalar_t__ LONG_MIN;
long strtox(char const *, char **, int, scalar_t__);
long strtol(const char *restrict s, char **restrict p, int base) {
  return strtox(s, p, base, 0UL + LONG_MIN);
}


x86 assembly (clang, -O0):
<strtol>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    0x2eb3(%rip),%rax
mov    (%rax),%rcx
add    $0x0,%rcx
call   1030 <strtox@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtol>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%rcx
jmp    1030 <strtox@plt>

LLVM IR (-O0):
@LONG_MIN = global i64 0
define i64 @strtol(i8* noalias %0, i8** noalias %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i32
store i8* %0, i8** %4
store i8** %1, i8*** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %4
%8 = load i8**, i8*** %5
%9 = load i32, i32* %6
%10 = load i64, i64* @LONG_MIN
%11 = add i64 0, %10
%12 = call i64 @strtox(i8* %7, i8** %8, i32 %9, i64 %11)
ret i64 %12
}

LLVM IR (-O2):
@LONG_MIN = global i64 0
define i64 @strtol(i8* noalias %0, i8** noalias %1, i32 %2) {
%4 = load i64, i64* @LONG_MIN
%5 = tail call i64 @strtox(i8* %0, i8** %1, i32 %2, i64 %4)
ret i64 %5
}
void destroy_tilepro64() { return; }


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

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

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

LLVM IR (-O2):
define void @destroy_tilepro64() {
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ prg4setBank2(int);
void m31setParams5002(uint16_t addr, uint8_t val) {
  (void)addr;
  prg4setBank2(val << 12);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edi
shl    $0xc,%edi
jmp    1030 <prg4setBank2@plt>

LLVM IR (-O0):
define void @m31setParams5002(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 = shl i32 %6, 12
%8 = call i32 @prg4setBank2(i32 %7)
ret void
}

LLVM IR (-O2):
define void @m31setParams5002(i32 %0, i32 %1) {
%3 = shl i32 %1, 12
%4 = tail call i32 @prg4setBank2(i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ CONSOLE_LocateCursor(int, int);
int /*<<< orphan*/ sscanf(char *, char *, int *, int *);
void console_ESC_H(char *esc_param) {
  int p[2];
  sscanf(esc_param, "%d;%d", &p[0], &p[1]);
  CONSOLE_LocateCursor(p[1], p[0]);
}


x86 assembly (clang, -O0):
<console_ESC_H>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rdx
lea    -0x10(%rbp),%rcx
add    $0x4,%rcx
lea    0xebd(%rip),%rsi
call   1040 <sscanf@plt>
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <CONSOLE_LocateCursor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<console_ESC_H>:
push   %rax
lea    0x4(%rsp),%rcx
lea    0xed3(%rip),%rsi
mov    %rsp,%rdx
call   1040 <sscanf@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%edi
call   1030 <CONSOLE_LocateCursor@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%d;%d\00"
define void @console_ESC_H(i8* %0) {
%2 = alloca i8*
%3 = alloca [2 x i32]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%6 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%7 = call i32 @sscanf(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %5, i32* %6)
%8 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 1
%9 = load i32, i32* %8
%10 = getelementptr inbounds [2 x i32], [2 x i32]* %3, i64 0, i64 0
%11 = load i32, i32* %10
%12 = call i32 @CONSOLE_LocateCursor(i32 %9, i32 %11)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%d;%d\00"
define void @console_ESC_H(i8* nocapture %0) {
%2 = alloca [2 x i32]
%3 = bitcast [2 x i32]* %2 to i8*
%4 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 0
%5 = getelementptr inbounds [2 x i32], [2 x i32]* %2, i64 0, i64 1
%6 = call i32 @sscanf(i8* %0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %4, i32* %5)
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = call i32 @CONSOLE_LocateCursor(i32 %7, i32 %8)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("hello word!");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"hello word!\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
void __init_cpp(void) {}


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

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

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

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

/* Variables and functions */
void QEIVelocityDisable(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000000))) &= ~(0x00000020);
}


x86 assembly (clang, -O0):
<QEIVelocityDisable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x0,%eax
cltq
mov    (%rax),%ecx
and    $0xffffffdf,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<QEIVelocityDisable>:
movslq %edi,%rax
andl   $0xffffffdf,(%rax)
ret

LLVM IR (-O0):
define void @QEIVelocityDisable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 0
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = and i32 %7, -33
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @QEIVelocityDisable(i32 %0) {
%2 = sext i32 %0 to i64
%3 = inttoptr i64 %2 to i32*
%4 = load volatile i32, i32* %3
%5 = and i32 %4, -33
store volatile i32 %5, i32* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void close_csi_device(int fd) { close(fd); }


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

x86 assembly (clang, -O2):
<close_csi_device>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @close_csi_device(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
/* Variables and functions */
double M_PI;
int cos(double);
double JHKeyframeAnimationFunctionEaseInOutSine(double t, double b, double c,
                                                double d) {
  return -c / 2 * (cos(M_PI * t / d) - 1) + b;
}


x86 assembly (clang, -O0):
<JHKeyframeAnimationFunctionEaseInOutSine>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xeb0(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
mov    0x2e88(%rip),%rax
movsd  (%rax),%xmm0
mulsd  -0x8(%rbp),%xmm0
divsd  -0x20(%rbp),%xmm0
call   1030 <cos@plt>
movsd  -0x28(%rbp),%xmm0
sub    $0x1,%eax
cvtsi2sd %eax,%xmm2
movsd  -0x10(%rbp),%xmm1
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<JHKeyframeAnimationFunctionEaseInOutSine>:
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
mulsd  0xede(%rip),%xmm2
movsd  %xmm2,0x8(%rsp)
mov    0x2eb9(%rip),%rax
mulsd  (%rax),%xmm0
divsd  %xmm3,%xmm0
call   1030 <cos@plt>
add    $0xffffffff,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mulsd  0x8(%rsp),%xmm0
addsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
@M_PI = global double 0.000000e+00
define double @JHKeyframeAnimationFunctionEaseInOutSine(double %0, double %1, double %2, double %3) {
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
store double %3, double* %8
%9 = load double, double* %7
%10 = fneg double %9
%11 = fdiv double %10, 2.000000e+00
%12 = load double, double* @M_PI
%13 = load double, double* %5
%14 = fmul double %12, %13
%15 = load double, double* %8
%16 = fdiv double %14, %15
%17 = call i32 @cos(double %16)
%18 = sub nsw i32 %17, 1
%19 = sitofp i32 %18 to double
%20 = load double, double* %6
%21 = call double @llvm.fmuladd.f64(double %11, double %19, double %20)
ret double %21
}

LLVM IR (-O2):
@M_PI = global double 0.000000e+00
define double @JHKeyframeAnimationFunctionEaseInOutSine(double %0, double %1, double %2, double %3) {
%5 = fmul double %2, -5.000000e-01
%6 = load double, double* @M_PI
%7 = fmul double %6, %0
%8 = fdiv double %7, %3
%9 = tail call i32 @cos(double %8)
%10 = add nsw i32 %9, -1
%11 = sitofp i32 %10 to double
%12 = tail call double @llvm.fmuladd.f64(double %5, double %11, double %1)
ret double %12
}
/* Variables and functions */
int /*<<< orphan*/ do_csi(char *);
void mc_print_all_pages(void) { do_csi("?11i"); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c"?11i\00"
define void @mc_print_all_pages() {
%1 = call i32 @do_csi(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"?11i\00"
define void @mc_print_all_pages() {
%1 = tail call i32 @do_csi(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}