xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ strcmp(char const *, char const *);
int /*<<< orphan*/ string_empty(char const *);
int string_equal(const char *string, const char *other_string) {
  if (!string_empty(string) && !string_empty(other_string))
    return !strcmp(string, other_string);
  return 1;
}


x86 assembly (clang, -O0):
<string_equal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <string_empty@plt>
cmp    $0x0,%eax
jne    1176 <string_equal+0x56>
mov    -0x18(%rbp),%rdi
call   1030 <string_empty@plt>
cmp    $0x0,%eax
jne    1176 <string_equal+0x56>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
jmp    117d <string_equal+0x5d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_equal>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1030 <string_empty@plt>
mov    $0x1,%ebx
test   %eax,%eax
jne    1157 <string_equal+0x37>
mov    %r14,%rdi
call   1030 <string_empty@plt>
test   %eax,%eax
jne    1157 <string_equal+0x37>
mov    %r15,%rdi
mov    %r14,%rsi
call   1040 <strcmp@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @string_equal(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 = call i32 @string_empty(i8* %6)
%8 = icmp ne i32 %7, 0
br i1 %8, label %20, label %9
9: ; preds = %2
%10 = load i8*, i8** %5
%11 = call i32 @string_empty(i8* %10)
%12 = icmp ne i32 %11, 0
br i1 %12, label %20, label %13
13: ; preds = %9
%14 = load i8*, i8** %4
%15 = load i8*, i8** %5
%16 = call i32 @strcmp(i8* %14, i8* %15)
%17 = icmp ne i32 %16, 0
%18 = xor i1 %17, true
%19 = zext i1 %18 to i32
store i32 %19, i32* %3
br label %21
20: ; preds = %9, %2
store i32 1, i32* %3
br label %21
21: ; preds = %20, %13
%22 = load i32, i32* %3
ret i32 %22
}

LLVM IR (-O2):
define i32 @string_equal(i8* %0, i8* %1) {
%3 = tail call i32 @string_empty(i8* %0)
%4 = icmp eq i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = tail call i32 @string_empty(i8* %1)
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %5
%9 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%10 = icmp eq i32 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %2, %5, %8
%13 = phi i32 [ %11, %8 ], [ 1, %5 ], [ 1, %2 ]
ret i32 %13
}
/* Variables and functions */
int syscall(int, int);
int close(int f) { return syscall(6, f); }


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

x86 assembly (clang, -O2):
<close>:
mov    %edi,%esi
mov    $0x6,%edi
jmp    1030 <syscall@plt>

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

LLVM IR (-O2):
define i32 @close(i32 %0) {
%2 = tail call i32 @syscall(i32 6, i32 %0)
ret i32 %2
}
__attribute__((constructor)) void myInit() {}


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

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

LLVM IR (-O0):
@llvm.global_ctors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @myInit, i8* null }]
define void @myInit() {
ret void
}

LLVM IR (-O2):
@llvm.global_ctors = appending global [0 x { i32, void ()*, i8* }] zeroinitializer
define void @myInit() {
ret void
}
void stripdots(char *in, char *out) {
  while (*in) {
    if (*in != '.')
      *out++ = *in++;
    else
      in++;
  }
  *out = 0;
}


x86 assembly (clang, -O0):
<stripdots>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1161 <stripdots+0x61>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
je     1150 <stripdots+0x50>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    115c <stripdots+0x5c>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    110c <stripdots+0xc>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<stripdots>:
jmp    1114 <stripdots+0x14>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rdi
movzbl (%rdi),%eax
cmp    $0x2e,%al
je     1110 <stripdots+0x10>
test   %al,%al
je     1127 <stripdots+0x27>
mov    %al,(%rsi)
add    $0x1,%rsi
jmp    1110 <stripdots+0x10>
movb   $0x0,(%rsi)
ret

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

LLVM IR (-O2):
define void @stripdots(i8* nocapture %0, i8* nocapture writeonly %1) {
br label %3
3: ; preds = %9, %2
%4 = phi i8* [ %0, %2 ], [ %11, %9 ]
%5 = phi i8* [ %1, %2 ], [ %10, %9 ]
%6 = load i8, i8* %4
switch i8 %6, label %7 [
i8 0, label %12
i8 46, label %9
]
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %6, i8* %5
br label %9
9: ; preds = %3, %7
%10 = phi i8* [ %8, %7 ], [ %5, %3 ]
%11 = getelementptr inbounds i8, i8* %4, i64 1
br label %3
12: ; preds = %3
store i8 0, i8* %5
ret void
}
/* Type definitions */
typedef scalar_t__ mqd_t;

/* Variables and functions */
int mq_receive(scalar_t__, char *, size_t, unsigned int *);
void test_mq_send_prototype(void) {
  mqd_t mqdes;
  size_t msg_len;
  char *msgp;
  int err;
  unsigned msg_prio;
  mqdes = 0;
  msg_len = 0;
  msgp = NULL;
  err = mq_receive(mqdes, msgp, msg_len, &msg_prio);
  (void)err;
}


