xunge/DecIR huggingface dataset:
unsigned int asan_red_zone_size(unsigned int size) {
  unsigned int c = size & (32 - 1);
  return c ? 2 * 32 - c : 32;
}


x86 assembly (clang, -O0):
<asan_red_zone_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1f,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112a <asan_red_zone_size+0x2a>
mov    $0x40,%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <asan_red_zone_size+0x37>
mov    $0x20,%eax
mov    %eax,-0xc(%rbp)
jmp    1137 <asan_red_zone_size+0x37>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<asan_red_zone_size>:
and    $0x1f,%edi
mov    $0x40,%ecx
sub    %edi,%ecx
test   %edi,%edi
mov    $0x20,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define i32 @asan_red_zone_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = and i32 %4, 31
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %1
%9 = load i32, i32* %3
%10 = sub i32 64, %9
br label %12
11: ; preds = %1
br label %12
12: ; preds = %11, %8
%13 = phi i32 [ %10, %8 ], [ 32, %11 ]
ret i32 %13
}

LLVM IR (-O2):
define i32 @asan_red_zone_size(i32 %0) {
%2 = and i32 %0, 31
%3 = icmp eq i32 %2, 0
%4 = sub nuw nsw i32 64, %2
%5 = select i1 %3, i32 32, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ curs_set(int /*<<< orphan*/);
int /*<<< orphan*/ do_update_commandline();
int /*<<< orphan*/ post_update();
void update_commandline(void) {
  curs_set(0);
  do_update_commandline();
  post_update();
}


x86 assembly (clang, -O0):
<update_commandline>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1050 <curs_set@plt>
mov    $0x0,%al
call   1030 <do_update_commandline@plt>
mov    $0x0,%al
call   1040 <post_update@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<update_commandline>:
push   %rax
xor    %edi,%edi
call   1050 <curs_set@plt>
xor    %eax,%eax
call   1030 <do_update_commandline@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <post_update@plt>

LLVM IR (-O0):
define void @update_commandline() {
%1 = call i32 @curs_set(i32 0)
%2 = call i32 (...) @do_update_commandline()
%3 = call i32 (...) @post_update()
ret void
}

LLVM IR (-O2):
define void @update_commandline() {
%1 = tail call i32 @curs_set(i32 0)
%2 = tail call i32 (...) @do_update_commandline()
%3 = tail call i32 (...) @post_update()
ret void
}
/* Variables and functions */
scalar_t__ strlen(char *);
char tolower(char);
char *stolower(char *s) {
  char *p = s;
  if (strlen(s) == 0)
    return s;
  while ((*p = tolower(*p)))
    p++;
  return s;
}


x86 assembly (clang, -O0):
<stolower>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
jne    1154 <stolower+0x34>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    118c <stolower+0x6c>
jmp    1159 <stolower+0x39>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1040 <tolower@plt>
mov    -0x18(%rbp),%rcx
mov    %al,(%rcx)
cmp    $0x0,%al
je     1184 <stolower+0x64>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1159 <stolower+0x39>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stolower>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%al
test   %al,%al
je     1142 <stolower+0x32>
movsbl %al,%edi
call   1030 <tolower@plt>
mov    %al,(%r14)
test   %al,%al
je     1142 <stolower+0x32>
lea    0x1(%r14),%rbx
movsbl (%rbx),%edi
call   1030 <tolower@plt>
mov    %al,(%rbx)
add    $0x1,%rbx
test   %al,%al
jne    1130 <stolower+0x20>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @stolower(i8* returned %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %4
4: ; preds = %1
%5 = tail call signext i8 @tolower(i8 signext %2)
store i8 %5, i8* %0
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %4, %7
%8 = phi i8* [ %9, %7 ], [ %0, %4 ]
%9 = getelementptr inbounds i8, i8* %8, i64 1
%10 = load i8, i8* %9
%11 = tail call signext i8 @tolower(i8 signext %10)
store i8 %11, i8* %9
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %7
13: ; preds = %7, %4, %1
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ FlightPlanSettingsHandle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void FlightPlanSettingsUpdated() { UAVObjUpdated(FlightPlanSettingsHandle()); }


x86 assembly (clang, -O0):
<FlightPlanSettingsUpdated>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <FlightPlanSettingsHandle@plt>
mov    %eax,%edi
call   1040 <UAVObjUpdated@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<FlightPlanSettingsUpdated>:
push   %rax
xor    %eax,%eax
call   1030 <FlightPlanSettingsHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <UAVObjUpdated@plt>

LLVM IR (-O0):
define void @FlightPlanSettingsUpdated() {
%1 = call i32 (...) @FlightPlanSettingsHandle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @FlightPlanSettingsUpdated() {
%1 = tail call i32 (...) @FlightPlanSettingsHandle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
int __report();
int main(void) { return __report(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__report()
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
char getc(int /*<<< orphan*/ *);
int /*<<< orphan*/ ungetc(int, int /*<<< orphan*/ *);
void skip_comment(FILE *f) {
  int c;
  if ((c = getc(f)) == '#') {
    while (getc(f) != '\n')
      ;
  } else {
    ungetc(c, f);
  }
}


x86 assembly (clang, -O0):
<skip_comment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getc@plt>
movsbl %al,%eax
mov    %eax,-0xc(%rbp)
cmp    $0x23,%eax
jne    1168 <skip_comment+0x48>
jmp    1149 <skip_comment+0x29>
mov    -0x8(%rbp),%rdi
call   1040 <getc@plt>
movsbl %al,%eax
cmp    $0xa,%eax
je     1163 <skip_comment+0x43>
jmp    1149 <skip_comment+0x29>
jmp    1174 <skip_comment+0x54>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
call   1030 <ungetc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skip_comment>:
push   %rbx
mov    %rdi,%rbx
call   1040 <getc@plt>
cmp    $0x23,%al
jne    113e <skip_comment+0x1e>
nopl   (%rax)
mov    %rbx,%rdi
call   1040 <getc@plt>
cmp    $0xa,%al
jne    1130 <skip_comment+0x10>
pop    %rbx
ret
movsbl %al,%edi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <ungetc@plt>

LLVM IR (-O0):
define void @skip_comment(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call signext i8 @getc(i32* %4)
%6 = sext i8 %5 to i32
store i32 %6, i32* %3
%7 = icmp eq i32 %6, 35
br i1 %7, label %8, label %16
8: ; preds = %1
br label %9
9: ; preds = %14, %8
%10 = load i32*, i32** %2
%11 = call signext i8 @getc(i32* %10)
%12 = sext i8 %11 to i32
%13 = icmp ne i32 %12, 10
br i1 %13, label %14, label %15
14: ; preds = %9
br label %9
15: ; preds = %9
br label %20
16: ; preds = %1
%17 = load i32, i32* %3
%18 = load i32*, i32** %2
%19 = call i32 @ungetc(i32 %17, i32* %18)
br label %20
20: ; preds = %16, %15
ret void
}

LLVM IR (-O2):
define void @skip_comment(i32* nocapture %0) {
%2 = tail call signext i8 @getc(i32* %0)
%3 = icmp eq i8 %2, 35
br i1 %3, label %4, label %7
4: ; preds = %1, %4
%5 = tail call signext i8 @getc(i32* %0)
%6 = icmp eq i8 %5, 10
br i1 %6, label %10, label %4
7: ; preds = %1
%8 = sext i8 %2 to i32
%9 = tail call i32 @ungetc(i32 %8, i32* %0)
br label %10
10: ; preds = %4, %7
ret void
}
/* Variables and functions */
bool start_dot(char *name) { return name[0] == '.'; }


x86 assembly (clang, -O0):
<start_dot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<start_dot>:
xor    %eax,%eax
cmpb   $0x2e,(%rdi)
sete   %al
ret

LLVM IR (-O0):
define i32 @start_dot(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 0
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 46
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @start_dot(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 46
%4 = zext i1 %3 to i32
ret i32 %4
}
void foo157() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fdopen(int, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void write_to_pipe(int file) {
  FILE *stream;
  stream = fdopen(file, "w");
  fprintf(stream,
          "This is a write from parent to a read from child process!\n");
  fclose(stream);
}


x86 assembly (clang, -O0):
<write_to_pipe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    0xebb(%rip),%rsi
call   1050 <fdopen@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea9(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_to_pipe>:
push   %rbx
lea    0xec8(%rip),%rsi
call   1040 <fdopen@plt>
mov    %rax,%rbx
lea    0xebb(%rip),%rdi
mov    $0x3a,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"w\00"
@.str.1 = [59 x i8] c"This is a write from parent to a read from child process!\0A\00"
define void @write_to_pipe(i32 %0) {
%2 = alloca i32
%3 = alloca i32*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32* @fdopen(i32 %4, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i32* %5, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @fprintf(i32* %6, i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0))
%8 = load i32*, i32** %3
%9 = call i32 @fclose(i32* %8)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"w\00"
@.str.1 = [59 x i8] c"This is a write from parent to a read from child process!\0A\00"
define void @write_to_pipe(i32 %0) {
%2 = tail call i32* @fdopen(i32 %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i64 58, i64 1, i32* %2)
%4 = tail call i32 @fclose(i32* %2)
ret void
}
char *strcpy3(char *dest, const char *src) {
  int i;
  for (i = 0; (dest[i] = src[i]) != 0; i++)
    ;
  return dest;
}


x86 assembly (clang, -O0):
<strcpy3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%al
mov    -0x8(%rbp),%rcx
movslq -0x14(%rbp),%rdx
mov    %al,(%rcx,%rdx,1)
movsbl %al,%eax
cmp    $0x0,%eax
je     1148 <strcpy3+0x48>
jmp    113a <strcpy3+0x3a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1113 <strcpy3+0x13>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy3>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy3+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy3(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %9, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %1, i64 %4
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 %6, i8* %7
%8 = icmp eq i8 %6, 0
%9 = add nuw i64 %4, 1
br i1 %8, label %10, label %3
10: ; preds = %3
ret i8* %0
}
int fib(int n) {
  if (n > 1) {
    return fib(n - 1) + fib(n - 2);
  } else
    return n;
}


x86 assembly (clang, -O0):
<fib>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    114d <fib+0x3d>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <fib@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <fib@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <fib+0x43>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fib>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jl     1136 <fib+0x26>
xor    %ebp,%ebp
xchg   %ax,%ax
lea    -0x1(%rbx),%edi
call   1030 <fib@plt>
lea    -0x2(%rbx),%ecx
add    %eax,%ebp
cmp    $0x3,%ebx
mov    %ecx,%ebx
ja     1120 <fib+0x10>
jmp    1138 <fib+0x28>
mov    %ebx,%ecx
add    %ecx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @fib(i32 %0) {
%2 = icmp sgt i32 %0, 1
br i1 %2, label %3, label %11
3: ; preds = %1, %3
%4 = phi i32 [ %8, %3 ], [ %0, %1 ]
%5 = phi i32 [ %9, %3 ], [ 0, %1 ]
%6 = add nsw i32 %4, -1
%7 = tail call i32 @fib(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ugt i32 %4, 3
br i1 %10, label %3, label %11
11: ; preds = %3, %1
%12 = phi i32 [ 0, %1 ], [ %9, %3 ]
%13 = phi i32 [ %0, %1 ], [ %8, %3 ]
%14 = add nsw i32 %13, %12
ret i32 %14
}
void build_standard_archive_name(buffer, orginal) char *buffer;
char *orginal;
{
  strcpy(buffer, orginal);
  modify_filename_extention(buffer, ".lzh");
}


x86 assembly (clang, -O0):
<build_standard_archive_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb8(%rip),%rsi
mov    $0x0,%al
call   1040 <modify_filename_extention@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_standard_archive_name>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strcpy@plt>
lea    0xed0(%rip),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
pop    %rbx
jmp    1040 <modify_filename_extention@plt>

LLVM IR (-O0):
@.str = [5 x i8] c".lzh\00"
define void @build_standard_archive_name(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @strcpy(i8* %5, i8* %6)
%8 = load i8*, i8** %3
%9 = call i32 (i8*, i8*, ...) bitcast (i32 (...)* @modify_filename_extention to i32 (i8*, i8*, ...)*)(i8* %8, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c".lzh\00"
define void @build_standard_archive_name(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strcpy(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = tail call i32 (i8*, i8*, ...) bitcast (i32 (...)* @modify_filename_extention to i32 (i8*, i8*, ...)*)(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret void
}
double amin1(double arg1, double arg2) {
  double res;
  if (arg1 <= arg2) {
    res = arg1;
  } else {
    res = arg2;
  }
  return res;
}


x86 assembly (clang, -O0):
<amin1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jb     1131 <amin1+0x31>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    113b <amin1+0x3b>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<amin1>:
movapd %xmm0,%xmm2
cmplesd %xmm1,%xmm2
andpd  %xmm2,%xmm0
andnpd %xmm1,%xmm2
orpd   %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @amin1(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %3
%7 = load double, double* %4
%8 = fcmp ole double %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %3
store double %10, double* %5
br label %13
11: ; preds = %2
%12 = load double, double* %4
store double %12, double* %5
br label %13
13: ; preds = %11, %9
%14 = load double, double* %5
ret double %14
}

LLVM IR (-O2):
define double @amin1(double %0, double %1) {
%3 = fcmp ole double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
/* Variables and functions */
int atoi(char const *);
scalar_t__ malloc(int);
int *P_process_digit(const char *word) {
  int *r = (int *)malloc(sizeof(int));
  *r = atoi(word);
  return r;
}


x86 assembly (clang, -O0):
<P_process_digit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <atoi@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<P_process_digit>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %r14,%rdi
call   1040 <atoi@plt>
mov    %eax,(%rbx)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @P_process_digit(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
store i8* %0, i8** %2
%4 = call i64 @malloc(i32 4)
%5 = inttoptr i64 %4 to i32*
store i32* %5, i32** %3
%6 = load i8*, i8** %2
%7 = call i32 @atoi(i8* %6)
%8 = load i32*, i32** %3
store i32 %7, i32* %8
%9 = load i32*, i32** %3
ret i32* %9
}

LLVM IR (-O2):
define i32* @P_process_digit(i8* nocapture %0) {
%2 = tail call i64 @malloc(i32 4)
%3 = inttoptr i64 %2 to i32*
%4 = tail call i32 @atoi(i8* %0)
store i32 %4, i32* %3
ret i32* %3
}
void w10(void *x, long long y) { *(long long *)(x + 32758) = y; }


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

x86 assembly (clang, -O2):
<w10>:
mov    %rsi,0x7ff6(%rdi)
ret

LLVM IR (-O0):
define void @w10(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = getelementptr i8, i8* %6, i64 32758
%8 = bitcast i8* %7 to i64*
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @w10(i8* nocapture writeonly %0, i64 %1) {
%3 = getelementptr i8, i8* %0, i64 32758
%4 = bitcast i8* %3 to i64*
store i64 %1, i64* %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *);
char *gettext(char *);
int /*<<< orphan*/ print_usage(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void print_error(void) {
  const char *program = "yptest";
  print_usage(stderr);
  fprintf(stderr,
          gettext("Try `%s --help' or `%s --usage' for more information.\n"),
          program, program);
}


x86 assembly (clang, -O0):
<print_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    0x2e96(%rip),%rax
mov    (%rax),%edi
call   1050 <print_usage@plt>
mov    0x2e88(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
lea    0xea3(%rip),%rdi
call   1030 <gettext@plt>
mov    -0xc(%rbp),%edi
mov    %rax,%rsi
mov    -0x8(%rbp),%rdx
mov    -0x8(%rbp),%rcx
call   1040 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_error>:
push   %rbx
mov    0x2ea8(%rip),%rbx
mov    (%rbx),%edi
call   1050 <print_usage@plt>
mov    (%rbx),%ebx
lea    0xebf(%rip),%rdi
call   1030 <gettext@plt>
lea    0xeac(%rip),%rcx
mov    %ebx,%edi
mov    %rax,%rsi
mov    %rcx,%rdx
pop    %rbx
jmp    1040 <fprintf@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"yptest\00"
@stderr = global i32 0
@.str.1 = [55 x i8] c"Try `%s --help' or `%s --usage' for more information.\0A\00"
define void @print_error() {
%1 = alloca i8*
store i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8** %1
%2 = load i32, i32* @stderr
%3 = call i32 @print_usage(i32 %2)
%4 = load i32, i32* @stderr
%5 = call i8* @gettext(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%6 = load i8*, i8** %1
%7 = load i8*, i8** %1
%8 = call i32 @fprintf(i32 %4, i8* %5, i8* %6, i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"yptest\00"
@stderr = global i32 0
@.str.1 = [55 x i8] c"Try `%s --help' or `%s --usage' for more information.\0A\00"
define void @print_error() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @print_usage(i32 %1)
%3 = load i32, i32* @stderr
%4 = tail call i8* @gettext(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @fprintf(i32 %3, i8* %4, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glRotatef(double, double, double, double);
int /*<<< orphan*/ glTranslatef(double, double, double);
void bend_forward(void) {
  glTranslatef(0.0, 1.000000, 0.0);
  glRotatef(0.1 * (900), 1.0, 0.0, 0.0);
  glTranslatef(0.0, -1.000000, 0.0);
}


x86 assembly (clang, -O0):
<bend_forward>:
push   %rbp
mov    %rsp,%rbp
xorps  %xmm2,%xmm2
movsd  0xee1(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glTranslatef@plt>
movsd  0xec9(%rip),%xmm0
movsd  0xec9(%rip),%xmm1
xorps  %xmm3,%xmm3
movaps %xmm3,%xmm2
call   1040 <glRotatef@plt>
xorps  %xmm2,%xmm2
movsd  0xea3(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <glTranslatef@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<bend_forward>:
push   %rax
movsd  0xed7(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
call   1030 <glTranslatef@plt>
movsd  0xecc(%rip),%xmm0
xorps  %xmm2,%xmm2
xorps  %xmm3,%xmm3
movsd  0xeb6(%rip),%xmm1
call   1040 <glRotatef@plt>
movsd  0xeb9(%rip),%xmm1
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
pop    %rax
jmp    1030 <glTranslatef@plt>

LLVM IR (-O0):
define void @bend_forward() {
%1 = call i32 @glTranslatef(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%2 = call i32 @glRotatef(double 9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%3 = call i32 @glTranslatef(double 0.000000e+00, double -1.000000e+00, double 0.000000e+00)
ret void
}

LLVM IR (-O2):
define void @bend_forward() {
%1 = tail call i32 @glTranslatef(double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%2 = tail call i32 @glRotatef(double 9.000000e+01, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%3 = tail call i32 @glTranslatef(double 0.000000e+00, double -1.000000e+00, double 0.000000e+00)
ret void
}
/* Type definitions */
struct bit_unpack_data {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct bit_unpack_data *);
void bit_unpack_free(struct bit_unpack_data *bud) {
  if (NULL != bud) {
    free(bud);
  }
}


x86 assembly (clang, -O0):
<bit_unpack_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
xor    %eax,%eax
cmp    -0x8(%rbp),%rax
je     1131 <bit_unpack_free+0x21>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bit_unpack_free>:
test   %rdi,%rdi
je     111a <bit_unpack_free+0xa>
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
%struct.bit_unpack_data = type { i32 }
define void @bit_unpack_free(%struct.bit_unpack_data* %0) {
%2 = alloca %struct.bit_unpack_data*
store %struct.bit_unpack_data* %0, %struct.bit_unpack_data** %2
%3 = load %struct.bit_unpack_data*, %struct.bit_unpack_data** %2
%4 = icmp ne %struct.bit_unpack_data* null, %3
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load %struct.bit_unpack_data*, %struct.bit_unpack_data** %2
%7 = call i32 @free(%struct.bit_unpack_data* %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
%struct.bit_unpack_data = type { i32 }
define void @bit_unpack_free(%struct.bit_unpack_data* %0) {
%2 = icmp eq %struct.bit_unpack_data* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(%struct.bit_unpack_data* %0)
br label %5
5: ; preds = %3, %1
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int **create_table(int);
int /*<<< orphan*/ free_table(int **, int);
int /*<<< orphan*/ print_table(int **, int);
int read_input();
int main() {
  int width = read_input();
  int **table = create_table(width);
  print_table(table, width);
  free_table(table, width);
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1060 <read_input@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <create_table@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1030 <print_table@plt>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%esi
call   1050 <free_table@plt>
mov    0x2e5c(%rip),%rax
mov    (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <read_input@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1040 <create_table@plt>
mov    %rax,%r14
mov    %rax,%rdi
mov    %ebx,%esi
call   1030 <print_table@plt>
mov    %r14,%rdi
mov    %ebx,%esi
call   1050 <free_table@plt>
mov    0x2e6e(%rip),%rax
mov    (%rax),%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32**
store i32 0, i32* %1
%4 = call i32 (...) @read_input()
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32** @create_table(i32 %5)
store i32** %6, i32*** %3
%7 = load i32**, i32*** %3
%8 = load i32, i32* %2
%9 = call i32 @print_table(i32** %7, i32 %8)
%10 = load i32**, i32*** %3
%11 = load i32, i32* %2
%12 = call i32 @free_table(i32** %10, i32 %11)
%13 = load i32, i32* @EXIT_SUCCESS
ret i32 %13
}

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = tail call i32 (...) @read_input()
%2 = tail call i32** @create_table(i32 %1)
%3 = tail call i32 @print_table(i32** %2, i32 %1)
%4 = tail call i32 @free_table(i32** %2, i32 %1)
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
void unw_set_fpreg() {}


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

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

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

LLVM IR (-O2):
define void @unw_set_fpreg() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void problem(char *msg) {
  fprintf(stderr, "FATAL ERROR: %s\n", msg);
  exit(1);
}


x86 assembly (clang, -O0):
<problem>:
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>
mov    $0x1,%edi
call   1040 <exit@plt>

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [17 x i8] c"FATAL ERROR: %s\0A\00"
define void @problem(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 ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [17 x i8] c"FATAL ERROR: %s\0A\00"
define void @problem(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
char *U_WMRCORENONE_set(char *);
char *U_WMREC_set(void) { return U_WMRCORENONE_set("U_WMREC"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMREC\00"
define i8* @U_WMREC_set() {
%1 = call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMREC\00"
define i8* @U_WMREC_set() {
%1 = tail call i8* @U_WMRCORENONE_set(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i8* %1
}
/* Variables and functions */
int find(int *, int);
void Union(int S[], int i, int j) {
  int x = find(S, i);
  int y = find(S, j);
  S[x] = y;
}


x86 assembly (clang, -O0):
<Union>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <find@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
call   1030 <find@plt>
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%edx
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Union>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rdi,%rbx
call   1030 <find@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
mov    %r14d,%esi
call   1030 <find@plt>
movslq %ebp,%rcx
mov    %eax,(%rbx,%rcx,4)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @Union(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32*, i32** %4
%10 = load i32, i32* %5
%11 = call i32 @find(i32* %9, i32 %10)
store i32 %11, i32* %7
%12 = load i32*, i32** %4
%13 = load i32, i32* %6
%14 = call i32 @find(i32* %12, i32 %13)
store i32 %14, i32* %8
%15 = load i32, i32* %8
%16 = load i32*, i32** %4
%17 = load i32, i32* %7
%18 = sext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %16, i64 %18
store i32 %15, i32* %19
ret void
}

LLVM IR (-O2):
define void @Union(i32* %0, i32 %1, i32 %2) {
%4 = tail call i32 @find(i32* %0, i32 %1)
%5 = tail call i32 @find(i32* %0, i32 %2)
%6 = sext i32 %4 to i64
%7 = getelementptr inbounds i32, i32* %0, i64 %6
store i32 %5, i32* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vclear(double *, double, int);
void vzero(double *a, int n) { vclear(a, 0.0, n); }


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

x86 assembly (clang, -O2):
<vzero>:
xorps  %xmm0,%xmm0
jmp    1030 <vclear@plt>

LLVM IR (-O0):
define void @vzero(double* %0, i32 %1) {
%3 = alloca double*
%4 = alloca i32
store double* %0, double** %3
store i32 %1, i32* %4
%5 = load double*, double** %3
%6 = load i32, i32* %4
%7 = call i32 @vclear(double* %5, double 0.000000e+00, i32 %6)
ret void
}

LLVM IR (-O2):
define void @vzero(double* %0, i32 %1) {
%3 = tail call i32 @vclear(double* %0, double 0.000000e+00, i32 %1)
ret void
}
/* Variables and functions */
int and_l(int *, int *);
int intr_wrap_514(int p1, int p2) { return and_l(&p1, &p2); }


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

x86 assembly (clang, -O2):
<intr_wrap_514>:
push   %rax
mov    %edi,0x4(%rsp)
mov    %esi,(%rsp)
lea    0x4(%rsp),%rdi
mov    %rsp,%rsi
call   1030 <and_l@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @intr_wrap_514(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @and_l(i32* %3, i32* %4)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ uint8_t;

/* Variables and functions */
uint8_t gpiosearch(uint8_t gpio, uint8_t *map, int len) {
  while (--len) {
    if (map[len] == gpio)
      return len + 1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<gpiosearch>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
cmp    $0x0,%eax
je     114d <gpiosearch+0x4d>
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
cmp    -0x10(%rbp),%rax
jne    1148 <gpiosearch+0x48>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
cltq
mov    %rax,-0x8(%rbp)
jmp    1155 <gpiosearch+0x55>
jmp    110f <gpiosearch+0xf>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gpiosearch>:
movslq %edx,%rax
lea    (%rsi,%rax,8),%r9
add    $0xfffffffffffffff8,%r9
mov    $0x1,%r10d
sub    %eax,%r10d
shl    $0x20,%rax
movabs $0x100000000,%rsi
add    %rax,%rsi
xor    %eax,%eax
movabs $0xffffffff00000000,%r8
ff ff ff
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
cmp    %ecx,%r10d
je     115c <gpiosearch+0x5c>
add    %r8,%rsi
lea    -0x1(%rcx),%rdx
cmp    %rdi,(%r9,%rcx,8)
mov    %rdx,%rcx
jne    1140 <gpiosearch+0x40>
sar    $0x20,%rsi
mov    %rsi,%rax
ret

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

LLVM IR (-O2):
define i64 @gpiosearch(i64 %0, i64* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
br label %5
5: ; preds = %10, %3
%6 = phi i64 [ %7, %10 ], [ %4, %3 ]
%7 = add nsw i64 %6, -1
%8 = trunc i64 %7 to i32
%9 = icmp eq i32 %8, 0
br i1 %9, label %17, label %10
10: ; preds = %5
%11 = getelementptr inbounds i64, i64* %1, i64 %7
%12 = load i64, i64* %11
%13 = icmp eq i64 %12, %0
br i1 %13, label %14, label %5
14: ; preds = %10
%15 = shl i64 %6, 32
%16 = ashr exact i64 %15, 32
br label %17
17: ; preds = %5, %14
%18 = phi i64 [ %16, %14 ], [ 0, %5 ]
ret i64 %18
}
__attribute__((weak)) void fd_nrf8001_open_remote_pipe_success(void) {}


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define weak void @fd_nrf8001_open_remote_pipe_success() {
ret void
}
int convertToLongFileName(char *fname, const unsigned int maxLen) { return 0; }


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

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

LLVM IR (-O0):
define i32 @convertToLongFileName(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
ret i32 0
}

LLVM IR (-O2):
define i32 @convertToLongFileName(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
int test_imm_8Aint64_lowword_mem(long long *val) {
  return ((*val) & (0x8A << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_8Aint64_lowword_mem>:
testb  $0x8a,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_8Aint64_lowword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 138
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
int fun307() { return 307; }


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

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

LLVM IR (-O0):
define i32 @fun307() {
ret i32 307
}

LLVM IR (-O2):
define i32 @fun307() {
ret i32 307
}
extern void libvampsdk_v_2_8_present(void) {}


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

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

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

LLVM IR (-O2):
define void @libvampsdk_v_2_8_present() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ spilt_spem(char *);
int main() {
  spilt_spem("ct.pem");
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"ct.pem\00"
define i32 @main() {
%1 = tail call i32 @spilt_spem(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ barrier();
void putc(int c) {
  while ((*(volatile unsigned int *)0xc11084cc) & (1 << 21))
    barrier();
  (*(volatile unsigned int *)0xc11084c4) = c;
}


x86 assembly (clang, -O0):
<putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0xc11084cc,%eax
mov    (%rax),%eax
and    $0x200000,%eax
cmp    $0x0,%eax
je     113c <putc+0x2c>
mov    $0x0,%al
call   1030 <barrier@plt>
jmp    111b <putc+0xb>
mov    -0x4(%rbp),%ecx
mov    $0xc11084c4,%eax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putc>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0xc11084cc,%ebx
testl  $0x200000,(%rbx)
je     113f <putc+0x2f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <barrier@plt>
testl  $0x200000,(%rbx)
jne    1130 <putc+0x20>
mov    %ebp,-0x8(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @putc(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %7, %1
%4 = load volatile i32, i32* inttoptr (i64 3239085260 to i32*)
%5 = and i32 %4, 2097152
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = call i32 (...) @barrier()
br label %3
9: ; preds = %3
%10 = load i32, i32* %2
store volatile i32 %10, i32* inttoptr (i64 3239085252 to i32*)
ret void
}

LLVM IR (-O2):
define void @putc(i32 %0) {
%2 = load volatile i32, i32* inttoptr (i64 3239085260 to i32*)
%3 = and i32 %2, 2097152
%4 = icmp eq i32 %3, 0
br i1 %4, label %10, label %5
5: ; preds = %1, %5
%6 = tail call i32 (...) @barrier()
%7 = load volatile i32, i32* inttoptr (i64 3239085260 to i32*)
%8 = and i32 %7, 2097152
%9 = icmp eq i32 %8, 0
br i1 %9, label %10, label %5
10: ; preds = %5, %1
store volatile i32 %0, i32* inttoptr (i64 3239085252 to i32*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ genExtra3(char *);
void _FOO_FOO_() {
  genExtra3("#define FSUB1(name) PREFIX(SUFFIX(UPCASE(name)))");
}


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

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

LLVM IR (-O0):
@.str = [49 x i8] c"#define FSUB1(name) PREFIX(SUFFIX(UPCASE(name)))\00"
define void @_FOO_FOO_() {
%1 = call i32 @genExtra3(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [49 x i8] c"#define FSUB1(name) PREFIX(SUFFIX(UPCASE(name)))\00"
define void @_FOO_FOO_() {
%1 = tail call i32 @genExtra3(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_surfvel(char *, char *, char *);
void fgmvwrite_surfvel(char *u, char *v, char *w) { gmvwrite_surfvel(u, v, w); }


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

x86 assembly (clang, -O2):
<fgmvwrite_surfvel>:
jmp    1030 <gmvwrite_surfvel@plt>

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

LLVM IR (-O2):
define void @fgmvwrite_surfvel(i8* %0, i8* %1, i8* %2) {
%4 = tail call i32 @gmvwrite_surfvel(i8* %0, i8* %1, i8* %2)
ret void
}
/* Variables and functions */
int __VERIFIER_nondet_int();
int rec(int);
int main() {
  int x = __VERIFIER_nondet_int();
  int y;
  y = rec(x);
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = call i32 (...) @__VERIFIER_nondet_int()
store i32 %3, i32* %1
%4 = load i32, i32* %1
%5 = call i32 @rec(i32 %4)
store i32 %5, i32* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @__VERIFIER_nondet_int()
%2 = tail call i32 @rec(i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ getenv(char *);
int /*<<< orphan*/ printf(char *, char *, int);
int /*<<< orphan*/ strcpy(char *, int /*<<< orphan*/);
int main(void) {
  struct {
    char buf[8];
    int var;
  } v = {"", 0};
  strcpy(v.buf, getenv("ASDF"));
  printf("char buf[8] = \"%s\"\n"
         "int var = 0x%.8x\n",
         v.buf, v.var);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0xc,%edx
call   1060 <memset@plt>
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    0xe92(%rip),%rdi
call   1030 <getenv@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%esi
call   1040 <strcpy@plt>
lea    -0x10(%rbp),%rsi
mov    -0x8(%rbp),%edx
lea    0xe79(%rip),%rdi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0x8(%rsp)
movq   $0x0,(%rsp)
lea    0xeb4(%rip),%rdi
call   1030 <getenv@plt>
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1040 <strcpy@plt>
mov    0x8(%rsp),%edx
lea    0xe9c(%rip),%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.anon = type { [8 x i8], i32 }
@.str = [5 x i8] c"ASDF\00"
@.str.1 = [37 x i8] c"char buf[8] = \22%s\22\0Aint var = 0x%.8x\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.anon
store i32 0, i32* %1
%3 = bitcast %struct.anon* %2 to i8*
%4 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
%5 = getelementptr inbounds [8 x i8], [8 x i8]* %4, i64 0, i64 0
%6 = call i32 @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%7 = call i32 @strcpy(i8* %5, i32 %6)
%8 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 0
%9 = getelementptr inbounds [8 x i8], [8 x i8]* %8, i64 0, i64 0
%10 = getelementptr inbounds %struct.anon, %struct.anon* %2, i32 0, i32 1
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %9, i32 %11)
ret i32 0
}

LLVM IR (-O2):
%struct.anon = type { [8 x i8], i32 }
@.str = [5 x i8] c"ASDF\00"
@.str.1 = [37 x i8] c"char buf[8] = \22%s\22\0Aint var = 0x%.8x\0A\00"
define i32 @main() {
%1 = alloca %struct.anon
%2 = getelementptr inbounds %struct.anon, %struct.anon* %1, i64 0, i32 0, i64 0
%3 = tail call i32 @getenv(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @strcpy(i8* %2, i32 %3)
%5 = getelementptr inbounds %struct.anon, %struct.anon* %1, i64 0, i32 1
%6 = load i32, i32* %5
%7 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.1, i64 0, i64 0), i8* %2, i32 %6)
ret i32 0
}
extern signed char PassChar(signed char *chr) { return *chr; }


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

x86 assembly (clang, -O2):
<PassChar>:
mov    (%rdi),%al
ret

LLVM IR (-O0):
define signext i8 @PassChar(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
ret i8 %4
}

LLVM IR (-O2):
define signext i8 @PassChar(i8* nocapture %0) {
%2 = load i8, i8* %0
ret i8 %2
}