xunge/DecIR huggingface dataset:
void modulo_signed_Good(int i) {
  char arr[5];
  if (i >= 0) {
    arr[i % 5] = 123;
  }
}


x86 assembly (clang, -O0):
<modulo_signed_Good>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jl     1124 <modulo_signed_Good+0x24>
mov    -0x4(%rbp),%eax
mov    $0x5,%ecx
cltd
idiv   %ecx
movslq %edx,%rax
movb   $0x7b,-0x9(%rbp,%rax,1)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @modulo_signed_Good(i32 %0) {
%2 = alloca i32
%3 = alloca [5 x i8]
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = icmp sge i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i32, i32* %2
%8 = srem i32 %7, 5
%9 = sext i32 %8 to i64
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 %9
store i8 123, i8* %10
br label %11
11: ; preds = %6, %1
ret void
}

LLVM IR (-O2):
define void @modulo_signed_Good(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ setenv(char *, char *, int);
void builtin_set(char *c_argv[], int c_argc) {
  if (c_argc != 2) {
    printf("usage: set name value\n");
  } else {
    setenv(c_argv[1], c_argv[2], 1);
  }
}


x86 assembly (clang, -O0):
<builtin_set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
je     114a <builtin_set+0x2a>
lea    0xec0(%rip),%rdi
call   1040 <printf@plt>
jmp    1164 <builtin_set+0x44>
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%rsi
mov    $0x1,%edx
call   1030 <setenv@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<builtin_set>:
cmp    $0x2,%esi
jne    113a <builtin_set+0x1a>
mov    0x8(%rdi),%rax
mov    0x10(%rdi),%rsi
mov    %rax,%rdi
mov    $0x1,%edx
jmp    1040 <setenv@plt>
lea    0xebf(%rip),%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [23 x i8] c"usage: set name value\0A\00"
define void @builtin_set(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 = icmp ne i32 %5, 2
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
br label %17
9: ; preds = %2
%10 = load i8**, i8*** %3
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %3
%14 = getelementptr inbounds i8*, i8** %13, i64 2
%15 = load i8*, i8** %14
%16 = call i32 @setenv(i8* %12, i8* %15, i32 1)
br label %17
17: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
@str = [22 x i8] c"usage: set name value\00"
define void @builtin_set(i8** nocapture %0, i32 %1) {
%3 = icmp eq i32 %1, 2
br i1 %3, label %6, label %4
4: ; preds = %2
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
br label %12
6: ; preds = %2
%7 = getelementptr inbounds i8*, i8** %0, i64 1
%8 = load i8*, i8** %7
%9 = getelementptr inbounds i8*, i8** %0, i64 2
%10 = load i8*, i8** %9
%11 = tail call i32 @setenv(i8* %8, i8* %10, i32 1)
br label %12
12: ; preds = %6, %4
ret void
}
/* Type definitions */
typedef int int32_t;

/* Variables and functions */
void test_vorr_s32x4(int32_t *__restrict__ dest, int32_t *a, int32_t *b) {
  int i;
  for (i = 0; i < 4; i++) {
    dest[i] = a[i] | b[i];
  }
}


x86 assembly (clang, -O0):
<test_vorr_s32x4>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    1150 <test_vorr_s32x4+0x50>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
mov    -0x18(%rbp),%rax
movslq -0x1c(%rbp),%rcx
or     (%rax,%rcx,4),%edx
mov    -0x8(%rbp),%rax
movslq -0x1c(%rbp),%rcx
mov    %edx,(%rax,%rcx,4)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1117 <test_vorr_s32x4+0x17>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_vorr_s32x4>:
movups (%rsi),%xmm0
movups (%rdx),%xmm1
orps   %xmm0,%xmm1
movups %xmm1,(%rdi)
ret

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

LLVM IR (-O2):
define void @test_vorr_s32x4(i32* noalias nocapture writeonly %0, i32* nocapture %1, i32* nocapture %2) {
%4 = bitcast i32* %1 to <4 x i32>*
%5 = load <4 x i32>, <4 x i32>* %4
%6 = bitcast i32* %2 to <4 x i32>*
%7 = load <4 x i32>, <4 x i32>* %6
%8 = or <4 x i32> %7, %5
%9 = bitcast i32* %0 to <4 x i32>*
store <4 x i32> %8, <4 x i32>* %9
ret void
}
needsprep(name) char *name;
{
  int file;
  char fc;
  file = open(name, 0);
  if (file < 0)
    return 0;
  if (read(file, &fc, 1) != 1)
    fc = 0;
  close(file);
  return fc == '#';
}


x86 assembly (clang, -O0):
<needsprep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x0,%al
call   1050 <open@plt>
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jge    1162 <needsprep+0x32>
movl   $0x0,-0x4(%rbp)
jmp    119e <needsprep+0x6e>
mov    -0x14(%rbp),%edi
lea    -0x15(%rbp),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1040 <read@plt>
cmp    $0x1,%eax
je     1182 <needsprep+0x52>
movb   $0x0,-0x15(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x0,%al
call   1030 <close@plt>
movsbl -0x15(%rbp),%eax
cmp    $0x23,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<needsprep>:
push   %rbp
push   %rbx
push   %rax
xor    %ebp,%ebp
xor    %esi,%esi
xor    %eax,%eax
call   1050 <open@plt>
test   %eax,%eax
js     1175 <needsprep+0x45>
mov    %eax,%ebx
lea    0x7(%rsp),%rsi
mov    %eax,%edi
mov    $0x1,%edx
xor    %eax,%eax
call   1040 <read@plt>
cmp    $0x1,%eax
je     1161 <needsprep+0x31>
movb   $0x0,0x7(%rsp)
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <close@plt>
xor    %ebp,%ebp
cmpb   $0x23,0x7(%rsp)
sete   %bpl
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @needsprep(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @open to i32 (i8*, i32, ...)*)(i8* %6, i32 0)
store i32 %7, i32* %4
%8 = load i32, i32* %4
%9 = icmp slt i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 0, i32* %2
br label %23
11: ; preds = %1
%12 = load i32, i32* %4
%13 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %12, i8* %5, i32 1)
%14 = icmp ne i32 %13, 1
br i1 %14, label %15, label %16
15: ; preds = %11
store i8 0, i8* %5
br label %16
16: ; preds = %15, %11
%17 = load i32, i32* %4
%18 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %17)
%19 = load i8, i8* %5
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 35
%22 = zext i1 %21 to i32
store i32 %22, i32* %2
br label %23
23: ; preds = %16, %10
%24 = load i32, i32* %2
ret i32 %24
}

