xunge/DecIR huggingface dataset:
/* Variables and functions */
int isdigit(int);
int SDL_isdigit(int x) { return isdigit(x); }


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

x86 assembly (clang, -O2):
<SDL_isdigit>:
add    $0xffffffd0,%edi
xor    %eax,%eax
cmp    $0xa,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @SDL_isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_load_si128(int /*<<< orphan*/ *);
__m128i load(const void *p) { return _mm_load_si128((__m128i *)p); }


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

x86 assembly (clang, -O2):
<load>:
jmp    1030 <_mm_load_si128@plt>

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

LLVM IR (-O2):
define i32 @load(i8* %0) {
%2 = bitcast i8* %0 to i32*
%3 = tail call i32 @_mm_load_si128(i32* %2)
ret i32 %3
}
void d2i_NOTICEREF(void) {}


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

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

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

LLVM IR (-O2):
define void @d2i_NOTICEREF() {
ret void
}
/* Variables and functions */
char *jsonTopoAddDevice(char *, char *, char *, char *, int /*<<< orphan*/);
char *jsonTopoAddLamp(char *mac, char *name, char *type) {
  return (jsonTopoAddDevice("lmp", mac, name, type, 0));
}


x86 assembly (clang, -O0):
<jsonTopoAddLamp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rdi
xor    %r8d,%r8d
call   1030 <jsonTopoAddDevice@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<jsonTopoAddLamp>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
xor    %r8d,%r8d
jmp    1030 <jsonTopoAddDevice@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"lmp\00"
define i8* @jsonTopoAddLamp(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call i8* @jsonTopoAddDevice(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %9, i32 0)
ret i8* %10
}

LLVM IR (-O2):
@.str = [4 x i8] c"lmp\00"
define i8* @jsonTopoAddLamp(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @jsonTopoAddDevice(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2, i32 0)
ret i8* %4
}
int device_reset(struct device *dev) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.device = type opaque
define i32 @device_reset(%struct.device* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int age(int n);
  printf("No.5,age:%d\n", age(5));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x5,%edi
call   1040 <age@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x5,%edi
call   1040 <age@plt>
lea    0xece(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [13 x i8] c"No.5,age:%d\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @age(i32 5)
%3 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %2)
ret i32 0
}

