xunge/DecIR huggingface dataset:
/* Variables and functions */
void *calloc(unsigned int, unsigned int);
void *javacall_calloc(unsigned int numberOfElements, unsigned int elementSize) {
  return calloc(numberOfElements, elementSize);
}


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

x86 assembly (clang, -O2):
<javacall_calloc>:
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @javacall_calloc(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 = call i8* @calloc(i32 %5, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define noalias i8* @javacall_calloc(i32 %0, i32 %1) {
%3 = tail call i8* @calloc(i32 %0, i32 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ do_uninit_read(void *);
int /*<<< orphan*/ free(void *);
void *malloc(int);
void do_uninit_cb(void) {
  void *int_p = malloc(sizeof(int));
  do_uninit_read(int_p);
  free(int_p);
}


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

x86 assembly (clang, -O2):
<do_uninit_cb>:
push   %rbx
mov    $0x4,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <do_uninit_read@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @do_uninit_cb() {
%1 = alloca i8*
%2 = call i8* @malloc(i32 4)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = call i32 @do_uninit_read(i8* %3)
%5 = load i8*, i8** %1
%6 = call i32 @free(i8* %5)
ret void
}

LLVM IR (-O2):
define void @do_uninit_cb() {
%1 = tail call dereferenceable_or_null(4) i8* @malloc(i32 4)
%2 = tail call i32 @do_uninit_read(i8* %1)
%3 = tail call i32 @free(i8* %1)
ret void
}
int strtobuf(s, b, l)
char *s, *b;
{
  int i;
  i = 0;
  while (--l >= 0) {
    if ((*b++ = *s++) == 0)
      break;
    i++;
  }
  return (i);
}


x86 assembly (clang, -O0):
<strtobuf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
jl     1169 <strtobuf+0x69>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%al
mov    -0x10(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
jne    115b <strtobuf+0x5b>
jmp    1169 <strtobuf+0x69>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1116 <strtobuf+0x16>
mov    -0x18(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strtobuf>:
test   %edx,%edx
jle    1124 <strtobuf+0x24>
mov    %edx,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movzbl (%rdi,%rcx,1),%edx
mov    %dl,(%rsi,%rcx,1)
test   %dl,%dl
je     1127 <strtobuf+0x27>
add    $0x1,%rcx
cmp    %ecx,%eax
jne    1110 <strtobuf+0x10>
ret
xor    %eax,%eax
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @strtobuf(i8* nocapture %0, i8* nocapture writeonly %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %16
5: ; preds = %3, %11
%6 = phi i32 [ %14, %11 ], [ 0, %3 ]
%7 = phi i8* [ %12, %11 ], [ %1, %3 ]
%8 = phi i8* [ %13, %11 ], [ %0, %3 ]
%9 = load i8, i8* %8
store i8 %9, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %5
%12 = getelementptr inbounds i8, i8* %7, i64 1
%13 = getelementptr inbounds i8, i8* %8, i64 1
%14 = add nuw nsw i32 %6, 1
%15 = icmp eq i32 %14, %2
br i1 %15, label %16, label %5
16: ; preds = %11, %5, %3
%17 = phi i32 [ 0, %3 ], [ %6, %5 ], [ %2, %11 ]
ret i32 %17
}
f(a) int a;
{ return a ? 1 : 0; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
xor    %eax,%eax
mov    $0x1,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
xor    %eax,%eax
test   %edi,%edi
setne  %al
ret

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

LLVM IR (-O2):
define i32 @f(i32 %0) {
%2 = icmp ne i32 %0, 0
%3 = zext i1 %2 to i32
ret i32 %3
}
toupper(c) register int c;
{
  if ('a' <= c && c <= 'z')
    return c & 0xdf;
  return c;
}


x86 assembly (clang, -O0):
<toupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    $0x61,%eax
cmp    -0x8(%rbp),%eax
jg     112f <toupper+0x2f>
cmpl   $0x7a,-0x8(%rbp)
jg     112f <toupper+0x2f>
mov    -0x8(%rbp),%eax
and    $0xdf,%eax
mov    %eax,-0x4(%rbp)
jmp    1135 <toupper+0x35>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<toupper>:
lea    -0x61(%rdi),%ecx
mov    %edi,%eax
and    $0xdf,%eax
cmp    $0x1a,%ecx
cmovae %edi,%eax
ret

LLVM IR (-O0):
define i32 @toupper(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp sle i32 97, %4
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i32, i32* %3
%8 = icmp sle i32 %7, 122
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = load i32, i32* %3
%11 = and i32 %10, 223
store i32 %11, i32* %2
br label %14
12: ; preds = %6, %1
%13 = load i32, i32* %3
store i32 %13, i32* %2
br label %14
14: ; preds = %12, %9
%15 = load i32, i32* %2
ret i32 %15
}

LLVM IR (-O2):
define i32 @toupper(i32 %0) {
%2 = add i32 %0, -97
%3 = icmp ult i32 %2, 26
%4 = and i32 %0, 223
%5 = select i1 %3, i32 %4, i32 %0
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ memcmp(int /*<<< orphan*/ *, int /*<<< orphan*/ *, int);
int compare_hashes(uint8_t *hash1, uint8_t *hash2) {
  if (memcmp(hash1, hash2, 20) == 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compare_hashes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    $0x14,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%rax
jne    1148 <compare_hashes+0x38>
movl   $0x1,-0x4(%rbp)
jmp    114f <compare_hashes+0x3f>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_hashes>:
push   %rax
mov    $0x14,%edx
call   1030 <memcmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @compare_hashes(i32* %0, i32* %1) {
%3 = tail call i64 @memcmp(i32* %0, i32* %1, i32 20)
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ _glp_lib_term_hook(int (*)(void *, char const *), void *);
void _glp_lib_print_hook(int (*func)(void *info, char *buf), void *info) {
  int (*hook)(void *, const char *) = (int (*)(void *, const char *))(func);
  _glp_lib_term_hook(hook, info);
  return;
}


x86 assembly (clang, -O0):
<_glp_lib_print_hook>:
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    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <_glp_lib_term_hook@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_glp_lib_print_hook>:
jmp    1030 <_glp_lib_term_hook@plt>

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

LLVM IR (-O2):
define void @_glp_lib_print_hook(i32 (i8*, i8*)* %0, i8* %1) {
%3 = tail call i32 @_glp_lib_term_hook(i32 (i8*, i8*)* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
char *malloc(scalar_t__);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ strcpy(char *, char const *);
scalar_t__ strlen(char const *);
char *str_store(const char *in) {
  char *rval;
  if ((rval = malloc(strlen(in) + 1))) {
    strcpy(rval, in);
    return rval;
  }
  perror("malloc");
  exit(1);
}


x86 assembly (clang, -O0):
<str_store>:
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
call   1050 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
je     1196 <str_store+0x46>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret
lea    0xe63(%rip),%rdi
call   1060 <perror@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<str_store>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
test   %rax,%rax
je     1183 <str_store+0x33>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
lea    0xe76(%rip),%rdi
call   1060 <perror@plt>
mov    $0x1,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"malloc\00"
define i8* @str_store(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 i8* @malloc(i64 %6)
store i8* %7, i8** %3
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %14
9: ; preds = %1
%10 = load i8*, i8** %3
%11 = load i8*, i8** %2
%12 = call i32 @strcpy(i8* %10, i8* %11)
%13 = load i8*, i8** %3
ret i8* %13
14: ; preds = %1
%15 = call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%16 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [7 x i8] c"malloc\00"
define i8* @str_store(i8* %0) {
%2 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%3 = add nsw i64 %2, 1
%4 = tail call i8* @malloc(i64 %3)
%5 = icmp eq i8* %4, null
br i1 %5, label %8, label %6
6: ; preds = %1
%7 = tail call i32 @strcpy(i8* %4, i8* %0)
ret i8* %4
8: ; preds = %1
%9 = tail call i32 @perror(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
%10 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int lace_builtin_cmp_main(unsigned int, char **, int /*<<< orphan*/ *,
                          int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  return lace_builtin_cmp_main((unsigned)argc, argv, NULL, NULL);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%ecx
mov    %rcx,%rdx
call   1030 <lace_builtin_cmp_main@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <lace_builtin_cmp_main@plt>

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @lace_builtin_cmp_main(i32 %0, i8** %1, i32* null, i32* null)
ret i32 %3
}
/* Variables and functions */
int printf(char *, char const *);
int /*<<< orphan*/ save_first_info_screen();
int puts(const char *s) {
  save_first_info_screen();
  return printf("%s\n", s);
}


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

x86 assembly (clang, -O2):
<puts>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <save_first_info_screen@plt>
lea    0xece(%rip),%rdi
mov    %rbx,%rsi
pop    %rbx
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @puts(i8* %0) {
%2 = tail call i32 (...) @save_first_info_screen()
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %3
}
int ft_isspace(int c) {
  if ((unsigned char)c == '\t' || (unsigned char)c == '\n' ||
      (unsigned char)c == '\v' || (unsigned char)c == '\f' ||
      (unsigned char)c == '\r' || (unsigned char)c == ' ')
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x9,%eax
je     1161 <ft_isspace+0x61>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0xa,%eax
je     1161 <ft_isspace+0x61>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0xb,%eax
je     1161 <ft_isspace+0x61>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0xc,%eax
je     1161 <ft_isspace+0x61>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0xd,%eax
je     1161 <ft_isspace+0x61>
mov    -0x8(%rbp),%eax
movzbl %al,%eax
cmp    $0x20,%eax
jne    116d <ft_isspace+0x6d>
movl   $0x1,-0x4(%rbp)
jmp    1174 <ft_isspace+0x74>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isspace>:
mov    $0x1,%eax
lea    -0x9(%rdi),%ecx
cmp    $0x5,%cl
jae    110e <ft_isspace+0xe>
ret
cmp    $0x20,%dil
je     110d <ft_isspace+0xd>
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_isspace(i32 %0) {
%2 = trunc i32 %0 to i8
switch i8 %2, label %3 [
i8 9, label %4
i8 10, label %4
i8 11, label %4
i8 12, label %4
i8 13, label %4
i8 32, label %4
]
3: ; preds = %1
br label %4
4: ; preds = %1, %1, %1, %1, %1, %1, %3
%5 = phi i32 [ 0, %3 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %5
}
/* Variables and functions */
float *_zero_arr_plus_float_fn(float *, int, int, char const *, unsigned int);
float *_zero_arr_inplace_plus_post_float_fn(float **x, int orig_i,
                                            const char *filename,
                                            unsigned lineno) {
  float *_zap_res = *x;
  *x = _zero_arr_plus_float_fn(_zap_res, 1, orig_i, filename, lineno);
  return _zap_res;
}


x86 assembly (clang, -O0):
<_zero_arr_inplace_plus_post_float_fn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
mov    -0x1c(%rbp),%r8d
mov    $0x1,%esi
call   1030 <_zero_arr_plus_float_fn@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_zero_arr_inplace_plus_post_float_fn>:
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r8d
mov    %rdx,%rcx
mov    %esi,%edx
mov    %rdi,%rbx
mov    (%rdi),%r14
mov    %r14,%rdi
mov    $0x1,%esi
call   1030 <_zero_arr_plus_float_fn@plt>
mov    %rax,(%rbx)
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define float* @_zero_arr_inplace_plus_post_float_fn(float** nocapture %0, i32 %1, i8* %2, i32 %3) {
%5 = load float*, float** %0
%6 = tail call float* @_zero_arr_plus_float_fn(float* %5, i32 1, i32 %1, i8* %2, i32 %3)
store float* %6, float** %0
ret float* %5
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
char *dlerror();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void checkError() {
  char *error = dlerror();
  if (error != NULL) {
    fprintf(stderr, "%s\n", error);
    exit(EXIT_FAILURE);
  }
}


x86 assembly (clang, -O0):
<checkError>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <dlerror@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1175 <checkError+0x45>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xe9e(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e6a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checkError>:
push   %rax
xor    %eax,%eax
call   1030 <dlerror@plt>
test   %rax,%rax
jne    113f <checkError+0xf>
pop    %rax
ret
mov    0x2e9a(%rip),%rcx
mov    (%rcx),%edi
lea    0xeb1(%rip),%rsi
mov    %rax,%rdx
call   1040 <fprintf@plt>
mov    0x2e7a(%rip),%rax
mov    (%rax),%edi
call   1050 <exit@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [4 x i8] c"%s\0A\00"
@EXIT_FAILURE = global i32 0
define void @checkError() {
%1 = tail call i8* (...) @dlerror()
%2 = icmp eq i8* %1, null
br i1 %2, label %8, label %3
3: ; preds = %0
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %1)
%6 = load i32, i32* @EXIT_FAILURE
%7 = tail call i32 @exit(i32 %6)
unreachable
8: ; preds = %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Sys_failure(char *);
int socket(int, int, int);
int Socket(int domain, int type, int protocol) {
  int retval;
  retval = socket(domain, type, protocol);
  if (retval == -1)
    Sys_failure("socket");
  return retval;
}


x86 assembly (clang, -O0):
<Socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <socket@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0xffffffff,-0x10(%rbp)
jne    1158 <Socket+0x38>
lea    0xead(%rip),%rdi
call   1030 <Sys_failure@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Socket>:
push   %rbx
call   1040 <socket@plt>
mov    %eax,%ebx
cmp    $0xffffffff,%eax
jne    1139 <Socket+0x19>
lea    0xecc(%rip),%rdi
call   1030 <Sys_failure@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"socket\00"
define i32 @Socket(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @socket(i32 %0, i32 %1, i32 %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 @Sys_failure(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
br label %8
8: ; preds = %6, %3
ret i32 %4
}
/* Variables and functions */
unsigned long sysfs_get_freq_transition_latency(unsigned int);
unsigned long cpufreq_get_transition_latency(unsigned int cpu) {
  return sysfs_get_freq_transition_latency(cpu);
}


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

x86 assembly (clang, -O2):
<cpufreq_get_transition_latency>:
jmp    1030 <sysfs_get_freq_transition_latency@plt>

LLVM IR (-O0):
define i64 @cpufreq_get_transition_latency(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @sysfs_get_freq_transition_latency(i32 %3)
ret i64 %4
}

LLVM IR (-O2):
define i64 @cpufreq_get_transition_latency(i32 %0) {
%2 = tail call i64 @sysfs_get_freq_transition_latency(i32 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ IPC_RMID;
scalar_t__ msgctl(int, int /*<<< orphan*/, int /*<<< orphan*/ *);
int rmmsg(int msqid) {
  if (msqid > 0) {
    if (0 > msgctl(msqid, IPC_RMID, NULL)) {
      return (-1);
    }
  }
  return msqid;
}


x86 assembly (clang, -O0):
<rmmsg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jle    1159 <rmmsg+0x49>
mov    -0x8(%rbp),%edi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
xor    %eax,%eax
mov    %eax,%edx
call   1030 <msgctl@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jle    1154 <rmmsg+0x44>
movl   $0xffffffff,-0x4(%rbp)
jmp    115f <rmmsg+0x4f>
jmp    1159 <rmmsg+0x49>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rmmsg>:
push   %rbx
mov    %edi,%ebx
test   %edi,%edi
jle    1133 <rmmsg+0x23>
mov    0x2ec2(%rip),%rax
mov    (%rax),%esi
mov    %ebx,%edi
xor    %edx,%edx
call   1030 <msgctl@plt>
test   %rax,%rax
jns    1133 <rmmsg+0x23>
mov    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@IPC_RMID = global i32 0
define i32 @rmmsg(i32 %0) {
%2 = icmp sgt i32 %0, 0
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = load i32, i32* @IPC_RMID
%5 = tail call i64 @msgctl(i32 %0, i32 %4, i32* null)
%6 = icmp slt i64 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %3, %1
br label %8
8: ; preds = %3, %7
%9 = phi i32 [ %0, %7 ], [ -1, %3 ]
ret i32 %9
}
int putchar(int ch) {
  if (ch == '\n')
    putchar('\r');
  asm("movb $0x02,%%ah ; int $0x21" : : "d"(ch));
  return ch;
}


x86 assembly (clang, -O0):
<putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jne    112f <putchar+0x1f>
mov    $0xd,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%edx
mov    $0x2,%ah
int    $0x21
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putchar>:
mov    %edi,%eax
cmp    $0xa,%edi
jne    1110 <putchar+0x10>
mov    $0xd,%edx
mov    $0x2,%ah
int    $0x21
mov    %eax,%edx
mov    $0x2,%ah
int    $0x21
ret

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

LLVM IR (-O2):
define i32 @putchar(i32 returned %0) {
%2 = icmp eq i32 %0, 10
br i1 %2, label %3, label %4
3: ; preds = %1
tail call void asm sideeffect "movb $$0x02,%ah ; int $$0x21", "{dx},~{dirflag},~{fpsr},~{flags}"(i32 13)
br label %4
4: ; preds = %3, %1
tail call void asm sideeffect "movb $$0x02,%ah ; int $$0x21", "{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0)
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ out_byte(int, int);
void init_8259A(void) {
  out_byte(0x20, 0x11);
  out_byte(0xA0, 0x11);
  out_byte(0x21, 0x20);
  out_byte(0xA1, 0x28);
  out_byte(0x21, 0x4);
  out_byte(0xA1, 0x2);
  out_byte(0x21, 0x1);
  out_byte(0xA1, 0x1);
  out_byte(0x21, 0xFF);
  out_byte(0xA1, 0xFF);
}


x86 assembly (clang, -O0):
<init_8259A>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <out_byte@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <out_byte@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <out_byte@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <out_byte@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <out_byte@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <out_byte@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <out_byte@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <out_byte@plt>
mov    $0x21,%edi
mov    $0xff,%esi
call   1030 <out_byte@plt>
mov    $0xa1,%edi
mov    $0xff,%esi
call   1030 <out_byte@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_8259A>:
push   %rax
mov    $0x20,%edi
mov    $0x11,%esi
call   1030 <out_byte@plt>
mov    $0xa0,%edi
mov    $0x11,%esi
call   1030 <out_byte@plt>
mov    $0x21,%edi
mov    $0x20,%esi
call   1030 <out_byte@plt>
mov    $0xa1,%edi
mov    $0x28,%esi
call   1030 <out_byte@plt>
mov    $0x21,%edi
mov    $0x4,%esi
call   1030 <out_byte@plt>
mov    $0xa1,%edi
mov    $0x2,%esi
call   1030 <out_byte@plt>
mov    $0x21,%edi
mov    $0x1,%esi
call   1030 <out_byte@plt>
mov    $0xa1,%edi
mov    $0x1,%esi
call   1030 <out_byte@plt>
mov    $0x21,%edi
mov    $0xff,%esi
call   1030 <out_byte@plt>
mov    $0xa1,%edi
mov    $0xff,%esi
pop    %rax
jmp    1030 <out_byte@plt>

LLVM IR (-O0):
define void @init_8259A() {
%1 = call i32 @out_byte(i32 32, i32 17)
%2 = call i32 @out_byte(i32 160, i32 17)
%3 = call i32 @out_byte(i32 33, i32 32)
%4 = call i32 @out_byte(i32 161, i32 40)
%5 = call i32 @out_byte(i32 33, i32 4)
%6 = call i32 @out_byte(i32 161, i32 2)
%7 = call i32 @out_byte(i32 33, i32 1)
%8 = call i32 @out_byte(i32 161, i32 1)
%9 = call i32 @out_byte(i32 33, i32 255)
%10 = call i32 @out_byte(i32 161, i32 255)
ret void
}

LLVM IR (-O2):
define void @init_8259A() {
%1 = tail call i32 @out_byte(i32 32, i32 17)
%2 = tail call i32 @out_byte(i32 160, i32 17)
%3 = tail call i32 @out_byte(i32 33, i32 32)
%4 = tail call i32 @out_byte(i32 161, i32 40)
%5 = tail call i32 @out_byte(i32 33, i32 4)
%6 = tail call i32 @out_byte(i32 161, i32 2)
%7 = tail call i32 @out_byte(i32 33, i32 1)
%8 = tail call i32 @out_byte(i32 161, i32 1)
%9 = tail call i32 @out_byte(i32 33, i32 255)
%10 = tail call i32 @out_byte(i32 161, i32 255)
ret void
}
void t6() {
  int a[2][3];
  int *p = a;
  *(p + 4) = 65;
  t6a(65, a);
}


x86 assembly (clang, -O0):
<t6>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x20(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rax
movl   $0x41,0x10(%rax)
lea    -0x20(%rbp),%rsi
mov    $0x41,%edi
mov    $0x0,%al
call   1030 <t6a@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t6>:
sub    $0x18,%rsp
movl   $0x41,0x10(%rsp)
mov    %rsp,%rsi
mov    $0x41,%edi
xor    %eax,%eax
call   1030 <t6a@plt>
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define void @t6() {
%1 = alloca [2 x [3 x i32]]
%2 = bitcast [2 x [3 x i32]]* %1 to i8*
%3 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %1, i64 0, i64 0
%4 = getelementptr inbounds [2 x [3 x i32]], [2 x [3 x i32]]* %1, i64 0, i64 0, i64 4
store i32 65, i32* %4
%5 = call i32 (i32, [3 x i32]*, ...) bitcast (i32 (...)* @t6a to i32 (i32, [3 x i32]*, ...)*)(i32 65, [3 x i32]* %3)
ret void
}
/* Variables and functions */
int protocol_mput(void *, void *, int, void *, int);
int protocol_mget_put(void *p, void *k, int ksize, void *v, int vsize) {
  return protocol_mput(p, k, ksize, v, vsize);
}


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

x86 assembly (clang, -O2):
<protocol_mget_put>:
jmp    1030 <protocol_mput@plt>

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

LLVM IR (-O2):
define i32 @protocol_mget_put(i8* %0, i8* %1, i32 %2, i8* %3, i32 %4) {
%6 = tail call i32 @protocol_mput(i8* %0, i8* %1, i32 %2, i8* %3, i32 %4)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ starbar();
int main() {
  starbar();
  printf("%s\n", "GIGATHINK, INC");
  printf("%s\n", "101 Megabuck Plaza");
  printf("%s\n", "Megapolis, CA 94904");
  starbar();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <starbar@plt>
lea    0xec3(%rip),%rdi
lea    0xec0(%rip),%rsi
call   1030 <printf@plt>
lea    0xeb0(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1030 <printf@plt>
lea    0xe9d(%rip),%rdi
lea    0xebc(%rip),%rsi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <starbar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %eax,%eax
call   1040 <starbar@plt>
lea    0xed1(%rip),%rbx
lea    0xece(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xed2(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <starbar@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [15 x i8] c"GIGATHINK, INC\00"
@.str.2 = [19 x i8] c"101 Megabuck Plaza\00"
@.str.3 = [20 x i8] c"Megapolis, CA 94904\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @starbar()
%3 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%6 = call i32 (...) @starbar()
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [15 x i8] c"GIGATHINK, INC\00"
@.str.2 = [19 x i8] c"101 Megabuck Plaza\00"
@.str.3 = [20 x i8] c"Megapolis, CA 94904\00"
define i32 @main() {
%1 = tail call i32 (...) @starbar()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 (...) @starbar()
ret i32 0
}
/* Type definitions */
typedef scalar_t__ in_addr_t;

/* Variables and functions */
int /*<<< orphan*/ printaddr(scalar_t__);
int /*<<< orphan*/ putchar(char);
void wholerange(in_addr_t lo, in_addr_t hi) {
  if (lo != hi) {
    printaddr(lo);
    putchar('-');
  }
  printaddr(hi);
  putchar('\n');
}


x86 assembly (clang, -O0):
<wholerange>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
je     1151 <wholerange+0x31>
mov    -0x8(%rbp),%rdi
call   1040 <printaddr@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    -0x10(%rbp),%rdi
call   1040 <printaddr@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wholerange>:
push   %rbx
mov    %rsi,%rbx
cmp    %rsi,%rdi
je     1138 <wholerange+0x18>
call   1040 <printaddr@plt>
mov    $0x2d,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1040 <printaddr@plt>
mov    $0xa,%edi
pop    %rbx
jmp    1030 <putchar@plt>

LLVM IR (-O0):
define void @wholerange(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ne i64 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i64, i64* %3
%10 = call i32 @printaddr(i64 %9)
%11 = call i32 @putchar(i8 signext 45)
br label %12
12: ; preds = %8, %2
%13 = load i64, i64* %4
%14 = call i32 @printaddr(i64 %13)
%15 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @wholerange(i64 %0, i64 %1) {
%3 = icmp eq i64 %0, %1
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @printaddr(i64 %0)
%6 = tail call i32 @putchar(i8 signext 45)
br label %7
7: ; preds = %4, %2
%8 = tail call i32 @printaddr(i64 %1)
%9 = tail call i32 @putchar(i8 signext 10)
ret void
}
__attribute__((no, noclone)) int f1(int k) {
  return 2 | ((k - 1) >> ((int)sizeof(int) * 8 - 1));
}


x86 assembly (clang, -O0):
<f1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
sar    $0x1f,%eax
or     $0x2,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f1>:
lea    -0x1(%rdi),%eax
sar    $0x1f,%eax
or     $0x2,%eax
ret

LLVM IR (-O0):
define i32 @f1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 1
%5 = ashr i32 %4, 31
%6 = or i32 2, %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @f1(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 31
%4 = or i32 %3, 2
ret i32 %4
}
unsigned short getshort(c)
unsigned char *c;
{
  unsigned short u;
  u = c[0];
  return (u << 8) + c[1];
}


x86 assembly (clang, -O0):
<getshort>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
mov    %ax,-0xa(%rbp)
movzwl -0xa(%rbp),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
add    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getshort>:
movzwl (%rdi),%eax
rol    $0x8,%ax
ret

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

LLVM IR (-O2):
define zeroext i16 @getshort(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i16
%4 = shl nuw i16 %3, 8
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = zext i8 %6 to i16
%8 = or i16 %4, %7
ret i16 %8
}
const char *bat(void) { return ""; }


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

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

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @bat() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @bat() {
ret i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR72_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


x86 assembly (clang, -O0):
<U_WMR72_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_WMR72_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

LLVM IR (-O0):
define void @U_WMR72_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_WMR72_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
void gtk_text_iter_get_chars_in_line() {}


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

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

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

LLVM IR (-O2):
define void @gtk_text_iter_get_chars_in_line() {
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double specc_get_time() {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec + tv.tv_usec * 1e-6;
}


x86 assembly (clang, -O0):
<specc_get_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm1
cvtsi2sdl -0x8(%rbp),%xmm0
movsd  0xec9(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<specc_get_time>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
mulsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
define double @specc_get_time() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = call double @llvm.fmuladd.f64(double %7, double 0x3EB0C6F7A0B5ED8D, double %4)
ret double %8
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
define double @specc_get_time() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %8, double 0x3EB0C6F7A0B5ED8D, double %5)
ret double %9
}
_Bool QuietLessEqual(double f1, double f2) {
  return __builtin_islessequal(f1, f2);
}


x86 assembly (clang, -O0):
<QuietLessEqual>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
ucomisd %xmm1,%xmm0
setae  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<QuietLessEqual>:
ucomisd %xmm0,%xmm1
setae  %al
ret

LLVM IR (-O0):
define zeroext i1 @QuietLessEqual(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ole double %5, %6
ret i1 %7
}

LLVM IR (-O2):
define zeroext i1 @QuietLessEqual(double %0, double %1) {
%3 = fcmp ole double %0, %1
ret i1 %3
}
int length(char *str) {
  int i = 0;
  while (*str) {
    str++;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1136 <length+0x36>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <length+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<length>:
cmpb   $0x0,(%rdi)
je     111c <length+0x1c>
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <length+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @length(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add nuw nsw i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
int f2(const void *p, const void *q, unsigned n) {
  return __builtin_bcmp(p, q, n);
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
mov    %eax,%edx
call   1030 <bcmp@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
mov    %edx,%edx
jmp    1030 <bcmp@plt>

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

LLVM IR (-O2):
define i32 @f2(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = zext i32 %2 to i64
%5 = tail call i32 @bcmp(i8* %0, i8* %1, i64 %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ kzread(char *, int);
long kzgetc() {
  char ch;
  if (!kzread(&ch, 1))
    return (-1);
  return ((long)ch);
}


x86 assembly (clang, -O0):
<kzgetc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x9(%rbp),%rdi
mov    $0x1,%esi
call   1030 <kzread@plt>
cmp    $0x0,%eax
jne    113c <kzgetc+0x2c>
movq   $0xffffffffffffffff,-0x8(%rbp)
ff
jmp    1145 <kzgetc+0x35>
movsbq -0x9(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kzgetc>:
push   %rax
lea    0x7(%rsp),%rdi
mov    $0x1,%esi
call   1030 <kzread@plt>
movsbq 0x7(%rsp),%rcx
cmp    $0x1,%eax
sbb    %rax,%rax
or     %rcx,%rax
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @kzgetc() {
%1 = alloca i8
%2 = call i32 @kzread(i8* %1, i32 1)
%3 = icmp eq i32 %2, 0
%4 = load i8, i8* %1
%5 = sext i8 %4 to i64
%6 = select i1 %3, i64 -1, i64 %5
ret i64 %6
}