xunge/DecIR huggingface dataset:
int get_id(int *id_array, int contact) {
  if (contact < 0 || contact >= 64) {
    return -1;
  }
  return id_array[contact];
}


x86 assembly (clang, -O0):
<get_id>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     111f <get_id+0x1f>
cmpl   $0x40,-0x14(%rbp)
jl     112b <get_id+0x2b>
movl   $0xffffffff,-0x4(%rbp)
jmp    1139 <get_id+0x39>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_id>:
mov    $0xffffffff,%eax
cmp    $0x3f,%esi
ja     110f <get_id+0xf>
mov    %esi,%eax
mov    (%rdi,%rax,4),%eax
ret

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

LLVM IR (-O2):
define i32 @get_id(i32* nocapture %0, i32 %1) {
%3 = icmp ugt i32 %1, 63
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = zext i32 %1 to i64
%6 = getelementptr inbounds i32, i32* %0, i64 %5
%7 = load i32, i32* %6
br label %8
8: ; preds = %2, %4
%9 = phi i32 [ %7, %4 ], [ -1, %2 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ f(char *);
int main(void) {
  char a[7];
  f(a);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x7(%rbp),%rdi
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0x1(%rsp),%rdi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [7 x i8]
%2 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
%3 = call i32 @f(i8* %2)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [7 x i8]
%2 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
%3 = call i32 @f(i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void help(void) {
  fprintf(
      stderr,
      " ---------------------------------------------------------------\n"
      " Help for input plugin..: "
      "TESTPICTURE input plugin"
      "\n"
      " ---------------------------------------------------------------\n"
      " The following parameters can be passed to this plugin:\n\n"
      " [-d | --delay ]........: delay to pause between frames\n"
      " [-r | --resolution]....: can be 960x720, 640x480, 320x240, 160x120\n"
      " ---------------------------------------------------------------\n");
}


x86 assembly (clang, -O0):
<help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<help>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [428 x i8] c" ---------------------------------------------------------------\0A Help for input plugin..: TESTPICTURE input plugin\0A ---------------------------------------------------------------\0A The following parameters can be passed to this plugin:\0A\0A [-d | --delay ]........: delay to pause between frames\0A [-r | --resolution]....: can be 960x720, 640x480, 320x240, 160x120\0A ---------------------------------------------------------------\0A\00"
define void @help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([428 x i8], [428 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [428 x i8] c" ---------------------------------------------------------------\0A Help for input plugin..: TESTPICTURE input plugin\0A ---------------------------------------------------------------\0A The following parameters can be passed to this plugin:\0A\0A [-d | --delay ]........: delay to pause between frames\0A [-r | --resolution]....: can be 960x720, 640x480, 320x240, 160x120\0A ---------------------------------------------------------------\0A\00"
define void @help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([428 x i8], [428 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ islower(char);
char rotate(char c) {
  if (islower(c)) {
    return ('a' + (c - 'a' + 3) % 26);
  } else {
    return c;
  }
}


x86 assembly (clang, -O0):
<rotate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movsbl -0x2(%rbp),%edi
call   1030 <islower@plt>
cmp    $0x0,%rax
je     1150 <rotate+0x40>
movsbl -0x2(%rbp),%eax
sub    $0x61,%eax
add    $0x3,%eax
mov    $0x1a,%ecx
cltd
idiv   %ecx
add    $0x61,%edx
mov    %dl,%al
mov    %al,-0x1(%rbp)
jmp    1156 <rotate+0x46>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate>:
push   %rbx
mov    %edi,%ebx
call   1030 <islower@plt>
test   %rax,%rax
je     1140 <rotate+0x30>
movsbl %bl,%ebx
add    $0xffffffa2,%ebx
imul   $0x4ec5,%ebx,%eax
mov    %eax,%ecx
shr    $0x1f,%ecx
shr    $0x13,%eax
add    %ecx,%eax
lea    (%rax,%rax,4),%ecx
lea    (%rcx,%rcx,4),%ecx
add    %eax,%ecx
sub    %ecx,%ebx
add    $0x61,%bl
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @rotate(i8 signext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = call i64 @islower(i8 signext %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %15
7: ; preds = %1
%8 = load i8, i8* %3
%9 = sext i8 %8 to i32
%10 = sub nsw i32 %9, 97
%11 = add nsw i32 %10, 3
%12 = srem i32 %11, 26
%13 = add nsw i32 97, %12
%14 = trunc i32 %13 to i8
store i8 %14, i8* %2
br label %17
15: ; preds = %1
%16 = load i8, i8* %3
store i8 %16, i8* %2
br label %17
17: ; preds = %15, %7
%18 = load i8, i8* %2
ret i8 %18
}

LLVM IR (-O2):
define signext i8 @rotate(i8 signext %0) {
%2 = tail call i64 @islower(i8 signext %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = sext i8 %0 to i16
%6 = add nsw i16 %5, -94
%7 = srem i16 %6, 26
%8 = trunc i16 %7 to i8
%9 = add nsw i8 %8, 97
br label %10
10: ; preds = %1, %4
%11 = phi i8 [ %9, %4 ], [ %0, %1 ]
ret i8 %11
}
void closef(i) register i;
{
  if (i > 2)
    close(i);
}


x86 assembly (clang, -O0):
<closef>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x2,-0x4(%rbp)
jle    112f <closef+0x1f>
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <close@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<closef>:
cmp    $0x3,%edi
jl     111c <closef+0xc>
xor    %eax,%eax
jmp    1030 <close@plt>
ret

LLVM IR (-O0):
define void @closef(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp sgt i32 %3, 2
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %6)
br label %8
8: ; preds = %5, %1
ret void
}

LLVM IR (-O2):
define void @closef(i32 %0) {
%2 = icmp sgt i32 %0, 2
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i32, ...) bitcast (i32 (...)* @close to i32 (i32, ...)*)(i32 %0)
br label %5
5: ; preds = %3, %1
ret void
}
int f(int a, int b, int c) {
  a -= (short)b * (c >> 16);
  if (!a)
    return 10;
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
movswl %ax,%ecx
mov    -0x10(%rbp),%eax
sar    $0x10,%eax
imul   %eax,%ecx
mov    -0x8(%rbp),%eax
sub    %ecx,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    113a <f+0x3a>
movl   $0xa,-0x4(%rbp)
jmp    1140 <f+0x40>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movswl %si,%eax
sar    $0x10,%edx
imul   %eax,%edx
sub    %edx,%edi
mov    $0xa,%eax
cmovne %edi,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %6
%9 = trunc i32 %8 to i16
%10 = sext i16 %9 to i32
%11 = load i32, i32* %7
%12 = ashr i32 %11, 16
%13 = mul nsw i32 %10, %12
%14 = load i32, i32* %5
%15 = sub nsw i32 %14, %13
store i32 %15, i32* %5
%16 = load i32, i32* %5
%17 = icmp ne i32 %16, 0
br i1 %17, label %19, label %18
18: ; preds = %3
store i32 10, i32* %4
br label %21
19: ; preds = %3
%20 = load i32, i32* %5
store i32 %20, i32* %4
br label %21
21: ; preds = %19, %18
%22 = load i32, i32* %4
ret i32 %22
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = shl i32 %1, 16
%5 = ashr exact i32 %4, 16
%6 = ashr i32 %2, 16
%7 = mul nsw i32 %5, %6
%8 = sub nsw i32 %0, %7
%9 = icmp eq i32 %8, 0
%10 = select i1 %9, i32 10, i32 %8
ret i32 %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int getc(int /*<<< orphan*/ *);
int aiger_default_get(FILE *file) { return getc(file); }


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

x86 assembly (clang, -O2):
<aiger_default_get>:
jmp    1030 <getc@plt>

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

LLVM IR (-O2):
define i32 @aiger_default_get(i32* nocapture %0) {
%2 = tail call i32 @getc(i32* %0)
ret i32 %2
}
int main() {
  char *s;
  s = malloc(sizeof(char) * 6);
  *s = "hello\0";
  printf("s = [%c]\n", *s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x6,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
lea    0xeb8(%rip),%rcx
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%esi
lea    0xeaf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rax
movsbl %al,%esi
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [7 x i8] c"hello\00\00"
@.str.1 = [10 x i8] c"s = [%c]\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
%3 = call i8* @malloc(i64 6)
store i8* %3, i8** %2
%4 = load i8*, i8** %2
store i8 ptrtoint ([7 x i8]* @.str to i8), i8* %4
%5 = load i8*, i8** %2
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"hello\00\00"
@.str.1 = [10 x i8] c"s = [%c]\0A\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), i32 sext (i8 ptrtoint ([7 x i8]* @.str to i8) to i32))
ret i32 0
}
int replaceNewLine(char s[]) {
  int j = 0;
  while (s[j] != '\0') {
    if (s[j] == '\n') {
      s[j] = '|';
    }
    j++;
  }
  return 0;
}


x86 assembly (clang, -O0):
<replaceNewLine>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x0,%eax
je     1153 <replaceNewLine+0x53>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1145 <replaceNewLine+0x45>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x7c,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <replaceNewLine+0xf>
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @replaceNewLine(i8* nocapture %0) {
br label %2
2: ; preds = %7, %1
%3 = phi i64 [ %8, %7 ], [ 0, %1 ]
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
switch i8 %5, label %7 [
i8 0, label %9
i8 10, label %6
]
6: ; preds = %2
store i8 124, i8* %4
br label %7
7: ; preds = %2, %6
%8 = add nuw i64 %3, 1
br label %2
9: ; preds = %2
ret i32 0
}
void test_coverage_send_buffer(void) {}


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

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

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

LLVM IR (-O2):
define void @test_coverage_send_buffer() {
ret void
}
void f() {
  typedef int foo;
  int a;
  { int b; }
  {
    int a;
    foo b;
    {
      typedef float foo;
      float a;
      foo c;
    }
  }
}


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

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca float
%6 = alloca float
ret void
}

LLVM IR (-O2):
define void @f() {
ret void
}
int compare_char(void *key1, void *key2) {
  if (*(char *)key1 > *(char *)key2)
    return 1;
  else if (*(char *)key1 < *(char *)key2)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<compare_char>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jle    112e <compare_char+0x2e>
movl   $0x1,-0x4(%rbp)
jmp    1157 <compare_char+0x57>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    -0x18(%rbp),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
jge    1150 <compare_char+0x50>
movl   $0xffffffff,-0x4(%rbp)
jmp    1157 <compare_char+0x57>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_char>:
mov    (%rdi),%al
mov    (%rsi),%cl
xor    %edx,%edx
cmp    %cl,%al
setl   %dl
neg    %edx
cmp    %cl,%al
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_char(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp sgt i8 %3, %4
%6 = icmp slt i8 %3, %4
%7 = sext i1 %6 to i32
%8 = select i1 %5, i32 1, i32 %7
ret i32 %8
}
/* Type definitions */
typedef int int8_t;

/* Variables and functions */
int8_t dv_int8_t(int8_t a, int8_t b) { return a / b; }


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

x86 assembly (clang, -O2):
<dv_int8_t>:
mov    %edi,%eax
cltd
idiv   %esi
ret

LLVM IR (-O0):
define i32 @dv_int8_t(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 = sdiv i32 %5, %6
ret i32 %7
}

LLVM IR (-O2):
define i32 @dv_int8_t(i32 %0, i32 %1) {
%3 = sdiv i32 %0, %1
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("NUMA is not available\n");
  return 1;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"NUMA is not available\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [22 x i8] c"NUMA is not available\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int strlen(char *);
int remove_new_line(char *str) {
  int lenght = strlen(str);
  if (str[lenght - 1] == '\n') {
    str[lenght - 1] = '\0';
  }
  return lenght;
}


x86 assembly (clang, -O0):
<remove_new_line>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    1153 <remove_new_line+0x43>
mov    -0x8(%rbp),%rax
mov    -0xc(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<remove_new_line>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
movslq %eax,%rcx
cmpb   $0xa,-0x1(%rcx,%rbx,1)
jne    1128 <remove_new_line+0x18>
movb   $0x0,-0x1(%rbx,%rcx,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @remove_new_line(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = add nsw i32 %2, -1
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 10
br i1 %7, label %8, label %9
8: ; preds = %1
store i8 0, i8* %5
br label %9
9: ; preds = %8, %1
ret i32 %2
}
void f_pra() {}


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

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

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

LLVM IR (-O2):
define void @f_pra() {
ret void
}
/* Variables and functions */
unsigned char as2i9(char const *);
unsigned char as2i(const char *s) { return as2i9(s); }


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

x86 assembly (clang, -O2):
<as2i>:
jmp    1030 <as2i9@plt>

LLVM IR (-O0):
define zeroext i8 @as2i(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call zeroext i8 @as2i9(i8* %3)
ret i8 %4
}

LLVM IR (-O2):
define zeroext i8 @as2i(i8* %0) {
%2 = tail call zeroext i8 @as2i9(i8* %0)
ret i8 %2
}
/* Variables and functions */
int atoi(char *);
int baudrate(char *rate) {
  if (*rate == 'B')
    ++rate;
  return (atoi(rate));
}


x86 assembly (clang, -O0):
<baudrate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x42,%eax
jne    1138 <baudrate+0x28>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <atoi@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baudrate>:
xor    %eax,%eax
cmpb   $0x42,(%rdi)
sete   %al
add    %rax,%rdi
jmp    1030 <atoi@plt>

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

LLVM IR (-O2):
define i32 @baudrate(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 66
%4 = zext i1 %3 to i64
%5 = getelementptr i8, i8* %0, i64 %4
%6 = tail call i32 @atoi(i8* %5)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ sem_getvalue(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int main(void) {
  sem_getvalue(NULL, NULL);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @sem_getvalue(i32* null, i32* null)
ret i32 0
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int tune_continuation_parameters(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(70, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<tune_continuation_parameters>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x46,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tune_continuation_parameters>:
mov    $0x46,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @tune_continuation_parameters() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 70, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @tune_continuation_parameters() {
%1 = tail call i32 @_ada_use_c2phc(i32 70, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ system(char *);
void change_shell_size() { system("MODE con cols=170 lines=60"); }


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"MODE con cols=170 lines=60\00"
define void @change_shell_size() {
%1 = call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [27 x i8] c"MODE con cols=170 lines=60\00"
define void @change_shell_size() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret void
}
void gdk_event_get_screen() {}


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

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

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

LLVM IR (-O2):
define void @gdk_event_get_screen() {
ret void
}
void inclass_element2ASCII(char c) {}


x86 assembly (clang, -O0):
<inclass_element2ASCII>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @inclass_element2ASCII(i8 signext %0) {
ret void
}
/* Variables and functions */
scalar_t__ is_prime(unsigned int);
unsigned int get_prime(unsigned int num) {
  unsigned int i;
  for (i = num; is_prime(i) == 0; i++)
    ;
  return i;
}


x86 assembly (clang, -O0):
<get_prime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <is_prime@plt>
cmp    $0x0,%rax
jne    1146 <get_prime+0x36>
jmp    1138 <get_prime+0x28>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1121 <get_prime+0x11>
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_prime>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
call   1030 <is_prime@plt>
add    $0x1,%ebx
test   %rax,%rax
je     1120 <get_prime+0x10>
add    $0xffffffff,%ebx
mov    %ebx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @get_prime(i32 %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i32 [ %0, %1 ], [ %6, %2 ]
%4 = tail call i64 @is_prime(i32 %3)
%5 = icmp eq i64 %4, 0
%6 = add i32 %3, 1
br i1 %5, label %2, label %7
7: ; preds = %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ iscntrl(int);
void t_iscntrl_0xaf() {
  Assert_real((iscntrl(175) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_iscntrl.c",
              880, ("iscntrl should be 0 for 0xaf"));
}


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

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

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

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_iscntrl.c\00"
@.str.1 = [29 x i8] c"iscntrl should be 0 for 0xaf\00"
define void @t_iscntrl_0xaf() {
%1 = tail call i64 @iscntrl(i32 175)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 880, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void video_switch(void) {}


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

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

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

LLVM IR (-O2):
define void @video_switch() {
ret void
}
__attribute__((no, noclone)) unsigned __int128 t124_5mul(signed __int128 x) {
  unsigned __int128 r;
  if (__builtin_mul_overflow(x, (signed __int128)(1), &r))
    bar();
  return r;
}


x86 assembly (clang, -O0):
<t124_5mul>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x20(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x18(%rbp),%rcx
mov    %rcx,-0x28(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rsi
mov    %rsi,-0x48(%rbp)
sar    $0x3f,%rsi
mov    $0x1,%edx
mov    %rsi,%rax
imul   %rdx
mov    %rax,%r9
mov    %rdx,%r8
xor    %eax,%eax
mov    %eax,%edx
mov    %rsi,%rax
imul   %rdx
mov    %rdx,%rdi
mov    -0x48(%rbp),%rdx
add    %r9,%rax
adc    %r8,%rdi
xor    %rsi,%rax
xor    %rsi,%rdi
or     %rdi,%rax
and    $0x1,%esi
or     %rsi,%rax
setne  %al
mov    %rdx,-0x38(%rbp)
mov    %rcx,-0x40(%rbp)
test   $0x1,%al
jne    118f <t124_5mul+0x7f>
jmp    1196 <t124_5mul+0x86>
mov    $0x0,%al
call   1030 <bar@plt>
mov    -0x40(%rbp),%rax
mov    -0x38(%rbp),%rcx
mov    %rcx,-0x8(%rbp)
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    -0x8(%rbp),%rdx
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<t124_5mul>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rax
sar    $0x3f,%rax
je     112a <t124_5mul+0x1a>
xor    %eax,%eax
call   1030 <bar@plt>
mov    %r14,%rax
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define { i64, i64 } @t124_5mul(i64 %0, i64 %1) {
%3 = alloca i128
%4 = alloca i128
%5 = alloca i128
%6 = alloca i128
%7 = bitcast i128* %4 to { i64, i64 }*
%8 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 0
store i64 %0, i64* %8
%9 = getelementptr inbounds { i64, i64 }, { i64, i64 }* %7, i32 0, i32 1
store i64 %1, i64* %9
%10 = load i128, i128* %4
store i128 %10, i128* %5
%11 = load i128, i128* %5
%12 = sext i128 %11 to i129
%13 = call { i129, i1 } @llvm.smul.with.overflow.i129(i129 %12, i129 1)
%14 = extractvalue { i129, i1 } %13, 1
%15 = extractvalue { i129, i1 } %13, 0
%16 = trunc i129 %15 to i128
%17 = zext i128 %16 to i129
%18 = icmp ne i129 %15, %17
%19 = or i1 %14, %18
store i128 %16, i128* %6
br i1 %19, label %20, label %22
20: ; preds = %2
%21 = call i32 (...) @bar()
br label %22
22: ; preds = %20, %2
%23 = load i128, i128* %6
store i128 %23, i128* %3
%24 = bitcast i128* %3 to { i64, i64 }*
%25 = load { i64, i64 }, { i64, i64 }* %24
ret { i64, i64 } %25
}

LLVM IR (-O2):
define { i64, i64 } @t124_5mul(i64 %0, i64 %1) {
%3 = zext i64 %1 to i128
%4 = shl nuw i128 %3, 64
%5 = zext i64 %0 to i128
%6 = or i128 %4, %5
%7 = sext i128 %6 to i129
%8 = zext i128 %6 to i129
%9 = icmp eq i129 %7, %8
br i1 %9, label %12, label %10
10: ; preds = %2
%11 = tail call i32 (...) @bar()
br label %12
12: ; preds = %10, %2
%13 = insertvalue { i64, i64 } poison, i64 %0, 0
%14 = insertvalue { i64, i64 } %13, i64 %1, 1
ret { i64, i64 } %14
}
/* Variables and functions */
int /*<<< orphan*/ stdio_helper_fake_printf(char *, float);
void soru_2(float x) {
  stdio_helper_fake_printf("%f", x);
  stdio_helper_fake_printf("%3.f", x);
}


x86 assembly (clang, -O0):
<soru_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
lea    0xed7(%rip),%rdi
call   1030 <stdio_helper_fake_printf@plt>
movss  -0x4(%rbp),%xmm0
lea    0xec9(%rip),%rdi
call   1030 <stdio_helper_fake_printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<soru_2>:
push   %rax
movss  %xmm0,0x4(%rsp)
lea    0xee2(%rip),%rdi
call   1030 <stdio_helper_fake_printf@plt>
lea    0xed9(%rip),%rdi
movss  0x4(%rsp),%xmm0
pop    %rax
jmp    1030 <stdio_helper_fake_printf@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"%f\00"
@.str.1 = [5 x i8] c"%3.f\00"
define void @soru_2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = call i32 @stdio_helper_fake_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %3)
%5 = load float, float* %2
%6 = call i32 @stdio_helper_fake_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %5)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%f\00"
@.str.1 = [5 x i8] c"%3.f\00"
define void @soru_2(float %0) {
%2 = tail call i32 @stdio_helper_fake_printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), float %0)
%3 = tail call i32 @stdio_helper_fake_printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %0)
ret void
}
extern void __outbc_p(unsigned char value, unsigned short port) {
  __asm__ __volatile__("out"
                       "b"
                       " %"
                       "b"
                       "0,%"
                       ""
                       "1"
                       :
                       : "a"(value), "id"(port));
  __asm__ __volatile__("outb %al,$0x80");
}


x86 assembly (clang, -O0):
<__outbc_p>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %ax,-0x4(%rbp)
mov    -0x1(%rbp),%al
mov    -0x4(%rbp),%dx
out    %al,(%dx)
out    %al,$0x80
pop    %rbp
ret

x86 assembly (clang, -O2):
<__outbc_p>:
mov    %esi,%edx
mov    %edi,%eax
out    %al,(%dx)
out    %al,$0x80
ret

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

LLVM IR (-O2):
define void @__outbc_p(i8 zeroext %0, i16 zeroext %1) {
tail call void asm sideeffect "outb ${0:b},$1", "{ax},i{dx},~{dirflag},~{fpsr},~{flags}"(i8 %0, i16 %1)
tail call void asm sideeffect "outb %al,$$0x80", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ emsSetr(char const *, float);
void msgSetr(const char *token, float rvalue) { emsSetr(token, rvalue); }


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

x86 assembly (clang, -O2):
<msgSetr>:
jmp    1030 <emsSetr@plt>

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

LLVM IR (-O2):
define void @msgSetr(i8* %0, float %1) {
%3 = tail call i32 @emsSetr(i8* %0, float %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ g(int);
__attribute__((no)) int f(int a, int b, int d) {
  int r = -1;
  b += d;
  if (d == a)
    r = b - d;
  g(b);
  return r;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jne    1146 <f+0x36>
mov    -0x8(%rbp),%eax
sub    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <g@plt>
mov    -0x10(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rbx
cmp    %edi,%edx
mov    $0xffffffff,%ebx
cmove  %esi,%ebx
lea    (%rdx,%rsi,1),%edi
call   1030 <g@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @f(i32 %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 -1, i32* %7
%8 = load i32, i32* %6
%9 = load i32, i32* %5
%10 = add nsw i32 %9, %8
store i32 %10, i32* %5
%11 = load i32, i32* %6
%12 = load i32, i32* %4
%13 = icmp eq i32 %11, %12
br i1 %13, label %14, label %18
14: ; preds = %3
%15 = load i32, i32* %5
%16 = load i32, i32* %6
%17 = sub nsw i32 %15, %16
store i32 %17, i32* %7
br label %18
18: ; preds = %14, %3
%19 = load i32, i32* %5
%20 = call i32 @g(i32 %19)
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1, i32 %2) {
%4 = icmp eq i32 %2, %0
%5 = select i1 %4, i32 %1, i32 -1
%6 = add nsw i32 %2, %1
%7 = tail call i32 @g(i32 %6)
ret i32 %5
}
/* Variables and functions */
int analog(int);
int detect_straight(int sensor) {
  int result = -1;
  if (analog(sensor) > 75) {
    result = 1;
  } else {
    result = 0;
  }
  return result;
}


x86 assembly (clang, -O0):
<detect_straight>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0xffffffff,-0x8(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <analog@plt>
cmp    $0x4b,%eax
jle    113f <detect_straight+0x2f>
movl   $0x1,-0x8(%rbp)
jmp    1146 <detect_straight+0x36>
movl   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<detect_straight>:
push   %rax
call   1030 <analog@plt>
xor    %ecx,%ecx
cmp    $0x4c,%eax
setge  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @detect_straight(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
store i32 -1, i32* %3
%4 = load i32, i32* %2
%5 = call i32 @analog(i32 %4)
%6 = icmp sgt i32 %5, 75
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %3
br label %9
8: ; preds = %1
store i32 0, i32* %3
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %3
ret i32 %10
}

LLVM IR (-O2):
define i32 @detect_straight(i32 %0) {
%2 = tail call i32 @analog(i32 %0)
%3 = icmp sgt i32 %2, 75
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
void *malloc(int);
int /*<<< orphan*/ stderr;
void *my_malloc(int sz, char *err_string) {
  void *p = malloc(sz);
  if (p == NULL) {
    fprintf(stderr, "-- malloc failure allocation %s\n", err_string);
    exit(1);
  }
  return p;
}


x86 assembly (clang, -O0):
<my_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1179 <my_malloc+0x49>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xe96(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_malloc>:
push   %rbx
mov    %rsi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     1140 <my_malloc+0x10>
pop    %rbx
ret
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    %rbx,%rdx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [33 x i8] c"-- malloc failure allocation %s\0A\00"
define i8* @my_malloc(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%6 = load i32, i32* %3
%7 = call i8* @malloc(i32 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %15
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i8*, i8** %4
%13 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %12)
%14 = call i32 @exit(i32 1)
unreachable
15: ; preds = %2
%16 = load i8*, i8** %5
ret i8* %16
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [33 x i8] c"-- malloc failure allocation %s\0A\00"
define noalias i8* @my_malloc(i32 %0, i8* %1) {
%3 = tail call i8* @malloc(i32 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %1)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double strtod(char *, int /*<<< orphan*/ *);
int main() {
  double val = strtod("-20.23 hello world", NULL);
  printf("val: %lf\n", val);
  val = strtod("+20.23 hello world", NULL);
  printf("val: %lf\n", val);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtod@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xec3(%rip),%rdi
call   1040 <printf@plt>
lea    0xec1(%rip),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <strtod@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
lea    0xe9d(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
lea    0xed8(%rip),%rdi
xor    %esi,%esi
call   1030 <strtod@plt>
lea    0xedd(%rip),%rbx
mov    %rbx,%rdi
call   1040 <printf@plt>
lea    0xed8(%rip),%rdi
xor    %esi,%esi
call   1030 <strtod@plt>
mov    %rbx,%rdi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [19 x i8] c"-20.23 hello world\00"
@.str.1 = [10 x i8] c"val: %lf\0A\00"
@.str.2 = [19 x i8] c"+20.23 hello world\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call double @strtod(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* null)
store double %3, double* %2
%4 = load double, double* %2
%5 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %4)
%6 = call double @strtod(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32* null)
store double %6, double* %2
%7 = load double, double* %2
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [19 x i8] c"-20.23 hello world\00"
@.str.1 = [10 x i8] c"val: %lf\0A\00"
@.str.2 = [19 x i8] c"+20.23 hello world\00"
define i32 @main() {
%1 = tail call double @strtod(i8* nocapture getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %1)
%3 = tail call double @strtod(i8* nocapture getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0), i32* null)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0), double %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ displayheight();
int /*<<< orphan*/ pushNumber(int /*<<< orphan*/);
void basDisplayHeight() { pushNumber(displayheight()); }


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

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

LLVM IR (-O0):
define void @basDisplayHeight() {
%1 = call i32 (...) @displayheight()
%2 = call i32 @pushNumber(i32 %1)
ret void
}

LLVM IR (-O2):
define void @basDisplayHeight() {
%1 = tail call i32 (...) @displayheight()
%2 = tail call i32 @pushNumber(i32 %1)
ret void
}
int test_imm_51int16_mem(short *val) {
  return ((*val) & (-0x51 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_51int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -81
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct timeval {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tvlt(struct timeval const *, struct timeval const *);
int tvge(const struct timeval *a, const struct timeval *b) {
  return !tvlt(a, b);
}


x86 assembly (clang, -O0):
<tvge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <tvlt@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tvge>:
push   %rax
call   1030 <tvlt@plt>
xor    %ecx,%ecx
test   %eax,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.timeval = type { i32 }
define i32 @tvge(%struct.timeval* %0, %struct.timeval* %1) {
%3 = alloca %struct.timeval*
%4 = alloca %struct.timeval*
store %struct.timeval* %0, %struct.timeval** %3
store %struct.timeval* %1, %struct.timeval** %4
%5 = load %struct.timeval*, %struct.timeval** %3
%6 = load %struct.timeval*, %struct.timeval** %4
%7 = call i32 @tvlt(%struct.timeval* %5, %struct.timeval* %6)
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
%struct.timeval = type { i32 }
define i32 @tvge(%struct.timeval* %0, %struct.timeval* %1) {
%3 = tail call i32 @tvlt(%struct.timeval* %0, %struct.timeval* %1)
%4 = icmp eq i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
int test_imm_A4uint32_reg(unsigned int val) {
  return ((val) & (0xA4 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_A4uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xa4,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_A4uint32_reg>:
test   $0xa4,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_imm_A4uint32_reg(i32 %0) {
%2 = and i32 %0, 164
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}