xunge/DecIR huggingface dataset:
void turnright(int *direz) {
  switch (*direz) {
  case 0:
    (*direz) = 1;
    break;
  case 1:
    (*direz) = 2;
    break;
  case 2:
    (*direz) = 3;
    break;
  case 3:
    (*direz) = 0;
    break;
  }
}


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

x86 assembly (clang, -O2):
<turnright>:
movslq (%rdi),%rax
cmp    $0x3,%rax
ja     1115 <turnright+0x15>
lea    0xef0(%rip),%rcx
mov    (%rcx,%rax,4),%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @turnright(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
switch i32 %4, label %13 [
i32 0, label %5
i32 1, label %7
i32 2, label %9
i32 3, label %11
]
5: ; preds = %1
%6 = load i32*, i32** %2
store i32 1, i32* %6
br label %13
7: ; preds = %1
%8 = load i32*, i32** %2
store i32 2, i32* %8
br label %13
9: ; preds = %1
%10 = load i32*, i32** %2
store i32 3, i32* %10
br label %13
11: ; preds = %1
%12 = load i32*, i32** %2
store i32 0, i32* %12
br label %13
13: ; preds = %1, %11, %9, %7, %5
ret void
}

LLVM IR (-O2):
@switch.table.turnright = [4 x i32] [i32 1, i32 2, i32 3, i32 0]
define void @turnright(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = icmp ult i32 %2, 4
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = sext i32 %2 to i64
%6 = getelementptr inbounds [4 x i32], [4 x i32]* @switch.table.turnright, i64 0, i64 %5
%7 = load i32, i32* %6
store i32 %7, i32* %0
br label %8
8: ; preds = %1, %4
ret void
}
/* Variables and functions */
int hash_int_key_cmp(const void *k1, const void *k2) {
  int a = (int)(intptr_t)k1;
  int b = (int)(intptr_t)k2;
  return (a > b) - (a < b);
}


x86 assembly (clang, -O0):
<hash_int_key_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
setg   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x14(%rbp),%ecx
cmp    -0x18(%rbp),%ecx
setl   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash_int_key_cmp>:
xor    %eax,%eax
xor    %ecx,%ecx
cmp    %esi,%edi
setg   %al
setl   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @hash_int_key_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = ptrtoint i8* %7 to i64
%9 = trunc i64 %8 to i32
store i32 %9, i32* %5
%10 = load i8*, i8** %4
%11 = ptrtoint i8* %10 to i64
%12 = trunc i64 %11 to i32
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = icmp sgt i32 %13, %14
%16 = zext i1 %15 to i32
%17 = load i32, i32* %5
%18 = load i32, i32* %6
%19 = icmp slt i32 %17, %18
%20 = zext i1 %19 to i32
%21 = sub nsw i32 %16, %20
ret i32 %21
}

