xunge/DecIR huggingface dataset:
/* Type definitions */
struct ether_addr {
  int dummy;
};

/* Variables and functions */
struct ether_addr *ether_aton_r(char const *, struct ether_addr *);
struct ether_addr *ether_aton(const char *x) {
  static struct ether_addr a;
  return ether_aton_r(x, &a);
}


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

x86 assembly (clang, -O2):
<ether_aton>:
lea    0x2f15(%rip),%rsi
jmp    1030 <ether_aton_r@plt>

LLVM IR (-O0):
%struct.ether_addr = type { i32 }
@ether_aton.a = internal global %struct.ether_addr zeroinitializer
define %struct.ether_addr* @ether_aton(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.ether_addr* @ether_aton_r(i8* %3, %struct.ether_addr* @ether_aton.a)
ret %struct.ether_addr* %4
}

LLVM IR (-O2):
%struct.ether_addr = type { i32 }
@ether_aton.a = internal global %struct.ether_addr zeroinitializer
define %struct.ether_addr* @ether_aton(i8* %0) {
%2 = tail call %struct.ether_addr* @ether_aton_r(i8* %0, %struct.ether_addr* @ether_aton.a)
ret %struct.ether_addr* %2
}
float math_radian_to_degree(const float radian) {
  return radian * 57.2957795131f;
}


