xunge/DecIR huggingface dataset:
float max(float a, float b) {
  float r;
  r = (a > b) ? a : b;
  return r;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
ucomiss -0x8(%rbp),%xmm0
jbe    112c <max+0x2c>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    1136 <max+0x36>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
maxss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @max(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 = fcmp ogt float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %3
br label %13
11: ; preds = %2
%12 = load float, float* %4
br label %13
13: ; preds = %11, %9
%14 = phi float [ %10, %9 ], [ %12, %11 ]
store float %14, float* %5
%15 = load float, float* %5
ret float %15
}

LLVM IR (-O2):
define float @max(float %0, float %1) {
%3 = fcmp ogt float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
int ssds_get_gen_name(int, int /*<<< orphan*/ *, char *, char *, char *, int);
int ssds_get_name(int pcfd, char *res, int len) {
  return ssds_get_gen_name(pcfd, NULL, "get_name", "name", res, len);
}


x86 assembly (clang, -O0):
<ssds_get_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%r8
mov    -0x14(%rbp),%r9d
xor    %eax,%eax
mov    %eax,%esi
lea    0xec8(%rip),%rdx
lea    0xec5(%rip),%rcx
call   1030 <ssds_get_gen_name@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssds_get_name>:
mov    %edx,%r9d
mov    %rsi,%r8
lea    0xee3(%rip),%rdx
lea    0xee0(%rip),%rcx
xor    %esi,%esi
jmp    1030 <ssds_get_gen_name@plt>

LLVM IR (-O0):
@.str = [9 x i8] c"get_name\00"
@.str.1 = [5 x i8] c"name\00"
define i32 @ssds_get_name(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
store i32 %0, i32* %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i32, i32* %6
%10 = call i32 @ssds_get_gen_name(i32 %7, i32* null, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %8, i32 %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [9 x i8] c"get_name\00"
@.str.1 = [5 x i8] c"name\00"
define i32 @ssds_get_name(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @ssds_get_gen_name(i32 %0, i32* null, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), i8* %1, i32 %2)
ret i32 %4
}
int RKMath_IsEqual(const float vec_a[], const float vec_b[], const int size) {
  int i = 0;
  while (i < size) {
    if (vec_a[i] != vec_b[i])
      return 0;
    i++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<RKMath_IsEqual>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movl   $0x0,-0x20(%rbp)
mov    -0x20(%rbp),%eax
cmp    -0x1c(%rbp),%eax
jge    1166 <RKMath_IsEqual+0x66>
mov    -0x10(%rbp),%rax
movslq -0x20(%rbp),%rcx
movss  (%rax,%rcx,4),%xmm0
mov    -0x18(%rbp),%rax
movslq -0x20(%rbp),%rcx
ucomiss (%rax,%rcx,4),%xmm0
jne    114c <RKMath_IsEqual+0x4c>
jp     114c <RKMath_IsEqual+0x4c>
jmp    1158 <RKMath_IsEqual+0x58>
movl   $0x0,-0x4(%rbp)
jmp    116d <RKMath_IsEqual+0x6d>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    1116 <RKMath_IsEqual+0x16>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<RKMath_IsEqual>:
mov    $0x1,%eax
test   %edx,%edx
jle    1126 <RKMath_IsEqual+0x26>
mov    %edx,%ecx
xor    %edx,%edx
nopl   (%rax)
movss  (%rdi,%rdx,4),%xmm0
ucomiss (%rsi,%rdx,4),%xmm0
jne    1127 <RKMath_IsEqual+0x27>
jp     1127 <RKMath_IsEqual+0x27>
add    $0x1,%rdx
cmp    %rdx,%rcx
jne    1110 <RKMath_IsEqual+0x10>
ret
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @RKMath_IsEqual(float* nocapture %0, float* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %9
7: ; preds = %9
%8 = icmp eq i64 %16, %6
br i1 %8, label %17, label %9
9: ; preds = %5, %7
%10 = phi i64 [ 0, %5 ], [ %16, %7 ]
%11 = getelementptr inbounds float, float* %0, i64 %10
%12 = load float, float* %11
%13 = getelementptr inbounds float, float* %1, i64 %10
%14 = load float, float* %13
%15 = fcmp une float %12, %14
%16 = add nuw nsw i64 %10, 1
br i1 %15, label %17, label %7
17: ; preds = %9, %7, %3
%18 = phi i32 [ 1, %3 ], [ 1, %7 ], [ 0, %9 ]
ret i32 %18
}
/* Variables and functions */
int /*<<< orphan*/ SIGCHLD;
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
int /*<<< orphan*/ wait(int *);
void Dead_baby(int x) {
  int status;
  wait(&status);
  signal(SIGCHLD, Dead_baby);
}


x86 assembly (clang, -O0):
<Dead_baby>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <wait@plt>
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    0x2ea4(%rip),%rsi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Dead_baby>:
push   %rax
lea    0x4(%rsp),%rdi
call   1040 <wait@plt>
mov    0x2eae(%rip),%rax
mov    (%rax),%edi
mov    0x2ead(%rip),%rsi
call   1030 <signal@plt>
pop    %rax
ret

LLVM IR (-O0):
@SIGCHLD = global i32 0
define void @Dead_baby(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @wait(i32* %3)
%5 = load i32, i32* @SIGCHLD
%6 = call i32 @signal(i32 %5, void (i32)* @Dead_baby)
ret void
}

LLVM IR (-O2):
@SIGCHLD = global i32 0
define void @Dead_baby(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @wait(i32* %2)
%5 = load i32, i32* @SIGCHLD
%6 = call i32 @signal(i32 %5, void (i32)* @Dead_baby)
ret void
}
/* Variables and functions */
char *strcpy(char *, char const *);
int strlen(char *);
char *strcat(char *dst, const char *src) {
  return strcpy(dst + strlen(dst), src);
}


x86 assembly (clang, -O0):
<strcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x18(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcat>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <strcpy@plt>

LLVM IR (-O0):
define i8* @strcat(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** %3
%7 = call i32 @strlen(i8* %6)
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %5, i64 %8
%10 = load i8*, i8** %4
%11 = call i8* @strcpy(i8* %9, i8* %10)
ret i8* %11
}

LLVM IR (-O2):
define i8* @strcat(i8* %0, i8* nocapture %1) {
%3 = tail call i32 @strlen(i8* %0)
%4 = sext i32 %3 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = tail call i8* @strcpy(i8* dereferenceable(1) %5, i8* dereferenceable(1) %1)
ret i8* %5
}
/* Variables and functions */
int /*<<< orphan*/ delayMilliseconds(unsigned long);
void delay(unsigned long ms) { delayMilliseconds(ms); }


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

x86 assembly (clang, -O2):
<delay>:
jmp    1030 <delayMilliseconds@plt>

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

LLVM IR (-O2):
define void @delay(i64 %0) {
%2 = tail call i32 @delayMilliseconds(i64 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *);
int /*<<< orphan*/ strcat(char *, char *);
int main(int argc, char **argv) {
  char str[50];
  int c;
  sprintf(str, "Hello");
  strcat(str, "World");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x60,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x50(%rbp),%rdi
lea    0xec6(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x50(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1030 <strcat@plt>
xor    %eax,%eax
add    $0x60,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x38,%rsp
movw   $0x6f,0x4(%rsp)
movl   $0x6c6c6548,(%rsp)
lea    0xedd(%rip),%rsi
mov    %rsp,%rdi
call   1030 <strcat@plt>
xor    %eax,%eax
add    $0x38,%rsp
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"Hello\00"
@.str.1 = [6 x i8] c"World\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [50 x i8]
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%5 = call i32 @strcat(i8* %4, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
int _determine_leaf_words(int nodeb, int leafwidth) {
  if (leafwidth > nodeb)
    return 2;
  return 1;
}


x86 assembly (clang, -O0):
<_determine_leaf_words>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x8(%rbp),%eax
jle    1122 <_determine_leaf_words+0x22>
movl   $0x2,-0x4(%rbp)
jmp    1129 <_determine_leaf_words+0x29>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_determine_leaf_words>:
xor    %eax,%eax
cmp    %edi,%esi
setg   %al
add    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @_determine_leaf_words(i32 %0, i32 %1) {
%3 = icmp sgt i32 %1, %0
%4 = select i1 %3, i32 2, i32 1
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ENOMEM;
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ error(int /*<<< orphan*/, int /*<<< orphan*/, char *,
                         size_t const);
void *malloc(size_t const);
void *p_malloc(const size_t size) {
  void *const ptr = malloc(size);
  if (ptr == NULL) {
    error(EXIT_FAILURE, ENOMEM, "malloc(size=%zu)", size);
  }
  return ptr;
}


x86 assembly (clang, -O0):
<p_malloc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1166 <p_malloc+0x46>
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    0x2e8c(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rcx
lea    0xe9f(%rip),%rdx
call   1040 <error@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_malloc>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
call   1030 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1155 <p_malloc+0x35>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
mov    0x2e9c(%rip),%rax
mov    (%rax),%esi
lea    0xeb3(%rip),%rdx
mov    %r14,%rcx
call   1040 <error@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@ENOMEM = global i32 0
@.str = [17 x i8] c"malloc(size=%zu)\00"
define i8* @p_malloc(i64 %0) {
%2 = alloca i64
%3 = alloca i8*
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = call i8* @malloc(i64 %4)
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = icmp eq i8* %6, null
br i1 %7, label %8, label %13
8: ; preds = %1
%9 = load i32, i32* @EXIT_FAILURE
%10 = load i32, i32* @ENOMEM
%11 = load i64, i64* %2
%12 = call i32 @error(i32 %9, i32 %10, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 %11)
br label %13
13: ; preds = %8, %1
%14 = load i8*, i8** %3
ret i8* %14
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@ENOMEM = global i32 0
@.str = [17 x i8] c"malloc(size=%zu)\00"
define noalias i8* @p_malloc(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
%3 = icmp eq i8* %2, null
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = load i32, i32* @EXIT_FAILURE
%6 = load i32, i32* @ENOMEM
%7 = tail call i32 @error(i32 %5, i32 %6, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i64 %0)
br label %8
8: ; preds = %4, %1
ret i8* %2
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *const, char const *const, size_t const);
void safe_strncpy(char *const to, const char *const from, const size_t size) {
  strncpy(to, from, size);
  to[size - 1] = '\0';
  return;
}


x86 assembly (clang, -O0):
<safe_strncpy>:
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
call   1030 <strncpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<safe_strncpy>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <strncpy@plt>
movb   $0x0,-0x1(%r14,%rbx,1)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @safe_strncpy(i8* %0, i8* %1, i64 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i64
store i8* %0, i8** %4
store i8* %1, i8** %5
store i64 %2, i64* %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i64, i64* %6
%10 = call i32 @strncpy(i8* %7, i8* %8, i64 %9)
%11 = load i8*, i8** %4
%12 = load i64, i64* %6
%13 = sub i64 %12, 1
%14 = getelementptr inbounds i8, i8* %11, i64 %13
store i8 0, i8* %14
ret void
}

LLVM IR (-O2):
define void @safe_strncpy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @strncpy(i8* %0, i8* %1, i64 %2)
%5 = add i64 %2, -1
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 0, i8* %6
ret void
}
int comp_doub(void *a, void *b) {
  double ad = *(double *)a, bd = *(double *)b;
  if (ad < bd)
    return -1;
  else if (ad > bd)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<comp_doub>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x20(%rbp),%xmm1
movsd  -0x28(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    1146 <comp_doub+0x46>
movl   $0xffffffff,-0x4(%rbp)
jmp    1169 <comp_doub+0x69>
movsd  -0x20(%rbp),%xmm0
ucomisd -0x28(%rbp),%xmm0
jbe    1162 <comp_doub+0x62>
movl   $0x1,-0x4(%rbp)
jmp    1169 <comp_doub+0x69>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<comp_doub>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %ecx,%ecx
ucomisd %xmm1,%xmm0
seta   %cl
ucomisd %xmm0,%xmm1
mov    $0xffffffff,%eax
cmovbe %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @comp_doub(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = load double, double* %3
%5 = bitcast i8* %1 to double*
%6 = load double, double* %5
%7 = fcmp olt double %4, %6
%8 = fcmp ogt double %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int f251(int *);
int f252(int *p) { return f251(p); }


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

x86 assembly (clang, -O2):
<f252>:
jmp    1030 <f251@plt>

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

LLVM IR (-O2):
define i32 @f252(i32* %0) {
%2 = tail call i32 @f251(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int);
int /*<<< orphan*/ stderr;
void print_rewrite_signum_help() {
  fprintf(stderr,
          "Usage: -r option takes <signum>:<signum>, where <signum> "
          "is between 1 and %d.\n"
          "This option can be specified multiple times.\n"
          "Use --help for full usage.\n",
          31);
  exit(1);
}


x86 assembly (clang, -O0):
<print_rewrite_signum_help>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
mov    $0x1f,%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<print_rewrite_signum_help>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
mov    $0x1f,%edx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [151 x i8] c"Usage: -r option takes <signum>:<signum>, where <signum> is between 1 and %d.\0AThis option can be specified multiple times.\0AUse --help for full usage.\0A\00"
define void @print_rewrite_signum_help() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 31)
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [151 x i8] c"Usage: -r option takes <signum>:<signum>, where <signum> is between 1 and %d.\0AThis option can be specified multiple times.\0AUse --help for full usage.\0A\00"
define void @print_rewrite_signum_help() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([151 x i8], [151 x i8]* @.str, i64 0, i64 0), i32 31)
%3 = tail call i32 @exit(i32 1)
unreachable
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ rfputc(unsigned char, int /*<<< orphan*/ *);
void rfputs(char *string, FILE *file) {
  while (*string) {
    rfputc((unsigned char)*string, file);
    string++;
  }
}


x86 assembly (clang, -O0):
<rfputs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1150 <rfputs+0x40>
mov    -0x8(%rbp),%rax
mov    (%rax),%al
mov    -0x10(%rbp),%rsi
movzbl %al,%edi
call   1030 <rfputc@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1120 <rfputs+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rfputs>:
push   %r14
push   %rbx
push   %rax
mov    (%rdi),%al
test   %al,%al
je     1146 <rfputs+0x36>
mov    %rsi,%r14
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
movzbl %al,%edi
mov    %r14,%rsi
call   1030 <rfputc@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <rfputs+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @rfputs(i8* nocapture %0, i32* %1) {
%3 = load i8, i8* %0
%4 = icmp eq i8 %3, 0
br i1 %4, label %12, label %5
5: ; preds = %2, %5
%6 = phi i8 [ %10, %5 ], [ %3, %2 ]
%7 = phi i8* [ %9, %5 ], [ %0, %2 ]
%8 = tail call i32 @rfputc(i8 zeroext %6, i32* %1)
%9 = getelementptr inbounds i8, i8* %7, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, 0
br i1 %11, label %12, label %5
12: ; preds = %5, %2
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128d;
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ __builtin_ia32_cvtps2pd(int /*<<< orphan*/);
__m128d __attribute__((__always___, __nodebug__)) _mm_cvtps_pd(__m128 a) {
  return __builtin_ia32_cvtps2pd(a);
}


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

x86 assembly (clang, -O2):
<_mm_cvtps_pd>:
jmp    1030 <__builtin_ia32_cvtps2pd@plt>

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

LLVM IR (-O2):
define i32 @_mm_cvtps_pd(i32 %0) {
%2 = tail call i32 @__builtin_ia32_cvtps2pd(i32 %0)
ret i32 %2
}
unsigned int HashDispersionModulo(unsigned int id, unsigned int tam_tabla) {
  return id % tam_tabla;
}


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

x86 assembly (clang, -O2):
<HashDispersionModulo>:
mov    %edi,%eax
xor    %edx,%edx
div    %esi
mov    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @HashDispersionModulo(i32 %0, i32 %1) {
%3 = urem i32 %0, %1
ret i32 %3
}
/* Type definitions */
struct hostent {
  int dummy;
};

/* Variables and functions */
struct hostent *zfor_gethostbynamei(char const *, int);
struct hostent *zfor_gethostbyname(const char *name) {
  return zfor_gethostbynamei(name, 1);
}


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

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

LLVM IR (-O0):
%struct.hostent = type { i32 }
define %struct.hostent* @zfor_gethostbyname(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call %struct.hostent* @zfor_gethostbynamei(i8* %3, i32 1)
ret %struct.hostent* %4
}

LLVM IR (-O2):
%struct.hostent = type { i32 }
define %struct.hostent* @zfor_gethostbyname(i8* %0) {
%2 = tail call %struct.hostent* @zfor_gethostbynamei(i8* %0, i32 1)
ret %struct.hostent* %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  printf("Please enter a valid integer.");
  scanf("%d", &number);
  printf("You entered %d", number);
  struct data;
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%esi
lea    0xed3(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [30 x i8] c"Please enter a valid integer.\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"You entered %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%5 = load i32, i32* %2
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@.str = [30 x i8] c"Please enter a valid integer.\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [15 x i8] c"You entered %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([30 x i8], [30 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 %5)
ret i32 0
}
/* Variables and functions */
size_t lastlen(const char *s) {
  size_t len = 0;
  while (*s) {
    if (*s == '\n') {
      len = 0;
    } else {
      len++;
    }
    s++;
  }
  return len;
}


x86 assembly (clang, -O0):
<lastlen>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmpb   $0x0,(%rax)
je     1157 <lastlen+0x57>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
jne    113a <lastlen+0x3a>
movq   $0x0,-0x10(%rbp)
jmp    1146 <lastlen+0x46>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1110 <lastlen+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lastlen>:
xor    %eax,%eax
jmp    1116 <lastlen+0x16>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
xor    %eax,%eax
add    $0x1,%rdi
movzbl (%rdi),%ecx
cmp    $0xa,%cl
je     1110 <lastlen+0x10>
test   %cl,%cl
je     112c <lastlen+0x2c>
add    $0x1,%rax
add    $0x1,%rdi
jmp    1116 <lastlen+0x16>
ret

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

LLVM IR (-O2):
define i64 @lastlen(i8* nocapture %0) {
br label %2
2: ; preds = %8, %1
%3 = phi i8* [ %0, %1 ], [ %10, %8 ]
%4 = phi i64 [ 0, %1 ], [ %9, %8 ]
%5 = load i8, i8* %3
switch i8 %5, label %6 [
i8 0, label %11
i8 10, label %8
]
6: ; preds = %2
%7 = add i64 %4, 1
br label %8
8: ; preds = %2, %6
%9 = phi i64 [ %7, %6 ], [ 0, %2 ]
%10 = getelementptr inbounds i8, i8* %3, i64 1
br label %2
11: ; preds = %2
ret i64 %4
}
int fn4(int a, int b) {
  int tem1 = b | a;
  int tem2 = b & a;
  return tem1 - tem2;
}


x86 assembly (clang, -O0):
<fn4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
or     -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
and    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    -0x10(%rbp),%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @fn4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %4
%8 = load i32, i32* %3
%9 = or i32 %7, %8
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* %3
%12 = and i32 %10, %11
store i32 %12, i32* %6
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = sub nsw i32 %13, %14
ret i32 %15
}

LLVM IR (-O2):
define i32 @fn4(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int tcdrain(int fd) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<tcdrain>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tcdrain>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @tcdrain(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @tcdrain(i32 %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
long InterlockedExchangeAdd(long volatile *Addend, long Value) {
  return __sync_add_and_fetch(Addend, Value);
}


x86 assembly (clang, -O0):
<InterlockedExchangeAdd>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
mov    %rcx,%rax
lock xadd %rax,(%rdx)
add    %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<InterlockedExchangeAdd>:
mov    %rsi,%rax
lock xadd %rax,(%rdi)
add    %rsi,%rax
ret

LLVM IR (-O0):
define i64 @InterlockedExchangeAdd(i64* %0, i64 %1) {
%3 = alloca i64*
%4 = alloca i64
store i64* %0, i64** %3
store i64 %1, i64* %4
%5 = load i64*, i64** %3
%6 = load i64, i64* %4
%7 = atomicrmw add i64* %5, i64 %6 seq_cst
%8 = add i64 %7, %6
ret i64 %8
}

LLVM IR (-O2):
define i64 @InterlockedExchangeAdd(i64* nocapture %0, i64 %1) {
%3 = atomicrmw add i64* %0, i64 %1 seq_cst
%4 = add i64 %3, %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ audio_ic_set_micboost();
int /*<<< orphan*/ menu_numeric_toggle(void *, int, int /*<<< orphan*/, int);
void analog_boost_toggle(void *priv, int delta) {
  menu_numeric_toggle(priv, delta, 0, 6);
  audio_ic_set_micboost();
}


x86 assembly (clang, -O0):
<analog_boost_toggle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
xor    %edx,%edx
mov    $0x6,%ecx
call   1040 <menu_numeric_toggle@plt>
mov    $0x0,%al
call   1030 <audio_ic_set_micboost@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<analog_boost_toggle>:
push   %rax
xor    %edx,%edx
mov    $0x6,%ecx
call   1040 <menu_numeric_toggle@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <audio_ic_set_micboost@plt>

LLVM IR (-O0):
define void @analog_boost_toggle(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = call i32 @menu_numeric_toggle(i8* %5, i32 %6, i32 0, i32 6)
%8 = call i32 (...) @audio_ic_set_micboost()
ret void
}

LLVM IR (-O2):
define void @analog_boost_toggle(i8* %0, i32 %1) {
%3 = tail call i32 @menu_numeric_toggle(i8* %0, i32 %1, i32 0, i32 6)
%4 = tail call i32 (...) @audio_ic_set_micboost()
ret void
}
int cmp_lt_ull(const void *p, const void *q) {
  const unsigned long long a = *(const unsigned long long *)p;
  const unsigned long long b = *(const unsigned long long *)q;
  do {
    if (a > b)
      return +1;
    if (b > a)
      return -1;
    return 0;
  } while (0);
}


x86 assembly (clang, -O0):
<cmp_lt_ull>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x28(%rbp),%rax
jbe    113c <cmp_lt_ull+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    115d <cmp_lt_ull+0x5d>
mov    -0x28(%rbp),%rax
cmp    -0x20(%rbp),%rax
jbe    1156 <cmp_lt_ull+0x56>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <cmp_lt_ull+0x5d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp_lt_ull>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
cmp    %rcx,%rax
sbb    %edx,%edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovbe %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @cmp_lt_ull(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = load i64, i64* %3
%5 = bitcast i8* %1 to i64*
%6 = load i64, i64* %5
%7 = icmp ugt i64 %4, %6
%8 = icmp ugt i64 %6, %4
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ rcc_printf(char *, char const *);
void emit_get_result(const char *ocn) { rcc_printf("  mov %s, r0\n", ocn); }


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

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

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

LLVM IR (-O2):
@.str = [14 x i8] c" mov %s, r0\0A\00"
define void @emit_get_result(i8* %0) {
%2 = tail call i32 @rcc_printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ move_f(unsigned long *, unsigned short *);
void effe(unsigned long *p, unsigned short *o) {
  move_f(p, o);
  move_f(p, o);
  move_f(p, o);
  move_f(p, o);
}


x86 assembly (clang, -O0):
<effe>:
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 <move_f@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <move_f@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <move_f@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <move_f@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<effe>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <move_f@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <move_f@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <move_f@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <move_f@plt>

LLVM IR (-O0):
define void @effe(i64* %0, i16* %1) {
%3 = alloca i64*
%4 = alloca i16*
store i64* %0, i64** %3
store i16* %1, i16** %4
%5 = load i64*, i64** %3
%6 = load i16*, i16** %4
%7 = call i32 @move_f(i64* %5, i16* %6)
%8 = load i64*, i64** %3
%9 = load i16*, i16** %4
%10 = call i32 @move_f(i64* %8, i16* %9)
%11 = load i64*, i64** %3
%12 = load i16*, i16** %4
%13 = call i32 @move_f(i64* %11, i16* %12)
%14 = load i64*, i64** %3
%15 = load i16*, i16** %4
%16 = call i32 @move_f(i64* %14, i16* %15)
ret void
}

LLVM IR (-O2):
define void @effe(i64* %0, i16* %1) {
%3 = tail call i32 @move_f(i64* %0, i16* %1)
%4 = tail call i32 @move_f(i64* %0, i16* %1)
%5 = tail call i32 @move_f(i64* %0, i16* %1)
%6 = tail call i32 @move_f(i64* %0, i16* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ pid_t;
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int sched_getaffinity(pid_t pid, size_t cpusetsize, cpu_set_t *cpuset) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<sched_getaffinity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sched_getaffinity>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @sched_getaffinity(i32 %0, i64 %1, i32* %2) {
%4 = alloca i32
%5 = alloca i64
%6 = alloca i32*
store i32 %0, i32* %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%7 = load i32, i32* @ENOSYS
%8 = call i32 @__set_errno(i32 %7)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @sched_getaffinity(i32 %0, i64 %1, i32* nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
%5 = tail call i32 @__set_errno(i32 %4)
ret i32 -1
}
double usec_diff(double *end, double *begin) { return (*end - *begin); }


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

x86 assembly (clang, -O2):
<usec_diff>:
movsd  (%rdi),%xmm0
subsd  (%rsi),%xmm0
ret

LLVM IR (-O0):
define double @usec_diff(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %3
%6 = load double, double* %5
%7 = load double*, double** %4
%8 = load double, double* %7
%9 = fsub double %6, %8
ret double %9
}

LLVM IR (-O2):
define double @usec_diff(double* nocapture %0, double* nocapture %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = fsub double %3, %4
ret double %5
}
/* Type definitions */
typedef int uint64_t;

/* Variables and functions */
int rdtsc();
uint64_t calibrate(int c) {
  uint64_t cnt, t0, t;
  cnt = 0;
  t = t0 = rdtsc();
  while (t - t0 < c) {
    t = rdtsc();
    cnt++;
  }
  return cnt++;
}


x86 assembly (clang, -O0):
<calibrate>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rdtsc@plt>
mov    %eax,-0xc(%rbp)
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    1156 <calibrate+0x46>
mov    $0x0,%al
call   1030 <rdtsc@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112f <calibrate+0x1f>
mov    -0x8(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x8(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calibrate>:
push   %rbp
push   %r14
push   %rbx
mov    %edi,%r14d
xor    %ebp,%ebp
xor    %eax,%eax
call   1030 <rdtsc@plt>
test   %r14d,%r14d
jle    1141 <calibrate+0x31>
mov    %eax,%ebx
xor    %ebp,%ebp
nopl   0x0(%rax)
xor    %eax,%eax
call   1030 <rdtsc@plt>
add    $0x1,%ebp
sub    %ebx,%eax
cmp    %r14d,%eax
jl     1130 <calibrate+0x20>
mov    %ebp,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @calibrate(i32 %0) {
%2 = tail call i32 (...) @rdtsc()
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %10
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ 0, %1 ]
%6 = tail call i32 (...) @rdtsc()
%7 = add nuw nsw i32 %5, 1
%8 = sub nsw i32 %6, %2
%9 = icmp slt i32 %8, %0
br i1 %9, label %4, label %10
10: ; preds = %4, %1
%11 = phi i32 [ 0, %1 ], [ %7, %4 ]
ret i32 %11
}
char *mygetenv(const char *name) { return 0; }


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

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

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

LLVM IR (-O2):
define noalias i8* @mygetenv(i8* nocapture readnone %0) {
ret i8* null
}
/* Variables and functions */
double exp(double);
double OD(double OD) {
  double q9, a;
  if (OD == 140) {
    return 47;
  }
  a = (OD + (-106)) * (OD + (-106));
  q9 = 100.8 * exp(a / -3745);
  return q9;
}


x86 assembly (clang, -O0):
<OD>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jne    114c <OD+0x3c>
jp     114c <OD+0x3c>
movsd  0xede(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    11a3 <OD+0x93>
movsd  0xec4(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xeb7(%rip),%xmm1
addsd  -0x10(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
movsd  0xe94(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe78(%rip),%xmm0
mulsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<OD>:
push   %rax
ucomisd 0xeef(%rip),%xmm0
jne    1127 <OD+0x17>
jp     1127 <OD+0x17>
movsd  0xedb(%rip),%xmm0
pop    %rax
ret
addsd  0xee1(%rip),%xmm0
mulsd  %xmm0,%xmm0
divsd  0xedd(%rip),%xmm0
call   1030 <exp@plt>
mulsd  0xed8(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @OD(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
%6 = load double, double* %3
%7 = fcmp oeq double %6, 1.400000e+02
br i1 %7, label %8, label %9
8: ; preds = %1
store double 4.700000e+01, double* %2
br label %20
9: ; preds = %1
%10 = load double, double* %3
%11 = fadd double %10, -1.060000e+02
%12 = load double, double* %3
%13 = fadd double %12, -1.060000e+02
%14 = fmul double %11, %13
store double %14, double* %5
%15 = load double, double* %5
%16 = fdiv double %15, -3.745000e+03
%17 = call double @exp(double %16)
%18 = fmul double 1.008000e+02, %17
store double %18, double* %4
%19 = load double, double* %4
store double %19, double* %2
br label %20
20: ; preds = %9, %8
%21 = load double, double* %2
ret double %21
}

LLVM IR (-O2):
define double @OD(double %0) {
%2 = fcmp oeq double %0, 1.400000e+02
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = fadd double %0, -1.060000e+02
%5 = fmul double %4, %4
%6 = fdiv double %5, -3.745000e+03
%7 = tail call double @exp(double %6)
%8 = fmul double %7, 1.008000e+02
br label %9
9: ; preds = %1, %3
%10 = phi double [ %8, %3 ], [ 4.700000e+01, %1 ]
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int strlen(char *);
int main(void) {
  int x = strlen("HELLO WORLD");
  printf("%d\n", x);
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [12 x i8] c"HELLO WORLD\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = tail call i32 @strlen(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void main(void) {
  int a;
  printf("is a demo");
  printf("OK , ass");
  a = 0;
  a = a + 10;
  a = 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xee6(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"is a demo\00"
@.str.1 = [9 x i8] c"OK , ass\00"
define void @main() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
store i32 0, i32* %1
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 10
store i32 %5, i32* %1
store i32 0, i32* %1
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"is a demo\00"
@.str.1 = [9 x i8] c"OK , ass\00"
define void @main() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0))
ret void
}