LLVM IR (-O2):
@.str = [13 x i8] c"No.5,age:%d\0A\00"
define i32 @main() {
%1 = tail call i32 @age(i32 5)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putint(int);
int main() {
  int n = 123456;
  putint(n);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1e240,%edi
call   1030 <putint@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @putint(i32 123456)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int /*<<< orphan*/ printf(char *, char, char);
int main() {
  float i = 0x0102;
  char *p = (char *)&i;
  printf("Bytes of i: %d, %d\n", p[0], p[1]);
  assert(p[0] == 0);
  assert(p[1] == 0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  0xed0(%rip),%xmm0
movss  %xmm0,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
lea    0xeb6(%rip),%rdi
movsbl %cl,%esi
movsbl 0x1(%rax),%edx
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [20 x i8] c"Bytes of i: %d, %d\0A\00"
define i32 @main() {
%1 = alloca float
%2 = alloca i8*
store float 2.580000e+02, float* %1
%3 = bitcast float* %1 to i8*
store i8* %3, i8** %2
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
%6 = load i8, i8* %5
%7 = load i8*, i8** %2
%8 = getelementptr inbounds i8, i8* %7, i64 1
%9 = load i8, i8* %8
%10 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 signext %6, i8 signext %9)
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i64 0
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i32
%17 = call i32 @assert(i32 %16)
%18 = load i8*, i8** %2
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %19
%21 = sext i8 %20 to i32
%22 = icmp eq i32 %21, 0
%23 = zext i1 %22 to i32
%24 = call i32 @assert(i32 %23)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"Bytes of i: %d, %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8 signext 0, i8 signext 0)
%2 = tail call i32 @assert(i32 1)
%3 = tail call i32 @assert(i32 1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ glmXor3v(int *, int *, int const *);
void glmXor3v_(bool x[3], const bool y[3]) { glmXor3v(x, x, y); }


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

x86 assembly (clang, -O2):
<glmXor3v_>:
mov    %rsi,%rdx
mov    %rdi,%rsi
jmp    1030 <glmXor3v@plt>

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

LLVM IR (-O2):
define void @glmXor3v_(i32* %0, i32* %1) {
%3 = tail call i32 @glmXor3v(i32* %0, i32* %0, i32* %1)
ret void
}
char *hash_plugin_detailed(void) {
  return ("osxlion - MacOSX Lion system passwords plugin\n"
          "------------------------\n"
          "Use this module to crack simple macosx lion hashes\n"
          "Input should be in form: \'user:hash\' or just \'hash\'\n"
          "Known software that uses this password hashing method:\n"
          "MacOSX Lion.\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [288 x i8] c"osxlion - MacOSX Lion system passwords plugin\0A------------------------\0AUse this module to crack simple macosx lion hashes\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0AMacOSX Lion.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([288 x i8], [288 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [288 x i8] c"osxlion - MacOSX Lion system passwords plugin\0A------------------------\0AUse this module to crack simple macosx lion hashes\0AInput should be in form: 'user:hash' or just 'hash'\0AKnown software that uses this password hashing method:\0AMacOSX Lion.\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([288 x i8], [288 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
scalar_t__ _hypot(float, float);
float hypotf(float x, float y) { return (float)_hypot(x, y); }


x86 assembly (clang, -O0):
<hypotf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
call   1030 <_hypot@plt>
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hypotf>:
push   %rax
call   1030 <_hypot@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @hypotf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call i64 @_hypot(float %5, float %6)
%8 = sitofp i64 %7 to float
ret float %8
}

LLVM IR (-O2):
define float @hypotf(float %0, float %1) {
%3 = tail call i64 @_hypot(float %0, float %1)
%4 = sitofp i64 %3 to float
ret float %4
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ p264_pixel_avg_weight_w8_mmxext(int /*<<< orphan*/ *, int,
                                                   int /*<<< orphan*/ *, int,
                                                   int, int);
void p264_pixel_avg_weight_8x4_mmxext(uint8_t *dst, int i_dst, uint8_t *src,
                                      int i_src, int i_weight_dst) {
  p264_pixel_avg_weight_w8_mmxext(dst, i_dst, src, i_src, i_weight_dst, 4);
}


x86 assembly (clang, -O0):
<p264_pixel_avg_weight_8x4_mmxext>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8d,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x20(%rbp),%r8d
mov    $0x4,%r9d
call   1030 <p264_pixel_avg_weight_w8_mmxext@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p264_pixel_avg_weight_8x4_mmxext>:
mov    $0x4,%r9d
jmp    1030 <p264_pixel_avg_weight_w8_mmxext@plt>

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

LLVM IR (-O2):
define void @p264_pixel_avg_weight_8x4_mmxext(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4) {
%6 = tail call i32 @p264_pixel_avg_weight_w8_mmxext(i32* %0, i32 %1, i32* %2, i32 %3, i32 %4, i32 4)
ret void
}
void vlan_gvrp_uninit_applicant(struct net_device *dev) {}


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

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

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

LLVM IR (-O2):
%struct.net_device = type opaque
define void @vlan_gvrp_uninit_applicant(%struct.net_device* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ isspace(char);
int empty(char *line) {
  char *p;
  for (p = line; *p; p++)
    if (!isspace(*p))
      return (0);
  return (1);
}


x86 assembly (clang, -O0):
<empty>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
cmpb   $0x0,(%rax)
je     1168 <empty+0x58>
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isspace@plt>
cmp    $0x0,%eax
jne    1152 <empty+0x42>
movl   $0x0,-0x4(%rbp)
jmp    116f <empty+0x5f>
jmp    1157 <empty+0x47>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
jmp    1124 <empty+0x14>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114b <empty+0x3b>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <isspace@plt>
test   %eax,%eax
je     1149 <empty+0x39>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <empty+0x20>
jmp    114b <empty+0x3b>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @empty(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
store i8* %5, i8** %4
br label %6
6: ; preds = %17, %1
%7 = load i8*, i8** %4
%8 = load i8, i8* %7
%9 = icmp ne i8 %8, 0
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i8*, i8** %4
%12 = load i8, i8* %11
%13 = call i32 @isspace(i8 signext %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %10
store i32 0, i32* %2
br label %21
16: ; preds = %10
br label %17
17: ; preds = %16
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %4
br label %6
20: ; preds = %6
store i32 1, i32* %2
br label %21
21: ; preds = %20, %15
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
define i32 @empty(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i32 @isspace(i8 signext %8)
%11 = icmp eq i32 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ checkMicroInterpenCircle();
int /*<<< orphan*/ checkMicroInterpenPolygon();
void checkMicroInterpen(void) {
  checkMicroInterpenPolygon();
  checkMicroInterpenCircle();
}


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

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

LLVM IR (-O0):
define void @checkMicroInterpen() {
%1 = call i32 (...) @checkMicroInterpenPolygon()
%2 = call i32 (...) @checkMicroInterpenCircle()
ret void
}

LLVM IR (-O2):
define void @checkMicroInterpen() {
%1 = tail call i32 (...) @checkMicroInterpenPolygon()
%2 = tail call i32 (...) @checkMicroInterpenCircle()
ret void
}
int main() { int x$1 = 29; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void main() {
  char str[80], *p = str;
  int (*fun)();
  int getlen(char *);
  fun = getlen;
  printf("Enter a string:\n");
  scanf("%s", p);
  p = str;
  printf("The length of string:%d", (*fun)(p));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    0x2ec1(%rip),%rax
mov    %rax,-0x60(%rbp)
lea    0xebe(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x58(%rbp),%rsi
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    -0x50(%rbp),%rax
mov    %rax,-0x58(%rbp)
mov    -0x60(%rbp),%rcx
mov    -0x58(%rbp),%rdi
mov    $0x0,%al
call   *%rcx
mov    %eax,%esi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x50,%rsp
lea    0xecf(%rip),%rdi
call   1030 <puts@plt>
lea    0xea8(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <scanf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <getlen@plt>
lea    0xe8d(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x50,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Enter a string:\0A\00"
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [24 x i8] c"The length of string:%d\00"
define void @main() {
%1 = alloca [80 x i8]
%2 = alloca i8*
%3 = alloca i32 (...)*
%4 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
store i8* %4, i8** %2
store i32 (...)* bitcast (i32 (i8*)* @getlen to i32 (...)*), i32 (...)** %3
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%6 = load i8*, i8** %2
%7 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %6)
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
store i8* %8, i8** %2
%9 = load i32 (...)*, i32 (...)** %3
%10 = load i8*, i8** %2
%11 = bitcast i32 (...)* %9 to i32 (i8*, ...)*
%12 = call i32 (i8*, ...) %11(i8* %10)
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %12)
ret void
}

LLVM IR (-O2):
@.str.1 = [3 x i8] c"%s\00"
@.str.2 = [24 x i8] c"The length of string:%d\00"
@str = [16 x i8] c"Enter a string:\00"
define void @main() {
%1 = alloca [80 x i8]
%2 = getelementptr inbounds [80 x i8], [80 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
%4 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* %2)
%5 = call i32 (i8*, ...) bitcast (i32 (i8*)* @getlen to i32 (i8*, ...)*)(i8* %2)
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ stderr;
void usage(char *argv0, int code) {
  fprintf(stderr, "Usage: %s [-V]\n", argv0);
  fprintf(stderr, "\t-V            display version number and exit\n");
  exit(code);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xebd(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e8f(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0xc(%rbp),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %rdi,%rdx
mov    0x2eb0(%rip),%r14
mov    (%r14),%edi
lea    0xec6(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    (%r14),%edi
lea    0xec5(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %ebx,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [16 x i8] c"Usage: %s [-V]\0A\00"
@.str.1 = [48 x i8] c"\09-V display version number and exit\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* @stderr
%6 = load i8*, i8** %3
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%10 = load i32, i32* %4
%11 = call i32 @exit(i32 %10)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [16 x i8] c"Usage: %s [-V]\0A\00"
@.str.1 = [48 x i8] c"\09-V display version number and exit\0A\00"
define void @usage(i8* %0, i32 %1) {
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, ...) @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, ...) @fprintf(i32 %5, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.1, i64 0, i64 0))
%7 = tail call i32 @exit(i32 %1)
unreachable
}
/* Variables and functions */
char *__stdio_gets(char *);
char *gets(char *buf) {
  char *p = __stdio_gets(buf);
  return p;
}


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

x86 assembly (clang, -O2):
<gets>:
jmp    1030 <__stdio_gets@plt>

LLVM IR (-O0):
define i8* @gets(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i8* @__stdio_gets(i8* %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
ret i8* %6
}

LLVM IR (-O2):
define i8* @gets(i8* %0) {
%2 = tail call i8* @__stdio_gets(i8* %0)
ret i8* %2
}
long RESUME(cat, id)
long *cat, *id;
{ return ((long)resume(*cat, *id)); }


x86 assembly (clang, -O0):
<RESUME>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
mov    $0x0,%al
call   1030 <resume@plt>
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RESUME>:
push   %rax
mov    (%rdi),%rdi
mov    (%rsi),%rsi
xor    %eax,%eax
call   1030 <resume@plt>
cltq
pop    %rcx
ret

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

LLVM IR (-O2):
define i64 @RESUME(i64* nocapture %0, i64* nocapture %1) {
%3 = load i64, i64* %0
%4 = load i64, i64* %1
%5 = tail call i32 (i64, i64, ...) bitcast (i32 (...)* @resume to i32 (i64, i64, ...)*)(i64 %3, i64 %4)
%6 = sext i32 %5 to i64
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void fe_free_2d(void *arr) {
  if (arr != NULL) {
    free(((void **)arr)[0]);
    free(arr);
  }
}


x86 assembly (clang, -O0):
<fe_free_2d>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     113c <fe_free_2d+0x2c>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fe_free_2d>:
test   %rdi,%rdi
je     112a <fe_free_2d+0x1a>
push   %rbx
mov    %rdi,%rbx
mov    (%rdi),%rdi
call   1030 <free@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @fe_free_2d(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %8, label %3
3: ; preds = %1
%4 = bitcast i8* %0 to i8**
%5 = load i8*, i8** %4
%6 = tail call i32 @free(i8* %5)
%7 = tail call i32 @free(i8* %0)
br label %8
8: ; preds = %3, %1
ret void
}
void intermission_tick(void) {}


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

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

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

LLVM IR (-O2):
define void @intermission_tick() {
ret void
}
/* Variables and functions */
int f432(int *);
int f433(int *p) { return f432(p); }


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

x86 assembly (clang, -O2):
<f433>:
jmp    1030 <f432@plt>

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

LLVM IR (-O2):
define i32 @f433(i32* %0) {
%2 = tail call i32 @f432(i32* %0)
ret i32 %2
}
int main(int argv, char **args) {
  int i = 0;
  ({
    char __dummy;
    typeof(i) __dummy2;
    (void)(&__dummy == &__dummy2);
    1;
  });
  return 0;
}


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

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8
%8 = alloca i32
%9 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%10 = bitcast i32* %8 to i8*
%11 = icmp eq i8* %7, %10
%12 = zext i1 %11 to i32
store i32 1, i32* %9
%13 = load i32, i32* %9
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int SerialAPI_request(unsigned char *, int);
int ZW_RequestNodeInfo(int id) {
  unsigned char buf[255];
  buf[0] = 0x00;
  buf[1] = 0x60;
  buf[2] = id;
  return SerialAPI_request(buf, 3);
}


x86 assembly (clang, -O0):
<ZW_RequestNodeInfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %edi,-0x4(%rbp)
movb   $0x0,-0x110(%rbp)
movb   $0x60,-0x10f(%rbp)
mov    -0x4(%rbp),%eax
mov    %al,-0x10e(%rbp)
lea    -0x110(%rbp),%rdi
mov    $0x3,%esi
call   1030 <SerialAPI_request@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ZW_RequestNodeInfo>:
sub    $0x108,%rsp
movw   $0x6000,(%rsp)
mov    %dil,0x2(%rsp)
mov    %rsp,%rdi
mov    $0x3,%esi
call   1030 <SerialAPI_request@plt>
add    $0x108,%rsp
ret

LLVM IR (-O0):
define i32 @ZW_RequestNodeInfo(i32 %0) {
%2 = alloca i32
%3 = alloca [255 x i8]
store i32 %0, i32* %2
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
store i8 0, i8* %4
%5 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 1
store i8 96, i8* %5
%6 = load i32, i32* %2
%7 = trunc i32 %6 to i8
%8 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 2
store i8 %7, i8* %8
%9 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
%10 = call i32 @SerialAPI_request(i8* %9, i32 3)
ret i32 %10
}

LLVM IR (-O2):
define i32 @ZW_RequestNodeInfo(i32 %0) {
%2 = alloca [255 x i8]
%3 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 0
store i8 0, i8* %3
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 1
store i8 96, i8* %4
%5 = trunc i32 %0 to i8
%6 = getelementptr inbounds [255 x i8], [255 x i8]* %2, i64 0, i64 2
store i8 %5, i8* %6
%7 = call i32 @SerialAPI_request(i8* %3, i32 3)
ret i32 %7
}
unsigned long long int rnd32(unsigned long long int x) {
  if (x == 0) {
    x = 1;
  } else {
    x ^= x << 13 & 0xffffffffULL;
    x ^= x >> 17 & 0xffffffffULL;
    x ^= x << 5 & 0xffffffffULL;
    if (x == 1)
      x = 0;
  }
  return x;
}


x86 assembly (clang, -O0):
<rnd32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    1120 <rnd32+0x20>
movq   $0x1,-0x8(%rbp)
jmp    118f <rnd32+0x8f>
mov    -0x8(%rbp),%rax
shl    $0xd,%rax
movabs $0xffffffff,%rcx
and    %rcx,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shr    $0x11,%rax
movabs $0xffffffff,%rcx
and    %rcx,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x5,%rax
movabs $0xffffffff,%rcx
and    %rcx,%rax
xor    -0x8(%rbp),%rax
mov    %rax,-0x8(%rbp)
cmpq   $0x1,-0x8(%rbp)
jne    118a <rnd32+0x8a>
movq   $0x0,-0x8(%rbp)
jmp    118f <rnd32+0x8f>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rnd32>:
test   %rdi,%rdi
je     112c <rnd32+0x2c>
mov    %edi,%eax
shl    $0xd,%eax
xor    %rdi,%rax
mov    %rax,%rcx
shr    $0x11,%rcx
mov    %ecx,%ecx
xor    %rax,%rcx
mov    %ecx,%edx
shl    $0x5,%edx
xor    %rcx,%rdx
xor    %eax,%eax
cmp    $0x1,%rdx
cmovne %rdx,%rax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i64 @rnd32(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
store i64 1, i64* %2
br label %26
6: ; preds = %1
%7 = load i64, i64* %2
%8 = shl i64 %7, 13
%9 = and i64 %8, 4294967295
%10 = load i64, i64* %2
%11 = xor i64 %10, %9
store i64 %11, i64* %2
%12 = load i64, i64* %2
%13 = lshr i64 %12, 17
%14 = and i64 %13, 4294967295
%15 = load i64, i64* %2
%16 = xor i64 %15, %14
store i64 %16, i64* %2
%17 = load i64, i64* %2
%18 = shl i64 %17, 5
%19 = and i64 %18, 4294967295
%20 = load i64, i64* %2
%21 = xor i64 %20, %19
store i64 %21, i64* %2
%22 = load i64, i64* %2
%23 = icmp eq i64 %22, 1
br i1 %23, label %24, label %25
24: ; preds = %6
store i64 0, i64* %2
br label %25
25: ; preds = %24, %6
br label %26
26: ; preds = %25, %5
%27 = load i64, i64* %2
ret i64 %27
}

LLVM IR (-O2):
define i64 @rnd32(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = shl i64 %0, 13
%5 = and i64 %4, 4294959104
%6 = xor i64 %5, %0
%7 = lshr i64 %6, 17
%8 = and i64 %7, 4294967295
%9 = xor i64 %8, %6
%10 = shl i64 %9, 5
%11 = and i64 %10, 4294967264
%12 = xor i64 %11, %9
%13 = icmp eq i64 %12, 1
%14 = select i1 %13, i64 0, i64 %12
br label %15
15: ; preds = %1, %3
%16 = phi i64 [ %14, %3 ], [ 1, %1 ]
ret i64 %16
}
/* Variables and functions */
int /*<<< orphan*/ CILK_MB();
void Cilk_membar_StoreLoad(void) { CILK_MB(); }


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

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

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

LLVM IR (-O2):
define void @Cilk_membar_StoreLoad() {
%1 = tail call i32 (...) @CILK_MB()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void help14(void) {
  printf("  t                 show TLB contents\n");
  printf("  t  <i>            show TLB contents at <i>\n");
  printf("  t  <i> p <data>   set TLB contents at <i> to page <data>\n");
  printf("  t  <i> f <data>   set TLB contents at <i> to frame <data>\n");
}


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

x86 assembly (clang, -O2):
<help14>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
lea    0xf02(%rip),%rdi
call   1030 <puts@plt>
lea    0xf23(%rip),%rdi
call   1030 <puts@plt>
lea    0xf52(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [39 x i8] c" t show TLB contents\0A\00"
@.str.1 = [46 x i8] c" t <i> show TLB contents at <i>\0A\00"
@.str.2 = [60 x i8] c" t <i> p <data> set TLB contents at <i> to page <data>\0A\00"
@.str.3 = [61 x i8] c" t <i> f <data> set TLB contents at <i> to frame <data>\0A\00"
define void @help14() {
%1 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([46 x i8], [46 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [38 x i8] c" t show TLB contents\00"
@str.4 = [45 x i8] c" t <i> show TLB contents at <i>\00"
@str.5 = [59 x i8] c" t <i> p <data> set TLB contents at <i> to page <data>\00"
@str.6 = [60 x i8] c" t <i> f <data> set TLB contents at <i> to frame <data>\00"
define void @help14() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([45 x i8], [45 x i8]* @str.4, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @str.5, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @str.6, i64 0, i64 0))
ret void
}
int main() {
  int a;
  a = 5;
  int b;
  b = 5;
  return a << b;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x5,-0x8(%rbp)
movl   $0x5,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
pop    %rbp
ret

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

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

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

/* Variables and functions */
int /*<<< orphan*/ IPPROTO_TCP;
int /*<<< orphan*/ TCP_NODELAY;
scalar_t__ setsockopt(int, int /*<<< orphan*/, int /*<<< orphan*/, int *, int);
int _nxweb_setup_client_socket(int fd) {
  int nodelay = 1;
  if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &nodelay, sizeof(nodelay)))
    return -1;
  return 0;
}


x86 assembly (clang, -O0):
<_nxweb_setup_client_socket>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
movl   $0x1,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
mov    0x2eb3(%rip),%rax
mov    (%rax),%edx
lea    -0xc(%rbp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
cmp    $0x0,%rax
je     115c <_nxweb_setup_client_socket+0x4c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <_nxweb_setup_client_socket+0x53>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_nxweb_setup_client_socket>:
push   %rax
movl   $0x1,0x4(%rsp)
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
mov    0x2ebf(%rip),%rax
mov    (%rax),%edx
lea    0x4(%rsp),%rcx
mov    $0x4,%r8d
call   1030 <setsockopt@plt>
neg    %rax
sbb    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@IPPROTO_TCP = global i32 0
@TCP_NODELAY = global i32 0
define i32 @_nxweb_setup_client_socket(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 1, i32* %2
%4 = load i32, i32* @IPPROTO_TCP
%5 = load i32, i32* @TCP_NODELAY
%6 = call i64 @setsockopt(i32 %0, i32 %4, i32 %5, i32* %2, i32 4)
%7 = icmp ne i64 %6, 0
%8 = sext i1 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ ls(char const *, int);
void lsdel_command(const char *dir) { ls(dir, 1); }


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

x86 assembly (clang, -O2):
<lsdel_command>:
mov    $0x1,%esi
jmp    1030 <ls@plt>

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

LLVM IR (-O2):
define void @lsdel_command(i8* %0) {
%2 = tail call i32 @ls(i8* %0, i32 1)
ret void
}
void a(void) { 0; }


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

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

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

LLVM IR (-O2):
define void @a() {
ret void
}
void glUniform3uiv(void) { return; }


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

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

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

LLVM IR (-O2):
define void @glUniform3uiv() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ moveZeroes(int *, int);
int /*<<< orphan*/ show(int *, int);
int main() {
  int nums[] = {6, 2, 5, 0, 6, 0, 9};
  moveZeroes(nums, 7);
  show(nums, 7);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec4(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    0xec2(%rip),%eax
mov    %eax,-0x8(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x7,%esi
call   1030 <moveZeroes@plt>
lea    -0x20(%rbp),%rdi
mov    $0x7,%esi
call   1040 <show@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
movups 0xee0(%rip),%xmm0
movups %xmm0,0xc(%rsp)
movaps 0xec8(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x7,%esi
call   1030 <moveZeroes@plt>
mov    %rbx,%rdi
mov    $0x7,%esi
call   1040 <show@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.nums = [7 x i32] [i32 6, i32 2, i32 5, i32 0, i32 6, i32 0, i32 9]
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i32]
store i32 0, i32* %1
%3 = bitcast [7 x i32]* %2 to i8*
%4 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%5 = call i32 @moveZeroes(i32* %4, i32 7)
%6 = getelementptr inbounds [7 x i32], [7 x i32]* %2, i64 0, i64 0
%7 = call i32 @show(i32* %6, i32 7)
ret i32 0
}

LLVM IR (-O2):
@__const.main.nums = [7 x i32] [i32 6, i32 2, i32 5, i32 0, i32 6, i32 0, i32 9]
define i32 @main() {
%1 = alloca [7 x i32]
%2 = bitcast [7 x i32]* %1 to i8*
%3 = getelementptr inbounds [7 x i32], [7 x i32]* %1, i64 0, i64 0
%4 = call i32 @moveZeroes(i32* %3, i32 7)
%5 = call i32 @show(i32* %3, i32 7)
ret i32 0
}
void dlsym() {}


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

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

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

LLVM IR (-O2):
define void @dlsym() {
ret void
}
/* Type definitions */
struct surface_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ surface_fill(struct surface_t const *, int /*<<< orphan*/);
void surface_clear(const struct surface_t *surface) {
  surface_fill(surface, 0);
}


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

x86 assembly (clang, -O2):
<surface_clear>:
xor    %esi,%esi
jmp    1030 <surface_fill@plt>

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

LLVM IR (-O2):
%struct.surface_t = type { i32 }
define void @surface_clear(%struct.surface_t* %0) {
%2 = tail call i32 @surface_fill(%struct.surface_t* %0, i32 0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
uint64_t uint64min(uint64_t a, uint64_t b) { return a < b ? a : b; }


x86 assembly (clang, -O0):
<uint64min>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <uint64min+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <uint64min+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<uint64min>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @uint64min(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp slt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @uint64min(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
unsigned int jdb_hash(const char *key) {
  if (!key) {
    return 0;
  }
  unsigned int hash = 5381;
  unsigned int c;
  while ((c = *key++))
    hash = ((hash << 5) + hash) + (unsigned int)c;
  return hash;
}


x86 assembly (clang, -O0):
<jdb_hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    111f <jdb_hash+0x1f>
movl   $0x0,-0x4(%rbp)
jmp    115e <jdb_hash+0x5e>
movl   $0x1505,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
je     1158 <jdb_hash+0x58>
mov    -0x14(%rbp),%eax
shl    $0x5,%eax
add    -0x14(%rbp),%eax
add    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
jmp    1126 <jdb_hash+0x26>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jdb_hash>:
test   %rdi,%rdi
je     1138 <jdb_hash+0x38>
mov    (%rdi),%cl
test   %cl,%cl
je     113b <jdb_hash+0x3b>
add    $0x1,%rdi
mov    $0x1505,%edx
mov    %edx,%eax
cs nopw 0x0(%rax,%rax,1)
movsbl %cl,%ecx
shl    $0x5,%eax
add    %edx,%eax
add    %ecx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
mov    %eax,%edx
test   %cl,%cl
jne    1120 <jdb_hash+0x20>
ret
xor    %eax,%eax
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i32 @jdb_hash(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %16, label %3
3: ; preds = %1
%4 = load i8, i8* %0
%5 = icmp eq i8 %4, 0
br i1 %5, label %16, label %6
6: ; preds = %3, %6
%7 = phi i8 [ %14, %6 ], [ %4, %3 ]
%8 = phi i32 [ %13, %6 ], [ 5381, %3 ]
%9 = phi i8* [ %11, %6 ], [ %0, %3 ]
%10 = sext i8 %7 to i32
%11 = getelementptr inbounds i8, i8* %9, i64 1
%12 = mul i32 %8, 33
%13 = add i32 %12, %10
%14 = load i8, i8* %11
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %6
16: ; preds = %6, %3, %1
%17 = phi i32 [ 0, %1 ], [ 5381, %3 ], [ %13, %6 ]
ret i32 %17
}
/* Variables and functions */
int /*<<< orphan*/ hanoi(int, char *, char *, char *);
int main(void) {
  int n = 64;
  hanoi(n, "A", "B", "C");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rsi
lea    0xee3(%rip),%rdx
lea    0xede(%rip),%rcx
mov    $0x40,%edi
call   1030 <hanoi@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"B\00"
@.str.2 = [2 x i8] c"C\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 64, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @hanoi(i32 %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [2 x i8] c"A\00"
@.str.1 = [2 x i8] c"B\00"
@.str.2 = [2 x i8] c"C\00"
define i32 @main() {
%1 = tail call i32 @hanoi(i32 64, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}