xunge/DecIR huggingface dataset:
/* Type definitions */
typedef int GLint;
typedef int GLenum;

/* Variables and functions */
#define GL_2_BYTES 137
#define GL_3_BYTES 136
#define GL_4_BYTES 135
#define GL_BYTE 134
#define GL_FLOAT 133
#define GL_INT 132
#define GL_SHORT 131
#define GL_UNSIGNED_BYTE 130
#define GL_UNSIGNED_INT 129
#define GL_UNSIGNED_SHORT 128
__attribute__((visibility("internal"))) __attribute__((pure)) GLint
__glCallLists_size(GLenum e) {
  switch (e) {
  case GL_BYTE:
  case GL_UNSIGNED_BYTE:
    return 1;
  case GL_SHORT:
  case GL_UNSIGNED_SHORT:
  case GL_2_BYTES:
    return 2;
  case GL_3_BYTES:
    return 3;
  case GL_INT:
  case GL_UNSIGNED_INT:
  case GL_FLOAT:
  case GL_4_BYTES:
    return 4;
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<__glCallLists_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffff80,%eax
mov    %eax,%ecx
mov    %rcx,-0x10(%rbp)
sub    $0x9,%eax
ja     1160 <__glCallLists_size+0x60>
mov    -0x10(%rbp),%rax
lea    0xed9(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movl   $0x1,-0x4(%rbp)
jmp    1167 <__glCallLists_size+0x67>
movl   $0x2,-0x4(%rbp)
jmp    1167 <__glCallLists_size+0x67>
movl   $0x3,-0x4(%rbp)
jmp    1167 <__glCallLists_size+0x67>
movl   $0x4,-0x4(%rbp)
jmp    1167 <__glCallLists_size+0x67>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glCallLists_size>:
add    $0xffffff80,%edi
xor    %eax,%eax
cmp    $0x9,%edi
ja     1117 <__glCallLists_size+0x17>
movslq %edi,%rax
lea    0xeec(%rip),%rcx
mov    (%rcx,%rax,4),%eax
ret

LLVM IR (-O0):
define hidden i32 @__glCallLists_size(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %9 [
i32 134, label %5
i32 130, label %5
i32 131, label %6
i32 128, label %6
i32 137, label %6
i32 136, label %7
i32 132, label %8
i32 129, label %8
i32 133, label %8
i32 135, label %8
]
5: ; preds = %1, %1
store i32 1, i32* %2
br label %10
6: ; preds = %1, %1, %1
store i32 2, i32* %2
br label %10
7: ; preds = %1
store i32 3, i32* %2
br label %10
8: ; preds = %1, %1, %1, %1
store i32 4, i32* %2
br label %10
9: ; preds = %1
store i32 0, i32* %2
br label %10
10: ; preds = %9, %8, %7, %6, %5
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@switch.table.__glCallLists_size = [10 x i32] [i32 2, i32 4, i32 1, i32 2, i32 4, i32 4, i32 1, i32 4, i32 3, i32 2]
define hidden i32 @__glCallLists_size(i32 %0) {
%2 = add i32 %0, -128
%3 = icmp ult i32 %2, 10
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [10 x i32], [10 x i32]* @switch.table.__glCallLists_size, i64 0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %7, %4 ], [ 0, %1 ]
ret i32 %9
}
/* Variables and functions */
int validate_homepage(const char *homepage) {
  if (homepage == NULL) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<validate_homepage>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <validate_homepage+0x1f>
movl   $0xffffffff,-0x4(%rbp)
jmp    1126 <validate_homepage+0x26>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_homepage>:
cmp    $0x1,%rdi
sbb    %eax,%eax
ret

LLVM IR (-O0):
define i32 @validate_homepage(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 -1, i32* %2
br label %8
7: ; preds = %1
store i32 0, i32* %2
br label %8
8: ; preds = %7, %6
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @validate_homepage(i8* readnone %0) {
%2 = icmp eq i8* %0, null
%3 = sext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
float hgetfontwidth();
float hgetfontwidth_() { return (hgetfontwidth()); }


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

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

LLVM IR (-O0):
define float @hgetfontwidth_() {
%1 = call float (...) @hgetfontwidth()
ret float %1
}

LLVM IR (-O2):
define float @hgetfontwidth_() {
%1 = tail call float (...) @hgetfontwidth()
ret float %1
}
char *sha512base64(bitstr, bitcnt)
unsigned char *bitstr;
unsigned long bitcnt;
{ return ((char *)shacomp(512, 3, bitstr, bitcnt)); }


x86 assembly (clang, -O0):
<sha512base64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    $0x200,%edi
mov    $0x3,%esi
mov    $0x0,%al
call   1030 <shacomp@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sha512base64>:
push   %rax
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    $0x200,%edi
mov    $0x3,%esi
xor    %eax,%eax
call   1030 <shacomp@plt>
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i8* @sha512base64(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i8*, i8** %3
%6 = load i64, i64* %4
%7 = call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 512, i32 3, i8* %5, i64 %6)
%8 = sext i32 %7 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}

LLVM IR (-O2):
define i8* @sha512base64(i8* %0, i64 %1) {
%3 = tail call i32 (i32, i32, i8*, i64, ...) bitcast (i32 (...)* @shacomp to i32 (i32, i32, i8*, i64, ...)*)(i32 512, i32 3, i8* %0, i64 %1)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ WRITETEST(char *);
void ReverseIndex() { WRITETEST("\033M"); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"\1BM\00"
define void @ReverseIndex() {
%1 = tail call i32 @WRITETEST(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(char);
void cli_putc(char chr) { putchar(chr); }


x86 assembly (clang, -O0):
<cli_putc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cli_putc>:
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define void @cli_putc(i8 signext %0) {
%2 = tail call i32 @putchar(i8 signext %0)
ret void
}
cant(f) {
  mess("Can't open ");
  mess(f);
  mess("\n");
  term();
}


x86 assembly (clang, -O0):
<cant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <mess@plt>
mov    -0x8(%rbp),%edi
mov    $0x0,%al
call   1030 <mess@plt>
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <mess@plt>
mov    $0x0,%al
call   1040 <term@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cant>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
xor    %eax,%eax
call   1030 <mess@plt>
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <mess@plt>
lea    0xecb(%rip),%rdi
xor    %eax,%eax
call   1030 <mess@plt>
xor    %eax,%eax
pop    %rbx
jmp    1040 <term@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"Can't open \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @cant(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @mess to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %3
%6 = call i32 (i32, ...) bitcast (i32 (...)* @mess to i32 (i32, ...)*)(i32 %5)
%7 = call i32 (i8*, ...) bitcast (i32 (...)* @mess to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = call i32 (...) @term()
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
@.str = [12 x i8] c"Can't open \00"
@.str.1 = [2 x i8] c"\0A\00"
define i32 @cant(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mess to i32 (i8*, ...)*)(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @mess to i32 (i32, ...)*)(i32 %0)
%4 = tail call i32 (i8*, ...) bitcast (i32 (...)* @mess to i32 (i8*, ...)*)(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (...) @term()
ret i32 undef
}
/* Variables and functions */
int decr(int);
int echo(int);
int while3(int a) {
  int b = a;
  while (a == b) {
    a = echo(a);
    b = decr(b);
  }
  return a;
}


x86 assembly (clang, -O0):
<while3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jne    1158 <while3+0x38>
mov    -0x4(%rbp),%edi
call   1030 <echo@plt>
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%edi
call   1040 <decr@plt>
mov    %eax,-0x8(%rbp)
jmp    1131 <while3+0x11>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<while3>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %ebx,%ebp
mov    %ebx,%edi
call   1030 <echo@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1040 <decr@plt>
cmp    %eax,%ebx
je     1130 <while3+0x10>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @while3(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i32 [ %0, %1 ], [ %4, %2 ]
%4 = tail call i32 @echo(i32 %3)
%5 = tail call i32 @decr(i32 %3)
%6 = icmp eq i32 %4, %5
br i1 %6, label %2, label %7
7: ; preds = %2
ret i32 %4
}
OP(fd, bf) {
  illegal_1();
  op_bf();
}


x86 assembly (clang, -O0):
<OP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <illegal_1@plt>
mov    $0x0,%al
call   1040 <op_bf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OP>:
push   %rax
xor    %eax,%eax
call   1030 <illegal_1@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <op_bf@plt>

LLVM IR (-O0):
define i32 @OP(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = call i32 (...) @illegal_1()
%7 = call i32 (...) @op_bf()
%8 = load i32, i32* %3
ret i32 %8
}

LLVM IR (-O2):
define i32 @OP(i32 %0, i32 %1) {
%3 = tail call i32 (...) @illegal_1()
%4 = tail call i32 (...) @op_bf()
ret i32 undef
}
/* Type definitions */
struct h261_gob {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct h261_gob *);
void h261_del_gob(struct h261_gob *gob) { free(gob); }


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

x86 assembly (clang, -O2):
<h261_del_gob>:
jmp    1030 <free@plt>

LLVM IR (-O0):
%struct.h261_gob = type { i32 }
define void @h261_del_gob(%struct.h261_gob* %0) {
%2 = alloca %struct.h261_gob*
store %struct.h261_gob* %0, %struct.h261_gob** %2
%3 = load %struct.h261_gob*, %struct.h261_gob** %2
%4 = call i32 @free(%struct.h261_gob* %3)
ret void
}

LLVM IR (-O2):
%struct.h261_gob = type { i32 }
define void @h261_del_gob(%struct.h261_gob* nocapture %0) {
%2 = tail call i32 @free(%struct.h261_gob* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int fscanf(int /*<<< orphan*/ *, char *, int *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
int /*<<< orphan*/ shutdown(int, char *, int);
int get(FILE *stream) {
  int value;
  rewind(stream);
  if (fscanf(stream, "%d", &value) != 1)
    shutdown(4, "Error reading /proc entry", 117 - 1);
  return value;
}


x86 assembly (clang, -O0):
<get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <rewind@plt>
mov    -0x8(%rbp),%rdi
lea    0xeb0(%rip),%rsi
lea    -0xc(%rbp),%rdx
call   1050 <fscanf@plt>
cmp    $0x1,%eax
je     1178 <get+0x48>
mov    $0x4,%edi
lea    0xe95(%rip),%rsi
mov    $0x74,%edx
call   1030 <shutdown@plt>
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
call   1040 <rewind@plt>
lea    0xebc(%rip),%rsi
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
call   1050 <fscanf@plt>
cmp    $0x1,%eax
je     116c <get+0x3c>
lea    0xea6(%rip),%rsi
mov    $0x4,%edi
mov    $0x74,%edx
call   1030 <shutdown@plt>
mov    0xc(%rsp),%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%d\00"
@.str.1 = [26 x i8] c"Error reading /proc entry\00"
define i32 @get(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
store i32* %0, i32** %2
%4 = load i32*, i32** %2
%5 = call i32 @rewind(i32* %4)
%6 = load i32*, i32** %2
%7 = call i32 @fscanf(i32* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %3)
%8 = icmp ne i32 %7, 1
br i1 %8, label %9, label %11
9: ; preds = %1
%10 = call i32 @shutdown(i32 4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 116)
br label %11
11: ; preds = %9, %1
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [26 x i8] c"Error reading /proc entry\00"
define i32 @get(i32* nocapture %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = tail call i32 @rewind(i32* %0)
%5 = call i32 @fscanf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %2)
%6 = icmp eq i32 %5, 1
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = call i32 @shutdown(i32 4, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.1, i64 0, i64 0), i32 116)
br label %9
9: ; preds = %7, %1
%10 = load i32, i32* %2
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ create_file(char *, char *, int);
int /*<<< orphan*/ lchmod(char *, int);
int /*<<< orphan*/ mkdir(char *, int);
int /*<<< orphan*/ symlink(char *, char *);
void setup() {
  create_file("file", "abcdef", 0777);
  symlink("file", "file-link");
  lchmod("file-link", 0777);
  mkdir("folder", 0777);
}


x86 assembly (clang, -O0):
<setup>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
lea    0xeb3(%rip),%rsi
mov    $0x1ff,%edx
call   1060 <create_file@plt>
lea    0xe9d(%rip),%rdi
lea    0xea2(%rip),%rsi
call   1050 <symlink@plt>
lea    0xe96(%rip),%rdi
mov    $0x1ff,%esi
call   1040 <lchmod@plt>
lea    0xe8f(%rip),%rdi
mov    $0x1ff,%esi
call   1030 <mkdir@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup>:
push   %r14
push   %rbx
push   %rax
lea    0xeb5(%rip),%r14
lea    0xeb3(%rip),%rsi
mov    %r14,%rdi
mov    $0x1ff,%edx
call   1060 <create_file@plt>
lea    0xea6(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <symlink@plt>
mov    %rbx,%rdi
mov    $0x1ff,%esi
call   1040 <lchmod@plt>
lea    0xe91(%rip),%rdi
mov    $0x1ff,%esi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <mkdir@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"file\00"
@.str.1 = [7 x i8] c"abcdef\00"
@.str.2 = [10 x i8] c"file-link\00"
@.str.3 = [7 x i8] c"folder\00"
define void @setup() {
%1 = call i32 @create_file(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 511)
%2 = call i32 @symlink(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%3 = call i32 @lchmod(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 511)
%4 = call i32 @mkdir(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 511)
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"file\00"
@.str.1 = [7 x i8] c"abcdef\00"
@.str.2 = [10 x i8] c"file-link\00"
@.str.3 = [7 x i8] c"folder\00"
define void @setup() {
%1 = tail call i32 @create_file(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 511)
%2 = tail call i32 @symlink(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0))
%3 = tail call i32 @lchmod(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 511)
%4 = tail call i32 @mkdir(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.3, i64 0, i64 0), i32 511)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;
typedef int /*<<< orphan*/ uint16_t;
struct ip6_hdr {
  int /*<<< orphan*/ ip6_src;
  int /*<<< orphan*/ ip6_dst;
};

/* Variables and functions */
int teredo_send_bubble(int, int /*<<< orphan*/, int /*<<< orphan*/,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int teredo_reply_bubble(int fd, uint32_t ip, uint16_t port,
                        const struct ip6_hdr *req) {
  return teredo_send_bubble(fd, ip, port, &req->ip6_dst, &req->ip6_src);
}


x86 assembly (clang, -O0):
<teredo_reply_bubble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
add    $0x4,%rcx
mov    -0x18(%rbp),%r8
call   1030 <teredo_send_bubble@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<teredo_reply_bubble>:
mov    %rcx,%r8
add    $0x4,%rcx
jmp    1030 <teredo_send_bubble@plt>

LLVM IR (-O0):
%struct.ip6_hdr = type { i32, i32 }
define i32 @teredo_reply_bubble(i32 %0, i32 %1, i32 %2, %struct.ip6_hdr* %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca %struct.ip6_hdr*
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store %struct.ip6_hdr* %3, %struct.ip6_hdr** %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = load i32, i32* %7
%12 = load %struct.ip6_hdr*, %struct.ip6_hdr** %8
%13 = getelementptr inbounds %struct.ip6_hdr, %struct.ip6_hdr* %12, i32 0, i32 1
%14 = load %struct.ip6_hdr*, %struct.ip6_hdr** %8
%15 = getelementptr inbounds %struct.ip6_hdr, %struct.ip6_hdr* %14, i32 0, i32 0
%16 = call i32 @teredo_send_bubble(i32 %9, i32 %10, i32 %11, i32* %13, i32* %15)
ret i32 %16
}

LLVM IR (-O2):
%struct.ip6_hdr = type { i32, i32 }
define i32 @teredo_reply_bubble(i32 %0, i32 %1, i32 %2, %struct.ip6_hdr* %3) {
%5 = getelementptr inbounds %struct.ip6_hdr, %struct.ip6_hdr* %3, i64 0, i32 1
%6 = getelementptr inbounds %struct.ip6_hdr, %struct.ip6_hdr* %3, i64 0, i32 0
%7 = tail call i32 @teredo_send_bubble(i32 %0, i32 %1, i32 %2, i32* %5, i32* %6)
ret i32 %7
}
unsigned short SwapWord12(unsigned short r) { return r; }


x86 assembly (clang, -O0):
<SwapWord12>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i16 @SwapWord12(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
ret i16 %3
}

LLVM IR (-O2):
define zeroext i16 @SwapWord12(i16 returned zeroext %0) {
ret i16 %0
}
/* Variables and functions */
int *calloc(int, int);
int *make_meta() { return calloc(32, sizeof(int *)); }


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

x86 assembly (clang, -O2):
<make_meta>:
mov    $0x20,%edi
mov    $0x8,%esi
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i32* @make_meta() {
%1 = call i32* @calloc(i32 32, i32 8)
ret i32* %1
}

LLVM IR (-O2):
define noalias i32* @make_meta() {
%1 = tail call i32* @calloc(i32 32, i32 8)
ret i32* %1
}
char *strcpy(char *dest, const char *src) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @strcpy(i8* nocapture readnone %0, i8* nocapture readnone %1) {
ret i8* null
}
int OpponentColor(Player)
int Player;
{
  if (Player == 1)
    return 2;
  else
    return 1;
}


x86 assembly (clang, -O0):
<OpponentColor>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x1,-0x8(%rbp)
jne    111d <OpponentColor+0x1d>
movl   $0x2,-0x4(%rbp)
jmp    1124 <OpponentColor+0x24>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<OpponentColor>:
xor    %eax,%eax
cmp    $0x1,%edi
sete   %al
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @OpponentColor(i32 %0) {
%2 = icmp eq i32 %0, 1
%3 = select i1 %2, i32 2, i32 1
ret i32 %3
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t _SysExcIntNumberGet(void) {
  uint32_t ui32Int;
  if ((((*((volatile uint32_t *)(0x400FE000))) & (0x70000000 | 0x00FF0000)) ==
       (0x10000000 | 0x00050000))) {
    ui32Int = 122;
  } else if ((((*((volatile uint32_t *)(0x400FE000))) &
               (0x70000000 | 0x00FF0000)) == (0x10000000 | 0x000A0000))) {
    ui32Int = 83;
  } else {
    ui32Int = 0;
  }
  return (ui32Int);
}


x86 assembly (clang, -O0):
<_SysExcIntNumberGet>:
push   %rbp
mov    %rsp,%rbp
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x10050000,%eax
jne    1127 <_SysExcIntNumberGet+0x27>
movl   $0x7a,-0x4(%rbp)
jmp    1156 <_SysExcIntNumberGet+0x56>
mov    $0x400fe000,%eax
mov    (%rax),%eax
and    $0x70ff0000,%eax
cmp    $0x100a0000,%eax
jne    114a <_SysExcIntNumberGet+0x4a>
movl   $0x53,-0x4(%rbp)
jmp    1151 <_SysExcIntNumberGet+0x51>
movl   $0x0,-0x4(%rbp)
jmp    1156 <_SysExcIntNumberGet+0x56>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_SysExcIntNumberGet>:
mov    $0x70ff0000,%ecx
mov    0x400fe000,%edx
and    %ecx,%edx
mov    $0x7a,%eax
cmp    $0x10050000,%edx
je     1132 <_SysExcIntNumberGet+0x32>
and    0x400fe000,%ecx
xor    %edx,%edx
cmp    $0x100a0000,%ecx
mov    $0x53,%eax
cmovne %edx,%eax
ret

LLVM IR (-O0):
define i32 @_SysExcIntNumberGet() {
%1 = alloca i32
%2 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%3 = and i32 %2, 1895759872
%4 = icmp eq i32 %3, 268763136
br i1 %4, label %5, label %6
5: ; preds = %0
store i32 122, i32* %1
br label %13
6: ; preds = %0
%7 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%8 = and i32 %7, 1895759872
%9 = icmp eq i32 %8, 269090816
br i1 %9, label %10, label %11
10: ; preds = %6
store i32 83, i32* %1
br label %12
11: ; preds = %6
store i32 0, i32* %1
br label %12
12: ; preds = %11, %10
br label %13
13: ; preds = %12, %5
%14 = load i32, i32* %1
ret i32 %14
}

LLVM IR (-O2):
define i32 @_SysExcIntNumberGet() {
%1 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%2 = and i32 %1, 1895759872
%3 = icmp eq i32 %2, 268763136
br i1 %3, label %9, label %4
4: ; preds = %0
%5 = load volatile i32, i32* inttoptr (i64 1074782208 to i32*)
%6 = and i32 %5, 1895759872
%7 = icmp eq i32 %6, 269090816
%8 = select i1 %7, i32 83, i32 0
br label %9
9: ; preds = %4, %0
%10 = phi i32 [ 122, %0 ], [ %8, %4 ]
ret i32 %10
}
void uDMA_Error(void) {
  while (1) {
  }
}


x86 assembly (clang, -O0):
<uDMA_Error>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <uDMA_Error+0x9>
jmp    1109 <uDMA_Error+0x9>

x86 assembly (clang, -O2):
<uDMA_Error>:
jmp    1100 <uDMA_Error>

LLVM IR (-O0):
define void @uDMA_Error() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @uDMA_Error() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ detect_C99_integers16();
int /*<<< orphan*/ detect_C99_integers32();
int /*<<< orphan*/ detect_C99_integers64();
int /*<<< orphan*/ detect_C99_integers8();
void detect_C99_integers(void) {
  detect_C99_integers8();
  detect_C99_integers16();
  detect_C99_integers32();
  detect_C99_integers64();
}


x86 assembly (clang, -O0):
<detect_C99_integers>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <detect_C99_integers8@plt>
mov    $0x0,%al
call   1030 <detect_C99_integers16@plt>
mov    $0x0,%al
call   1050 <detect_C99_integers32@plt>
mov    $0x0,%al
call   1060 <detect_C99_integers64@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<detect_C99_integers>:
push   %rax
xor    %eax,%eax
call   1040 <detect_C99_integers8@plt>
xor    %eax,%eax
call   1030 <detect_C99_integers16@plt>
xor    %eax,%eax
call   1050 <detect_C99_integers32@plt>
xor    %eax,%eax
pop    %rcx
jmp    1060 <detect_C99_integers64@plt>

LLVM IR (-O0):
define void @detect_C99_integers() {
%1 = call i32 (...) @detect_C99_integers8()
%2 = call i32 (...) @detect_C99_integers16()
%3 = call i32 (...) @detect_C99_integers32()
%4 = call i32 (...) @detect_C99_integers64()
ret void
}

LLVM IR (-O2):
define void @detect_C99_integers() {
%1 = tail call i32 (...) @detect_C99_integers8()
%2 = tail call i32 (...) @detect_C99_integers16()
%3 = tail call i32 (...) @detect_C99_integers32()
%4 = tail call i32 (...) @detect_C99_integers64()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void print_cs_indent_statement(int indent, FILE *debugfile) {
  int i;
  for (i = 0; i < indent * 4; i++)
    fprintf(debugfile, " ");
}


x86 assembly (clang, -O0):
<print_cs_indent_statement>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0x4(%rbp),%ecx
shl    $0x2,%ecx
cmp    %ecx,%eax
jge    1155 <print_cs_indent_statement+0x45>
mov    -0x10(%rbp),%rdi
lea    0xebe(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <print_cs_indent_statement+0x16>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_cs_indent_statement>:
push   %rbp
push   %rbx
push   %rax
test   %edi,%edi
jle    1142 <print_cs_indent_statement+0x32>
mov    %rsi,%rbx
shl    $0x2,%edi
cmp    $0x2,%edi
mov    $0x1,%ebp
cmovge %edi,%ebp
nopl   0x0(%rax,%rax,1)
mov    $0x20,%edi
mov    %rbx,%rsi
call   1030 <fputc@plt>
add    $0xffffffff,%ebp
jne    1130 <print_cs_indent_statement+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define void @print_cs_indent_statement(i32 %0, i32* nocapture %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = shl i32 %0, 2
%6 = call i32 @llvm.smax.i32(i32 %5, i32 1)
br label %7
7: ; preds = %4, %7
%8 = phi i32 [ %10, %7 ], [ 0, %4 ]
%9 = tail call i32 @fputc(i32 32, i32* %1)
%10 = add nuw nsw i32 %8, 1
%11 = icmp eq i32 %10, %6
br i1 %11, label %12, label %7
12: ; preds = %7, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(int);
int main() {
  int n_main;
  f(n_main);
#pragma omp taskwait
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i32 undef)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ q2(char *);
int main(int argc, char const *argv[]) {
  char str[100] = "hey whats up?";
  q2(str);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x80(%rbp),%rdi
lea    0xebc(%rip),%rsi
mov    $0x64,%edx
call   1030 <memcpy@plt>
lea    -0x80(%rbp),%rdi
call   1040 <q2@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x68,%rsp
movaps 0xf35(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xf19(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xefd(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xee1(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xec5(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xea9(%rip),%xmm0
movaps %xmm0,(%rsp)
movl   $0x0,0x60(%rsp)
mov    %rsp,%rdi
call   1030 <q2@plt>
xor    %eax,%eax
add    $0x68,%rsp
ret

LLVM IR (-O0):
@__const.main.str = [100 x i8] c"hey whats up?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [100 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = bitcast [100 x i8]* %6 to i8*
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%9 = call i32 @q2(i8* %8)
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [100 x i8] c"hey whats up?\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [100 x i8]
%4 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%5 = call i32 @q2(i8* %4)
ret i32 0
}
void glGetLightxv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glGetLightxv() {
ret void
}
void c16k_set_b(unsigned char source, unsigned int values[],
                unsigned int *bar_chars) {
  if (source > 127) {
    values[(*bar_chars)] = source - 32 - 128;
  } else {
    values[(*bar_chars)] = source - 32;
  }
  (*bar_chars)++;
}


x86 assembly (clang, -O0):
<c16k_set_b>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movzbl -0x1(%rbp),%eax
cmp    $0x7f,%eax
jle    113e <c16k_set_b+0x3e>
movzbl -0x1(%rbp),%edx
sub    $0x20,%edx
sub    $0x80,%edx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%ecx
mov    %edx,(%rax,%rcx,4)
jmp    1152 <c16k_set_b+0x52>
movzbl -0x1(%rbp),%edx
sub    $0x20,%edx
mov    -0x10(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    (%rcx),%ecx
mov    %edx,(%rax,%rcx,4)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0x1,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<c16k_set_b>:
xor    %eax,%eax
test   %dil,%dil
setns  %al
shl    $0x7,%eax
add    %edi,%eax
add    $0xffffff60,%eax
mov    (%rdx),%ecx
mov    %eax,(%rsi,%rcx,4)
addl   $0x1,(%rdx)
ret

LLVM IR (-O0):
define void @c16k_set_b(i8 zeroext %0, i32* %1, i32* %2) {
%4 = alloca i8
%5 = alloca i32*
%6 = alloca i32*
store i8 %0, i8* %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i8, i8* %4
%8 = zext i8 %7 to i32
%9 = icmp sgt i32 %8, 127
br i1 %9, label %10, label %20
10: ; preds = %3
%11 = load i8, i8* %4
%12 = zext i8 %11 to i32
%13 = sub nsw i32 %12, 32
%14 = sub nsw i32 %13, 128
%15 = load i32*, i32** %5
%16 = load i32*, i32** %6
%17 = load i32, i32* %16
%18 = zext i32 %17 to i64
%19 = getelementptr inbounds i32, i32* %15, i64 %18
store i32 %14, i32* %19
br label %29
20: ; preds = %3
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = sub nsw i32 %22, 32
%24 = load i32*, i32** %5
%25 = load i32*, i32** %6
%26 = load i32, i32* %25
%27 = zext i32 %26 to i64
%28 = getelementptr inbounds i32, i32* %24, i64 %27
store i32 %23, i32* %28
br label %29
29: ; preds = %20, %10
%30 = load i32*, i32** %6
%31 = load i32, i32* %30
%32 = add i32 %31, 1
store i32 %32, i32* %30
ret void
}

LLVM IR (-O2):
define void @c16k_set_b(i8 zeroext %0, i32* nocapture writeonly %1, i32* nocapture %2) {
%4 = zext i8 %0 to i32
%5 = icmp slt i8 %0, 0
%6 = select i1 %5, i32 -160, i32 -32
%7 = add nsw i32 %6, %4
%8 = load i32, i32* %2
%9 = zext i32 %8 to i64
%10 = getelementptr inbounds i32, i32* %1, i64 %9
store i32 %7, i32* %10
%11 = load i32, i32* %2
%12 = add i32 %11, 1
store i32 %12, i32* %2
ret void
}
void slang_shutdown() {}


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

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

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

LLVM IR (-O2):
define void @slang_shutdown() {
ret void
}
/* Variables and functions */
int getopt_long(int, char **, char const *, int /*<<< orphan*/ *,
                int /*<<< orphan*/ *);
int getopt(int argc, char **argv, const char *optstring) {
  return getopt_long(argc, argv, optstring, NULL, NULL);
}


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

x86 assembly (clang, -O2):
<getopt>:
xor    %ecx,%ecx
xor    %r8d,%r8d
jmp    1030 <getopt_long@plt>

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

LLVM IR (-O2):
define i32 @getopt(i32 %0, i8** %1, i8* %2) {
%4 = tail call i32 @getopt_long(i32 %0, i8** %1, i8* %2, i32* null, i32* null)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ MagStateHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void MagStateRequestUpdate() { UAVObjRequestUpdate(MagStateHandle()); }


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

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

LLVM IR (-O0):
define void @MagStateRequestUpdate() {
%1 = call i32 (...) @MagStateHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @MagStateRequestUpdate() {
%1 = tail call i32 (...) @MagStateHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_usage(void) { printf("usage: goldbach [even number]\n"); }


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

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

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

LLVM IR (-O2):
@str = [30 x i8] c"usage: goldbach [even number]\00"
define void @show_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int countWaysUtil(int, int);
int countWays(int s, int m) { return countWaysUtil(s + 1, m); }


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

x86 assembly (clang, -O2):
<countWays>:
add    $0x1,%edi
jmp    1030 <countWaysUtil@plt>

LLVM IR (-O0):
define i32 @countWays(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 = add nsw i32 %5, 1
%7 = load i32, i32* %4
%8 = call i32 @countWaysUtil(i32 %6, i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @countWays(i32 %0, i32 %1) {
%3 = add nsw i32 %0, 1
%4 = tail call i32 @countWaysUtil(i32 %3, i32 %1)
ret i32 %4
}
float ConstantExtension(const float *Src, int Stride, int N, int n) {
  return Src[(n < 0) ? 0 : ((n >= N) ? Stride * (N - 1) : n)];
}


x86 assembly (clang, -O0):
<ConstantExtension>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    112d <ConstantExtension+0x2d>
xor    %eax,%eax
mov    %eax,-0x24(%rbp)
jmp    1159 <ConstantExtension+0x59>
mov    -0x14(%rbp),%eax
cmp    -0x10(%rbp),%eax
jl     114d <ConstantExtension+0x4d>
mov    -0xc(%rbp),%eax
mov    -0x10(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    %eax,-0x28(%rbp)
jmp    1153 <ConstantExtension+0x53>
mov    -0x14(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x24(%rbp),%ecx
movslq %ecx,%rcx
movss  (%rax,%rcx,4),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<ConstantExtension>:
test   %ecx,%ecx
js     1112 <ConstantExtension+0x12>
cmp    %edx,%ecx
jl     1114 <ConstantExtension+0x14>
add    $0xffffffff,%edx
imul   %esi,%edx
mov    %edx,%ecx
jmp    1114 <ConstantExtension+0x14>
xor    %ecx,%ecx
movslq %ecx,%rax
movss  (%rdi,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @ConstantExtension(float* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca float*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store float* %0, float** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load float*, float** %5
%10 = load i32, i32* %8
%11 = icmp slt i32 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %4
br label %26
13: ; preds = %4
%14 = load i32, i32* %8
%15 = load i32, i32* %7
%16 = icmp sge i32 %14, %15
br i1 %16, label %17, label %22
17: ; preds = %13
%18 = load i32, i32* %6
%19 = load i32, i32* %7
%20 = sub nsw i32 %19, 1
%21 = mul nsw i32 %18, %20
br label %24
22: ; preds = %13
%23 = load i32, i32* %8
br label %24
24: ; preds = %22, %17
%25 = phi i32 [ %21, %17 ], [ %23, %22 ]
br label %26
26: ; preds = %24, %12
%27 = phi i32 [ 0, %12 ], [ %25, %24 ]
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds float, float* %9, i64 %28
%30 = load float, float* %29
ret float %30
}

LLVM IR (-O2):
define float @ConstantExtension(float* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = icmp slt i32 %3, 0
br i1 %5, label %11, label %6
6: ; preds = %4
%7 = icmp slt i32 %3, %2
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = add nsw i32 %2, -1
%10 = mul nsw i32 %9, %1
br label %11
11: ; preds = %6, %8, %4
%12 = phi i32 [ 0, %4 ], [ %10, %8 ], [ %3, %6 ]
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %0, i64 %13
%15 = load float, float* %14
ret float %15
}
int next_pow2(int n) {
  int i = 0;
  while (n)
    ++i, n >>= 1;
  return 1 << i;
}


x86 assembly (clang, -O0):
<next_pow2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     112f <next_pow2+0x2f>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110e <next_pow2+0xe>
mov    -0x8(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_pow2>:
xor    %ecx,%ecx
test   %edi,%edi
je     111c <next_pow2+0x1c>
mov    %edi,%eax
nopl   0x0(%rax,%rax,1)
add    $0x1,%ecx
sar    %eax
cmp    $0x1,%edi
mov    %eax,%edi
ja     1110 <next_pow2+0x10>
mov    $0x1,%eax
shl    %cl,%eax
ret

LLVM IR (-O0):
define i32 @next_pow2(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* %3
%9 = add nsw i32 %8, 1
store i32 %9, i32* %3
%10 = load i32, i32* %2
%11 = ashr i32 %10, 1
store i32 %11, i32* %2
br label %4
12: ; preds = %4
%13 = load i32, i32* %3
%14 = shl i32 1, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @next_pow2(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ 0, %1 ]
%5 = phi i32 [ %7, %3 ], [ %0, %1 ]
%6 = add nuw nsw i32 %4, 1
%7 = ashr i32 %5, 1
%8 = icmp ult i32 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %6, %3 ]
%11 = shl nuw i32 1, %10
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ reg_addrange(int, int);
void reg_addranges_S(void) {
  reg_addrange(0, 0x9 - 1);
  reg_addrange(0x9 + 1, 0xA - 1);
  reg_addrange(0xD + 1, 0x20 - 1);
  reg_addrange(0x20 + 1, 0xA0 - 1);
  reg_addrange(0xA0 + 1, 0x2028 - 1);
  reg_addrange(0x2029 + 1, 0xFEFF - 1);
  reg_addrange(0xFEFF + 1, 0xFFFF);
}


x86 assembly (clang, -O0):
<reg_addranges_S>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x8,%esi
call   1030 <reg_addrange@plt>
mov    $0xa,%edi
mov    $0x9,%esi
call   1030 <reg_addrange@plt>
mov    $0xe,%edi
mov    $0x1f,%esi
call   1030 <reg_addrange@plt>
mov    $0x21,%edi
mov    $0x9f,%esi
call   1030 <reg_addrange@plt>
mov    $0xa1,%edi
mov    $0x2027,%esi
call   1030 <reg_addrange@plt>
mov    $0x202a,%edi
mov    $0xfefe,%esi
call   1030 <reg_addrange@plt>
mov    $0xff00,%edi
mov    $0xffff,%esi
call   1030 <reg_addrange@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<reg_addranges_S>:
push   %rax
xor    %edi,%edi
mov    $0x8,%esi
call   1030 <reg_addrange@plt>
mov    $0xa,%edi
mov    $0x9,%esi
call   1030 <reg_addrange@plt>
mov    $0xe,%edi
mov    $0x1f,%esi
call   1030 <reg_addrange@plt>
mov    $0x21,%edi
mov    $0x9f,%esi
call   1030 <reg_addrange@plt>
mov    $0xa1,%edi
mov    $0x2027,%esi
call   1030 <reg_addrange@plt>
mov    $0x202a,%edi
mov    $0xfefe,%esi
call   1030 <reg_addrange@plt>
mov    $0xff00,%edi
mov    $0xffff,%esi
pop    %rax
jmp    1030 <reg_addrange@plt>

LLVM IR (-O0):
define void @reg_addranges_S() {
%1 = call i32 @reg_addrange(i32 0, i32 8)
%2 = call i32 @reg_addrange(i32 10, i32 9)
%3 = call i32 @reg_addrange(i32 14, i32 31)
%4 = call i32 @reg_addrange(i32 33, i32 159)
%5 = call i32 @reg_addrange(i32 161, i32 8231)
%6 = call i32 @reg_addrange(i32 8234, i32 65278)
%7 = call i32 @reg_addrange(i32 65280, i32 65535)
ret void
}

LLVM IR (-O2):
define void @reg_addranges_S() {
%1 = tail call i32 @reg_addrange(i32 0, i32 8)
%2 = tail call i32 @reg_addrange(i32 10, i32 9)
%3 = tail call i32 @reg_addrange(i32 14, i32 31)
%4 = tail call i32 @reg_addrange(i32 33, i32 159)
%5 = tail call i32 @reg_addrange(i32 161, i32 8231)
%6 = tail call i32 @reg_addrange(i32 8234, i32 65278)
%7 = tail call i32 @reg_addrange(i32 65280, i32 65535)
ret void
}
long jround12_up(long a, long b) {
  a += b - 1L;
  return a - (a % b);
}


x86 assembly (clang, -O0):
<jround12_up>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
sub    $0x1,%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    -0x18(%rbp),%rax
sub    %rdx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jround12_up>:
lea    (%rdi,%rsi,1),%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,%rax
or     %rsi,%rax
shr    $0x20,%rax
je     111e <jround12_up+0x1e>
mov    %rcx,%rax
cqto
idiv   %rsi
jmp    1124 <jround12_up+0x24>
mov    %ecx,%eax
xor    %edx,%edx
div    %esi
sub    %rdx,%rcx
mov    %rcx,%rax
ret

LLVM IR (-O0):
define i64 @jround12_up(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = sub nsw i64 %5, 1
%7 = load i64, i64* %3
%8 = add nsw i64 %7, %6
store i64 %8, i64* %3
%9 = load i64, i64* %3
%10 = load i64, i64* %3
%11 = load i64, i64* %4
%12 = srem i64 %10, %11
%13 = sub nsw i64 %9, %12
ret i64 %13
}

LLVM IR (-O2):
define i64 @jround12_up(i64 %0, i64 %1) {
%3 = add i64 %0, -1
%4 = add i64 %3, %1
%5 = srem i64 %4, %1
%6 = sub nsw i64 %4, %5
ret i64 %6
}
/* Variables and functions */
int INT_MAX;
int /*<<< orphan*/ this_comparison_is_false();
void bla3ge(int var) {
  if (var - 11 >= INT_MAX - 10)
    this_comparison_is_false();
}


x86 assembly (clang, -O0):
<bla3ge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0xb,%eax
mov    0x2ec0(%rip),%rcx
mov    (%rcx),%ecx
sub    $0xa,%ecx
cmp    %ecx,%eax
jl     113c <bla3ge+0x2c>
mov    $0x0,%al
call   1030 <this_comparison_is_false@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bla3ge>:
mov    0x2ed1(%rip),%rax
cmp    %edi,(%rax)
jge    1122 <bla3ge+0x12>
xor    %eax,%eax
jmp    1030 <this_comparison_is_false@plt>
ret

LLVM IR (-O0):
@INT_MAX = global i32 0
define void @bla3ge(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sub nsw i32 %3, 11
%5 = load i32, i32* @INT_MAX
%6 = sub nsw i32 %5, 10
%7 = icmp sge i32 %4, %6
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (...) @this_comparison_is_false()
br label %10
10: ; preds = %8, %1
ret void
}

LLVM IR (-O2):
@INT_MAX = global i32 0
define void @bla3ge(i32 %0) {
%2 = load i32, i32* @INT_MAX
%3 = icmp slt i32 %2, %0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (...) @this_comparison_is_false()
br label %6
6: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main(void) {
  int years, days;
  years = 33;
  days = 33 * 365;
  printf("%d years converted in days are %d days.\n", years, days);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x21,-0x8(%rbp)
movl   $0x2f0d,-0xc(%rbp)
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xec6(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x21,%esi
mov    $0x2f0d,%edx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [41 x i8] c"%d years converted in days are %d days.\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 33, i32* %2
store i32 12045, i32* %3
%4 = load i32, i32* %2
%5 = load i32, i32* %3
%6 = call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 %4, i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [41 x i8] c"%d years converted in days are %d days.\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i32 33, i32 12045)
ret i32 0
}