x86 assembly (clang, -O0):
<test_mq_send_prototype>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movq   $0x0,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    -0x20(%rbp),%rcx
call   1030 <mq_receive@plt>
mov    %eax,-0x1c(%rbp)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_mq_send_prototype>:
push   %rax
lea    0x4(%rsp),%rcx
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1030 <mq_receive@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @test_mq_send_prototype() {
%1 = alloca i64
%2 = alloca i64
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i64 0, i64* %1
store i64 0, i64* %2
store i8* null, i8** %3
%6 = load i64, i64* %1
%7 = load i8*, i8** %3
%8 = load i64, i64* %2
%9 = call i32 @mq_receive(i64 %6, i8* %7, i64 %8, i32* %5)
store i32 %9, i32* %4
%10 = load i32, i32* %4
ret void
}

LLVM IR (-O2):
define void @test_mq_send_prototype() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @mq_receive(i64 0, i8* null, i64 0, i32* %1)
ret void
}
/* Variables and functions */
int getsign(int);
int /*<<< orphan*/ printf(char *, int);
int main() {
  printf("%c", getsign(-1));
  printf("%c", getsign(0));
  printf("%c", getsign(1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xffffffff,%edi
call   1040 <getsign@plt>
mov    %eax,%esi
lea    0xebe(%rip),%rdi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <getsign@plt>
mov    %eax,%esi
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <getsign@plt>
mov    %eax,%esi
lea    0xe91(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xffffffff,%edi
call   1040 <getsign@plt>
lea    0xece(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %edi,%edi
call   1040 <getsign@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <getsign@plt>
mov    %rbx,%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define i32 @main() {
%1 = tail call i32 @getsign(i32 -1)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @getsign(i32 0)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = tail call i32 @getsign(i32 1)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}
unsigned char encode_watts(float volts, float amps) {
  float watts = (volts * amps) / 4.0;
  if (watts > 255)
    watts = 255;
  if (watts < 0)
    watts = 0;
  return (unsigned char)watts;
}


x86 assembly (clang, -O0):
<encode_watts>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xee4(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  0xec2(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1154 <encode_watts+0x54>
movss  0xeb1(%rip),%xmm0
movss  %xmm0,-0xc(%rbp)
xorps  %xmm0,%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1169 <encode_watts+0x69>
xorps  %xmm0,%xmm0
movss  %xmm0,-0xc(%rbp)
cvttss2si -0xc(%rbp),%eax
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode_watts>:
mulss  %xmm1,%xmm0
mulss  0xef4(%rip),%xmm0
movss  0xef0(%rip),%xmm1
minss  %xmm0,%xmm1
xorps  %xmm0,%xmm0
maxss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
ret

LLVM IR (-O0):
define zeroext i8 @encode_watts(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %3
store float %1, float* %4
%6 = load float, float* %3
%7 = load float, float* %4
%8 = fmul float %6, %7
%9 = fpext float %8 to double
%10 = fdiv double %9, 4.000000e+00
%11 = fptrunc double %10 to float
store float %11, float* %5
%12 = load float, float* %5
%13 = fcmp ogt float %12, 2.550000e+02
br i1 %13, label %14, label %15
14: ; preds = %2
store float 2.550000e+02, float* %5
br label %15
15: ; preds = %14, %2
%16 = load float, float* %5
%17 = fcmp olt float %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %15
store float 0.000000e+00, float* %5
br label %19
19: ; preds = %18, %15
%20 = load float, float* %5
%21 = fptoui float %20 to i8
ret i8 %21
}

LLVM IR (-O2):
define zeroext i8 @encode_watts(float %0, float %1) {
%3 = fmul float %0, %1
%4 = fmul float %3, 2.500000e-01
%5 = fcmp ogt float %4, 2.550000e+02
%6 = select i1 %5, float 2.550000e+02, float %4
%7 = fcmp olt float %6, 0.000000e+00
%8 = select i1 %7, float 0.000000e+00, float %6
%9 = fptoui float %8 to i8
ret i8 %9
}
char *tree(size)
unsigned size;
{
  register char *t;
  if ((t = getcell(size)) == 0) {
    prs("command line too complicated\n");
    fail();
  }
  return (t);
}


x86 assembly (clang, -O0):
<tree>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <getcell@plt>
cltq
mov    %rax,-0x10(%rbp)
cmp    $0x0,%rax
jne    116a <tree+0x3a>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1050 <prs@plt>
mov    $0x0,%al
call   1030 <fail@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tree>:
push   %rbx
xor    %eax,%eax
call   1040 <getcell@plt>
mov    %eax,%ebx
test   %eax,%eax
jne    1153 <tree+0x23>
lea    0xebb(%rip),%rdi
xor    %eax,%eax
call   1050 <prs@plt>
xor    %eax,%eax
call   1030 <fail@plt>
movslq %ebx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"command line too complicated\0A\00"
define i8* @tree(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @getcell to i32 (i32, ...)*)(i32 %4)
%6 = sext i32 %5 to i64
%7 = inttoptr i64 %6 to i8*
store i8* %7, i8** %3
%8 = icmp eq i8* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%11 = call i32 (...) @fail()
br label %12
12: ; preds = %9, %1
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [30 x i8] c"command line too complicated\0A\00"
define i8* @tree(i32 %0) {
%2 = tail call i32 (i32, ...) bitcast (i32 (...)* @getcell to i32 (i32, ...)*)(i32 %0)
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %7
4: ; preds = %1
%5 = tail call i32 (i8*, ...) bitcast (i32 (...)* @prs to i32 (i8*, ...)*)(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 (...) @fail()
br label %7
7: ; preds = %4, %1
%8 = sext i32 %2 to i64
%9 = inttoptr i64 %8 to i8*
ret i8* %9
}
/* Type definitions */
struct eid_rloc_db {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ add_eid2(int, struct eid_rloc_db *, int /*<<< orphan*/);
int /*<<< orphan*/ del_eid2(int, struct eid_rloc_db *, int /*<<< orphan*/);
int update_eid2(int s, struct eid_rloc_db *params) {
  del_eid2(s, params, 0);
  add_eid2(s, params, 0);
}


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

x86 assembly (clang, -O2):
<update_eid2>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
xor    %edx,%edx
call   1040 <del_eid2@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
xor    %edx,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <add_eid2@plt>

LLVM IR (-O0):
%struct.eid_rloc_db = type { i32 }
define i32 @update_eid2(i32 %0, %struct.eid_rloc_db* %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca %struct.eid_rloc_db*
store i32 %0, i32* %4
store %struct.eid_rloc_db* %1, %struct.eid_rloc_db** %5
%6 = load i32, i32* %4
%7 = load %struct.eid_rloc_db*, %struct.eid_rloc_db** %5
%8 = call i32 @del_eid2(i32 %6, %struct.eid_rloc_db* %7, i32 0)
%9 = load i32, i32* %4
%10 = load %struct.eid_rloc_db*, %struct.eid_rloc_db** %5
%11 = call i32 @add_eid2(i32 %9, %struct.eid_rloc_db* %10, i32 0)
%12 = load i32, i32* %3
ret i32 %12
}

LLVM IR (-O2):
%struct.eid_rloc_db = type { i32 }
define i32 @update_eid2(i32 %0, %struct.eid_rloc_db* %1) {
%3 = tail call i32 @del_eid2(i32 %0, %struct.eid_rloc_db* %1, i32 0)
%4 = tail call i32 @add_eid2(i32 %0, %struct.eid_rloc_db* %1, i32 0)
ret i32 undef
}
int fun422() { return 422; }


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

x86 assembly (clang, -O2):
<fun422>:
mov    $0x1a6,%eax
ret

LLVM IR (-O0):
define i32 @fun422() {
ret i32 422
}

LLVM IR (-O2):
define i32 @fun422() {
ret i32 422
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef int uint32_t;

/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, int const *, int);
void populate(void *memory) {
  const uint32_t value = 0x11223344;
  memcpy(memory, &value, sizeof(value));
}


x86 assembly (clang, -O0):
<populate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x11223344,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<populate>:
push   %rax
movl   $0x11223344,0x4(%rsp)
11
lea    0x4(%rsp),%rsi
mov    $0x4,%edx
call   1030 <memcpy@plt>
pop    %rax
ret

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

LLVM IR (-O2):
define void @populate(i8* %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
store i32 287454020, i32* %2
%4 = call i32 @memcpy(i8* %0, i32* %2, i32 4)
ret void
}
float HMM_Clamp(float Min, float Value, float Max) {
  ;
  float Result = Value;
  if (Result < Min) {
    Result = Min;
  }
  if (Result > Max) {
    Result = Max;
  }
  return (Result);
}


x86 assembly (clang, -O0):
<HMM_Clamp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm1
movss  -0x4(%rbp),%xmm0
ucomiss %xmm1,%xmm0
jbe    113a <HMM_Clamp+0x3a>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jbe    1153 <HMM_Clamp+0x53>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<HMM_Clamp>:
maxss  %xmm1,%xmm0
minss  %xmm0,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @HMM_Clamp(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%8 = load float, float* %5
store float %8, float* %7
%9 = load float, float* %7
%10 = load float, float* %4
%11 = fcmp olt float %9, %10
br i1 %11, label %12, label %14
12: ; preds = %3
%13 = load float, float* %4
store float %13, float* %7
br label %14
14: ; preds = %12, %3
%15 = load float, float* %7
%16 = load float, float* %6
%17 = fcmp ogt float %15, %16
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = load float, float* %6
store float %19, float* %7
br label %20
20: ; preds = %18, %14
%21 = load float, float* %7
ret float %21
}

LLVM IR (-O2):
define float @HMM_Clamp(float %0, float %1, float %2) {
%4 = fcmp olt float %1, %0
%5 = select i1 %4, float %0, float %1
%6 = fcmp ogt float %5, %2
%7 = select i1 %6, float %2, float %5
ret float %7
}
/* Type definitions */
struct utmpx {
  int dummy;
};
struct utmp {
  int dummy;
};

/* Variables and functions */
scalar_t__ __utmp_to_utmpx(struct utmp const *, struct utmpx *);
int /*<<< orphan*/ memset(struct utmpx *, char, int);
void getutmpx(const struct utmp *utmp, struct utmpx *utmpx) {
  if (__utmp_to_utmpx(utmp, utmpx) < 0)
    memset(utmpx, '\0', sizeof(struct utmpx));
}


x86 assembly (clang, -O0):
<getutmpx>:
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 <__utmp_to_utmpx@plt>
cmp    $0x0,%rax
jge    1157 <getutmpx+0x37>
mov    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getutmpx>:
push   %rbx
mov    %rsi,%rbx
call   1030 <__utmp_to_utmpx@plt>
test   %rax,%rax
js     1130 <getutmpx+0x10>
pop    %rbx
ret
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
pop    %rbx
jmp    1040 <memset@plt>

LLVM IR (-O0):
%struct.utmp = type { i32 }
%struct.utmpx = type { i32 }
define void @getutmpx(%struct.utmp* %0, %struct.utmpx* %1) {
%3 = alloca %struct.utmp*
%4 = alloca %struct.utmpx*
store %struct.utmp* %0, %struct.utmp** %3
store %struct.utmpx* %1, %struct.utmpx** %4
%5 = load %struct.utmp*, %struct.utmp** %3
%6 = load %struct.utmpx*, %struct.utmpx** %4
%7 = call i64 @__utmp_to_utmpx(%struct.utmp* %5, %struct.utmpx* %6)
%8 = icmp slt i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load %struct.utmpx*, %struct.utmpx** %4
%11 = call i32 @memset(%struct.utmpx* %10, i8 signext 0, i32 4)
br label %12
12: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
%struct.utmp = type { i32 }
%struct.utmpx = type { i32 }
define void @getutmpx(%struct.utmp* %0, %struct.utmpx* %1) {
%3 = tail call i64 @__utmp_to_utmpx(%struct.utmp* %0, %struct.utmpx* %1)
%4 = icmp slt i64 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %2
%6 = tail call i32 @memset(%struct.utmpx* %1, i8 signext 0, i32 4)
br label %7
7: ; preds = %5, %2
ret void
}
short max(short a, short b) {
  if (a > b) {
    return a;
  }
  return b;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
mov    %si,%ax
mov    %di,%cx
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movswl -0x4(%rbp),%eax
movswl -0x6(%rbp),%ecx
cmp    %ecx,%eax
jle    112f <max+0x2f>
mov    -0x4(%rbp),%ax
mov    %ax,-0x2(%rbp)
jmp    1137 <max+0x37>
mov    -0x6(%rbp),%ax
mov    %ax,-0x2(%rbp)
movswl -0x2(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
mov    %esi,%eax
cmp    %ax,%di
cmovg  %edi,%eax
ret

LLVM IR (-O0):
define signext i16 @max(i16 signext %0, i16 signext %1) {
%3 = alloca i16
%4 = alloca i16
%5 = alloca i16
store i16 %0, i16* %4
store i16 %1, i16* %5
%6 = load i16, i16* %4
%7 = sext i16 %6 to i32
%8 = load i16, i16* %5
%9 = sext i16 %8 to i32
%10 = icmp sgt i32 %7, %9
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i16, i16* %4
store i16 %12, i16* %3
br label %15
13: ; preds = %2
%14 = load i16, i16* %5
store i16 %14, i16* %3
br label %15
15: ; preds = %13, %11
%16 = load i16, i16* %3
ret i16 %16
}

LLVM IR (-O2):
define signext i16 @max(i16 signext %0, i16 signext %1) {
%3 = icmp sgt i16 %0, %1
%4 = select i1 %3, i16 %0, i16 %1
ret i16 %4
}
A0AR1(r0, r1, x0, x1, p0, p1) int r0, r1;
int *p0, *p1;
{ (*((int *)10000000)) = (p1[1111111 / 4]); }


x86 assembly (clang, -O0):
<A0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x28(%rbp),%rax
mov    0x10f444(%rax),%ecx
mov    $0x989680,%eax
mov    %ecx,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<A0AR1>:
mov    0x10f444(%r9),%eax
mov    %eax,0x989680
ret

LLVM IR (-O0):
define i32 @A0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i32* %4, i32* %5) {
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32*
%13 = alloca i32*
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32* %4, i32** %12
store i32* %5, i32** %13
%14 = load i32*, i32** %13
%15 = getelementptr inbounds i32, i32* %14, i64 277777
%16 = load i32, i32* %15
store i32 %16, i32* inttoptr (i64 10000000 to i32*)
%17 = load i32, i32* %7
ret i32 %17
}

LLVM IR (-O2):
define i32 @A0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i32* nocapture readnone %4, i32* nocapture %5) {
%7 = getelementptr inbounds i32, i32* %5, i64 277777
%8 = load i32, i32* %7
store i32 %8, i32* inttoptr (i64 10000000 to i32*)
ret i32 undef
}
/* Variables and functions */
float gb_fast_exp(float);
float gb_fast_exp2(float x) {
  return gb_fast_exp(0.693147180559945309417232121458176568f * x);
}


x86 assembly (clang, -O0):
<gb_fast_exp2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  0xedb(%rip),%xmm0
mulss  -0x4(%rbp),%xmm0
call   1030 <gb_fast_exp@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gb_fast_exp2>:
mulss  0xee8(%rip),%xmm0
jmp    1030 <gb_fast_exp@plt>

LLVM IR (-O0):
define float @gb_fast_exp2(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fmul float 0x3FE62E4300000000, %3
%5 = call float @gb_fast_exp(float %4)
ret float %5
}

LLVM IR (-O2):
define float @gb_fast_exp2(float %0) {
%2 = fmul float %0, 0x3FE62E4300000000
%3 = tail call float @gb_fast_exp(float %2)
ret float %3
}
/* Variables and functions */
int fun_b(int);
__attribute__((always_)) int fun_a(int arga) {
  static int loca = 0;
  loca += arga;
  return fun_b(loca);
}


x86 assembly (clang, -O0):
<fun_a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    0x2f08(%rip),%eax
mov    %eax,0x2f02(%rip)
mov    0x2efc(%rip),%edi
call   1030 <fun_b@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun_a>:
add    0x2f16(%rip),%edi
mov    %edi,0x2f10(%rip)
jmp    1030 <fun_b@plt>

LLVM IR (-O0):
@fun_a.loca = internal global i32 0
define i32 @fun_a(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* @fun_a.loca
%5 = add nsw i32 %4, %3
store i32 %5, i32* @fun_a.loca
%6 = load i32, i32* @fun_a.loca
%7 = call i32 @fun_b(i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@fun_a.loca = internal unnamed_addr global i32 0
define i32 @fun_a(i32 %0) {
%2 = load i32, i32* @fun_a.loca
%3 = add nsw i32 %2, %0
store i32 %3, i32* @fun_a.loca
%4 = tail call i32 @fun_b(i32 %3)
ret i32 %4
}
AR0AR1(r0, r1, x0, x1, p0, p1) short r0, r1;
short *p0, *p1;
{
  if ((p0[10000000]) <= (p1[1111111 / 4]))
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<AR0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %di,%si
mov    %si,-0x6(%rbp)
mov    %ax,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movswl 0x1312d00(%rax),%eax
mov    -0x20(%rbp),%rcx
movswl 0x87a22(%rcx),%ecx
cmp    %ecx,%eax
jg     1149 <AR0AR1+0x49>
movl   $0x1,-0x4(%rbp)
jmp    1150 <AR0AR1+0x50>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0AR1>:
movzwl 0x1312d00(%r8),%ecx
01
xor    %eax,%eax
cmp    0x87a22(%r9),%cx
setle  %al
ret

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

LLVM IR (-O2):
define i32 @AR0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i16* nocapture %4, i16* nocapture %5) {
%7 = getelementptr inbounds i16, i16* %4, i64 10000000
%8 = load i16, i16* %7
%9 = getelementptr inbounds i16, i16* %5, i64 277777
%10 = load i16, i16* %9
%11 = icmp sle i16 %8, %10
%12 = zext i1 %11 to i32
ret i32 %12
}
int test1(int a, int b) { return (a ^ b) == a; }


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
xor    %eax,%eax
test   %esi,%esi
sete   %al
ret

LLVM IR (-O0):
define i32 @test1(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 = xor i32 %5, %6
%8 = load i32, i32* %3
%9 = icmp eq i32 %7, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @test1(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
char *i3ipc_get_completions(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  char *comp;
  comp = i3ipc_get_completions(NULL);
  printf("completions: %s\n", comp);
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1040 <i3ipc_get_completions@plt>
lea    0xed1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [17 x i8] c"completions: %s\0A\00"
define i32 @main() {
%1 = tail call i8* @i3ipc_get_completions(i32* null)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i8* %1)
ret i32 0
}
int find(double value, double arr[], int size) {
  int i;
  for (i = 0; i < size; i++)
    if (arr[i] == value)
      return 1;
  return 0;
}


x86 assembly (clang, -O0):
<find>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
mov    %rdi,-0x18(%rbp)
mov    %esi,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1160 <find+0x60>
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
ucomisd -0x10(%rbp),%xmm0
jne    114d <find+0x4d>
jp     114d <find+0x4d>
movl   $0x1,-0x4(%rbp)
jmp    1167 <find+0x67>
jmp    1152 <find+0x52>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1117 <find+0x17>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find>:
test   %esi,%esi
jle    1126 <find+0x26>
mov    %esi,%eax
xor    %ecx,%ecx
nopl   0x0(%rax,%rax,1)
movsd  (%rdi,%rcx,8),%xmm1
ucomisd %xmm0,%xmm1
jne    111d <find+0x1d>
jnp    1129 <find+0x29>
add    $0x1,%rcx
cmp    %rcx,%rax
jne    1110 <find+0x10>
xor    %eax,%eax
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @find(double %0, double* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %15
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %14, %6
br i1 %8, label %15, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %14, %7 ]
%11 = getelementptr inbounds double, double* %1, i64 %10
%12 = load double, double* %11
%13 = fcmp oeq double %12, %0
%14 = add nuw nsw i64 %10, 1
br i1 %13, label %15, label %7
15: ; preds = %9, %7, %3
%16 = phi i32 [ 0, %3 ], [ 0, %7 ], [ 1, %9 ]
ret i32 %16
}
/* Type definitions */
typedef int /*<<< orphan*/ u_char;

/* Variables and functions */
int ns_name_pton2(char const *, int /*<<< orphan*/ *, size_t,
                  int /*<<< orphan*/ *);
int ns_name_pton(const char *src, u_char *dst, size_t dstsiz) {
  return (ns_name_pton2(src, dst, dstsiz, NULL));
}


x86 assembly (clang, -O0):
<ns_name_pton>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
xor    %eax,%eax
mov    %eax,%ecx
call   1030 <ns_name_pton2@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns_name_pton>:
xor    %ecx,%ecx
jmp    1030 <ns_name_pton2@plt>

LLVM IR (-O0):
define i32 @ns_name_pton(i8* %0, i32* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i64
store i8* %0, i8** %4
store i32* %1, i32** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i32*, i32** %5
%9 = load i64, i64* %6
%10 = call i32 @ns_name_pton2(i8* %7, i32* %8, i64 %9, i32* null)
ret i32 %10
}

LLVM IR (-O2):
define i32 @ns_name_pton(i8* %0, i32* %1, i64 %2) {
%4 = tail call i32 @ns_name_pton2(i8* %0, i32* %1, i64 %2, i32* null)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ gmvwrite_velocity_data(int, char *, char *, char *);
void fgmvwrite_velocity_data_(int *data_type, char *u, char *v, char *w) {
  gmvwrite_velocity_data(*data_type, u, v, w);
}


x86 assembly (clang, -O0):
<fgmvwrite_velocity_data_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <gmvwrite_velocity_data@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fgmvwrite_velocity_data_>:
mov    (%rdi),%edi
jmp    1030 <gmvwrite_velocity_data@plt>

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

LLVM IR (-O2):
define void @fgmvwrite_velocity_data_(i32* nocapture %0, i8* %1, i8* %2, i8* %3) {
%5 = load i32, i32* %0
%6 = tail call i32 @gmvwrite_velocity_data(i32 %5, i8* %1, i8* %2, i8* %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ _getch();
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ system(char *);
void fun1() {
  system("cls");
  printf("Addition\n");
  _getch();
}


x86 assembly (clang, -O0):
<fun1>:
push   %rbp
mov    %rsp,%rbp
lea    0xec5(%rip),%rdi
call   1030 <system@plt>
lea    0xebd(%rip),%rdi
call   1040 <printf@plt>
mov    $0x0,%al
call   1050 <_getch@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<fun1>:
push   %rax
lea    0xec8(%rip),%rdi
call   1040 <system@plt>
lea    0xec0(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
jmp    1050 <_getch@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"cls\00"
@.str.1 = [10 x i8] c"Addition\0A\00"
define void @fun1() {
%1 = call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 (...) @_getch()
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"cls\00"
@str = [9 x i8] c"Addition\00"
define void @fun1() {
%1 = tail call i32 @system(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 (...) @_getch()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
void usage(const char *name) {
  printf("usage: %s <fimrware.bin> <dest_dir>\n", name);
}


x86 assembly (clang, -O0):
<usage>:
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):
<usage>:
mov    %rdi,%rsi
lea    0xee6(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"usage: %s <fimrware.bin> <dest_dir>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"usage: %s <fimrware.bin> <dest_dir>\0A\00"
define void @usage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
void enic_busy_poll_init_lock(struct vnic_rq *UNUSED_rq
                              __attribute__((__unused__))) {}


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

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

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

LLVM IR (-O2):
%struct.vnic_rq = type opaque
define void @enic_busy_poll_init_lock(%struct.vnic_rq* nocapture %0) {
ret void
}
/* Variables and functions */
void Reserved_Handler31(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Reserved_Handler31>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Reserved_Handler31+0x9>
jmp    1109 <Reserved_Handler31+0x9>

x86 assembly (clang, -O2):
<Reserved_Handler31>:
jmp    1100 <Reserved_Handler31>

LLVM IR (-O0):
define void @Reserved_Handler31() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Reserved_Handler31() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ addrange(int, int);
void addranges_s(void) {
  addrange(0x9, 0x9);
  addrange(0xA, 0xD);
  addrange(0x20, 0x20);
  addrange(0xA0, 0xA0);
  addrange(0x2028, 0x2029);
  addrange(0xFEFF, 0xFEFF);
}


x86 assembly (clang, -O0):
<addranges_s>:
push   %rbp
mov    %rsp,%rbp
mov    $0x9,%esi
mov    %esi,%edi
call   1030 <addrange@plt>
mov    $0xa,%edi
mov    $0xd,%esi
call   1030 <addrange@plt>
mov    $0x20,%esi
mov    %esi,%edi
call   1030 <addrange@plt>
mov    $0xa0,%esi
mov    %esi,%edi
call   1030 <addrange@plt>
mov    $0x2028,%edi
mov    $0x2029,%esi
call   1030 <addrange@plt>
mov    $0xfeff,%esi
mov    %esi,%edi
call   1030 <addrange@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<addranges_s>:
push   %rax
mov    $0x9,%edi
mov    $0x9,%esi
call   1030 <addrange@plt>
mov    $0xa,%edi
mov    $0xd,%esi
call   1030 <addrange@plt>
mov    $0x20,%edi
mov    $0x20,%esi
call   1030 <addrange@plt>
mov    $0xa0,%edi
mov    $0xa0,%esi
call   1030 <addrange@plt>
mov    $0x2028,%edi
mov    $0x2029,%esi
call   1030 <addrange@plt>
mov    $0xfeff,%edi
mov    $0xfeff,%esi
pop    %rax
jmp    1030 <addrange@plt>

LLVM IR (-O0):
define void @addranges_s() {
%1 = call i32 @addrange(i32 9, i32 9)
%2 = call i32 @addrange(i32 10, i32 13)
%3 = call i32 @addrange(i32 32, i32 32)
%4 = call i32 @addrange(i32 160, i32 160)
%5 = call i32 @addrange(i32 8232, i32 8233)
%6 = call i32 @addrange(i32 65279, i32 65279)
ret void
}

LLVM IR (-O2):
define void @addranges_s() {
%1 = tail call i32 @addrange(i32 9, i32 9)
%2 = tail call i32 @addrange(i32 10, i32 13)
%3 = tail call i32 @addrange(i32 32, i32 32)
%4 = tail call i32 @addrange(i32 160, i32 160)
%5 = tail call i32 @addrange(i32 8232, i32 8233)
%6 = tail call i32 @addrange(i32 65279, i32 65279)
ret void
}
/* Type definitions */
struct tabstops_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ tabs_assign(struct tabstops_t *, struct tabstops_t *);
int /*<<< orphan*/ tabs_init(struct tabstops_t *, int /*<<< orphan*/, int,
                             int /*<<< orphan*/ *);
void tabs_initfrom(struct tabstops_t *tabs, struct tabstops_t *src) {
  ;
  tabs_init(tabs, 0, 8, NULL);
  tabs_assign(tabs, src);
  { return; };
}


x86 assembly (clang, -O0):
<tabs_initfrom>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
xor    %eax,%eax
mov    %eax,%ecx
call   1040 <tabs_init@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <tabs_assign@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tabs_initfrom>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %esi,%esi
mov    $0x8,%edx
xor    %ecx,%ecx
call   1040 <tabs_init@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <tabs_assign@plt>

LLVM IR (-O0):
%struct.tabstops_t = type { i32 }
define void @tabs_initfrom(%struct.tabstops_t* %0, %struct.tabstops_t* %1) {
%3 = alloca %struct.tabstops_t*
%4 = alloca %struct.tabstops_t*
store %struct.tabstops_t* %0, %struct.tabstops_t** %3
store %struct.tabstops_t* %1, %struct.tabstops_t** %4
%5 = load %struct.tabstops_t*, %struct.tabstops_t** %3
%6 = call i32 @tabs_init(%struct.tabstops_t* %5, i32 0, i32 8, i32* null)
%7 = load %struct.tabstops_t*, %struct.tabstops_t** %3
%8 = load %struct.tabstops_t*, %struct.tabstops_t** %4
%9 = call i32 @tabs_assign(%struct.tabstops_t* %7, %struct.tabstops_t* %8)
ret void
}

LLVM IR (-O2):
%struct.tabstops_t = type { i32 }
define void @tabs_initfrom(%struct.tabstops_t* %0, %struct.tabstops_t* %1) {
%3 = tail call i32 @tabs_init(%struct.tabstops_t* %0, i32 0, i32 8, i32* null)
%4 = tail call i32 @tabs_assign(%struct.tabstops_t* %0, %struct.tabstops_t* %1)
ret void
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
uint8_t jh_l(uint8_t v, uint8_t w) {
  v ^= ((w << 1) ^ (w >> 3) ^ ((w >> 2) & 2)) & 0xf;
  w ^= ((v << 1) ^ (v >> 3) ^ ((v >> 2) & 2)) & 0xf;
  return v | (w << 4);
}


x86 assembly (clang, -O0):
<jh_l>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x1,%eax
mov    -0x8(%rbp),%ecx
sar    $0x3,%ecx
xor    %ecx,%eax
mov    -0x8(%rbp),%ecx
sar    $0x2,%ecx
and    $0x2,%ecx
xor    %ecx,%eax
and    $0xf,%eax
xor    -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x1,%eax
mov    -0x4(%rbp),%ecx
sar    $0x3,%ecx
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
sar    $0x2,%ecx
and    $0x2,%ecx
xor    %ecx,%eax
and    $0xf,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shl    $0x4,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<jh_l>:
lea    (%rsi,%rsi,1),%eax
mov    %esi,%ecx
shr    $0x3,%ecx
xor    %eax,%ecx
mov    %esi,%edx
shr    $0x2,%edx
and    $0x2,%edx
and    $0xf,%ecx
xor    %edi,%edx
xor    %ecx,%edx
lea    (%rdx,%rdx,1),%eax
mov    %edx,%ecx
shr    $0x3,%ecx
xor    %eax,%ecx
mov    %edx,%eax
shr    $0x2,%eax
and    $0x2,%eax
and    $0xf,%ecx
xor    %esi,%eax
xor    %ecx,%eax
shl    $0x4,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @jh_l(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 = shl i32 %5, 1
%7 = load i32, i32* %4
%8 = ashr i32 %7, 3
%9 = xor i32 %6, %8
%10 = load i32, i32* %4
%11 = ashr i32 %10, 2
%12 = and i32 %11, 2
%13 = xor i32 %9, %12
%14 = and i32 %13, 15
%15 = load i32, i32* %3
%16 = xor i32 %15, %14
store i32 %16, i32* %3
%17 = load i32, i32* %3
%18 = shl i32 %17, 1
%19 = load i32, i32* %3
%20 = ashr i32 %19, 3
%21 = xor i32 %18, %20
%22 = load i32, i32* %3
%23 = ashr i32 %22, 2
%24 = and i32 %23, 2
%25 = xor i32 %21, %24
%26 = and i32 %25, 15
%27 = load i32, i32* %4
%28 = xor i32 %27, %26
store i32 %28, i32* %4
%29 = load i32, i32* %3
%30 = load i32, i32* %4
%31 = shl i32 %30, 4
%32 = or i32 %29, %31
ret i32 %32
}

LLVM IR (-O2):
define i32 @jh_l(i32 %0, i32 %1) {
%3 = shl i32 %1, 1
%4 = lshr i32 %1, 3
%5 = xor i32 %3, %4
%6 = lshr i32 %1, 2
%7 = and i32 %6, 2
%8 = and i32 %5, 15
%9 = xor i32 %7, %0
%10 = xor i32 %9, %8
%11 = shl i32 %10, 1
%12 = lshr i32 %10, 3
%13 = xor i32 %11, %12
%14 = lshr i32 %10, 2
%15 = and i32 %14, 2
%16 = and i32 %13, 15
%17 = xor i32 %15, %1
%18 = xor i32 %17, %16
%19 = shl i32 %18, 4
%20 = or i32 %19, %10
ret i32 %20
}
/* Variables and functions */
char *capture_call_stack();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void crash(int signal) {
  fprintf(stderr, "SIGSEGV received.\n%s", capture_call_stack());
  exit(255);
}


x86 assembly (clang, -O0):
<crash>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2e9e(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    $0x0,%al
call   1040 <capture_call_stack@plt>
mov    -0x8(%rbp),%edi
mov    %rax,%rdx
lea    0xea5(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0xff,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<crash>:
push   %rbx
mov    0x2ea8(%rip),%rax
mov    (%rax),%ebx
xor    %eax,%eax
call   1040 <capture_call_stack@plt>
lea    0xeb8(%rip),%rsi
mov    %ebx,%edi
mov    %rax,%rdx
call   1030 <fprintf@plt>
mov    $0xff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [21 x i8] c"SIGSEGV received.\0A%s\00"
define void @crash(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @stderr
%4 = call i8* (...) @capture_call_stack()
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 255)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [21 x i8] c"SIGSEGV received.\0A%s\00"
define void @crash(i32 %0) {
%2 = load i32, i32* @stderr
%3 = tail call i8* (...) @capture_call_stack()
%4 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = tail call i32 @exit(i32 255)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("HOLA MUNDO");
  printf("bye bye");
  return 0;
}


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>
lea    0xed9(%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 <printf@plt>
lea    0xee7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [11 x i8] c"HOLA MUNDO\00"
@.str.1 = [8 x i8] c"bye bye\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [11 x i8] c"HOLA MUNDO\00"
@.str.1 = [8 x i8] c"bye bye\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
void _libSC_info_fork_prepare(void) {}


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

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

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

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