xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ funcionA(char);
int main(void) {
  funcionA('z');
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x7a,%edi
call   1030 <funcionA@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @funcionA(i8 signext 122)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @funcionA(i8 signext 122)
ret i32 0
}
void glPopMatrix(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glPopMatrix() {
ret void
}
/* Variables and functions */
double THRandom_normal(double, double);
double Random_normal(double mean, double stdv) {
  return THRandom_normal(mean, stdv);
}


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

x86 assembly (clang, -O2):
<Random_normal>:
jmp    1030 <THRandom_normal@plt>

LLVM IR (-O0):
define double @Random_normal(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = call double @THRandom_normal(double %5, double %6)
ret double %7
}

LLVM IR (-O2):
define double @Random_normal(double %0, double %1) {
%3 = tail call double @THRandom_normal(double %0, double %1)
ret double %3
}
/* Variables and functions */
float smith_waterman_custom(char const *, char const *, int /*<<< orphan*/);
int /*<<< orphan*/ sub_cost_1_min_2();
float smith_waterman(const char *str1, const char *str2) {
  return (smith_waterman_custom(str1, str2, sub_cost_1_min_2()));
}


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

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

LLVM IR (-O0):
define float @smith_waterman(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 i32 (...) @sub_cost_1_min_2()
%8 = call float @smith_waterman_custom(i8* %5, i8* %6, i32 %7)
ret float %8
}

LLVM IR (-O2):
define float @smith_waterman(i8* %0, i8* %1) {
%3 = tail call i32 (...) @sub_cost_1_min_2()
%4 = tail call float @smith_waterman_custom(i8* %0, i8* %1, i32 %3)
ret float %4
}
signed long long signedlonglong_ignoring_unsignedint(signed long long x,
                                                     unsigned int y) {
  return x;
}


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

x86 assembly (clang, -O2):
<signedlonglong_ignoring_unsignedint>:
mov    %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @signedlonglong_ignoring_unsignedint(i64 returned %0, i32 %1) {
ret i64 %0
}
/* Variables and functions */
int /*<<< orphan*/ X_OK;
scalar_t__ access(char *, int /*<<< orphan*/);
int executable_exists(char *path) { return (access(path, X_OK) == 0); }


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

x86 assembly (clang, -O2):
<executable_exists>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@X_OK = global i32 0
define i32 @executable_exists(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i32, i32* @X_OK
%5 = call i64 @access(i8* %3, i32 %4)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@X_OK = global i32 0
define i32 @executable_exists(i8* nocapture %0) {
%2 = load i32, i32* @X_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int hash(const char *s, int n) {
  unsigned hashval;
  for (hashval = 0; *s != '\0'; s++)
    hashval = (*s + 31 * hashval);
  return hashval % n;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1143 <hash+0x43>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
imul   $0x1f,-0x10(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1112 <hash+0x12>
mov    -0x10(%rbp),%eax
xor    %edx,%edx
divl   -0xc(%rbp)
mov    %edx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     1129 <hash+0x29>
add    $0x1,%rdi
xor    %edx,%edx
mov    %edx,%eax
xchg   %ax,%ax
movsbl %cl,%ecx
shl    $0x5,%eax
sub    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1110 <hash+0x10>
jmp    112b <hash+0x2b>
xor    %eax,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0, i32 %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %15, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %13, %5 ], [ %3, %2 ]
%7 = phi i32 [ %11, %5 ], [ 0, %2 ]
%8 = phi i8* [ %12, %5 ], [ %0, %2 ]
%9 = sext i8 %6 to i32
%10 = mul i32 %7, 31
%11 = add i32 %10, %9
%12 = getelementptr inbounds i8, i8* %8, i64 1
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %5
15: ; preds = %5, %2
%16 = phi i32 [ 0, %2 ], [ %11, %5 ]
%17 = urem i32 %16, %1
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void badusage(void) {
  fprintf(stderr,
          "Usage: fsalequal [-ip d/s] [-silent] [-v] filename1 filename2\n");
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [63 x i8] c"Usage: fsalequal [-ip d/s] [-silent] [-v] filename1 filename2\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [63 x i8] c"Usage: fsalequal [-ip d/s] [-silent] [-v] filename1 filename2\0A\00"
define void @badusage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void foo() {
  int x = 20;
  int *p = &x;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x14,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca i32
%2 = alloca i32*
store i32 20, i32* %1
store i32* %1, i32** %2
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
/* Type definitions */
typedef unsigned char uint16_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
void read16(FILE *in, uint16_t *p) {
  unsigned char q[2];
  fread(q, 1, 2, in);
  *p = q[0] | q[1] << 8;
  return;
}


x86 assembly (clang, -O0):
<read16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x12(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fread@plt>
movzbl -0x12(%rbp),%eax
movzbl -0x11(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read16>:
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%rcx
lea    0xe(%rsp),%rdi
mov    $0x1,%esi
mov    $0x2,%edx
call   1030 <fread@plt>
mov    0xe(%rsp),%al
mov    %al,(%rbx)
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define void @read16(i32* %0, i8* %1) {
%3 = alloca i32*
%4 = alloca i8*
%5 = alloca [2 x i8]
store i32* %0, i32** %3
store i8* %1, i8** %4
%6 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%7 = load i32*, i32** %3
%8 = call i32 @fread(i8* %6, i32 1, i32 2, i32* %7)
%9 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 0
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = getelementptr inbounds [2 x i8], [2 x i8]* %5, i64 0, i64 1
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = shl i32 %14, 8
%16 = or i32 %11, %15
%17 = trunc i32 %16 to i8
%18 = load i8*, i8** %4
store i8 %17, i8* %18
ret void
}

LLVM IR (-O2):
define void @read16(i32* nocapture %0, i8* nocapture writeonly %1) {
%3 = alloca [2 x i8]
%4 = getelementptr inbounds [2 x i8], [2 x i8]* %3, i64 0, i64 0
%5 = call i32 @fread(i8* %4, i32 1, i32 2, i32* %0)
%6 = load i8, i8* %4
store i8 %6, i8* %1
ret void
}
int do_397() { return 397; }


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

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

LLVM IR (-O0):
define i32 @do_397() {
ret i32 397
}

LLVM IR (-O2):
define i32 @do_397() {
ret i32 397
}
void SPUsetAddr(unsigned char ch, unsigned short waddr) {}


x86 assembly (clang, -O0):
<SPUsetAddr>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @SPUsetAddr(i8 zeroext %0, i16 zeroext %1) {
%3 = alloca i8
%4 = alloca i16
store i8 %0, i8* %3
store i16 %1, i16* %4
ret void
}

LLVM IR (-O2):
define void @SPUsetAddr(i8 zeroext %0, i16 zeroext %1) {
ret void
}
void GLUE_STORE_P1_TO_STACK_AT_OFFS(void *b, int offs) {
  *(unsigned int *)b = 0x90610000 + (offs & 0xffff);
}


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

x86 assembly (clang, -O2):
<GLUE_STORE_P1_TO_STACK_AT_OFFS>:
movzwl %si,%eax
or     $0x90610000,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @GLUE_STORE_P1_TO_STACK_AT_OFFS(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 = and i32 %5, 65535
%7 = add i32 -1872691200, %6
%8 = load i8*, i8** %3
%9 = bitcast i8* %8 to i32*
store i32 %7, i32* %9
ret void
}

LLVM IR (-O2):
define void @GLUE_STORE_P1_TO_STACK_AT_OFFS(i8* nocapture writeonly %0, i32 %1) {
%3 = and i32 %1, 65535
%4 = or i32 %3, -1872691200
%5 = bitcast i8* %0 to i32*
store i32 %4, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ uart_printf(char *, char const *, char const *);
void exit_with_error(const char *f, const char *e) {
  uart_printf("Nspire I/O: in %s: %s\n", f, e);
  abort();
}


x86 assembly (clang, -O0):
<exit_with_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xec1(%rip),%rdi
call   1040 <uart_printf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<exit_with_error>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xed2(%rip),%rdi
call   1040 <uart_printf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"Nspire I/O: in %s: %s\0A\00"
define void @exit_with_error(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 i32 @uart_printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %5, i8* %6)
%8 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@.str = [23 x i8] c"Nspire I/O: in %s: %s\0A\00"
define void @exit_with_error(i8* %0, i8* %1) {
%3 = tail call i32 @uart_printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%4 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ UnitTest_report();
int /*<<< orphan*/ testKnnEstimateQuery();
int /*<<< orphan*/ testKnnNearestIndices();
int /*<<< orphan*/ testKnnReestimateQueryIndex();
int /*<<< orphan*/ testKnnSmooth();
int main(int argc, char **argv) {
  testKnnNearestIndices();
  testKnnReestimateQueryIndex();
  testKnnEstimateQuery();
  testKnnSmooth();
  UnitTest_report();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1040 <testKnnNearestIndices@plt>
mov    $0x0,%al
call   1070 <testKnnReestimateQueryIndex@plt>
mov    $0x0,%al
call   1030 <testKnnEstimateQuery@plt>
mov    $0x0,%al
call   1050 <testKnnSmooth@plt>
mov    $0x0,%al
call   1060 <UnitTest_report@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <testKnnNearestIndices@plt>
xor    %eax,%eax
call   1070 <testKnnReestimateQueryIndex@plt>
xor    %eax,%eax
call   1030 <testKnnEstimateQuery@plt>
xor    %eax,%eax
call   1050 <testKnnSmooth@plt>
xor    %eax,%eax
call   1060 <UnitTest_report@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 (...) @testKnnNearestIndices()
%6 = call i32 (...) @testKnnReestimateQueryIndex()
%7 = call i32 (...) @testKnnEstimateQuery()
%8 = call i32 (...) @testKnnSmooth()
%9 = call i32 (...) @UnitTest_report()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @testKnnNearestIndices()
%4 = tail call i32 (...) @testKnnReestimateQueryIndex()
%5 = tail call i32 (...) @testKnnEstimateQuery()
%6 = tail call i32 (...) @testKnnSmooth()
%7 = tail call i32 (...) @UnitTest_report()
ret i32 0
}
/* Variables and functions */
scalar_t__ strcmp(char const *, char const *);
int strequal(const char *one, const char *two) { return strcmp(one, two) == 0; }


x86 assembly (clang, -O0):
<strequal>:
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):
<strequal>:
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 @strequal(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 @strequal(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
}
/* Variables and functions */
bool perf_possible(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @perf_possible() {
ret i32 0
}
void copy_bytes(to_cp, from_cp, nr_bytes) register char *to_cp, *from_cp;
register int nr_bytes;
{
  if (to_cp < from_cp)
    copy_bytes_up(to_cp, from_cp, nr_bytes);
  else
    copy_bytes_down(to_cp, from_cp, nr_bytes);
}


x86 assembly (clang, -O0):
<copy_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1158 <copy_bytes+0x38>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1030 <copy_bytes_up@plt>
jmp    116a <copy_bytes+0x4a>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    $0x0,%al
call   1040 <copy_bytes_down@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_bytes>:
xor    %eax,%eax
cmp    %rsi,%rdi
jae    112c <copy_bytes+0xc>
jmp    1030 <copy_bytes_up@plt>
jmp    1040 <copy_bytes_down@plt>

LLVM IR (-O0):
define void @copy_bytes(i8* %0, i8* %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 = icmp ult i8* %7, %8
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load i8*, i8** %5
%13 = load i32, i32* %6
%14 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @copy_bytes_up to i32 (i8*, i8*, i32, ...)*)(i8* %11, i8* %12, i32 %13)
br label %20
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = load i8*, i8** %5
%18 = load i32, i32* %6
%19 = call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @copy_bytes_down to i32 (i8*, i8*, i32, ...)*)(i8* %16, i8* %17, i32 %18)
br label %20
20: ; preds = %15, %10
ret void
}

LLVM IR (-O2):
define void @copy_bytes(i8* %0, i8* %1, i32 %2) {
%4 = icmp ult i8* %0, %1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @copy_bytes_up to i32 (i8*, i8*, i32, ...)*)(i8* %0, i8* %1, i32 %2)
br label %9
7: ; preds = %3
%8 = tail call i32 (i8*, i8*, i32, ...) bitcast (i32 (...)* @copy_bytes_down to i32 (i8*, i8*, i32, ...)*)(i8* %0, i8* %1, i32 %2)
br label %9
9: ; preds = %7, %5
ret void
}
int do_783() { return 783; }


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

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

LLVM IR (-O0):
define i32 @do_783() {
ret i32 783
}

LLVM IR (-O2):
define i32 @do_783() {
ret i32 783
}
/* Variables and functions */
int /*<<< orphan*/ basicIntake(int /*<<< orphan*/);
int /*<<< orphan*/ basicLift(int /*<<< orphan*/);
int /*<<< orphan*/ drive(int /*<<< orphan*/);
int /*<<< orphan*/ resetDriveEncoders(int /*<<< orphan*/);
int /*<<< orphan*/ wait1Msec(int);
void resetAll(int wait) {
  drive(0);
  basicIntake(0);
  basicLift(0);
  resetDriveEncoders(0);
  wait1Msec(wait);
}


x86 assembly (clang, -O0):
<resetAll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1060 <drive@plt>
xor    %edi,%edi
call   1050 <basicIntake@plt>
xor    %edi,%edi
call   1070 <basicLift@plt>
xor    %edi,%edi
call   1030 <resetDriveEncoders@plt>
mov    -0x4(%rbp),%edi
call   1040 <wait1Msec@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<resetAll>:
push   %rbx
mov    %edi,%ebx
xor    %edi,%edi
call   1060 <drive@plt>
xor    %edi,%edi
call   1050 <basicIntake@plt>
xor    %edi,%edi
call   1070 <basicLift@plt>
xor    %edi,%edi
call   1030 <resetDriveEncoders@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <wait1Msec@plt>

LLVM IR (-O0):
define void @resetAll(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @drive(i32 0)
%4 = call i32 @basicIntake(i32 0)
%5 = call i32 @basicLift(i32 0)
%6 = call i32 @resetDriveEncoders(i32 0)
%7 = load i32, i32* %2
%8 = call i32 @wait1Msec(i32 %7)
ret void
}

LLVM IR (-O2):
define void @resetAll(i32 %0) {
%2 = tail call i32 @drive(i32 0)
%3 = tail call i32 @basicIntake(i32 0)
%4 = tail call i32 @basicLift(i32 0)
%5 = tail call i32 @resetDriveEncoders(i32 0)
%6 = tail call i32 @wait1Msec(i32 %0)
ret void
}
long double zstdtrl(k, t)
long double k, t;
{
  int ki;
  long double y;
  ki = k;
  y = stdtrl(ki, t);
  return (y);
}


x86 assembly (clang, -O0):
<zstdtrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fnstcw -0x4a(%rbp)
movzwl -0x4a(%rbp),%eax
or     $0xc00,%eax
mov    %ax,-0x4c(%rbp)
fldcw  -0x4c(%rbp)
fistpl -0x48(%rbp)
fldcw  -0x4a(%rbp)
mov    -0x48(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x24(%rbp),%edi
fldt   -0x20(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
xor    %eax,%eax
call   1030 <stdtrl@plt>
mov    %eax,-0x44(%rbp)
fildl  -0x44(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<zstdtrl>:
sub    $0x28,%rsp
fldt   0x40(%rsp)
fldt   0x30(%rsp)
fnstcw 0x1c(%rsp)
movzwl 0x1c(%rsp),%eax
or     $0xc00,%eax
mov    %ax,0x1e(%rsp)
fldcw  0x1e(%rsp)
fistpl 0x20(%rsp)
fldcw  0x1c(%rsp)
mov    0x20(%rsp),%edi
fstpt  (%rsp)
xor    %eax,%eax
call   1030 <stdtrl@plt>
mov    %eax,0x24(%rsp)
fildl  0x24(%rsp)
add    $0x28,%rsp
ret

LLVM IR (-O0):
define x86_fp80 @zstdtrl(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
%5 = alloca i32
%6 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%7 = load x86_fp80, x86_fp80* %3
%8 = fptosi x86_fp80 %7 to i32
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load x86_fp80, x86_fp80* %4
%11 = call i32 (i32, x86_fp80, ...) bitcast (i32 (...)* @stdtrl to i32 (i32, x86_fp80, ...)*)(i32 %9, x86_fp80 %10)
%12 = sitofp i32 %11 to x86_fp80
store x86_fp80 %12, x86_fp80* %6
%13 = load x86_fp80, x86_fp80* %6
ret x86_fp80 %13
}

LLVM IR (-O2):
define x86_fp80 @zstdtrl(x86_fp80 %0, x86_fp80 %1) {
%3 = fptosi x86_fp80 %0 to i32
%4 = tail call i32 (i32, x86_fp80, ...) bitcast (i32 (...)* @stdtrl to i32 (i32, x86_fp80, ...)*)(i32 %3, x86_fp80 %1)
%5 = sitofp i32 %4 to x86_fp80
ret x86_fp80 %5
}
/* Type definitions */
typedef char *self;

/* Variables and functions */
int /*<<< orphan*/ strlen(char *);
scalar_t__ strncmp(char const *, char *, int /*<<< orphan*/);
int libbun_startsWith(char *self, char *prefix, size_t toffset) {
  const char *ttext = (self) + toffset;
  return strncmp(ttext, prefix, strlen(prefix)) == 0;
}


x86 assembly (clang, -O0):
<libbun_startsWith>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x30(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<libbun_startsWith>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
add    %rdx,%rbx
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %eax,%edx
call   1030 <strncmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @libbun_startsWith(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%8 = load i8*, i8** %4
%9 = load i64, i64* %6
%10 = getelementptr inbounds i8, i8* %8, i64 %9
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8*, i8** %5
%13 = load i8*, i8** %5
%14 = call i32 @strlen(i8* %13)
%15 = call i64 @strncmp(i8* %11, i8* %12, i32 %14)
%16 = icmp eq i64 %15, 0
%17 = zext i1 %16 to i32
ret i32 %17
}

LLVM IR (-O2):
define i32 @libbun_startsWith(i8* %0, i8* %1, i64 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 %2
%5 = tail call i32 @strlen(i8* %1)
%6 = tail call i64 @strncmp(i8* %4, i8* %1, i32 %5)
%7 = icmp eq i64 %6, 0
%8 = zext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
scalar_t__ shim_enosys(int /*<<< orphan*/, int, unsigned int);
int shim_process_mrelease(int pidfd, unsigned int flags) {
  return (int)shim_enosys(0, pidfd, flags);
}


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

x86 assembly (clang, -O2):
<shim_process_mrelease>:
mov    %esi,%edx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <shim_enosys@plt>

LLVM IR (-O0):
define i32 @shim_process_mrelease(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 i64 @shim_enosys(i32 0, i32 %5, i32 %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @shim_process_mrelease(i32 %0, i32 %1) {
%3 = tail call i64 @shim_enosys(i32 0, i32 %0, i32 %1)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
long get_num(char *, char *);
char *long2str(char *, int /*<<< orphan*/);
int /*<<< orphan*/ tt_nmomenta(int, long);
char *macttNMomenta(char *arg) {
  int tbl;
  long top;
  top = get_num("ttNMomenta", arg);
  tbl = (int)get_num("ttNMomenta", arg);
  return (long2str(arg, tt_nmomenta(tbl, top)));
}


x86 assembly (clang, -O0):
<macttNMomenta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xeb9(%rip),%rdi
call   1030 <get_num@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xea5(%rip),%rdi
call   1030 <get_num@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1050 <tt_nmomenta@plt>
mov    -0x20(%rbp),%rdi
mov    %eax,%esi
call   1040 <long2str@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<macttNMomenta>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
lea    0xec1(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
mov    %rax,%r15
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <get_num@plt>
mov    %eax,%edi
mov    %r15,%rsi
call   1050 <tt_nmomenta@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %r15
jmp    1040 <long2str@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"ttNMomenta\00"
define i8* @macttNMomenta(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i64
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i64 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %5)
store i64 %6, i64* %4
%7 = load i8*, i8** %2
%8 = call i64 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = trunc i64 %8 to i32
store i32 %9, i32* %3
%10 = load i8*, i8** %2
%11 = load i32, i32* %3
%12 = load i64, i64* %4
%13 = call i32 @tt_nmomenta(i32 %11, i64 %12)
%14 = call i8* @long2str(i8* %10, i32 %13)
ret i8* %14
}

LLVM IR (-O2):
@.str = [11 x i8] c"ttNMomenta\00"
define i8* @macttNMomenta(i8* %0) {
%2 = tail call i64 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i64 @get_num(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = trunc i64 %3 to i32
%5 = tail call i32 @tt_nmomenta(i32 %4, i64 %2)
%6 = tail call i8* @long2str(i8* %0, i32 %5)
ret i8* %6
}
/* Type definitions */
struct _diva_segment_alloc {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ diva_destroy_segment_alloc(struct _diva_segment_alloc **);
void release_proc(struct _diva_segment_alloc **pI) {
  diva_destroy_segment_alloc(pI);
}


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

x86 assembly (clang, -O2):
<release_proc>:
jmp    1030 <diva_destroy_segment_alloc@plt>

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

LLVM IR (-O2):
%struct._diva_segment_alloc = type { i32 }
define void @release_proc(%struct._diva_segment_alloc** %0) {
%2 = tail call i32 @diva_destroy_segment_alloc(%struct._diva_segment_alloc** %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *pppoat_alloc(size_t);
void *pppoat_calloc(size_t nmemb, size_t size) {
  size_t arr_size = nmemb * size;
  void *ptr = pppoat_alloc(arr_size);
  if (ptr != NULL)
    memset(ptr, 0, arr_size);
  return ptr;
}


x86 assembly (clang, -O0):
<pppoat_calloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <pppoat_alloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1164 <pppoat_calloc+0x44>
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rdx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pppoat_calloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <pppoat_alloc@plt>
mov    %rax,%r14
test   %rax,%rax
je     1148 <pppoat_calloc+0x28>
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @pppoat_calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
%6 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = mul i64 %7, %8
store i64 %9, i64* %5
%10 = load i64, i64* %5
%11 = call i8* @pppoat_alloc(i64 %10)
store i8* %11, i8** %6
%12 = load i8*, i8** %6
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %18
14: ; preds = %2
%15 = load i8*, i8** %6
%16 = load i64, i64* %5
%17 = call i32 @memset(i8* %15, i32 0, i64 %16)
br label %18
18: ; preds = %14, %2
%19 = load i8*, i8** %6
ret i8* %19
}

LLVM IR (-O2):
define i8* @pppoat_calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @pppoat_alloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
br label %8
8: ; preds = %6, %2
ret i8* %4
}
/* Type definitions */
struct pure_option {
  int dummy;
};

/* Variables and functions */
int pure_getopt_internal(int, char *const *, char const *,
                         struct pure_option const *, int *, int);
int pure_getopt_long_only(int nargc, char *const *nargv, const char *options,
                          const struct pure_option *long_options, int *idx) {
  return pure_getopt_internal(nargc, nargv, options, long_options, idx,
                              0x01 | 0x04);
}


x86 assembly (clang, -O0):
<pure_getopt_long_only>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x28(%rbp),%r8
mov    $0x5,%r9d
call   1030 <pure_getopt_internal@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pure_getopt_long_only>:
mov    $0x5,%r9d
jmp    1030 <pure_getopt_internal@plt>

LLVM IR (-O0):
%struct.pure_option = type { i32 }
define i32 @pure_getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.pure_option* %3, i32* %4) {
%6 = alloca i32
%7 = alloca i8**
%8 = alloca i8*
%9 = alloca %struct.pure_option*
%10 = alloca i32*
store i32 %0, i32* %6
store i8** %1, i8*** %7
store i8* %2, i8** %8
store %struct.pure_option* %3, %struct.pure_option** %9
store i32* %4, i32** %10
%11 = load i32, i32* %6
%12 = load i8**, i8*** %7
%13 = load i8*, i8** %8
%14 = load %struct.pure_option*, %struct.pure_option** %9
%15 = load i32*, i32** %10
%16 = call i32 @pure_getopt_internal(i32 %11, i8** %12, i8* %13, %struct.pure_option* %14, i32* %15, i32 5)
ret i32 %16
}

LLVM IR (-O2):
%struct.pure_option = type { i32 }
define i32 @pure_getopt_long_only(i32 %0, i8** %1, i8* %2, %struct.pure_option* %3, i32* %4) {
%6 = tail call i32 @pure_getopt_internal(i32 %0, i8** %1, i8* %2, %struct.pure_option* %3, i32* %4, i32 5)
ret i32 %6
}
/* Variables and functions */
int testfunction(int arg1, int *arg2) { return arg2[arg1]; }


x86 assembly (clang, -O0):
<testfunction>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<testfunction>:
movslq %edi,%rax
mov    (%rsi,%rax,4),%eax
ret

LLVM IR (-O0):
define i32 @testfunction(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
store i32 %0, i32* %3
store i32* %1, i32** %4
%5 = load i32*, i32** %4
%6 = load i32, i32* %3
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i32, i32* %5, i64 %7
%9 = load i32, i32* %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @testfunction(i32 %0, i32* nocapture %1) {
%3 = sext i32 %0 to i64
%4 = getelementptr inbounds i32, i32* %1, i64 %3
%5 = load i32, i32* %4
ret i32 %5
}
double get_speed_from_automation(double value) {
  if (value < 0.0)
    return 1.0 - value;
  else
    return 1.0 / (1.0 + value);
}


x86 assembly (clang, -O0):
<get_speed_from_automation>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    112e <get_speed_from_automation+0x2e>
movsd  0xee1(%rip),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    114c <get_speed_from_automation+0x4c>
movsd  0xeca(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
movsd  0xebd(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_speed_from_automation>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    111b <get_speed_from_automation+0x1b>
movsd  0xeee(%rip),%xmm1
subsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret
movsd  0xedd(%rip),%xmm1
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @get_speed_from_automation(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = fsub double 1.000000e+00, %7
store double %8, double* %2
br label %13
9: ; preds = %1
%10 = load double, double* %3
%11 = fadd double 1.000000e+00, %10
%12 = fdiv double 1.000000e+00, %11
store double %12, double* %2
br label %13
13: ; preds = %9, %6
%14 = load double, double* %2
ret double %14
}

LLVM IR (-O2):
define double @get_speed_from_automation(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = fsub double 1.000000e+00, %0
br label %8
5: ; preds = %1
%6 = fadd double %0, 1.000000e+00
%7 = fdiv double 1.000000e+00, %6
br label %8
8: ; preds = %5, %3
%9 = phi double [ %4, %3 ], [ %7, %5 ]
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_dump_path();
void test_3(int flag) {
  if (flag)
    if (!flag)
      __analyzer_dump_path();
}


x86 assembly (clang, -O0):
<test_3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     113b <test_3+0x2b>
cmpl   $0x0,-0x4(%rbp)
jne    1136 <test_3+0x26>
mov    $0x0,%al
call   1030 <__analyzer_dump_path@plt>
jmp    113b <test_3+0x2b>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test_3(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %11
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp ne i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %5
%9 = call i32 (...) @__analyzer_dump_path()
br label %10
10: ; preds = %8, %5
br label %11
11: ; preds = %10, %1
ret void
}

LLVM IR (-O2):
define void @test_3(i32 %0) {
ret void
}
void soru_7(int dizi[]) {}


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

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

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

LLVM IR (-O2):
define void @soru_7(i32* nocapture %0) {
ret void
}
void gtk_button_get_use_underline() {}


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

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

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

LLVM IR (-O2):
define void @gtk_button_get_use_underline() {
ret void
}
/* Variables and functions */
long exec___NativeString_system___impl(char *);
long core__exec___NativeString___system(char *self) {
  long var;
  long var1;
  var1 = exec___NativeString_system___impl(self);
  var = var1;
  goto RET_LABEL;
RET_LABEL:;
  return var;
}


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

x86 assembly (clang, -O2):
<core__exec___NativeString___system>:
jmp    1030 <exec___NativeString_system___impl@plt>

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

LLVM IR (-O2):
define i64 @core__exec___NativeString___system(i8* %0) {
%2 = tail call i64 @exec___NativeString_system___impl(i8* %0)
ret i64 %2
}
/* Type definitions */
struct sockaddr_in6 {
  int /*<<< orphan*/ sin6_addr;
};
struct sockaddr_in {
  int /*<<< orphan*/ sin_addr;
};
struct sockaddr {
  scalar_t__ sa_family;
};

/* Variables and functions */
scalar_t__ AF_INET;
void *getaddr(const void *sa) {
  return ((struct sockaddr *)sa)->sa_family == AF_INET
             ? (void *)&((struct sockaddr_in *)sa)->sin_addr
             : (void *)&((struct sockaddr_in6 *)sa)->sin6_addr;
}


x86 assembly (clang, -O0):
<getaddr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    0x2ed2(%rip),%rcx
cmp    (%rcx),%rax
jne    112c <getaddr+0x2c>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <getaddr+0x34>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getaddr>:
mov    %rdi,%rax
ret

LLVM IR (-O0):
%struct.sockaddr = type { i64 }
%struct.sockaddr_in = type { i32 }
%struct.sockaddr_in6 = type { i32 }
@AF_INET = global i64 0
define i8* @getaddr(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.sockaddr*
%5 = getelementptr inbounds %struct.sockaddr, %struct.sockaddr* %4, i32 0, i32 0
%6 = load i64, i64* %5
%7 = load i64, i64* @AF_INET
%8 = icmp eq i64 %6, %7
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = bitcast i8* %10 to %struct.sockaddr_in*
%12 = getelementptr inbounds %struct.sockaddr_in, %struct.sockaddr_in* %11, i32 0, i32 0
%13 = bitcast i32* %12 to i8*
br label %19
14: ; preds = %1
%15 = load i8*, i8** %2
%16 = bitcast i8* %15 to %struct.sockaddr_in6*
%17 = getelementptr inbounds %struct.sockaddr_in6, %struct.sockaddr_in6* %16, i32 0, i32 0
%18 = bitcast i32* %17 to i8*
br label %19
19: ; preds = %14, %9
%20 = phi i8* [ %13, %9 ], [ %18, %14 ]
ret i8* %20
}

LLVM IR (-O2):
@AF_INET = global i64 0
define i8* @getaddr(i8* readnone returned %0) {
ret i8* %0
}
int f13(unsigned x) {
  switch (x) {
  case 2:
  case 10 ... 9:
    return 10;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<f13>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    $0x2,%eax
jne    1129 <f13+0x29>
jmp    1118 <f13+0x18>
jmp    111d <f13+0x1d>
movl   $0xa,-0x4(%rbp)
jmp    1130 <f13+0x30>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f13>:
xor    %ecx,%ecx
cmp    $0x2,%edi
mov    $0xa,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f13(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 2, label %5
]
5: ; preds = %1
br label %6
6: ; preds = %5
store i32 10, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @f13(i32 %0) {
%2 = icmp eq i32 %0, 2
%3 = select i1 %2, i32 10, i32 0
ret i32 %3
}
void gdk_draw_rgb_32_image_dithalign() {}


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

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

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

LLVM IR (-O2):
define void @gdk_draw_rgb_32_image_dithalign() {
ret void
}
/* Variables and functions */
void CG_EventHandling(int type) {}


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

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

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

LLVM IR (-O2):
define void @CG_EventHandling(i32 %0) {
ret void
}
void togglelight(int *lights, int x, int y) { lights[x * 1000 + y] += 2; }


x86 assembly (clang, -O0):
<togglelight>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
imul   $0x3e8,-0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edx
add    $0x2,%edx
mov    %edx,(%rax,%rcx,4)
pop    %rbp
ret

x86 assembly (clang, -O2):
<togglelight>:
imul   $0x3e8,%esi,%eax
add    %edx,%eax
cltq
addl   $0x2,(%rdi,%rax,4)
ret

LLVM IR (-O0):
define void @togglelight(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32*, i32** %4
%8 = load i32, i32* %5
%9 = mul nsw i32 %8, 1000
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %7, i64 %12
%14 = load i32, i32* %13
%15 = add nsw i32 %14, 2
store i32 %15, i32* %13
ret void
}

LLVM IR (-O2):
define void @togglelight(i32* nocapture %0, i32 %1, i32 %2) {
%4 = mul nsw i32 %1, 1000
%5 = add nsw i32 %4, %2
%6 = sext i32 %5 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
%8 = load i32, i32* %7
%9 = add nsw i32 %8, 2
store i32 %9, i32* %7
ret void
}
/* Variables and functions */
int _strnicmp(char const *, char const *, size_t);
int jet_strncasecmp(const char *s1, const char *s2, size_t n) {
  return _strnicmp(s1, s2, n);
}


x86 assembly (clang, -O0):
<jet_strncasecmp>:
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
call   1030 <_strnicmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jet_strncasecmp>:
jmp    1030 <_strnicmp@plt>

LLVM IR (-O0):
define i32 @jet_strncasecmp(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 = call i32 @_strnicmp(i8* %7, i8* %8, i64 %9)
ret i32 %10
}

LLVM IR (-O2):
define i32 @jet_strncasecmp(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @_strnicmp(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
int m(int z) {
  int y = 0;
  int x = 5;
  if (z < 10) {
    int x = 7;
    if (x == 7)
      return x / y;
  }
  if (x == 5)
    return x / y;
  else
    return 0;
}


x86 assembly (clang, -O0):
<m>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x5,-0x10(%rbp)
cmpl   $0xa,-0x8(%rbp)
jge    1144 <m+0x44>
movl   $0x7,-0x14(%rbp)
cmpl   $0x7,-0x14(%rbp)
jne    113f <m+0x3f>
mov    -0x14(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x4(%rbp)
jmp    1164 <m+0x64>
jmp    1144 <m+0x44>
cmpl   $0x5,-0x10(%rbp)
jne    115d <m+0x5d>
mov    -0x10(%rbp),%eax
cltd
idivl  -0xc(%rbp)
mov    %eax,-0x4(%rbp)
jmp    1164 <m+0x64>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @m(i32 %0) {
ret i32 0
}
char bar1(void) {}


x86 assembly (clang, -O0):
<bar1>:
push   %rbp
mov    %rsp,%rbp
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define signext i8 @bar1() {
%1 = alloca i8
%2 = load i8, i8* %1
ret i8 %2
}

LLVM IR (-O2):
define signext i8 @bar1() {
ret i8 undef
}
/* Variables and functions */
int tolower(int);
int toLowerCase(int c) { return tolower(c); }


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

x86 assembly (clang, -O2):
<toLowerCase>:
jmp    1030 <tolower@plt>

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

LLVM IR (-O2):
define i32 @toLowerCase(i32 %0) {
%2 = tail call i32 @tolower(i32 %0)
ret i32 %2
}