xunge/DecIR huggingface dataset:
/* Variables and functions */
void *sbrk(int /*<<< orphan*/);
void *getOriginalBreak() {
  static void *original_break = NULL;
  if (original_break == NULL)
    original_break = sbrk(0);
  return original_break;
}


x86 assembly (clang, -O0):
<getOriginalBreak>:
push   %rbp
mov    %rsp,%rbp
cmpq   $0x0,0x2f14(%rip)
jne    1130 <getOriginalBreak+0x20>
xor    %edi,%edi
call   1030 <sbrk@plt>
mov    %rax,0x2f00(%rip)
mov    0x2ef9(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getOriginalBreak>:
push   %rax
mov    0x2f18(%rip),%rax
test   %rax,%rax
je     111f <getOriginalBreak+0xf>
pop    %rcx
ret
xor    %edi,%edi
call   1030 <sbrk@plt>
mov    %rax,0x2f03(%rip)
pop    %rcx
ret

LLVM IR (-O0):
@getOriginalBreak.original_break = internal global i8* null
define i8* @getOriginalBreak() {
%1 = load i8*, i8** @getOriginalBreak.original_break
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i8* @sbrk(i32 0)
store i8* %4, i8** @getOriginalBreak.original_break
br label %5
5: ; preds = %3, %0
%6 = load i8*, i8** @getOriginalBreak.original_break
ret i8* %6
}

LLVM IR (-O2):
@getOriginalBreak.original_break = internal unnamed_addr global i8* null
define i8* @getOriginalBreak() {
%1 = load i8*, i8** @getOriginalBreak.original_break
%2 = icmp eq i8* %1, null
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i8* @sbrk(i32 0)
store i8* %4, i8** @getOriginalBreak.original_break
br label %5
5: ; preds = %3, %0
%6 = phi i8* [ %4, %3 ], [ %1, %0 ]
ret i8* %6
}
/* Variables and functions */
scalar_t__ strtoull(char *, char **, int /*<<< orphan*/);
long long str2int(char *s) {
  char *ep;
  return (long long)strtoull(s, &ep, 0);
}


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

x86 assembly (clang, -O2):
<str2int>:
push   %rax
mov    %rsp,%rsi
xor    %edx,%edx
call   1030 <strtoull@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @str2int(i8* %0) {
%2 = alloca i8*
%3 = bitcast i8** %2 to i8*
%4 = call i64 @strtoull(i8* %0, i8** %2, i32 0)
ret i64 %4
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void show_uint8(void *value) {
  uint8_t data = *((uint8_t *)value);
  printf("%d", data);
}


x86 assembly (clang, -O0):
<show_uint8>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%esi
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @show_uint8(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int /*<<< orphan*/ stdout;
char rrawad(int *a) {
  int r;
  printf("a\n");
  fflush(stdout);
  scanf("%d", &r);
  if (r < 0)
    return 1;
  else
    *a = r;
  return 0;
}


x86 assembly (clang, -O0):
<rrawad>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xebd(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xea6(%rip),%rdi
lea    -0x14(%rbp),%rsi
call   1050 <scanf@plt>
cmpl   $0x0,-0x14(%rbp)
jge    1179 <rrawad+0x49>
movb   $0x1,-0x1(%rbp)
jmp    1186 <rrawad+0x56>
mov    -0x14(%rbp),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
movb   $0x0,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rrawad>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
lea    0xec4(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
lea    0xea7(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%eax
test   %eax,%eax
js     1171 <rrawad+0x41>
mov    %eax,(%rbx)
xor    %eax,%eax
jmp    1173 <rrawad+0x43>
mov    $0x1,%al
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"a\0A\00"
@stdout = global i32 0
@.str.1 = [3 x i8] c"%d\00"
define signext i8 @rrawad(i32* %0) {
%2 = alloca i8
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
%5 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
%8 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %4)
%9 = load i32, i32* %4
%10 = icmp slt i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %1
store i8 1, i8* %2
br label %16
12: ; preds = %1
%13 = load i32, i32* %4
%14 = load i32*, i32** %3
store i32 %13, i32* %14
br label %15
15: ; preds = %12
store i8 0, i8* %2
br label %16
16: ; preds = %15, %11
%17 = load i8, i8* %2
ret i8 %17
}

LLVM IR (-O2):
@stdout = global i32 0
@.str.1 = [3 x i8] c"%d\00"
@str = [2 x i8] c"a\00"
define signext i8 @rrawad(i32* nocapture writeonly %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* @stdout
%6 = tail call i32 @fflush(i32 %5)
%7 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%8 = load i32, i32* %2
%9 = icmp slt i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %1
store i32 %8, i32* %0
br label %11
11: ; preds = %1, %10
%12 = phi i8 [ 0, %10 ], [ 1, %1 ]
ret i8 %12
}
/* Variables and functions */
int f18(int *);
int f19(int *p) { return f18(p); }


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

x86 assembly (clang, -O2):
<f19>:
jmp    1030 <f18@plt>

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

LLVM IR (-O2):
define i32 @f19(i32* %0) {
%2 = tail call i32 @f18(i32* %0)
ret i32 %2
}
int h(a, b, c)
int a;
int b;
int c;
{ return a; }


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

x86 assembly (clang, -O2):
<h>:
mov    %edi,%eax
ret

LLVM IR (-O0):
define i32 @h(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
ret i32 %7
}

LLVM IR (-O2):
define i32 @h(i32 returned %0, i32 %1, i32 %2) {
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
unsigned Test1(void) {
  printf("Test 1\n");
  return 1;
}


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

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

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

LLVM IR (-O2):
@str = [7 x i8] c"Test 1\00"
define i32 @Test1() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int FACOM_checkForErrors();
int FACOM_write(char *);
int FACOM_run(unsigned char run) {
  char command[4] = "410";
  if (run > 0)
    command[2] = '1';
  int error = FACOM_write(command);
  if (error < 0)
    return error;
  return FACOM_checkForErrors();
}


x86 assembly (clang, -O0):
<FACOM_run>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    0xecc(%rip),%eax
mov    %eax,-0x9(%rbp)
movzbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jle    1148 <FACOM_run+0x28>
movb   $0x31,-0x7(%rbp)
lea    -0x9(%rbp),%rdi
call   1030 <FACOM_write@plt>
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jge    1169 <FACOM_run+0x49>
mov    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1173 <FACOM_run+0x53>
mov    $0x0,%al
call   1040 <FACOM_checkForErrors@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FACOM_run>:
push   %rax
movl   $0x303134,0x4(%rsp)
test   %edi,%edi
je     1132 <FACOM_run+0x12>
movb   $0x31,0x6(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <FACOM_write@plt>
test   %eax,%eax
js     1147 <FACOM_run+0x27>
xor    %eax,%eax
call   1040 <FACOM_checkForErrors@plt>
pop    %rcx
ret

LLVM IR (-O0):
@__const.FACOM_run.command = [4 x i8] c"410\00"
define i32 @FACOM_run(i8 zeroext %0) {
%2 = alloca i32
%3 = alloca i8
%4 = alloca [4 x i8]
%5 = alloca i32
store i8 %0, i8* %3
%6 = bitcast [4 x i8]* %4 to i8*
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %12
10: ; preds = %1
%11 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 2
store i8 49, i8* %11
br label %12
12: ; preds = %10, %1
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%14 = call i32 @FACOM_write(i8* %13)
store i32 %14, i32* %5
%15 = load i32, i32* %5
%16 = icmp slt i32 %15, 0
br i1 %16, label %17, label %19
17: ; preds = %12
%18 = load i32, i32* %5
store i32 %18, i32* %2
br label %21
19: ; preds = %12
%20 = call i32 (...) @FACOM_checkForErrors()
store i32 %20, i32* %2
br label %21
21: ; preds = %19, %17
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @FACOM_run(i8 zeroext %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 3158324, i32* %2
%4 = icmp eq i8 %0, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = bitcast i32* %2 to [4 x i8]*
%7 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 2
store i8 49, i8* %7
br label %8
8: ; preds = %5, %1
%9 = call i32 @FACOM_write(i8* %3)
%10 = icmp slt i32 %9, 0
br i1 %10, label %13, label %11
11: ; preds = %8
%12 = call i32 (...) @FACOM_checkForErrors()
br label %13
13: ; preds = %8, %11
%14 = phi i32 [ %12, %11 ], [ %9, %8 ]
ret i32 %14
}
/* Variables and functions */
char *malloc(size_t);
int /*<<< orphan*/ strncpy(char *, char const *, size_t);
size_t strnlen(char const *, size_t);
char *strndup(const char *s1, size_t len) {
  size_t s_len = strnlen(s1, len);
  char *s2 = malloc(s_len + 1);
  if (s2 == NULL)
    return NULL;
  strncpy(s2, s1, len);
  s2[s_len] = '\0';
  return s2;
}


x86 assembly (clang, -O0):
<strndup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strnlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
call   1050 <malloc@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    117a <strndup+0x4a>
movq   $0x0,-0x8(%rbp)
jmp    119f <strndup+0x6f>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <strncpy@plt>
mov    -0x28(%rbp),%rax
mov    -0x20(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x28(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strndup>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <strnlen@plt>
mov    %rax,%r12
lea    0x1(%rax),%rdi
call   1050 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
je     116a <strndup+0x3a>
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
call   1030 <strncpy@plt>
movb   $0x0,(%rbx,%r12,1)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @strndup(i8* %0, i64 %1) {
%3 = tail call i64 @strnlen(i8* %0, i64 %1)
%4 = add i64 %3, 1
%5 = tail call i8* @malloc(i64 %4)
%6 = icmp eq i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = tail call i32 @strncpy(i8* %5, i8* %0, i64 %1)
%9 = getelementptr inbounds i8, i8* %5, i64 %3
store i8 0, i8* %9
br label %10
10: ; preds = %2, %7
ret i8* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/ *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void modsout_writefooter(FILE *outptr) {
  fprintf(outptr, "</modsCollection>\n");
  fflush(outptr);
}


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

x86 assembly (clang, -O2):
<modsout_writefooter>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
mov    $0x12,%esi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1040 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fflush@plt>

LLVM IR (-O0):
@.str = [19 x i8] c"</modsCollection>\0A\00"
define void @modsout_writefooter(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0))
%5 = load i32*, i32** %2
%6 = call i32 @fflush(i32* %5)
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"</modsCollection>\0A\00"
define void @modsout_writefooter(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i64 18, i64 1, i32* %0)
%3 = tail call i32 @fflush(i32* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fread(unsigned char *, int, int, int /*<<< orphan*/ *);
int read32(FILE *in) {
  unsigned char q[4];
  fread(q, 1, 4, in);
  return q[0] << 24 | q[1] << 16 | q[2] << 8 | q[3] << 0;
}


x86 assembly (clang, -O0):
<read32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0xc(%rbp),%rdi
mov    -0x8(%rbp),%rcx
mov    $0x1,%esi
mov    $0x4,%edx
call   1030 <fread@plt>
movzbl -0xc(%rbp),%eax
shl    $0x18,%eax
movzbl -0xb(%rbp),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
movzbl -0xa(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
movzbl -0x9(%rbp),%ecx
shl    $0x0,%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read32>:
push   %rax
mov    %rdi,%rcx
lea    0x4(%rsp),%rdi
mov    $0x1,%esi
mov    $0x4,%edx
call   1030 <fread@plt>
mov    0x4(%rsp),%eax
bswap  %eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @read32(i32* nocapture %0) {
%2 = alloca [4 x i8]
%3 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 0
%4 = call i32 @fread(i8* %3, i32 1, i32 4, i32* %0)
%5 = load i8, i8* %3
%6 = zext i8 %5 to i32
%7 = shl nuw i32 %6, 24
%8 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 1
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = shl nuw nsw i32 %10, 16
%12 = or i32 %11, %7
%13 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 2
%14 = load i8, i8* %13
%15 = zext i8 %14 to i32
%16 = shl nuw nsw i32 %15, 8
%17 = or i32 %12, %16
%18 = getelementptr inbounds [4 x i8], [4 x i8]* %2, i64 0, i64 3
%19 = load i8, i8* %18
%20 = zext i8 %19 to i32
%21 = or i32 %17, %20
ret i32 %21
}
/* Variables and functions */
scalar_t__ malloc(int);
void checker3(int **toCheck3) {
  if (*toCheck3) {
    return;
  } else {
    *toCheck3 = (int *)malloc(sizeof(int));
  }
}


x86 assembly (clang, -O0):
<checker3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     112f <checker3+0x1f>
jmp    1143 <checker3+0x33>
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<checker3>:
push   %rbx
cmpq   $0x0,(%rdi)
je     1119 <checker3+0x9>
pop    %rbx
ret
mov    %rdi,%rbx
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @checker3(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i64 @malloc(i32 4)
%6 = inttoptr i64 %5 to i32*
store i32* %6, i32** %0
br label %7
7: ; preds = %1, %4
ret void
}
/* Variables and functions */
int is_pld(char *);
int /*<<< orphan*/ snprintf(char *, int, char *, int);
int is_num_pld(int n) {
  char buf[100];
  snprintf(buf, 100, "%d", n);
  return is_pld(buf);
}


x86 assembly (clang, -O0):
<is_num_pld>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
mov    -0x4(%rbp),%ecx
mov    $0x64,%esi
lea    0xec2(%rip),%rdx
call   1030 <snprintf@plt>
lea    -0x70(%rbp),%rdi
call   1040 <is_pld@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_num_pld>:
push   %rbx
sub    $0x70,%rsp
mov    %edi,%ecx
lea    0xed2(%rip),%rdx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1030 <snprintf@plt>
mov    %rbx,%rdi
call   1040 <is_pld@plt>
add    $0x70,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
define i32 @is_num_pld(i32 %0) {
%2 = alloca i32
%3 = alloca [100 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* %2
%6 = call i32 @snprintf(i8* %4, i32 100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%8 = call i32 @is_pld(i8* %7)
ret i32 %8
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define i32 @is_num_pld(i32 %0) {
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 x i8]* %2, i64 0, i64 0
%4 = call i32 @snprintf(i8* %3, i32 100, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %0)
%5 = call i32 @is_pld(i8* %3)
ret i32 %5
}
/* Type definitions */
struct tm {
  int tm_min;
};

/* Variables and functions */
unsigned Sys_Minute(void *t) { return ((struct tm *)t)->tm_min; }


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

x86 assembly (clang, -O2):
<Sys_Minute>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
define i32 @Sys_Minute(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.tm*
%5 = getelementptr inbounds %struct.tm, %struct.tm* %4, i32 0, i32 0
%6 = load i32, i32* %5
ret i32 %6
}

LLVM IR (-O2):
define i32 @Sys_Minute(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ shift_rows(int /*<<< orphan*/ *, int);
void superaes_ShiftRows(uint16_t *state) { shift_rows(state, -1); }


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

x86 assembly (clang, -O2):
<superaes_ShiftRows>:
mov    $0xffffffff,%esi
jmp    1030 <shift_rows@plt>

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

LLVM IR (-O2):
define void @superaes_ShiftRows(i32* %0) {
%2 = tail call i32 @shift_rows(i32* %0, i32 -1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
float average_find(float number1, float number2, float number3) {
  float average1;
  average1 = ((number1 + number2 + number3) / 3);
  printf("%.2f", average1);
}


x86 assembly (clang, -O0):
<average_find>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  %xmm2,-0x10(%rbp)
movss  -0x8(%rbp),%xmm0
addss  -0xc(%rbp),%xmm0
addss  -0x10(%rbp),%xmm0
movss  0xec2(%rip),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
lea    0xeb1(%rip),%rdi
call   1030 <printf@plt>
movss  -0x4(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<average_find>:
addss  %xmm1,%xmm0
addss  %xmm2,%xmm0
divss  0xee0(%rip),%xmm0
lea    0xedd(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%.2f\00"
define float @average_find(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
%9 = load float, float* %5
%10 = load float, float* %6
%11 = fadd float %9, %10
%12 = load float, float* %7
%13 = fadd float %11, %12
%14 = fdiv float %13, 3.000000e+00
store float %14, float* %8
%15 = load float, float* %8
%16 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %15)
%17 = load float, float* %4
ret float %17
}

LLVM IR (-O2):
@.str = [5 x i8] c"%.2f\00"
define float @average_find(float %0, float %1, float %2) {
%4 = fadd float %0, %1
%5 = fadd float %4, %2
%6 = fdiv float %5, 3.000000e+00
%7 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), float %6)
ret float undef
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void _serverAssert(const char *estr, const char *file, int line) {
  fprintf(stderr, "=== ASSERTION FAILED ===");
  fprintf(stderr, "==> %s:%d '%s' is not true", file, line, estr);
  *((char *)-1) = 'x';
}


x86 assembly (clang, -O0):
<_serverAssert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
lea    0xecd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%r8
lea    0xec4(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    $0xffffffffffffffff,%rax
movb   $0x78,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_serverAssert>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
mov    0x2eb9(%rip),%r15
mov    (%r15),%edi
lea    0xecf(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r15),%edi
lea    0xed7(%rip),%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
mov    %rbp,%r8
xor    %eax,%eax
call   1030 <fprintf@plt>
movb   $0x78,0xffffffffffffffff
78
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [25 x i8] c"=== ASSERTION FAILED ===\00"
@.str.1 = [27 x i8] c"==> %s:%d '%s' is not true\00"
define void @_serverAssert(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 i32, i32* @stderr
%8 = call i32 (i32, i8*, ...) @fprintf(i32 %7, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %5
%11 = load i32, i32* %6
%12 = load i8*, i8** %4
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %9, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %10, i32 %11, i8* %12)
store i8 120, i8* inttoptr (i64 -1 to i8*)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [25 x i8] c"=== ASSERTION FAILED ===\00"
@.str.1 = [27 x i8] c"==> %s:%d '%s' is not true\00"
define void @_serverAssert(i8* %0, i8* %1, i32 %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 (i32, i8*, ...) @fprintf(i32 %4, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str, i64 0, i64 0))
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %1, i32 %2, i8* %0)
store i8 120, i8* inttoptr (i64 -1 to i8*)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ b_passed_pawns(int, int);
void b_passed_pawns_test(void **state) {
  assert_int_equal(0x0008000000000000ul,
                   b_passed_pawns(0x0000000000002000ul, 0x0018000000000000ul));
}


x86 assembly (clang, -O0):
<b_passed_pawns_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x2000,%edi
xor    %esi,%esi
call   1040 <b_passed_pawns@plt>
mov    %eax,%esi
xor    %edi,%edi
call   1030 <assert_int_equal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_passed_pawns_test>:
push   %rax
mov    $0x2000,%edi
xor    %esi,%esi
call   1040 <b_passed_pawns@plt>
xor    %edi,%edi
mov    %eax,%esi
pop    %rax
jmp    1030 <assert_int_equal@plt>

LLVM IR (-O0):
define void @b_passed_pawns_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @b_passed_pawns(i32 8192, i32 0)
%4 = call i32 @assert_int_equal(i32 0, i32 %3)
ret void
}

LLVM IR (-O2):
define void @b_passed_pawns_test(i8** nocapture readnone %0) {
%2 = tail call i32 @b_passed_pawns(i32 8192, i32 0)
%3 = tail call i32 @assert_int_equal(i32 0, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GenPrintInstr(int, int /*<<< orphan*/);
int /*<<< orphan*/ GenPrintNewLine();
void GenPrintInstrNoOperand(int instr) {
  GenPrintInstr(instr, 0);
  GenPrintNewLine();
}


x86 assembly (clang, -O0):
<GenPrintInstrNoOperand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <GenPrintInstr@plt>
mov    $0x0,%al
call   1040 <GenPrintNewLine@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<GenPrintInstrNoOperand>:
push   %rax
xor    %esi,%esi
call   1030 <GenPrintInstr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <GenPrintNewLine@plt>

LLVM IR (-O0):
define void @GenPrintInstrNoOperand(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @GenPrintInstr(i32 %3, i32 0)
%5 = call i32 (...) @GenPrintNewLine()
ret void
}

LLVM IR (-O2):
define void @GenPrintInstrNoOperand(i32 %0) {
%2 = tail call i32 @GenPrintInstr(i32 %0, i32 0)
%3 = tail call i32 (...) @GenPrintNewLine()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ GPIO4_Combined_16_31_DriverIRQHandler();
__attribute__((weak)) void GPIO4_Combined_16_31_IRQHandler(void) {
  GPIO4_Combined_16_31_DriverIRQHandler();
}


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

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

LLVM IR (-O0):
define weak void @GPIO4_Combined_16_31_IRQHandler() {
%1 = call i32 (...) @GPIO4_Combined_16_31_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @GPIO4_Combined_16_31_IRQHandler() {
%1 = tail call i32 (...) @GPIO4_Combined_16_31_DriverIRQHandler()
ret void
}
int add(int a, int b, int c) { return (a + b + c); }


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

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

LLVM IR (-O0):
define i32 @add(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 = add nsw i32 %7, %8
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @add(i32 %0, i32 %1, i32 %2) {
%4 = add nsw i32 %1, %0
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Type definitions */
struct cramfs_inode {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ inode_toggle_endianness(int /*<<< orphan*/, int,
                                           struct cramfs_inode *,
                                           struct cramfs_inode *);
void inode_from_host(int to_big_endian, struct cramfs_inode *inode_in,
                     struct cramfs_inode *inode_out) {
  inode_toggle_endianness(0, to_big_endian, inode_in, inode_out);
}


x86 assembly (clang, -O0):
<inode_from_host>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
xor    %edi,%edi
call   1030 <inode_toggle_endianness@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<inode_from_host>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %edi,%esi
xor    %edi,%edi
jmp    1030 <inode_toggle_endianness@plt>

LLVM IR (-O0):
%struct.cramfs_inode = type { i32 }
define void @inode_from_host(i32 %0, %struct.cramfs_inode* %1, %struct.cramfs_inode* %2) {
%4 = alloca i32
%5 = alloca %struct.cramfs_inode*
%6 = alloca %struct.cramfs_inode*
store i32 %0, i32* %4
store %struct.cramfs_inode* %1, %struct.cramfs_inode** %5
store %struct.cramfs_inode* %2, %struct.cramfs_inode** %6
%7 = load i32, i32* %4
%8 = load %struct.cramfs_inode*, %struct.cramfs_inode** %5
%9 = load %struct.cramfs_inode*, %struct.cramfs_inode** %6
%10 = call i32 @inode_toggle_endianness(i32 0, i32 %7, %struct.cramfs_inode* %8, %struct.cramfs_inode* %9)
ret void
}

LLVM IR (-O2):
%struct.cramfs_inode = type { i32 }
define void @inode_from_host(i32 %0, %struct.cramfs_inode* %1, %struct.cramfs_inode* %2) {
%4 = tail call i32 @inode_toggle_endianness(i32 0, i32 %0, %struct.cramfs_inode* %1, %struct.cramfs_inode* %2)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void I2CTxFIFOFlush(uint32_t ui32Base) {
  ;
  (*((volatile uint32_t *)(ui32Base + 0x00000F04))) |= 0x00004000;
}


x86 assembly (clang, -O0):
<I2CTxFIFOFlush>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf04,%eax
cltq
mov    (%rax),%ecx
or     $0x4000,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CTxFIFOFlush>:
movslq %edi,%rax
orl    $0x4000,0xf04(%rax)
ret

LLVM IR (-O0):
define void @I2CTxFIFOFlush(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, 3844
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i32*
%7 = load volatile i32, i32* %6
%8 = or i32 %7, 16384
store volatile i32 %8, i32* %6
ret void
}

LLVM IR (-O2):
define void @I2CTxFIFOFlush(i32 %0) {
%2 = add nsw i32 %0, 3844
%3 = sext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
%6 = or i32 %5, 16384
store volatile i32 %6, i32* %4
ret void
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ waitpid(scalar_t__, int /*<<< orphan*/ *, int /*<<< orphan*/);
int proc_join(pid_t id) {
  if (waitpid(id, NULL, 0) != id) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<proc_join>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
xor    %edx,%edx
call   1030 <waitpid@plt>
cmp    -0x10(%rbp),%rax
je     1141 <proc_join+0x31>
movl   $0xffffffff,-0x4(%rbp)
jmp    1148 <proc_join+0x38>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<proc_join>:
push   %rbx
mov    %rdi,%rbx
xor    %esi,%esi
xor    %edx,%edx
call   1030 <waitpid@plt>
xor    %ecx,%ecx
cmp    %rbx,%rax
setne  %cl
neg    %ecx
mov    %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @proc_join(i64 %0) {
%2 = tail call i64 @waitpid(i64 %0, i32* null, i32 0)
%3 = icmp ne i64 %2, %0
%4 = sext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
unsigned short VIM_JPEG_ToolYuv2B(unsigned short *);
unsigned short VIM_JPEG_ToolYuv2G(unsigned short *);
unsigned short VIM_JPEG_ToolYuv2R(unsigned short *);
void VIM_JPEG_ToolYuv2Rgb(unsigned short *yuv, unsigned short *bgr) {
  bgr[2] = VIM_JPEG_ToolYuv2R(yuv);
  bgr[1] = VIM_JPEG_ToolYuv2G(yuv);
  bgr[0] = VIM_JPEG_ToolYuv2B(yuv);
}


x86 assembly (clang, -O0):
<VIM_JPEG_ToolYuv2Rgb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <VIM_JPEG_ToolYuv2R@plt>
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0x4(%rax)
mov    -0x8(%rbp),%rdi
call   1030 <VIM_JPEG_ToolYuv2G@plt>
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,0x2(%rax)
mov    -0x8(%rbp),%rdi
call   1050 <VIM_JPEG_ToolYuv2B@plt>
mov    %ax,%cx
mov    -0x10(%rbp),%rax
mov    %cx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<VIM_JPEG_ToolYuv2Rgb>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <VIM_JPEG_ToolYuv2R@plt>
mov    %ax,0x4(%r14)
mov    %rbx,%rdi
call   1030 <VIM_JPEG_ToolYuv2G@plt>
mov    %ax,0x2(%r14)
mov    %rbx,%rdi
call   1050 <VIM_JPEG_ToolYuv2B@plt>
mov    %ax,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @VIM_JPEG_ToolYuv2Rgb(i16* %0, i16* %1) {
%3 = alloca i16*
%4 = alloca i16*
store i16* %0, i16** %3
store i16* %1, i16** %4
%5 = load i16*, i16** %3
%6 = call zeroext i16 @VIM_JPEG_ToolYuv2R(i16* %5)
%7 = load i16*, i16** %4
%8 = getelementptr inbounds i16, i16* %7, i64 2
store i16 %6, i16* %8
%9 = load i16*, i16** %3
%10 = call zeroext i16 @VIM_JPEG_ToolYuv2G(i16* %9)
%11 = load i16*, i16** %4
%12 = getelementptr inbounds i16, i16* %11, i64 1
store i16 %10, i16* %12
%13 = load i16*, i16** %3
%14 = call zeroext i16 @VIM_JPEG_ToolYuv2B(i16* %13)
%15 = load i16*, i16** %4
%16 = getelementptr inbounds i16, i16* %15, i64 0
store i16 %14, i16* %16
ret void
}

LLVM IR (-O2):
define void @VIM_JPEG_ToolYuv2Rgb(i16* %0, i16* nocapture writeonly %1) {
%3 = tail call zeroext i16 @VIM_JPEG_ToolYuv2R(i16* %0)
%4 = getelementptr inbounds i16, i16* %1, i64 2
store i16 %3, i16* %4
%5 = tail call zeroext i16 @VIM_JPEG_ToolYuv2G(i16* %0)
%6 = getelementptr inbounds i16, i16* %1, i64 1
store i16 %5, i16* %6
%7 = tail call zeroext i16 @VIM_JPEG_ToolYuv2B(i16* %0)
store i16 %7, i16* %1
ret void
}
int ft_intlen(int n) {
  int i;
  i = 0;
  while (n != 0) {
    n /= 10;
    ++i;
  }
  return (i);
}


x86 assembly (clang, -O0):
<ft_intlen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1134 <ft_intlen+0x34>
mov    -0x4(%rbp),%eax
mov    $0xa,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    110e <ft_intlen+0xe>
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_intlen>:
xor    %eax,%eax
test   %edi,%edi
je     1132 <ft_intlen+0x32>
cs nopw 0x0(%rax,%rax,1)
movslq %edi,%rcx
imul   $0x66666667,%rcx,%rdi
mov    %rdi,%rdx
shr    $0x3f,%rdx
sar    $0x22,%rdi
add    %edx,%edi
add    $0x1,%eax
add    $0x9,%ecx
cmp    $0x12,%ecx
ja     1110 <ft_intlen+0x10>
ret

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

LLVM IR (-O2):
define i32 @ft_intlen(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %10, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i32 [ %6, %3 ], [ %0, %1 ]
%6 = sdiv i32 %5, 10
%7 = add nuw nsw i32 %4, 1
%8 = add i32 %5, 9
%9 = icmp ult i32 %8, 19
br i1 %9, label %10, label %3
10: ; preds = %3, %1
%11 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %11
}
int is_option(const char *p) {
  if (p == ((void *)0))
    return 0;
  if (*p++ != '-')
    return 0;
  if (*p++ != '-')
    return 0;
  if (*p == '\0')
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<is_option>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <is_option+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    1190 <is_option+0x90>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     1146 <is_option+0x46>
movl   $0x0,-0x4(%rbp)
jmp    1190 <is_option+0x90>
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
cmp    $0x2d,%eax
je     116d <is_option+0x6d>
movl   $0x0,-0x4(%rbp)
jmp    1190 <is_option+0x90>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1189 <is_option+0x89>
movl   $0x0,-0x4(%rbp)
jmp    1190 <is_option+0x90>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_option>:
xor    %eax,%eax
test   %rdi,%rdi
je     111b <is_option+0x1b>
cmpb   $0x2d,(%rdi)
jne    111b <is_option+0x1b>
cmpb   $0x2d,0x1(%rdi)
jne    111b <is_option+0x1b>
xor    %eax,%eax
cmpb   $0x0,0x2(%rdi)
setne  %al
ret

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

LLVM IR (-O2):
define i32 @is_option(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 45
br i1 %5, label %6, label %15
6: ; preds = %3
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 45
br i1 %9, label %10, label %15
10: ; preds = %6
%11 = getelementptr inbounds i8, i8* %0, i64 2
%12 = load i8, i8* %11
%13 = icmp ne i8 %12, 0
%14 = zext i1 %13 to i32
br label %15
15: ; preds = %10, %6, %3, %1
%16 = phi i32 [ 0, %1 ], [ 0, %3 ], [ 0, %6 ], [ %14, %10 ]
ret i32 %16
}
/* Type definitions */
struct Cyc_Lexing_lexbuf {
  int dummy;
};

/* Variables and functions */
int Cyc_string_rec(struct Cyc_Lexing_lexbuf *, int);
int Cyc_string(struct Cyc_Lexing_lexbuf *lexbuf) {
  int _T0;
  _T0 = Cyc_string_rec(lexbuf, 4);
  return _T0;
}


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

x86 assembly (clang, -O2):
<Cyc_string>:
mov    $0x4,%esi
jmp    1030 <Cyc_string_rec@plt>

LLVM IR (-O0):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = alloca %struct.Cyc_Lexing_lexbuf*
%3 = alloca i32
store %struct.Cyc_Lexing_lexbuf* %0, %struct.Cyc_Lexing_lexbuf** %2
%4 = load %struct.Cyc_Lexing_lexbuf*, %struct.Cyc_Lexing_lexbuf** %2
%5 = call i32 @Cyc_string_rec(%struct.Cyc_Lexing_lexbuf* %4, i32 4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
%struct.Cyc_Lexing_lexbuf = type { i32 }
define i32 @Cyc_string(%struct.Cyc_Lexing_lexbuf* %0) {
%2 = tail call i32 @Cyc_string_rec(%struct.Cyc_Lexing_lexbuf* %0, i32 4)
ret i32 %2
}
/* Variables and functions */
unsigned long long __blcs_u64(unsigned long long);
unsigned long long test__blcs_u64(unsigned long long a) {
  return __blcs_u64(a);
}


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

x86 assembly (clang, -O2):
<test__blcs_u64>:
jmp    1030 <__blcs_u64@plt>

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

LLVM IR (-O2):
define i64 @test__blcs_u64(i64 %0) {
%2 = tail call i64 @__blcs_u64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int __fpclassifyd(long double);
int __fpclassifyl(long double a1) { return __fpclassifyd(a1); }


x86 assembly (clang, -O0):
<__fpclassifyl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fldt   -0x10(%rbp)
mov    %rsp,%rax
fstpt  (%rax)
call   1030 <__fpclassifyd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__fpclassifyl>:
jmp    1030 <__fpclassifyd@plt>

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

LLVM IR (-O2):
define i32 @__fpclassifyl(x86_fp80 %0) {
%2 = tail call i32 @__fpclassifyd(x86_fp80 %0)
ret i32 %2
}
/* Variables and functions */
scalar_t__ le_detect();
int le16(int x) {
  if (le_detect())
    return x;
  else
    return ((x << 8) & 0xff00) | ((x >> 8) & 0x00ff);
}


x86 assembly (clang, -O0):
<le16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <le_detect@plt>
cmp    $0x0,%rax
je     1137 <le16+0x27>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <le16+0x43>
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
and    $0xff00,%eax
mov    -0x8(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<le16>:
push   %rbx
mov    %edi,%ebx
xor    %eax,%eax
call   1030 <le_detect@plt>
mov    %ebx,%ecx
rol    $0x8,%cx
test   %rax,%rax
movzwl %cx,%eax
cmovne %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @le16(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i64 (...) @le_detect()
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i32, i32* %3
store i32 %7, i32* %2
br label %16
8: ; preds = %1
%9 = load i32, i32* %3
%10 = shl i32 %9, 8
%11 = and i32 %10, 65280
%12 = load i32, i32* %3
%13 = ashr i32 %12, 8
%14 = and i32 %13, 255
%15 = or i32 %11, %14
store i32 %15, i32* %2
br label %16
16: ; preds = %8, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @le16(i32 %0) {
%2 = tail call i64 (...) @le_detect()
%3 = icmp eq i64 %2, 0
%4 = trunc i32 %0 to i16
%5 = tail call i16 @llvm.bswap.i16(i16 %4)
%6 = zext i16 %5 to i32
%7 = select i1 %3, i32 %6, i32 %0
ret i32 %7
}
/* Variables and functions */
unsigned long long __builtin_crypto_vshasigmad(unsigned long long, int, int);
int main() {
  __attribute__((altivec(vector__))) unsigned long long test, res;
  const int s0 = 0;
  int mask;
  res = __builtin_crypto_vshasigmad(test, 1, 0xff);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x1,%esi
mov    $0xff,%edx
call   1030 <__builtin_crypto_vshasigmad@plt>
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%esi
mov    $0xff,%edx
call   1030 <__builtin_crypto_vshasigmad@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64
%3 = alloca i64
%4 = alloca i32
%5 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %4
%6 = load i64, i64* %2
%7 = call i64 @__builtin_crypto_vshasigmad(i64 %6, i32 1, i32 255)
store i64 %7, i64* %3
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i64 @__builtin_crypto_vshasigmad(i64 undef, i32 1, i32 255)
ret i32 0
}
void warn(char *s, ...) {}


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

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

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

LLVM IR (-O2):
define void @warn(i8* nocapture %0, ...) {
ret void
}
void exit(int code) {
  asm volatile("out %0, %1" : : "a"(code), "d"((short)0xf4));
}


x86 assembly (clang, -O0):
<exit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4,%dx
out    %eax,(%dx)

x86 assembly (clang, -O2):
<exit>:
mov    %edi,%eax
mov    $0xf4,%dx
out    %eax,(%dx)

LLVM IR (-O0):
define void @exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
unreachable
}

LLVM IR (-O2):
define void @exit(i32 %0) {
tail call void asm sideeffect "out $0, $1", "{ax},{dx},~{dirflag},~{fpsr},~{flags}"(i32 %0, i16 244)
unreachable
}