LLVM IR (-O2):
define i32 @needsprep(i8* %0) {
%2 = alloca i8
%3 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @open to i32 (i8*, i32, ...)*)(i8* %0, i32 0)
%4 = icmp slt i32 %3, 0
br i1 %4, label %14, label %5
5: ; preds = %1
%6 = call i32 (i32, i8*, i32, ...) bitcast (i32 (...)* @read to i32 (i32, i8*, i32, ...)*)(i32 %3, i8* %2, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %9, label %8
8: ; preds = %5
store i8 0, i8* %2
br label %9
9: ; preds = %8, %5
%10 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %3)
%11 = load i8, i8* %2
%12 = icmp eq i8 %11, 35
%13 = zext i1 %12 to i32
br label %14
14: ; preds = %1, %9
%15 = phi i32 [ %13, %9 ], [ 0, %1 ]
ret i32 %15
}
char *next_word(char const *s, char c) {
  while (*s && *s == c)
    s++;
  return ((char *)s);
}


x86 assembly (clang, -O0):
<next_word>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %rdi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0xa(%rbp)
je     1136 <next_word+0x36>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
movsbl -0x9(%rbp),%ecx
cmp    %ecx,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    1146 <next_word+0x46>
jmp    1157 <next_word+0x57>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110e <next_word+0xe>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_word>:
mov    %rdi,%rax
add    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
movzbl 0x1(%rax),%ecx
add    $0x1,%rax
test   %cl,%cl
je     1121 <next_word+0x21>
cmp    %sil,%cl
je     1110 <next_word+0x10>
ret

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

LLVM IR (-O2):
define i8* @next_word(i8* %0, i8 signext %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %0, %2 ], [ %9, %3 ]
%5 = load i8, i8* %4
%6 = icmp ne i8 %5, 0
%7 = icmp eq i8 %5, %1
%8 = and i1 %6, %7
%9 = getelementptr inbounds i8, i8* %4, i64 1
br i1 %8, label %3, label %10
10: ; preds = %3
ret i8* %4
}
/* Variables and functions */
double measure_fc_access(int, int);
int /*<<< orphan*/ printf(char *, int, int, double);
void measure_read_time(int fd, int num_threads) {
  double read_time = measure_fc_access(fd, (1 << 13));
  printf("%d threads, %d MB: %.2f us/block\n", num_threads,
         (1 << 13) * 4096 / 1024 / 1024, read_time / 1000 / (1 << 13));
}


