xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ assert_int_equal(int, int /*<<< orphan*/);
int /*<<< orphan*/ w_any_lever(int, int);
void w_any_lever_test(void **state) {
  assert_int_equal(0x0000000004000000ul,
                   w_any_lever(0x000000000C000000ul, 0x0000000A00000000ul));
}


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

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

LLVM IR (-O0):
define void @w_any_lever_test(i8** %0) {
%2 = alloca i8**
store i8** %0, i8*** %2
%3 = call i32 @w_any_lever(i32 201326592, i32 0)
%4 = call i32 @assert_int_equal(i32 67108864, i32 %3)
ret void
}

LLVM IR (-O2):
define void @w_any_lever_test(i8** nocapture readnone %0) {
%2 = tail call i32 @w_any_lever(i32 201326592, i32 0)
%3 = tail call i32 @assert_int_equal(i32 67108864, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memSwapChar(char *, int /*<<< orphan*/, char, char);
int /*<<< orphan*/ strlen(char *);
void undosPath(char *path) {
  (void)memSwapChar((path), strlen(path), ('\\'), ('/'));
}


x86 assembly (clang, -O0):
<undosPath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
mov    $0x5c,%edx
mov    $0x2f,%ecx
call   1040 <memSwapChar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<undosPath>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
mov    $0x5c,%edx
mov    $0x2f,%ecx
pop    %rbx
jmp    1040 <memSwapChar@plt>

LLVM IR (-O0):
define void @undosPath(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @strlen(i8* %4)
%6 = call i32 @memSwapChar(i8* %3, i32 %5, i8 signext 92, i8 signext 47)
ret void
}

LLVM IR (-O2):
define void @undosPath(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i32 @memSwapChar(i8* %0, i32 %2, i8 signext 92, i8 signext 47)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void amaret_local_A1_makeOutput__E() { printf("Pin.makeOutput\n"); }


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

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

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

LLVM IR (-O2):
@str = [15 x i8] c"Pin.makeOutput\00"
define void @amaret_local_A1_makeOutput__E() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @str, i64 0, i64 0))
ret void
}
int fls(int x) {
  int r;
  asm("bsrl %1,%0\n\t"
      "jnz 1f\n\t"
      "movl $-1,%0\n"
      "1:"
      : "=r"(r)
      : "rm"(x));
  return r + 1;
}


x86 assembly (clang, -O0):
<fls>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
bsr    -0xc(%rbp),%eax
jne    111c <fls+0x1c>
mov    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fls>:
mov    %edi,-0x4(%rsp)
bsr    -0x4(%rsp),%eax
jne    1110 <fls+0x10>
mov    $0xffffffff,%eax
add    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @fls(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 asm "bsrl $1,$0\0A\09jnz 1f\0A\09movl $$-1,$0\0A1:", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i32 %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 1
ret i32 %7
}

LLVM IR (-O2):
define i32 @fls(i32 %0) {
%2 = tail call i32 asm "bsrl $1,$0\0A\09jnz 1f\0A\09movl $$-1,$0\0A1:", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i32 %0)
%3 = add nsw i32 %2, 1
ret i32 %3
}
float filter_rect(float k, float r, float w) { return (k > r) ? 0.f : 1.f; }


x86 assembly (clang, -O0):
<filter_rect>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0x8(%rbp),%xmm0
xorps  %xmm3,%xmm3
movss  0xed8(%rip),%xmm2
cmpltss %xmm1,%xmm0
movaps %xmm0,%xmm1
andps  %xmm3,%xmm1
andnps %xmm2,%xmm0
orps   %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<filter_rect>:
cmpltss %xmm0,%xmm1
movss  0xef3(%rip),%xmm0
andnps %xmm0,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @filter_rect(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = load float, float* %5
%9 = fcmp ogt float %7, %8
%10 = zext i1 %9 to i64
%11 = select i1 %9, float 0.000000e+00, float 1.000000e+00
ret float %11
}

LLVM IR (-O2):
define float @filter_rect(float %0, float %1, float %2) {
%4 = fcmp ogt float %0, %1
%5 = select i1 %4, float 0.000000e+00, float 1.000000e+00
ret float %5
}
char *grskip(p, c)
register char *p;
register c;
{
  while (*p && *p != c)
    ++p;
  if (*p)
    *p++ = 0;
  return (p);
}


