xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ call6f(double, unsigned char, unsigned short, unsigned int,
                          unsigned long);
void call6e(float f, double d, unsigned char uc, unsigned short us,
            unsigned int ui, unsigned long ul) {
  f = f;
  call6f(d, uc, us, ui, ul);
}


x86 assembly (clang, -O0):
<call6e>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %si,%ax
mov    %dil,%sil
movss  %xmm0,-0x4(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    %sil,-0x11(%rbp)
mov    %ax,-0x14(%rbp)
mov    %edx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movsd  -0x10(%rbp),%xmm0
mov    -0x11(%rbp),%sil
mov    -0x14(%rbp),%ax
mov    -0x18(%rbp),%edx
mov    -0x20(%rbp),%rcx
movzbl %sil,%edi
movzwl %ax,%esi
call   1030 <call6f@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call6e>:
movaps %xmm1,%xmm0
jmp    1030 <call6f@plt>

LLVM IR (-O0):
define void @call6e(float %0, double %1, i8 zeroext %2, i16 zeroext %3, i32 %4, i64 %5) {
%7 = alloca float
%8 = alloca double
%9 = alloca i8
%10 = alloca i16
%11 = alloca i32
%12 = alloca i64
store float %0, float* %7
store double %1, double* %8
store i8 %2, i8* %9
store i16 %3, i16* %10
store i32 %4, i32* %11
store i64 %5, i64* %12
%13 = load float, float* %7
store float %13, float* %7
%14 = load double, double* %8
%15 = load i8, i8* %9
%16 = load i16, i16* %10
%17 = load i32, i32* %11
%18 = load i64, i64* %12
%19 = call i32 @call6f(double %14, i8 zeroext %15, i16 zeroext %16, i32 %17, i64 %18)
ret void
}

LLVM IR (-O2):
define void @call6e(float %0, double %1, i8 zeroext %2, i16 zeroext %3, i32 %4, i64 %5) {
%7 = tail call i32 @call6f(double %1, i8 zeroext %2, i16 zeroext %3, i32 %4, i64 %5)
ret void
}
unsigned bi_reverse(code, len)
unsigned code;
int len;
{
  register unsigned res = 0;
  do {
    res |= code & 1;
    code >>= 1, res <<= 1;
  } while (--len > 0);
  return res >> 1;
}


x86 assembly (clang, -O0):
<bi_reverse>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%eax
and    $0x1,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
shr    $0x1,%eax
mov    %eax,-0x4(%rbp)
mov    -0xc(%rbp),%eax
shl    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmp    $0x0,%eax
jg     1111 <bi_reverse+0x11>
mov    -0xc(%rbp),%eax
shr    $0x1,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bi_reverse>:
add    $0x1,%esi
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%eax
and    $0x1,%eax
or     %ecx,%eax
shr    %edi
lea    (%rax,%rax,1),%ecx
add    $0xffffffff,%esi
cmp    $0x1,%esi
jg     1110 <bi_reverse+0x10>
and    $0x7fffffff,%eax
ret

LLVM IR (-O0):
define i32 @bi_reverse(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %15, %2
%7 = load i32, i32* %3
%8 = and i32 %7, 1
%9 = load i32, i32* %5
%10 = or i32 %9, %8
store i32 %10, i32* %5
%11 = load i32, i32* %3
%12 = lshr i32 %11, 1
store i32 %12, i32* %3
%13 = load i32, i32* %5
%14 = shl i32 %13, 1
store i32 %14, i32* %5
br label %15
15: ; preds = %6
%16 = load i32, i32* %4
%17 = add nsw i32 %16, -1
store i32 %17, i32* %4
%18 = icmp sgt i32 %17, 0
br i1 %18, label %6, label %19
19: ; preds = %15
%20 = load i32, i32* %5
%21 = lshr i32 %20, 1
ret i32 %21
}

LLVM IR (-O2):
define i32 @bi_reverse(i32 %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %9, %3 ]
%5 = phi i32 [ %1, %2 ], [ %11, %3 ]
%6 = phi i32 [ 0, %2 ], [ %10, %3 ]
%7 = and i32 %4, 1
%8 = or i32 %6, %7
%9 = lshr i32 %4, 1
%10 = shl i32 %8, 1
%11 = add nsw i32 %5, -1
%12 = icmp sgt i32 %5, 1
br i1 %12, label %3, label %13
13: ; preds = %3
%14 = and i32 %8, 2147483647
ret i32 %14
}
/* Variables and functions */
int getchar();
int /*<<< orphan*/ printf(char *);
void getAddress(char *s) {
  int c;
  printf("Please input the address : ");
  while ((c = getchar()) != '\n') {
    *(s++) = c;
  }
  *s = '\0';
}


