xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ GL_LINES;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glVertex2d(double, double);
void pravac() {
  double t;
  double y1 = -2 * -10.0 + 4;
  double y2 = -2 * 10.0 + 4;
  glBegin(GL_LINES);
  glVertex2d(-10.0, y1);
  glVertex2d(10.0, y2);
  glEnd();
}


x86 assembly (clang, -O0):
<pravac>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  0xed8(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xec3(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    0x2e97(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movsd  -0x10(%rbp),%xmm1
movsd  0xe9b(%rip),%xmm0
call   1040 <glVertex2d@plt>
movsd  -0x18(%rbp),%xmm1
movsd  0xe81(%rip),%xmm0
call   1040 <glVertex2d@plt>
mov    $0x0,%al
call   1030 <glEnd@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pravac>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movsd  0xeb9(%rip),%xmm0
movsd  0xeb9(%rip),%xmm1
call   1040 <glVertex2d@plt>
movsd  0xeb4(%rip),%xmm0
movsd  0xeb4(%rip),%xmm1
call   1040 <glVertex2d@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <glEnd@plt>

LLVM IR (-O0):
@GL_LINES = global i32 0
define void @pravac() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
store double 2.400000e+01, double* %2
store double -1.600000e+01, double* %3
%4 = load i32, i32* @GL_LINES
%5 = call i32 @glBegin(i32 %4)
%6 = load double, double* %2
%7 = call i32 @glVertex2d(double -1.000000e+01, double %6)
%8 = load double, double* %3
%9 = call i32 @glVertex2d(double 1.000000e+01, double %8)
%10 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_LINES = global i32 0
define void @pravac() {
%1 = load i32, i32* @GL_LINES
%2 = tail call i32 @glBegin(i32 %1)
%3 = tail call i32 @glVertex2d(double -1.000000e+01, double 2.400000e+01)
%4 = tail call i32 @glVertex2d(double 1.000000e+01, double -1.600000e+01)
%5 = tail call i32 (...) @glEnd()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ cpu_set_t;

/* Variables and functions */
int /*<<< orphan*/ CPU_SET(int, int /*<<< orphan*/ *);
int /*<<< orphan*/ CPU_ZERO(int /*<<< orphan*/ *);
int sched_setaffinity(int /*<<< orphan*/, int, int /*<<< orphan*/ *);
int taskset(int taskset_cpu) {
  cpu_set_t set;
  CPU_ZERO(&set);
  CPU_SET(taskset_cpu, &set);
  return sched_setaffinity(0, sizeof(cpu_set_t), &set);
}


x86 assembly (clang, -O0):
<taskset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <CPU_ZERO@plt>
mov    -0x4(%rbp),%edi
lea    -0x8(%rbp),%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
lea    -0x8(%rbp),%rdx
call   1030 <sched_setaffinity@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<taskset>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0x4(%rsp),%r14
mov    %r14,%rdi
call   1040 <CPU_ZERO@plt>
mov    %ebx,%edi
mov    %r14,%rsi
call   1050 <CPU_SET@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %r14,%rdx
call   1030 <sched_setaffinity@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @taskset(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = call i32 @CPU_ZERO(i32* %3)
%5 = load i32, i32* %2
%6 = call i32 @CPU_SET(i32 %5, i32* %3)
%7 = call i32 @sched_setaffinity(i32 0, i32 4, i32* %3)
ret i32 %7
}

LLVM IR (-O2):
define i32 @taskset(i32 %0) {
%2 = alloca i32
%3 = bitcast i32* %2 to i8*
%4 = call i32 @CPU_ZERO(i32* %2)
%5 = call i32 @CPU_SET(i32 %0, i32* %2)
%6 = call i32 @sched_setaffinity(i32 0, i32 4, i32* %2)
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ logMessage(char *);
scalar_t__ system(char *);
int apagar_tarjeta(void) {
  if (system("poweroff") < 0) {
    logMessage("Error al apagar la tarjeta");
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<apagar_tarjeta>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1040 <system@plt>
cmp    $0x0,%rax
jge    1156 <apagar_tarjeta+0x36>
lea    0xec4(%rip),%rdi
call   1030 <logMessage@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    115d <apagar_tarjeta+0x3d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<apagar_tarjeta>:
push   %rax
lea    0xed8(%rip),%rdi
call   1040 <system@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
js     1139 <apagar_tarjeta+0x19>
pop    %rcx
ret
lea    0xec9(%rip),%rdi
call   1030 <logMessage@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"poweroff\00"
@.str.1 = [27 x i8] c"Error al apagar la tarjeta\00"
define i32 @apagar_tarjeta() {
%1 = alloca i32
%2 = call i64 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i32 @logMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %1
br label %7
6: ; preds = %0
store i32 0, i32* %1
br label %7
7: ; preds = %6, %4
%8 = load i32, i32* %1
ret i32 %8
}

LLVM IR (-O2):
@.str = [9 x i8] c"poweroff\00"
@.str.1 = [27 x i8] c"Error al apagar la tarjeta\00"
define i32 @apagar_tarjeta() {
%1 = tail call i64 @system(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%2 = icmp slt i64 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @logMessage(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0))
br label %5
5: ; preds = %0, %3
%6 = phi i32 [ -1, %3 ], [ 0, %0 ]
ret i32 %6
}
int do_084() { return 84; }


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

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

LLVM IR (-O0):
define i32 @do_084() {
ret i32 84
}

LLVM IR (-O2):
define i32 @do_084() {
ret i32 84
}
int first(void) { return 1001; }


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

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

LLVM IR (-O0):
define i32 @first() {
ret i32 1001
}

LLVM IR (-O2):
define i32 @first() {
ret i32 1001
}
/* Type definitions */
typedef int /*<<< orphan*/ jmp_buf;

/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ second(int /*<<< orphan*/ *);
void first(jmp_buf *b) {
  second(b);
  printf("first\n");
}


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

x86 assembly (clang, -O2):
<first>:
push   %rax
call   1040 <second@plt>
lea    0xed3(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

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

LLVM IR (-O2):
@str = [6 x i8] c"first\00"
define void @first(i32* %0) {
%2 = tail call i32 @second(i32* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret void
}
int test_imm_29int16_mem(short *val) {
  return ((*val) & (0x29 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_29int16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movswl (%rax),%edx
and    $0x29,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_29int16_mem>:
testb  $0x29,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_29int16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = sext i16 %4 to i32
%6 = and i32 %5, 41
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_29int16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, 41
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ bug(double *, char, int, int, int, double, double *, int,
                       double *, int, double, double *, int);
int main(void) {
  double A[1], B[1], C[1];
  bug(C, 'B', 1, 2, 3, 4.0, A, 5, B, 6, 7.0, C, 8);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x10(%rbp),%r9
lea    -0x18(%rbp),%r10
lea    -0x20(%rbp),%rax
mov    $0x42,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
movsd  0xeb4(%rip),%xmm0
movsd  0xeb4(%rip),%xmm1
movl   $0x5,(%rsp)
mov    %r10,0x8(%rsp)
movl   $0x6,0x10(%rsp)
mov    %rax,0x18(%rsp)
movl   $0x8,0x20(%rsp)
call   1030 <bug@plt>
xor    %eax,%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x20,%rsp
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rax
movsd  0xeda(%rip),%xmm0
lea    0x18(%rsp),%r9
movsd  0xed5(%rip),%xmm1
mov    $0x42,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    $0x3,%r8d
push   $0x8
push   %rdi
push   $0x6
push   %rax
push   $0x5
call   1030 <bug@plt>
add    $0x30,%rsp
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca [1 x double]
%3 = alloca [1 x double]
%4 = alloca [1 x double]
store i32 0, i32* %1
%5 = getelementptr inbounds [1 x double], [1 x double]* %4, i64 0, i64 0
%6 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%7 = getelementptr inbounds [1 x double], [1 x double]* %3, i64 0, i64 0
%8 = getelementptr inbounds [1 x double], [1 x double]* %4, i64 0, i64 0
%9 = call i32 @bug(double* %5, i8 signext 66, i32 1, i32 2, i32 3, double 4.000000e+00, double* %6, i32 5, double* %7, i32 6, double 7.000000e+00, double* %8, i32 8)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [1 x double]
%2 = alloca [1 x double]
%3 = alloca [1 x double]
%4 = bitcast [1 x double]* %1 to i8*
%5 = bitcast [1 x double]* %2 to i8*
%6 = bitcast [1 x double]* %3 to i8*
%7 = getelementptr inbounds [1 x double], [1 x double]* %3, i64 0, i64 0
%8 = getelementptr inbounds [1 x double], [1 x double]* %1, i64 0, i64 0
%9 = getelementptr inbounds [1 x double], [1 x double]* %2, i64 0, i64 0
%10 = call i32 @bug(double* %7, i8 signext 66, i32 1, i32 2, i32 3, double 4.000000e+00, double* %8, i32 5, double* %9, i32 6, double 7.000000e+00, double* %7, i32 8)
ret i32 0
}
void fz_var_imp(void *var) {
  do {
    var = var;
  } while (0);
}


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

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

LLVM IR (-O0):
define void @fz_var_imp(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
br label %3
3: ; preds = %1
%4 = load i8*, i8** %2
store i8* %4, i8** %2
br label %5
5: ; preds = %3
ret void
}

LLVM IR (-O2):
define void @fz_var_imp(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/
UpnpResponse_MediaRenderer_AVTransport_SetAVTransportURI(void *);
int /*<<< orphan*/ printf(char *, unsigned int, char *, char *);
void UpnpMediaRenderer_AVTransport_SetAVTransportURI(void *upnptoken,
                                                     unsigned int InstanceID,
                                                     char *CurrentURI,
                                                     char *CurrentURIMetaData) {
  printf(
      "Invoke: UpnpMediaRenderer_AVTransport_SetAVTransportURI(%u,%s,%s);\r\n",
      InstanceID, CurrentURI, CurrentURIMetaData);
  UpnpResponse_MediaRenderer_AVTransport_SetAVTransportURI(upnptoken);
}


x86 assembly (clang, -O0):
<UpnpMediaRenderer_AVTransport_SetAVTransportURI>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UpnpResponse_MediaRenderer_AVTransport_SetAVTransportURI@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UpnpMediaRenderer_AVTransport_SetAVTransportURI>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UpnpResponse_MediaRenderer_AVTransport_SetAVTransportURI@plt>

LLVM IR (-O0):
@.str = [69 x i8] c"Invoke: UpnpMediaRenderer_AVTransport_SetAVTransportURI(%u,%s,%s);\0D\0A\00"
define void @UpnpMediaRenderer_AVTransport_SetAVTransportURI(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i32, i32* %6
%10 = load i8*, i8** %7
%11 = load i8*, i8** %8
%12 = call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i32 %9, i8* %10, i8* %11)
%13 = load i8*, i8** %5
%14 = call i32 @UpnpResponse_MediaRenderer_AVTransport_SetAVTransportURI(i8* %13)
ret void
}

LLVM IR (-O2):
@.str = [69 x i8] c"Invoke: UpnpMediaRenderer_AVTransport_SetAVTransportURI(%u,%s,%s);\0D\0A\00"
define void @UpnpMediaRenderer_AVTransport_SetAVTransportURI(i8* %0, i32 %1, i8* %2, i8* %3) {
%5 = tail call i32 @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2, i8* %3)
%6 = tail call i32 @UpnpResponse_MediaRenderer_AVTransport_SetAVTransportURI(i8* %0)
ret void
}
short __ocl_select_short_short(short a, short b, short c) { return c ? b : a; }


x86 assembly (clang, -O0):
<__ocl_select_short_short>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %si,%cx
mov    %di,%dx
mov    %dx,-0x2(%rbp)
mov    %cx,-0x4(%rbp)
mov    %ax,-0x6(%rbp)
movswl -0x6(%rbp),%eax
cmp    $0x0,%eax
je     1132 <__ocl_select_short_short+0x32>
movswl -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1139 <__ocl_select_short_short+0x39>
movswl -0x2(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cwtl
pop    %rbp
ret

x86 assembly (clang, -O2):
<__ocl_select_short_short>:
mov    %edi,%eax
test   %dx,%dx
cmovne %esi,%eax
ret

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

LLVM IR (-O2):
define signext i16 @__ocl_select_short_short(i16 signext %0, i16 signext %1, i16 signext %2) {
%4 = icmp eq i16 %2, 0
%5 = select i1 %4, i16 %0, i16 %1
ret i16 %5
}
void mysignal(int signo, void *handler) {}


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

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

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

LLVM IR (-O2):
define void @mysignal(i32 %0, i8* nocapture %1) {
ret void
}
/* Variables and functions */
int mmc_datatrans(int, void *, unsigned long, int);
int mmc_writesector(void *data, unsigned long sector) {
  return mmc_datatrans(1, data, sector, 1);
}


x86 assembly (clang, -O0):
<mmc_writesector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    $0x1,%ecx
mov    %ecx,%edi
call   1030 <mmc_datatrans@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmc_writesector>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x1,%edi
mov    $0x1,%ecx
jmp    1030 <mmc_datatrans@plt>

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

LLVM IR (-O2):
define i32 @mmc_writesector(i8* %0, i64 %1) {
%3 = tail call i32 @mmc_datatrans(i32 1, i8* %0, i64 %1, i32 1)
ret i32 %3
}
/* Variables and functions */
int COLOR_PAIR(int);
int ncurses_COLOR_PAIR(int p) { return COLOR_PAIR(p); }


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

x86 assembly (clang, -O2):
<ncurses_COLOR_PAIR>:
jmp    1030 <COLOR_PAIR@plt>

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

LLVM IR (-O2):
define i32 @ncurses_COLOR_PAIR(i32 %0) {
%2 = tail call i32 @COLOR_PAIR(i32 %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_hdr_line(void) {
  printf(" size   IN: hit     tot    mc no_rt bcast madst masrc  OUT: hit     "
         "tot     mc\n");
}


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

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

LLVM IR (-O0):
@.str = [80 x i8] c" size IN: hit tot mc no_rt bcast madst masrc OUT: hit tot mc\0A\00"
define void @print_hdr_line() {
%1 = call i32 @printf(i8* getelementptr inbounds ([80 x i8], [80 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [79 x i8] c" size IN: hit tot mc no_rt bcast madst masrc OUT: hit tot mc\00"
define void @print_hdr_line() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([79 x i8], [79 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char const *, int);
void ft_putstr_fd(char const *s, int fd) {
  int i;
  i = 0;
  while (s[i])
    i++;
  write(fd, s, i);
}


x86 assembly (clang, -O0):
<ft_putstr_fd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
cmpb   $0x0,(%rax,%rcx,1)
je     1146 <ft_putstr_fd+0x36>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <ft_putstr_fd+0x16>
mov    -0xc(%rbp),%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%edx
call   1030 <write@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_putstr_fd>:
mov    %esi,%eax
mov    %rdi,%rsi
xor    %edx,%edx
nopw   0x0(%rax,%rax,1)
cmpb   $0x0,(%rsi,%rdx,1)
lea    0x1(%rdx),%rdx
jne    1120 <ft_putstr_fd+0x10>
add    $0xffffffff,%edx
mov    %eax,%edi
jmp    1030 <write@plt>

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

LLVM IR (-O2):
define void @ft_putstr_fd(i8* nocapture %0, i32 %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i64 [ %8, %3 ], [ 0, %2 ]
%5 = getelementptr inbounds i8, i8* %0, i64 %4
%6 = load i8, i8* %5
%7 = icmp eq i8 %6, 0
%8 = add nuw i64 %4, 1
br i1 %7, label %9, label %3
9: ; preds = %3
%10 = trunc i64 %4 to i32
%11 = tail call i32 @write(i32 %1, i8* %0, i32 %10)
ret void
}
void gdk_status_get_type() {}


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

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

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

LLVM IR (-O2):
define void @gdk_status_get_type() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ clang_analyzer_eval(int);
int strncmp(char *, char *, int);
void strncmp_1() {
  char *x = "234";
  char *y = "123";
  clang_analyzer_eval(strncmp(x, y, 3) == 1);
}


x86 assembly (clang, -O0):
<strncmp_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rax
mov    %rax,-0x8(%rbp)
lea    0xeca(%rip),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <clang_analyzer_eval@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strncmp_1>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xed5(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
xor    %edi,%edi
cmp    $0x1,%eax
sete   %dil
pop    %rax
jmp    1040 <clang_analyzer_eval@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"234\00"
@.str.1 = [4 x i8] c"123\00"
define void @strncmp_1() {
%1 = alloca i8*
%2 = alloca i8*
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8** %1
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8** %2
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strncmp(i8* %3, i8* %4, i32 3)
%6 = icmp eq i32 %5, 1
%7 = zext i1 %6 to i32
%8 = call i32 @clang_analyzer_eval(i32 %7)
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"234\00"
@.str.1 = [4 x i8] c"123\00"
define void @strncmp_1() {
%1 = tail call i32 @strncmp(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 3)
%2 = icmp eq i32 %1, 1
%3 = zext i1 %2 to i32
%4 = tail call i32 @clang_analyzer_eval(i32 %3)
ret void
}
int ASAPInfo_GetWord(unsigned char const *array, int i) {
  return array[i] + (array[i + 1] << 8);
}


x86 assembly (clang, -O0):
<ASAPInfo_GetWord>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x8(%rbp),%rcx
mov    -0xc(%rbp),%edx
add    $0x1,%edx
movslq %edx,%rdx
movzbl (%rcx,%rdx,1),%ecx
shl    $0x8,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ASAPInfo_GetWord>:
movslq %esi,%rax
movzwl (%rdi,%rax,1),%eax
ret

LLVM IR (-O0):
define i32 @ASAPInfo_GetWord(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = load i8, i8* %8
%10 = zext i8 %9 to i32
%11 = load i8*, i8** %3
%12 = load i32, i32* %4
%13 = add nsw i32 %12, 1
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %11, i64 %14
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = shl i32 %17, 8
%19 = add nsw i32 %10, %18
ret i32 %19
}

LLVM IR (-O2):
define i32 @ASAPInfo_GetWord(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
%4 = getelementptr inbounds i8, i8* %0, i64 %3
%5 = load i8, i8* %4
%6 = zext i8 %5 to i32
%7 = add nsw i32 %1, 1
%8 = sext i32 %7 to i64
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = zext i8 %10 to i32
%12 = shl nuw nsw i32 %11, 8
%13 = or i32 %12, %6
ret i32 %13
}
/* Type definitions */
struct feature_pair {
  int dummy;
};
struct CovariateAnalysis {
  int dummy;
};
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
void _emitJSONUniExtraR(const struct feature_pair *pair,
                        const struct CovariateAnalysis *covan, FILE *fp) {}


x86 assembly (clang, -O0):
<_emitJSONUniExtraR>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniExtraR(%struct.feature_pair* %0, %struct.CovariateAnalysis* %1, i32* %2) {
%4 = alloca %struct.feature_pair*
%5 = alloca %struct.CovariateAnalysis*
%6 = alloca i32*
store %struct.feature_pair* %0, %struct.feature_pair** %4
store %struct.CovariateAnalysis* %1, %struct.CovariateAnalysis** %5
store i32* %2, i32** %6
ret void
}

LLVM IR (-O2):
%struct.feature_pair = type { i32 }
%struct.CovariateAnalysis = type { i32 }
define void @_emitJSONUniExtraR(%struct.feature_pair* nocapture %0, %struct.CovariateAnalysis* nocapture %1, i32* nocapture %2) {
ret void
}
/* Variables and functions */
scalar_t__ KIONIX_ACCEL_read_bytes(int, char *, int);
int /*<<< orphan*/ KIONIX_ACCEL_write_byte(int, char);
int KIONIX_ACCEL_motion_unmask_x(void) {
  char int_ctrl_reg2 = 0;
  int status = 0;
  if (KIONIX_ACCEL_read_bytes(0x1F, &int_ctrl_reg2, 1) == 0) {
    int_ctrl_reg2 &= ~0x80;
    KIONIX_ACCEL_write_byte(0x1F, int_ctrl_reg2);
  } else
    status = 1;
  return status;
}


x86 assembly (clang, -O0):
<KIONIX_ACCEL_motion_unmask_x>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movb   $0x0,-0x1(%rbp)
movl   $0x0,-0x8(%rbp)
mov    $0x1f,%edi
lea    -0x1(%rbp),%rsi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
cmp    $0x0,%rax
jne    116f <KIONIX_ACCEL_motion_unmask_x+0x4f>
movsbl -0x1(%rbp),%eax
and    $0xffffff7f,%eax
mov    %al,-0x1(%rbp)
mov    $0x1f,%edi
movsbl -0x1(%rbp),%esi
call   1040 <KIONIX_ACCEL_write_byte@plt>
jmp    1176 <KIONIX_ACCEL_motion_unmask_x+0x56>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<KIONIX_ACCEL_motion_unmask_x>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xf(%rsp)
lea    0xf(%rsp),%rsi
mov    $0x1,%ebx
mov    $0x1f,%edi
mov    $0x1,%edx
call   1030 <KIONIX_ACCEL_read_bytes@plt>
test   %rax,%rax
jne    1161 <KIONIX_ACCEL_motion_unmask_x+0x41>
movzbl 0xf(%rsp),%esi
and    $0x7f,%esi
mov    %sil,0xf(%rsp)
mov    $0x1f,%edi
call   1040 <KIONIX_ACCEL_write_byte@plt>
xor    %ebx,%ebx
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @KIONIX_ACCEL_motion_unmask_x() {
%1 = alloca i8
%2 = alloca i32
store i8 0, i8* %1
store i32 0, i32* %2
%3 = call i64 @KIONIX_ACCEL_read_bytes(i32 31, i8* %1, i32 1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %0
%6 = load i8, i8* %1
%7 = sext i8 %6 to i32
%8 = and i32 %7, -129
%9 = trunc i32 %8 to i8
store i8 %9, i8* %1
%10 = load i8, i8* %1
%11 = call i32 @KIONIX_ACCEL_write_byte(i32 31, i8 signext %10)
br label %13
12: ; preds = %0
store i32 1, i32* %2
br label %13
13: ; preds = %12, %5
%14 = load i32, i32* %2
ret i32 %14
}

LLVM IR (-O2):
define i32 @KIONIX_ACCEL_motion_unmask_x() {
%1 = alloca i8
store i8 0, i8* %1
%2 = call i64 @KIONIX_ACCEL_read_bytes(i32 31, i8* %1, i32 1)
%3 = icmp eq i64 %2, 0
br i1 %3, label %4, label %8
4: ; preds = %0
%5 = load i8, i8* %1
%6 = and i8 %5, 127
store i8 %6, i8* %1
%7 = call i32 @KIONIX_ACCEL_write_byte(i32 31, i8 signext %6)
br label %8
8: ; preds = %0, %4
%9 = phi i32 [ 0, %4 ], [ 1, %0 ]
ret i32 %9
}
void user_inc(void) {}


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

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

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

LLVM IR (-O2):
define void @user_inc() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ errx(int /*<<< orphan*/, char *, char const *);
void u16_check_value(unsigned int value, const char *type) {
  if (value > 0xffff)
    errx(EXIT_FAILURE, "cannot parse %s: too large", type);
}


x86 assembly (clang, -O0):
<u16_check_value>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0xffff,-0x4(%rbp)
jbe    1145 <u16_check_value+0x35>
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <errx@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<u16_check_value>:
cmp    $0x10000,%edi
jb     1130 <u16_check_value+0x20>
mov    %rsi,%rdx
mov    0x2ebe(%rip),%rax
mov    (%rax),%edi
lea    0xed5(%rip),%rsi
jmp    1030 <errx@plt>
ret

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [27 x i8] c"cannot parse %s: too large\00"
define void @u16_check_value(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = icmp ugt i32 %5, 65535
br i1 %6, label %7, label %11
7: ; preds = %2
%8 = load i32, i32* @EXIT_FAILURE
%9 = load i8*, i8** %4
%10 = call i32 @errx(i32 %8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %9)
br label %11
11: ; preds = %7, %2
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [27 x i8] c"cannot parse %s: too large\00"
define void @u16_check_value(i32 %0, i8* %1) {
%3 = icmp ugt i32 %0, 65535
br i1 %3, label %4, label %7
4: ; preds = %2
%5 = load i32, i32* @EXIT_FAILURE
%6 = tail call i32 @errx(i32 %5, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), i8* %1)
br label %7
7: ; preds = %4, %2
ret void
}
/* Variables and functions */
int _DtCvStrNCaseCmpLatin1(char const *, char const *, size_t);
int _DtHelpCeStrNCaseCmpLatin1(const char *s1, const char *s2, size_t n) {
  return (_DtCvStrNCaseCmpLatin1(s1, s2, n));
}


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

x86 assembly (clang, -O2):
<_DtHelpCeStrNCaseCmpLatin1>:
jmp    1030 <_DtCvStrNCaseCmpLatin1@plt>

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

LLVM IR (-O2):
define i32 @_DtHelpCeStrNCaseCmpLatin1(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @_DtCvStrNCaseCmpLatin1(i8* %0, i8* %1, i64 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xf9() {
  Assert_real((isodigit(249) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isodigit.c",
              1250, ("isodigit should be 0 for 0xf9"));
}


x86 assembly (clang, -O0):
<t_isodigit_0xf9>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf9,%edi
call   1040 <isodigit@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x4e2,%edx
lea    0xf5c(%rip),%rcx
call   1030 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isodigit_0xf9>:
push   %rax
mov    $0xf9,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x4e2,%edx
pop    %rax
jmp    1030 <Assert_real@plt>

LLVM IR (-O0):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xf9\00"
define void @t_isodigit_0xf9() {
%1 = call i64 @isodigit(i32 249)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1250, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [169 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isodigit.c\00"
@.str.1 = [30 x i8] c"isodigit should be 0 for 0xf9\00"
define void @t_isodigit_0xf9() {
%1 = tail call i64 @isodigit(i32 249)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([169 x i8], [169 x i8]* @.str, i64 0, i64 0), i32 1250, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
double cos(double);
double cosC(double arg) {
  if (1.57079632679489661923 - (1.e-6) <= arg &&
      arg <= 1.57079632679489661923 + (1.e-6))
    return 0.;
  else
    return cos(arg);
}


x86 assembly (clang, -O0):
<cosC>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1154 <cosC+0x44>
movsd  0xecc(%rip),%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     1154 <cosC+0x44>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1163 <cosC+0x53>
movsd  -0x10(%rbp),%xmm0
call   1030 <cos@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cosC>:
ucomisd 0xee8(%rip),%xmm0
jb     112d <cosC+0x1d>
movsd  0xee6(%rip),%xmm1
ucomisd %xmm0,%xmm1
jb     112d <cosC+0x1d>
xorpd  %xmm0,%xmm0
ret
jmp    1030 <cos@plt>

LLVM IR (-O0):
define double @cosC(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp ole double 0x3FF921FA47D4B30D, %4
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load double, double* %3
%8 = fcmp ole double %7, 0x3FF921FC60B3A723
br i1 %8, label %9, label %10
9: ; preds = %6
store double 0.000000e+00, double* %2
br label %13
10: ; preds = %6, %1
%11 = load double, double* %3
%12 = call double @cos(double %11)
store double %12, double* %2
br label %13
13: ; preds = %10, %9
%14 = load double, double* %2
ret double %14
}

LLVM IR (-O2):
define double @cosC(double %0) {
%2 = fcmp oge double %0, 0x3FF921FA47D4B30D
%3 = fcmp ole double %0, 0x3FF921FC60B3A723
%4 = and i1 %2, %3
br i1 %4, label %7, label %5
5: ; preds = %1
%6 = tail call double @cos(double %0)
br label %7
7: ; preds = %1, %5
%8 = phi double [ %6, %5 ], [ 0.000000e+00, %1 ]
ret double %8
}
/* Type definitions */
struct timespec {
  int tv_sec;
  int tv_nsec;
};

/* Variables and functions */
int /*<<< orphan*/ nanosleep(struct timespec *, int /*<<< orphan*/ *);
void pegasus_sleep(int msec) {
  struct timespec wait;
  wait.tv_sec = msec / 1000;
  wait.tv_nsec = (msec % 1000) * 1000000;
  nanosleep(&wait, NULL);
}


x86 assembly (clang, -O0):
<pegasus_sleep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x3e8,%ecx
cltd
idiv   %ecx
imul   $0xf4240,%edx,%eax
mov    %eax,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <nanosleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pegasus_sleep>:
push   %rax
movslq %edi,%rax
imul   $0x10624dd3,%rax,%rcx
mov    %rcx,%rdx
shr    $0x3f,%rdx
sar    $0x26,%rcx
add    %edx,%ecx
mov    %ecx,(%rsp)
imul   $0x3e8,%ecx,%ecx
sub    %ecx,%eax
imul   $0xf4240,%eax,%eax
mov    %eax,0x4(%rsp)
mov    %rsp,%rdi
xor    %esi,%esi
call   1030 <nanosleep@plt>
pop    %rax
ret

LLVM IR (-O0):
%struct.timespec = type { i32, i32 }
define void @pegasus_sleep(i32 %0) {
%2 = alloca i32
%3 = alloca %struct.timespec
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = sdiv i32 %4, 1000
%6 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 0
store i32 %5, i32* %6
%7 = load i32, i32* %2
%8 = srem i32 %7, 1000
%9 = mul nsw i32 %8, 1000000
%10 = getelementptr inbounds %struct.timespec, %struct.timespec* %3, i32 0, i32 1
store i32 %9, i32* %10
%11 = call i32 @nanosleep(%struct.timespec* %3, i32* null)
ret void
}

LLVM IR (-O2):
%struct.timespec = type { i32, i32 }
define void @pegasus_sleep(i32 %0) {
%2 = alloca %struct.timespec
%3 = bitcast %struct.timespec* %2 to i8*
%4 = sdiv i32 %0, 1000
%5 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 0
store i32 %4, i32* %5
%6 = srem i32 %0, 1000
%7 = mul nsw i32 %6, 1000000
%8 = getelementptr inbounds %struct.timespec, %struct.timespec* %2, i64 0, i32 1
store i32 %7, i32* %8
%9 = call i32 @nanosleep(%struct.timespec* %2, i32* null)
ret void
}
void RTPipeFlush(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @avio_write_marker() {
ret void
}
int ds_log_get_current_level(void) { return 0; }


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

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

LLVM IR (-O0):
define i32 @ds_log_get_current_level() {
ret i32 0
}

LLVM IR (-O2):
define i32 @ds_log_get_current_level() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void print_int_array(int *array, int columns) {
  int iterator_column;
  for (iterator_column = 0; iterator_column < columns; iterator_column++) {
    printf("[DEBUG] [%d]: %d\n", iterator_column, array[iterator_column]);
  }
}


x86 assembly (clang, -O0):
<print_int_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    115a <print_int_array+0x4a>
mov    -0x10(%rbp),%esi
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%edx
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <print_int_array+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_int_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1147 <print_int_array+0x37>
mov    %rdi,%r14
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r15
nopl   0x0(%rax,%rax,1)
mov    (%r14,%rbx,4),%edx
mov    %r15,%rdi
mov    %ebx,%esi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <print_int_array+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [18 x i8] c"[DEBUG] [%d]: %d\0A\00"
define void @print_int_array(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 = %18, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %21
10: ; preds = %6
%11 = load i32, i32* %5
%12 = load i32*, i32** %3
%13 = load i32, i32* %5
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i32, i32* %12, i64 %14
%16 = load i32, i32* %15
%17 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %11, i32 %16)
br label %18
18: ; preds = %10
%19 = load i32, i32* %5
%20 = add nsw i32 %19, 1
store i32 %20, i32* %5
br label %6
21: ; preds = %6
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"[DEBUG] [%d]: %d\0A\00"
define void @print_int_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %14
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %12, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = trunc i64 %7 to i32
%11 = tail call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i32 %10, i32 %9)
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %14, label %6
14: ; preds = %6, %2
ret void
}
getuid() { return 10; }


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

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

LLVM IR (-O0):
define i32 @getuid() {
ret i32 10
}

LLVM IR (-O2):
define i32 @getuid() {
ret i32 10
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ printf(char *);
int dup2(int fildes __attribute__((unused)),
         int fildes2 __attribute__((unused))) {
  printf("dup2\n");
  errno = ENOSYS;
  return (-1);
}


x86 assembly (clang, -O0):
<dup2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eb7(%rip),%rax
mov    (%rax),%ecx
mov    0x2e9e(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup2>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    0x2ec4(%rip),%rax
mov    (%rax),%eax
mov    0x2eab(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
@str = [5 x i8] c"dup2\00"
define i32 @dup2(i32 %0, i32 %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @ENOSYS
store i32 %4, i32* @errno
ret i32 -1
}
int main(void) {
  enum escapes {
    BELL = '\a',
    BACKSPACE = '\b',
    TAB = '\t',
    NEWLINE = '\n',
    VTAB = '\v',
    RETURN = '\r'
  };
  enum months {
    JAN = 1,
    FEB,
    MAR,
    APR,
    MAY,
    JUN,
    JUL,
    AUG,
    SEP,
    OCT,
    NOV,
    DEC
  };
  enum months_2 {
    JAN0,
    JAN1 = 0,
    FEB0,
    MAR0,
    APR0,
    MAY0,
    JUN0,
    JUL0,
    AUG0,
    SEP0,
    OCT0,
    NOV0,
    DEC0
  };
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
void gtk_window_get_icon_list() {}


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

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

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

LLVM IR (-O2):
define void @gtk_window_get_icon_list() {
ret void
}
/* Variables and functions */
int yaffs_unlink_reldir(int /*<<< orphan*/, char const *);
int yaffs_unlink(const char *path) { return yaffs_unlink_reldir((0), path); }


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

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

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

LLVM IR (-O2):
define i32 @yaffs_unlink(i8* %0) {
%2 = tail call i32 @yaffs_unlink_reldir(i32 0, i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ semi_reportexc(int);
void semi_exit(void) {
  semi_reportexc(0x20026);
  while (1)
    ;
}


x86 assembly (clang, -O0):
<semi_exit>:
push   %rbp
mov    %rsp,%rbp
mov    $0x20026,%edi
call   1030 <semi_reportexc@plt>
jmp    111e <semi_exit+0xe>

x86 assembly (clang, -O2):
<semi_exit>:
push   %rax
mov    $0x20026,%edi
call   1030 <semi_reportexc@plt>
nopl   0x0(%rax,%rax,1)
jmp    1120 <semi_exit+0x10>

LLVM IR (-O0):
define void @semi_exit() {
%1 = call i32 @semi_reportexc(i32 131110)
br label %2
2: ; preds = %0, %2
br label %2
}

LLVM IR (-O2):
define void @semi_exit() {
%1 = tail call i32 @semi_reportexc(i32 131110)
br label %2
2: ; preds = %0, %2
br label %2
}
__typeof__(isupper(1)) test_isupper_61(void) { return isupper(1); }


x86 assembly (clang, -O0):
<test_isupper_61>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
call   1030 <isupper@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_isupper_61() {
%1 = call i32 @isupper(i32 1)
ret i32 %1
}

LLVM IR (-O2):
define i32 @test_isupper_61() {
%1 = tail call i32 @isupper(i32 1)
ret i32 %1
}
void SteamAPI_ISteamMatchmaking_LeaveLobby(void *self) {
  xlogf("%s(self = %p)\n", __func__, self);
}


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

x86 assembly (clang, -O2):
<SteamAPI_ISteamMatchmaking_LeaveLobby>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rdi
lea    0xeee(%rip),%rsi
xor    %eax,%eax
jmp    1030 <xlogf@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmaking_LeaveLobby = [38 x i8] c"SteamAPI_ISteamMatchmaking_LeaveLobby\00"
define void @SteamAPI_ISteamMatchmaking_LeaveLobby(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @__func__.SteamAPI_ISteamMatchmaking_LeaveLobby, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s(self = %p)\0A\00"
@__func__.SteamAPI_ISteamMatchmaking_LeaveLobby = [38 x i8] c"SteamAPI_ISteamMatchmaking_LeaveLobby\00"
define void @SteamAPI_ISteamMatchmaking_LeaveLobby(i8* %0) {
%2 = tail call i32 (i8*, i8*, i8*, ...) bitcast (i32 (...)* @xlogf to i32 (i8*, i8*, i8*, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([38 x i8], [38 x i8]* @__func__.SteamAPI_ISteamMatchmaking_LeaveLobby, i64 0, i64 0), i8* %0)
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long serial;
};
typedef TYPE_1__ XLeaveWindowEvent;

/* Variables and functions */
void set_XLeaveWindowEvent_serial(void *_p, unsigned long _v) {
  ((XLeaveWindowEvent *)_p)->serial = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XLeaveWindowEvent_serial>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XLeaveWindowEvent_serial(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XLeaveWindowEvent_serial(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}