xunge/DecIR huggingface dataset:
double zp(double z, double v) {
  double zp;
  zp = (v * z) / (z + v);
  return (zp);
}


x86 assembly (clang, -O0):
<zp>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
addsd  -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<zp>:
movapd %xmm0,%xmm2
mulsd  %xmm1,%xmm2
addsd  %xmm1,%xmm0
divsd  %xmm0,%xmm2
movapd %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @zp(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = load double, double* %3
%8 = fmul double %6, %7
%9 = load double, double* %3
%10 = load double, double* %4
%11 = fadd double %9, %10
%12 = fdiv double %8, %11
store double %12, double* %5
%13 = load double, double* %5
ret double %13
}

LLVM IR (-O2):
define double @zp(double %0, double %1) {
%3 = fmul double %0, %1
%4 = fadd double %0, %1
%5 = fdiv double %3, %4
ret double %5
}
/* Variables and functions */
int /*<<< orphan*/ ft_isalnum(int);
scalar_t__ ft_isprint(int);
int /*<<< orphan*/ ft_isspace(int);
int ft_ispunct(int c) {
  if (ft_isprint(c) && !ft_isspace(c) && !ft_isalnum(c))
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<ft_ispunct>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1050 <ft_isprint@plt>
cmp    $0x0,%rax
je     117b <ft_ispunct+0x4b>
mov    -0x8(%rbp),%edi
call   1040 <ft_isspace@plt>
cmp    $0x0,%eax
jne    117b <ft_ispunct+0x4b>
mov    -0x8(%rbp),%edi
call   1030 <ft_isalnum@plt>
cmp    $0x0,%eax
jne    117b <ft_ispunct+0x4b>
movl   $0x1,-0x4(%rbp)
jmp    1182 <ft_ispunct+0x52>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_ispunct>:
push   %rbx
mov    %edi,%ebx
call   1050 <ft_isprint@plt>
test   %rax,%rax
je     1153 <ft_ispunct+0x23>
mov    %ebx,%edi
call   1040 <ft_isspace@plt>
test   %eax,%eax
jne    1153 <ft_ispunct+0x23>
mov    %ebx,%edi
call   1030 <ft_isalnum@plt>
test   %eax,%eax
je     1157 <ft_ispunct+0x27>
xor    %eax,%eax
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @ft_ispunct(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = call i64 @ft_isprint(i32 %4)
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %1
%8 = load i32, i32* %3
%9 = call i32 @ft_isspace(i32 %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %16, label %11
11: ; preds = %7
%12 = load i32, i32* %3
%13 = call i32 @ft_isalnum(i32 %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %16, label %15
15: ; preds = %11
store i32 1, i32* %2
br label %17
16: ; preds = %11, %7, %1
store i32 0, i32* %2
br label %17
17: ; preds = %16, %15
%18 = load i32, i32* %2
ret i32 %18
}

LLVM IR (-O2):
define i32 @ft_ispunct(i32 %0) {
%2 = tail call i64 @ft_isprint(i32 %0)
%3 = icmp eq i64 %2, 0
br i1 %3, label %10, label %4
4: ; preds = %1
%5 = tail call i32 @ft_isspace(i32 %0)
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %4
%8 = tail call i32 @ft_isalnum(i32 %0)
%9 = icmp eq i32 %8, 0
br i1 %9, label %11, label %10
10: ; preds = %7, %4, %1
br label %11
11: ; preds = %7, %10
%12 = phi i32 [ 0, %10 ], [ 1, %7 ]
ret i32 %12
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
size_t strlen(char *);
int /*<<< orphan*/ strtok(char *, char *);
void get_word(char *input) {
  printf("Enter a word: ");
  fgets(input, 100, stdin);
  strtok(input, "\n");
  input[strlen(input)] = '\0';
}


x86 assembly (clang, -O0):
<get_word>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xead(%rip),%rdi
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    0x2e85(%rip),%rax
mov    (%rax),%edx
mov    $0x64,%esi
call   1050 <fgets@plt>
mov    -0x8(%rbp),%rdi
lea    0xe95(%rip),%rsi
call   1060 <strtok@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax,%rcx,1)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_word>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
call   1040 <printf@plt>
mov    0x2e91(%rip),%rax
mov    (%rax),%edx
mov    %rbx,%rdi
mov    $0x64,%esi
call   1050 <fgets@plt>
lea    0xea2(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strtok@plt>
mov    %rbx,%rdi
call   1030 <strlen@plt>
movb   $0x0,(%rbx,%rax,1)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Enter a word: \00"
@stdin = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @get_word(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 100, i32 %5)
%7 = load i8*, i8** %2
%8 = call i32 @strtok(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%9 = load i8*, i8** %2
%10 = load i8*, i8** %2
%11 = call i64 @strlen(i8* %10)
%12 = getelementptr inbounds i8, i8* %9, i64 %11
store i8 0, i8* %12
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"Enter a word: \00"
@stdin = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define void @get_word(i8* %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stdin
%4 = tail call i32 @fgets(i8* %0, i32 100, i32 %3)
%5 = tail call i32 @strtok(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%7 = getelementptr inbounds i8, i8* %0, i64 %6
store i8 0, i8* %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ moveToPoint(int, int);
void testAutoMovement() {
  moveToPoint(12, 12);
  moveToPoint(6, 0);
}


x86 assembly (clang, -O0):
<testAutoMovement>:
push   %rbp
mov    %rsp,%rbp
mov    $0xc,%esi
mov    %esi,%edi
call   1030 <moveToPoint@plt>
mov    $0x6,%edi
xor    %esi,%esi
call   1030 <moveToPoint@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testAutoMovement>:
push   %rax
mov    $0xc,%edi
mov    $0xc,%esi
call   1030 <moveToPoint@plt>
mov    $0x6,%edi
xor    %esi,%esi
pop    %rax
jmp    1030 <moveToPoint@plt>

LLVM IR (-O0):
define void @testAutoMovement() {
%1 = call i32 @moveToPoint(i32 12, i32 12)
%2 = call i32 @moveToPoint(i32 6, i32 0)
ret void
}

LLVM IR (-O2):
define void @testAutoMovement() {
%1 = tail call i32 @moveToPoint(i32 12, i32 12)
%2 = tail call i32 @moveToPoint(i32 6, i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ child_log(char *, int /*<<< orphan*/, char *);
int chroot(char const *);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ exit(int);
scalar_t__ strerror(int /*<<< orphan*/);
void do_chroot(const char *root) {
  int result = chroot(root);
  if (result == -1) {
    char *msg = (char *)strerror(errno);
    child_log("Child: An error has occurred during the chroot call:	"
              "		  %d\n%s\n",
              errno, msg);
    exit(-1);
  }
}


x86 assembly (clang, -O0):
<do_chroot>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <chroot@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    1197 <do_chroot+0x57>
mov    0x2e77(%rip),%rax
mov    (%rax),%edi
call   1060 <strerror@plt>
mov    %rax,-0x18(%rbp)
mov    0x2e65(%rip),%rax
mov    (%rax),%esi
mov    -0x18(%rbp),%rdx
lea    0xe78(%rip),%rdi
call   1040 <child_log@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_chroot>:
push   %rbx
call   1030 <chroot@plt>
cmp    $0xffffffff,%eax
je     114d <do_chroot+0xd>
pop    %rbx
ret
mov    0x2e8c(%rip),%rbx
mov    (%rbx),%edi
call   1060 <strerror@plt>
mov    (%rbx),%esi
lea    0xe9c(%rip),%rdi
mov    %rax,%rdx
call   1040 <child_log@plt>
mov    $0xffffffff,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@errno = global i32 0
@.str = [64 x i8] c"Child: An error has occurred during the chroot call:\09\09\09 %d\0A%s\0A\00"
define void @do_chroot(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i32 @chroot(i8* %5)
store i32 %6, i32* %3
%7 = load i32, i32* %3
%8 = icmp eq i32 %7, -1
br i1 %8, label %9, label %17
9: ; preds = %1
%10 = load i32, i32* @errno
%11 = call i64 @strerror(i32 %10)
%12 = inttoptr i64 %11 to i8*
store i8* %12, i8** %4
%13 = load i32, i32* @errno
%14 = load i8*, i8** %4
%15 = call i32 @child_log(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %13, i8* %14)
%16 = call i32 @exit(i32 -1)
unreachable
17: ; preds = %1
ret void
}

LLVM IR (-O2):
@errno = global i32 0
@.str = [64 x i8] c"Child: An error has occurred during the chroot call:\09\09\09 %d\0A%s\0A\00"
define void @do_chroot(i8* %0) {
%2 = tail call i32 @chroot(i8* %0)
%3 = icmp eq i32 %2, -1
br i1 %3, label %4, label %11
4: ; preds = %1
%5 = load i32, i32* @errno
%6 = tail call i64 @strerror(i32 %5)
%7 = inttoptr i64 %6 to i8*
%8 = load i32, i32* @errno
%9 = tail call i32 @child_log(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %7)
%10 = tail call i32 @exit(i32 -1)
unreachable
11: ; preds = %1
ret void
}
int ft_str_is_printable(char *str) {
  int i;
  int result;
  i = 0;
  result = 1;
  while (str[i]) {
    if (str[i] < ' ' || str[i] > '~')
      result = 0;
    i++;
  }
  return (result);
}


x86 assembly (clang, -O0):
<ft_str_is_printable>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1167 <ft_str_is_printable+0x67>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jl     1152 <ft_str_is_printable+0x52>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7e,%eax
jle    1159 <ft_str_is_printable+0x59>
movl   $0x0,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <ft_str_is_printable+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_str_is_printable>:
mov    (%rdi),%cl
test   %cl,%cl
je     1135 <ft_str_is_printable+0x35>
add    $0x1,%rdi
mov    $0x1,%eax
xor    %edx,%edx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x81,%cl
cmp    $0xa1,%cl
cmovb  %edx,%eax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1120 <ft_str_is_printable+0x20>
ret
mov    $0x1,%eax
ret

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

LLVM IR (-O2):
define i32 @ft_str_is_printable(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %15, label %4
4: ; preds = %1, %4
%5 = phi i64 [ %11, %4 ], [ 0, %1 ]
%6 = phi i8 [ %13, %4 ], [ %2, %1 ]
%7 = phi i32 [ %10, %4 ], [ 1, %1 ]
%8 = add i8 %6, -127
%9 = icmp ult i8 %8, -95
%10 = select i1 %9, i32 0, i32 %7
%11 = add nuw nsw i64 %5, 1
%12 = getelementptr inbounds i8, i8* %0, i64 %11
%13 = load i8, i8* %12
%14 = icmp eq i8 %13, 0
br i1 %14, label %15, label %4
15: ; preds = %4, %1
%16 = phi i32 [ 1, %1 ], [ %10, %4 ]
ret i32 %16
}
/* Variables and functions */
double pow(double, float);
double gamma_2_2_to_linear(double value) {
  if (value > 0.03928F)
    return pow((value + 0.055F) / 1.055F, 2.4F);
  return value / 12.92F;
}


x86 assembly (clang, -O0):
<gamma_2_2_to_linear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1164 <gamma_2_2_to_linear+0x54>
movsd  0xedc(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xec7(%rip),%xmm1
divsd  %xmm1,%xmm0
movss  0xecb(%rip),%xmm1
call   1030 <pow@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    117a <gamma_2_2_to_linear+0x6a>
movsd  -0x10(%rbp),%xmm0
movsd  0xe97(%rip),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gamma_2_2_to_linear>:
ucomisd 0xee8(%rip),%xmm0
jbe    1137 <gamma_2_2_to_linear+0x27>
addsd  0xeee(%rip),%xmm0
divsd  0xeee(%rip),%xmm0
movss  0xeee(%rip),%xmm1
jmp    1030 <pow@plt>
divsd  0xec9(%rip),%xmm0
ret

LLVM IR (-O0):
define double @gamma_2_2_to_linear(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ogt double %4, 0x3FA41C8220000000
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load double, double* %3
%8 = fadd double %7, 0x3FAC28F5C0000000
%9 = fdiv double %8, 0x3FF0E147A0000000
%10 = call double @pow(double %9, float 0x4003333340000000)
store double %10, double* %2
br label %14
11: ; preds = %1
%12 = load double, double* %3
%13 = fdiv double %12, 0x4029D70A40000000
store double %13, double* %2
br label %14
14: ; preds = %11, %6
%15 = load double, double* %2
ret double %15
}

LLVM IR (-O2):
define double @gamma_2_2_to_linear(double %0) {
%2 = fcmp ogt double %0, 0x3FA41C8220000000
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = fadd double %0, 0x3FAC28F5C0000000
%5 = fdiv double %4, 0x3FF0E147A0000000
%6 = tail call double @pow(double %5, float 0x4003333340000000)
br label %9
7: ; preds = %1
%8 = fdiv double %0, 0x4029D70A40000000
br label %9
9: ; preds = %7, %3
%10 = phi double [ %6, %3 ], [ %8, %7 ]
ret double %10
}
/* Type definitions */
typedef int /*<<< orphan*/ x;

/* Variables and functions */
int findMin(int *, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int x[] = {
      2, 0, 1, 1, 1,
  };
  printf("%d\n", findMin(x, sizeof(x) / sizeof(int)));
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xec5(%rip),%eax
mov    %eax,-0x10(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x5,%esi
call   1040 <findMin@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
mov    0xee6(%rip),%eax
mov    %eax,0x10(%rsp)
movaps 0xecb(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x5,%esi
call   1040 <findMin@plt>
lea    0xec7(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
@__const.main.x = [5 x i32] [i32 2, i32 0, i32 1, i32 1, i32 1]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
%4 = call i32 @findMin(i32* %3, i32 5)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ debug(char *, ...);
int M404_f(char *s) {
  debug("M404_f(const char *s) is not yet implemented!\n");
  debug("%s\n", s);
  return 1;
}


x86 assembly (clang, -O0):
<M404_f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xedd(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    -0x8(%rbp),%rsi
lea    0xefa(%rip),%rdi
mov    $0x0,%al
call   1030 <debug@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<M404_f>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rdi
xor    %eax,%eax
call   1030 <debug@plt>
lea    0xf06(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <debug@plt>
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [47 x i8] c"M404_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M404_f(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %4)
ret i32 1
}

LLVM IR (-O2):
@.str = [47 x i8] c"M404_f(const char *s) is not yet implemented!\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define i32 @M404_f(i8* %0) {
%2 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @debug(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %0)
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void show_bool(int b) {
  if (b) {
    printf("True\n");
  } else {
    printf("False\n");
  }
}


x86 assembly (clang, -O0):
<show_bool>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
je     1136 <show_bool+0x26>
lea    0xed4(%rip),%rdi
call   1030 <printf@plt>
jmp    1142 <show_bool+0x32>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_bool>:
test   %edi,%edi
lea    0xee7(%rip),%rax
lea    0xee6(%rip),%rdi
cmove  %rax,%rdi
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"True\0A\00"
@.str.1 = [7 x i8] c"False\0A\00"
define void @show_bool(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %7, %5
ret void
}

LLVM IR (-O2):
@str = [6 x i8] c"False\00"
@str.2 = [5 x i8] c"True\00"
define void @show_bool(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @str.2, i64 0, i64 0)
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ switchLED(char *, int /*<<< orphan*/);
void initLEDs() {
  switchLED("/sys/class/leds/beaglebone:green:usr0", 0);
  switchLED("/sys/class/leds/beaglebone:green:usr1", 0);
  switchLED("/sys/class/leds/beaglebone:green:usr2", 0);
  switchLED("/sys/class/leds/beaglebone:green:usr3", 0);
}


x86 assembly (clang, -O0):
<initLEDs>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
xor    %esi,%esi
call   1030 <switchLED@plt>
lea    0xefd(%rip),%rdi
xor    %esi,%esi
call   1030 <switchLED@plt>
lea    0xf15(%rip),%rdi
xor    %esi,%esi
call   1030 <switchLED@plt>
lea    0xf2d(%rip),%rdi
xor    %esi,%esi
call   1030 <switchLED@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initLEDs>:
push   %rax
lea    0xee8(%rip),%rdi
xor    %esi,%esi
call   1030 <switchLED@plt>
lea    0xf00(%rip),%rdi
xor    %esi,%esi
call   1030 <switchLED@plt>
lea    0xf18(%rip),%rdi
xor    %esi,%esi
call   1030 <switchLED@plt>
lea    0xf30(%rip),%rdi
xor    %esi,%esi
pop    %rax
jmp    1030 <switchLED@plt>

LLVM IR (-O0):
@.str = [38 x i8] c"/sys/class/leds/beaglebone:green:usr0\00"
@.str.1 = [38 x i8] c"/sys/class/leds/beaglebone:green:usr1\00"
@.str.2 = [38 x i8] c"/sys/class/leds/beaglebone:green:usr2\00"
@.str.3 = [38 x i8] c"/sys/class/leds/beaglebone:green:usr3\00"
define void @initLEDs() {
%1 = call i32 @switchLED(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = call i32 @switchLED(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = call i32 @switchLED(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 0)
%4 = call i32 @switchLED(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}

LLVM IR (-O2):
@.str = [38 x i8] c"/sys/class/leds/beaglebone:green:usr0\00"
@.str.1 = [38 x i8] c"/sys/class/leds/beaglebone:green:usr1\00"
@.str.2 = [38 x i8] c"/sys/class/leds/beaglebone:green:usr2\00"
@.str.3 = [38 x i8] c"/sys/class/leds/beaglebone:green:usr3\00"
define void @initLEDs() {
%1 = tail call i32 @switchLED(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = tail call i32 @switchLED(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.1, i64 0, i64 0), i32 0)
%3 = tail call i32 @switchLED(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.2, i64 0, i64 0), i32 0)
%4 = tail call i32 @switchLED(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.3, i64 0, i64 0), i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ diag(char *, void *, void *);
int /*<<< orphan*/ fail(char const *);
int /*<<< orphan*/ pass(char const *);
void is_p(void *got, void *expected, const char *description) {
  if (got == expected)
    pass(description);
  else {
    fail(description);
    diag("got address %p but expected address %p", got, expected);
  }
}


x86 assembly (clang, -O0):
<is_p>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jne    1160 <is_p+0x30>
mov    -0x18(%rbp),%rdi
call   1040 <pass@plt>
jmp    117d <is_p+0x4d>
mov    -0x18(%rbp),%rdi
call   1030 <fail@plt>
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
lea    0xe88(%rip),%rdi
call   1050 <diag@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_p>:
cmp    %rsi,%rdi
je     1160 <is_p+0x30>
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %rdx,%rdi
call   1030 <fail@plt>
lea    0xeb2(%rip),%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <diag@plt>
mov    %rdx,%rdi
jmp    1040 <pass@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"got address %p but expected address %p\00"
define void @is_p(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = icmp eq i8* %7, %8
br i1 %9, label %10, label %13
10: ; preds = %3
%11 = load i8*, i8** %6
%12 = call i32 @pass(i8* %11)
br label %19
13: ; preds = %3
%14 = load i8*, i8** %6
%15 = call i32 @fail(i8* %14)
%16 = load i8*, i8** %4
%17 = load i8*, i8** %5
%18 = call i32 @diag(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %16, i8* %17)
br label %19
19: ; preds = %13, %10
ret void
}

LLVM IR (-O2):
@.str = [39 x i8] c"got address %p but expected address %p\00"
define void @is_p(i8* %0, i8* %1, i8* %2) {
%4 = icmp eq i8* %0, %1
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @pass(i8* %2)
br label %10
7: ; preds = %3
%8 = tail call i32 @fail(i8* %2)
%9 = tail call i32 @diag(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
br label %10
10: ; preds = %7, %5
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ SSL_CTX;
typedef int /*<<< orphan*/ SSL;

/* Variables and functions */
int /*<<< orphan*/ SSL_CTX_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ SSL_free(int /*<<< orphan*/ *);
int /*<<< orphan*/ SSL_shutdown(int /*<<< orphan*/ *);
void ssl_hangup(SSL_CTX *ctx, SSL *ssl) {
  if (ssl) {
    SSL_shutdown(ssl);
    SSL_free(ssl);
  }
  if (ctx) {
    SSL_CTX_free(ctx);
  }
}


x86 assembly (clang, -O0):
<ssl_hangup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     115d <ssl_hangup+0x2d>
mov    -0x10(%rbp),%rdi
call   1040 <SSL_shutdown@plt>
mov    -0x10(%rbp),%rdi
call   1030 <SSL_free@plt>
cmpq   $0x0,-0x8(%rbp)
je     1171 <ssl_hangup+0x41>
mov    -0x8(%rbp),%rdi
call   1050 <SSL_CTX_free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ssl_hangup>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
test   %rsi,%rsi
je     114f <ssl_hangup+0x1f>
mov    %rsi,%rbx
mov    %rsi,%rdi
call   1040 <SSL_shutdown@plt>
mov    %rbx,%rdi
call   1030 <SSL_free@plt>
test   %r14,%r14
je     1163 <ssl_hangup+0x33>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1050 <SSL_CTX_free@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @ssl_hangup(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 = icmp ne i32* %5, null
br i1 %6, label %7, label %12
7: ; preds = %2
%8 = load i32*, i32** %4
%9 = call i32 @SSL_shutdown(i32* %8)
%10 = load i32*, i32** %4
%11 = call i32 @SSL_free(i32* %10)
br label %12
12: ; preds = %7, %2
%13 = load i32*, i32** %3
%14 = icmp ne i32* %13, null
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32*, i32** %3
%17 = call i32 @SSL_CTX_free(i32* %16)
br label %18
18: ; preds = %15, %12
ret void
}

LLVM IR (-O2):
define void @ssl_hangup(i32* %0, i32* %1) {
%3 = icmp eq i32* %1, null
br i1 %3, label %7, label %4
4: ; preds = %2
%5 = tail call i32 @SSL_shutdown(i32* %1)
%6 = tail call i32 @SSL_free(i32* %1)
br label %7
7: ; preds = %4, %2
%8 = icmp eq i32* %0, null
br i1 %8, label %11, label %9
9: ; preds = %7
%10 = tail call i32 @SSL_CTX_free(i32* %0)
br label %11
11: ; preds = %9, %7
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, long, long, unsigned long);
void print_slice(int sdx, long int pgsz, long int slstart, long int slend,
                 unsigned long int *spim) {
  unsigned long sim = (slend + 1 - slstart) / pgsz;
  printf("\tSlice[%d]: %lu:%lu (%lu pages)\n", sdx, slstart, slend, sim);
  *spim += sim;
}


x86 assembly (clang, -O0):
<print_slice>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    -0x20(%rbp),%rax
add    $0x1,%rax
sub    -0x18(%rbp),%rax
cqto
idivq  -0x10(%rbp)
mov    %rax,-0x30(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x30(%rbp),%r8
lea    0xea9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x30(%rbp),%rcx
mov    -0x28(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_slice>:
push   %r14
push   %rbx
push   %rax
mov    %r8,%r14
mov    %rdx,%r9
mov    %edi,%r8d
mov    %rcx,%rax
sub    %rdx,%rax
add    $0x1,%rax
mov    %rax,%rdx
or     %rsi,%rdx
shr    $0x20,%rdx
je     113d <print_slice+0x2d>
cqto
idiv   %rsi
mov    %rax,%rbx
jmp    1143 <print_slice+0x33>
xor    %edx,%edx
div    %esi
mov    %eax,%ebx
lea    0xeb6(%rip),%rdi
mov    %r8d,%esi
mov    %r9,%rdx
mov    %rbx,%r8
call   1030 <printf@plt>
add    %rbx,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [33 x i8] c"\09Slice[%d]: %lu:%lu (%lu pages)\0A\00"
define void @print_slice(i32 %0, i64 %1, i64 %2, i64 %3, i64* %4) {
%6 = alloca i32
%7 = alloca i64
%8 = alloca i64
%9 = alloca i64
%10 = alloca i64*
%11 = alloca i64
store i32 %0, i32* %6
store i64 %1, i64* %7
store i64 %2, i64* %8
store i64 %3, i64* %9
store i64* %4, i64** %10
%12 = load i64, i64* %9
%13 = add nsw i64 %12, 1
%14 = load i64, i64* %8
%15 = sub nsw i64 %13, %14
%16 = load i64, i64* %7
%17 = sdiv i64 %15, %16
store i64 %17, i64* %11
%18 = load i32, i32* %6
%19 = load i64, i64* %8
%20 = load i64, i64* %9
%21 = load i64, i64* %11
%22 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %18, i64 %19, i64 %20, i64 %21)
%23 = load i64, i64* %11
%24 = load i64*, i64** %10
%25 = load i64, i64* %24
%26 = add i64 %25, %23
store i64 %26, i64* %24
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"\09Slice[%d]: %lu:%lu (%lu pages)\0A\00"
define void @print_slice(i32 %0, i64 %1, i64 %2, i64 %3, i64* nocapture %4) {
%6 = sub i64 1, %2
%7 = add i64 %6, %3
%8 = sdiv i64 %7, %1
%9 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i32 %0, i64 %2, i64 %3, i64 %8)
%10 = load i64, i64* %4
%11 = add i64 %10, %8
store i64 %11, i64* %4
ret void
}
int pci_vector_resources(int last, int nr_released) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @pci_vector_resources(i32 %0, i32 %1) {
ret i32 0
}
int MCD_getCodeSize(void) { return 0x1744; }


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

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

LLVM IR (-O0):
define i32 @MCD_getCodeSize() {
ret i32 5956
}

LLVM IR (-O2):
define i32 @MCD_getCodeSize() {
ret i32 5956
}
/* Type definitions */
typedef int uint8_t;
typedef int const uint16_t;

/* Variables and functions */
uint16_t adts_get_length(const uint8_t *p_adts) {
  return ((p_adts[3] & 0x03) << 11) | (p_adts[4] << 3) | (p_adts[5] >> 5);
}


x86 assembly (clang, -O0):
<adts_get_length>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%eax
and    $0x3,%eax
shl    $0xb,%eax
mov    -0x8(%rbp),%rcx
mov    0x10(%rcx),%ecx
shl    $0x3,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x14(%rcx),%ecx
sar    $0x5,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<adts_get_length>:
mov    0xc(%rdi),%ecx
mov    0x10(%rdi),%edx
and    $0x3,%ecx
shl    $0xb,%ecx
shl    $0x3,%edx
mov    0x14(%rdi),%eax
sar    $0x5,%eax
or     %edx,%eax
or     %ecx,%eax
ret

LLVM IR (-O0):
define i32 @adts_get_length(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 3
%5 = load i32, i32* %4
%6 = and i32 %5, 3
%7 = shl i32 %6, 11
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 4
%10 = load i32, i32* %9
%11 = shl i32 %10, 3
%12 = or i32 %7, %11
%13 = load i32*, i32** %2
%14 = getelementptr inbounds i32, i32* %13, i64 5
%15 = load i32, i32* %14
%16 = ashr i32 %15, 5
%17 = or i32 %12, %16
ret i32 %17
}

LLVM IR (-O2):
define i32 @adts_get_length(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 3
%3 = load i32, i32* %2
%4 = shl i32 %3, 11
%5 = and i32 %4, 6144
%6 = getelementptr inbounds i32, i32* %0, i64 4
%7 = load i32, i32* %6
%8 = shl i32 %7, 3
%9 = or i32 %5, %8
%10 = getelementptr inbounds i32, i32* %0, i64 5
%11 = load i32, i32* %10
%12 = ashr i32 %11, 5
%13 = or i32 %9, %12
ret i32 %13
}
/* Type definitions */
struct gc_arena {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gc_init(struct gc_arena *);
void gc_detach(struct gc_arena *a) { gc_init(a); }


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

x86 assembly (clang, -O2):
<gc_detach>:
jmp    1030 <gc_init@plt>

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

LLVM IR (-O2):
%struct.gc_arena = type { i32 }
define void @gc_detach(%struct.gc_arena* %0) {
%2 = tail call i32 @gc_init(%struct.gc_arena* %0)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ htonl(int /*<<< orphan*/);
int /*<<< orphan*/ memcpy(unsigned char *, unsigned char **, int);
void marshallInt(int const value, unsigned char (*const bufferP)[]) {
  union {
    uint32_t value;
    unsigned char bytes[4];
  } converter;
  unsigned char testbuffer[4];
  converter.value = htonl(value);
  (*bufferP)[0] = 7;
  memcpy(testbuffer, &converter.bytes, 4);
  memcpy(*bufferP, &converter.bytes, 4);
}


x86 assembly (clang, -O0):
<marshallInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <htonl@plt>
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x7,(%rax)
lea    -0x1c(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<marshallInt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
call   1030 <htonl@plt>
mov    %eax,(%rsp)
movb   $0x7,(%rbx)
lea    0x4(%rsp),%rdi
mov    %rsp,%r14
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x4,%edx
call   1040 <memcpy@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%union.anon = type { i32 }
define void @marshallInt(i32 %0, [0 x i8]* %1) {
%3 = alloca i32
%4 = alloca [0 x i8]*
%5 = alloca %union.anon
%6 = alloca [4 x i8]
store i32 %0, i32* %3
store [0 x i8]* %1, [0 x i8]** %4
%7 = load i32, i32* %3
%8 = call i32 @htonl(i32 %7)
%9 = bitcast %union.anon* %5 to i32*
store i32 %8, i32* %9
%10 = load [0 x i8]*, [0 x i8]** %4
%11 = getelementptr inbounds [0 x i8], [0 x i8]* %10, i64 0, i64 0
store i8 7, i8* %11
%12 = getelementptr inbounds [4 x i8], [4 x i8]* %6, i64 0, i64 0
%13 = bitcast %union.anon* %5 to [4 x i8]*
%14 = bitcast [4 x i8]* %13 to i8**
%15 = call i32 @memcpy(i8* %12, i8** %14, i32 4)
%16 = load [0 x i8]*, [0 x i8]** %4
%17 = getelementptr inbounds [0 x i8], [0 x i8]* %16, i64 0, i64 0
%18 = bitcast %union.anon* %5 to [4 x i8]*
%19 = bitcast [4 x i8]* %18 to i8**
%20 = call i32 @memcpy(i8* %17, i8** %19, i32 4)
ret void
}

LLVM IR (-O2):
%union.anon = type { i32 }
define void @marshallInt(i32 %0, [0 x i8]* %1) {
%3 = alloca %union.anon
%4 = alloca [4 x i8]
%5 = bitcast %union.anon* %3 to i8*
%6 = getelementptr inbounds [4 x i8], [4 x i8]* %4, i64 0, i64 0
%7 = tail call i32 @htonl(i32 %0)
%8 = getelementptr inbounds %union.anon, %union.anon* %3, i64 0, i32 0
store i32 %7, i32* %8
%9 = getelementptr inbounds [0 x i8], [0 x i8]* %1, i64 0, i64 0
store i8 7, i8* %9
%10 = bitcast %union.anon* %3 to i8**
%11 = call i32 @memcpy(i8* %6, i8** %10, i32 4)
%12 = call i32 @memcpy(i8* %9, i8** %10, i32 4)
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int sort_string_cmp(const void *a, const void *b) {
  const char **a_ptr = (const char **)a;
  const char **b_ptr = (const char **)b;
  return strcmp(*a_ptr, *b_ptr);
}


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

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

LLVM IR (-O0):
define i32 @sort_string_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8**
%6 = alloca i8**
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = load i8**, i8*** %6
%14 = load i8*, i8** %13
%15 = call i32 @strcmp(i8* %12, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @sort_string_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = load i8*, i8** %3
%6 = load i8*, i8** %4
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %5, i8* dereferenceable(1) %6)
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ procblob(char *);
void procmulti(char *cmd) {
  cmd++;
  if (*cmd == '[')
    procblob(cmd);
}


x86 assembly (clang, -O0):
<procmulti>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x5b,%eax
jne    1141 <procmulti+0x31>
mov    -0x8(%rbp),%rdi
call   1030 <procblob@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<procmulti>:
cmpb   $0x5b,0x1(%rdi)
jne    111f <procmulti+0xf>
add    $0x1,%rdi
jmp    1030 <procblob@plt>
ret

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

LLVM IR (-O2):
define void @procmulti(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 1
%3 = load i8, i8* %2
%4 = icmp eq i8 %3, 91
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 @procblob(i8* %2)
br label %7
7: ; preds = %5, %1
ret void
}
int dd_lt_d_dd(double a, const double *b) {
  return (a < b[0] || (a == b[0] && b[1] > 0.0)) ? 1 : 0;
}


x86 assembly (clang, -O0):
<dd_lt_d_dd>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %rdi,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm1
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    $0x1,%al
ucomisd %xmm1,%xmm0
mov    %al,-0x11(%rbp)
ja     1163 <dd_lt_d_dd+0x63>
movsd  -0x8(%rbp),%xmm0
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
ucomisd (%rcx),%xmm0
mov    %al,-0x12(%rbp)
jne    115d <dd_lt_d_dd+0x5d>
jp     115d <dd_lt_d_dd+0x5d>
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
seta   %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dd_lt_d_dd>:
movsd  (%rdi),%xmm1
mov    $0x1,%eax
ucomisd %xmm0,%xmm1
ja     1129 <dd_lt_d_dd+0x29>
ucomisd %xmm0,%xmm1
jne    112a <dd_lt_d_dd+0x2a>
jp     112a <dd_lt_d_dd+0x2a>
movsd  0x8(%rdi),%xmm0
xorpd  %xmm1,%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @dd_lt_d_dd(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** %4
%7 = getelementptr inbounds double, double* %6, i64 0
%8 = load double, double* %7
%9 = fcmp olt double %5, %8
br i1 %9, label %23, label %10
10: ; preds = %2
%11 = load double, double* %3
%12 = load double*, double** %4
%13 = getelementptr inbounds double, double* %12, i64 0
%14 = load double, double* %13
%15 = fcmp oeq double %11, %14
br i1 %15, label %16, label %21
16: ; preds = %10
%17 = load double*, double** %4
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = fcmp ogt double %19, 0.000000e+00
br label %21
21: ; preds = %16, %10
%22 = phi i1 [ false, %10 ], [ %20, %16 ]
br label %23
23: ; preds = %21, %2
%24 = phi i1 [ true, %2 ], [ %22, %21 ]
%25 = zext i1 %24 to i64
%26 = select i1 %24, i32 1, i32 0
ret i32 %26
}

LLVM IR (-O2):
define i32 @dd_lt_d_dd(double %0, double* nocapture %1) {
%3 = load double, double* %1
%4 = fcmp ogt double %3, %0
br i1 %4, label %12, label %5
5: ; preds = %2
%6 = fcmp oeq double %3, %0
br i1 %6, label %7, label %12
7: ; preds = %5
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = fcmp ogt double %9, 0.000000e+00
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %5, %7, %2
%13 = phi i32 [ 1, %2 ], [ 0, %5 ], [ %11, %7 ]
ret i32 %13
}
int test_point_in_cardiod_or_2ndbud(float x, float y) {
  x = x - 0.25f;
  y = y * y;
  float q = x * x + y;
  return (q * (q + x)) < (0.25 * y);
}


x86 assembly (clang, -O0):
<test_point_in_cardiod_or_2ndbud>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeed(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x8(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x4(%rbp),%xmm2
movss  -0x8(%rbp),%xmm1
mulss  %xmm2,%xmm0
addss  %xmm1,%xmm0
movss  %xmm0,-0xc(%rbp)
movss  -0xc(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
addss  -0x4(%rbp),%xmm1
mulss  %xmm1,%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xe89(%rip),%xmm0
mulsd  %xmm2,%xmm0
ucomisd %xmm1,%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_point_in_cardiod_or_2ndbud>:
addss  0xef8(%rip),%xmm0
mulss  %xmm1,%xmm1
movaps %xmm0,%xmm2
mulss  %xmm0,%xmm2
addss  %xmm1,%xmm2
addss  %xmm2,%xmm0
mulss  %xmm2,%xmm0
cvtss2sd %xmm0,%xmm0
cvtss2sd %xmm1,%xmm1
mulsd  0xed9(%rip),%xmm1
xor    %eax,%eax
ucomisd %xmm0,%xmm1
seta   %al
ret

LLVM IR (-O0):
define i32 @test_point_in_cardiod_or_2ndbud(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 = fsub float %6, 2.500000e-01
store float %7, float* %3
%8 = load float, float* %4
%9 = load float, float* %4
%10 = fmul float %8, %9
store float %10, float* %4
%11 = load float, float* %3
%12 = load float, float* %3
%13 = load float, float* %4
%14 = call float @llvm.fmuladd.f32(float %11, float %12, float %13)
store float %14, float* %5
%15 = load float, float* %5
%16 = load float, float* %5
%17 = load float, float* %3
%18 = fadd float %16, %17
%19 = fmul float %15, %18
%20 = fpext float %19 to double
%21 = load float, float* %4
%22 = fpext float %21 to double
%23 = fmul double 2.500000e-01, %22
%24 = fcmp olt double %20, %23
%25 = zext i1 %24 to i32
ret i32 %25
}

LLVM IR (-O2):
define i32 @test_point_in_cardiod_or_2ndbud(float %0, float %1) {
%3 = fadd float %0, -2.500000e-01
%4 = fmul float %1, %1
%5 = tail call float @llvm.fmuladd.f32(float %3, float %3, float %4)
%6 = fadd float %3, %5
%7 = fmul float %5, %6
%8 = fpext float %7 to double
%9 = fpext float %4 to double
%10 = fmul double %9, 2.500000e-01
%11 = fcmp ogt double %10, %8
%12 = zext i1 %11 to i32
ret i32 %12
}
/* Type definitions */
typedef scalar_t__ uint8_t;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
int read1b(FILE *fp, uint8_t *d) {
  int c;
  *d = 0;
  c = fgetc(fp);
  if (c == EOF)
    return -1;
  *d += (uint8_t)c;
  return 0;
}


x86 assembly (clang, -O0):
<read1b>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movq   $0x0,(%rax)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%eax
mov    0x2ea7(%rip),%rcx
cmp    (%rcx),%eax
jne    1155 <read1b+0x45>
movl   $0xffffffff,-0x4(%rbp)
jmp    116a <read1b+0x5a>
movslq -0x1c(%rbp),%rcx
mov    -0x18(%rbp),%rax
add    (%rax),%rcx
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read1b>:
push   %rbx
mov    %rsi,%rbx
movq   $0x0,(%rsi)
call   1030 <fgetc@plt>
mov    %eax,%ecx
mov    0x2ebf(%rip),%rdx
mov    $0xffffffff,%eax
cmp    (%rdx),%ecx
je     113a <read1b+0x2a>
movslq %ecx,%rax
add    %rax,(%rbx)
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@EOF = global i32 0
define i32 @read1b(i32* nocapture %0, i64* nocapture %1) {
store i64 0, i64* %1
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %3, %4
br i1 %5, label %10, label %6
6: ; preds = %2
%7 = sext i32 %3 to i64
%8 = load i64, i64* %1
%9 = add nsw i64 %8, %7
store i64 %9, i64* %1
br label %10
10: ; preds = %2, %6
%11 = phi i32 [ 0, %6 ], [ -1, %2 ]
ret i32 %11
}
/* Variables and functions */
scalar_t__ TOR_ISUPPER(char const);
int tor_strisnonupper(const char *s) {
  while (*s) {
    if (TOR_ISUPPER(*s))
      return 0;
    s++;
  }
  return 1;
}


x86 assembly (clang, -O0):
<tor_strisnonupper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
je     115c <tor_strisnonupper+0x4c>
mov    -0x10(%rbp),%rax
movsbl (%rax),%edi
call   1030 <TOR_ISUPPER@plt>
cmp    $0x0,%rax
je     114b <tor_strisnonupper+0x3b>
movl   $0x0,-0x4(%rbp)
jmp    1163 <tor_strisnonupper+0x53>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    111c <tor_strisnonupper+0xc>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tor_strisnonupper>:
push   %rbp
push   %rbx
push   %rax
mov    (%rdi),%al
mov    $0x1,%ebp
test   %al,%al
je     114c <tor_strisnonupper+0x3c>
mov    %rdi,%rbx
add    $0x1,%rbx
cs nopw 0x0(%rax,%rax,1)
nop
movsbl %al,%edi
call   1030 <TOR_ISUPPER@plt>
test   %rax,%rax
jne    114a <tor_strisnonupper+0x3a>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1130 <tor_strisnonupper+0x20>
jmp    114c <tor_strisnonupper+0x3c>
xor    %ebp,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32 @tor_strisnonupper(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %13, label %7
4: ; preds = %7
%5 = load i8, i8* %12
%6 = icmp eq i8 %5, 0
br i1 %6, label %13, label %7
7: ; preds = %1, %4
%8 = phi i8 [ %5, %4 ], [ %2, %1 ]
%9 = phi i8* [ %12, %4 ], [ %0, %1 ]
%10 = tail call i64 @TOR_ISUPPER(i8 signext %8)
%11 = icmp eq i64 %10, 0
%12 = getelementptr inbounds i8, i8* %9, i64 1
br i1 %11, label %4, label %13
13: ; preds = %7, %4, %1
%14 = phi i32 [ 1, %1 ], [ 1, %4 ], [ 0, %7 ]
ret i32 %14
}
void gdk_screen_get_n_monitors() {}


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

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

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

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