x86 assembly (clang, -O0):
<measure_read_time>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x2000,%esi
call   1030 <measure_fc_access@plt>
movsd  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%esi
movsd  -0x10(%rbp),%xmm0
movsd  0xeb8(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xea4(%rip),%xmm1
divsd  %xmm1,%xmm0
lea    0xea9(%rip),%rdi
mov    $0x20,%edx
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<measure_read_time>:
push   %rbx
mov    %esi,%ebx
mov    $0x2000,%esi
call   1030 <measure_fc_access@plt>
divsd  0xecb(%rip),%xmm0
mulsd  0xecb(%rip),%xmm0
lea    0xecc(%rip),%rdi
mov    %ebx,%esi
mov    $0x20,%edx
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [34 x i8] c"%d threads, %d MB: %.2f us/block\0A\00"
define void @measure_read_time(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call double @measure_fc_access(i32 %6, i32 8192)
store double %7, double* %5
%8 = load i32, i32* %4
%9 = load double, double* %5
%10 = fdiv double %9, 1.000000e+03
%11 = fdiv double %10, 8.192000e+03
%12 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %8, i32 32, double %11)
ret void
}

LLVM IR (-O2):
@.str = [34 x i8] c"%d threads, %d MB: %.2f us/block\0A\00"
define void @measure_read_time(i32 %0, i32 %1) {
%3 = tail call double @measure_fc_access(i32 %0, i32 8192)
%4 = fdiv double %3, 1.000000e+03
%5 = fmul double %4, 0x3F20000000000000
%6 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 %1, i32 32, double %5)
ret void
}
/* Variables and functions */
int rom_present(char *);
int paradise_wd90c30_standalone_available(void) {
  return rom_present(L"roms/video/wd90c30/90C30-LR.VBI");
}


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

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

LLVM IR (-O0):
@.str = [32 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 119, i32 100, i32 57, i32 48, i32 99, i32 51, i32 48, i32 47, i32 57, i32 48, i32 67, i32 51, i32 48, i32 45, i32 76, i32 82, i32 46, i32 86, i32 66, i32 73, i32 0]
define i32 @paradise_wd90c30_standalone_available() {
%1 = call i32 @rom_present(i8* bitcast ([32 x i32]* @.str to i8*))
ret i32 %1
}

