xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputc(char, int /*<<< orphan*/);
int /*<<< orphan*/ fputs(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void die_with_user_msg(char *message, const char *detail) {
  fputs(message, stderr);
  fputs(": ", stderr);
  fputs(detail, stderr);
  fputc('\n', stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<die_with_user_msg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e87(%rip),%rax
mov    (%rax),%esi
lea    0xe9e(%rip),%rdi
call   1030 <fputs@plt>
mov    -0x10(%rbp),%rdi
mov    0x2e6e(%rip),%rax
mov    (%rax),%esi
call   1030 <fputs@plt>
mov    0x2e60(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<die_with_user_msg>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    0x2ea2(%rip),%rbx
mov    (%rbx),%esi
call   1030 <fputs@plt>
mov    (%rbx),%esi
lea    0xeb2(%rip),%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
mov    %r14,%rdi
call   1030 <fputs@plt>
mov    (%rbx),%esi
mov    $0xa,%edi
call   1040 <fputc@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [3 x i8] c": \00"
define void @die_with_user_msg(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 i32, i32* @stderr
%7 = call i32 @fputs(i8* %5, i32 %6)
%8 = load i32, i32* @stderr
%9 = call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %8)
%10 = load i8*, i8** %4
%11 = load i32, i32* @stderr
%12 = call i32 @fputs(i8* %10, i32 %11)
%13 = load i32, i32* @stderr
%14 = call i32 @fputc(i8 signext 10, i32 %13)
%15 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [3 x i8] c": \00"
define void @die_with_user_msg(i8* %0, i8* %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 @fputs(i8* %0, i32 %3)
%5 = load i32, i32* @stderr
%6 = tail call i32 @fputs(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* @stderr
%8 = tail call i32 @fputs(i8* %1, i32 %7)
%9 = load i32, i32* @stderr
%10 = tail call i32 @fputc(i8 signext 10, i32 %9)
%11 = tail call i32 @exit(i32 1)
unreachable
}
void function_empty_name() {}


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

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

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

LLVM IR (-O2):
define void @function_empty_name() {
ret void
}
int indep2(int i) {
  int j = 1;
  for (; i < 10; i++)
    j++;
  return j;
}


x86 assembly (clang, -O0):
<indep2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0xa,-0x4(%rbp)
jge    112f <indep2+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <indep2+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<indep2>:
mov    $0xb,%ecx
sub    %edi,%ecx
cmp    $0xa,%edi
mov    $0x1,%eax
cmovl  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @indep2(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 1, i32* %3
br label %4
4: ; preds = %10, %1
%5 = load i32, i32* %2
%6 = icmp slt i32 %5, 10
br i1 %6, label %7, label %13
7: ; preds = %4
%8 = load i32, i32* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
br label %10
10: ; preds = %7
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %4
13: ; preds = %4
%14 = load i32, i32* %3
ret i32 %14
}

LLVM IR (-O2):
define i32 @indep2(i32 %0) {
%2 = icmp slt i32 %0, 10
%3 = sub i32 11, %0
%4 = select i1 %2, i32 %3, i32 1
ret i32 %4
}
void strength_result7(int *data) {
  int i = 0;
  do {
    if (data[1])
      i = i + 21;
    else
      i = i + 42;
    data[data[2]] = 2;
  } while (i < data[3]);
}


x86 assembly (clang, -O0):
<strength_result7>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpl   $0x0,0x4(%rax)
je     112b <strength_result7+0x2b>
mov    -0xc(%rbp),%eax
add    $0x15,%eax
mov    %eax,-0xc(%rbp)
jmp    1134 <strength_result7+0x34>
mov    -0xc(%rbp),%eax
add    $0x2a,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x8(%rbp),%rcx
movslq 0x8(%rcx),%rcx
movl   $0x2,(%rax,%rcx,4)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    0xc(%rcx),%eax
jl     110f <strength_result7+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<strength_result7>:
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
lea    0x15(%rax),%ecx
add    $0x2a,%eax
cmpl   $0x0,0x4(%rdi)
cmovne %ecx,%eax
movslq 0x8(%rdi),%rcx
movl   $0x2,(%rdi,%rcx,4)
cmp    0xc(%rdi),%eax
jl     1110 <strength_result7+0x10>
ret

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

LLVM IR (-O2):
define void @strength_result7(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 1
%3 = getelementptr inbounds i32, i32* %0, i64 2
%4 = getelementptr inbounds i32, i32* %0, i64 3
br label %5
5: ; preds = %5, %1
%6 = phi i32 [ 0, %1 ], [ %10, %5 ]
%7 = load i32, i32* %2
%8 = icmp eq i32 %7, 0
%9 = select i1 %8, i32 42, i32 21
%10 = add nuw nsw i32 %9, %6
%11 = load i32, i32* %3
%12 = sext i32 %11 to i64
%13 = getelementptr inbounds i32, i32* %0, i64 %12
store i32 2, i32* %13
%14 = load i32, i32* %4
%15 = icmp slt i32 %10, %14
br i1 %15, label %5, label %16
16: ; preds = %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, double const);
void doubleToLaTeX(char *d, const double v) {
  char *dp = d;
  sprintf(d, "%#.3f", v);
  while (*dp != '\0') {
    if (*dp == '.')
      *dp = '&';
    dp++;
  }
}


x86 assembly (clang, -O0):
<doubleToLaTeX>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
movsd  -0x10(%rbp),%xmm0
lea    0xec7(%rip),%rsi
call   1030 <sprintf@plt>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1176 <doubleToLaTeX+0x66>
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    1165 <doubleToLaTeX+0x55>
mov    -0x18(%rbp),%rax
movb   $0x26,(%rax)
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    113e <doubleToLaTeX+0x2e>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<doubleToLaTeX>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
call   1030 <sprintf@plt>
jmp    1137 <doubleToLaTeX+0x27>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x26,(%rbx)
add    $0x1,%rbx
movzbl (%rbx),%eax
cmp    $0x2e,%al
je     1130 <doubleToLaTeX+0x20>
test   %al,%al
jne    1133 <doubleToLaTeX+0x23>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%#.3f\00"
define void @doubleToLaTeX(i8* %0, double %1) {
%3 = alloca i8*
%4 = alloca double
%5 = alloca i8*
store i8* %0, i8** %3
store double %1, double* %4
%6 = load i8*, i8** %3
store i8* %6, i8** %5
%7 = load i8*, i8** %3
%8 = load double, double* %4
%9 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %8)
br label %10
10: ; preds = %22, %2
%11 = load i8*, i8** %5
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %25
15: ; preds = %10
%16 = load i8*, i8** %5
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp eq i32 %18, 46
br i1 %19, label %20, label %22
20: ; preds = %15
%21 = load i8*, i8** %5
store i8 38, i8* %21
br label %22
22: ; preds = %20, %15
%23 = load i8*, i8** %5
%24 = getelementptr inbounds i8, i8* %23, i32 1
store i8* %24, i8** %5
br label %10
25: ; preds = %10
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%#.3f\00"
define void @doubleToLaTeX(i8* nocapture %0, double %1) {
%3 = tail call i32 @sprintf(i8* dereferenceable(1) %0, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), double %1)
br label %4
4: ; preds = %8, %2
%5 = phi i8* [ %0, %2 ], [ %9, %8 ]
%6 = load i8, i8* %5
switch i8 %6, label %8 [
i8 0, label %10
i8 46, label %7
]
7: ; preds = %4
store i8 38, i8* %5
br label %8
8: ; preds = %4, %7
%9 = getelementptr inbounds i8, i8* %5, i64 1
br label %4
10: ; preds = %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(void) {
  printf("hello world\n");
  return 1;
}


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

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

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

LLVM IR (-O2):
@str = [12 x i8] c"hello world\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int test();
int main(void) {
  printf("--> %d\n", test());
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [8 x i8] c"--> %d\0A\00"
define i32 @main() {
%1 = tail call i32 (...) @test()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ off_t;

/* Variables and functions */
off_t memory_tell(void *data) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @memory_tell(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
void *zalloc(size_t);
void *calloc(size_t nmemb, size_t size) { return zalloc(nmemb * size); }


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

x86 assembly (clang, -O2):
<calloc>:
imul   %rsi,%rdi
jmp    1030 <zalloc@plt>

LLVM IR (-O0):
define i8* @calloc(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = mul i64 %5, %6
%8 = call i8* @zalloc(i64 %7)
ret i8* %8
}

LLVM IR (-O2):
define i8* @calloc(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @zalloc(i64 %3)
ret i8* %4
}
/* Type definitions */
typedef unsigned long volatile uint32_t;

/* Variables and functions */
uint32_t AONRTCSubSecIncrGet(void) {
  return ((*((volatile unsigned long *)(0x40092000 + 0x00000010))));
}


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

x86 assembly (clang, -O2):
<AONRTCSubSecIncrGet>:
mov    0x40092010,%rax
40
ret

LLVM IR (-O0):
define i64 @AONRTCSubSecIncrGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074339856 to i64*)
ret i64 %1
}

LLVM IR (-O2):
define i64 @AONRTCSubSecIncrGet() {
%1 = load volatile i64, i64* inttoptr (i64 1074339856 to i64*)
ret i64 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ _vwarnx(char const *, int /*<<< orphan*/);
void vwarnx(const char *fmt, va_list ap) { _vwarnx(fmt, ap); }


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

x86 assembly (clang, -O2):
<vwarnx>:
jmp    1030 <_vwarnx@plt>

LLVM IR (-O0):
define void @vwarnx(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @_vwarnx(i8* %5, i32 %6)
ret void
}

LLVM IR (-O2):
define void @vwarnx(i8* %0, i32 %1) {
%3 = tail call i32 @_vwarnx(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sedb_message(char *);
void sedb_show_gc_info(void) {
  sedb_message(
      "This system is not equipped with the SmartEiffel garbage collector.\n");
}


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

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

LLVM IR (-O0):
@.str = [69 x i8] c"This system is not equipped with the SmartEiffel garbage collector.\0A\00"
define void @sedb_show_gc_info() {
%1 = call i32 @sedb_message(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [69 x i8] c"This system is not equipped with the SmartEiffel garbage collector.\0A\00"
define void @sedb_show_gc_info() {
%1 = tail call i32 @sedb_message(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_mutex_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/ *);
int mutex_destroy(int /*<<< orphan*/ *);
int pthread_mutex_destroy(pthread_mutex_t *mutex) {
  assert(mutex);
  return mutex_destroy(mutex);
}


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

x86 assembly (clang, -O2):
<pthread_mutex_destroy>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <mutex_destroy@plt>

LLVM IR (-O0):
define i32 @pthread_mutex_destroy(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @assert(i32* %3)
%5 = load i32*, i32** %2
%6 = call i32 @mutex_destroy(i32* %5)
ret i32 %6
}

LLVM IR (-O2):
define i32 @pthread_mutex_destroy(i32* %0) {
%2 = tail call i32 @assert(i32* %0)
%3 = tail call i32 @mutex_destroy(i32* %0)
ret i32 %3
}
void ec_os_fini(void) {}


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

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

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

LLVM IR (-O2):
define void @ec_os_fini() {
ret void
}
int binNextShift() { return 3; }


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

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

LLVM IR (-O0):
define i32 @binNextShift() {
ret i32 3
}

LLVM IR (-O2):
define i32 @binNextShift() {
ret i32 3
}
/* Variables and functions */
unsigned char __startrek_read_nxtway_gs_mode();
int /*<<< orphan*/ __startrek_write_obstacle_flag(int);
unsigned char ecrobot_get_sonar_sensor(int);
void OSEK_Task_ts2(void) {
  unsigned char tmp;
  unsigned char tmp___0;
  {
    __startrek_write_obstacle_flag(0);
    tmp = __startrek_read_nxtway_gs_mode();
    if (tmp == 2) {
      tmp___0 = ecrobot_get_sonar_sensor(4);
      if ((int)tmp___0 <= 25) {
        __startrek_write_obstacle_flag(1);
      }
    }
    return;
  }
}


x86 assembly (clang, -O0):
<OSEK_Task_ts2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
xor    %edi,%edi
call   1040 <__startrek_write_obstacle_flag@plt>
mov    $0x0,%al
call   1030 <__startrek_read_nxtway_gs_mode@plt>
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x2,%eax
jne    117f <OSEK_Task_ts2+0x4f>
mov    $0x4,%edi
call   1050 <ecrobot_get_sonar_sensor@plt>
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x19,%eax
jg     117a <OSEK_Task_ts2+0x4a>
mov    $0x1,%edi
call   1040 <__startrek_write_obstacle_flag@plt>
jmp    117f <OSEK_Task_ts2+0x4f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OSEK_Task_ts2>:
push   %rax
xor    %edi,%edi
call   1040 <__startrek_write_obstacle_flag@plt>
xor    %eax,%eax
call   1030 <__startrek_read_nxtway_gs_mode@plt>
cmp    $0x2,%al
jne    115c <OSEK_Task_ts2+0x2c>
mov    $0x4,%edi
call   1050 <ecrobot_get_sonar_sensor@plt>
cmp    $0x19,%al
ja     115c <OSEK_Task_ts2+0x2c>
mov    $0x1,%edi
pop    %rax
jmp    1040 <__startrek_write_obstacle_flag@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @OSEK_Task_ts2() {
%1 = alloca i8
%2 = alloca i8
%3 = call i32 @__startrek_write_obstacle_flag(i32 0)
%4 = call zeroext i8 (...) @__startrek_read_nxtway_gs_mode()
store i8 %4, i8* %1
%5 = load i8, i8* %1
%6 = zext i8 %5 to i32
%7 = icmp eq i32 %6, 2
br i1 %7, label %8, label %16
8: ; preds = %0
%9 = call zeroext i8 @ecrobot_get_sonar_sensor(i32 4)
store i8 %9, i8* %2
%10 = load i8, i8* %2
%11 = zext i8 %10 to i32
%12 = icmp sle i32 %11, 25
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = call i32 @__startrek_write_obstacle_flag(i32 1)
br label %15
15: ; preds = %13, %8
br label %16
16: ; preds = %15, %0
ret void
}

LLVM IR (-O2):
define void @OSEK_Task_ts2() {
%1 = tail call i32 @__startrek_write_obstacle_flag(i32 0)
%2 = tail call zeroext i8 (...) @__startrek_read_nxtway_gs_mode()
%3 = icmp eq i8 %2, 2
br i1 %3, label %4, label %9
4: ; preds = %0
%5 = tail call zeroext i8 @ecrobot_get_sonar_sensor(i32 4)
%6 = icmp ult i8 %5, 26
br i1 %6, label %7, label %9
7: ; preds = %4
%8 = tail call i32 @__startrek_write_obstacle_flag(i32 1)
br label %9
9: ; preds = %4, %7, %0
ret void
}
/* Variables and functions */
int real_dup(int);
int smbw_dup(int);
scalar_t__ smbw_fd(int);
int dup(int fd) {
  if (smbw_fd(fd)) {
    return smbw_dup(fd);
  }
  return real_dup(fd);
}


x86 assembly (clang, -O0):
<dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <smbw_fd@plt>
cmp    $0x0,%rax
je     115d <dup+0x2d>
mov    -0x8(%rbp),%edi
call   1030 <smbw_dup@plt>
mov    %eax,-0x4(%rbp)
jmp    1168 <dup+0x38>
mov    -0x8(%rbp),%edi
call   1040 <real_dup@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup>:
push   %rbx
mov    %edi,%ebx
call   1050 <smbw_fd@plt>
mov    %ebx,%edi
test   %rax,%rax
je     1145 <dup+0x15>
pop    %rbx
jmp    1030 <smbw_dup@plt>
pop    %rbx
jmp    1040 <real_dup@plt>

LLVM IR (-O0):
define i32 @dup(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @smbw_fd(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @smbw_dup(i32 %8)
store i32 %9, i32* %2
br label %13
10: ; preds = %1
%11 = load i32, i32* %3
%12 = call i32 @real_dup(i32 %11)
store i32 %12, i32* %2
br label %13
13: ; preds = %10, %7
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @dup(i32 %0) {
%2 = tail call i64 @smbw_fd(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @smbw_dup(i32 %0)
br label %8
6: ; preds = %1
%7 = tail call i32 @real_dup(i32 %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
ret i32 %9
}
/* Variables and functions */
int errno;
int syscall(int, int, int, int /*<<< orphan*/, int /*<<< orphan*/,
            int /*<<< orphan*/);
int wait(int *stat) {
  int ret = syscall(104, -1, (int)stat, 0, 0, 0);
  if (ret < 0) {
    errno = -ret;
    return -1;
  }
  return ret;
}


x86 assembly (clang, -O0):
<wait>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,%edx
mov    $0x68,%edi
mov    $0xffffffff,%esi
xor    %r9d,%r9d
mov    %r9d,%ecx
mov    %r9d,%r8d
call   1030 <syscall@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1161 <wait+0x51>
xor    %ecx,%ecx
sub    -0x14(%rbp),%ecx
mov    0x2e8d(%rip),%rax
mov    %ecx,(%rax)
movl   $0xffffffff,-0x4(%rbp)
jmp    1167 <wait+0x57>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wait>:
push   %rax
mov    %rdi,%rdx
mov    $0x68,%edi
mov    $0xffffffff,%esi
xor    %ecx,%ecx
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <syscall@plt>
test   %eax,%eax
js     1131 <wait+0x21>
pop    %rcx
ret
neg    %eax
mov    0x2ea6(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@errno = global i32 0
define i32 @wait(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
%5 = load i32*, i32** %3
%6 = ptrtoint i32* %5 to i32
%7 = call i32 @syscall(i32 104, i32 -1, i32 %6, i32 0, i32 0, i32 0)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %1
%11 = load i32, i32* %4
%12 = sub nsw i32 0, %11
store i32 %12, i32* @errno
store i32 -1, i32* %2
br label %15
13: ; preds = %1
%14 = load i32, i32* %4
store i32 %14, i32* %2
br label %15
15: ; preds = %13, %10
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@errno = global i32 0
define i32 @wait(i32* %0) {
%2 = ptrtoint i32* %0 to i64
%3 = trunc i64 %2 to i32
%4 = tail call i32 @syscall(i32 104, i32 -1, i32 %3, i32 0, i32 0, i32 0)
%5 = icmp slt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = sub nsw i32 0, %4
store i32 %7, i32* @errno
br label %8
8: ; preds = %1, %6
%9 = phi i32 [ -1, %6 ], [ %4, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void a_function(char message[]) {
  printf("message from a_function: %s", message);
}


x86 assembly (clang, -O0):
<a_function>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_function>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"message from a_function: %s\00"
define void @a_function(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"message from a_function: %s\00"
define void @a_function(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
double func7(double x) { return x * x * x; }


x86 assembly (clang, -O0):
<func7>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

LLVM IR (-O0):
define double @func7(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = load double, double* %2
%5 = fmul double %3, %4
%6 = load double, double* %2
%7 = fmul double %5, %6
ret double %7
}

LLVM IR (-O2):
define double @func7(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
ret double %3
}
int pd_snk_is_vbus_provided(void) { return 1; }


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

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

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

LLVM IR (-O2):
define i32 @pd_snk_is_vbus_provided() {
ret i32 1
}
/* Variables and functions */
bool fspath_expandUser(const char path[]) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @fspath_expandUser(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ e_absx();
int /*<<< orphan*/ e_cmp();
void e_cmp_absx() {
  e_absx();
  e_cmp();
}


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

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

LLVM IR (-O0):
define void @e_cmp_absx() {
%1 = call i32 (...) @e_absx()
%2 = call i32 (...) @e_cmp()
ret void
}

LLVM IR (-O2):
define void @e_cmp_absx() {
%1 = tail call i32 (...) @e_absx()
%2 = tail call i32 (...) @e_cmp()
ret void
}
/* Type definitions */
struct dirent {
  int /*<<< orphan*/ *d_name;
};

/* Variables and functions */
int strcmp(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int test_sort(const struct dirent **a, const struct dirent **b) {
  return strcmp(&(*b)->d_name[1], &(*a)->d_name[1]);
}


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

x86 assembly (clang, -O2):
<test_sort>:
mov    (%rsi),%rax
mov    (%rax),%rax
add    $0x4,%rax
mov    (%rdi),%rcx
mov    (%rcx),%rsi
add    $0x4,%rsi
mov    %rax,%rdi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
%struct.dirent = type { i32* }
define i32 @test_sort(%struct.dirent** %0, %struct.dirent** %1) {
%3 = alloca %struct.dirent**
%4 = alloca %struct.dirent**
store %struct.dirent** %0, %struct.dirent*** %3
store %struct.dirent** %1, %struct.dirent*** %4
%5 = load %struct.dirent**, %struct.dirent*** %4
%6 = load %struct.dirent*, %struct.dirent** %5
%7 = getelementptr inbounds %struct.dirent, %struct.dirent* %6, i32 0, i32 0
%8 = load i32*, i32** %7
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load %struct.dirent**, %struct.dirent*** %3
%11 = load %struct.dirent*, %struct.dirent** %10
%12 = getelementptr inbounds %struct.dirent, %struct.dirent* %11, i32 0, i32 0
%13 = load i32*, i32** %12
%14 = getelementptr inbounds i32, i32* %13, i64 1
%15 = call i32 @strcmp(i32* %9, i32* %14)
ret i32 %15
}

LLVM IR (-O2):
%struct.dirent = type { i32* }
define i32 @test_sort(%struct.dirent** nocapture %0, %struct.dirent** nocapture %1) {
%3 = load %struct.dirent*, %struct.dirent** %1
%4 = getelementptr inbounds %struct.dirent, %struct.dirent* %3, i64 0, i32 0
%5 = load i32*, i32** %4
%6 = getelementptr inbounds i32, i32* %5, i64 1
%7 = load %struct.dirent*, %struct.dirent** %0
%8 = getelementptr inbounds %struct.dirent, %struct.dirent* %7, i64 0, i32 0
%9 = load i32*, i32** %8
%10 = getelementptr inbounds i32, i32* %9, i64 1
%11 = tail call i32 @strcmp(i32* %6, i32* %10)
ret i32 %11
}
/* Variables and functions */
int floor(float num) {
  int temp;
  temp = num;
  return temp;
}


x86 assembly (clang, -O0):
<floor>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<floor>:
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define i32 @floor(float %0) {
%2 = alloca float
%3 = alloca i32
store float %0, float* %2
%4 = load float, float* %2
%5 = fptosi float %4 to i32
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @floor(float %0) {
%2 = fptosi float %0 to i32
ret i32 %2
}
int radix_tree_deref_retry(void *arg) { return ((unsigned long)arg & 1); }


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

x86 assembly (clang, -O2):
<radix_tree_deref_retry>:
mov    %rdi,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @radix_tree_deref_retry(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = and i64 %4, 1
%6 = trunc i64 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @radix_tree_deref_retry(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
%4 = and i32 %3, 1
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ mpfr_t;

/* Variables and functions */
int /*<<< orphan*/ GMP_RNDN;
int /*<<< orphan*/ mpfr_set(int /*<<< orphan*/, int /*<<< orphan*/,
                            int /*<<< orphan*/);
void CFUNC(mpfr_t dst, mpfr_t src) { mpfr_set(dst, src, GMP_RNDN); }


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

x86 assembly (clang, -O2):
<CFUNC>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edx
jmp    1030 <mpfr_set@plt>

LLVM IR (-O0):
@GMP_RNDN = global i32 0
define void @CFUNC(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 = load i32, i32* @GMP_RNDN
%8 = call i32 @mpfr_set(i32 %5, i32 %6, i32 %7)
ret void
}

LLVM IR (-O2):
@GMP_RNDN = global i32 0
define void @CFUNC(i32 %0, i32 %1) {
%3 = load i32, i32* @GMP_RNDN
%4 = tail call i32 @mpfr_set(i32 %0, i32 %1, i32 %3)
ret void
}
/* Variables and functions */
int dbar(double, double);
int sb(double, double);
int ubar(double, double);
int uv(double, double);
double F2_nc_n(double xx, double Q2) {
  return 2 * (uv(xx, Q2) + sb(xx, Q2) + dbar(xx, Q2) + ubar(xx, Q2));
}


x86 assembly (clang, -O0):
<F2_nc_n>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1040 <uv@plt>
mov    %eax,-0x1c(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1030 <sb@plt>
mov    %eax,%ecx
mov    -0x1c(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1060 <dbar@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x14(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
call   1050 <ubar@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
add    %ecx,%eax
shl    $0x1,%eax
cvtsi2sd %eax,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<F2_nc_n>:
push   %rbp
push   %rbx
sub    $0x18,%rsp
movsd  %xmm1,0x10(%rsp)
movsd  %xmm0,0x8(%rsp)
call   1040 <uv@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1030 <sb@plt>
mov    %eax,%ebp
add    %ebx,%ebp
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1060 <dbar@plt>
mov    %eax,%ebx
add    %ebp,%ebx
movsd  0x8(%rsp),%xmm0
movsd  0x10(%rsp),%xmm1
call   1050 <ubar@plt>
add    %ebx,%eax
add    %eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
add    $0x18,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define double @F2_nc_n(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 i32 @uv(double %5, double %6)
%8 = load double, double* %3
%9 = load double, double* %4
%10 = call i32 @sb(double %8, double %9)
%11 = add nsw i32 %7, %10
%12 = load double, double* %3
%13 = load double, double* %4
%14 = call i32 @dbar(double %12, double %13)
%15 = add nsw i32 %11, %14
%16 = load double, double* %3
%17 = load double, double* %4
%18 = call i32 @ubar(double %16, double %17)
%19 = add nsw i32 %15, %18
%20 = mul nsw i32 2, %19
%21 = sitofp i32 %20 to double
ret double %21
}

LLVM IR (-O2):
define double @F2_nc_n(double %0, double %1) {
%3 = tail call i32 @uv(double %0, double %1)
%4 = tail call i32 @sb(double %0, double %1)
%5 = add nsw i32 %4, %3
%6 = tail call i32 @dbar(double %0, double %1)
%7 = add nsw i32 %5, %6
%8 = tail call i32 @ubar(double %0, double %1)
%9 = add nsw i32 %7, %8
%10 = shl nsw i32 %9, 1
%11 = sitofp i32 %10 to double
ret double %11
}
/* Type definitions */
struct vectyp {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ vectyp_resize__(struct vectyp *, size_t, int /*<<< orphan*/);
void vectyp_resize(struct vectyp *v, size_t new_count) {
  vectyp_resize__(v, new_count, 0);
}


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

x86 assembly (clang, -O2):
<vectyp_resize>:
xor    %edx,%edx
jmp    1030 <vectyp_resize__@plt>

LLVM IR (-O0):
%struct.vectyp = type { i32 }
define void @vectyp_resize(%struct.vectyp* %0, i64 %1) {
%3 = alloca %struct.vectyp*
%4 = alloca i64
store %struct.vectyp* %0, %struct.vectyp** %3
store i64 %1, i64* %4
%5 = load %struct.vectyp*, %struct.vectyp** %3
%6 = load i64, i64* %4
%7 = call i32 @vectyp_resize__(%struct.vectyp* %5, i64 %6, i32 0)
ret void
}

LLVM IR (-O2):
%struct.vectyp = type { i32 }
define void @vectyp_resize(%struct.vectyp* %0, i64 %1) {
%3 = tail call i32 @vectyp_resize__(%struct.vectyp* %0, i64 %1, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ make_code();
int /*<<< orphan*/ print_code();
int /*<<< orphan*/ read_keys();
main() {
  read_keys();
  make_code();
  print_code();
  exit(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <read_keys@plt>
mov    $0x0,%al
call   1030 <make_code@plt>
mov    $0x0,%al
call   1050 <print_code@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1060 <read_keys@plt>
xor    %eax,%eax
call   1030 <make_code@plt>
xor    %eax,%eax
call   1050 <print_code@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @read_keys()
%3 = call i32 (...) @make_code()
%4 = call i32 (...) @print_code()
%5 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @read_keys()
%2 = tail call i32 (...) @make_code()
%3 = tail call i32 (...) @print_code()
%4 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int getline(char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  int len;
  char line[1000];
  while ((len = getline(line, 1000)) > 0)
    printf("New modified line:\n%s\n", line);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x3f0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x3f0(%rbp),%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jle    1167 <main+0x47>
lea    -0x3f0(%rbp),%rsi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
jmp    1132 <main+0x12>
xor    %eax,%eax
add    $0x3f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x3e8,%rsp
mov    %rsp,%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
test   %eax,%eax
jle    116c <main+0x4c>
lea    0xebe(%rip),%r14
mov    %rsp,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    $0x3e8,%esi
call   1040 <getline@plt>
test   %eax,%eax
jg     1150 <main+0x30>
xor    %eax,%eax
add    $0x3e8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [23 x i8] c"New modified line:\0A%s\0A\00"
define i32 @main() {
%1 = alloca [1000 x i8]
%2 = getelementptr inbounds [1000 x i8], [1000 x i8]* %1, i64 0, i64 0
%3 = call i32 @getline(i8* %2, i32 1000)
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %0, %5
%6 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %2)
%7 = call i32 @getline(i8* %2, i32 1000)
%8 = icmp sgt i32 %7, 0
br i1 %8, label %5, label %9
9: ; preds = %5, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fork();
int t() { fork(); }


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

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

LLVM IR (-O0):
define i32 @t() {
%1 = alloca i32
%2 = call i32 (...) @fork()
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
define i32 @t() {
%1 = tail call i32 (...) @fork()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int a = 3, b = -7;
  int *pa = &a, *pb = &b;
  *pb = 5;
  if (*pb > *pa)
    a = *pa - b;
  printf("a=%d b=%d\n", a, b);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x3,-0x8(%rbp)
movl   $0xfffffff9,-0xc(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0xc(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movl   $0x5,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    1165 <main+0x55>
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [11 x i8] c"a=%d b=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 -2, i32 5)
ret i32 0
}
unsigned short int f93(unsigned short int x, unsigned int y) {
  return (x << (8 * sizeof(unsigned short) - y)) + (x >> y);
}


x86 assembly (clang, -O0):
<f93>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
mov    %esi,-0x8(%rbp)
movzwl -0x2(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
mov    $0x10,%ecx
sub    %rdx,%rcx
shl    %cl,%eax
movzwl -0x2(%rbp),%edx
mov    -0x8(%rbp),%ecx
sar    %cl,%edx
mov    %edx,%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f93>:
mov    $0x10,%cl
sub    %sil,%cl
mov    %edi,%eax
shl    %cl,%eax
mov    %esi,%ecx
shr    %cl,%edi
add    %edi,%eax
ret

LLVM IR (-O0):
define zeroext i16 @f93(i16 zeroext %0, i32 %1) {
%3 = alloca i16
%4 = alloca i32
store i16 %0, i16* %3
store i32 %1, i32* %4
%5 = load i16, i16* %3
%6 = zext i16 %5 to i32
%7 = load i32, i32* %4
%8 = zext i32 %7 to i64
%9 = sub i64 16, %8
%10 = trunc i64 %9 to i32
%11 = shl i32 %6, %10
%12 = load i16, i16* %3
%13 = zext i16 %12 to i32
%14 = load i32, i32* %4
%15 = ashr i32 %13, %14
%16 = add nsw i32 %11, %15
%17 = trunc i32 %16 to i16
ret i16 %17
}

LLVM IR (-O2):
define zeroext i16 @f93(i16 zeroext %0, i32 %1) {
%3 = zext i16 %0 to i32
%4 = sub i32 16, %1
%5 = shl i32 %3, %4
%6 = lshr i32 %3, %1
%7 = add nsw i32 %5, %6
%8 = trunc i32 %7 to i16
ret i16 %8
}
/* Variables and functions */
int /*<<< orphan*/ ft_putstr_fd(char const *, int);
void ft_putstr(char const *str) { ft_putstr_fd(str, 1); }


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

x86 assembly (clang, -O2):
<ft_putstr>:
mov    $0x1,%esi
jmp    1030 <ft_putstr_fd@plt>

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

LLVM IR (-O2):
define void @ft_putstr(i8* %0) {
%2 = tail call i32 @ft_putstr_fd(i8* %0, i32 1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ check_dealloc(void *, char *, int);
int /*<<< orphan*/ free(void *);
void x_free(char *file, int lineno, void *block) {
  check_dealloc(block, file, lineno);
  free(block);
}


x86 assembly (clang, -O0):
<x_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1040 <check_dealloc@plt>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<x_free>:
push   %rbx
mov    %rdx,%rbx
mov    %esi,%edx
mov    %rdi,%rsi
mov    %rbx,%rdi
call   1040 <check_dealloc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @x_free(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @check_dealloc(i8* %2, i8* %0, i32 %1)
%5 = tail call i32 @free(i8* %2)
ret void
}
int isCharValidTag(char c) {
  return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z') ||
          (c >= '0' && c <= '9') || (c == '_'));
}


x86 assembly (clang, -O0):
<isCharValidTag>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x41,%eax
jl     1129 <isCharValidTag+0x29>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5a,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <isCharValidTag+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x61,%eax
jl     1148 <isCharValidTag+0x48>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x7a,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <isCharValidTag+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x30,%eax
jl     1167 <isCharValidTag+0x67>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x39,%ecx
mov    %al,-0x2(%rbp)
jle    1174 <isCharValidTag+0x74>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isCharValidTag>:
mov    %edi,%eax
and    $0xdf,%al
add    $0xbf,%al
cmp    $0x1a,%al
setb   %al
lea    -0x30(%rdi),%ecx
cmp    $0xa,%cl
setb   %cl
cmp    $0x5f,%dil
sete   %dl
or     %cl,%dl
or     %al,%dl
movzbl %dl,%eax
ret

LLVM IR (-O0):
define i32 @isCharValidTag(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 65
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 90
br i1 %9, label %30, label %10
10: ; preds = %6, %1
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp sge i32 %12, 97
br i1 %13, label %14, label %18
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp sle i32 %16, 122
br i1 %17, label %30, label %18
18: ; preds = %14, %10
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp sge i32 %20, 48
br i1 %21, label %22, label %26
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp sle i32 %24, 57
br i1 %25, label %30, label %26
26: ; preds = %22, %18
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 95
br label %30
30: ; preds = %26, %22, %14, %6
%31 = phi i1 [ true, %22 ], [ true, %14 ], [ true, %6 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @isCharValidTag(i8 signext %0) {
%2 = and i8 %0, -33
%3 = add i8 %2, -65
%4 = icmp ult i8 %3, 26
%5 = add i8 %0, -48
%6 = icmp ult i8 %5, 10
%7 = or i1 %6, %4
%8 = icmp eq i8 %0, 95
%9 = or i1 %8, %7
%10 = zext i1 %9 to i32
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XGetModifierMapping() {
  printf("XGetModifierMapping called\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [28 x i8] c"XGetModifierMapping called\0A\00"
define i32 @XGetModifierMapping() {
%1 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [27 x i8] c"XGetModifierMapping called\00"
define i32 @XGetModifierMapping() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
ret i32 0
}