xunge/DecIR huggingface dataset:
int smallest_div(int a, int b, int c) {
  if (a / b == 0) {
    return a / c == 0 ? a : c;
  } else {
    return b / c == 0 ? b : c;
  }
}


x86 assembly (clang, -O0):
<smallest_div>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
cltd
idivl  -0xc(%rbp)
cmp    $0x0,%eax
jne    1149 <smallest_div+0x49>
mov    -0x8(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%eax
jne    1138 <smallest_div+0x38>
mov    -0x8(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    113e <smallest_div+0x3e>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1170 <smallest_div+0x70>
mov    -0xc(%rbp),%eax
cltd
idivl  -0x10(%rbp)
cmp    $0x0,%eax
jne    1164 <smallest_div+0x64>
mov    -0xc(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    116a <smallest_div+0x6a>
mov    -0x10(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<smallest_div>:
mov    %edx,%ecx
mov    %edi,%eax
cltd
idiv   %esi
test   %eax,%eax
cmove  %edi,%esi
mov    %esi,%eax
cltd
idiv   %ecx
test   %eax,%eax
cmove  %esi,%ecx
mov    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @smallest_div(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = sdiv i32 %8, %9
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %23
12: ; preds = %3
%13 = load i32, i32* %5
%14 = load i32, i32* %7
%15 = sdiv i32 %13, %14
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = load i32, i32* %5
br label %21
19: ; preds = %12
%20 = load i32, i32* %7
br label %21
21: ; preds = %19, %17
%22 = phi i32 [ %18, %17 ], [ %20, %19 ]
store i32 %22, i32* %4
br label %34
23: ; preds = %3
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = sdiv i32 %24, %25
%27 = icmp eq i32 %26, 0
br i1 %27, label %28, label %30
28: ; preds = %23
%29 = load i32, i32* %6
br label %32
30: ; preds = %23
%31 = load i32, i32* %7
br label %32
32: ; preds = %30, %28
%33 = phi i32 [ %29, %28 ], [ %31, %30 ]
store i32 %33, i32* %4
br label %34
34: ; preds = %32, %21
%35 = load i32, i32* %4
ret i32 %35
}

LLVM IR (-O2):
define i32 @smallest_div(i32 %0, i32 %1, i32 %2) {
%4 = sdiv i32 %0, %1
%5 = icmp eq i32 %4, 0
%6 = select i1 %5, i32 %0, i32 %1
%7 = sdiv i32 %6, %2
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 %6, i32 %2
ret i32 %9
}
/* Variables and functions */
bool more_then(const char input[], int limit) {
  if (input[limit - 1] != 0 && input[limit - 1] != '\n')
    return true;
  return false;
}


x86 assembly (clang, -O0):
<more_then>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     114b <more_then+0x4b>
mov    -0x10(%rbp),%rax
mov    -0x14(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
je     114b <more_then+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1152 <more_then+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<more_then>:
movslq %esi,%rax
mov    -0x1(%rax,%rdi,1),%al
test   %al,%al
setne  %cl
cmp    $0xa,%al
setne  %al
and    %cl,%al
movzbl %al,%eax
ret

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

LLVM IR (-O2):
define i32 @more_then(i8* nocapture %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp ne i8 %6, 0
%8 = icmp ne i8 %6, 10
%9 = and i1 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void Debug(const char *_text) {
  fprintf(stderr, "%s\n", _text);
  return;
}


x86 assembly (clang, -O0):
<Debug>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Debug>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @Debug(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
define void @Debug(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int test_imm_C3int64_lowword_reg(long long val) {
  return ((val) & (0xC3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_C3int64_lowword_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
and    $0xc3,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_C3int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 195
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int atoi(char *);
int /*<<< orphan*/ trimwhitespace2(char *, int, char const *);
int trimwhitespace2ToInt(const char *str) {
  char outline[1024];
  trimwhitespace2(outline, 1024, str);
  return atoi(outline);
}


x86 assembly (clang, -O0):
<trimwhitespace2ToInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x410,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x410(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x400,%esi
call   1030 <trimwhitespace2@plt>
lea    -0x410(%rbp),%rdi
call   1040 <atoi@plt>
add    $0x410,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<trimwhitespace2ToInt>:
push   %rbx
sub    $0x400,%rsp
mov    %rdi,%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x400,%esi
call   1030 <trimwhitespace2@plt>
mov    %rbx,%rdi
call   1040 <atoi@plt>
add    $0x400,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @trimwhitespace2ToInt(i8* %0) {
%2 = alloca i8*
%3 = alloca [1024 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @trimwhitespace2(i8* %4, i32 1024, i8* %5)
%7 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%8 = call i32 @atoi(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @trimwhitespace2ToInt(i8* %0) {
%2 = alloca [1024 x i8]
%3 = getelementptr inbounds [1024 x i8], [1024 x i8]* %2, i64 0, i64 0
%4 = call i32 @trimwhitespace2(i8* %3, i32 1024, i8* %0)
%5 = call i32 @atoi(i8* %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, char *);
int main(void) {
  char ch;
  printf("Please enter a character.\n");
  scanf("%c", &ch);
  printf("The code for %c is %d.\n", ch, ch);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee3(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x7(%rsp),%rsi
call   1050 <scanf@plt>
movsbl 0x7(%rsp),%edx
lea    0xea9(%rip),%rdi
mov    %edx,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [27 x i8] c"Please enter a character.\0A\00"
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [24 x i8] c"The code for %c is %d.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %6, i32 %8)
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%c\00"
@.str.2 = [24 x i8] c"The code for %c is %d.\0A\00"
@str = [26 x i8] c"Please enter a character.\00"
define i32 @main() {
%1 = alloca i8
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %1)
%4 = load i8, i8* %1
%5 = sext i8 %4 to i32
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %5, i32 %5)
ret i32 0
}
char stackBased3(int *x) {
  char buf[2];
  int *y;
  buf[0] = 'a';
  if (!(y = x)) {
    return buf[1];
  }
  return buf[0];
}


x86 assembly (clang, -O0):
<stackBased3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movb   $0x61,-0x12(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmp    $0x0,%rax
jne    1129 <stackBased3+0x29>
mov    -0x11(%rbp),%al
mov    %al,-0x1(%rbp)
jmp    112f <stackBased3+0x2f>
mov    -0x12(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<stackBased3>:
mov    $0x61,%al
ret

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

LLVM IR (-O2):
define signext i8 @stackBased3(i32* nocapture readnone %0) {
ret i8 97
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *argv0) {
  fprintf(stderr, "Usage: %s {a} {b}\n", argv0);
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [19 x i8] c"Usage: %s {a} {b}\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [19 x i8] c"Usage: %s {a} {b}\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 0)
unreachable
}
void g_utf16_to_utf8() {}


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

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

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

LLVM IR (-O2):
define void @g_utf16_to_utf8() {
ret void
}
int ld_ne_rr1(long double a1, long double a2) { return (((a1) != (a2))); }


x86 assembly (clang, -O0):
<ld_ne_rr1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fldt   -0x20(%rbp)
fxch   %st(1)
fucomip %st(1),%st
fstp   %st(0)
setp   %cl
setne  %al
or     %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_ne_rr1>:
fldt   0x18(%rsp)
fldt   0x8(%rsp)
fucomip %st(1),%st
fstp   %st(0)
setp   %al
setne  %cl
or     %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @ld_ne_rr1(x86_fp80 %0, x86_fp80 %1) {
%3 = alloca x86_fp80
%4 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store x86_fp80 %1, x86_fp80* %4
%5 = load x86_fp80, x86_fp80* %3
%6 = load x86_fp80, x86_fp80* %4
%7 = fcmp une x86_fp80 %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @ld_ne_rr1(x86_fp80 %0, x86_fp80 %1) {
%3 = fcmp une x86_fp80 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
scalar_t__ INT_MIN;
unsigned int test1u(unsigned int x) {
  return (x ^ (unsigned int)INT_MIN) ^ 0x1234;
}


x86 assembly (clang, -O0):
<test1u>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ed7(%rip),%rcx
mov    (%rcx),%rcx
xor    %ecx,%eax
xor    $0x1234,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1u>:
mov    %edi,%eax
mov    0x2edf(%rip),%rcx
xor    (%rcx),%eax
xor    $0x1234,%eax
ret

LLVM IR (-O0):
@INT_MIN = global i64 0
define i32 @test1u(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i64, i64* @INT_MIN
%5 = trunc i64 %4 to i32
%6 = xor i32 %3, %5
%7 = xor i32 %6, 4660
ret i32 %7
}

LLVM IR (-O2):
@INT_MIN = global i64 0
define i32 @test1u(i32 %0) {
%2 = load i64, i64* @INT_MIN
%3 = trunc i64 %2 to i32
%4 = xor i32 %3, %0
%5 = xor i32 %4, 4660
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void usage() {
  printf("usage : cliecho adresseIP_serveur(x.x.x.x)  numero_port_serveur\n");
}


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

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

LLVM IR (-O0):
@.str = [65 x i8] c"usage : cliecho adresseIP_serveur(x.x.x.x) numero_port_serveur\0A\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([65 x i8], [65 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [64 x i8] c"usage : cliecho adresseIP_serveur(x.x.x.x) numero_port_serveur\00"
define void @usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glmCopy3f(float *, float *);
int /*<<< orphan*/ glmCross3f(float *, float *, float const *);
void glmCross3f_(float x[3], const float y[3]) {
  float v[3];
  glmCopy3f(v, x);
  glmCross3f(x, v, y);
}


x86 assembly (clang, -O0):
<glmCross3f_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1c(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <glmCopy3f@plt>
mov    -0x8(%rbp),%rdi
lea    -0x1c(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <glmCross3f@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmCross3f_>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%r14
mov    %rdi,%rbx
lea    0x4(%rsp),%r15
mov    %r15,%rdi
mov    %rbx,%rsi
call   1030 <glmCopy3f@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1040 <glmCross3f@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @glmCross3f_(float* %0, float* %1) {
%3 = alloca float*
%4 = alloca float*
%5 = alloca [3 x float]
store float* %0, float** %3
store float* %1, float** %4
%6 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
%7 = load float*, float** %3
%8 = call i32 @glmCopy3f(float* %6, float* %7)
%9 = load float*, float** %3
%10 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
%11 = load float*, float** %4
%12 = call i32 @glmCross3f(float* %9, float* %10, float* %11)
ret void
}

LLVM IR (-O2):
define void @glmCross3f_(float* %0, float* %1) {
%3 = alloca [3 x float]
%4 = bitcast [3 x float]* %3 to i8*
%5 = getelementptr inbounds [3 x float], [3 x float]* %3, i64 0, i64 0
%6 = call i32 @glmCopy3f(float* %5, float* %0)
%7 = call i32 @glmCross3f(float* %0, float* %5, float* %1)
ret void
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ rename(char *, char *);
int main(void) {
  if (0 > rename("arnold.layne", "lucifer.sam"))
    return EXIT_FAILURE;
  else
    return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
lea    0xee0(%rip),%rsi
call   1030 <rename@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jle    1151 <main+0x41>
mov    0x2e99(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <main+0x4d>
mov    0x2e80(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xeee(%rip),%rsi
call   1030 <rename@plt>
test   %rax,%rax
jns    1132 <main+0x22>
mov    0x2eb0(%rip),%rax
jmp    1139 <main+0x29>
mov    0x2e9f(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"arnold.layne\00"
@.str.1 = [12 x i8] c"lucifer.sam\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i64 @rename(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%3 = icmp sgt i64 0, %2
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = load i32, i32* @EXIT_FAILURE
store i32 %5, i32* %1
br label %8
6: ; preds = %0
%7 = load i32, i32* @EXIT_SUCCESS
store i32 %7, i32* %1
br label %8
8: ; preds = %6, %4
%9 = load i32, i32* %1
ret i32 %9
}

LLVM IR (-O2):
@.str = [13 x i8] c"arnold.layne\00"
@.str.1 = [12 x i8] c"lucifer.sam\00"
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i64 @rename(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
%2 = icmp slt i64 %1, 0
%3 = load i32, i32* @EXIT_FAILURE
%4 = load i32, i32* @EXIT_SUCCESS
%5 = select i1 %2, i32 %3, i32 %4
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ vetor;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int vetor[] = {1, 34, 65, 8, 30, 20};
  int n = sizeof(vetor) / sizeof(int);
  printf("O vetor contem %d indices\n", n);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeda(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xed7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xed4(%rip),%rax
mov    %rax,-0x10(%rbp)
movl   $0x6,-0x24(%rbp)
mov    -0x24(%rbp),%esi
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.vetor = [6 x i32] [i32 1, i32 34, i32 65, i32 8, i32 30, i32 20]
@.str = [27 x i8] c"O vetor contem %d indices\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i32]
%3 = alloca i32
store i32 0, i32* %1
%4 = bitcast [6 x i32]* %2 to i8*
store i32 6, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [27 x i8] c"O vetor contem %d indices\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i32 6)
ret i32 0
}
void BN_RECP_CTX_free(void) {}


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

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

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

LLVM IR (-O2):
define void @BN_RECP_CTX_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void t2() { exit(1); }


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

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

LLVM IR (-O0):
define void @t2() {
%1 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @t2() {
%1 = tail call i32 @exit(i32 1)
unreachable
}
int CountDrink(int bottle) {
  int drink = 0, empty = 0;
  while (bottle) {
    drink += bottle;
    empty += bottle;
    bottle = empty / 3;
    empty %= 3;
  }
  return (empty == 2) ? drink + 1 : drink;
}


x86 assembly (clang, -O0):
<CountDrink>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1152 <CountDrink+0x52>
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
mov    $0x3,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
jmp    1115 <CountDrink+0x15>
cmpl   $0x2,-0xc(%rbp)
jne    116a <CountDrink+0x6a>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1170 <CountDrink+0x70>
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<CountDrink>:
test   %edi,%edi
je     1147 <CountDrink+0x47>
xor    %ecx,%ecx
xor    %eax,%eax
nopl   0x0(%rax,%rax,1)
add    %edi,%eax
lea    (%rcx,%rdi,1),%edx
lea    (%rcx,%rdi,1),%esi
add    $0x2,%esi
movslq %edx,%rcx
imul   $0x55555556,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
shr    $0x20,%rdi
add    %edx,%edi
lea    (%rdi,%rdi,2),%edx
sub    %edx,%ecx
cmp    $0x4,%esi
ja     1110 <CountDrink+0x10>
xor    %edx,%edx
cmp    $0x2,%ecx
sete   %dl
add    %edx,%eax
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @CountDrink(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %17, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %10, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ 0, %1 ]
%6 = phi i32 [ %9, %3 ], [ %0, %1 ]
%7 = add nsw i32 %5, %6
%8 = add nsw i32 %4, %6
%9 = sdiv i32 %8, 3
%10 = srem i32 %8, 3
%11 = add i32 %8, 2
%12 = icmp ult i32 %11, 5
br i1 %12, label %13, label %3
13: ; preds = %3
%14 = icmp eq i32 %10, 2
%15 = zext i1 %14 to i32
%16 = add nsw i32 %7, %15
br label %17
17: ; preds = %13, %1
%18 = phi i32 [ %16, %13 ], [ 0, %1 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ maxrdlocks();
int main(void) {
  maxrdlocks();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <maxrdlocks@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @maxrdlocks()
ret i32 0
}
float Sleef_logf_u10(float x) { return __builtin_logf(x); }


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

x86 assembly (clang, -O2):
<Sleef_logf_u10>:
jmp    1030 <logf@plt>

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

LLVM IR (-O2):
define float @Sleef_logf_u10(float %0) {
%2 = tail call float @logf(float %0)
ret float %2
}
int main() {
  int sum = 0;
  int i = 3;
  switch (i) {
  case 2:
    sum += 2;
  case 3:
    sum += 3;
  case 4:
    sum += 4;
  case 5:
    sum += 5;
  }
  return sum;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
movl   $0x3,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xfffffffe,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x3,%eax
ja     1166 <main+0x66>
mov    -0x18(%rbp),%rax
lea    0xec7(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x8(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x3,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x5,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
store i32 3, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %17 [
i32 2, label %5
i32 3, label %8
i32 4, label %11
i32 5, label %14
]
5: ; preds = %0
%6 = load i32, i32* %2
%7 = add nsw i32 %6, 2
store i32 %7, i32* %2
br label %8
8: ; preds = %0, %5
%9 = load i32, i32* %2
%10 = add nsw i32 %9, 3
store i32 %10, i32* %2
br label %11
11: ; preds = %0, %8
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 4
store i32 %13, i32* %2
br label %14
14: ; preds = %0, %11
%15 = load i32, i32* %2
%16 = add nsw i32 %15, 5
store i32 %16, i32* %2
br label %17
17: ; preds = %14, %0
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @main() {
ret i32 12
}
/* Variables and functions */
int /*<<< orphan*/ __mingw_aligned_free(void *);
void mpeg2_free(void *mem_ptr) { __mingw_aligned_free(mem_ptr); }


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

x86 assembly (clang, -O2):
<mpeg2_free>:
jmp    1030 <__mingw_aligned_free@plt>

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

LLVM IR (-O2):
define void @mpeg2_free(i8* %0) {
%2 = tail call i32 @__mingw_aligned_free(i8* %0)
ret void
}
/* Type definitions */
struct thread_map {
  int dummy;
};
typedef int pid_t;

/* Variables and functions */
struct thread_map *thread_map__new_by_pid(int);
struct thread_map *thread_map__new_by_tid(int);
struct thread_map *thread_map__new(pid_t pid, pid_t tid) {
  if (pid != -1)
    return thread_map__new_by_pid(pid);
  return thread_map__new_by_tid(tid);
}


x86 assembly (clang, -O0):
<thread_map__new>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
je     1149 <thread_map__new+0x29>
mov    -0xc(%rbp),%edi
call   1040 <thread_map__new_by_pid@plt>
mov    %rax,-0x8(%rbp)
jmp    1155 <thread_map__new+0x35>
mov    -0x10(%rbp),%edi
call   1030 <thread_map__new_by_tid@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thread_map__new>:
cmp    $0xffffffff,%edi
je     112a <thread_map__new+0xa>
jmp    1040 <thread_map__new_by_pid@plt>
mov    %esi,%edi
jmp    1030 <thread_map__new_by_tid@plt>

LLVM IR (-O0):
%struct.thread_map = type { i32 }
define %struct.thread_map* @thread_map__new(i32 %0, i32 %1) {
%3 = alloca %struct.thread_map*
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, -1
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call %struct.thread_map* @thread_map__new_by_pid(i32 %9)
store %struct.thread_map* %10, %struct.thread_map** %3
br label %14
11: ; preds = %2
%12 = load i32, i32* %5
%13 = call %struct.thread_map* @thread_map__new_by_tid(i32 %12)
store %struct.thread_map* %13, %struct.thread_map** %3
br label %14
14: ; preds = %11, %8
%15 = load %struct.thread_map*, %struct.thread_map** %3
ret %struct.thread_map* %15
}

LLVM IR (-O2):
%struct.thread_map = type { i32 }
define %struct.thread_map* @thread_map__new(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, -1
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call %struct.thread_map* @thread_map__new_by_pid(i32 %0)
br label %8
6: ; preds = %2
%7 = tail call %struct.thread_map* @thread_map__new_by_tid(i32 %1)
br label %8
8: ; preds = %6, %4
%9 = phi %struct.thread_map* [ %5, %4 ], [ %7, %6 ]
ret %struct.thread_map* %9
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rol32(uint32_t x, int n) { return (x << n) | (x >> (32 - n)); }


x86 assembly (clang, -O0):
<rol32>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    %cl,%eax
mov    -0x4(%rbp),%edx
mov    $0x20,%ecx
sub    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol32>:
mov    %esi,%ecx
mov    %edi,%eax
shl    %cl,%eax
neg    %cl
sar    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rol32(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 %5, %6
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = sub nsw i32 32, %9
%11 = ashr i32 %8, %10
%12 = or i32 %7, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @rol32(i32 %0, i32 %1) {
%3 = shl i32 %0, %1
%4 = sub nsw i32 32, %1
%5 = ashr i32 %0, %4
%6 = or i32 %5, %3
ret i32 %6
}
void rule_neural_cond_update(const struct XCSF *xcsf, const struct Cl *c,
                             const double *x, const double *y) {
  (void)xcsf;
  (void)c;
  (void)x;
  (void)y;
}


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

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

LLVM IR (-O0):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @rule_neural_cond_update(%struct.XCSF* %0, %struct.Cl* %1, double* %2, double* %3) {
%5 = alloca %struct.XCSF*
%6 = alloca %struct.Cl*
%7 = alloca double*
%8 = alloca double*
store %struct.XCSF* %0, %struct.XCSF** %5
store %struct.Cl* %1, %struct.Cl** %6
store double* %2, double** %7
store double* %3, double** %8
%9 = load %struct.XCSF*, %struct.XCSF** %5
%10 = load %struct.Cl*, %struct.Cl** %6
%11 = load double*, double** %7
%12 = load double*, double** %8
ret void
}

LLVM IR (-O2):
%struct.XCSF = type opaque
%struct.Cl = type opaque
define void @rule_neural_cond_update(%struct.XCSF* nocapture %0, %struct.Cl* nocapture %1, double* nocapture %2, double* nocapture %3) {
ret void
}
void RTUtf16CalcUtf8Len(void) {}


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

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

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

LLVM IR (-O2):
define void @RTUtf16CalcUtf8Len() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
void main() {
  int var;
  printf("Enter a number \n");
  scanf("%d", &var);
  if (var >= 9)
    printf("%d is larger than 9 \n", var);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xed4(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
cmpl   $0x9,-0x4(%rbp)
jl     1161 <main+0x41>
mov    -0x4(%rbp),%esi
lea    0xeba(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee1(%rip),%rdi
call   1030 <puts@plt>
lea    0xebc(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
mov    0x4(%rsp),%esi
cmp    $0x9,%esi
jl     1165 <main+0x35>
lea    0xea5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a number \0A\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"%d is larger than 9 \0A\00"
define void @main() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp sge i32 %4, 9
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %7)
br label %9
9: ; preds = %6, %0
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [22 x i8] c"%d is larger than 9 \0A\00"
@str = [16 x i8] c"Enter a number \00"
define void @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = icmp sgt i32 %5, 8
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.2, i64 0, i64 0), i32 %5)
br label %9
9: ; preds = %7, %0
ret void
}
unsigned long f5(unsigned long x, unsigned long y) {
  y &= 63;
  return x >> y | (x << (64 - y));
}


x86 assembly (clang, -O0):
<f5>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
and    $0x3f,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
shr    %cl,%rax
mov    -0x8(%rbp),%rdx
mov    $0x40,%ecx
sub    -0x10(%rbp),%rcx
shl    %cl,%rdx
mov    %rdx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f5>:
mov    %rsi,%rcx
mov    %rdi,%rax
ror    %cl,%rax
ret

LLVM IR (-O0):
define i64 @f5(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = and i64 %5, 63
store i64 %6, i64* %4
%7 = load i64, i64* %3
%8 = load i64, i64* %4
%9 = lshr i64 %7, %8
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = sub i64 64, %11
%13 = shl i64 %10, %12
%14 = or i64 %9, %13
ret i64 %14
}

LLVM IR (-O2):
define i64 @f5(i64 %0, i64 %1) {
%3 = tail call i64 @llvm.fshr.i64(i64 %0, i64 %0, i64 %1)
ret i64 %3
}
/* Variables and functions */
scalar_t__ floor(double);
int my_round(double x) { return ((int)floor(x + 0.5)); }


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

x86 assembly (clang, -O2):
<my_round>:
addsd  0xee8(%rip),%xmm0
jmp    1030 <floor@plt>

LLVM IR (-O0):
define i32 @my_round(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fadd double %3, 5.000000e-01
%5 = call i64 @floor(double %4)
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @my_round(double %0) {
%2 = fadd double %0, 5.000000e-01
%3 = tail call i64 @floor(double %2)
%4 = trunc i64 %3 to i32
ret i32 %4
}
/* Variables and functions */
int LZ4_decompress_usingDict_generic(char const *, char *, int /*<<< orphan*/,
                                     int, int /*<<< orphan*/, char const *,
                                     int);
int LZ4_decompress_fast_usingDict(const char *source, char *dest,
                                  int originalSize, const char *dictStart,
                                  int dictSize) {
  return LZ4_decompress_usingDict_generic(source, dest, 0, originalSize, 0,
                                          dictStart, dictSize);
}


x86 assembly (clang, -O0):
<LZ4_decompress_fast_usingDict>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8d,-0x24(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%ecx
mov    -0x20(%rbp),%r9
mov    -0x24(%rbp),%eax
xor    %r8d,%r8d
mov    %r8d,%edx
mov    %eax,(%rsp)
call   1030 <LZ4_decompress_usingDict_generic@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<LZ4_decompress_fast_usingDict>:
push   %rax
mov    %rcx,%r9
mov    %edx,%ecx
mov    %r8d,(%rsp)
xor    %edx,%edx
xor    %r8d,%r8d
call   1030 <LZ4_decompress_usingDict_generic@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @LZ4_decompress_fast_usingDict(i8* %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @LZ4_decompress_usingDict_generic(i8* %0, i8* %1, i32 0, i32 %2, i32 0, i8* %3, i32 %4)
ret i32 %6
}
extern void out_be32(volatile unsigned *addr, int val) { *addr = val; }


x86 assembly (clang, -O0):
<out_be32>:
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):
<out_be32>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @out_be32(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
store volatile i32 %5, i32* %6
ret void
}

LLVM IR (-O2):
define void @out_be32(i32* %0, i32 %1) {
store volatile i32 %1, i32* %0
ret void
}
void test___atomic_sub_fetch_0(char *mem) { __atomic_sub_fetch(mem, 1, 4); }


x86 assembly (clang, -O0):
<test___atomic_sub_fetch_0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
movb   $0x1,-0x9(%rbp)
mov    -0x9(%rbp),%cl
mov    %cl,%al
neg    %al
lock xadd %al,(%rdx)
sub    %cl,%al
mov    %al,-0xa(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<test___atomic_sub_fetch_0>:
lock subb $0x1,(%rdi)
ret

LLVM IR (-O0):
define void @test___atomic_sub_fetch_0(i8* %0) {
%2 = alloca i8*
%3 = alloca i8
%4 = alloca i8
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8 1, i8* %3
%6 = load i8, i8* %3
%7 = atomicrmw sub i8* %5, i8 %6 acq_rel
%8 = sub i8 %7, %6
store i8 %8, i8* %4
%9 = load i8, i8* %4
ret void
}

LLVM IR (-O2):
define void @test___atomic_sub_fetch_0(i8* nocapture %0) {
%2 = atomicrmw sub i8* %0, i8 1 acq_rel
ret void
}
/* Variables and functions */
int /*<<< orphan*/ stosb(void *, int, size_t);
void *memset(void *dst, int c, size_t n) {
  stosb(dst, c, n);
  return dst;
}


x86 assembly (clang, -O0):
<memset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
call   1030 <stosb@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memset>:
push   %rbx
mov    %rdi,%rbx
call   1030 <stosb@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
define i8* @memset(i8* returned %0, i32 %1, i64 %2) {
%4 = tail call i32 @stosb(i8* %0, i32 %1, i64 %2)
ret i8* %0
}
int unix_fcntl_o_shlock() { return -1; }


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

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

LLVM IR (-O0):
define i32 @unix_fcntl_o_shlock() {
ret i32 -1
}

LLVM IR (-O2):
define i32 @unix_fcntl_o_shlock() {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isalnum(int);
void t_isalnum_0x9a() {
  Assert_real((isalnum(154) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isalnum.c",
              775, ("isalnum should be 0 for 0x9a"));
}


x86 assembly (clang, -O0):
<t_isalnum_0x9a>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9a,%edi
call   1030 <isalnum@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x307,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isalnum_0x9a>:
push   %rax
mov    $0x9a,%edi
call   1030 <isalnum@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x307,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x9a\00"
define void @t_isalnum_0x9a() {
%1 = call i64 @isalnum(i32 154)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 775, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isalnum.c\00"
@.str.1 = [29 x i8] c"isalnum should be 0 for 0x9a\00"
define void @t_isalnum_0x9a() {
%1 = tail call i64 @isalnum(i32 154)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 775, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int main(int a) {
  int i;
  int j;
  i = 1;
  j = a;
  i = i + 1;
  j = j + i;
  assert(j == a + 2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
add    $0x2,%ecx
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %2
store i32 %0, i32* %3
store i32 1, i32* %4
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %4
%8 = add nsw i32 %7, 1
store i32 %8, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = add nsw i32 %9, %10
store i32 %11, i32* %5
%12 = load i32, i32* %5
%13 = load i32, i32* %3
%14 = add nsw i32 %13, 2
%15 = icmp eq i32 %12, %14
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0) {
%2 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char a;
  scanf("%c", &a);
  char b = 'z' - (a - 'a');
  printf("%c", b);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1040 <scanf@plt>
movsbl -0x5(%rbp),%ecx
sub    $0x61,%ecx
mov    $0x7a,%eax
sub    %ecx,%eax
mov    %al,-0x6(%rbp)
lea    0xea9(%rip),%rdi
movsbl -0x6(%rbp),%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
store i32 0, i32* %1
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = load i8, i8* %2
%6 = sext i8 %5 to i32
%7 = sub nsw i32 %6, 97
%8 = sub nsw i32 122, %7
%9 = trunc i32 %8 to i8
store i8 %9, i8* %3
%10 = load i8, i8* %3
%11 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %10)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = alloca i8
%2 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %1)
%3 = load i8, i8* %1
%4 = sub i8 -37, %3
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ scc2();
void caller2() { scc2(); }


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

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

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

LLVM IR (-O2):
define void @caller2() {
%1 = tail call i32 (...) @scc2()
ret void
}