x86 assembly (clang, -O0):
<getAddress>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <getchar@plt>
mov    %eax,-0xc(%rbp)
cmp    $0xa,%eax
je     1166 <getAddress+0x46>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    1138 <getAddress+0x18>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getAddress>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
call   1040 <getchar@plt>
cmp    $0xa,%eax
je     1144 <getAddress+0x24>
mov    %al,(%rbx)
add    $0x1,%rbx
jmp    1130 <getAddress+0x10>
movb   $0x0,(%rbx)
pop    %rbx
ret

LLVM IR (-O0):
@.str = [28 x i8] c"Please input the address : \00"
define void @getAddress(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %8, %1
%6 = call i32 (...) @getchar()
store i32 %6, i32* %3
%7 = icmp ne i32 %6, 10
br i1 %7, label %8, label %13
8: ; preds = %5
%9 = load i32, i32* %3
%10 = trunc i32 %9 to i8
%11 = load i8*, i8** %2
%12 = getelementptr inbounds i8, i8* %11, i32 1
store i8* %12, i8** %2
store i8 %10, i8* %11
br label %5
13: ; preds = %5
%14 = load i8*, i8** %2
store i8 0, i8* %14
ret void
}

LLVM IR (-O2):
@.str = [28 x i8] c"Please input the address : \00"
define void @getAddress(i8* nocapture writeonly %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (...) @getchar()
%4 = icmp eq i32 %3, 10
br i1 %4, label %12, label %5
5: ; preds = %1, %5
%6 = phi i32 [ %10, %5 ], [ %3, %1 ]
%7 = phi i8* [ %9, %5 ], [ %0, %1 ]
%8 = trunc i32 %6 to i8
%9 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %8, i8* %7
%10 = tail call i32 (...) @getchar()
%11 = icmp eq i32 %10, 10
br i1 %11, label %12, label %5
12: ; preds = %5, %1
%13 = phi i8* [ %0, %1 ], [ %9, %5 ]
store i8 0, i8* %13
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, char const *);
int /*<<< orphan*/ stderr;
void test_fatal_error(void *data, int lineno, const char *msg) {
  fprintf(stderr, "fatal error on line %d: %s\n", lineno, msg);
}