LLVM IR (-O2):
define i32 @hash_int_key_cmp(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = trunc i64 %3 to i32
%5 = ptrtoint i8* %1 to i64
%6 = trunc i64 %5 to i32
%7 = icmp sgt i32 %4, %6
%8 = zext i1 %7 to i32
%9 = icmp slt i32 %4, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
float LerpAngle(float a2, float a1, const float frac) {
  if (a1 - a2 > 180)
    a1 -= 360;
  if (a1 - a2 < -180)
    a1 += 360;
  return a2 + frac * (a1 - a2);
}


x86 assembly (clang, -O0):
<LerpAngle>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
subss  -0x4(%rbp),%xmm0
movss  0xedb(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1144 <LerpAngle+0x44>
movss  -0x8(%rbp),%xmm0
movss  0xec9(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm1
subss  -0x4(%rbp),%xmm1
movss  0xeb2(%rip),%xmm0
ucomiss %xmm1,%xmm0
jbe    1171 <LerpAngle+0x71>
movss  0xe9d(%rip),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm1
movss  -0xc(%rbp),%xmm0
movss  -0x8(%rbp),%xmm2
subss  -0x4(%rbp),%xmm2
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<LerpAngle>:
movaps %xmm1,%xmm3
subss  %xmm0,%xmm3
movss  0xef1(%rip),%xmm4
addss  %xmm1,%xmm4
movss  0xee9(%rip),%xmm5
cmpltss %xmm3,%xmm5
andps  %xmm5,%xmm4
andnps %xmm1,%xmm5
orps   %xmm4,%xmm5
movaps %xmm5,%xmm1
subss  %xmm0,%xmm1
movaps %xmm5,%xmm3
addss  0xecd(%rip),%xmm3
cmpltss 0xec8(%rip),%xmm1
andps  %xmm1,%xmm3
andnps %xmm5,%xmm1
orps   %xmm3,%xmm1
subss  %xmm0,%xmm1
mulss  %xmm2,%xmm1
addss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @LerpAngle(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* %5
%8 = load float, float* %4
%9 = fsub float %7, %8
%10 = fcmp ogt float %9, 1.800000e+02
br i1 %10, label %11, label %14
11: ; preds = %3
%12 = load float, float* %5
%13 = fsub float %12, 3.600000e+02
store float %13, float* %5
br label %14
14: ; preds = %11, %3
%15 = load float, float* %5
%16 = load float, float* %4
%17 = fsub float %15, %16
%18 = fcmp olt float %17, -1.800000e+02
br i1 %18, label %19, label %22
19: ; preds = %14
%20 = load float, float* %5
%21 = fadd float %20, 3.600000e+02
store float %21, float* %5
br label %22
22: ; preds = %19, %14
%23 = load float, float* %4
%24 = load float, float* %6
%25 = load float, float* %5
%26 = load float, float* %4
%27 = fsub float %25, %26
%28 = call float @llvm.fmuladd.f32(float %24, float %27, float %23)
ret float %28
}

LLVM IR (-O2):
define float @LerpAngle(float %0, float %1, float %2) {
%4 = fsub float %1, %0
%5 = fcmp ogt float %4, 1.800000e+02
%6 = fadd float %1, -3.600000e+02
%7 = select i1 %5, float %6, float %1
%8 = fsub float %7, %0
%9 = fcmp olt float %8, -1.800000e+02
%10 = fadd float %7, 3.600000e+02
%11 = select i1 %9, float %10, float %7
%12 = fsub float %11, %0
%13 = tail call float @llvm.fmuladd.f32(float %2, float %12, float %0)
ret float %13
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
long long fun_stub_base_ll_stub(int a) {
  printf("fun_stub_base_ll_stub:a = %d \n", a);
  long long l = 0xffffffff;
  return l + a;
}


x86 assembly (clang, -O0):
<fun_stub_base_ll_stub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%eax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_stub_base_ll_stub>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
movslq %ebx,%rcx
mov    $0xffffffff,%eax
add    %rcx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"fun_stub_base_ll_stub:a = %d \0A\00"
define i64 @fun_stub_base_ll_stub(i32 %0) {
%2 = alloca i32
%3 = alloca i64
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %4)
store i64 4294967295, i64* %3
%6 = load i64, i64* %3
%7 = load i32, i32* %2
%8 = sext i32 %7 to i64
%9 = add nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
@.str = [31 x i8] c"fun_stub_base_ll_stub:a = %d \0A\00"
define i64 @fun_stub_base_ll_stub(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = sext i32 %0 to i64
%4 = add nsw i64 %3, 4294967295
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ out_byte(int, unsigned char);
void screen_set_cursor_position(int row, int col) {
  unsigned short position = (row * 80) + col;
  out_byte(0x3D4, 0x0F);
  out_byte(0x3D5, (unsigned char)(position & 0xFF));
  out_byte(0x3D4, 0x0E);
  out_byte(0x3D5, (unsigned char)((position >> 8) & 0xFF));
}


x86 assembly (clang, -O0):
<screen_set_cursor_position>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x50,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %ax,-0xa(%rbp)
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <out_byte@plt>
movzwl -0xa(%rbp),%eax
and    $0xff,%eax
mov    $0x3d5,%edi
movzbl %al,%esi
call   1030 <out_byte@plt>
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <out_byte@plt>
movzwl -0xa(%rbp),%eax
sar    $0x8,%eax
and    $0xff,%eax
mov    $0x3d5,%edi
movzbl %al,%esi
call   1030 <out_byte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<screen_set_cursor_position>:
push   %rbx
lea    (%rdi,%rdi,4),%ebx
shl    $0x4,%ebx
add    %esi,%ebx
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <out_byte@plt>
movzbl %bl,%esi
mov    $0x3d5,%edi
call   1030 <out_byte@plt>
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <out_byte@plt>
movzbl %bh,%esi
mov    $0x3d5,%edi
pop    %rbx
jmp    1030 <out_byte@plt>

LLVM IR (-O0):
define void @screen_set_cursor_position(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i16
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = mul nsw i32 %6, 80
%8 = load i32, i32* %4
%9 = add nsw i32 %7, %8
%10 = trunc i32 %9 to i16
store i16 %10, i16* %5
%11 = call i32 @out_byte(i32 980, i8 zeroext 15)
%12 = load i16, i16* %5
%13 = zext i16 %12 to i32
%14 = and i32 %13, 255
%15 = trunc i32 %14 to i8
%16 = call i32 @out_byte(i32 981, i8 zeroext %15)
%17 = call i32 @out_byte(i32 980, i8 zeroext 14)
%18 = load i16, i16* %5
%19 = zext i16 %18 to i32
%20 = ashr i32 %19, 8
%21 = and i32 %20, 255
%22 = trunc i32 %21 to i8
%23 = call i32 @out_byte(i32 981, i8 zeroext %22)
ret void
}

LLVM IR (-O2):
define void @screen_set_cursor_position(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 80
%4 = add nsw i32 %3, %1
%5 = tail call i32 @out_byte(i32 980, i8 zeroext 15)
%6 = trunc i32 %4 to i8
%7 = tail call i32 @out_byte(i32 981, i8 zeroext %6)
%8 = tail call i32 @out_byte(i32 980, i8 zeroext 14)
%9 = lshr i32 %4, 8
%10 = trunc i32 %9 to i8
%11 = tail call i32 @out_byte(i32 981, i8 zeroext %10)
ret void
}
int atoi(const char *s) {
  int i = 0;
  while (*s)
    if ('0' <= *s && *s <= '9')
      i = 10 * i + *s++ - '0';
    else
      break;
  return i;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     116d <atoi+0x6d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x30,%eax
cmp    %ecx,%eax
jg     1163 <atoi+0x63>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jg     1163 <atoi+0x63>
imul   $0xa,-0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
movsbl (%rcx),%ecx
add    %ecx,%eax
sub    $0x30,%eax
mov    %eax,-0xc(%rbp)
jmp    1168 <atoi+0x68>
jmp    116d <atoi+0x6d>
jmp    110f <atoi+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
lea    -0x30(%rcx),%edx
xor    %eax,%eax
cmp    $0x9,%dl
ja     113b <atoi+0x3b>
add    $0x1,%rdi
xor    %eax,%eax
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
lea    -0x30(%rcx),%edx
add    $0x1,%rdi
cmp    $0xa,%dl
jb     1120 <atoi+0x20>
ret

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = add i8 %2, -48
%4 = icmp ult i8 %3, 10
br i1 %4, label %5, label %17
5: ; preds = %1, %5
%6 = phi i8 [ %14, %5 ], [ %2, %1 ]
%7 = phi i32 [ %13, %5 ], [ 0, %1 ]
%8 = phi i8* [ %11, %5 ], [ %0, %1 ]
%9 = zext i8 %6 to i32
%10 = mul nsw i32 %7, 10
%11 = getelementptr inbounds i8, i8* %8, i64 1
%12 = add i32 %10, -48
%13 = add i32 %12, %9
%14 = load i8, i8* %11
%15 = add i8 %14, -48
%16 = icmp ult i8 %15, 10
br i1 %16, label %5, label %17
17: ; preds = %5, %1
%18 = phi i32 [ 0, %1 ], [ %13, %5 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int q1i() {
  int m = 12;
  int n = 34;
  int *p = &m;
  int *q = &n;
  *q = --*p;
  *p = (*q)--;
  printf("\n%s\n", "q1i ------");
  printf("%d %d\n", *p, *q);
  return 1;
}


x86 assembly (clang, -O0):
<q1i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0xc,-0x4(%rbp)
movl   $0x22,-0x8(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
add    $0xffffffff,%ecx
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
mov    %ecx,%edx
add    $0xffffffff,%edx
mov    %edx,(%rax)
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
lea    0xe9f(%rip),%rdi
lea    0xe9d(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rax
mov    (%rax),%edx
lea    0xe8e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x1,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<q1i>:
push   %rax
lea    0xee8(%rip),%rdi
lea    0xee6(%rip),%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
mov    $0xb,%esi
mov    $0xa,%edx
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\0A%s\0A\00"
@.str.1 = [11 x i8] c"q1i ------\00"
@.str.2 = [7 x i8] c"%d %d\0A\00"
define i32 @q1i() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32*
store i32 12, i32* %1
store i32 34, i32* %2
store i32* %1, i32** %3
store i32* %2, i32** %4
%5 = load i32*, i32** %3
%6 = load i32, i32* %5
%7 = add nsw i32 %6, -1
store i32 %7, i32* %5
%8 = load i32*, i32** %4
store i32 %7, i32* %8
%9 = load i32*, i32** %4
%10 = load i32, i32* %9
%11 = add nsw i32 %10, -1
store i32 %11, i32* %9
%12 = load i32*, i32** %3
store i32 %10, i32* %12
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%14 = load i32*, i32** %3
%15 = load i32, i32* %14
%16 = load i32*, i32** %4
%17 = load i32, i32* %16
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 %15, i32 %17)
ret i32 1
}

LLVM IR (-O2):
@.str = [5 x i8] c"\0A%s\0A\00"
@.str.1 = [11 x i8] c"q1i ------\00"
@.str.2 = [7 x i8] c"%d %d\0A\00"
define i32 @q1i() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 11, i32 10)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ R_OK;
scalar_t__ access(char const *, int /*<<< orphan*/);
int errno;
int read_permission_p(const char *filename) {
  if (access(filename, R_OK) == 0)
    return (0);
  return (errno);
}


x86 assembly (clang, -O0):
<read_permission_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2eb1(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
cmp    $0x0,%rax
jne    1144 <read_permission_p+0x34>
movl   $0x0,-0x4(%rbp)
jmp    1150 <read_permission_p+0x40>
mov    0x2e95(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_permission_p>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%esi
call   1030 <access@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
je     1132 <read_permission_p+0x22>
mov    0x2eb0(%rip),%rax
mov    (%rax),%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@R_OK = global i32 0
@errno = global i32 0
define i32 @read_permission_p(i8* nocapture %0) {
%2 = load i32, i32* @R_OK
%3 = tail call i64 @access(i8* %0, i32 %2)
%4 = icmp eq i64 %3, 0
%5 = load i32, i32* @errno
%6 = select i1 %4, i32 0, i32 %5
ret i32 %6
}
void setbeword16(unsigned char *c, unsigned int val) {
  c[0] = val >> 8;
  c[1] = val & 0xFF;
}


x86 assembly (clang, -O0):
<setbeword16>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<setbeword16>:
rol    $0x8,%si
mov    %si,(%rdi)
ret

LLVM IR (-O0):
define void @setbeword16(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = lshr i32 %5, 8
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i32, i32* %4
%11 = and i32 %10, 255
%12 = trunc i32 %11 to i8
%13 = load i8*, i8** %3
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8 %12, i8* %14
ret void
}

LLVM IR (-O2):
define void @setbeword16(i8* nocapture writeonly %0, i32 %1) {
%3 = lshr i32 %1, 8
%4 = trunc i32 %3 to i8
store i8 %4, i8* %0
%5 = trunc i32 %1 to i8
%6 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %5, i8* %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ op_add(int, int);
int main(int ac, char **av) {
  (void)ac;
  (void)av;
  op_add(1, 2);
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @op_add(i32 1, i32 2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ kprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ printf(char *);
void syscall_isr(void) {
  kprintf(0, "syscall isr\n");
  printf("syscall isr\n");
}


x86 assembly (clang, -O0):
<syscall_isr>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xed3(%rip),%rsi
call   1040 <kprintf@plt>
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscall_isr>:
push   %rax
lea    0xed8(%rip),%rsi
xor    %edi,%edi
call   1040 <kprintf@plt>
lea    0xed7(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"syscall isr\0A\00"
define void @syscall_isr() {
%1 = call i32 @kprintf(i32 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"syscall isr\0A\00"
@str = [12 x i8] c"syscall isr\00"
define void @syscall_isr() {
%1 = tail call i32 @kprintf(i32 0, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
int GetKey(void) {}


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

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

LLVM IR (-O0):
define i32 @GetKey() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @GetKey() {
ret i32 undef
}
/* Variables and functions */
int f();
int main() { return f(); }


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @f()
ret i32 %1
}
/* Variables and functions */
char *_strtok_r(char *, char const *, char **);
char *_strtok(char *s1, const char *delimiters) {
  static char *ssave = "";
  return _strtok_r(s1, delimiters, &ssave);
}


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

x86 assembly (clang, -O2):
<_strtok>:
lea    0x2f11(%rip),%rdx
jmp    1030 <_strtok_r@plt>

LLVM IR (-O0):
@_strtok.ssave = internal global i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i32 0, i32 0)
@.str = [1 x i8] zeroinitializer
define i8* @_strtok(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = call i8* @_strtok_r(i8* %5, i8* %6, i8** @_strtok.ssave)
ret i8* %7
}

LLVM IR (-O2):
@_strtok.ssave = internal global i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0)
@.str = [1 x i8] zeroinitializer
define i8* @_strtok(i8* %0, i8* %1) {
%3 = tail call i8* @_strtok_r(i8* %0, i8* %1, i8** @_strtok.ssave)
ret i8* %3
}
void drawellip(int m, int n) {
  (void)m;
  (void)n;
}


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

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

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

LLVM IR (-O2):
define void @drawellip(i32 %0, i32 %1) {
ret void
}
void bootretry_init_cmd_timeout(void) {}


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

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

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

LLVM IR (-O2):
define void @bootretry_init_cmd_timeout() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint16_t;
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
int /*<<< orphan*/ str_find_c(char *, int /*<<< orphan*/, char *,
                              int /*<<< orphan*/ *, int /*<<< orphan*/);
int16_t str_find(char *s, uint16_t l, char *t, uint16_t *t_end) {
  return str_find_c(s, l, t, t_end, 0);
}


x86 assembly (clang, -O0):
<str_find>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %r8d,%r8d
call   1030 <str_find_c@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<str_find>:
xor    %r8d,%r8d
jmp    1030 <str_find_c@plt>

LLVM IR (-O0):
define i32 @str_find(i8* %0, i32 %1, i8* %2, i32* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32* %3, i32** %8
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = load i8*, i8** %7
%12 = load i32*, i32** %8
%13 = call i32 @str_find_c(i8* %9, i32 %10, i8* %11, i32* %12, i32 0)
ret i32 %13
}

LLVM IR (-O2):
define i32 @str_find(i8* %0, i32 %1, i8* %2, i32* %3) {
%5 = tail call i32 @str_find_c(i8* %0, i32 %1, i8* %2, i32* %3, i32 0)
ret i32 %5
}
main() { int x[] = {1, 2, 3}; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0xc(%rbp)
mov    0xef3(%rip),%eax
mov    %eax,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.x = [3 x i32] [i32 1, i32 2, i32 3]
define i32 @main() {
%1 = alloca [3 x i32]
%2 = bitcast [3 x i32]* %1 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ f();
g() { f(); }


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

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

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

LLVM IR (-O2):
define i32 @g() {
%1 = tail call i32 (...) @f()
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ lua_newtag();
int /*<<< orphan*/ lua_pushnumber(int /*<<< orphan*/);
void luaIl_newtag(void) { lua_pushnumber(lua_newtag()); }


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

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

LLVM IR (-O0):
define void @luaIl_newtag() {
%1 = call i32 (...) @lua_newtag()
%2 = call i32 @lua_pushnumber(i32 %1)
ret void
}

LLVM IR (-O2):
define void @luaIl_newtag() {
%1 = tail call i32 (...) @lua_newtag()
%2 = tail call i32 @lua_pushnumber(i32 %1)
ret void
}
void syn_note_free(struct syn_note *self) {}


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

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

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

LLVM IR (-O2):
%struct.syn_note = type opaque
define void @syn_note_free(%struct.syn_note* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ I2C_SLAVE;
char i2c_smbus_read_byte_data(int, int);
int /*<<< orphan*/ ioctl(int, int /*<<< orphan*/, char);
char pca9557_get_pin_level(int fd, char addr, char port) {
  char state;
  ioctl(fd, I2C_SLAVE, addr);
  state = i2c_smbus_read_byte_data(fd, 0x00);
  return state & (1 << (port));
}


x86 assembly (clang, -O0):
<pca9557_get_pin_level>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %sil,%cl
mov    %edi,-0x4(%rbp)
mov    %cl,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2ea8(%rip),%rax
mov    (%rax),%esi
movsbl -0x5(%rbp),%edx
call   1030 <ioctl@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1040 <i2c_smbus_read_byte_data@plt>
mov    %al,-0x7(%rbp)
movsbl -0x7(%rbp),%eax
movsbl -0x6(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
and    %ecx,%eax
movsbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pca9557_get_pin_level>:
push   %rbp
push   %rbx
push   %rax
mov    %edx,%ebx
mov    %esi,%edx
mov    %edi,%ebp
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
call   1030 <ioctl@plt>
mov    %ebp,%edi
xor    %esi,%esi
call   1040 <i2c_smbus_read_byte_data@plt>
mov    $0x1,%edx
mov    %ebx,%ecx
shl    %cl,%edx
and    %dl,%al
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@I2C_SLAVE = global i32 0
define signext i8 @pca9557_get_pin_level(i32 %0, i8 signext %1, i8 signext %2) {
%4 = alloca i32
%5 = alloca i8
%6 = alloca i8
%7 = alloca i8
store i32 %0, i32* %4
store i8 %1, i8* %5
store i8 %2, i8* %6
%8 = load i32, i32* %4
%9 = load i32, i32* @I2C_SLAVE
%10 = load i8, i8* %5
%11 = call i32 @ioctl(i32 %8, i32 %9, i8 signext %10)
%12 = load i32, i32* %4
%13 = call signext i8 @i2c_smbus_read_byte_data(i32 %12, i32 0)
store i8 %13, i8* %7
%14 = load i8, i8* %7
%15 = sext i8 %14 to i32
%16 = load i8, i8* %6
%17 = sext i8 %16 to i32
%18 = shl i32 1, %17
%19 = and i32 %15, %18
%20 = trunc i32 %19 to i8
ret i8 %20
}

LLVM IR (-O2):
@I2C_SLAVE = global i32 0
define signext i8 @pca9557_get_pin_level(i32 %0, i8 signext %1, i8 signext %2) {
%4 = load i32, i32* @I2C_SLAVE
%5 = tail call i32 @ioctl(i32 %0, i32 %4, i8 signext %1)
%6 = tail call signext i8 @i2c_smbus_read_byte_data(i32 %0, i32 0)
%7 = zext i8 %2 to i32
%8 = shl nuw i32 1, %7
%9 = trunc i32 %8 to i8
%10 = and i8 %6, %9
ret i8 %10
}
/* Variables and functions */
int /*<<< orphan*/ newline();
int /*<<< orphan*/ output_label_terminator();
int /*<<< orphan*/ output_string(char *);
void glabel(char *lab) {
  output_string(lab);
  output_label_terminator();
  newline();
}


x86 assembly (clang, -O0):
<glabel>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <output_string@plt>
mov    $0x0,%al
call   1050 <output_label_terminator@plt>
mov    $0x0,%al
call   1030 <newline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<glabel>:
push   %rax
call   1040 <output_string@plt>
xor    %eax,%eax
call   1050 <output_label_terminator@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <newline@plt>

LLVM IR (-O0):
define void @glabel(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @output_string(i8* %3)
%5 = call i32 (...) @output_label_terminator()
%6 = call i32 (...) @newline()
ret void
}

LLVM IR (-O2):
define void @glabel(i8* %0) {
%2 = tail call i32 @output_string(i8* %0)
%3 = tail call i32 (...) @output_label_terminator()
%4 = tail call i32 (...) @newline()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__36__IO__makeOutput();
void Msp430GpioC__7__HplGeneralIO__makeOutput(void) {
  HplMsp430GeneralIOP__36__IO__makeOutput();
}


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

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

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

LLVM IR (-O2):
define void @Msp430GpioC__7__HplGeneralIO__makeOutput() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__36__IO__makeOutput()
ret void
}
/* Variables and functions */
int uwsgi_run();
int /*<<< orphan*/ uwsgi_setup(int, char **, char **);
int main(int argc, char *argv[], char *envp[]) {
  uwsgi_setup(argc, argv, envp);
  return uwsgi_run();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <uwsgi_setup@plt>
mov    $0x0,%al
call   1040 <uwsgi_run@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8**
%7 = alloca i8**
store i32 0, i32* %4
store i32 %0, i32* %5
store i8** %1, i8*** %6
store i8** %2, i8*** %7
%8 = load i32, i32* %5
%9 = load i8**, i8*** %6
%10 = load i8**, i8*** %7
%11 = call i32 @uwsgi_setup(i32 %8, i8** %9, i8** %10)
%12 = call i32 (...) @uwsgi_run()
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1, i8** %2) {
%4 = tail call i32 @uwsgi_setup(i32 %0, i8** %1, i8** %2)
%5 = tail call i32 (...) @uwsgi_run()
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ hash(char *);
int /*<<< orphan*/ printf(char *, int /*<<< orphan*/);
int /*<<< orphan*/ scanf(char *, char *);
int main() {
  char word[201];
  scanf("%s", word);
  printf("%lu", hash(word));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0xd0,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rsi
lea    0xeb0(%rip),%rdi
call   1050 <scanf@plt>
lea    -0xd0(%rbp),%rdi
call   1030 <hash@plt>
mov    %eax,%esi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0xd0,%rsp
lea    0xec1(%rip),%rdi
mov    %rsp,%rbx
mov    %rbx,%rsi
call   1050 <scanf@plt>
mov    %rbx,%rdi
call   1030 <hash@plt>
lea    0xeaa(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0xd0,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%lu\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [201 x i8]
store i32 0, i32* %1
%3 = getelementptr inbounds [201 x i8], [201 x i8]* %2, i64 0, i64 0
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = getelementptr inbounds [201 x i8], [201 x i8]* %2, i64 0, i64 0
%6 = call i32 @hash(i8* %5)
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
@.str.1 = [4 x i8] c"%lu\00"
define i32 @main() {
%1 = alloca [201 x i8]
%2 = getelementptr inbounds [201 x i8], [201 x i8]* %1, i64 0, i64 0
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = call i32 @hash(i8* %2)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 0
}
int __gtdf2(double a __attribute__((unused)),
            double b __attribute__((unused))) {
  return 0;
}


x86 assembly (clang, -O0):
<__gtdf2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @__gtdf2(double %0, double %1) {
ret i32 0
}
/* Variables and functions */
int add(int, int);
int main() {
  int num1 = 2232;
  int num2 = 3321;
  int result = add(num1, num2);
  return result;
}


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

x86 assembly (clang, -O2):
<main>:
mov    $0x8b8,%edi
mov    $0xcf9,%esi
jmp    1030 <add@plt>

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @add(i32 2232, i32 3321)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int main() {
  int i;
  for (i = 0; i <= 255; i++) {
    printf("%d ==> %c\n", i, i);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0xff,-0x8(%rbp)
jg     1153 <main+0x43>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xec0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [11 x i8] c"%d ==> %c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
br label %3
3: ; preds = %10, %0
%4 = load i32, i32* %2
%5 = icmp sle i32 %4, 255
br i1 %5, label %6, label %13
6: ; preds = %3
%7 = load i32, i32* %2
%8 = load i32, i32* %2
%9 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
br label %10
10: ; preds = %6
%11 = load i32, i32* %2
%12 = add nsw i32 %11, 1
store i32 %12, i32* %2
br label %3
13: ; preds = %3
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"%d ==> %c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ __u32;

/* Variables and functions */
int /*<<< orphan*/ crush_hash32_rjenkins1(int /*<<< orphan*/);
__u32 crush_hash32(int type, __u32 a) {
  switch (type) {
  case 0:
    return crush_hash32_rjenkins1(a);
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<crush_hash32>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
test   %eax,%eax
jne    113e <crush_hash32+0x2e>
jmp    112e <crush_hash32+0x1e>
mov    -0xc(%rbp),%edi
call   1030 <crush_hash32_rjenkins1@plt>
mov    %eax,-0x4(%rbp)
jmp    1145 <crush_hash32+0x35>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crush_hash32>:
test   %edi,%edi
je     1117 <crush_hash32+0x7>
xor    %eax,%eax
ret
mov    %esi,%edi
jmp    1030 <crush_hash32_rjenkins1@plt>

LLVM IR (-O0):
define i32 @crush_hash32(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
switch i32 %6, label %10 [
i32 0, label %7
]
7: ; preds = %2
%8 = load i32, i32* %5
%9 = call i32 @crush_hash32_rjenkins1(i32 %8)
store i32 %9, i32* %3
br label %11
10: ; preds = %2
store i32 0, i32* %3
br label %11
11: ; preds = %10, %7
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
define i32 @crush_hash32(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @crush_hash32_rjenkins1(i32 %1)
br label %6
6: ; preds = %2, %4
%7 = phi i32 [ %5, %4 ], [ 0, %2 ]
ret i32 %7
}
void IMGbltAreaRemapHMirror(short *imageBuf, int pitch, int x, int y,
                            char *bitmapBuf, int srcX1, int srcY1, int srcX2,
                            int srcY2, short *colorTable) {}


x86 assembly (clang, -O0):
<IMGbltAreaRemapHMirror>:
push   %rbp
mov    %rsp,%rbp
mov    0x28(%rbp),%rax
mov    0x20(%rbp),%eax
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9d,-0x24(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @IMGbltAreaRemapHMirror(i16* %0, i32 %1, i32 %2, i32 %3, i8* %4, i32 %5, i32 %6, i32 %7, i32 %8, i16* %9) {
%11 = alloca i16*
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i32
%17 = alloca i32
%18 = alloca i32
%19 = alloca i32
%20 = alloca i16*
store i16* %0, i16** %11
store i32 %1, i32* %12
store i32 %2, i32* %13
store i32 %3, i32* %14
store i8* %4, i8** %15
store i32 %5, i32* %16
store i32 %6, i32* %17
store i32 %7, i32* %18
store i32 %8, i32* %19
store i16* %9, i16** %20
ret void
}

LLVM IR (-O2):
define void @IMGbltAreaRemapHMirror(i16* nocapture %0, i32 %1, i32 %2, i32 %3, i8* nocapture %4, i32 %5, i32 %6, i32 %7, i32 %8, i16* nocapture %9) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isbdigit(int);
void t_isbdigit_0x86() {
  Assert_real((isbdigit(134) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isbdigit.c",
              675, ("isbdigit should be 0 for 0x86"));
}


x86 assembly (clang, -O0):
<t_isbdigit_0x86>:
push   %rbp
mov    %rsp,%rbp
mov    $0x86,%edi
call   1040 <isbdigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x2a3,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isbdigit_0x86>:
push   %rax
mov    $0x86,%edi
call   1040 <isbdigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x2a3,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x86\00"
define void @t_isbdigit_0x86() {
%1 = call i64 @isbdigit(i32 134)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 675, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isbdigit.c\00"
@.str.1 = [30 x i8] c"isbdigit should be 0 for 0x86\00"
define void @t_isbdigit_0x86() {
%1 = tail call i64 @isbdigit(i32 134)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 675, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void *realloc(void *, size_t);
void *xmalloc(size_t);
void *xrealloc(void *ptr, size_t size) {
  void *p;
  if (!ptr)
    return xmalloc(size);
  p = realloc(ptr, size);
  if (!p) {
    perror("realloc");
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<xrealloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116d <xrealloc+0x2d>
mov    -0x18(%rbp),%rdi
call   1030 <xmalloc@plt>
mov    %rax,-0x8(%rbp)
jmp    11a7 <xrealloc+0x67>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    119f <xrealloc+0x5f>
lea    0xe70(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>
mov    -0x20(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrealloc>:
push   %rax
test   %rdi,%rdi
je     1152 <xrealloc+0x12>
call   1040 <realloc@plt>
test   %rax,%rax
je     115b <xrealloc+0x1b>
pop    %rcx
ret
mov    %rsi,%rdi
pop    %rax
jmp    1030 <xmalloc@plt>
lea    0xe9e(%rip),%rdi
call   1050 <perror@plt>
mov    $0x1,%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"realloc\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8*
store i8* %0, i8** %4
store i64 %1, i64* %5
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %12, label %9
9: ; preds = %2
%10 = load i64, i64* %5
%11 = call i8* @xmalloc(i64 %10)
store i8* %11, i8** %3
br label %23
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = load i64, i64* %5
%15 = call i8* @realloc(i8* %13, i64 %14)
store i8* %15, i8** %6
%16 = load i8*, i8** %6
%17 = icmp ne i8* %16, null
br i1 %17, label %21, label %18
18: ; preds = %12
%19 = call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%20 = call i32 @exit(i32 1)
unreachable
21: ; preds = %12
%22 = load i8*, i8** %6
store i8* %22, i8** %3
br label %23
23: ; preds = %21, %9
%24 = load i8*, i8** %3
ret i8* %24
}

LLVM IR (-O2):
@.str = [8 x i8] c"realloc\00"
define i8* @xrealloc(i8* %0, i64 %1) {
%3 = icmp eq i8* %0, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i8* @xmalloc(i64 %1)
br label %12
6: ; preds = %2
%7 = tail call i8* @realloc(i8* %0, i64 %1)
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %6
%10 = tail call i32 @perror(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
%11 = tail call i32 @exit(i32 1)
unreachable
12: ; preds = %6, %4
%13 = phi i8* [ %5, %4 ], [ %7, %6 ]
ret i8* %13
}
int isdigit(int c) { return (c >= 0x30 && c <= 0x39) ? 1 : 0; }


x86 assembly (clang, -O0):
<isdigit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
cmpl   $0x30,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jl     1120 <isdigit+0x20>
cmpl   $0x39,-0x4(%rbp)
setle  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @isdigit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sge i32 %3, 48
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp sle i32 %6, 57
br label %8
8: ; preds = %5, %1
%9 = phi i1 [ false, %1 ], [ %7, %5 ]
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 1, i32 0
ret i32 %11
}

LLVM IR (-O2):
define i32 @isdigit(i32 %0) {
%2 = add i32 %0, -48
%3 = icmp ult i32 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_error();
int /*<<< orphan*/ f(int);
void f2(int n) {
  if (n < 3)
    return;
  n--;
  f(n);
ERROR:
  __VERIFIER_error();
}


x86 assembly (clang, -O0):
<f2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x3,-0x4(%rbp)
jge    113a <f2+0x1a>
jmp    1152 <f2+0x32>
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <f@plt>
mov    $0x0,%al
call   1040 <__VERIFIER_error@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f2>:
cmp    $0x3,%edi
jge    1126 <f2+0x6>
ret
push   %rax
add    $0xffffffff,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <__VERIFIER_error@plt>

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

LLVM IR (-O2):
define void @f2(i32 %0) {
%2 = icmp slt i32 %0, 3
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @f(i32 %4)
%6 = tail call i32 (...) @__VERIFIER_error()
br label %7
7: ; preds = %1, %3
ret void
}