x86 assembly (clang, -O0):
<math_radian_to_degree>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  0xeef(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<math_radian_to_degree>:
mulss  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define float @math_radian_to_degree(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float %3, 0x404CA5DC20000000
ret float %4
}

LLVM IR (-O2):
define float @math_radian_to_degree(float %0) {
%2 = fmul float %0, 0x404CA5DC20000000
ret float %2
}
int is_port_number(const char *bindpath) {
  while (*bindpath) {
    if (*bindpath < '0' || *bindpath > '9') {
      return 0;
    }
    bindpath++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<is_port_number>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1152 <is_port_number+0x52>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1135 <is_port_number+0x35>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    1141 <is_port_number+0x41>
movl   $0x0,-0x4(%rbp)
jmp    1159 <is_port_number+0x59>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1108 <is_port_number+0x8>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @is_port_number(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = add i8 %8, -58
%11 = icmp ult i8 %10, -10
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %13, label %4
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
/* Type definitions */
typedef int /*<<< orphan*/ wchar_t;

/* Variables and functions */
size_t wcstombs(int /*<<< orphan*/ *, int /*<<< orphan*/ const *,
                int /*<<< orphan*/);
size_t mbstr_bytes(const wchar_t *wstr) { return wcstombs(NULL, wstr, 0); }


x86 assembly (clang, -O0):
<mbstr_bytes>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
xor    %eax,%eax
mov    %eax,%edi
xor    %edx,%edx
call   1030 <wcstombs@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbstr_bytes>:
mov    %rdi,%rsi
xor    %edi,%edi
xor    %edx,%edx
jmp    1030 <wcstombs@plt>

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

LLVM IR (-O2):
define i64 @mbstr_bytes(i32* %0) {
%2 = tail call i64 @wcstombs(i32* null, i32* %0, i32 0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ test1();
int /*<<< orphan*/ test2();
int main(int argc, char *argv[]) {
  (void)argc;
  (void)argv;
  test1();
  printf("test1\n");
  test2();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1030 <test1@plt>
lea    0xeac(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <test2@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <test1@plt>
lea    0xec1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
call   1050 <test2@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@str = [6 x i8] c"test1\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @test1()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
%5 = tail call i32 (...) @test2()
ret i32 0
}
/* Type definitions */
struct kset {
  int dummy;
};

/* Variables and functions */
struct kset *kset_get(struct kset *);
struct kset *subsys_get(struct kset *s) {
  struct kset *tmp;
  if (s) {
    tmp = kset_get(s);
    return (tmp);
  }
  return ((struct kset *)((void *)0));
}


x86 assembly (clang, -O0):
<subsys_get>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1141 <subsys_get+0x31>
mov    -0x10(%rbp),%rdi
call   1030 <kset_get@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1149 <subsys_get+0x39>
movq   $0x0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<subsys_get>:
test   %rdi,%rdi
je     111a <subsys_get+0xa>
jmp    1030 <kset_get@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
%struct.kset = type { i32 }
define %struct.kset* @subsys_get(%struct.kset* %0) {
%2 = alloca %struct.kset*
%3 = alloca %struct.kset*
%4 = alloca %struct.kset*
store %struct.kset* %0, %struct.kset** %3
%5 = load %struct.kset*, %struct.kset** %3
%6 = icmp ne %struct.kset* %5, null
br i1 %6, label %7, label %11
7: ; preds = %1
%8 = load %struct.kset*, %struct.kset** %3
%9 = call %struct.kset* @kset_get(%struct.kset* %8)
store %struct.kset* %9, %struct.kset** %4
%10 = load %struct.kset*, %struct.kset** %4
store %struct.kset* %10, %struct.kset** %2
br label %12
11: ; preds = %1
store %struct.kset* null, %struct.kset** %2
br label %12
12: ; preds = %11, %7
%13 = load %struct.kset*, %struct.kset** %2
ret %struct.kset* %13
}

LLVM IR (-O2):
%struct.kset = type { i32 }
define %struct.kset* @subsys_get(%struct.kset* %0) {
%2 = icmp eq %struct.kset* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call %struct.kset* @kset_get(%struct.kset* %0)
br label %5
5: ; preds = %1, %3
%6 = phi %struct.kset* [ %4, %3 ], [ null, %1 ]
ret %struct.kset* %6
}
int trans_5_x(int x, int y) { return -y; }


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

x86 assembly (clang, -O2):
<trans_5_x>:
mov    %esi,%eax
neg    %eax
ret

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

LLVM IR (-O2):
define i32 @trans_5_x(i32 %0, i32 %1) {
%3 = sub nsw i32 0, %1
ret i32 %3
}
char *mcparminfo_int(char *parmname) { return "int"; }


x86 assembly (clang, -O0):
<mcparminfo_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
lea    0xef1(%rip),%rax
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"int\00"
define i8* @mcparminfo_int(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"int\00"
define i8* @mcparminfo_int(i8* nocapture readnone %0) {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int privsep_getfd_1int(int, int const);
int scamper_privsep_open_datalink(const int ifindex) {
  return privsep_getfd_1int(0x01U, ifindex);
}


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

x86 assembly (clang, -O2):
<scamper_privsep_open_datalink>:
mov    %edi,%esi
mov    $0x1,%edi
jmp    1030 <privsep_getfd_1int@plt>

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

LLVM IR (-O2):
define i32 @scamper_privsep_open_datalink(i32 %0) {
%2 = tail call i32 @privsep_getfd_1int(i32 1, i32 %0)
ret i32 %2
}
void yy_2_TableHeaderTransient(char *yytext, int yyleng) {
  ;
  ;
}


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

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

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

LLVM IR (-O2):
define void @yy_2_TableHeaderTransient(i8* nocapture %0, i32 %1) {
ret void
}
/* Variables and functions */
int printf(char *, char *);
int hello(char *text) { return printf("LIB: %s\n", text); }


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

x86 assembly (clang, -O2):
<hello>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [9 x i8] c"LIB: %s\0A\00"
define i32 @hello(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ RFM22BReceiverHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void RFM22BReceiverRequestUpdate() {
  UAVObjRequestUpdate(RFM22BReceiverHandle());
}


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

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

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

LLVM IR (-O2):
define void @RFM22BReceiverRequestUpdate() {
%1 = tail call i32 (...) @RFM22BReceiverHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
int atoi(const char *str) {
  int result = 0;
  while (*str) {
    result = result * 10;
    if (*str < 48 || *str > 57) {
      return 0;
    }
    result += *str - '0';
    str++;
  }
  return result;
}


x86 assembly (clang, -O0):
<atoi>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     1170 <atoi+0x70>
imul   $0xa,-0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1143 <atoi+0x43>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    114f <atoi+0x4f>
movl   $0x0,-0x4(%rbp)
jmp    1176 <atoi+0x76>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
sub    $0x30,%eax
add    -0x14(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    110f <atoi+0xf>
mov    -0x14(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<atoi>:
mov    (%rdi),%cl
test   %cl,%cl
je     1130 <atoi+0x30>
add    $0x1,%rdi
xor    %eax,%eax
nopl   0x0(%rax)
lea    -0x3a(%rcx),%edx
cmp    $0xf6,%dl
jb     1130 <atoi+0x30>
movzbl %cl,%ecx
lea    (%rax,%rax,4),%eax
lea    (%rcx,%rax,2),%eax
add    $0xffffffd0,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <atoi+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @atoi(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %18, label %4
4: ; preds = %1, %10
%5 = phi i8 [ %16, %10 ], [ %2, %1 ]
%6 = phi i32 [ %14, %10 ], [ 0, %1 ]
%7 = phi i8* [ %15, %10 ], [ %0, %1 ]
%8 = add i8 %5, -58
%9 = icmp ult i8 %8, -10
br i1 %9, label %18, label %10
10: ; preds = %4
%11 = zext i8 %5 to i32
%12 = mul nsw i32 %6, 10
%13 = add i32 %12, -48
%14 = add i32 %13, %11
%15 = getelementptr inbounds i8, i8* %7, i64 1
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 0
br i1 %17, label %18, label %4
18: ; preds = %4, %10, %1
%19 = phi i32 [ 0, %1 ], [ %14, %10 ], [ 0, %4 ]
ret i32 %19
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
void config_io_ctrl_x(void) {
  *(uint32_t *)(0x44E11408) = (uint32_t)(0x0000018B);
  *(uint32_t *)(0x44E1140C) = (uint32_t)(0x0000018B);
  *(uint32_t *)(0x44E11410) = (uint32_t)(0x0000018B);
  *(uint32_t *)(0x44E11444) = (uint32_t)(0x0000018B);
  *(uint32_t *)(0x44E11448) = (uint32_t)(0x0000018B);
}


x86 assembly (clang, -O0):
<config_io_ctrl_x>:
push   %rbp
mov    %rsp,%rbp
mov    $0x44e11408,%eax
movq   $0x18b,(%rax)
mov    $0x44e1140c,%eax
movq   $0x18b,(%rax)
mov    $0x44e11410,%eax
movq   $0x18b,(%rax)
mov    $0x44e11444,%eax
movq   $0x18b,(%rax)
mov    $0x44e11448,%eax
movq   $0x18b,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_io_ctrl_x>:
movq   $0x18b,0x44e11408
movq   $0x18b,0x44e1140c
movq   $0x18b,0x44e11410
movq   $0x18b,0x44e11444
movq   $0x18b,0x44e11448
ret

LLVM IR (-O0):
define void @config_io_ctrl_x() {
store i64 395, i64* inttoptr (i64 1155601416 to i64*)
store i64 395, i64* inttoptr (i64 1155601420 to i64*)
store i64 395, i64* inttoptr (i64 1155601424 to i64*)
store i64 395, i64* inttoptr (i64 1155601476 to i64*)
store i64 395, i64* inttoptr (i64 1155601480 to i64*)
ret void
}

LLVM IR (-O2):
define void @config_io_ctrl_x() {
store i64 395, i64* inttoptr (i64 1155601416 to i64*)
store i64 395, i64* inttoptr (i64 1155601420 to i64*)
store i64 395, i64* inttoptr (i64 1155601424 to i64*)
store i64 395, i64* inttoptr (i64 1155601476 to i64*)
store i64 395, i64* inttoptr (i64 1155601480 to i64*)
ret void
}
/* Variables and functions */
float powf(float, float);
float lovrMathLinearToGamma(float x) {
  if (x <= .0031308f) {
    return x * 12.92f;
  } else {
    return 1.055f * powf(x, 1.f / 2.4f) - .055f;
  }
}


x86 assembly (clang, -O0):
<lovrMathLinearToGamma>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  0xedb(%rip),%xmm0
ucomiss -0x8(%rbp),%xmm0
jb     1146 <lovrMathLinearToGamma+0x36>
movss  0xed9(%rip),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1175 <lovrMathLinearToGamma+0x65>
movss  -0x8(%rbp),%xmm0
movss  0xeb9(%rip),%xmm1
call   1030 <powf@plt>
movss  0xea4(%rip),%xmm1
mulss  %xmm1,%xmm0
movss  0xe9c(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lovrMathLinearToGamma>:
push   %rax
movss  0xee7(%rip),%xmm1
ucomiss %xmm0,%xmm1
jae    113d <lovrMathLinearToGamma+0x2d>
movss  0xee2(%rip),%xmm1
call   1030 <powf@plt>
mulss  0xed9(%rip),%xmm0
addss  0xed5(%rip),%xmm0
pop    %rax
ret
mulss  0xebf(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @lovrMathLinearToGamma(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fcmp ole float %4, 0x3F69A5C380000000
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load float, float* %3
%8 = fmul float %7, 0x4029D70A40000000
store float %8, float* %2
br label %13
9: ; preds = %1
%10 = load float, float* %3
%11 = call float @powf(float %10, float 0x3FDAAAAAA0000000)
%12 = call float @llvm.fmuladd.f32(float 0x3FF0E147A0000000, float %11, float 0xBFAC28F5C0000000)
store float %12, float* %2
br label %13
13: ; preds = %9, %6
%14 = load float, float* %2
ret float %14
}

LLVM IR (-O2):
define float @lovrMathLinearToGamma(float %0) {
%2 = fcmp ugt float %0, 0x3F69A5C380000000
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = fmul float %0, 0x4029D70A40000000
br label %8
5: ; preds = %1
%6 = tail call float @powf(float %0, float 0x3FDAAAAAA0000000)
%7 = tail call float @llvm.fmuladd.f32(float %6, float 0x3FF0E147A0000000, float 0xBFAC28F5C0000000)
br label %8
8: ; preds = %5, %3
%9 = phi float [ %4, %3 ], [ %7, %5 ]
ret float %9
}
/* Type definitions */
typedef int /*<<< orphan*/ non_det;

/* Variables and functions */
int /*<<< orphan*/ klee_make_symbolic(int *, int, char *);
int map2check_non_det_int() {
  int non_det;
  klee_make_symbolic(&non_det, sizeof(non_det), "non_det_#type");
  return non_det;
}


x86 assembly (clang, -O0):
<map2check_non_det_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x4(%rbp),%rdi
mov    $0x4,%esi
lea    0xed8(%rip),%rdx
call   1030 <klee_make_symbolic@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<map2check_non_det_int>:
push   %rax
lea    0xee8(%rip),%rdx
lea    0x4(%rsp),%rdi
mov    $0x4,%esi
call   1030 <klee_make_symbolic@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [14 x i8] c"non_det_#type\00"
define i32 @map2check_non_det_int() {
%1 = alloca i32
%2 = call i32 @klee_make_symbolic(i32* %1, i32 4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@.str = [14 x i8] c"non_det_#type\00"
define i32 @map2check_non_det_int() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @klee_make_symbolic(i32* %1, i32 4, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %1
ret i32 %4
}
/* Variables and functions */
char *strrchr(char const *, char);
const char *xstr_filefrompath(const char *path) {
  const char *pos = strrchr(path, '\\');
  if (pos)
    return (pos + 1);
  pos = strrchr(path, '/');
  if (pos)
    return (pos + 1);
  return path;
}


x86 assembly (clang, -O0):
<xstr_filefrompath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
mov    $0x5c,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114a <xstr_filefrompath+0x3a>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1180 <xstr_filefrompath+0x70>
mov    -0x10(%rbp),%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     1178 <xstr_filefrompath+0x68>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1180 <xstr_filefrompath+0x70>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<xstr_filefrompath>:
push   %rbx
mov    %rdi,%rbx
mov    $0x5c,%esi
call   1030 <strrchr@plt>
test   %rax,%rax
je     1129 <xstr_filefrompath+0x19>
add    $0x1,%rax
pop    %rbx
ret
mov    %rbx,%rdi
mov    $0x2f,%esi
call   1030 <strrchr@plt>
mov    %rax,%rcx
add    $0x1,%rax
test   %rcx,%rcx
cmove  %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
define i8* @xstr_filefrompath(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i8* @strrchr(i8* %5, i8 signext 92)
store i8* %6, i8** %4
%7 = load i8*, i8** %4
%8 = icmp ne i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i8*, i8** %4
%11 = getelementptr inbounds i8, i8* %10, i64 1
store i8* %11, i8** %2
br label %22
12: ; preds = %1
%13 = load i8*, i8** %3
%14 = call i8* @strrchr(i8* %13, i8 signext 47)
store i8* %14, i8** %4
%15 = load i8*, i8** %4
%16 = icmp ne i8* %15, null
br i1 %16, label %17, label %20
17: ; preds = %12
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 1
store i8* %19, i8** %2
br label %22
20: ; preds = %12
%21 = load i8*, i8** %3
store i8* %21, i8** %2
br label %22
22: ; preds = %20, %17, %9
%23 = load i8*, i8** %2
ret i8* %23
}

LLVM IR (-O2):
define i8* @xstr_filefrompath(i8* %0) {
%2 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 92)
%3 = icmp eq i8* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = getelementptr inbounds i8, i8* %2, i64 1
br label %11
6: ; preds = %1
%7 = tail call i8* @strrchr(i8* dereferenceable(1) %0, i8 signext 47)
%8 = icmp eq i8* %7, null
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = select i1 %8, i8* %0, i8* %9
br label %11
11: ; preds = %6, %4
%12 = phi i8* [ %5, %4 ], [ %10, %6 ]
ret i8* %12
}
char between(char a, char b, char c) {
  return (unsigned char)a <= (unsigned char)b &&
         (unsigned char)b <= (unsigned char)c;
}


x86 assembly (clang, -O0):
<between>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %dil,%dl
mov    %dl,-0x1(%rbp)
mov    %cl,-0x2(%rbp)
mov    %al,-0x3(%rbp)
movzbl -0x1(%rbp),%ecx
movzbl -0x2(%rbp),%edx
xor    %eax,%eax
cmp    %edx,%ecx
mov    %al,-0x4(%rbp)
jg     113a <between+0x3a>
movzbl -0x2(%rbp),%eax
movzbl -0x3(%rbp),%ecx
cmp    %ecx,%eax
setle  %al
mov    %al,-0x4(%rbp)
mov    -0x4(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<between>:
cmp    %sil,%dil
setbe  %cl
cmp    %dl,%sil
setbe  %al
and    %cl,%al
ret

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

LLVM IR (-O2):
define signext i8 @between(i8 signext %0, i8 signext %1, i8 signext %2) {
%4 = icmp ule i8 %0, %1
%5 = icmp ule i8 %1, %2
%6 = and i1 %4, %5
%7 = zext i1 %6 to i8
ret i8 %7
}
/* Variables and functions */
int /*<<< orphan*/ afficheLigne(int, char);
void afficheRectangle(int nbLignes, int nbColonnes, char motif) {
  for (int iLigne = 0; iLigne < nbLignes; iLigne = iLigne + 1) {
    afficheLigne(nbColonnes, motif);
  }
}


x86 assembly (clang, -O0):
<afficheRectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dl,%al
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %al,-0x9(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1150 <afficheRectangle+0x40>
mov    -0x8(%rbp),%edi
movsbl -0x9(%rbp),%esi
call   1030 <afficheLigne@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    112a <afficheRectangle+0x1a>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<afficheRectangle>:
push   %rbp
push   %r14
push   %rbx
test   %edi,%edi
jle    112f <afficheRectangle+0x1f>
mov    %esi,%r14d
mov    %edi,%ebp
movsbl %dl,%ebx
mov    %r14d,%edi
mov    %ebx,%esi
call   1030 <afficheLigne@plt>
add    $0xffffffff,%ebp
jne    1120 <afficheRectangle+0x10>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @afficheRectangle(i32 %0, i32 %1, i8 signext %2) {
%4 = icmp sgt i32 %0, 0
br i1 %4, label %6, label %5
5: ; preds = %6, %3
ret void
6: ; preds = %3, %6
%7 = phi i32 [ %9, %6 ], [ 0, %3 ]
%8 = tail call i32 @afficheLigne(i32 %1, i8 signext %2)
%9 = add nuw nsw i32 %7, 1
%10 = icmp eq i32 %9, %0
br i1 %10, label %5, label %6
}
/* Variables and functions */
int strcmp(char *, char *);
int dump_cmp(char **p, char **q) { return strcmp(*p, *q); }


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

x86 assembly (clang, -O2):
<dump_cmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

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

LLVM IR (-O2):
define i32 @dump_cmp(i8** nocapture %0, i8** nocapture %1) {
%3 = load i8*, i8** %0
%4 = load i8*, i8** %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %3, i8* dereferenceable(1) %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv) {
  printf("Later gator.\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [14 x i8] c"Later gator.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [13 x i8] c"Later gator.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret i32 0
}
char *strend(char *s) {
  char *p;
  for (p = s; *p; p++)
    ;
  return p;
}


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

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

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

LLVM IR (-O2):
define i8* @strend(i8* %0) {
br label %2
2: ; preds = %2, %1
%3 = phi i8* [ %0, %1 ], [ %6, %2 ]
%4 = load i8, i8* %3
%5 = icmp eq i8 %4, 0
%6 = getelementptr inbounds i8, i8* %3, i64 1
br i1 %5, label %7, label %2
7: ; preds = %2
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ release_region(int, int);
void i8042_platform_exit(void) { release_region(0x60, 16); }


x86 assembly (clang, -O0):
<i8042_platform_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x60,%edi
mov    $0x10,%esi
call   1030 <release_region@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<i8042_platform_exit>:
mov    $0x60,%edi
mov    $0x10,%esi
jmp    1030 <release_region@plt>

LLVM IR (-O0):
define void @i8042_platform_exit() {
%1 = call i32 @release_region(i32 96, i32 16)
ret void
}

LLVM IR (-O2):
define void @i8042_platform_exit() {
%1 = tail call i32 @release_region(i32 96, i32 16)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *malloc(int);
void baselineGT(unsigned a) {
  char *b = ((void *)0);
  if (a > 0)
    b = malloc(1);
  if (a == 0)
    return;
  free(b);
}


x86 assembly (clang, -O0):
<baselineGT>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jbe    114b <baselineGT+0x2b>
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    115a <baselineGT+0x3a>
jmp    1163 <baselineGT+0x43>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<baselineGT>:
test   %edi,%edi
je     1138 <baselineGT+0x18>
push   %rax
mov    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,%rdi
pop    %rax
jmp    1030 <free@plt>
ret

LLVM IR (-O0):
define void @baselineGT(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
store i8* null, i8** %3
%4 = load i32, i32* %2
%5 = icmp ugt i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = call i8* @malloc(i32 1)
store i8* %7, i8** %3
br label %8
8: ; preds = %6, %1
%9 = load i32, i32* %2
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %12
11: ; preds = %8
br label %15
12: ; preds = %8
%13 = load i8*, i8** %3
%14 = call i32 @free(i8* %13)
br label %15
15: ; preds = %12, %11
ret void
}

LLVM IR (-O2):
define void @baselineGT(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call dereferenceable_or_null(1) i8* @malloc(i32 1)
%5 = tail call i32 @free(i8* %4)
br label %6
6: ; preds = %1, %3
ret void
}
/* Type definitions */
typedef int ptrdiff_t;

/* Variables and functions */
char *strstr(char const *, char const *);
ptrdiff_t indx(const char *s1, const char *s2) {
  char *t;
  t = strstr(s1, s2);
  if (t == NULL)
    return (-1);
  else
    return (t - s1);
}


x86 assembly (clang, -O0):
<indx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strstr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1148 <indx+0x38>
movl   $0xffffffff,-0x4(%rbp)
jmp    1156 <indx+0x46>
mov    -0x20(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<indx>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strstr@plt>
mov    %eax,%ecx
sub    %ebx,%ecx
cmp    $0x1,%rax
sbb    %eax,%eax
or     %ecx,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @indx(i8* %0, i8* nocapture %1) {
%3 = tail call i8* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp eq i8* %3, null
%5 = ptrtoint i8* %3 to i64
%6 = ptrtoint i8* %0 to i64
%7 = sub i64 %5, %6
%8 = trunc i64 %7 to i32
%9 = select i1 %4, i32 -1, i32 %8
ret i32 %9
}
float Abs(float a) { return (a < 0.0f) ? -a : a; }


x86 assembly (clang, -O0):
<Abs>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1132 <Abs+0x32>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x8(%rbp)
jmp    113c <Abs+0x3c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<Abs>:
movaps 0xef9(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
movaps %xmm0,%xmm1
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm2
andnps %xmm0,%xmm1
orps   %xmm2,%xmm1
movaps %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @Abs(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp olt float %3, 0.000000e+00
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load float, float* %2
%7 = fneg float %6
br label %10
8: ; preds = %1
%9 = load float, float* %2
br label %10
10: ; preds = %8, %5
%11 = phi float [ %7, %5 ], [ %9, %8 ]
ret float %11
}

LLVM IR (-O2):
define float @Abs(float %0) {
%2 = fcmp olt float %0, 0.000000e+00
%3 = fneg float %0
%4 = select i1 %2, float %3, float %0
ret float %4
}
/* Variables and functions */
int /*<<< orphan*/ printFahrList(int, int, int, int);
int main() { printFahrList(-17, 148, 11, 1); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffef,%edi
mov    $0x94,%esi
mov    $0xb,%edx
mov    $0x1,%ecx
call   1030 <printFahrList@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xffffffef,%edi
mov    $0x94,%esi
mov    $0xb,%edx
mov    $0x1,%ecx
call   1030 <printFahrList@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @printFahrList(i32 -17, i32 148, i32 11, i32 1)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @printFahrList(i32 -17, i32 148, i32 11, i32 1)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ GLfloat;

/* Variables and functions */
void matrixZeroF(GLfloat *matrix, int areaSize) {
  int i;
  for (i = 0; i < areaSize; i++)
    matrix[i] = 0;
}


x86 assembly (clang, -O0):
<matrixZeroF>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    113c <matrixZeroF+0x3c>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1112 <matrixZeroF+0x12>
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrixZeroF>:
test   %esi,%esi
jle    1126 <matrixZeroF+0x16>
push   %rax
mov    %esi,%edx
shl    $0x3,%rdx
xor    %esi,%esi
call   1030 <memset@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define void @matrixZeroF(i64* nocapture writeonly %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %8
4: ; preds = %2
%5 = bitcast i64* %0 to i8*
%6 = zext i32 %1 to i64
%7 = shl nuw nsw i64 %6, 3
br label %8
8: ; preds = %4, %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ out(int, int);
void set_cursor(int x, int y) {
  out(0x3D4, 14);
  out(0x3D5, x);
  out(0x3D4, 15);
  out(0x3D5, y);
}


x86 assembly (clang, -O0):
<set_cursor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <out@plt>
mov    -0x4(%rbp),%esi
mov    $0x3d5,%edi
call   1030 <out@plt>
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <out@plt>
mov    -0x8(%rbp),%esi
mov    $0x3d5,%edi
call   1030 <out@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_cursor>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x3d4,%edi
mov    $0xe,%esi
call   1030 <out@plt>
mov    $0x3d5,%edi
mov    %ebp,%esi
call   1030 <out@plt>
mov    $0x3d4,%edi
mov    $0xf,%esi
call   1030 <out@plt>
mov    $0x3d5,%edi
mov    %ebx,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <out@plt>

LLVM IR (-O0):
define void @set_cursor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @out(i32 980, i32 14)
%6 = load i32, i32* %3
%7 = call i32 @out(i32 981, i32 %6)
%8 = call i32 @out(i32 980, i32 15)
%9 = load i32, i32* %4
%10 = call i32 @out(i32 981, i32 %9)
ret void
}

LLVM IR (-O2):
define void @set_cursor(i32 %0, i32 %1) {
%3 = tail call i32 @out(i32 980, i32 14)
%4 = tail call i32 @out(i32 981, i32 %0)
%5 = tail call i32 @out(i32 980, i32 15)
%6 = tail call i32 @out(i32 981, i32 %1)
ret void
}
void gdk_display_manager_get_default_display() {}


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

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

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

LLVM IR (-O2):
define void @gdk_display_manager_get_default_display() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ my_exit(int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage(void) {
  fprintf(stderr, "usage: patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D "
                  "symbol] [-d directory]\n"
                  "             [-F max-fuzz] [-i patchfile] [-o out-file] [-p "
                  "strip-count]\n"
                  "             [-r rej-name] [-V t | nil | never] [-x number] "
                  "[-z backup-ext]\n"
                  "             [--posix] [origfile [patchfile]]\n"
                  "       patch <patchfile\n");
  my_exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e98(%rip),%rax
mov    (%rax),%edi
call   1030 <my_exit@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <fprintf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
pop    %rax
jmp    1030 <my_exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [297 x i8] c"usage: patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory]\0A [-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count]\0A [-r rej-name] [-V t | nil | never] [-x number] [-z backup-ext]\0A [--posix] [origfile [patchfile]]\0A patch <patchfile\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([297 x i8], [297 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = call i32 @my_exit(i32 %3)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [297 x i8] c"usage: patch [-bCcEeflNnRstuv] [-B backup-prefix] [-D symbol] [-d directory]\0A [-F max-fuzz] [-i patchfile] [-o out-file] [-p strip-count]\0A [-r rej-name] [-V t | nil | never] [-x number] [-z backup-ext]\0A [--posix] [origfile [patchfile]]\0A patch <patchfile\0A\00"
@EXIT_SUCCESS = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([297 x i8], [297 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @EXIT_SUCCESS
%4 = tail call i32 @my_exit(i32 %3)
ret void
}
/* Variables and functions */
int f10_t();
int f11(void) {
exit:
  return f10_t();
}


x86 assembly (clang, -O0):
<f11>:
push   %rbp
mov    %rsp,%rbp
jmp    1119 <f11+0x9>
mov    $0x0,%al
call   1030 <f10_t@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @f11() {
br label %1
1: ; preds = %0
%2 = call i32 (...) @f10_t()
ret i32 %2
}

LLVM IR (-O2):
define i32 @f11() {
%1 = tail call i32 (...) @f10_t()
ret i32 %1
}
/* Variables and functions */
int strlen(char *);
int /*<<< orphan*/ ungetch(char);
void ungetstr(char *s) {
  char *p;
  if (s)
    for (p = s + strlen(s) - 1; p >= s; p--)
      ungetch(*p);
}


x86 assembly (clang, -O0):
<ungetstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     118c <ungetstr+0x6c>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x18(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x8(%rbp),%rax
jb     1187 <ungetstr+0x67>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1040 <ungetch@plt>
mov    -0x10(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x10(%rbp)
jmp    115c <ungetstr+0x3c>
jmp    118c <ungetstr+0x6c>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ungetstr>:
push   %r14
push   %rbx
push   %rax
test   %rdi,%rdi
je     1151 <ungetstr+0x31>
mov    %rdi,%r14
call   1030 <strlen@plt>
cltq
lea    (%r14,%rax,1),%rbx
add    $0xffffffffffffffff,%rbx
cmp    %r14,%rbx
jb     1151 <ungetstr+0x31>
movsbl (%rbx),%edi
call   1040 <ungetch@plt>
add    $0xffffffffffffffff,%rbx
cmp    %r14,%rbx
jae    1140 <ungetstr+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @ungetstr(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %15, label %3
3: ; preds = %1
%4 = tail call i32 @strlen(i8* %0)
%5 = sext i32 %4 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = getelementptr inbounds i8, i8* %6, i64 -1
%8 = icmp ult i8* %7, %0
br i1 %8, label %15, label %9
9: ; preds = %3, %9
%10 = phi i8* [ %13, %9 ], [ %7, %3 ]
%11 = load i8, i8* %10
%12 = tail call i32 @ungetch(i8 signext %11)
%13 = getelementptr inbounds i8, i8* %10, i64 -1
%14 = icmp ult i8* %13, %0
br i1 %14, label %15, label %9
15: ; preds = %9, %3, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
void print_banner() {
  puts("fspin v1.1, April 7, 2013 - Len Brown <len.brown@intel.com>");
}


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

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

LLVM IR (-O0):
@.str = [60 x i8] c"fspin v1.1, April 7, 2013 - Len Brown <len.brown@intel.com>\00"
define void @print_banner() {
%1 = call i32 @puts(i8* getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [60 x i8] c"fspin v1.1, April 7, 2013 - Len Brown <len.brown@intel.com>\00"
define void @print_banner() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([60 x i8], [60 x i8]* @.str, i64 0, i64 0))
ret void
}
void prn(u) unsigned u;
{ prs(itoa(u, 0)); }


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

x86 assembly (clang, -O2):
<prn>:
push   %rax
xor    %esi,%esi
xor    %eax,%eax
call   1040 <itoa@plt>
mov    %eax,%edi
xor    %eax,%eax
pop    %rcx
jmp    1030 <prs@plt>

LLVM IR (-O0):
define void @prn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 (i32, i32, ...) bitcast (i32 (...)* @itoa to i32 (i32, i32, ...)*)(i32 %3, i32 0)
%5 = call i32 (i32, ...) bitcast (i32 (...)* @prs to i32 (i32, ...)*)(i32 %4)
ret void
}

LLVM IR (-O2):
define void @prn(i32 %0) {
%2 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @itoa to i32 (i32, i32, ...)*)(i32 %0, i32 0)
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @prs to i32 (i32, ...)*)(i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ wx11ig();
void wx11pg() { wx11ig(); }


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

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

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

LLVM IR (-O2):
define void @wx11pg() {
%1 = tail call i32 (...) @wx11ig()
ret void
}