xunge/DecIR huggingface dataset:
void heal_animation(void) {}


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

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

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

LLVM IR (-O2):
define void @heal_animation() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
char *realpath(char *, char *);
main(int argc, char *argv[]) {
  char rp[1024];
  printf("%s\n", realpath(argv[0], rp));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
sub    $0x408,%rsp
mov    (%rsi),%rdi
mov    %rsp,%rsi
call   1040 <realpath@plt>
lea    0xec7(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x408,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [1024 x i8]
%4 = getelementptr inbounds [1024 x i8], [1024 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %1
%6 = call i8* @realpath(i8* %5, i8* %4)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}
int do_cpu_expensive_op(int myitem) {
  if (myitem == 0 || myitem == 1) {
    return myitem;
  }
  return (do_cpu_expensive_op(myitem - 1) + do_cpu_expensive_op(myitem - 2));
}


x86 assembly (clang, -O0):
<do_cpu_expensive_op>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     112f <do_cpu_expensive_op+0x1f>
cmpl   $0x1,-0x8(%rbp)
jne    113a <do_cpu_expensive_op+0x2a>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    115d <do_cpu_expensive_op+0x4d>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
call   1030 <do_cpu_expensive_op@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
sub    $0x2,%edi
call   1030 <do_cpu_expensive_op@plt>
mov    %eax,%ecx
mov    -0xc(%rbp),%eax
add    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_cpu_expensive_op>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
xor    %ebp,%ebp
cmp    $0x2,%edi
jb     1132 <do_cpu_expensive_op+0x22>
xor    %ebp,%ebp
xchg   %ax,%ax
lea    -0x1(%rbx),%edi
call   1030 <do_cpu_expensive_op@plt>
add    $0xfffffffe,%ebx
add    %eax,%ebp
cmp    $0x1,%ebx
ja     1120 <do_cpu_expensive_op+0x10>
add    %ebx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @do_cpu_expensive_op(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %11, label %3
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 @do_cpu_expensive_op(i32 %6)
%8 = add nsw i32 %4, -2
%9 = add nsw i32 %7, %5
%10 = icmp ult i32 %8, 2
br i1 %10, label %11, label %3
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
}
/* Variables and functions */
int /*<<< orphan*/ ltrim(char *);
int /*<<< orphan*/ rtrim(char *);
void trim(char *s) {
  ltrim(s);
  rtrim(s);
}


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

x86 assembly (clang, -O2):
<trim>:
push   %rbx
mov    %rdi,%rbx
call   1040 <ltrim@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <rtrim@plt>

LLVM IR (-O0):
define void @trim(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @ltrim(i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @rtrim(i8* %5)
ret void
}

LLVM IR (-O2):
define void @trim(i8* %0) {
%2 = tail call i32 @ltrim(i8* %0)
%3 = tail call i32 @rtrim(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ is_lower(char const);
scalar_t__ is_upper(char const);
bool is_letter(const char c) { return is_upper(c) || is_lower(c); }


x86 assembly (clang, -O0):
<is_letter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1040 <is_upper@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    115c <is_letter+0x3c>
movsbl -0x1(%rbp),%edi
call   1030 <is_lower@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_letter>:
push   %rbx
mov    %edi,%ebx
call   1040 <is_upper@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1137 <is_letter+0x17>
pop    %rbx
ret
movsbl %bl,%edi
call   1030 <is_lower@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_letter(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @is_upper(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = call i64 @is_lower(i8 signext %7)
%9 = icmp ne i64 %8, 0
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_letter(i8 signext %0) {
%2 = tail call i64 @is_upper(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = tail call i64 @is_lower(i8 signext %0)
%6 = icmp ne i64 %5, 0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
main() {
  int x;
  scanf("%d", &x);
  if (x != 7) {
    printf("Immediate exit.\n");
    exit(0);
  }
  printf("The number was not zero.\n");
  assert(x == 7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x7,-0x8(%rbp)
je     117c <main+0x3c>
lea    0xe93(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1060 <exit@plt>
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0x7,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xeb8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1050 <scanf@plt>
cmpl   $0x7,0x4(%rsp)
jne    1179 <main+0x39>
lea    0xea3(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
cmpl   $0x7,0x4(%rsp)
sete   %dil
call   1040 <assert@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe9c(%rip),%rdi
call   1030 <puts@plt>
xor    %edi,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [17 x i8] c"Immediate exit.\0A\00"
@.str.2 = [26 x i8] c"The number was not zero.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 7
br i1 %5, label %6, label %9
6: ; preds = %0
%7 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
9: ; preds = %0
%10 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.2, i64 0, i64 0))
%11 = load i32, i32* %2
%12 = icmp eq i32 %11, 7
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@str = [25 x i8] c"The number was not zero.\00"
@str.3 = [16 x i8] c"Immediate exit.\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 7
br i1 %5, label %9, label %6
6: ; preds = %0
%7 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str.3, i64 0, i64 0))
%8 = call i32 @exit(i32 0)
unreachable
9: ; preds = %0
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%11 = load i32, i32* %1
%12 = icmp eq i32 %11, 7
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
ret i32 0
}
int fred(int a, int b) { return (a + b); }


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

x86 assembly (clang, -O2):
<fred>:
lea    (%rdi,%rsi,1),%eax
ret

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

LLVM IR (-O2):
define i32 @fred(i32 %0, i32 %1) {
%3 = add nsw i32 %1, %0
ret i32 %3
}
/* Variables and functions */
char *energymon_strencpy(char *, char *, size_t);
char *energymon_get_source_rapl(char *buffer, size_t n) {
  return energymon_strencpy(buffer, "Intel RAPL", n);
}


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

x86 assembly (clang, -O2):
<energymon_get_source_rapl>:
mov    %rsi,%rdx
lea    0xee6(%rip),%rsi
jmp    1030 <energymon_strencpy@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"Intel RAPL\00"
define i8* @energymon_get_source_rapl(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i8* @energymon_strencpy(i8* %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %6)
ret i8* %7
}

LLVM IR (-O2):
@.str = [11 x i8] c"Intel RAPL\00"
define i8* @energymon_get_source_rapl(i8* %0, i64 %1) {
%3 = tail call i8* @energymon_strencpy(i8* %0, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 %1)
ret i8* %3
}
/* Variables and functions */
int EXIT_FAILURE;
int EXIT_SUCCESS;
scalar_t__ write(int, void *, size_t);
int ft_putmemchar(void *ptr, size_t n) {
  if (write(1, ptr, n) < 0)
    return (EXIT_FAILURE);
  return (EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<ft_putmemchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    $0x1,%edi
call   1030 <write@plt>
cmp    $0x0,%rax
jge    114d <ft_putmemchar+0x3d>
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
jmp    1159 <ft_putmemchar+0x49>
mov    0x2e84(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putmemchar>:
push   %rax
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1,%edi
call   1030 <write@plt>
test   %rax,%rax
jns    112f <ft_putmemchar+0x1f>
mov    0x2eb3(%rip),%rax
jmp    1136 <ft_putmemchar+0x26>
mov    0x2ea2(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @ft_putmemchar(i8* %0, i64 %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
%6 = load i8*, i8** %4
%7 = load i64, i64* %5
%8 = call i64 @write(i32 1, i8* %6, i64 %7)
%9 = icmp slt i64 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %2
%11 = load i32, i32* @EXIT_FAILURE
store i32 %11, i32* %3
br label %14
12: ; preds = %2
%13 = load i32, i32* @EXIT_SUCCESS
store i32 %13, i32* %3
br label %14
14: ; preds = %12, %10
%15 = load i32, i32* %3
ret i32 %15
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@EXIT_SUCCESS = global i32 0
define i32 @ft_putmemchar(i8* nocapture %0, i64 %1) {
%3 = tail call i64 @write(i32 1, i8* %0, i64 %1)
%4 = icmp slt i64 %3, 0
%5 = load i32, i32* @EXIT_FAILURE
%6 = load i32, i32* @EXIT_SUCCESS
%7 = select i1 %4, i32 %5, i32 %6
ret i32 %7
}
int evenBits() {}


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

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

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

LLVM IR (-O2):
define i32 @evenBits() {
ret i32 undef
}
/* Variables and functions */
int ftok();
int /*<<< orphan*/ perror(char *);
int main(void) {
  if (ftok() == -1)
    perror("ftok");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <ftok@plt>
cmp    $0xffffffff,%eax
jne    114b <main+0x2b>
lea    0xeba(%rip),%rdi
call   1030 <perror@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <ftok@plt>
cmp    $0xffffffff,%eax
je     1131 <main+0x11>
xor    %eax,%eax
pop    %rcx
ret
lea    0xec8(%rip),%rdi
call   1030 <perror@plt>
jmp    112d <main+0xd>

LLVM IR (-O0):
@.str = [5 x i8] c"ftok\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @ftok()
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %4, %0
%7 = load i32, i32* %1
ret i32 %7
}

LLVM IR (-O2):
@.str = [5 x i8] c"ftok\00"
define i32 @main() {
%1 = tail call i32 (...) @ftok()
%2 = icmp eq i32 %1, -1
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %3, %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIGQUIT;
int /*<<< orphan*/ SIGTERM;
int /*<<< orphan*/ SIG_IGN;
int /*<<< orphan*/ signal(int /*<<< orphan*/, int /*<<< orphan*/);
void init_signals(void) {
  signal(SIGINT, SIG_IGN);
  signal(SIGQUIT, SIG_IGN);
  signal(SIGTERM, SIG_IGN);
}


x86 assembly (clang, -O0):
<init_signals>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eac(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    0x2ea6(%rip),%rax
mov    (%rax),%edi
mov    0x2e95(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
mov    0x2e7e(%rip),%rax
mov    (%rax),%esi
call   1030 <signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_signals>:
push   %rbx
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
mov    0x2eaf(%rip),%rbx
mov    (%rbx),%esi
call   1030 <signal@plt>
mov    0x2ea9(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
call   1030 <signal@plt>
mov    0x2ea1(%rip),%rax
mov    (%rax),%edi
mov    (%rbx),%esi
pop    %rbx
jmp    1030 <signal@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
@SIGQUIT = global i32 0
@SIGTERM = global i32 0
define void @init_signals() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_IGN
%3 = call i32 @signal(i32 %1, i32 %2)
%4 = load i32, i32* @SIGQUIT
%5 = load i32, i32* @SIG_IGN
%6 = call i32 @signal(i32 %4, i32 %5)
%7 = load i32, i32* @SIGTERM
%8 = load i32, i32* @SIG_IGN
%9 = call i32 @signal(i32 %7, i32 %8)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_IGN = global i32 0
@SIGQUIT = global i32 0
@SIGTERM = global i32 0
define void @init_signals() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_IGN
%3 = tail call i32 @signal(i32 %1, i32 %2)
%4 = load i32, i32* @SIGQUIT
%5 = load i32, i32* @SIG_IGN
%6 = tail call i32 @signal(i32 %4, i32 %5)
%7 = load i32, i32* @SIGTERM
%8 = load i32, i32* @SIG_IGN
%9 = tail call i32 @signal(i32 %7, i32 %8)
ret void
}
int is_digit(char x) { return ('0' <= x && x <= '9'); }


x86 assembly (clang, -O0):
<is_digit>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
xor    %eax,%eax
mov    $0x30,%ecx
cmp    %edx,%ecx
mov    %al,-0x2(%rbp)
jg     112d <is_digit+0x2d>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_digit>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @is_digit(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sle i32 48, %4
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, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_digit(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ send_cmd(int, char *, int);
void send_cmd_i4(int cmd_code, int arg1, int arg2, int arg3, int arg4) {
  int ibuf[4];
  ibuf[0] = arg1;
  ibuf[1] = arg2;
  ibuf[2] = arg3;
  ibuf[3] = arg4;
  send_cmd(cmd_code, (char *)ibuf, 4 * sizeof(int));
}


x86 assembly (clang, -O0):
<send_cmd_i4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x10,%edx
call   1030 <send_cmd@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<send_cmd_i4>:
sub    $0x18,%rsp
mov    %esi,(%rsp)
mov    %edx,0x4(%rsp)
mov    %ecx,0x8(%rsp)
mov    %r8d,0xc(%rsp)
mov    %rsp,%rsi
mov    $0x10,%edx
call   1030 <send_cmd@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define void @send_cmd_i4(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca [4 x i32]
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%12 = load i32, i32* %7
%13 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
store i32 %12, i32* %13
%14 = load i32, i32* %8
%15 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 1
store i32 %14, i32* %15
%16 = load i32, i32* %9
%17 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 2
store i32 %16, i32* %17
%18 = load i32, i32* %10
%19 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 3
store i32 %18, i32* %19
%20 = load i32, i32* %6
%21 = getelementptr inbounds [4 x i32], [4 x i32]* %11, i64 0, i64 0
%22 = bitcast i32* %21 to i8*
%23 = call i32 @send_cmd(i32 %20, i8* %22, i32 16)
ret void
}

LLVM IR (-O2):
define void @send_cmd_i4(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca [4 x i32]
%7 = bitcast [4 x i32]* %6 to i8*
%8 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 0
store i32 %1, i32* %8
%9 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 1
store i32 %2, i32* %9
%10 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 2
store i32 %3, i32* %10
%11 = getelementptr inbounds [4 x i32], [4 x i32]* %6, i64 0, i64 3
store i32 %4, i32* %11
%12 = call i32 @send_cmd(i32 %0, i8* %7, i32 16)
ret void
}
void RandomFunc(unsigned char input[1], unsigned char output[1]) {
  unsigned char state[1];
  unsigned char local1;
  {
    state[0UL] = (input[0UL] - 51238316UL) - (unsigned char)191;
    local1 = 0UL;
    while (local1 < 1UL) {
      state[0UL] |= (state[0UL] & (unsigned char)15) << 3UL;
      local1++;
    }
    output[0UL] = (state[0UL] ^ 707305405UL) ^
                  967835152UL * (454761159UL >> (unsigned char)253);
  }
}


x86 assembly (clang, -O0):
<RandomFunc>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
sub    $0x30dd5ac,%rax
sub    $0xbf,%rax
mov    %al,-0x11(%rbp)
movb   $0x0,-0x12(%rbp)
movzbl -0x12(%rbp),%eax
cmp    $0x1,%rax
jae    1154 <RandomFunc+0x54>
movzbl -0x11(%rbp),%ecx
and    $0xf,%ecx
shl    $0x3,%ecx
movzbl -0x11(%rbp),%eax
or     %ecx,%eax
mov    %al,-0x11(%rbp)
mov    -0x12(%rbp),%al
add    $0x1,%al
mov    %al,-0x12(%rbp)
jmp    1126 <RandomFunc+0x26>
movzbl -0x11(%rbp),%eax
xor    $0x2a289fbd,%rax
xor    %rcx,%rax
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @RandomFunc(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [1 x i8]
%6 = alloca i8
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds i8, i8* %7, i64 0
%9 = load i8, i8* %8
%10 = zext i8 %9 to i64
%11 = sub i64 %10, 51238316
%12 = sub i64 %11, 191
%13 = trunc i64 %12 to i8
%14 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
store i8 %13, i8* %14
store i8 0, i8* %6
br label %15
15: ; preds = %19, %2
%16 = load i8, i8* %6
%17 = zext i8 %16 to i64
%18 = icmp ult i64 %17, 1
br i1 %18, label %19, label %32
19: ; preds = %15
%20 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%21 = load i8, i8* %20
%22 = zext i8 %21 to i32
%23 = and i32 %22, 15
%24 = shl i32 %23, 3
%25 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%26 = load i8, i8* %25
%27 = zext i8 %26 to i32
%28 = or i32 %27, %24
%29 = trunc i32 %28 to i8
store i8 %29, i8* %25
%30 = load i8, i8* %6
%31 = add i8 %30, 1
store i8 %31, i8* %6
br label %15
32: ; preds = %15
%33 = getelementptr inbounds [1 x i8], [1 x i8]* %5, i64 0, i64 0
%34 = load i8, i8* %33
%35 = zext i8 %34 to i64
%36 = xor i64 %35, 707305405
%37 = xor i64 %36, poison
%38 = trunc i64 %37 to i8
%39 = load i8*, i8** %4
%40 = getelementptr inbounds i8, i8* %39, i64 0
store i8 %38, i8* %40
ret void
}

LLVM IR (-O2):
define void @RandomFunc(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Msp430GpioC__9__GeneralIO__set();
void LedsP__Led2__set(void) { Msp430GpioC__9__GeneralIO__set(); }


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

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

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

LLVM IR (-O2):
define void @LedsP__Led2__set() {
%1 = tail call i32 (...) @Msp430GpioC__9__GeneralIO__set()
ret void
}
long double ldexpl(long double x, int expo) {
  long double r;
  long double e = expo;
  __asm__ __volatile__("fscale; fst %%st(0)" : "=t"(r) : "0"(x), "u"(e));
  return r;
}


x86 assembly (clang, -O0):
<ldexpl>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x44(%rbp)
fildl  -0x44(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x10(%rbp)
fldt   -0x40(%rbp)
fxch   %st(1)
fscale
fst    %st(0)
fstp   %st(1)
fstpt  -0x30(%rbp)
fldt   -0x30(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ldexpl>:
fldt   0x8(%rsp)
mov    %edi,-0x4(%rsp)
fildl  -0x4(%rsp)
fxch   %st(1)
fscale
fst    %st(0)
fstp   %st(1)
ret

LLVM IR (-O0):
define x86_fp80 @ldexpl(x86_fp80 %0, i32 %1) {
%3 = alloca x86_fp80
%4 = alloca i32
%5 = alloca x86_fp80
%6 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to x86_fp80
store x86_fp80 %8, x86_fp80* %6
%9 = load x86_fp80, x86_fp80* %3
%10 = load x86_fp80, x86_fp80* %6
%11 = call x86_fp80 asm sideeffect "fscale; fst %st(0)", "={st},0,{st(1)},~{dirflag},~{fpsr},~{flags}"(x86_fp80 %9, x86_fp80 %10)
store x86_fp80 %11, x86_fp80* %5
%12 = load x86_fp80, x86_fp80* %5
ret x86_fp80 %12
}

LLVM IR (-O2):
define x86_fp80 @ldexpl(x86_fp80 %0, i32 %1) {
%3 = sitofp i32 %1 to x86_fp80
%4 = tail call x86_fp80 asm sideeffect "fscale; fst %st(0)", "={st},0,{st(1)},~{dirflag},~{fpsr},~{flags}"(x86_fp80 %0, x86_fp80 %3)
ret x86_fp80 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ path;

/* Variables and functions */
scalar_t__ is_local_file(char const *, char *, int);
scalar_t__ strcmp(char const *, char *);
int is_resource_present_locally(const char *uri) {
  char path[500];
  return is_local_file(uri, path, sizeof(path)) || strcmp(uri, "/api/sse") == 0;
}


x86 assembly (clang, -O0):
<is_resource_present_locally>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x200(%rbp),%rsi
mov    $0x1f4,%edx
call   1040 <is_local_file@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x201(%rbp)
jne    1176 <is_resource_present_locally+0x56>
mov    -0x8(%rbp),%rdi
lea    0xe9c(%rip),%rsi
call   1030 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,-0x201(%rbp)
mov    -0x201(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_resource_present_locally>:
push   %rbx
sub    $0x200,%rsp
mov    %rdi,%rbx
mov    %rsp,%rsi
mov    $0x1f4,%edx
call   1040 <is_local_file@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
jne    115f <is_resource_present_locally+0x3f>
lea    0xeb4(%rip),%rsi
mov    %rbx,%rdi
call   1030 <strcmp@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
sete   %al
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"/api/sse\00"
define i32 @is_resource_present_locally(i8* %0) {
%2 = alloca i8*
%3 = alloca [500 x i8]
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds [500 x i8], [500 x i8]* %3, i64 0, i64 0
%6 = call i64 @is_local_file(i8* %4, i8* %5, i32 500)
%7 = icmp ne i64 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %1
%9 = load i8*, i8** %2
%10 = call i64 @strcmp(i8* %9, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br label %12
12: ; preds = %8, %1
%13 = phi i1 [ true, %1 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}

LLVM IR (-O2):
@.str = [9 x i8] c"/api/sse\00"
define i32 @is_resource_present_locally(i8* %0) {
%2 = alloca [500 x i8]
%3 = getelementptr inbounds [500 x i8], [500 x i8]* %2, i64 0, i64 0
%4 = call i64 @is_local_file(i8* %0, i8* %3, i32 500)
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = call i64 @strcmp(i8* %0, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
br label %10
10: ; preds = %6, %1
%11 = phi i32 [ 1, %1 ], [ %9, %6 ]
ret i32 %11
}
int lib1_foo(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @lib1_foo() {
ret i32 0
}
int _start() {
  __asm__ __volatile__("mov $1, %eax");
  __asm__ __volatile__("mov $0, %ebx\n");
  __asm__ __volatile__("int $0x80\n");
}


x86 assembly (clang, -O0):
<_start>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%eax
mov    $0x0,%ebx
int    $0x80
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_start>:
mov    $0x1,%eax
mov    $0x0,%ebx
int    $0x80
ret

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

LLVM IR (-O2):
define i32 @_start() {
tail call void asm sideeffect "mov $$1, %eax", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "mov $$0, %ebx\0A", "~{dirflag},~{fpsr},~{flags}"()
tail call void asm sideeffect "int $$0x80\0A", "~{dirflag},~{fpsr},~{flags}"()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
char *strdup(int /*<<< orphan*/);
int /*<<< orphan*/ strfry(char *);
char *randstr(void) {
  static char buf[40];
  sprintf(buf, "abcdefghijklmnopqrstuvwyz0123456789");
  return strdup(strfry(buf));
}


x86 assembly (clang, -O0):
<randstr>:
push   %rbp
mov    %rsp,%rbp
lea    0x2f15(%rip),%rdi
lea    0xebe(%rip),%rsi
call   1040 <sprintf@plt>
lea    0x2f02(%rip),%rdi
call   1030 <strfry@plt>
mov    %eax,%edi
call   1050 <strdup@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<randstr>:
push   %rax
movups 0xee8(%rip),%xmm0
movaps %xmm0,0x2f21(%rip)
movups 0xeca(%rip),%xmm0
movaps %xmm0,0x2f03(%rip)
movl   $0x393837,0x2f19(%rip)
lea    0x2ef2(%rip),%rdi
call   1030 <strfry@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <strdup@plt>

LLVM IR (-O0):
@randstr.buf = internal global [40 x i8] zeroinitializer
@.str = [36 x i8] c"abcdefghijklmnopqrstuvwyz0123456789\00"
define i8* @randstr() {
%1 = call i32 @sprintf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @randstr.buf, i64 0, i64 0), i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @strfry(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @randstr.buf, i64 0, i64 0))
%3 = call i8* @strdup(i32 %2)
ret i8* %3
}

LLVM IR (-O2):
@randstr.buf = internal global [40 x i8] zeroinitializer
@.str = [36 x i8] c"abcdefghijklmnopqrstuvwyz0123456789\00"
define i8* @randstr() {
tail call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 16 dereferenceable(36) getelementptr inbounds ([40 x i8], [40 x i8]* @randstr.buf, i64 0, i64 0), i8* align 1 dereferenceable(36) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0), i64 36, i1 false)
%1 = tail call i32 @strfry(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @randstr.buf, i64 0, i64 0))
%2 = tail call i8* @strdup(i32 %1)
ret i8* %2
}
IR0IR1(r0, r1, x0, x1, p0, p1) signed char r0, r1;
signed char *p0, *p1;
{
  if ((*p0) <= (*p1))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<IR0IR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
mov    -0x20(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jg     1140 <IR0IR1+0x40>
movl   $0x1,-0x4(%rbp)
jmp    1147 <IR0IR1+0x47>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<IR0IR1>:
mov    (%r8),%cl
xor    %eax,%eax
cmp    (%r9),%cl
setle  %al
ret

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

LLVM IR (-O2):
define i32 @IR0IR1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, i8* nocapture %5) {
%7 = load i8, i8* %4
%8 = load i8, i8* %5
%9 = icmp sle i8 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}
void CumulativeSumToAverageRow_C() {}


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

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

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

LLVM IR (-O2):
define void @CumulativeSumToAverageRow_C() {
ret void
}
int audio_set_format(struct audio_info_struct *ai) { return 0; }


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

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

LLVM IR (-O0):
%struct.audio_info_struct = type opaque
define i32 @audio_set_format(%struct.audio_info_struct* %0) {
%2 = alloca %struct.audio_info_struct*
store %struct.audio_info_struct* %0, %struct.audio_info_struct** %2
ret i32 0
}

LLVM IR (-O2):
%struct.audio_info_struct = type opaque
define i32 @audio_set_format(%struct.audio_info_struct* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR49_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


x86 assembly (clang, -O0):
<U_WMR49_swap>:
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 <U_WMRNOTIMPLEMENTED_swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_WMR49_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR49_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ label(float **, float);
float prob();
int main() {
  float lattice[4][4];
  float p = prob();
  label(lattice, p);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    $0x0,%al
call   1040 <prob@plt>
movss  %xmm0,-0x44(%rbp)
lea    -0x40(%rbp),%rdi
movss  -0x44(%rbp),%xmm0
call   1030 <label@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x48,%rsp
xor    %eax,%eax
call   1040 <prob@plt>
mov    %rsp,%rdi
call   1030 <label@plt>
xor    %eax,%eax
add    $0x48,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [4 x [4 x float]]
%2 = alloca float
%3 = call float (...) @prob()
store float %3, float* %2
%4 = getelementptr inbounds [4 x [4 x float]], [4 x [4 x float]]* %1, i64 0, i64 0
%5 = bitcast [4 x float]* %4 to float**
%6 = load float, float* %2
%7 = call i32 @label(float** %5, float %6)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [4 x [4 x float]]
%2 = bitcast [4 x [4 x float]]* %1 to i8*
%3 = tail call float (...) @prob()
%4 = bitcast [4 x [4 x float]]* %1 to float**
%5 = call i32 @label(float** %4, float %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(void *, void *, int);
void swap_elements(void *p1, void *p2, int size_elt) {
  void *tmp_elt = (void *)malloc(size_elt);
  memcpy(tmp_elt, p1, size_elt);
  memcpy(p1, p2, size_elt);
  memcpy(p2, tmp_elt, size_elt);
  free(tmp_elt);
}


x86 assembly (clang, -O0):
<swap_elements>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
call   1050 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rdi
mov    -0x20(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <memcpy@plt>
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap_elements>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%edi
call   1050 <malloc@plt>
mov    %rax,%r12
mov    %rax,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   1040 <memcpy@plt>
mov    %r15,%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
mov    %r12,%rsi
mov    %ebx,%edx
call   1040 <memcpy@plt>
mov    %r12,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @swap_elements(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
%9 = call i64 @malloc(i32 %8)
%10 = inttoptr i64 %9 to i8*
store i8* %10, i8** %7
%11 = load i8*, i8** %7
%12 = load i8*, i8** %4
%13 = load i32, i32* %6
%14 = call i32 @memcpy(i8* %11, i8* %12, i32 %13)
%15 = load i8*, i8** %4
%16 = load i8*, i8** %5
%17 = load i32, i32* %6
%18 = call i32 @memcpy(i8* %15, i8* %16, i32 %17)
%19 = load i8*, i8** %5
%20 = load i8*, i8** %7
%21 = load i32, i32* %6
%22 = call i32 @memcpy(i8* %19, i8* %20, i32 %21)
%23 = load i8*, i8** %7
%24 = call i32 @free(i8* %23)
ret void
}

LLVM IR (-O2):
define void @swap_elements(i8* %0, i8* %1, i32 %2) {
%4 = tail call i64 @malloc(i32 %2)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i32 @memcpy(i8* %5, i8* %0, i32 %2)
%7 = tail call i32 @memcpy(i8* %0, i8* %1, i32 %2)
%8 = tail call i32 @memcpy(i8* %1, i8* %5, i32 %2)
%9 = tail call i32 @free(i8* %5)
ret void
}
unsigned number_of_highest_bit(unsigned v) {
  register unsigned r;
  r = 0;
  while (v >>= 1) {
    r++;
  }
  return r;
}


x86 assembly (clang, -O0):
<number_of_highest_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
cmp    $0x0,%eax
je     112e <number_of_highest_bit+0x2e>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <number_of_highest_bit+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<number_of_highest_bit>:
xor    %eax,%eax
cmp    $0x2,%edi
jb     111c <number_of_highest_bit+0x1c>
xor    %eax,%eax
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
shr    %ecx
add    $0x1,%eax
cmp    $0x3,%edi
mov    %ecx,%edi
ja     1110 <number_of_highest_bit+0x10>
ret

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

LLVM IR (-O2):
define i32 @number_of_highest_bit(i32 %0) {
%2 = icmp ult i32 %0, 2
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i32 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i32 %5, 4
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
int main() {
  if (1)
    ({
      int i = 1;
      int j = 1;
    });
  else
    ({
      int d = 1;
      int e = 2;
    });
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x1,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ j64_null_encode(char *, int);
int /*<<< orphan*/ memset(char *, char, int);
scalar_t__ strcmp(char *, char *);
int test_null_encode_2(void) {
  char buf[2 + 1];
  memset(buf, '\0', sizeof(buf));
  j64_null_encode(buf, 2);
  return strcmp(buf, "nu") == 0;
}


x86 assembly (clang, -O0):
<test_null_encode_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x3(%rbp),%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <memset@plt>
lea    -0x3(%rbp),%rdi
mov    $0x2,%esi
call   1040 <j64_null_encode@plt>
lea    -0x3(%rbp),%rdi
lea    0xe9f(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_null_encode_2>:
push   %rbx
sub    $0x10,%rsp
lea    0xd(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x3,%edx
call   1030 <memset@plt>
mov    %rbx,%rdi
mov    $0x2,%esi
call   1040 <j64_null_encode@plt>
lea    0xea3(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"nu\00"
define i32 @test_null_encode_2() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i8 signext 0, i32 3)
%4 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%5 = call i32 @j64_null_encode(i8* %4, i32 2)
%6 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%7 = call i64 @strcmp(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%8 = icmp eq i64 %7, 0
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
@.str = [3 x i8] c"nu\00"
define i32 @test_null_encode_2() {
%1 = alloca [3 x i8]
%2 = getelementptr inbounds [3 x i8], [3 x i8]* %1, i64 0, i64 0
%3 = call i32 @memset(i8* %2, i8 signext 0, i32 3)
%4 = call i32 @j64_null_encode(i8* %2, i32 2)
%5 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}
void xen_acpi_sleep_register(void) {}


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

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

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

LLVM IR (-O2):
define void @xen_acpi_sleep_register() {
ret void
}
int LZ4_versionNumber(void) { return (1 * 100 * 100 + 9 * 100 + 1); }


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

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

LLVM IR (-O0):
define i32 @LZ4_versionNumber() {
ret i32 10901
}

LLVM IR (-O2):
define i32 @LZ4_versionNumber() {
ret i32 10901
}
/* Variables and functions */
int /*<<< orphan*/ ld_sp_hl();
void opcode_f9() { ld_sp_hl(); }


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

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

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

LLVM IR (-O2):
define void @opcode_f9() {
%1 = tail call i32 (...) @ld_sp_hl()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void g(void) { printf("g() called\n"); }


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @EC_POINT_set_Jprojective_coordinates_GFp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("Hello World!!!\n"); }


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

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

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

LLVM IR (-O2):
@str = [15 x i8] c"Hello World!!!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void usage() {
  printf("%s\n", "mtd-part-offset PARTITION_LABEL");
  exit(0);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xed2(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [32 x i8] c"mtd-part-offset PARTITION_LABEL\00"
define void @usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%2 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [32 x i8] c"mtd-part-offset PARTITION_LABEL\00"
define void @usage() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 @exit(i32 0)
unreachable
}