LLVM IR (-O2):
@.str = [32 x i32] [i32 114, i32 111, i32 109, i32 115, i32 47, i32 118, i32 105, i32 100, i32 101, i32 111, i32 47, i32 119, i32 100, i32 57, i32 48, i32 99, i32 51, i32 48, i32 47, i32 57, i32 48, i32 67, i32 51, i32 48, i32 45, i32 76, i32 82, i32 46, i32 86, i32 66, i32 73, i32 0]
define i32 @paradise_wd90c30_standalone_available() {
%1 = tail call i32 @rom_present(i8* bitcast ([32 x i32]* @.str to i8*))
ret i32 %1
}
int test(int n) {
  if ((n & -n) != n)
    __builtin_unreachable();
  return n;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    %ecx,%ecx
sub    -0x4(%rbp),%ecx
and    %ecx,%eax
cmp    -0x4(%rbp),%eax
je     111a <test+0x1a>
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test(i32 returned %0) {
%2 = tail call i32 @llvm.ctpop.i32(i32 %0)
%3 = icmp ult i32 %2, 2
tail call void @llvm.assume(i1 %3)
ret i32 %0
}
/* Variables and functions */
int /*<<< orphan*/ BootComCheckActivationRequest();
int /*<<< orphan*/ BootComInit();
int /*<<< orphan*/ Init();
int /*<<< orphan*/ LedToggle();
int main(void) {
  Init();
  BootComInit();
  while (1) {
    LedToggle();
    BootComCheckActivationRequest();
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1050 <Init@plt>
mov    $0x0,%al
call   1040 <BootComInit@plt>
mov    $0x0,%al
call   1030 <LedToggle@plt>
mov    $0x0,%al
call   1060 <BootComCheckActivationRequest@plt>
jmp    115d <main+0x1d>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <Init@plt>
xor    %eax,%eax
call   1040 <BootComInit@plt>
nop
xor    %eax,%eax
call   1030 <LedToggle@plt>
xor    %eax,%eax
call   1060 <BootComCheckActivationRequest@plt>
jmp    1150 <main+0x10>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @Init()
%3 = call i32 (...) @BootComInit()
br label %4
4: ; preds = %0, %4
%5 = call i32 (...) @LedToggle()
%6 = call i32 (...) @BootComCheckActivationRequest()
br label %4
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @Init()
%2 = tail call i32 (...) @BootComInit()
br label %3
3: ; preds = %0, %3
%4 = tail call i32 (...) @LedToggle()
%5 = tail call i32 (...) @BootComCheckActivationRequest()
br label %3
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int /*<<< orphan*/ state;
};
typedef TYPE_1__ XButtonPressedEvent;

/* Variables and functions */
unsigned get_XButtonPressedEvent_state(void *_p) {
  return (unsigned)((XButtonPressedEvent *)_p)->state;
}


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

x86 assembly (clang, -O2):
<get_XButtonPressedEvent_state>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @get_XButtonPressedEvent_state(i8* nocapture %0) {
%2 = bitcast i8* %0 to i32*
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
void *__coverity_alloc__(int);
int /*<<< orphan*/ __coverity_mark_as_afm_allocated__(void *, char *);
void *H5Dget_space(void *dataset_id) {
  void *id = __coverity_alloc__(10);
  __coverity_mark_as_afm_allocated__(id, "H5Sclose");
  return id;
}


x86 assembly (clang, -O0):
<H5Dget_space>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0xa,%edi
call   1040 <__coverity_alloc__@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xebb(%rip),%rsi
call   1030 <__coverity_mark_as_afm_allocated__@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<H5Dget_space>:
push   %rbx
mov    $0xa,%edi
call   1040 <__coverity_alloc__@plt>
mov    %rax,%rbx
lea    0xecb(%rip),%rsi
mov    %rax,%rdi
call   1030 <__coverity_mark_as_afm_allocated__@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [9 x i8] c"H5Sclose\00"
define i8* @H5Dget_space(i8* nocapture readnone %0) {
%2 = tail call i8* @__coverity_alloc__(i32 10)
%3 = tail call i32 @__coverity_mark_as_afm_allocated__(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i8* %2
}
/* Type definitions */
typedef int uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ chr1setBank6(int);
void vrc7setParamsD000(uint16_t addr, uint8_t val) {
  (void)addr;
  chr1setBank6(val << 10);
}


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

x86 assembly (clang, -O2):
mov    %esi,%edi
shl    $0xa,%edi
jmp    1030 <chr1setBank6@plt>

LLVM IR (-O0):
define void @vrc7setParamsD000(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
%7 = shl i32 %6, 10
%8 = call i32 @chr1setBank6(i32 %7)
ret void
}

LLVM IR (-O2):
define void @vrc7setParamsD000(i32 %0, i32 %1) {
%3 = shl i32 %1, 10
%4 = tail call i32 @chr1setBank6(i32 %3)
ret void
}
void _dl_debug_state(void) {}


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

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

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

LLVM IR (-O2):
define void @_dl_debug_state() {
ret void
}
int multiply(int x, int y) {
  int i = 0;
  int sum = 0;
  while ((y >> i) > 0) {
    int b = (y >> i) & 0x1;
    if (b == 1) {
      sum += x << i;
    }
    i++;
  }
  return sum;
}


x86 assembly (clang, -O0):
<multiply>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
cmp    $0x0,%eax
jle    115d <multiply+0x5d>
mov    -0x8(%rbp),%eax
mov    -0xc(%rbp),%ecx
sar    %cl,%eax
and    $0x1,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x1,-0x14(%rbp)
jne    114f <multiply+0x4f>
mov    -0x4(%rbp),%eax
mov    -0xc(%rbp),%ecx
shl    %cl,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1118 <multiply+0x18>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<multiply>:
test   %esi,%esi
jle    112d <multiply+0x2d>
xor    %ecx,%ecx
mov    %esi,%edx
xor    %eax,%eax
nopw   0x0(%rax,%rax,1)
and    $0x1,%edx
mov    %edi,%r8d
shl    %cl,%r8d
neg    %edx
and    %edx,%r8d
add    %r8d,%eax
add    $0x1,%ecx
mov    %esi,%edx
sar    %cl,%edx
test   %edx,%edx
jg     1110 <multiply+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @multiply(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %16
4: ; preds = %2, %4
%5 = phi i32 [ %14, %4 ], [ %1, %2 ]
%6 = phi i32 [ %13, %4 ], [ 0, %2 ]
%7 = phi i32 [ %12, %4 ], [ 0, %2 ]
%8 = and i32 %5, 1
%9 = icmp eq i32 %8, 0
%10 = shl i32 %0, %6
%11 = select i1 %9, i32 0, i32 %10
%12 = add nsw i32 %11, %7
%13 = add nuw nsw i32 %6, 1
%14 = ashr i32 %1, %13
%15 = icmp sgt i32 %14, 0
br i1 %15, label %4, label %16
16: ; preds = %4, %2
%17 = phi i32 [ 0, %2 ], [ %12, %4 ]
ret i32 %17
}
char *langDbgDevMsxMusic() { return "MSX Music"; }


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

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

LLVM IR (-O0):
@.str = [10 x i8] c"MSX Music\00"
define i8* @langDbgDevMsxMusic() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [10 x i8] c"MSX Music\00"
define i8* @langDbgDevMsxMusic() {
ret i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ ILibLinkedList_Lock(void *);
void ILibQueue_Lock(void *q) { ILibLinkedList_Lock(q); }


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

x86 assembly (clang, -O2):
<ILibQueue_Lock>:
jmp    1030 <ILibLinkedList_Lock@plt>

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

LLVM IR (-O2):
define void @ILibQueue_Lock(i8* %0) {
%2 = tail call i32 @ILibLinkedList_Lock(i8* %0)
ret void
}
void f(int n, int (*a)[n]) {}


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

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

LLVM IR (-O0):
define void @f(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 = zext i32 %5 to i64
ret void
}

LLVM IR (-O2):
define void @f(i32 %0, i32* nocapture %1) {
ret void
}
/* Type definitions */
struct _IO_FILE {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ fprintf(struct _IO_FILE *, char *, int);
void smp_ol_main_2_unpacked(int *const red2, struct _IO_FILE **const stderr2,
                            int *const rv2) {
  {
    {
      fprintf((*stderr2), "Result = %d\n", (*red2));
      if ((*red2) != 100) {
        (*rv2) = 1;
      }
    }
  }
}


x86 assembly (clang, -O0):
<smp_ol_main_2_unpacked>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xec8(%rip),%rsi
call   1030 <fprintf@plt>
mov    -0x8(%rbp),%rax
cmpl   $0x64,(%rax)
je     1154 <smp_ol_main_2_unpacked+0x44>
mov    -0x18(%rbp),%rax
movl   $0x1,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<smp_ol_main_2_unpacked>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
mov    (%rsi),%rdi
mov    (%rbx),%edx
lea    0xeda(%rip),%rsi
call   1030 <fprintf@plt>
cmpl   $0x64,(%rbx)
je     1137 <smp_ol_main_2_unpacked+0x27>
movl   $0x1,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
%struct._IO_FILE = type { i32 }
@.str = [13 x i8] c"Result = %d\0A\00"
define void @smp_ol_main_2_unpacked(i32* nocapture %0, %struct._IO_FILE** nocapture %1, i32* nocapture writeonly %2) {
%4 = load %struct._IO_FILE*, %struct._IO_FILE** %1
%5 = load i32, i32* %0
%6 = tail call i32 @fprintf(%struct._IO_FILE* %4, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %5)
%7 = load i32, i32* %0
%8 = icmp eq i32 %7, 100
br i1 %8, label %10, label %9
9: ; preds = %3
store i32 1, i32* %2
br label %10
10: ; preds = %9, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delete_string(char *, char);
int /*<<< orphan*/ scanf(char *, char *);
int /*<<< orphan*/ system(char *);
int main() {
  extern void enter(char str[]);
  extern void print(char str[]);
  char c, str[100];
  enter(str);
  scanf("%c", &c);
  delete_string(str, c);
  print(str);
  system("pause");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x70(%rbp),%rdi
call   1050 <enter@plt>
lea    0xe91(%rip),%rdi
lea    -0x5(%rbp),%rsi
call   1070 <scanf@plt>
lea    -0x70(%rbp),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <delete_string@plt>
lea    -0x70(%rbp),%rdi
call   1060 <print@plt>
lea    0xe6e(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x80,%rsp
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <enter@plt>
lea    0xe94(%rip),%rdi
lea    0xf(%rsp),%rsi
call   1070 <scanf@plt>
movsbl 0xf(%rsp),%esi
mov    %rbx,%rdi
call   1030 <delete_string@plt>
mov    %rbx,%rdi
call   1060 <print@plt>
lea    0xe71(%rip),%rdi
call   1040 <system@plt>
xor    %eax,%eax
add    $0x80,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
@.str.1 = [6 x i8] c"pause\00"
define i32 @main() {
%1 = alloca i8
%2 = alloca [100 x i8]
%3 = getelementptr inbounds [100 x i8], [100 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* %1)
%5 = load i8, i8* %1
%6 = call i32 @delete_string(i8* %3, i8 signext %5)
%7 = call i32 @system(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int pow(double, double);
double bmp_altitude(double p) {
  return 145437.86 * (1 - pow((p / 1013.25), 0.190294496));
}


x86 assembly (clang, -O0):
<bmp_altitude>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee6(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  0xed2(%rip),%xmm1
call   1030 <pow@plt>
mov    %eax,%ecx
mov    $0x1,%eax
sub    %ecx,%eax
cvtsi2sd %eax,%xmm1
movsd  0xeb0(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmp_altitude>:
push   %rax
divsd  0xee7(%rip),%xmm0
movsd  0xee7(%rip),%xmm1
call   1030 <pow@plt>
mov    $0x1,%ecx
sub    %eax,%ecx
xorps  %xmm0,%xmm0
cvtsi2sd %ecx,%xmm0
mulsd  0xed4(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @bmp_altitude(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fdiv double %3, 1.013250e+03
%5 = call i32 @pow(double %4, double 0x3FC85B91EE76E303)
%6 = sub nsw i32 1, %5
%7 = sitofp i32 %6 to double
%8 = fmul double 0x4101C0EEE147AE14, %7
ret double %8
}

LLVM IR (-O2):
define double @bmp_altitude(double %0) {
%2 = fdiv double %0, 1.013250e+03
%3 = tail call i32 @pow(double %2, double 0x3FC85B91EE76E303)
%4 = sub nsw i32 1, %3
%5 = sitofp i32 %4 to double
%6 = fmul double %5, 0x4101C0EEE147AE14
ret double %6
}
/* Variables and functions */
size_t zmalloc_size(void *ptr) {
  void *realptr = (char *)ptr - (sizeof(size_t));
  size_t size = *((size_t *)realptr);
  if (size & (sizeof(long) - 1))
    size += sizeof(long) - (size & (sizeof(long) - 1));
  return size + (sizeof(size_t));
}


x86 assembly (clang, -O0):
<zmalloc_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0xfffffffffffffff8,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
and    $0x7,%rax
cmp    $0x0,%rax
je     1149 <zmalloc_size+0x49>
mov    -0x18(%rbp),%rcx
and    $0x7,%rcx
mov    $0x8,%eax
sub    %rcx,%rax
add    -0x18(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x8,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zmalloc_size>:
mov    -0x8(%rdi),%rax
mov    %eax,%ecx
and    $0x7,%ecx
mov    $0x8,%edx
sub    %rcx,%rdx
test   %rcx,%rcx
cmove  %rcx,%rdx
add    %rdx,%rax
add    $0x8,%rax
ret

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

LLVM IR (-O2):
define i64 @zmalloc_size(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 -8
%3 = bitcast i8* %2 to i64*
%4 = load i64, i64* %3
%5 = and i64 %4, 7
%6 = icmp eq i64 %5, 0
%7 = sub nuw nsw i64 8, %5
%8 = select i1 %6, i64 0, i64 %7
%9 = add i64 %4, 8
%10 = add i64 %9, %8
ret i64 %10
}
/* Type definitions */
struct ifaddrs {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct ifaddrs *);
void freeifaddrs(struct ifaddrs *ifp) { free(ifp); }


x86 assembly (clang, -O0):
<freeifaddrs>:
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):
<freeifaddrs>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.ifaddrs = type { i32 }
define void @freeifaddrs(%struct.ifaddrs* nocapture %0) {
%2 = tail call i32 @free(%struct.ifaddrs* %0)
ret void
}
short int isLowerExtendedLetter(unsigned char chrsource) {
  if ((chrsource >= 224) && (chrsource <= 255))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isLowerExtendedLetter>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x3(%rbp)
movzbl -0x3(%rbp),%eax
cmp    $0xe0,%eax
jl     1133 <isLowerExtendedLetter+0x33>
movzbl -0x3(%rbp),%eax
cmp    $0xff,%eax
jg     1133 <isLowerExtendedLetter+0x33>
movw   $0x1,-0x2(%rbp)
jmp    1139 <isLowerExtendedLetter+0x39>
movw   $0x0,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLowerExtendedLetter>:
xor    %eax,%eax
cmp    $0xe0,%dil
setae  %al
ret

LLVM IR (-O0):
define signext i16 @isLowerExtendedLetter(i8 zeroext %0) {
%2 = alloca i16
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sge i32 %5, 224
br i1 %6, label %7, label %12
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sle i32 %9, 255
br i1 %10, label %11, label %12
11: ; preds = %7
store i16 1, i16* %2
br label %13
12: ; preds = %7, %1
store i16 0, i16* %2
br label %13
13: ; preds = %12, %11
%14 = load i16, i16* %2
ret i16 %14
}

LLVM IR (-O2):
define signext i16 @isLowerExtendedLetter(i8 zeroext %0) {
%2 = icmp ugt i8 %0, -33
%3 = zext i1 %2 to i16
ret i16 %3
}
void blankVFSMobserve(void *info, int seqid, int seqpos, int stateid) {
  return;
}


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

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

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

LLVM IR (-O2):
define void @blankVFSMobserve(i8* nocapture %0, i32 %1, i32 %2, i32 %3) {
ret void
}
/* Variables and functions */
size_t strlen(const char *string) {
  size_t counter = 0;
  while (string[counter])
    counter++;
  return counter;
}


x86 assembly (clang, -O0):
<strlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1133 <strlen+0x33>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <strlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strlen>:
mov    $0xffffffffffffffff,%rax
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,0x1(%rdi,%rax,1)
lea    0x1(%rax),%rax
jne    1110 <strlen+0x10>
ret

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

LLVM IR (-O2):
define i64 @strlen(i8* nocapture %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i64 [ 0, %1 ], [ %7, %2 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = icmp eq i8 %5, 0
%7 = add i64 %3, 1
br i1 %6, label %8, label %2
8: ; preds = %2
ret i64 %3
}
/* Variables and functions */
int core3_swap(char *, int);
int U_EMRSETARCDIRECTION_swap(char *record, int torev) {
  return (core3_swap(record, torev));
}


x86 assembly (clang, -O0):
<U_EMRSETARCDIRECTION_swap>:
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 <core3_swap@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<U_EMRSETARCDIRECTION_swap>:
jmp    1030 <core3_swap@plt>

LLVM IR (-O0):
define i32 @U_EMRSETARCDIRECTION_swap(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 @core3_swap(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @U_EMRSETARCDIRECTION_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core3_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
void *liballoc_memset(void *s, int c, size_t n) {
  unsigned int i;
  for (i = 0; i < n; i++)
    ((char *)s)[i] = c;
  return s;
}


x86 assembly (clang, -O0):
<liballoc_memset>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
cmp    -0x18(%rbp),%rax
jae    1140 <liballoc_memset+0x40>
mov    -0xc(%rbp),%eax
mov    %al,%dl
mov    -0x8(%rbp),%rax
mov    -0x1c(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1116 <liballoc_memset+0x16>
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<liballoc_memset>:
mov    %rdi,%rax
test   %rdx,%rdx
je     111c <liballoc_memset+0x1c>
xor    %ecx,%ecx
nopw   0x0(%rax,%rax,1)
mov    %sil,(%rax,%rcx,1)
add    $0x1,%ecx
cmp    %rdx,%rcx
jb     1110 <liballoc_memset+0x10>
ret

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

LLVM IR (-O2):
define i8* @liballoc_memset(i8* returned writeonly %0, i32 %1, i64 %2) {
%4 = icmp eq i64 %2, 0
br i1 %4, label %13, label %5
5: ; preds = %3
%6 = trunc i32 %1 to i8
br label %7
7: ; preds = %5, %7
%8 = phi i64 [ 0, %5 ], [ %11, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 %6, i8* %9
%10 = add nuw nsw i64 %8, 1
%11 = and i64 %10, 4294967295
%12 = icmp ult i64 %11, %2
br i1 %12, label %7, label %13
13: ; preds = %7, %3
ret i8* %0
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int abs(int);
void abs_small_negative() {
  Assert_real((abs(-456) == 456),
              "/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/stdlib/abs.c",
              17, ("Should be == 456"));
}


x86 assembly (clang, -O0):
<abs_small_negative>:
push   %rbp
mov    %rsp,%rbp
mov    $0xfffffe38,%edi
call   1030 <abs@plt>
cmp    $0x1c8,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebe(%rip),%rsi
mov    $0x11,%edx
lea    0xf52(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<abs_small_negative>:
lea    0xee9(%rip),%rsi
lea    0xf82(%rip),%rcx
mov    $0x1,%edi
mov    $0x11,%edx
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [160 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/stdlib/abs.c\00"
@.str.1 = [17 x i8] c"Should be == 456\00"
define void @abs_small_negative() {
%1 = call i32 @abs(i32 -456)
%2 = icmp eq i32 %1, 456
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 17, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [160 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/stdlib/abs.c\00"
@.str.1 = [17 x i8] c"Should be == 456\00"
define void @abs_small_negative() {
%1 = tail call i32 @Assert_real(i32 1, i8* getelementptr inbounds ([160 x i8], [160 x i8]* @.str, i64 0, i64 0), i32 17, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int Cyc_InsertChecks_hash_ptr(void *s) {
  void *_T0;
  int _T1;
  _T0 = s;
  _T1 = (int)_T0;
  return _T1;
}


x86 assembly (clang, -O0):
<Cyc_InsertChecks_hash_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @Cyc_InsertChecks_hash_ptr(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = trunc i64 %2 to i32
ret i32 %3
}
void ff_hevc_v_loop_filter_luma_12_sse2() {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ Interpolate_3(int /*<<< orphan*/, int, int /*<<< orphan*/,
                                 int, int /*<<< orphan*/, int, int);
uint32_t Interp10(uint32_t c1, uint32_t c2, uint32_t c3) {
  return Interpolate_3(c1, 14, c2, 1, c3, 1, 4);
}


x86 assembly (clang, -O0):
<Interp10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%r8d
mov    $0xe,%esi
mov    $0x1,%r9d
mov    %r9d,%ecx
movl   $0x4,(%rsp)
call   1030 <Interpolate_3@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp10>:
push   %rax
mov    %edx,%r8d
mov    %esi,%edx
movl   $0x4,(%rsp)
mov    $0xe,%esi
mov    $0x1,%ecx
mov    $0x1,%r9d
call   1030 <Interpolate_3@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @Interp10(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @Interpolate_3(i32 %0, i32 14, i32 %1, i32 1, i32 %2, i32 1, i32 4)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void printError() {
  printf("Program called error!");
  exit(-1);
}


x86 assembly (clang, -O0):
<printError>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<printError>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    $0xffffffff,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [22 x i8] c"Program called error!\00"
define void @printError() {
%1 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
@.str = [22 x i8] c"Program called error!\00"
define void @printError() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ max_heapify(int *, int, int);
void build_max_heap(int *arr, int size) {
  int i;
  for (i = (size - 1) / 2; i >= 0; --i) {
    max_heapify(arr, i, size);
  }
}


x86 assembly (clang, -O0):
<build_max_heap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
cmpl   $0x0,-0x10(%rbp)
jl     1157 <build_max_heap+0x47>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1030 <max_heapify@plt>
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1130 <build_max_heap+0x20>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_max_heap>:
push   %rbp
push   %r14
push   %rbx
test   %esi,%esi
js     1141 <build_max_heap+0x31>
mov    %esi,%ebx
mov    %rdi,%r14
lea    -0x1(%rbx),%eax
shr    $0x1f,%eax
lea    (%rbx,%rax,1),%ebp
add    $0xffffffff,%ebp
sar    %ebp
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <max_heapify@plt>
add    $0xffffffff,%ebp
jb     1130 <build_max_heap+0x20>
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @build_max_heap(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = sub nsw i32 %6, 1
%8 = sdiv i32 %7, 2
store i32 %8, i32* %5
br label %9
9: ; preds = %17, %2
%10 = load i32, i32* %5
%11 = icmp sge i32 %10, 0
br i1 %11, label %12, label %20
12: ; preds = %9
%13 = load i32*, i32** %3
%14 = load i32, i32* %5
%15 = load i32, i32* %4
%16 = call i32 @max_heapify(i32* %13, i32 %14, i32 %15)
br label %17
17: ; preds = %12
%18 = load i32, i32* %5
%19 = add nsw i32 %18, -1
store i32 %19, i32* %5
br label %9
20: ; preds = %9
ret void
}

LLVM IR (-O2):
define void @build_max_heap(i32* %0, i32 %1) {
%3 = icmp sgt i32 %1, -1
br i1 %3, label %4, label %12
4: ; preds = %2
%5 = add nsw i32 %1, -1
%6 = sdiv i32 %5, 2
br label %7
7: ; preds = %4, %7
%8 = phi i32 [ %10, %7 ], [ %6, %4 ]
%9 = tail call i32 @max_heapify(i32* %0, i32 %8, i32 %1)
%10 = add nsw i32 %8, -1
%11 = icmp eq i32 %8, 0
br i1 %11, label %12, label %7
12: ; preds = %7, %2
ret void
}