x86 assembly (clang, -O0):
<test_fatal_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2eb6(%rip),%rax
mov    (%rax),%edi
mov    -0xc(%rbp),%edx
mov    -0x18(%rbp),%rcx
lea    0xec6(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_fatal_error>:
mov    %rdx,%rcx
mov    %esi,%edx
mov    0x2ec4(%rip),%rax
mov    (%rax),%edi
lea    0xedb(%rip),%rsi
jmp    1030 <fprintf@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [28 x i8] c"fatal error on line %d: %s\0A\00"
define void @test_fatal_error(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* @stderr
%8 = load i32, i32* %5
%9 = load i8*, i8** %6
%10 = call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %8, i8* %9)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [28 x i8] c"fatal error on line %d: %s\0A\00"
define void @test_fatal_error(i8* nocapture readnone %0, i32 %1, i8* %2) {
%4 = load i32, i32* @stderr
%5 = tail call i32 @fprintf(i32 %4, i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
ret void
}
void pollen_interfaces_Gpio_makeOutput__E() {}


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

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

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

LLVM IR (-O2):
define void @pollen_interfaces_Gpio_makeOutput__E() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int _execve(char *name __attribute__((unused)),
            char **argv __attribute__((unused)),
            char **env __attribute__((unused))) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<_execve>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    0x2ed1(%rip),%rax
mov    (%rax),%ecx
mov    0x2eb8(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_execve>:
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 @_execve(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 i32, i32* @ENOSYS
store i32 %7, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @_execve(i8* nocapture readnone %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
double dbl_flt_max2(double a, float b) { return (a > b) ? a : b; }


x86 assembly (clang, -O0):
<dbl_flt_max2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
movss  -0xc(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jbe    1135 <dbl_flt_max2+0x35>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1143 <dbl_flt_max2+0x43>
movss  -0xc(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<dbl_flt_max2>:
cvtss2sd %xmm1,%xmm1
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @dbl_flt_max2(double %0, float %1) {
%3 = alloca double
%4 = alloca float
store double %0, double* %3
store float %1, float* %4
%5 = load double, double* %3
%6 = load float, float* %4
%7 = fpext float %6 to double
%8 = fcmp ogt double %5, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load double, double* %3
br label %14
11: ; preds = %2
%12 = load float, float* %4
%13 = fpext float %12 to double
br label %14
14: ; preds = %11, %9
%15 = phi double [ %10, %9 ], [ %13, %11 ]
ret double %15
}

LLVM IR (-O2):
define double @dbl_flt_max2(double %0, float %1) {
%3 = fpext float %1 to double
%4 = fcmp olt double %3, %0
%5 = select i1 %4, double %0, double %3
ret double %5
}
void handle_put(int fd) {}


x86 assembly (clang, -O0):
<handle_put>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @handle_put(i32 %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ JDtoDate(double, int /*<<< orphan*/ *);
double moonphasebylunation(unsigned int, int);
time_t timeByMoonphase(unsigned int lun, int phi) {
  double JDE = moonphasebylunation(lun, phi);
  time_t res = JDtoDate(JDE, NULL);
  return res;
}


x86 assembly (clang, -O0):
<timeByMoonphase>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <moonphasebylunation@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
xor    %eax,%eax
mov    %eax,%edi
call   1040 <JDtoDate@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<timeByMoonphase>:
push   %rax
call   1030 <moonphasebylunation@plt>
xor    %edi,%edi
pop    %rax
jmp    1040 <JDtoDate@plt>

LLVM IR (-O0):
define i32 @timeByMoonphase(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca double
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call double @moonphasebylunation(i32 %7, i32 %8)
store double %9, double* %5
%10 = load double, double* %5
%11 = call i32 @JDtoDate(double %10, i32* null)
store i32 %11, i32* %6
%12 = load i32, i32* %6
ret i32 %12
}

LLVM IR (-O2):
define i32 @timeByMoonphase(i32 %0, i32 %1) {
%3 = tail call double @moonphasebylunation(i32 %0, i32 %1)
%4 = tail call i32 @JDtoDate(double %3, i32* null)
ret i32 %4
}
void null_hdd_close(void *p) {}


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

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

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

LLVM IR (-O2):
define void @null_hdd_close(i8* nocapture %0) {
ret void
}
/* Variables and functions */
double area(int /*<<< orphan*/);
int /*<<< orphan*/ distance(double, double, double, double);
double area_point(double x1, double y1, double x2, double y2) {
  return area(distance(x1, y1, x2, y2));
}


x86 assembly (clang, -O0):
<area_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  %xmm3,-0x20(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm2
movsd  -0x20(%rbp),%xmm3
call   1040 <distance@plt>
mov    %eax,%edi
call   1030 <area@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<area_point>:
push   %rax
call   1040 <distance@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <area@plt>

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

LLVM IR (-O2):
define double @area_point(double %0, double %1, double %2, double %3) {
%5 = tail call i32 @distance(double %0, double %1, double %2, double %3)
%6 = tail call double @area(i32 %5)
ret double %6
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ signal(int /*<<< orphan*/, void (*)(int));
void my_handler(int signum) { signal(SIGINT, my_handler); }


x86 assembly (clang, -O0):
<my_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
mov    0x2ead(%rip),%rsi
call   1030 <signal@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_handler>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rsi
jmp    1030 <signal@plt>

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

LLVM IR (-O2):
@SIGINT = global i32 0
define void @my_handler(i32 %0) {
%2 = load i32, i32* @SIGINT
%3 = tail call i32 @signal(i32 %2, void (i32)* @my_handler)
ret void
}
int _list_remove_element_traverse(void *element_to_find, void *element) {
  if (element_to_find == element)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<_list_remove_element_traverse>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1126 <_list_remove_element_traverse+0x26>
movl   $0x0,-0x4(%rbp)
jmp    112d <_list_remove_element_traverse+0x2d>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_list_remove_element_traverse>:
xor    %eax,%eax
cmp    %rsi,%rdi
setne  %al
ret

LLVM IR (-O0):
define i32 @_list_remove_element_traverse(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = icmp eq i8* %6, %7
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 0, 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 @_list_remove_element_traverse(i8* readnone %0, i8* readnone %1) {
%3 = icmp ne i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void pcp_print_pcsw_stats(struct activity *a, int curr) {}


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

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

LLVM IR (-O0):
%struct.activity = type opaque
define void @pcp_print_pcsw_stats(%struct.activity* %0, i32 %1) {
%3 = alloca %struct.activity*
%4 = alloca i32
store %struct.activity* %0, %struct.activity** %3
store i32 %1, i32* %4
ret void
}

LLVM IR (-O2):
%struct.activity = type opaque
define void @pcp_print_pcsw_stats(%struct.activity* nocapture %0, i32 %1) {
ret void
}
int close_port(char **port) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @close_port(i8** nocapture readnone %0) {
ret i32 -1
}
/* Type definitions */
struct termios {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ TCSETA;
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
scalar_t__ ioctl(int, int /*<<< orphan*/, struct termios *);
int /*<<< orphan*/ stderr;
int tty_set_state(struct termios *tty, int tty_fd) {
  if (ioctl(tty_fd, TCSETA, tty) < 0) {
    fprintf(stderr, "tty_set_state\n");
    return (-1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<tty_set_state>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    0x2e9f(%rip),%rax
mov    (%rax),%esi
mov    -0x10(%rbp),%rdx
call   1030 <ioctl@plt>
cmp    $0x0,%rax
jge    116f <tty_set_state+0x4f>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
lea    0xea2(%rip),%rsi
call   1040 <fprintf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    1176 <tty_set_state+0x56>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tty_set_state>:
push   %rax
mov    %esi,%eax
mov    %rdi,%rdx
mov    0x2eab(%rip),%rcx
mov    (%rcx),%esi
mov    %eax,%edi
call   1030 <ioctl@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     1142 <tty_set_state+0x22>
pop    %rcx
ret
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
lea    0xeae(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
@TCSETA = global i32 0
@stderr = global i32 0
@.str = [15 x i8] c"tty_set_state\0A\00"
define i32 @tty_set_state(%struct.termios* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.termios*
%5 = alloca i32
store %struct.termios* %0, %struct.termios** %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = load i32, i32* @TCSETA
%8 = load %struct.termios*, %struct.termios** %4
%9 = call i64 @ioctl(i32 %6, i32 %7, %struct.termios* %8)
%10 = icmp slt i64 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %3
br label %15
14: ; preds = %2
store i32 0, i32* %3
br label %15
15: ; preds = %14, %11
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.termios = type { i32 }
@TCSETA = global i32 0
@stderr = global i32 0
@.str = [15 x i8] c"tty_set_state\0A\00"
define i32 @tty_set_state(%struct.termios* %0, i32 %1) {
%3 = load i32, i32* @TCSETA
%4 = tail call i64 @ioctl(i32 %1, i32 %3, %struct.termios* %0)
%5 = icmp slt i64 %4, 0
br i1 %5, label %6, label %9
6: ; preds = %2
%7 = load i32, i32* @stderr
%8 = tail call i32 @fprintf(i32 %7, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %2, %6
%10 = phi i32 [ -1, %6 ], [ 0, %2 ]
ret i32 %10
}
void XDrawString16() {}


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

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

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

LLVM IR (-O2):
define void @XDrawString16() {
ret void
}
int qca98acIfaceTx(int v1, int v2) { return 0; }


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

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

LLVM IR (-O0):
define i32 @qca98acIfaceTx(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 @qca98acIfaceTx(i32 %0, i32 %1) {
ret i32 0
}
/* Type definitions */
typedef scalar_t__ volatile uint32_t;

/* Variables and functions */
uint32_t I2CMasterIntStatusEx(uint32_t ui32Base, bool bMasked) {
  ;
  if (bMasked) {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000018))));
  } else {
    return ((*((volatile uint32_t *)(ui32Base + 0x00000014))));
  }
}


x86 assembly (clang, -O0):
<I2CMasterIntStatusEx>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     1126 <I2CMasterIntStatusEx+0x26>
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rax
mov    %rax,-0x8(%rbp)
jmp    1132 <I2CMasterIntStatusEx+0x32>
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterIntStatusEx>:
mov    %rdi,-0x8(%rsp)
xor    %eax,%eax
test   %esi,%esi
setne  %al
mov    -0x8(%rsp),%rcx
mov    0x14(%rcx,%rax,4),%rax
ret

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

LLVM IR (-O2):
define i64 @I2CMasterIntStatusEx(i64 %0, i32 %1) {
%3 = alloca i64
store volatile i64 %0, i64* %3
%4 = icmp eq i32 %1, 0
%5 = load volatile i64, i64* %3
%6 = select i1 %4, i64 20, i64 24
%7 = add nsw i64 %5, %6
%8 = inttoptr i64 %7 to i64*
%9 = load volatile i64, i64* %8
ret i64 %9
}
/* Variables and functions */
scalar_t__ fork();
int getpid();
int /*<<< orphan*/ printf(char *, int);
int main(int argc, char *argv[]) {
  fork();
  fork() && fork() || fork();
  fork();
  printf("+ %d\n", getpid());
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <fork@plt>
mov    $0x0,%al
call   1050 <fork@plt>
cmp    $0x0,%rax
je     1177 <main+0x47>
mov    $0x0,%al
call   1050 <fork@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
jne    1188 <main+0x58>
mov    $0x0,%al
call   1050 <fork@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
mov    $0x0,%al
call   1050 <fork@plt>
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %eax,%esi
lea    0xe5e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1050 <fork@plt>
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
je     1150 <main+0x20>
xor    %eax,%eax
call   1050 <fork@plt>
test   %rax,%rax
jne    1157 <main+0x27>
xor    %eax,%eax
call   1050 <fork@plt>
xor    %eax,%eax
call   1050 <fork@plt>
xor    %eax,%eax
call   1030 <getpid@plt>
lea    0xe94(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"+ %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i64 (...) @fork()
%7 = call i64 (...) @fork()
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i64 (...) @fork()
%11 = icmp ne i64 %10, 0
br i1 %11, label %15, label %12
12: ; preds = %9, %2
%13 = call i64 (...) @fork()
%14 = icmp ne i64 %13, 0
br label %15
15: ; preds = %12, %9
%16 = phi i1 [ true, %9 ], [ %14, %12 ]
%17 = zext i1 %16 to i32
%18 = call i64 (...) @fork()
%19 = call i32 (...) @getpid()
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %19)
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
@.str = [6 x i8] c"+ %d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i64 (...) @fork()
%4 = tail call i64 (...) @fork()
%5 = icmp eq i64 %4, 0
br i1 %5, label %9, label %6
6: ; preds = %2
%7 = tail call i64 (...) @fork()
%8 = icmp eq i64 %7, 0
br i1 %8, label %9, label %11
9: ; preds = %6, %2
%10 = tail call i64 (...) @fork()
br label %11
11: ; preds = %9, %6
%12 = tail call i64 (...) @fork()
%13 = tail call i32 (...) @getpid()
%14 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 %13)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ mp_msg(int, int /*<<< orphan*/, char *);
void draw_osd(void) {
  mp_msg(3, 0, "[xvidix] error: didn't used vidix draw_osd!\n");
  return;
}


x86 assembly (clang, -O0):
<draw_osd>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
xor    %esi,%esi
lea    0xede(%rip),%rdx
call   1030 <mp_msg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_osd>:
lea    0xee9(%rip),%rdx
mov    $0x3,%edi
xor    %esi,%esi
jmp    1030 <mp_msg@plt>

LLVM IR (-O0):
@.str = [45 x i8] c"[xvidix] error: didn't used vidix draw_osd!\0A\00"
define void @draw_osd() {
%1 = call i32 @mp_msg(i32 3, i32 0, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [45 x i8] c"[xvidix] error: didn't used vidix draw_osd!\0A\00"
define void @draw_osd() {
%1 = tail call i32 @mp_msg(i32 3, i32 0, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ f(long, double);
main() {
  extern int i;
  double x = 3.00;
  long j = 34L;
  f(j, x);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  0xee0(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
movq   $0x22,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
movsd  -0x8(%rbp),%xmm0
call   1030 <f@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movsd  0xee7(%rip),%xmm0
mov    $0x22,%edi
call   1030 <f@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca double
%2 = alloca i64
store double 3.000000e+00, double* %1
store i64 34, i64* %2
%3 = load i64, i64* %2
%4 = load double, double* %1
%5 = call i32 @f(i64 %3, double %4)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @f(i64 34, double 3.000000e+00)
ret i32 0
}
/* Variables and functions */
int platform_default_i(char *, int);
int read_setting_i_forced(void *, char *, int);
int gppi_raw_forced(void *handle, char *name, int def) {
  def = platform_default_i(name, def);
  return read_setting_i_forced(handle, name, def);
}


x86 assembly (clang, -O0):
<gppi_raw_forced>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <platform_default_i@plt>
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <read_setting_i_forced@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gppi_raw_forced>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    %rsi,%rdi
mov    %edx,%esi
call   1030 <platform_default_i@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <read_setting_i_forced@plt>

LLVM IR (-O0):
define i32 @gppi_raw_forced(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = load i32, i32* %6
%9 = call i32 @platform_default_i(i8* %7, i32 %8)
store i32 %9, i32* %6
%10 = load i8*, i8** %4
%11 = load i8*, i8** %5
%12 = load i32, i32* %6
%13 = call i32 @read_setting_i_forced(i8* %10, i8* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
define i32 @gppi_raw_forced(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 @platform_default_i(i8* %1, i32 %2)
%5 = tail call i32 @read_setting_i_forced(i8* %0, i8* %1, i32 %4)
ret i32 %5
}
/* Type definitions */
typedef scalar_t__ time_t;

/* Variables and functions */
double difftime(time_t time1, time_t time0) { return (double)(time1 - time0); }


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

x86 assembly (clang, -O2):
<difftime>:
sub    %rsi,%rdi
cvtsi2sd %rdi,%xmm0
ret

LLVM IR (-O0):
define double @difftime(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 = sub nsw i64 %5, %6
%8 = sitofp i64 %7 to double
ret double %8
}

LLVM IR (-O2):
define double @difftime(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = sitofp i64 %3 to double
ret double %4
}
/* Variables and functions */
int /*<<< orphan*/ fp_clr_flag(int);
int /*<<< orphan*/ fp_set_flag(int);
void set_fpu_except_flags(int set, int clear) {
  int exc_set = 0, exc_clr = 0;
  fp_clr_flag(exc_clr);
  fp_set_flag(exc_set);
}


x86 assembly (clang, -O0):
<set_fpu_except_flags>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%edi
call   1040 <fp_clr_flag@plt>
mov    -0xc(%rbp),%edi
call   1030 <fp_set_flag@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_fpu_except_flags>:
push   %rax
xor    %edi,%edi
call   1040 <fp_clr_flag@plt>
xor    %edi,%edi
pop    %rax
jmp    1030 <fp_set_flag@plt>

LLVM IR (-O0):
define void @set_fpu_except_flags(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
store i32 0, i32* %5
store i32 0, i32* %6
%7 = load i32, i32* %6
%8 = call i32 @fp_clr_flag(i32 %7)
%9 = load i32, i32* %5
%10 = call i32 @fp_set_flag(i32 %9)
ret void
}

LLVM IR (-O2):
define void @set_fpu_except_flags(i32 %0, i32 %1) {
%3 = tail call i32 @fp_clr_flag(i32 0)
%4 = tail call i32 @fp_set_flag(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ create_login(int);
int /*<<< orphan*/ idle();
int /*<<< orphan*/ setpsname(char *);
void main() {
  int i;
  for (i = 0; i < 5; i++)
    create_login(i);
  setpsname("idle");
  for (;;)
    idle();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    115f <main+0x2f>
mov    -0x4(%rbp),%edi
call   1030 <create_login@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    113f <main+0xf>
lea    0xe9a(%rip),%rdi
call   1040 <setpsname@plt>
mov    $0x0,%al
call   1050 <idle@plt>
jmp    116b <main+0x3b>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <create_login@plt>
mov    $0x1,%edi
call   1030 <create_login@plt>
mov    $0x2,%edi
call   1030 <create_login@plt>
mov    $0x3,%edi
call   1030 <create_login@plt>
mov    $0x4,%edi
call   1030 <create_login@plt>
lea    0xe99(%rip),%rdi
call   1040 <setpsname@plt>
nopl   0x0(%rax)
xor    %eax,%eax
call   1050 <idle@plt>
jmp    1170 <main+0x40>

LLVM IR (-O0):
@.str = [5 x i8] c"idle\00"
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %8, %0
%3 = load i32, i32* %1
%4 = icmp slt i32 %3, 5
br i1 %4, label %5, label %11
5: ; preds = %2
%6 = load i32, i32* %1
%7 = call i32 @create_login(i32 %6)
br label %8
8: ; preds = %5
%9 = load i32, i32* %1
%10 = add nsw i32 %9, 1
store i32 %10, i32* %1
br label %2
11: ; preds = %2
%12 = call i32 @setpsname(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %13
13: ; preds = %13, %11
%14 = call i32 (...) @idle()
br label %13
}

LLVM IR (-O2):
@.str = [5 x i8] c"idle\00"
define void @main() {
%1 = tail call i32 @create_login(i32 0)
%2 = tail call i32 @create_login(i32 1)
%3 = tail call i32 @create_login(i32 2)
%4 = tail call i32 @create_login(i32 3)
%5 = tail call i32 @create_login(i32 4)
%6 = tail call i32 @setpsname(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %7, %0
%8 = tail call i32 (...) @idle()
br label %7
}
void g_main_context_unref() {}


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

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

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

LLVM IR (-O2):
define void @g_main_context_unref() {
ret void
}
unsigned char *encode32(unsigned char *buffer, unsigned int data) {
  buffer[3] = data & 0xff;
  buffer[2] = (data >> 8) & 0xff;
  buffer[1] = (data >> 16) & 0xff;
  buffer[0] = (data >> 24) & 0xff;
  return buffer;
}


x86 assembly (clang, -O0):
<encode32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x3(%rax)
mov    -0xc(%rbp),%eax
shr    $0x8,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,0x1(%rax)
mov    -0xc(%rbp),%eax
shr    $0x18,%eax
and    $0xff,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<encode32>:
mov    %rdi,%rax
bswap  %esi
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define i8* @encode32(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = and i32 %5, 255
%7 = trunc i32 %6 to i8
%8 = load i8*, i8** %3
%9 = getelementptr inbounds i8, i8* %8, i64 3
store i8 %7, i8* %9
%10 = load i32, i32* %4
%11 = lshr i32 %10, 8
%12 = and i32 %11, 255
%13 = trunc i32 %12 to i8
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 2
store i8 %13, i8* %15
%16 = load i32, i32* %4
%17 = lshr i32 %16, 16
%18 = and i32 %17, 255
%19 = trunc i32 %18 to i8
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 1
store i8 %19, i8* %21
%22 = load i32, i32* %4
%23 = lshr i32 %22, 24
%24 = and i32 %23, 255
%25 = trunc i32 %24 to i8
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i64 0
store i8 %25, i8* %27
%28 = load i8*, i8** %3
ret i8* %28
}

LLVM IR (-O2):
define i8* @encode32(i8* returned writeonly %0, i32 %1) {
%3 = trunc i32 %1 to i8
%4 = getelementptr inbounds i8, i8* %0, i64 3
store i8 %3, i8* %4
%5 = lshr i32 %1, 8
%6 = trunc i32 %5 to i8
%7 = getelementptr inbounds i8, i8* %0, i64 2
store i8 %6, i8* %7
%8 = lshr i32 %1, 16
%9 = trunc i32 %8 to i8
%10 = getelementptr inbounds i8, i8* %0, i64 1
store i8 %9, i8* %10
%11 = lshr i32 %1, 24
%12 = trunc i32 %11 to i8
store i8 %12, i8* %0
ret i8* %0
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t mapperGetAndValue(uint32_t v) {
  v--;
  v |= v >> 1;
  v |= v >> 2;
  v |= v >> 4;
  v |= v >> 8;
  v |= v >> 16;
  return v;
}


x86 assembly (clang, -O0):
<mapperGetAndValue>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x2,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x4,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x8,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x10,%eax
or     -0x4(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mapperGetAndValue>:
lea    -0x1(%rdi),%eax
mov    %eax,%ecx
sar    %ecx
or     %eax,%ecx
mov    %ecx,%eax
sar    $0x2,%eax
or     %ecx,%eax
mov    %eax,%ecx
sar    $0x4,%ecx
or     %eax,%ecx
mov    %ecx,%edx
sar    $0x8,%edx
or     %ecx,%edx
mov    %edx,%eax
sar    $0x10,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @mapperGetAndValue(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = add nsw i32 %3, -1
store i32 %4, i32* %2
%5 = load i32, i32* %2
%6 = ashr i32 %5, 1
%7 = load i32, i32* %2
%8 = or i32 %7, %6
store i32 %8, i32* %2
%9 = load i32, i32* %2
%10 = ashr i32 %9, 2
%11 = load i32, i32* %2
%12 = or i32 %11, %10
store i32 %12, i32* %2
%13 = load i32, i32* %2
%14 = ashr i32 %13, 4
%15 = load i32, i32* %2
%16 = or i32 %15, %14
store i32 %16, i32* %2
%17 = load i32, i32* %2
%18 = ashr i32 %17, 8
%19 = load i32, i32* %2
%20 = or i32 %19, %18
store i32 %20, i32* %2
%21 = load i32, i32* %2
%22 = ashr i32 %21, 16
%23 = load i32, i32* %2
%24 = or i32 %23, %22
store i32 %24, i32* %2
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
define i32 @mapperGetAndValue(i32 %0) {
%2 = add nsw i32 %0, -1
%3 = ashr i32 %2, 1
%4 = or i32 %3, %2
%5 = ashr i32 %4, 2
%6 = or i32 %5, %4
%7 = ashr i32 %6, 4
%8 = or i32 %7, %6
%9 = ashr i32 %8, 8
%10 = or i32 %9, %8
%11 = ashr i32 %10, 16
%12 = or i32 %11, %10
ret i32 %12
}
void minf(int *x, int y) {
  if (y < *x) {
    *x = y;
  }
}


x86 assembly (clang, -O0):
<minf>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%rcx
cmp    (%rcx),%eax
jge    1123 <minf+0x23>
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<minf>:
cmp    %esi,(%rdi)
jle    1106 <minf+0x6>
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
define void @minf(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 = load i32*, i32** %3
%7 = load i32, i32* %6
%8 = icmp slt i32 %5, %7
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = load i32, i32* %4
%11 = load i32*, i32** %3
store i32 %10, i32* %11
br label %12
12: ; preds = %9, %2
ret void
}

LLVM IR (-O2):
define void @minf(i32* nocapture %0, i32 %1) {
%3 = load i32, i32* %0
%4 = icmp sgt i32 %3, %1
br i1 %4, label %5, label %6
5: ; preds = %2
store i32 %1, i32* %0
br label %6
6: ; preds = %5, %2
ret void
}
int mylib2_fct2() {
  printf("enter %s\n", __func__);
  mylib1_fct2();
}


x86 assembly (clang, -O0):
<mylib2_fct2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
lea    0xed4(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <mylib1_fct2@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mylib2_fct2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedb(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <mylib1_fct2@plt>

LLVM IR (-O0):
@.str = [10 x i8] c"enter %s\0A\00"
@__func__.mylib2_fct2 = [12 x i8] c"mylib2_fct2\00"
define i32 @mylib2_fct2() {
%1 = alloca i32
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.mylib2_fct2, i64 0, i64 0))
%3 = call i32 (...) @mylib1_fct2()
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [10 x i8] c"enter %s\0A\00"
@__func__.mylib2_fct2 = [12 x i8] c"mylib2_fct2\00"
define i32 @mylib2_fct2() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @__func__.mylib2_fct2, i64 0, i64 0))
%2 = tail call i32 (...) @mylib1_fct2()
ret i32 undef
}
/* Variables and functions */
void *malloc(size_t);
__attribute__((visibility("hidden"))) void *rmw_allocate(size_t size) {
  return malloc(size);
}


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

x86 assembly (clang, -O2):
<rmw_allocate>:
jmp    1030 <malloc@plt>

LLVM IR (-O0):
define hidden i8* @rmw_allocate(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i8* @malloc(i64 %3)
ret i8* %4
}

LLVM IR (-O2):
define hidden noalias i8* @rmw_allocate(i64 %0) {
%2 = tail call i8* @malloc(i64 %0)
ret i8* %2
}
int ft_isspace(char c) {
  return (c == ' ' || c == '\t' || c == '\n' || c == '\v' || c == '\r' ||
          c == '\f');
}


x86 assembly (clang, -O0):
<ft_isspace>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ft_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ft_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xa,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ft_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xb,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ft_isspace+0x71>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0xd,%ecx
mov    %al,-0x2(%rbp)
je     1171 <ft_isspace+0x71>
movsbl -0x1(%rbp),%eax
cmp    $0xc,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_isspace>:
cmp    $0x20,%dil
ja     1120 <ft_isspace+0x20>
mov    $0x1,%eax
movzbl %dil,%ecx
movabs $0x100002e00,%rdx
bt     %rcx,%rdx
jae    1120 <ft_isspace+0x20>
ret
xor    %eax,%eax
cmp    $0xc,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @ft_isspace(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 32
br i1 %5, label %26, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 9
br i1 %9, label %26, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 10
br i1 %13, label %26, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 11
br i1 %17, label %26, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 13
br i1 %21, label %26, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 12
br label %26
26: ; preds = %22, %18, %14, %10, %6, %1
%27 = phi i1 [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %25, %22 ]
%28 = zext i1 %27 to i32
ret i32 %28
}

LLVM IR (-O2):
define i32 @ft_isspace(i8 signext %0) {
switch i8 %0, label %2 [
i8 32, label %5
i8 13, label %5
i8 11, label %5
i8 10, label %5
i8 9, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 12
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
int TestAppP$StdOut$print(const char *str) {
  int result;
  result = StdOutM$StdOut$print(str);
  return result;
}


x86 assembly (clang, -O0):
<TestAppP$StdOut$print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x0,%al
call   1030 <StdOutM$StdOut$print@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TestAppP$StdOut$print>:
xor    %eax,%eax
jmp    1030 <StdOutM$StdOut$print@plt>

LLVM IR (-O0):
define i32 @"TestAppP$StdOut$print"(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @"StdOutM$StdOut$print" to i32 (i8*, ...)*)(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
ret i32 %6
}

LLVM IR (-O2):
define i32 @"TestAppP$StdOut$print"(i8* %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @"StdOutM$StdOut$print" to i32 (i8*, ...)*)(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
deleteField(void *toBeDeleted) { free(toBeDeleted); }


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

x86 assembly (clang, -O2):
<deleteField>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define i32 @deleteField(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ WINDOW;

/* Variables and functions */
int clearok(WINDOW *w, bool b) { return 0; }


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

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

LLVM IR (-O0):
define i32 @clearok(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 @clearok(i32* nocapture readnone %0, i32 %1) {
ret i32 0
}