x86 assembly (clang, -O0):
<grskip>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xd(%rbp)
je     1130 <grskip+0x30>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    -0xc(%rbp),%eax
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
test   $0x1,%al
jne    1140 <grskip+0x40>
jmp    1151 <grskip+0x51>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110b <grskip+0xb>
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1170 <grskip+0x70>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<grskip>:
mov    %rdi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movsbl (%rax),%ecx
add    $0x1,%rax
test   %ecx,%ecx
je     111f <grskip+0x1f>
cmp    %esi,%ecx
jne    1110 <grskip+0x10>
lea    -0x1(%rax),%rdx
test   %cl,%cl
je     112b <grskip+0x2b>
movb   $0x0,(%rdx)
ret
mov    %rdx,%rax
ret

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

LLVM IR (-O2):
define i8* @grskip(i8* %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %10, %3 ]
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = sext i8 %5 to i32
%8 = icmp eq i32 %7, %1
%9 = or i1 %6, %8
%10 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %9, label %11, label %3
11: ; preds = %3
br i1 %6, label %13, label %12
12: ; preds = %11
store i8 0, i8* %4
br label %13
13: ; preds = %12, %11
%14 = phi i8* [ %10, %12 ], [ %4, %11 ]
ret i8* %14
}
/* Variables and functions */
unsigned strlen(const char *s) {
  unsigned length = 0;
  while (*s++ != '\0')
    length++;
  return length;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1138 <strlen+0x38>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <strlen+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @strlen(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1, %4
%5 = phi i32 [ %8, %4 ], [ 0, %1 ]
%6 = phi i8* [ %7, %4 ], [ %0, %1 ]
%7 = getelementptr inbounds i8, i8* %6, i64 1
%8 = add i32 %5, 1
%9 = load i8, i8* %7
%10 = icmp eq i8 %9, 0
br i1 %10, label %11, label %4
11: ; preds = %4, %1
%12 = phi i32 [ 0, %1 ], [ %8, %4 ]
ret i32 %12
}
long long recursive(long long a, long long b) {
  if (a > b)
    return recursive(a - b, b) * 2;
  if (a < b)
    return recursive(b, a) + 1;
  return 1;
}


x86 assembly (clang, -O0):
<recursive>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jle    114c <recursive+0x3c>
mov    -0x10(%rbp),%rdi
sub    -0x18(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <recursive@plt>
shl    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    117c <recursive+0x6c>
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jge    1174 <recursive+0x64>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <recursive@plt>
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    117c <recursive+0x6c>
movq   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recursive>:
push   %rbx
mov    %rdi,%rax
cmp    %rsi,%rdi
jle    1123 <recursive+0x13>
xor    %ebx,%ebx
mov    %rax,%rdi
mov    %rsi,%rax
jmp    112d <recursive+0x1d>
mov    $0x1,%ebx
mov    %rsi,%rdi
jge    113c <recursive+0x2c>
sub    %rax,%rdi
mov    %rax,%rsi
call   1030 <recursive@plt>
lea    (%rbx,%rax,2),%rbx
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i64 @recursive(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
%6 = load i64, i64* %4
%7 = load i64, i64* %5
%8 = icmp sgt i64 %6, %7
br i1 %8, label %9, label %16
9: ; preds = %2
%10 = load i64, i64* %4
%11 = load i64, i64* %5
%12 = sub nsw i64 %10, %11
%13 = load i64, i64* %5
%14 = call i64 @recursive(i64 %12, i64 %13)
%15 = mul nsw i64 %14, 2
store i64 %15, i64* %3
br label %26
16: ; preds = %2
%17 = load i64, i64* %4
%18 = load i64, i64* %5
%19 = icmp slt i64 %17, %18
br i1 %19, label %20, label %25
20: ; preds = %16
%21 = load i64, i64* %5
%22 = load i64, i64* %4
%23 = call i64 @recursive(i64 %21, i64 %22)
%24 = add nsw i64 %23, 1
store i64 %24, i64* %3
br label %26
25: ; preds = %16
store i64 1, i64* %3
br label %26
26: ; preds = %25, %20, %9
%27 = load i64, i64* %3
ret i64 %27
}

LLVM IR (-O2):
define i64 @recursive(i64 %0, i64 %1) {
%3 = icmp sgt i64 %0, %1
br i1 %3, label %6, label %14
4: ; preds = %14, %6
%5 = phi i64 [ %13, %6 ], [ 1, %14 ]
ret i64 %5
6: ; preds = %14, %2
%7 = phi i64 [ 0, %2 ], [ 1, %14 ]
%8 = phi i64 [ %0, %2 ], [ %1, %14 ]
%9 = phi i64 [ %1, %2 ], [ %0, %14 ]
%10 = sub nsw i64 %8, %9
%11 = tail call i64 @recursive(i64 %10, i64 %9)
%12 = shl nsw i64 %11, 1
%13 = or i64 %12, %7
br label %4
14: ; preds = %2
%15 = icmp slt i64 %0, %1
br i1 %15, label %6, label %4
}
/* Variables and functions */
int /*<<< orphan*/ d_to_line(unsigned long long, int);
int first_one(int /*<<< orphan*/);
int d_flip_index(int x) { return first_one(d_to_line(1ULL << x, x)); }


x86 assembly (clang, -O0):
<d_flip_index>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    $0x1,%edi
shl    %cl,%rdi
mov    -0x4(%rbp),%esi
call   1030 <d_to_line@plt>
mov    %eax,%edi
call   1040 <first_one@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_flip_index>:
push   %rax
mov    %edi,%ecx
mov    $0x1,%edi
shl    %cl,%rdi
mov    %ecx,%esi
call   1030 <d_to_line@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <first_one@plt>

LLVM IR (-O0):
define i32 @d_flip_index(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = zext i32 %3 to i64
%5 = shl i64 1, %4
%6 = load i32, i32* %2
%7 = call i32 @d_to_line(i64 %5, i32 %6)
%8 = call i32 @first_one(i32 %7)
ret i32 %8
}

LLVM IR (-O2):
define i32 @d_flip_index(i32 %0) {
%2 = zext i32 %0 to i64
%3 = shl nuw i64 1, %2
%4 = tail call i32 @d_to_line(i64 %3, i32 %0)
%5 = tail call i32 @first_one(i32 %4)
ret i32 %5
}
void map_unlock(struct map_ent **melp) {}


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

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

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

LLVM IR (-O2):
%struct.map_ent = type opaque
define void @map_unlock(%struct.map_ent** nocapture %0) {
ret void
}
int test_imm_38int16_mem(short *val) {
  return ((*val) & (-0x38 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_38int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0xffffffc8,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_38int16_mem>:
movzwl (%rdi),%eax
test   $0xffc8,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_38int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, -56
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_38int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -56
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
extern int stbi_is_hdr_from_file(FILE *f) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @stbi_is_hdr_from_file(i32* nocapture readnone %0) {
ret i32 0
}
void g_object_get_property() {}


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

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

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

LLVM IR (-O2):
define void @g_object_get_property() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long time;
};
typedef TYPE_1__ XKeyReleasedEvent;

/* Variables and functions */
void set_XKeyReleasedEvent_time(void *_p, unsigned long _v) {
  ((XKeyReleasedEvent *)_p)->time = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XKeyReleasedEvent_time>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XKeyReleasedEvent_time(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XKeyReleasedEvent_time(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ geteuid();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setresuid(int /*<<< orphan*/, int /*<<< orphan*/,
                             int /*<<< orphan*/);
int /*<<< orphan*/ system(char *);
void catcher(int a) {
  setresuid(geteuid(), geteuid(), geteuid());
  printf("WIN!\n");
  system("/bin/sh");
  exit(0);
}


x86 assembly (clang, -O0):
<catcher>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1060 <geteuid@plt>
mov    %eax,-0xc(%rbp)
mov    $0x0,%al
call   1060 <geteuid@plt>
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1060 <geteuid@plt>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    %eax,%edx
call   1030 <setresuid@plt>
lea    0xe76(%rip),%rdi
call   1050 <printf@plt>
lea    0xe70(%rip),%rdi
call   1040 <system@plt>
xor    %edi,%edi
call   1070 <exit@plt>

x86 assembly (clang, -O2):
<catcher>:
push   %rbp
push   %rbx
push   %rax
xor    %eax,%eax
call   1060 <geteuid@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1060 <geteuid@plt>
mov    %eax,%ebp
xor    %eax,%eax
call   1060 <geteuid@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %eax,%edx
call   1040 <setresuid@plt>
lea    0xe8a(%rip),%rdi
call   1030 <puts@plt>
lea    0xe76(%rip),%rdi
call   1050 <system@plt>
xor    %edi,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"WIN!\0A\00"
@.str.1 = [8 x i8] c"/bin/sh\00"
define void @catcher(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @geteuid()
%4 = call i32 (...) @geteuid()
%5 = call i32 (...) @geteuid()
%6 = call i32 @setresuid(i32 %3, i32 %4, i32 %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%9 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@.str.1 = [8 x i8] c"/bin/sh\00"
@str = [5 x i8] c"WIN!\00"
define void @catcher(i32 %0) {
%2 = tail call i32 (...) @geteuid()
%3 = tail call i32 (...) @geteuid()
%4 = tail call i32 (...) @geteuid()
%5 = tail call i32 @setresuid(i32 %2, i32 %3, i32 %4)
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 @system(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @exit(i32 0)
unreachable
}
int ft_str_is_numeric(char *str) {
  int it;
  it = 0;
  while (str[it]) {
    if (str[it] < '0' || str[it] > '9')
      return (0);
    it++;
  }
  return (1);
}


x86 assembly (clang, -O0):
<ft_str_is_numeric>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1165 <ft_str_is_numeric+0x65>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
jl     114b <ft_str_is_numeric+0x4b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jle    1157 <ft_str_is_numeric+0x57>
movl   $0x0,-0x4(%rbp)
jmp    116c <ft_str_is_numeric+0x6c>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    110f <ft_str_is_numeric+0xf>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_numeric>:
mov    (%rdi),%cl
mov    $0x1,%eax
test   %cl,%cl
je     1123 <ft_str_is_numeric+0x23>
add    $0x1,%rdi
nop
add    $0xc6,%cl
cmp    $0xf5,%cl
jbe    1124 <ft_str_is_numeric+0x24>
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <ft_str_is_numeric+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_str_is_numeric(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %8
4: ; preds = %8
%5 = getelementptr inbounds i8, i8* %0, i64 %13
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
br i1 %7, label %14, label %8
8: ; preds = %1, %4
%9 = phi i64 [ %13, %4 ], [ 0, %1 ]
%10 = phi i8 [ %6, %4 ], [ %2, %1 ]
%11 = add i8 %10, -58
%12 = icmp ult i8 %11, -10
%13 = add nuw i64 %9, 1
br i1 %12, label %14, label %4
14: ; preds = %8, %4, %1
%15 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %8 ]
ret i32 %15
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void free_cvector(unsigned char *v, long nl, long nh) {
  free((void *)(v + nl - 1));
}


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

x86 assembly (clang, -O2):
<free_cvector>:
add    %rsi,%rdi
add    $0xffffffffffffffff,%rdi
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @free_cvector(i8* %0, i64 %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i64
store i8* %0, i8** %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = getelementptr inbounds i8, i8* %7, i64 %8
%10 = getelementptr inbounds i8, i8* %9, i64 -1
%11 = call i32 @free(i8* %10)
ret void
}

LLVM IR (-O2):
define void @free_cvector(i8* nocapture %0, i64 %1, i64 %2) {
%4 = getelementptr inbounds i8, i8* %0, i64 %1
%5 = getelementptr inbounds i8, i8* %4, i64 -1
%6 = tail call i32 @free(i8* %5)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sem_t;

/* Variables and functions */
int /*<<< orphan*/ sem_post(int /*<<< orphan*/ *);
void sem_shop(sem_t *sem_target, int free_seat) {
  int pass;
  for (pass = 0; pass < free_seat; pass++) {
    sem_post(sem_target);
  }
}


x86 assembly (clang, -O0):
<sem_shop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1149 <sem_shop+0x39>
mov    -0x8(%rbp),%rdi
call   1030 <sem_post@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <sem_shop+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sem_shop>:
push   %r14
push   %rbx
push   %rax
test   %esi,%esi
jle    112d <sem_shop+0x1d>
mov    %esi,%ebx
mov    %rdi,%r14
nopl   (%rax)
mov    %r14,%rdi
call   1030 <sem_post@plt>
add    $0xffffffff,%ebx
jne    1120 <sem_shop+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @sem_shop(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 = %13, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %16
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = call i32 @sem_post(i32* %11)
br label %13
13: ; preds = %10
%14 = load i32, i32* %5
%15 = add nsw i32 %14, 1
store i32 %15, i32* %5
br label %6
16: ; preds = %6
ret void
}

LLVM IR (-O2):
define void @sem_shop(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %9
4: ; preds = %2, %4
%5 = phi i32 [ %7, %4 ], [ 0, %2 ]
%6 = tail call i32 @sem_post(i32* %0)
%7 = add nuw nsw i32 %5, 1
%8 = icmp eq i32 %7, %1
br i1 %8, label %9, label %4
9: ; preds = %4, %2
ret void
}
const char *Map_Brief(void) { return "Apply Function to Iterable"; }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"Apply Function to Iterable\00"
define i8* @Map_Brief() {
ret i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [27 x i8] c"Apply Function to Iterable\00"
define i8* @Map_Brief() {
ret i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0)
}
int fun1365() { return 1365; }


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

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

LLVM IR (-O0):
define i32 @fun1365() {
ret i32 1365
}

LLVM IR (-O2):
define i32 @fun1365() {
ret i32 1365
}
/* Variables and functions */
int /*<<< orphan*/ hoc_pushx(int);
int /*<<< orphan*/ hoc_ret();
hoc_fmenu() {
  hoc_ret();
  hoc_pushx(0.);
}


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

x86 assembly (clang, -O2):
<hoc_fmenu>:
push   %rax
xor    %eax,%eax
call   1030 <hoc_ret@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <hoc_pushx@plt>

LLVM IR (-O0):
define i32 @hoc_fmenu() {
%1 = alloca i32
%2 = call i32 (...) @hoc_ret()
%3 = call i32 @hoc_pushx(i32 0)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
define i32 @hoc_fmenu() {
%1 = tail call i32 (...) @hoc_ret()
%2 = tail call i32 @hoc_pushx(i32 0)
ret i32 undef
}
void sa1100_register_uart(int idx, int port) {}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
pop    %rbp
ret

x86 assembly (clang, -O2):
ret

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

LLVM IR (-O2):
define void @sa1100_register_uart(i32 %0, i32 %1) {
ret void
}
/* Type definitions */
typedef int pid_t;

/* Variables and functions */
int getpid();
int /*<<< orphan*/ printf(char *, int);
void main() {
  pid_t pid_01;
  pid_01 = getpid();
  printf("pid is %d\n", pid_01);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xed1(%rip),%rdi
mov    %eax,%esi
pop    %rax
jmp    1040 <printf@plt>

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

LLVM IR (-O2):
@.str = [11 x i8] c"pid is %d\0A\00"
define void @main() {
%1 = tail call i32 (...) @getpid()
%2 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
struct imd_header *imd_next(struct imd_header *imd) {
  int length;
  length = imd_read_length(imd);
  length =
      (((length) + ((typeof(length))(4) - 1)) & ~((typeof(length))(4) - 1));
  length += 8;
  return (void *)imd + length;
}


x86 assembly (clang, -O0):
<imd_next>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <imd_read_length@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x3,%eax
and    $0xfffffffc,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<imd_next>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <imd_read_length@plt>
add    $0xb,%eax
and    $0xfffffffc,%eax
cltq
add    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
%struct.imd_header = type opaque
define %struct.imd_header* @imd_next(%struct.imd_header* %0) {
%2 = alloca %struct.imd_header*
%3 = alloca i32
store %struct.imd_header* %0, %struct.imd_header** %2
%4 = load %struct.imd_header*, %struct.imd_header** %2
%5 = call i32 (%struct.imd_header*, ...) bitcast (i32 (...)* @imd_read_length to i32 (%struct.imd_header*, ...)*)(%struct.imd_header* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = add nsw i32 %6, 3
%8 = and i32 %7, -4
store i32 %8, i32* %3
%9 = load i32, i32* %3
%10 = add nsw i32 %9, 8
store i32 %10, i32* %3
%11 = load %struct.imd_header*, %struct.imd_header** %2
%12 = bitcast %struct.imd_header* %11 to i8*
%13 = load i32, i32* %3
%14 = sext i32 %13 to i64
%15 = getelementptr i8, i8* %12, i64 %14
%16 = bitcast i8* %15 to %struct.imd_header*
ret %struct.imd_header* %16
}

LLVM IR (-O2):
%struct.imd_header = type opaque
define %struct.imd_header* @imd_next(%struct.imd_header* %0) {
%2 = tail call i32 (%struct.imd_header*, ...) bitcast (i32 (...)* @imd_read_length to i32 (%struct.imd_header*, ...)*)(%struct.imd_header* %0)
%3 = add i32 %2, 11
%4 = and i32 %3, -4
%5 = bitcast %struct.imd_header* %0 to i8*
%6 = sext i32 %4 to i64
%7 = getelementptr i8, i8* %5, i64 %6
%8 = bitcast i8* %7 to %struct.imd_header*
ret %struct.imd_header* %8
}
/* Type definitions */
struct sockaddr_in {
  int dummy;
};
struct sockaddr {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int recvfrom(int, char *, int, int /*<<< orphan*/, struct sockaddr *, int *);
int recvUDP(int sockfd, char *recv_packet, int len,
            struct sockaddr_in *udp_addr) {
  int udp_len = sizeof(struct sockaddr_in);
  memset(recv_packet, 0, len);
  return recvfrom(sockfd, recv_packet, len, 0, (struct sockaddr *)udp_addr,
                  &udp_len);
}


x86 assembly (clang, -O0):
<recvUDP>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x4,-0x24(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%edx
xor    %esi,%esi
call   1030 <memset@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
mov    -0x20(%rbp),%r8
xor    %ecx,%ecx
lea    -0x24(%rbp),%r9
call   1040 <recvfrom@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recvUDP>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %edx,%ebp
mov    %rsi,%rbx
mov    %edi,%r15d
movl   $0x4,0x4(%rsp)
mov    %rsi,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
lea    0x4(%rsp),%r9
mov    %r15d,%edi
mov    %rbx,%rsi
mov    %ebp,%edx
xor    %ecx,%ecx
mov    %r14,%r8
call   1040 <recvfrom@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @recvUDP(i32 %0, i8* %1, i32 %2, %struct.sockaddr_in* %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
%8 = alloca %struct.sockaddr_in*
%9 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store %struct.sockaddr_in* %3, %struct.sockaddr_in** %8
store i32 4, i32* %9
%10 = load i8*, i8** %6
%11 = load i32, i32* %7
%12 = call i32 @memset(i8* %10, i32 0, i32 %11)
%13 = load i32, i32* %5
%14 = load i8*, i8** %6
%15 = load i32, i32* %7
%16 = load %struct.sockaddr_in*, %struct.sockaddr_in** %8
%17 = bitcast %struct.sockaddr_in* %16 to %struct.sockaddr*
%18 = call i32 @recvfrom(i32 %13, i8* %14, i32 %15, i32 0, %struct.sockaddr* %17, i32* %9)
ret i32 %18
}

LLVM IR (-O2):
%struct.sockaddr_in = type { i32 }
%struct.sockaddr = type { i32 }
define i32 @recvUDP(i32 %0, i8* %1, i32 %2, %struct.sockaddr_in* %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
store i32 4, i32* %5
%7 = tail call i32 @memset(i8* %1, i32 0, i32 %2)
%8 = bitcast %struct.sockaddr_in* %3 to %struct.sockaddr*
%9 = call i32 @recvfrom(i32 %0, i8* %1, i32 %2, i32 0, %struct.sockaddr* %8, i32* %5)
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ I2C_BurstWrite(int /*<<< orphan*/, int, int, int,
                                  unsigned char *, int);
void WriteCmd(unsigned char cmd) {
  I2C_BurstWrite(0, (0x3C), 0x00, 1, &cmd, 1);
}


x86 assembly (clang, -O0):
<WriteCmd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
xor    %edx,%edx
mov    $0x3c,%esi
mov    $0x1,%r9d
lea    -0x1(%rbp),%r8
mov    %edx,%edi
mov    %r9d,%ecx
call   1030 <I2C_BurstWrite@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<WriteCmd>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0x7(%rsp),%r8
xor    %edi,%edi
mov    $0x3c,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    $0x1,%r9d
call   1030 <I2C_BurstWrite@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @WriteCmd(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @I2C_BurstWrite(i32 0, i32 60, i32 0, i32 1, i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
define void @WriteCmd(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @I2C_BurstWrite(i32 0, i32 60, i32 0, i32 1, i8* %2, i32 1)
ret void
}
int a_twist_f_on_eflip(eflip)
int eflip;
{
  int temp_arr[12];
  a_eflip_unpack(eflip, temp_arr);
  four_cycle(temp_arr, 9, 4, 8, 0);
  adjust_eflip(temp_arr, 9, 4, 8, 0);
  return a_eflip_pack(temp_arr);
}


x86 assembly (clang, -O0):
<a_twist_f_on_eflip>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
lea    -0x40(%rbp),%rsi
mov    $0x0,%al
call   1030 <a_eflip_unpack@plt>
lea    -0x40(%rbp),%rdi
mov    $0x9,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
xor    %r8d,%r8d
mov    $0x0,%al
call   1050 <four_cycle@plt>
lea    -0x40(%rbp),%rdi
mov    $0x9,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
xor    %r8d,%r8d
mov    $0x0,%al
call   1040 <adjust_eflip@plt>
lea    -0x40(%rbp),%rdi
mov    $0x0,%al
call   1060 <a_eflip_pack@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<a_twist_f_on_eflip>:
push   %rbx
sub    $0x30,%rsp
mov    %rsp,%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <a_eflip_unpack@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1050 <four_cycle@plt>
mov    %rbx,%rdi
mov    $0x9,%esi
mov    $0x4,%edx
mov    $0x8,%ecx
xor    %r8d,%r8d
xor    %eax,%eax
call   1040 <adjust_eflip@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <a_eflip_pack@plt>
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @a_twist_f_on_eflip(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i32]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%6 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_eflip_unpack to i32 (i32, i32*, ...)*)(i32 %4, i32* %5)
%7 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%8 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %7, i32 9, i32 4, i32 8, i32 0)
%9 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%10 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @adjust_eflip to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %9, i32 9, i32 4, i32 8, i32 0)
%11 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%12 = call i32 (i32*, ...) bitcast (i32 (...)* @a_eflip_pack to i32 (i32*, ...)*)(i32* %11)
ret i32 %12
}

LLVM IR (-O2):
define i32 @a_twist_f_on_eflip(i32 %0) {
%2 = alloca [12 x i32]
%3 = bitcast [12 x i32]* %2 to i8*
%4 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%5 = call i32 (i32, i32*, ...) bitcast (i32 (...)* @a_eflip_unpack to i32 (i32, i32*, ...)*)(i32 %0, i32* %4)
%6 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @four_cycle to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 9, i32 4, i32 8, i32 0)
%7 = call i32 (i32*, i32, i32, i32, i32, ...) bitcast (i32 (...)* @adjust_eflip to i32 (i32*, i32, i32, i32, i32, ...)*)(i32* %4, i32 9, i32 4, i32 8, i32 0)
%8 = call i32 (i32*, ...) bitcast (i32 (...)* @a_eflip_pack to i32 (i32*, ...)*)(i32* %4)
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(short *, char *, int);
int ntohs(short);
int getNblock(char *datagram) {
  short Nblock;
  char *tmp = datagram;
  tmp += 2;
  memcpy(&Nblock, tmp, sizeof(short));
  return ntohs(Nblock);
}


x86 assembly (clang, -O0):
<getNblock>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    -0xa(%rbp),%rdi
mov    $0x2,%edx
call   1030 <memcpy@plt>
movswl -0xa(%rbp),%edi
call   1040 <ntohs@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getNblock>:
push   %rax
lea    0x2(%rdi),%rsi
lea    0x6(%rsp),%rdi
mov    $0x2,%edx
call   1030 <memcpy@plt>
movswl 0x6(%rsp),%edi
call   1040 <ntohs@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @getNblock(i8* %0) {
%2 = alloca i8*
%3 = alloca i16
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = getelementptr inbounds i8, i8* %6, i64 2
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = call i32 @memcpy(i16* %3, i8* %8, i32 2)
%10 = load i16, i16* %3
%11 = call i32 @ntohs(i16 signext %10)
ret i32 %11
}

LLVM IR (-O2):
define i32 @getNblock(i8* %0) {
%2 = alloca i16
%3 = bitcast i16* %2 to i8*
%4 = getelementptr inbounds i8, i8* %0, i64 2
%5 = call i32 @memcpy(i16* %2, i8* %4, i32 2)
%6 = load i16, i16* %2
%7 = call i32 @ntohs(i16 signext %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void out52(char c) {
  write(1, "\x1b", 1);
  write(1, &c, 1);
}


x86 assembly (clang, -O0):
<out52>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    $0x1,%edx
lea    0xed6(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
mov    $0x1,%edx
lea    -0x1(%rbp),%rsi
mov    %edx,%edi
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<out52>:
push   %rax
mov    %dil,0x7(%rsp)
lea    0xee3(%rip),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
lea    0x7(%rsp),%rsi
mov    $0x1,%edi
mov    $0x1,%edx
call   1030 <write@plt>
pop    %rax
ret

LLVM IR (-O0):
@.str = [2 x i8] c"\1B\00"
define void @out52(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"\1B\00"
define void @out52(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
%4 = call i32 @write(i32 1, i8* %2, i32 1)
ret void
}
int get_option(char **str, int *pint) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @get_option(i8** nocapture readnone %0, i32* nocapture readnone %1) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ memset(char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ perror(char *);
int read(int, char *, int);
int cread(int fd, char *buf, int n) {
  memset(buf, 0, 2000);
  int nread;
  if ((nread = read(fd, buf, n)) < 0) {
    perror("Reading data");
    exit(1);
  }
  return nread;
}


x86 assembly (clang, -O0):
<cread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x7d0,%edx
call   1030 <memset@plt>
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <read@plt>
mov    %eax,-0x18(%rbp)
cmp    $0x0,%eax
jge    1193 <cread+0x53>
lea    0xe7c(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x18(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cread>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
xor    %esi,%esi
mov    $0x7d0,%edx
call   1030 <memset@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1040 <read@plt>
test   %eax,%eax
js     1171 <cread+0x31>
pop    %rbx
pop    %r14
pop    %rbp
ret
lea    0xe88(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"Reading data\00"
define i32 @cread(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = load i8*, i8** %5
%9 = call i32 @memset(i8* %8, i32 0, i32 2000)
%10 = load i32, i32* %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @read(i32 %10, i8* %11, i32 %12)
store i32 %13, i32* %7
%14 = icmp slt i32 %13, 0
br i1 %14, label %15, label %18
15: ; preds = %3
%16 = call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%17 = call i32 @exit(i32 1)
unreachable
18: ; preds = %3
%19 = load i32, i32* %7
ret i32 %19
}

LLVM IR (-O2):
@.str = [13 x i8] c"Reading data\00"
define i32 @cread(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @memset(i8* %1, i32 0, i32 2000)
%5 = tail call i32 @read(i32 %0, i8* %1, i32 %2)
%6 = icmp slt i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i32 @perror(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%9 = tail call i32 @exit(i32 1)
unreachable
10: ; preds = %3
ret i32 %5
}
/* Type definitions */
struct timeval {
  int tv_sec;
  scalar_t__ tv_usec;
};

/* Variables and functions */
int getpid();
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
int /*<<< orphan*/ srand(scalar_t__);
void init_rand() {
  struct timeval time;
  gettimeofday(&time, NULL);
  srand((((time.tv_sec ^ getpid()) * 100003) + time.tv_usec));
}


x86 assembly (clang, -O0):
<init_rand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <gettimeofday@plt>
mov    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%ecx
mov    -0x14(%rbp),%eax
xor    %ecx,%eax
imul   $0x186a3,%eax,%eax
movslq %eax,%rdi
add    -0x8(%rbp),%rdi
call   1050 <srand@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_rand>:
push   %rbx
sub    $0x10,%rsp
mov    %rsp,%rdi
xor    %esi,%esi
call   1040 <gettimeofday@plt>
mov    (%rsp),%ebx
xor    %eax,%eax
call   1030 <getpid@plt>
xor    %ebx,%eax
imul   $0x186a3,%eax,%eax
movslq %eax,%rdi
add    0x8(%rsp),%rdi
add    $0x10,%rsp
pop    %rbx
jmp    1050 <srand@plt>

LLVM IR (-O0):
%struct.timeval = type { i32, i64 }
define void @init_rand() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load i32, i32* %3
%5 = call i32 (...) @getpid()
%6 = xor i32 %4, %5
%7 = mul nsw i32 %6, 100003
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%10 = load i64, i64* %9
%11 = add nsw i64 %8, %10
%12 = call i32 @srand(i64 %11)
ret void
}

LLVM IR (-O2):
%struct.timeval = type { i32, i64 }
define void @init_rand() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load i32, i32* %4
%6 = tail call i32 (...) @getpid()
%7 = xor i32 %6, %5
%8 = mul nsw i32 %7, 100003
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%11 = load i64, i64* %10
%12 = add nsw i64 %11, %9
%13 = tail call i32 @srand(i64 %12)
ret void
}
long long reg_reverse_1(long long x) { return __builtin_bswap64(x); }


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

x86 assembly (clang, -O2):
<reg_reverse_1>:
mov    %rdi,%rax
bswap  %rax
ret

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

LLVM IR (-O2):
define i64 @reg_reverse_1(i64 %0) {
%2 = tail call i64 @llvm.bswap.i64(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ AccelSensorHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void AccelSensorRequestUpdate() { UAVObjRequestUpdate(AccelSensorHandle()); }


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

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

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

LLVM IR (-O2):
define void @AccelSensorRequestUpdate() {
%1 = tail call i32 (...) @AccelSensorHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}