xunge/DecIR huggingface dataset:
const char *Help_Description(void) {
  return "The `Help` class can be implemented to let an object provide helpful "
         "information about itself. In the standard library this class is "
         "implemented by `Type` and it prints out the documentation provided "
         "by the `Doc` class in a friendly way.";
}


x86 assembly (clang, -O0):
<Help_Description>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Help_Description>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [238 x i8] c"The `Help` class can be implemented to let an object provide helpful information about itself. In the standard library this class is implemented by `Type` and it prints out the documentation provided by the `Doc` class in a friendly way.\00"
define i8* @Help_Description() {
ret i8* getelementptr inbounds ([238 x i8], [238 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [238 x i8] c"The `Help` class can be implemented to let an object provide helpful information about itself. In the standard library this class is implemented by `Type` and it prints out the documentation provided by the `Doc` class in a friendly way.\00"
define i8* @Help_Description() {
ret i8* getelementptr inbounds ([238 x i8], [238 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int, int);
void bitwise_clear(int number, int bitshift) {
  int newnumber = number;
  printf("bitwise clear %i &= ~(1 << %i) : %i\n", number, bitshift,
         newnumber &= ~(1 << bitshift));
}


x86 assembly (clang, -O0):
<bitwise_clear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
mov    %eax,%ecx
xor    $0xffffffff,%ecx
and    -0xc(%rbp),%ecx
mov    %ecx,-0xc(%rbp)
lea    0xeba(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bitwise_clear>:
mov    %esi,%edx
mov    %edi,%ecx
btr    %esi,%ecx
lea    0xee2(%rip),%rax
mov    %edi,%esi
mov    %rax,%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"bitwise clear %i &= ~(1 << %i) : %i\0A\00"
define void @bitwise_clear(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
store i32 %6, i32* %5
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = load i32, i32* %4
%10 = shl i32 1, %9
%11 = xor i32 %10, -1
%12 = load i32, i32* %5
%13 = and i32 %12, %11
store i32 %13, i32* %5
%14 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8, i32 %13)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"bitwise clear %i &= ~(1 << %i) : %i\0A\00"
define void @bitwise_clear(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1, i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ eprintf(char *);
void *realloc(void *, size_t);
void *erealloc(void *p, size_t size) {
  void *r;
  r = realloc(p, size);
  if (!r)
    eprintf("Out of memory\n");
  return r;
}


x86 assembly (clang, -O0):
<erealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1158 <erealloc+0x38>
lea    0xead(%rip),%rdi
call   1030 <eprintf@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<erealloc>:
push   %rbx
call   1040 <realloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    113a <erealloc+0x1a>
lea    0xecb(%rip),%rdi
call   1030 <eprintf@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Out of memory\0A\00"
define i8* @erealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i8*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = load i64, i64* %4
%8 = call i8* @realloc(i8* %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %13, label %11
11: ; preds = %2
%12 = call i32 @eprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %11, %2
%14 = load i8*, i8** %5
ret i8* %14
}

LLVM IR (-O2):
@.str = [15 x i8] c"Out of memory\0A\00"
define noalias i8* @erealloc(i8* nocapture %0, i64 %1) {
%3 = tail call i8* @realloc(i8* %0, i64 %1)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @eprintf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %5, %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ net_send(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, char *, char *);
void irc_names(char *channel) {
  char msg[(512 - 3)];
  snprintf(msg, (512 - 3), "%s %s", "NAMES", channel);
  net_send(msg);
}


x86 assembly (clang, -O0):
<irc_names>:
push   %rbp
mov    %rsp,%rbp
sub    $0x210,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%r8
mov    $0x1fd,%esi
lea    0xeba(%rip),%rdx
lea    0xeb9(%rip),%rcx
call   1030 <snprintf@plt>
lea    -0x210(%rbp),%rdi
call   1040 <net_send@plt>
add    $0x210,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_names>:
push   %rbx
sub    $0x200,%rsp
mov    %rdi,%r8
lea    0xece(%rip),%rdx
lea    0xecd(%rip),%rcx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x1fd,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <net_send@plt>
add    $0x200,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [6 x i8] c"NAMES\00"
define void @irc_names(i8* %0) {
%2 = alloca i8*
%3 = alloca [509 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [509 x i8], [509 x i8]* %3, i64 0, i64 0
%5 = load i8*, i8** %2
%6 = call i32 @snprintf(i8* %4, i32 509, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %5)
%7 = getelementptr inbounds [509 x i8], [509 x i8]* %3, i64 0, i64 0
%8 = call i32 @net_send(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s %s\00"
@.str.1 = [6 x i8] c"NAMES\00"
define void @irc_names(i8* %0) {
%2 = alloca [509 x i8]
%3 = getelementptr inbounds [509 x i8], [509 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 509, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %0)
%5 = call i32 @net_send(i8* %3)
ret void
}
/* Variables and functions */
char *tracing_path_debugfs_mount();
char *tracing_path_tracefs_mount();
const char *tracing_path_mount(void) {
  const char *mnt;
  mnt = tracing_path_tracefs_mount();
  if (mnt)
    return mnt;
  mnt = tracing_path_debugfs_mount();
  return mnt;
}


x86 assembly (clang, -O0):
<tracing_path_mount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1040 <tracing_path_tracefs_mount@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     114b <tracing_path_mount+0x2b>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    115e <tracing_path_mount+0x3e>
mov    $0x0,%al
call   1030 <tracing_path_debugfs_mount@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tracing_path_mount>:
push   %rax
xor    %eax,%eax
call   1040 <tracing_path_tracefs_mount@plt>
test   %rax,%rax
je     112f <tracing_path_mount+0xf>
pop    %rcx
ret
xor    %eax,%eax
pop    %rcx
jmp    1030 <tracing_path_debugfs_mount@plt>

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

LLVM IR (-O2):
define i8* @tracing_path_mount() {
%1 = tail call i8* (...) @tracing_path_tracefs_mount()
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i8* (...) @tracing_path_debugfs_mount()
br label %5
5: ; preds = %0, %3
%6 = phi i8* [ %4, %3 ], [ %1, %0 ]
ret i8* %6
}
void f3(union S { int i; } * a) {}


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

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

LLVM IR (-O0):
%union.S = type { i32 }
define void @f3(%union.S* %0) {
%2 = alloca %union.S*
store %union.S* %0, %union.S** %2
ret void
}

LLVM IR (-O2):
%union.S = type { i32 }
define void @f3(%union.S* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cwrapper_q_sort_int_with_indices(int *, int *,
                                                    int /*<<< orphan*/, int);
void quicksort_int_with_indices_(int numbers[], int indices[],
                                 int *array_size) {
  cwrapper_q_sort_int_with_indices(numbers, indices, 0, (*array_size) - 1);
}


x86 assembly (clang, -O0):
<quicksort_int_with_indices_>:
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),%rax
mov    (%rax),%ecx
sub    $0x1,%ecx
xor    %edx,%edx
call   1030 <cwrapper_q_sort_int_with_indices@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<quicksort_int_with_indices_>:
mov    (%rdx),%ecx
add    $0xffffffff,%ecx
xor    %edx,%edx
jmp    1030 <cwrapper_q_sort_int_with_indices@plt>

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

LLVM IR (-O2):
define void @quicksort_int_with_indices_(i32* %0, i32* %1, i32* nocapture %2) {
%4 = load i32, i32* %2
%5 = add nsw i32 %4, -1
%6 = tail call i32 @cwrapper_q_sort_int_with_indices(i32* %0, i32* %1, i32 0, i32 %5)
ret void
}
char *utoa(char *s, unsigned int i) {
  *s += 11;
  *s = 0;
  while (i > 0) {
    s--;
    *s = (i % 10) | 0x30;
    i = i / 10;
  }
  return s;
}


x86 assembly (clang, -O0):
<utoa>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
add    $0xb,%ecx
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
cmpl   $0x0,-0xc(%rbp)
jbe    115f <utoa+0x5f>
mov    -0x8(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
or     $0x30,%edx
mov    %dl,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
mov    $0xa,%ecx
xor    %edx,%edx
div    %ecx
mov    %eax,-0xc(%rbp)
jmp    111e <utoa+0x1e>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<utoa>:
movb   $0x0,(%rdi)
test   %esi,%esi
je     113b <utoa+0x3b>
mov    $0xcccccccd,%r8d
nopl   (%rax)
lea    -0x1(%rdi),%rax
mov    %esi,%edx
imul   %r8,%rdx
shr    $0x23,%rdx
lea    (%rdx,%rdx,1),%ecx
lea    (%rcx,%rcx,4),%r9d
mov    %esi,%ecx
sub    %r9d,%ecx
or     $0x30,%cl
mov    %cl,-0x1(%rdi)
mov    %rax,%rdi
cmp    $0x9,%esi
mov    %edx,%esi
ja     1110 <utoa+0x10>
ret
mov    %rdi,%rax
ret

LLVM IR (-O0):
define i8* @utoa(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 i8, i8* %5
%7 = sext i8 %6 to i32
%8 = add nsw i32 %7, 11
%9 = trunc i32 %8 to i8
store i8 %9, i8* %5
%10 = load i8*, i8** %3
store i8 0, i8* %10
br label %11
11: ; preds = %14, %2
%12 = load i32, i32* %4
%13 = icmp ugt i32 %12, 0
br i1 %13, label %14, label %24
14: ; preds = %11
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i32 -1
store i8* %16, i8** %3
%17 = load i32, i32* %4
%18 = urem i32 %17, 10
%19 = or i32 %18, 48
%20 = trunc i32 %19 to i8
%21 = load i8*, i8** %3
store i8 %20, i8* %21
%22 = load i32, i32* %4
%23 = udiv i32 %22, 10
store i32 %23, i32* %4
br label %11
24: ; preds = %11
%25 = load i8*, i8** %3
ret i8* %25
}

LLVM IR (-O2):
define i8* @utoa(i8* writeonly %0, i32 %1) {
store i8 0, i8* %0
%3 = icmp eq i32 %1, 0
br i1 %3, label %13, label %4
4: ; preds = %2, %4
%5 = phi i32 [ %11, %4 ], [ %1, %2 ]
%6 = phi i8* [ %7, %4 ], [ %0, %2 ]
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = urem i32 %5, 10
%9 = trunc i32 %8 to i8
%10 = or i8 %9, 48
store i8 %10, i8* %7
%11 = udiv i32 %5, 10
%12 = icmp ult i32 %5, 10
br i1 %12, label %13, label %4
13: ; preds = %4, %2
%14 = phi i8* [ %0, %2 ], [ %7, %4 ]
ret i8* %14
}
/* Variables and functions */
scalar_t__ EOF;
scalar_t__ getchar();
int /*<<< orphan*/ printf(char *, long);
int main(void) {
  long character_count;
  character_count = 0;
  while (getchar() != EOF) {
    character_count++;
  }
  printf("Count of Character is %ld.\n", character_count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    0x2ea3(%rip),%rcx
cmp    (%rcx),%rax
je     115f <main+0x3f>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1137 <main+0x17>
mov    -0x10(%rbp),%rsi
lea    0xe96(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
mov    $0xffffffffffffffff,%rbx
mov    0x2eb6(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
xor    %eax,%eax
call   1040 <getchar@plt>
add    $0x1,%rbx
cmp    (%r14),%rax
jne    1140 <main+0x20>
lea    0xea9(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EOF = global i64 0
@.str = [28 x i8] c"Count of Character is %ld.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
store i32 0, i32* %1
store i64 0, i64* %2
br label %3
3: ; preds = %7, %0
%4 = call i64 (...) @getchar()
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i64, i64* %2
%9 = add nsw i64 %8, 1
store i64 %9, i64* %2
br label %3
10: ; preds = %3
%11 = load i64, i64* %2
%12 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %11)
ret i32 0
}

LLVM IR (-O2):
@EOF = global i64 0
@.str = [28 x i8] c"Count of Character is %ld.\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i64 [ 0, %0 ], [ %6, %1 ]
%3 = tail call i64 (...) @getchar()
%4 = load i64, i64* @EOF
%5 = icmp eq i64 %3, %4
%6 = add nuw nsw i64 %2, 1
br i1 %5, label %7, label %1
7: ; preds = %1
%8 = tail call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i64 %2)
ret i32 0
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ putchar(char);
int main(void) {
  char ch;
  while ((ch = getchar()) != '#') {
    putchar(ch);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0x5(%rbp)
movsbl %al,%eax
cmp    $0x23,%eax
je     1153 <main+0x33>
movsbl -0x5(%rbp),%edi
call   1030 <putchar@plt>
jmp    112f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0x23,%al
je     1145 <main+0x25>
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    1130 <main+0x10>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
store i32 0, i32* %1
br label %3
3: ; preds = %7, %0
%4 = call signext i8 (...) @getchar()
store i8 %4, i8* %2
%5 = sext i8 %4 to i32
%6 = icmp ne i32 %5, 35
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = load i8, i8* %2
%9 = call i32 @putchar(i8 signext %8)
br label %3
10: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call signext i8 (...) @getchar()
%2 = icmp eq i8 %1, 35
br i1 %2, label %8, label %3
3: ; preds = %0, %3
%4 = phi i8 [ %6, %3 ], [ %1, %0 ]
%5 = tail call i32 @putchar(i8 signext %4)
%6 = tail call signext i8 (...) @getchar()
%7 = icmp eq i8 %6, 35
br i1 %7, label %8, label %3
8: ; preds = %3, %0
ret i32 0
}
void tightframe(int frame[][4]) {
  int i, j;
  return;
}


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

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

LLVM IR (-O0):
define void @tightframe([4 x i32]* %0) {
%2 = alloca [4 x i32]*
%3 = alloca i32
%4 = alloca i32
store [4 x i32]* %0, [4 x i32]** %2
ret void
}

LLVM IR (-O2):
define void @tightframe([4 x i32]* nocapture %0) {
ret void
}
void fn0000000140001DD0() { return; }


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

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @fn0000000140001DD0() {
ret void
}
void gdk_display_keyboard_ungrab() {}


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

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

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

LLVM IR (-O2):
define void @gdk_display_keyboard_ungrab() {
ret void
}
int am_open_index(char *filename, int indexno) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @am_open_index(i8* nocapture readnone %0, i32 %1) {
ret i32 -1
}
long double gdtrl(a, b, x)
long double a, b, x;
{
  if (x < 0.0L) {
    mtherr("gdtrl", 1);
    return (0.0L);
  }
  return (igaml(b, a * x));
}


x86 assembly (clang, -O0):
<gdtrl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
fldt   0x30(%rbp)
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x20(%rbp)
fstpt  -0x30(%rbp)
fstpt  -0x40(%rbp)
fldt   -0x40(%rbp)
fldz
fucomip %st(1),%st
fstp   %st(0)
jbe    116b <gdtrl+0x4b>
jmp    114e <gdtrl+0x2e>
lea    0xeab(%rip),%rdi
xor    %eax,%eax
mov    $0x1,%esi
call   1040 <mtherr@plt>
fldz
fstpt  -0x10(%rbp)
jmp    118e <gdtrl+0x6e>
fldt   -0x30(%rbp)
fldt   -0x20(%rbp)
fldt   -0x40(%rbp)
fmulp  %st,%st(1)
mov    %rsp,%rax
fstpt  0x10(%rax)
fstpt  (%rax)
xor    %eax,%eax
call   1030 <igaml@plt>
mov    %eax,-0x44(%rbp)
fildl  -0x44(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdtrl>:
sub    $0x38,%rsp
fldt   0x60(%rsp)
fldt   0x50(%rsp)
fldt   0x40(%rsp)
fldz
fucomi %st(3),%st
jbe    115c <gdtrl+0x3c>
fstp   %st(2)
fstp   %st(2)
fstp   %st(1)
lea    0xebd(%rip),%rdi
mov    $0x1,%esi
xor    %eax,%eax
fstpt  0x2c(%rsp)
call   1040 <mtherr@plt>
fldt   0x2c(%rsp)
add    $0x38,%rsp
ret
fstp   %st(0)
fmulp  %st,%st(2)
fxch   %st(1)
fstpt  0x10(%rsp)
fstpt  (%rsp)
xor    %eax,%eax
call   1030 <igaml@plt>
mov    %eax,0x28(%rsp)
fildl  0x28(%rsp)
add    $0x38,%rsp
ret

LLVM IR (-O0):
@.str = [6 x i8] c"gdtrl\00"
define x86_fp80 @gdtrl(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = alloca x86_fp80
%5 = alloca x86_fp80
%6 = alloca x86_fp80
%7 = alloca x86_fp80
store x86_fp80 %0, x86_fp80* %5
store x86_fp80 %1, x86_fp80* %6
store x86_fp80 %2, x86_fp80* %7
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp olt x86_fp80 %8, 0xK00000000000000000000
br i1 %9, label %10, label %12
10: ; preds = %3
%11 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
store x86_fp80 0xK00000000000000000000, x86_fp80* %4
br label %19
12: ; preds = %3
%13 = load x86_fp80, x86_fp80* %6
%14 = load x86_fp80, x86_fp80* %5
%15 = load x86_fp80, x86_fp80* %7
%16 = fmul x86_fp80 %14, %15
%17 = call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @igaml to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %13, x86_fp80 %16)
%18 = sitofp i32 %17 to x86_fp80
store x86_fp80 %18, x86_fp80* %4
br label %19
19: ; preds = %12, %10
%20 = load x86_fp80, x86_fp80* %4
ret x86_fp80 %20
}

LLVM IR (-O2):
@.str = [6 x i8] c"gdtrl\00"
define x86_fp80 @gdtrl(x86_fp80 %0, x86_fp80 %1, x86_fp80 %2) {
%4 = fcmp olt x86_fp80 %2, 0xK00000000000000000000
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @mtherr to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 1)
br label %11
7: ; preds = %3
%8 = fmul x86_fp80 %0, %2
%9 = tail call i32 (x86_fp80, x86_fp80, ...) bitcast (i32 (...)* @igaml to i32 (x86_fp80, x86_fp80, ...)*)(x86_fp80 %1, x86_fp80 %8)
%10 = sitofp i32 %9 to x86_fp80
br label %11
11: ; preds = %7, %5
%12 = phi x86_fp80 [ 0xK00000000000000000000, %5 ], [ %10, %7 ]
ret x86_fp80 %12
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strlen(char *);
void gimme_good_lines(char *message, int line) {
  if (1 == 1) {
    printf("---------------\nREACHED LINE: %3d\n", line);
    if (strlen(message) != 0) {
      printf("following message received: %s\n", message);
    }
    printf("---------------\n");
  }
}


x86 assembly (clang, -O0):
<gimme_good_lines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xec7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x0,%rax
je     1165 <gimme_good_lines+0x45>
mov    -0x8(%rbp),%rsi
lea    0xec5(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xed7(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gimme_good_lines>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
cmpb   $0x0,(%rbx)
je     1148 <gimme_good_lines+0x28>
lea    0xee5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xef4(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [35 x i8] c"---------------\0AREACHED LINE: %3d\0A\00"
@.str.1 = [32 x i8] c"following message received: %s\0A\00"
@.str.2 = [17 x i8] c"---------------\0A\00"
define void @gimme_good_lines(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i8*, i8** %3
%8 = call i64 @strlen(i8* %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %13
10: ; preds = %2
%11 = load i8*, i8** %3
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %11)
br label %13
13: ; preds = %10, %2
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [35 x i8] c"---------------\0AREACHED LINE: %3d\0A\00"
@.str.1 = [32 x i8] c"following message received: %s\0A\00"
@str = [16 x i8] c"---------------\00"
define void @gimme_good_lines(i8* %0, i32 %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0), i32 %1)
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %8, label %6
6: ; preds = %2
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %6, %2
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int printf(char *, int);
int print_integer(int d) { return printf("%d", d); }


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

x86 assembly (clang, -O2):
<print_integer>:
mov    %edi,%esi
lea    0xee7(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @print_integer(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
ret i32 %2
}
/* Variables and functions */
char *strchr(char *, char);
void strip_newline(char *str) {
  char *n = strchr(str, '\n');
  if (n)
    *n = '\0';
}


x86 assembly (clang, -O0):
<strip_newline>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1030 <strchr@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1140 <strip_newline+0x30>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strip_newline>:
push   %rax
mov    $0xa,%esi
call   1030 <strchr@plt>
test   %rax,%rax
je     1123 <strip_newline+0x13>
movb   $0x0,(%rax)
pop    %rax
ret

LLVM IR (-O0):
define void @strip_newline(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @strchr(i8* %4, i8 signext 10)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp ne i8* %6, null
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = load i8*, i8** %3
store i8 0, i8* %9
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
define void @strip_newline(i8* %0) {
%2 = tail call i8* @strchr(i8* dereferenceable(1) %0, i8 signext 10)
%3 = icmp eq i8* %2, null
br i1 %3, label %5, label %4
4: ; preds = %1
store i8 0, i8* %2
br label %5
5: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sha204p_sleep();
void sha204e_sleep() { (void)sha204p_sleep(); }


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

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

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

LLVM IR (-O2):
define void @sha204e_sleep() {
%1 = tail call i32 (...) @sha204p_sleep()
ret void
}
void __DELETE_java_lang_Object_AddedMembers(void *me, void *client_data) {}


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

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

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

LLVM IR (-O2):
define void @__DELETE_java_lang_Object_AddedMembers(i8* nocapture %0, i8* nocapture %1) {
ret void
}
void RTThreadUserReset(void) {}


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

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

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

LLVM IR (-O2):
define void @RTThreadUserReset() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ from_string(void **, char *);
void *param_string_init() {
  void *data = NULL;
  from_string(&data, "");
  return data;
}


x86 assembly (clang, -O0):
<param_string_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movq   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
lea    0xed5(%rip),%rsi
call   1030 <from_string@plt>
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<param_string_init>:
push   %rax
movq   $0x0,(%rsp)
lea    0xee0(%rip),%rsi
mov    %rsp,%rdi
call   1030 <from_string@plt>
mov    (%rsp),%rax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @param_string_init() {
%1 = alloca i8*
store i8* null, i8** %1
%2 = call i32 @from_string(i8** %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = load i8*, i8** %1
ret i8* %3
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @param_string_init() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
store i8* null, i8** %1
%3 = call i32 @from_string(i8** %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %1
ret i8* %4
}
void hlist_add_entry(struct hlist_head *head) {}


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

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

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

LLVM IR (-O2):
%struct.hlist_head = type opaque
define void @hlist_add_entry(%struct.hlist_head* nocapture %0) {
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
scalar_t__ init_gpio();
int /*<<< orphan*/ lcd_clear();
int /*<<< orphan*/ lcd_on();
int /*<<< orphan*/ send_gpio(int, int);
int lcd_init(void) {
  if (init_gpio()) {
    return -1;
  }
  uint16_t val = 0b0000100100;
  send_gpio(val, 1);
  lcd_on();
  lcd_clear();
  return 0;
}


x86 assembly (clang, -O0):
<lcd_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <init_gpio@plt>
cmp    $0x0,%rax
je     1165 <lcd_init+0x25>
movl   $0xffffffff,-0x4(%rbp)
jmp    118e <lcd_init+0x4e>
movl   $0x24,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x1,%esi
call   1030 <send_gpio@plt>
mov    $0x0,%al
call   1040 <lcd_on@plt>
mov    $0x0,%al
call   1050 <lcd_clear@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_init>:
push   %rax
xor    %eax,%eax
call   1060 <init_gpio@plt>
mov    %rax,%rcx
mov    $0xffffffff,%eax
test   %rcx,%rcx
je     1157 <lcd_init+0x17>
pop    %rcx
ret
mov    $0x24,%edi
mov    $0x1,%esi
call   1030 <send_gpio@plt>
xor    %eax,%eax
call   1040 <lcd_on@plt>
xor    %eax,%eax
call   1050 <lcd_clear@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @lcd_init() {
%1 = alloca i32
%2 = alloca i32
%3 = call i64 (...) @init_gpio()
%4 = icmp ne i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 -1, i32* %1
br label %11
6: ; preds = %0
store i32 36, i32* %2
%7 = load i32, i32* %2
%8 = call i32 @send_gpio(i32 %7, i32 1)
%9 = call i32 (...) @lcd_on()
%10 = call i32 (...) @lcd_clear()
store i32 0, i32* %1
br label %11
11: ; preds = %6, %5
%12 = load i32, i32* %1
ret i32 %12
}

LLVM IR (-O2):
define i32 @lcd_init() {
%1 = tail call i64 (...) @init_gpio()
%2 = icmp eq i64 %1, 0
br i1 %2, label %3, label %7
3: ; preds = %0
%4 = tail call i32 @send_gpio(i32 36, i32 1)
%5 = tail call i32 (...) @lcd_on()
%6 = tail call i32 (...) @lcd_clear()
br label %7
7: ; preds = %0, %3
%8 = phi i32 [ 0, %3 ], [ -1, %0 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ realpath(char *, char *);
void dorealpath(char *givenpath, char *resolvedpath) {
  if (!(realpath(givenpath, resolvedpath))) {
    perror("realpath()");
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<dorealpath>:
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 <realpath@plt>
cmp    $0x0,%eax
jne    1170 <dorealpath+0x40>
lea    0xea3(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dorealpath>:
push   %rax
call   1030 <realpath@plt>
test   %eax,%eax
je     113c <dorealpath+0xc>
pop    %rax
ret
lea    0xebd(%rip),%rdi
call   1040 <perror@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [11 x i8] c"realpath()\00"
@EXIT_FAILURE = global i32 0
define void @dorealpath(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i32 @realpath(i8* %5, i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %2
%10 = call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @EXIT_FAILURE
%12 = call i32 @exit(i32 %11)
unreachable
13: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"realpath()\00"
@EXIT_FAILURE = global i32 0
define void @dorealpath(i8* nocapture %0, i8* %1) {
%3 = tail call i32 @realpath(i8* %0, i8* %1)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @perror(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%7 = load i32, i32* @EXIT_FAILURE
%8 = tail call i32 @exit(i32 %7)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_init(char *);
void amf_sg_init(void) { log_init("AMF"); }


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"AMF\00"
define void @amf_sg_init() {
%1 = call i32 @log_init(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"AMF\00"
define void @amf_sg_init() {
%1 = tail call i32 @log_init(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ proto_unescape(char *);
char *proto_get_rest(char **s) {
  char *ret;
  if (s == NULL)
    return (NULL);
  ret = *s;
  proto_unescape(ret);
  *s = NULL;
  return (ret);
}


x86 assembly (clang, -O0):
<proto_get_rest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1134 <proto_get_rest+0x24>
movq   $0x0,-0x8(%rbp)
jmp    115b <proto_get_rest+0x4b>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <proto_unescape@plt>
mov    -0x10(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proto_get_rest>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1130 <proto_get_rest+0x20>
mov    %rdi,%rbx
mov    (%rdi),%r14
mov    %r14,%rdi
call   1030 <proto_unescape@plt>
movq   $0x0,(%rbx)
jmp    1133 <proto_get_rest+0x23>
xor    %r14d,%r14d
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @proto_get_rest(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = tail call i32 @proto_unescape(i8* %4)
store i8* null, i8** %0
br label %6
6: ; preds = %1, %3
%7 = phi i8* [ %4, %3 ], [ null, %1 ]
ret i8* %7
}
/* Variables and functions */
scalar_t__ HeapAllocate(scalar_t__, int);
char *strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *copy_string(const char *string) {
  char *new_string;
  new_string = ((char *)HeapAllocate(strlen(string) + 1, sizeof(char)));
  return strcpy(new_string, string);
}


x86 assembly (clang, -O0):
<copy_string>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1050 <HeapAllocate@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copy_string>:
push   %rbx
mov    %rdi,%rbx
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    $0x1,%esi
call   1050 <HeapAllocate@plt>
mov    %rax,%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @copy_string(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @strlen(i8* %4)
%6 = add nsw i64 %5, 1
%7 = call i64 @HeapAllocate(i64 %6, i32 1)
%8 = inttoptr i64 %7 to i8*
store i8* %8, i8** %3
%9 = load i8*, i8** %3
%10 = load i8*, i8** %2
%11 = call i8* @strcpy(i8* %9, i8* %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @copy_string(i8* nocapture %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i64 @HeapAllocate(i64 %3, i32 1)
%5 = inttoptr i64 %4 to i8*
%6 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %0)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ sleep(int);
void doSleep(int c) {
  c = c & 0x1;
  sleep(c);
}


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

x86 assembly (clang, -O2):
<doSleep>:
and    $0x1,%edi
jmp    1030 <sleep@plt>

LLVM IR (-O0):
define void @doSleep(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = call i32 @sleep(i32 %5)
ret void
}

LLVM IR (-O2):
define void @doSleep(i32 %0) {
%2 = and i32 %0, 1
%3 = tail call i32 @sleep(i32 %2)
ret void
}
void gtk_message_dialog_set_markup() {}


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

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

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

LLVM IR (-O2):
define void @gtk_message_dialog_set_markup() {
ret void
}
int vga_switcheroo_register_handler(struct vga_switcheroo_handler *handler) {
  return 0;
}


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

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

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

LLVM IR (-O2):
%struct.vga_switcheroo_handler = type opaque
define i32 @vga_switcheroo_register_handler(%struct.vga_switcheroo_handler* nocapture readnone %0) {
ret i32 0
}
int omp_in_parallel(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @omp_in_parallel() {
ret i32 0
}
/* Variables and functions */
int SIGINT;
int SIGQUIT;
int /*<<< orphan*/ printf(char *);
void sig_handler(int sig_no) {
  if (sig_no == SIGINT) {
    printf("get SIGINT\n");
  } else if (sig_no == SIGQUIT) {
    printf("get SIGQUIT\n");
  }
}


x86 assembly (clang, -O0):
<sig_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2ec3(%rip),%rcx
cmp    (%rcx),%eax
jne    113e <sig_handler+0x2e>
lea    0xecc(%rip),%rdi
call   1030 <printf@plt>
jmp    1161 <sig_handler+0x51>
mov    -0x4(%rbp),%eax
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
jne    115c <sig_handler+0x4c>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    1161 <sig_handler+0x51>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sig_handler>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jne    1127 <sig_handler+0x17>
lea    0xeea(%rip),%rdi
jmp    1030 <puts@plt>
mov    0x2eb2(%rip),%rax
cmp    %edi,(%rax)
jne    113e <sig_handler+0x2e>
lea    0xec7(%rip),%rdi
jmp    1030 <puts@plt>
ret

LLVM IR (-O0):
@SIGINT = global i32 0
@.str = [12 x i8] c"get SIGINT\0A\00"
@SIGQUIT = global i32 0
@.str.1 = [13 x i8] c"get SIGQUIT\0A\00"
define void @sig_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @SIGINT
%5 = icmp eq i32 %3, %4
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %15
8: ; preds = %1
%9 = load i32, i32* %2
%10 = load i32, i32* @SIGQUIT
%11 = icmp eq i32 %9, %10
br i1 %11, label %12, label %14
12: ; preds = %8
%13 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0))
br label %14
14: ; preds = %12, %8
br label %15
15: ; preds = %14, %6
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIGQUIT = global i32 0
@str = [12 x i8] c"get SIGQUIT\00"
@str.2 = [11 x i8] c"get SIGINT\00"
define void @sig_handler(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = icmp eq i32 %2, %0
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = load i32, i32* @SIGQUIT
%6 = icmp eq i32 %5, %0
br i1 %6, label %7, label %10
7: ; preds = %4, %1
%8 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @str.2, i64 0, i64 0), %1 ], [ getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0), %4 ]
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
br label %10
10: ; preds = %7, %4
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SD_LowLevel_DeInit();
void SD_DeInit(void) { SD_LowLevel_DeInit(); }


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

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

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

LLVM IR (-O2):
define void @SD_DeInit() {
%1 = tail call i32 (...) @SD_LowLevel_DeInit()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put32(unsigned long);
int /*<<< orphan*/ put8(unsigned long);
void or_m32_reg32(void *_m32, unsigned long reg32) {
  unsigned long *m32 = (unsigned long *)_m32;
  put8(0x09);
  put8((reg32 << 3) | 5);
  put32((unsigned long)(m32));
}


x86 assembly (clang, -O0):
<or_m32_reg32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    $0x9,%edi
call   1030 <put8@plt>
mov    -0x10(%rbp),%rdi
shl    $0x3,%rdi
or     $0x5,%rdi
call   1030 <put8@plt>
mov    -0x18(%rbp),%rdi
call   1040 <put32@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<or_m32_reg32>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0x9,%edi
call   1030 <put8@plt>
lea    0x5(,%rbx,8),%rdi
call   1030 <put8@plt>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <put32@plt>

LLVM IR (-O0):
define void @or_m32_reg32(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i64*
store i8* %0, i8** %3
store i64 %1, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to i64*
store i64* %7, i64** %5
%8 = call i32 @put8(i64 9)
%9 = load i64, i64* %4
%10 = shl i64 %9, 3
%11 = or i64 %10, 5
%12 = call i32 @put8(i64 %11)
%13 = load i64*, i64** %5
%14 = ptrtoint i64* %13 to i64
%15 = call i32 @put32(i64 %14)
ret void
}

LLVM IR (-O2):
define void @or_m32_reg32(i8* %0, i64 %1) {
%3 = tail call i32 @put8(i64 9)
%4 = shl i64 %1, 3
%5 = or i64 %4, 5
%6 = tail call i32 @put8(i64 %5)
%7 = ptrtoint i8* %0 to i64
%8 = tail call i32 @put32(i64 %7)
ret void
}
int sound_get_samples() { return 4096; }


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

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

LLVM IR (-O0):
define i32 @sound_get_samples() {
ret i32 4096
}

LLVM IR (-O2):
define i32 @sound_get_samples() {
ret i32 4096
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
int /*<<< orphan*/ is_nil(int /*<<< orphan*/ const *);
unsigned int is_t(const wchar_t *atom) { return !(is_nil(atom)); }


x86 assembly (clang, -O0):
<is_t>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <is_nil@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_t>:
push   %rax
call   1030 <is_nil@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @is_t(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @is_nil(i32* %3)
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
define i32 @is_t(i32* %0) {
%2 = tail call i32 @is_nil(i32* %0)
%3 = icmp eq i32 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
void lcd_enable(void) {}


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

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

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

LLVM IR (-O2):
define void @lcd_enable() {
ret void
}
int foo22() { return 22; }


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

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

LLVM IR (-O0):
define i32 @foo22() {
ret i32 22
}

LLVM IR (-O2):
define i32 @foo22() {
ret i32 22
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() { printf("testing\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 = [9 x i8] c"testing\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [8 x i8] c"testing\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @str, i64 0, i64 0))
ret i32 0
}
MakeBlankLine(p, n) register char *p;
register n;
{
  do
    *p++ = ' ';
  while (--n);
}


x86 assembly (clang, -O0):
<MakeBlankLine>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x20,(%rax)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jne    110b <MakeBlankLine+0xb>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<MakeBlankLine>:
push   %rax
lea    -0x1(%rsi),%edx
add    $0x1,%rdx
mov    $0x20,%esi
call   1030 <memset@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @MakeBlankLine(i8* nocapture writeonly %0, i32 %1) {
%3 = add i32 %1, -1
%4 = zext i32 %3 to i64
%5 = add nuw nsw i64 %4, 1
ret i32 undef
}