xunge/DecIR huggingface dataset:
float getfloat(arrayptr, num_cols, row, col)
float *arrayptr;
short num_cols;
short row, col;
{
  float value;
  int position;
  position = row * num_cols + col;
  value = *(arrayptr + position);
  return (value);
}


x86 assembly (clang, -O0):
<getfloat>:
push   %rbp
mov    %rsp,%rbp
mov    %ecx,%eax
mov    %edx,%ecx
mov    %si,%dx
mov    %rdi,-0x8(%rbp)
mov    %dx,-0xa(%rbp)
mov    %cx,-0xc(%rbp)
mov    %ax,-0xe(%rbp)
movswl -0xc(%rbp),%eax
movswl -0xa(%rbp),%ecx
imul   %ecx,%eax
movswl -0xe(%rbp),%ecx
add    %ecx,%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x18(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<getfloat>:
movswl %dx,%eax
movswl %si,%edx
imul   %eax,%edx
movswl %cx,%eax
add    %edx,%eax
cltq
movss  (%rdi,%rax,4),%xmm0
ret

LLVM IR (-O0):
define float @getfloat(float* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca float*
%6 = alloca i16
%7 = alloca i16
%8 = alloca i16
%9 = alloca float
%10 = alloca i32
%11 = trunc i32 %1 to i16
%12 = trunc i32 %2 to i16
%13 = trunc i32 %3 to i16
store float* %0, float** %5
store i16 %11, i16* %6
store i16 %12, i16* %7
store i16 %13, i16* %8
%14 = load i16, i16* %7
%15 = sext i16 %14 to i32
%16 = load i16, i16* %6
%17 = sext i16 %16 to i32
%18 = mul nsw i32 %15, %17
%19 = load i16, i16* %8
%20 = sext i16 %19 to i32
%21 = add nsw i32 %18, %20
store i32 %21, i32* %10
%22 = load float*, float** %5
%23 = load i32, i32* %10
%24 = sext i32 %23 to i64
%25 = getelementptr inbounds float, float* %22, i64 %24
%26 = load float, float* %25
store float %26, float* %9
%27 = load float, float* %9
ret float %27
}

LLVM IR (-O2):
define float @getfloat(float* nocapture %0, i32 %1, i32 %2, i32 %3) {
%5 = shl i32 %2, 16
%6 = ashr exact i32 %5, 16
%7 = shl i32 %1, 16
%8 = ashr exact i32 %7, 16
%9 = mul nsw i32 %6, %8
%10 = shl i32 %3, 16
%11 = ashr exact i32 %10, 16
%12 = add nsw i32 %9, %11
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds float, float* %0, i64 %13
%15 = load float, float* %14
ret float %15
}
/* Variables and functions */
void *realloc(void *, size_t);
int /*<<< orphan*/ reg(void *, size_t, char const *, int);
int /*<<< orphan*/ unreg(void *, char const *, int);
void *ml_realloc(void *ptr, size_t size, const char *file, int line) {
  unreg(ptr, file, line);
  ptr = realloc(ptr, size);
  reg(ptr, size, file, line);
  return ptr;
}


x86 assembly (clang, -O0):
<ml_realloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1030 <unreg@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <realloc@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1050 <reg@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ml_realloc>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %rdx,%r15
mov    %rsi,%rbp
mov    %rdi,%rbx
mov    %rdx,%rsi
mov    %ecx,%edx
call   1030 <unreg@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
call   1040 <realloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %rbp,%rsi
mov    %r15,%rdx
mov    %r14d,%ecx
call   1050 <reg@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define i8* @ml_realloc(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = alloca i8*
%6 = alloca i64
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i64 %1, i64* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %7
%11 = load i32, i32* %8
%12 = call i32 @unreg(i8* %9, i8* %10, i32 %11)
%13 = load i8*, i8** %5
%14 = load i64, i64* %6
%15 = call i8* @realloc(i8* %13, i64 %14)
store i8* %15, i8** %5
%16 = load i8*, i8** %5
%17 = load i64, i64* %6
%18 = load i8*, i8** %7
%19 = load i32, i32* %8
%20 = call i32 @reg(i8* %16, i64 %17, i8* %18, i32 %19)
%21 = load i8*, i8** %5
ret i8* %21
}

LLVM IR (-O2):
define i8* @ml_realloc(i8* %0, i64 %1, i8* %2, i32 %3) {
%5 = tail call i32 @unreg(i8* %0, i8* %2, i32 %3)
%6 = tail call i8* @realloc(i8* %0, i64 %1)
%7 = tail call i32 @reg(i8* %6, i64 %1, i8* %2, i32 %3)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ __free_cf(void *);
void CGImageRelease(void *item) { __free_cf(item); }


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

x86 assembly (clang, -O2):
<CGImageRelease>:
jmp    1030 <__free_cf@plt>

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

LLVM IR (-O2):
define void @CGImageRelease(i8* %0) {
%2 = tail call i32 @__free_cf(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ strchr(char *, char);
int IsDelim(char c) {
  if (strchr(" +-*/^=()", c) || c == 9 || c == '\r' || c == 0)
    return (1);
  else
    return (0);
}


x86 assembly (clang, -O0):
<IsDelim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
lea    0xedb(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <strchr@plt>
cmp    $0x0,%rax
jne    115f <IsDelim+0x4f>
movsbl -0x5(%rbp),%eax
cmp    $0x9,%eax
je     115f <IsDelim+0x4f>
movsbl -0x5(%rbp),%eax
cmp    $0xd,%eax
je     115f <IsDelim+0x4f>
movsbl -0x5(%rbp),%eax
cmp    $0x0,%eax
jne    116b <IsDelim+0x5b>
movl   $0x1,-0x4(%rbp)
jmp    1172 <IsDelim+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<IsDelim>:
push   %rbx
mov    %edi,%ebx
lea    0xee6(%rip),%rdi
mov    %ebx,%esi
call   1030 <strchr@plt>
mov    %rax,%rcx
mov    $0x1,%eax
test   %rcx,%rcx
je     1130 <IsDelim+0x20>
pop    %rbx
ret
cmp    $0xd,%bl
ja     1143 <IsDelim+0x33>
movzbl %bl,%ecx
mov    $0x2201,%edx
bt     %rcx,%rdx
jb     112e <IsDelim+0x1e>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [10 x i8] c" +-*/^=()\00"
define i32 @IsDelim(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @strchr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %19, label %7
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 9
br i1 %10, label %19, label %11
11: ; preds = %7
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 13
br i1 %14, label %19, label %15
15: ; preds = %11
%16 = load i8, i8* %3
%17 = sext i8 %16 to i32
%18 = icmp eq i32 %17, 0
br i1 %18, label %19, label %20
19: ; preds = %15, %11, %7, %1
store i32 1, i32* %2
br label %21
20: ; preds = %15
store i32 0, i32* %2
br label %21
21: ; preds = %20, %19
%22 = load i32, i32* %2
ret i32 %22
}

LLVM IR (-O2):
@.str = [10 x i8] c" +-*/^=()\00"
define i32 @IsDelim(i8 signext %0) {
%2 = tail call i64 @strchr(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %0)
%3 = freeze i64 %2
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
switch i8 %0, label %6 [
i8 13, label %7
i8 9, label %7
i8 0, label %7
]
6: ; preds = %5
br label %7
7: ; preds = %1, %5, %5, %5, %6
%8 = phi i32 [ 0, %6 ], [ 1, %5 ], [ 1, %5 ], [ 1, %5 ], [ 1, %1 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void cfg_yyfree(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @cfg_yyfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Type definitions */
typedef size_t int64_t;

/* Variables and functions */
size_t _shds_slice_wrap(int64_t value, size_t array_len) {
  int64_t result;
  if (value < 0) {
    result = array_len + value;
    if (result < 0)
      result = 0;
  } else if (value > array_len) {
    result = array_len;
  } else {
    result = value;
  }
  return (size_t)result;
}


x86 assembly (clang, -O0):
<_shds_slice_wrap>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
jae    113b <_shds_slice_wrap+0x3b>
mov    -0x10(%rbp),%rax
add    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jae    1136 <_shds_slice_wrap+0x36>
movq   $0x0,-0x18(%rbp)
jmp    1163 <_shds_slice_wrap+0x63>
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1156 <_shds_slice_wrap+0x56>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    115e <_shds_slice_wrap+0x5e>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    1163 <_shds_slice_wrap+0x63>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i64 @_shds_slice_wrap(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %1, i64 %0
ret i64 %4
}
void ff_hevc_put_hevc_bi_epel_v8_8_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_v8_8_sse4() {
ret void
}
void H210ToABGR() {}


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

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

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

LLVM IR (-O2):
define void @H210ToABGR() {
ret void
}
int main() {
  unsigned long *p;
  unsigned long len = 100;
  const unsigned long node0 = 1;
  const void *pages[2] = {0};
  int status[2];
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x64,-0x18(%rbp)
movq   $0x1,-0x20(%rbp)
lea    -0x30(%rbp),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1030 <memset@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i64*
%3 = alloca i64
%4 = alloca i64
%5 = alloca [2 x i8*]
%6 = alloca [2 x i32]
store i32 0, i32* %1
store i64 100, i64* %3
store i64 1, i64* %4
%7 = bitcast [2 x i8*]* %5 to i8*
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
char *ctime(long *);
int /*<<< orphan*/ printf(char *, char *);
void show_time(long timeval) {
  char *cp = ctime(&timeval);
  printf("% 12.12s", cp + 4);
}


x86 assembly (clang, -O0):
<show_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1030 <ctime@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
lea    0xeb8(%rip),%rdi
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_time>:
push   %rax
mov    %rdi,(%rsp)
mov    %rsp,%rdi
call   1030 <ctime@plt>
lea    0x4(%rax),%rsi
lea    0xec8(%rip),%rdi
call   1040 <printf@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"% 12.12s\00"
define void @show_time(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = call i8* @ctime(i64* %2)
%4 = getelementptr inbounds i8, i8* %3, i64 4
%5 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}
void ff_hevc_put_hevc_epel_hv8_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_epel_hv8_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __analyzer_dump_exploded_nodes(int /*<<< orphan*/);
int test(int a) {
  if (a != 42 && a != 113) {
    return (-2);
  }
  __analyzer_dump_exploded_nodes(0);
  return 0;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x2a,-0x8(%rbp)
je     113b <test+0x2b>
cmpl   $0x71,-0x8(%rbp)
je     113b <test+0x2b>
movl   $0xfffffffe,-0x4(%rbp)
jmp    1149 <test+0x39>
xor    %edi,%edi
call   1030 <__analyzer_dump_exploded_nodes@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rbx
cmp    $0x71,%edi
je     1120 <test+0x10>
mov    $0xfffffffe,%ebx
cmp    $0x2a,%edi
jne    1129 <test+0x19>
xor    %ebx,%ebx
xor    %edi,%edi
call   1030 <__analyzer_dump_exploded_nodes@plt>
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @test(i32 %0) {
switch i32 %0, label %4 [
i32 113, label %2
i32 42, label %2
]
2: ; preds = %1, %1
%3 = tail call i32 @__analyzer_dump_exploded_nodes(i32 0)
br label %4
4: ; preds = %1, %2
%5 = phi i32 [ 0, %2 ], [ -2, %1 ]
ret i32 %5
}
void interrupt_handle(void) {}


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

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

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

LLVM IR (-O2):
define void @interrupt_handle() {
ret void
}
void gtk_hseparator_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gtk_hseparator_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SYS_close;
int syscall(int /*<<< orphan*/, int);
int xclose(int fd) { return syscall((SYS_close), fd); }


x86 assembly (clang, -O0):
<xclose>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%esi
call   1030 <syscall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xclose>:
mov    %edi,%esi
mov    0x2ecf(%rip),%rax
mov    (%rax),%edi
jmp    1030 <syscall@plt>

LLVM IR (-O0):
@SYS_close = global i32 0
define i32 @xclose(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @SYS_close
%4 = load i32, i32* %2
%5 = call i32 @syscall(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
@SYS_close = global i32 0
define i32 @xclose(i32 %0) {
%2 = load i32, i32* @SYS_close
%3 = tail call i32 @syscall(i32 %2, i32 %0)
ret i32 %3
}
void smash_quote2(char *str) {
  for (; *str != '\0'; str++) {
    if (*str == '\'')
      *str = '-';
  }
  return;
}


x86 assembly (clang, -O0):
<smash_quote2>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1145 <smash_quote2+0x45>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x27,%eax
jne    112f <smash_quote2+0x2f>
mov    -0x8(%rbp),%rax
movb   $0x2d,(%rax)
jmp    1134 <smash_quote2+0x34>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1108 <smash_quote2+0x8>
pop    %rbp
ret

x86 assembly (clang, -O2):
<smash_quote2>:
jmp    1117 <smash_quote2+0x17>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
movb   $0x2d,(%rdi)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x27,%al
je     1110 <smash_quote2+0x10>
test   %al,%al
jne    1113 <smash_quote2+0x13>
ret

LLVM IR (-O0):
define void @smash_quote2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %16, %1
%4 = load i8*, i8** %2
%5 = load i8, i8* %4
%6 = sext i8 %5 to i32
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %19
8: ; preds = %3
%9 = load i8*, i8** %2
%10 = load i8, i8* %9
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 39
br i1 %12, label %13, label %15
13: ; preds = %8
%14 = load i8*, i8** %2
store i8 45, i8* %14
br label %15
15: ; preds = %13, %8
br label %16
16: ; preds = %15
%17 = load i8*, i8** %2
%18 = getelementptr inbounds i8, i8* %17, i32 1
store i8* %18, i8** %2
br label %3
19: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @smash_quote2(i8* nocapture %0) {
br label %2
2: ; preds = %6, %1
%3 = phi i8* [ %0, %1 ], [ %7, %6 ]
%4 = load i8, i8* %3
switch i8 %4, label %6 [
i8 0, label %8
i8 39, label %5
]
5: ; preds = %2
store i8 45, i8* %3
br label %6
6: ; preds = %2, %5
%7 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
8: ; preds = %2
ret void
}
void foo473(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo473(i32 %0) {
ret void
}
/* Variables and functions */
int sqlite3Fts3PutVarint(char *, int);
int fts3PutColNumber(char **pp, int iCol) {
  int n = 0;
  if (iCol) {
    char *p = *pp;
    n = 1 + sqlite3Fts3PutVarint(&p[1], iCol);
    *p = 0x01;
    *pp = &p[n];
  }
  return n;
}


x86 assembly (clang, -O0):
<fts3PutColNumber>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     116a <fts3PutColNumber+0x5a>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
add    $0x1,%rdi
mov    -0xc(%rbp),%esi
call   1030 <sqlite3Fts3PutVarint@plt>
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x1,(%rax)
mov    -0x18(%rbp),%rcx
movslq -0x10(%rbp),%rax
add    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x10(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fts3PutColNumber>:
test   %esi,%esi
je     1142 <fts3PutColNumber+0x32>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rbx
lea    0x1(%rbx),%rdi
call   1030 <sqlite3Fts3PutVarint@plt>
movb   $0x1,(%rbx)
movslq %eax,%rcx
add    $0x1,%eax
add    %rbx,%rcx
add    $0x1,%rcx
mov    %rcx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @fts3PutColNumber(i8** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 0
br i1 %3, label %11, label %4
4: ; preds = %2
%5 = load i8*, i8** %0
%6 = getelementptr inbounds i8, i8* %5, i64 1
%7 = tail call i32 @sqlite3Fts3PutVarint(i8* %6, i32 %1)
%8 = add nsw i32 %7, 1
store i8 1, i8* %5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds i8, i8* %5, i64 %9
store i8* %10, i8** %0
br label %11
11: ; preds = %4, %2
%12 = phi i32 [ %8, %4 ], [ 0, %2 ]
ret i32 %12
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
int ResourceIdToInt(uint8_t *p_data) {
  return ((int)p_data[0] << 24) | ((int)p_data[1] << 16) |
         ((int)p_data[2] << 8) | p_data[3];
}


x86 assembly (clang, -O0):
<ResourceIdToInt>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
shl    $0x18,%eax
mov    -0x8(%rbp),%rcx
mov    0x4(%rcx),%ecx
shl    $0x10,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x8(%rcx),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
or     0xc(%rcx),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ResourceIdToInt>:
mov    (%rdi),%eax
mov    0x4(%rdi),%ecx
shl    $0x18,%eax
shl    $0x10,%ecx
or     %eax,%ecx
mov    0x8(%rdi),%eax
shl    $0x8,%eax
or     %ecx,%eax
or     0xc(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @ResourceIdToInt(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 0
%5 = load i32, i32* %4
%6 = shl i32 %5, 24
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 1
%9 = load i32, i32* %8
%10 = shl i32 %9, 16
%11 = or i32 %6, %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 2
%14 = load i32, i32* %13
%15 = shl i32 %14, 8
%16 = or i32 %11, %15
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 3
%19 = load i32, i32* %18
%20 = or i32 %16, %19
ret i32 %20
}

LLVM IR (-O2):
define i32 @ResourceIdToInt(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = shl i32 %2, 24
%4 = getelementptr inbounds i32, i32* %0, i64 1
%5 = load i32, i32* %4
%6 = shl i32 %5, 16
%7 = or i32 %6, %3
%8 = getelementptr inbounds i32, i32* %0, i64 2
%9 = load i32, i32* %8
%10 = shl i32 %9, 8
%11 = or i32 %7, %10
%12 = getelementptr inbounds i32, i32* %0, i64 3
%13 = load i32, i32* %12
%14 = or i32 %11, %13
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
int atoi(char *);
int main(void) {
  int x, y[2];
  int unknown;
  x = 0;
  if (unknown) {
    x = atoi("10");
  }
  assert(x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     114f <main+0x2f>
lea    0xeb9(%rip),%rdi
call   1040 <atoi@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <assert@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @assert(i32 0)
ret i32 0
}
int pair(int num) {
  if ((int)num / 2 == (double)num / 2) {
    return 1;
  } else {
    return 0;
  }
}


x86 assembly (clang, -O0):
<pair>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
cvtsi2sd %eax,%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xedd(%rip),%xmm2
divsd  %xmm2,%xmm1
ucomisd %xmm1,%xmm0
jne    1143 <pair+0x43>
jp     1143 <pair+0x43>
movl   $0x1,-0x4(%rbp)
jmp    114a <pair+0x4a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<pair>:
mov    %edi,%eax
shr    $0x1f,%eax
add    %edi,%eax
sar    %eax
cvtsi2sd %eax,%xmm0
cvtsi2sd %edi,%xmm1
mulsd  0xee7(%rip),%xmm1
cmpeqsd %xmm0,%xmm1
movq   %xmm1,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @pair(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = sdiv i32 %4, 2
%6 = sitofp i32 %5 to double
%7 = load i32, i32* %3
%8 = sitofp i32 %7 to double
%9 = fdiv double %8, 2.000000e+00
%10 = fcmp oeq double %6, %9
br i1 %10, label %11, label %12
11: ; preds = %1
store i32 1, i32* %2
br label %13
12: ; preds = %1
store i32 0, i32* %2
br label %13
13: ; preds = %12, %11
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @pair(i32 %0) {
%2 = sdiv i32 %0, 2
%3 = sitofp i32 %2 to double
%4 = sitofp i32 %0 to double
%5 = fmul double %4, 5.000000e-01
%6 = fcmp oeq double %5, %3
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void write32le(uint32_t *p, const uint32_t w) { *p = w; }


x86 assembly (clang, -O0):
<write32le>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<write32le>:
mov    %esi,(%rdi)
ret

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

LLVM IR (-O2):
define void @write32le(i32* nocapture writeonly %0, i32 %1) {
store i32 %1, i32* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ defaults();
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ run_wgetrc(char *);
char *wgetrc_file_name();
void initialize(void) {
  char *file;
  defaults();
  file = wgetrc_file_name();
  if (!file)
    return;
  run_wgetrc(file);
  free(file);
  return;
}


x86 assembly (clang, -O0):
<initialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1060 <defaults@plt>
mov    $0x0,%al
call   1040 <wgetrc_file_name@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    116a <initialize+0x2a>
jmp    117c <initialize+0x3c>
mov    -0x8(%rbp),%rdi
call   1050 <run_wgetrc@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initialize>:
push   %rbx
xor    %eax,%eax
call   1060 <defaults@plt>
xor    %eax,%eax
call   1040 <wgetrc_file_name@plt>
test   %rax,%rax
je     1168 <initialize+0x28>
mov    %rax,%rbx
mov    %rax,%rdi
call   1050 <run_wgetrc@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>
pop    %rbx
ret

LLVM IR (-O0):
define void @initialize() {
%1 = alloca i8*
%2 = call i32 (...) @defaults()
%3 = call i8* (...) @wgetrc_file_name()
store i8* %3, i8** %1
%4 = load i8*, i8** %1
%5 = icmp ne i8* %4, null
br i1 %5, label %7, label %6
6: ; preds = %0
br label %12
7: ; preds = %0
%8 = load i8*, i8** %1
%9 = call i32 @run_wgetrc(i8* %8)
%10 = load i8*, i8** %1
%11 = call i32 @free(i8* %10)
br label %12
12: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
define void @initialize() {
%1 = tail call i32 (...) @defaults()
%2 = tail call i8* (...) @wgetrc_file_name()
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %0
%5 = tail call i32 @run_wgetrc(i8* %2)
%6 = tail call i32 @free(i8* %2)
br label %7
7: ; preds = %0, %4
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
uint32_t op_sub(uint32_t a, uint32_t b) { return a - b; }


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

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

LLVM IR (-O0):
define i64 @op_sub(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = sub nsw i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @op_sub(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
ret i64 %3
}
void SCE_Quit_Matrix(void) {}


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

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

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

LLVM IR (-O2):
define void @SCE_Quit_Matrix() {
ret void
}
/* Variables and functions */
int inb(int);
int mouse_read(unsigned char *out) {
  if (!(inb(0xffe1) & (1 << 4)))
    return -1;
  *out = inb(0xffe0);
  return 0;
}


x86 assembly (clang, -O0):
<mouse_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0xffe1,%edi
call   1030 <inb@plt>
and    $0x10,%eax
cmp    $0x0,%eax
jne    113e <mouse_read+0x2e>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <mouse_read+0x47>
mov    $0xffe0,%edi
call   1030 <inb@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mouse_read>:
push   %rbx
mov    %rdi,%rbx
mov    $0xffe1,%edi
call   1030 <inb@plt>
mov    %eax,%ecx
mov    $0xffffffff,%eax
test   $0x10,%cl
je     1138 <mouse_read+0x28>
mov    $0xffe0,%edi
call   1030 <inb@plt>
mov    %al,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @mouse_read(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = call i32 @inb(i32 65505)
%5 = and i32 %4, 16
%6 = icmp ne i32 %5, 0
br i1 %6, label %8, label %7
7: ; preds = %1
store i32 -1, i32* %2
br label %12
8: ; preds = %1
%9 = call i32 @inb(i32 65504)
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %3
store i8 %10, i8* %11
store i32 0, i32* %2
br label %12
12: ; preds = %8, %7
%13 = load i32, i32* %2
ret i32 %13
}

LLVM IR (-O2):
define i32 @mouse_read(i8* nocapture writeonly %0) {
%2 = tail call i32 @inb(i32 65505)
%3 = and i32 %2, 16
%4 = icmp eq i32 %3, 0
br i1 %4, label %8, label %5
5: ; preds = %1
%6 = tail call i32 @inb(i32 65504)
%7 = trunc i32 %6 to i8
store i8 %7, i8* %0
br label %8
8: ; preds = %1, %5
%9 = phi i32 [ 0, %5 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
char getchar();
int /*<<< orphan*/ printf(char *);
char tolower(char);
void read_word(int count[26]) {
  int index = 0;
  char ch;
  printf("enter your word: ");
  while ((ch = getchar()) != '\n') {
    index = (int)(tolower(ch) - 'a');
    count[index]++;
  }
}


x86 assembly (clang, -O0):
<read_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
lea    0xeb6(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %al,-0xd(%rbp)
movsbl %al,%eax
cmp    $0xa,%eax
je     118d <read_word+0x5d>
movsbl -0xd(%rbp),%edi
call   1050 <tolower@plt>
movsbl %al,%eax
sub    $0x61,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
add    $0x1,%edx
mov    %edx,(%rax,%rcx,4)
jmp    114f <read_word+0x1f>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_word>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%al
je     1161 <read_word+0x31>
movsbl %al,%edi
call   1050 <tolower@plt>
movsbq %al,%rax
addl   $0x1,-0x184(%rbx,%rax,4)
01
jmp    1140 <read_word+0x10>
pop    %rbx
ret

LLVM IR (-O0):
@.str = [18 x i8] c"enter your word: \00"
define void @read_word(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i8
store i32* %0, i32** %2
store i32 0, i32* %3
%5 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %10, %1
%7 = call signext i8 (...) @getchar()
store i8 %7, i8* %4
%8 = sext i8 %7 to i32
%9 = icmp ne i32 %8, 10
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i8, i8* %4
%12 = call signext i8 @tolower(i8 signext %11)
%13 = sext i8 %12 to i32
%14 = sub nsw i32 %13, 97
store i32 %14, i32* %3
%15 = load i32*, i32** %2
%16 = load i32, i32* %3
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %15, i64 %17
%19 = load i32, i32* %18
%20 = add nsw i32 %19, 1
store i32 %20, i32* %18
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"enter your word: \00"
define void @read_word(i32* nocapture %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0))
%3 = tail call signext i8 (...) @getchar()
%4 = icmp eq i8 %3, 10
br i1 %4, label %15, label %5
5: ; preds = %1, %5
%6 = phi i8 [ %13, %5 ], [ %3, %1 ]
%7 = tail call signext i8 @tolower(i8 signext %6)
%8 = sext i8 %7 to i64
%9 = add nsw i64 %8, -97
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = add nsw i32 %11, 1
store i32 %12, i32* %10
%13 = tail call signext i8 (...) @getchar()
%14 = icmp eq i8 %13, 10
br i1 %14, label %15, label %5
15: ; preds = %5, %1
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t rot32l5(uint32_t x) { return (x << 5) | (x >> 27); }


x86 assembly (clang, -O0):
<rot32l5>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x5,%eax
mov    -0x4(%rbp),%ecx
sar    $0x1b,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rot32l5>:
mov    %edi,%eax
shl    $0x5,%eax
sar    $0x1b,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rot32l5(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 5
%5 = load i32, i32* %2
%6 = ashr i32 %5, 27
%7 = or i32 %4, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @rot32l5(i32 %0) {
%2 = shl i32 %0, 5
%3 = ashr i32 %0, 27
%4 = or i32 %2, %3
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ e_cmp();
int /*<<< orphan*/ e_imm();
void e_cmp_imm() {
  e_imm();
  e_cmp();
}


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

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

LLVM IR (-O0):
define void @e_cmp_imm() {
%1 = call i32 (...) @e_imm()
%2 = call i32 (...) @e_cmp()
ret void
}

LLVM IR (-O2):
define void @e_cmp_imm() {
%1 = tail call i32 (...) @e_imm()
%2 = tail call i32 (...) @e_cmp()
ret void
}
/* Variables and functions */
scalar_t__ getmem(size_t, int);
short *sgetmem(const int leng) {
  return ((short *)getmem((size_t)leng, sizeof(short)));
}


x86 assembly (clang, -O0):
<sgetmem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movslq -0x4(%rbp),%rdi
mov    $0x2,%esi
call   1030 <getmem@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgetmem>:
movslq %edi,%rdi
mov    $0x2,%esi
jmp    1030 <getmem@plt>

LLVM IR (-O0):
define i16* @sgetmem(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sext i32 %3 to i64
%5 = call i64 @getmem(i64 %4, i32 2)
%6 = inttoptr i64 %5 to i16*
ret i16* %6
}

LLVM IR (-O2):
define i16* @sgetmem(i32 %0) {
%2 = sext i32 %0 to i64
%3 = tail call i64 @getmem(i64 %2, i32 2)
%4 = inttoptr i64 %3 to i16*
ret i16* %4
}
/* Variables and functions */
int /*<<< orphan*/ gpio_set(int, int const);
void set_47(const int on) { gpio_set(47, on); }


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

x86 assembly (clang, -O2):
<set_47>:
mov    %edi,%esi
mov    $0x2f,%edi
jmp    1030 <gpio_set@plt>

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

LLVM IR (-O2):
define void @set_47(i32 %0) {
%2 = tail call i32 @gpio_set(i32 47, i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HwFlyingF3Handle();
int /*<<< orphan*/ UAVObjUpdated(int /*<<< orphan*/);
void HwFlyingF3Updated() { UAVObjUpdated(HwFlyingF3Handle()); }


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

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

LLVM IR (-O0):
define void @HwFlyingF3Updated() {
%1 = call i32 (...) @HwFlyingF3Handle()
%2 = call i32 @UAVObjUpdated(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HwFlyingF3Updated() {
%1 = tail call i32 (...) @HwFlyingF3Handle()
%2 = tail call i32 @UAVObjUpdated(i32 %1)
ret void
}
/* Variables and functions */
double MMHGtoMB(double);
double MMHGtoHPA(double INHG) {
  double HPA = MMHGtoMB(INHG);
  return HPA;
}


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

x86 assembly (clang, -O2):
<MMHGtoHPA>:
jmp    1030 <MMHGtoMB@plt>

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

LLVM IR (-O2):
define double @MMHGtoHPA(double %0) {
%2 = tail call double @MMHGtoMB(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ map2check_assume(int);
void map2check_crab_assume(char expr) { map2check_assume((int)expr); }


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

x86 assembly (clang, -O2):
<map2check_crab_assume>:
jmp    1030 <map2check_assume@plt>

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

LLVM IR (-O2):
define void @map2check_crab_assume(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i32 @map2check_assume(i32 %2)
ret void
}
/* Variables and functions */
char *my_ultoa(unsigned long, char *, unsigned int);
char *my_ltoa(long val, char *buf, unsigned int base) {
  unsigned long uval;
  if (val < 0)
    uval = -val, *buf++ = '-';
  else
    uval = val;
  return my_ultoa(uval, buf, base);
}


x86 assembly (clang, -O0):
<my_ltoa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpq   $0x0,-0x8(%rbp)
jge    114f <my_ltoa+0x3f>
xor    %eax,%eax
sub    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
movb   $0x2d,(%rax)
jmp    1157 <my_ltoa+0x47>
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <my_ultoa@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_ltoa>:
test   %rdi,%rdi
js     111a <my_ltoa+0xa>
jmp    1030 <my_ultoa@plt>
neg    %rdi
movb   $0x2d,(%rsi)
add    $0x1,%rsi
jmp    1030 <my_ultoa@plt>

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

LLVM IR (-O2):
define i8* @my_ltoa(i64 %0, i8* %1, i32 %2) {
%4 = icmp slt i64 %0, 0
br i1 %4, label %5, label %8
5: ; preds = %3
%6 = sub nsw i64 0, %0
%7 = getelementptr inbounds i8, i8* %1, i64 1
store i8 45, i8* %1
br label %8
8: ; preds = %3, %5
%9 = phi i8* [ %7, %5 ], [ %1, %3 ]
%10 = phi i64 [ %6, %5 ], [ %0, %3 ]
%11 = tail call i8* @my_ultoa(i64 %10, i8* %9, i32 %2)
ret i8* %11
}
int f_gt_rm1(float a1, float *a2) { return (((a1) > (*a2))); }


x86 assembly (clang, -O0):
<f_gt_rm1>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
mov    -0x10(%rbp),%rax
ucomiss (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_gt_rm1>:
xor    %eax,%eax
ucomiss (%rdi),%xmm0
seta   %al
ret

LLVM IR (-O0):
define i32 @f_gt_rm1(float %0, float* %1) {
%3 = alloca float
%4 = alloca float*
store float %0, float* %3
store float* %1, float** %4
%5 = load float, float* %3
%6 = load float*, float** %4
%7 = load float, float* %6
%8 = fcmp ogt float %5, %7
%9 = zext i1 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
define i32 @f_gt_rm1(float %0, float* nocapture %1) {
%3 = load float, float* %1
%4 = fcmp olt float %3, %0
%5 = zext i1 %4 to i32
ret i32 %5
}
void unw_regname() {}


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

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

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

LLVM IR (-O2):
define void @unw_regname() {
ret void
}
void changever_(idtype, iver, anal_user_code, ier) int *idtype;
int *iver;
char *anal_user_code;
short int *ier;
{
  *iver = -1;
  *ier = 232;
}


x86 assembly (clang, -O0):
<changever_>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movl   $0xffffffff,(%rax)
mov    -0x20(%rbp),%rax
movw   $0xe8,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<changever_>:
movl   $0xffffffff,(%rsi)
movw   $0xe8,(%rcx)
ret

LLVM IR (-O0):
define void @changever_(i32* %0, i32* %1, i8* %2, i16* %3) {
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i8*
%8 = alloca i16*
store i32* %0, i32** %5
store i32* %1, i32** %6
store i8* %2, i8** %7
store i16* %3, i16** %8
%9 = load i32*, i32** %6
store i32 -1, i32* %9
%10 = load i16*, i16** %8
store i16 232, i16* %10
ret void
}

LLVM IR (-O2):
define void @changever_(i32* nocapture readnone %0, i32* nocapture writeonly %1, i8* nocapture readnone %2, i16* nocapture writeonly %3) {
store i32 -1, i32* %1
store i16 232, i16* %3
ret void
}
char *strtok_r(char *str, const char *delim, char **saveptr) { return 0; }


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

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

LLVM IR (-O0):
define i8* @strtok_r(i8* %0, i8* %1, i8** %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8**
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8** %2, i8*** %6
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @strtok_r(i8* nocapture readnone %0, i8* nocapture readnone %1, i8** nocapture readnone %2) {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ EDFUnpackString(char const *, int);
double atof(int /*<<< orphan*/);
double EDFUnpackDouble(const char *inp, int fieldLen) {
  return atof(EDFUnpackString(inp, fieldLen));
}


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

x86 assembly (clang, -O2):
<EDFUnpackDouble>:
push   %rax
call   1030 <EDFUnpackString@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <atof@plt>

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

LLVM IR (-O2):
define double @EDFUnpackDouble(i8* %0, i32 %1) {
%3 = tail call i32 @EDFUnpackString(i8* %0, i32 %1)
%4 = tail call double @atof(i32 %3)
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ lookNarray(char *, unsigned int);
void lookreal16array(char *x, int n) {
  lookNarray((char *)x, (unsigned int)(n * 16));
}


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

x86 assembly (clang, -O2):
<lookreal16array>:
shl    $0x4,%esi
jmp    1030 <lookNarray@plt>

LLVM IR (-O0):
define void @lookreal16array(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = mul nsw i32 %6, 16
%8 = call i32 @lookNarray(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @lookreal16array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 4
%4 = tail call i32 @lookNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ print_prio_min_max(int);
void probe_sched_features() {
  int i;
  for (i = 0; i <= 6; i++) {
    print_prio_min_max(i);
  }
}


x86 assembly (clang, -O0):
<probe_sched_features>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x6,-0x4(%rbp)
jg     113f <probe_sched_features+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <print_prio_min_max@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <probe_sched_features+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<probe_sched_features>:
push   %rax
xor    %edi,%edi
call   1030 <print_prio_min_max@plt>
mov    $0x1,%edi
call   1030 <print_prio_min_max@plt>
mov    $0x2,%edi
call   1030 <print_prio_min_max@plt>
mov    $0x3,%edi
call   1030 <print_prio_min_max@plt>
mov    $0x4,%edi
call   1030 <print_prio_min_max@plt>
mov    $0x5,%edi
call   1030 <print_prio_min_max@plt>
mov    $0x6,%edi
pop    %rax
jmp    1030 <print_prio_min_max@plt>

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

LLVM IR (-O2):
define void @probe_sched_features() {
%1 = tail call i32 @print_prio_min_max(i32 0)
%2 = tail call i32 @print_prio_min_max(i32 1)
%3 = tail call i32 @print_prio_min_max(i32 2)
%4 = tail call i32 @print_prio_min_max(i32 3)
%5 = tail call i32 @print_prio_min_max(i32 4)
%6 = tail call i32 @print_prio_min_max(i32 5)
%7 = tail call i32 @print_prio_min_max(i32 6)
ret void
}