xunge/DecIR huggingface dataset:
int upOrDown(int instruction) {
  if (instruction == 40)
    return 1;
  else if (instruction == 41)
    return -1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<upOrDown>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x28,-0x8(%rbp)
jne    111d <upOrDown+0x1d>
movl   $0x1,-0x4(%rbp)
jmp    113a <upOrDown+0x3a>
cmpl   $0x29,-0x8(%rbp)
jne    1133 <upOrDown+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    113a <upOrDown+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<upOrDown>:
xor    %ecx,%ecx
cmp    $0x29,%edi
sete   %cl
neg    %ecx
cmp    $0x28,%edi
mov    $0x1,%eax
cmovne %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @upOrDown(i32 %0) {
%2 = icmp eq i32 %0, 41
%3 = sext i1 %2 to i32
%4 = icmp eq i32 %0, 40
%5 = select i1 %4, i32 1, i32 %3
ret i32 %5
}
double density_temperature_c(const double T, const double qt, const double qv) {
  return T * (1.0 - qt + 1.6074538488331591 * qv);
}


x86 assembly (clang, -O0):
<density_temperature_c>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee8(%rip),%xmm2
subsd  -0x10(%rbp),%xmm2
movsd  -0x18(%rbp),%xmm1
movsd  0xece(%rip),%xmm3
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<density_temperature_c>:
movsd  0xef8(%rip),%xmm3
subsd  %xmm1,%xmm3
mulsd  0xef4(%rip),%xmm2
addsd  %xmm2,%xmm3
mulsd  %xmm3,%xmm0
ret

LLVM IR (-O0):
define double @density_temperature_c(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%7 = load double, double* %4
%8 = load double, double* %5
%9 = fsub double 1.000000e+00, %8
%10 = load double, double* %6
%11 = call double @llvm.fmuladd.f64(double 0x3FF9B82186E9157D, double %10, double %9)
%12 = fmul double %7, %11
ret double %12
}

LLVM IR (-O2):
define double @density_temperature_c(double %0, double %1, double %2) {
%4 = fsub double 1.000000e+00, %1
%5 = tail call double @llvm.fmuladd.f64(double %2, double 0x3FF9B82186E9157D, double %4)
%6 = fmul double %5, %0
ret double %6
}
double Double_from_MINUS_int(int x) { return (double)x; }


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

x86 assembly (clang, -O2):
<Double_from_MINUS_int>:
cvtsi2sd %edi,%xmm0
ret

LLVM IR (-O0):
define double @Double_from_MINUS_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = sitofp i32 %3 to double
ret double %4
}

LLVM IR (-O2):
define double @Double_from_MINUS_int(i32 %0) {
%2 = sitofp i32 %0 to double
ret double %2
}
/* Variables and functions */
int marshal_double(double *data, unsigned char **out, size_t *size) {
  double *_out = (double *)*out;
  if (*size < 8)
    return -1;
  *_out = *data;
  (*size) -= 8;
  (*out) += 8;
  return 0;
}


x86 assembly (clang, -O0):
<marshal_double>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x8,(%rax)
jae    1135 <marshal_double+0x35>
movl   $0xffffffff,-0x4(%rbp)
jmp    1168 <marshal_double+0x68>
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x28(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%rcx
sub    $0x8,%rcx
mov    %rcx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%rcx
add    $0x8,%rcx
mov    %rcx,(%rax)
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<marshal_double>:
mov    (%rdx),%rcx
mov    $0xffffffff,%eax
cmp    $0x8,%rcx
jb     1129 <marshal_double+0x29>
mov    (%rsi),%rax
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rax)
add    $0xfffffffffffffff8,%rcx
mov    %rcx,(%rdx)
add    $0x8,%rax
mov    %rax,(%rsi)
xor    %eax,%eax
ret

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

LLVM IR (-O2):
define i32 @marshal_double(double* nocapture %0, i8** nocapture %1, i64* nocapture %2) {
%4 = load i64, i64* %2
%5 = icmp ult i64 %4, 8
br i1 %5, label %12, label %6
6: ; preds = %3
%7 = bitcast i8** %1 to double**
%8 = load double*, double** %7
%9 = load double, double* %0
store double %9, double* %8
%10 = add i64 %4, -8
store i64 %10, i64* %2
%11 = getelementptr inbounds double, double* %8, i64 1
store double* %11, double** %7
br label %12
12: ; preds = %3, %6
%13 = phi i32 [ 0, %6 ], [ -1, %3 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ liic_delay_(unsigned int);
scalar_t__ liic_scl_(unsigned int, int);
int /*<<< orphan*/ liic_sda_(unsigned int, int);
void stop(unsigned num) {
  liic_scl_(num, 0);
  liic_sda_(num, 0);
  liic_delay_(num);
  while (liic_scl_(num, 1) == 0)
    ;
  liic_sda_(num, 1);
  liic_delay_(num);
}


x86 assembly (clang, -O0):
<stop>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <liic_scl_@plt>
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1050 <liic_sda_@plt>
mov    -0x4(%rbp),%edi
call   1040 <liic_delay_@plt>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1030 <liic_scl_@plt>
cmp    $0x0,%rax
jne    1173 <stop+0x43>
jmp    1157 <stop+0x27>
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1050 <liic_sda_@plt>
mov    -0x4(%rbp),%edi
call   1040 <liic_delay_@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<stop>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
call   1030 <liic_scl_@plt>
mov    %ebx,%edi
xor    %esi,%esi
call   1050 <liic_sda_@plt>
mov    %ebx,%edi
call   1040 <liic_delay_@plt>
nopw   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    $0x1,%esi
call   1030 <liic_scl_@plt>
test   %rax,%rax
je     1150 <stop+0x20>
mov    %ebx,%edi
mov    $0x1,%esi
call   1050 <liic_sda_@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <liic_delay_@plt>

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

LLVM IR (-O2):
define void @stop(i32 %0) {
%2 = tail call i64 @liic_scl_(i32 %0, i32 0)
%3 = tail call i32 @liic_sda_(i32 %0, i32 0)
%4 = tail call i32 @liic_delay_(i32 %0)
br label %5
5: ; preds = %5, %1
%6 = tail call i64 @liic_scl_(i32 %0, i32 1)
%7 = icmp eq i64 %6, 0
br i1 %7, label %5, label %8
8: ; preds = %5
%9 = tail call i32 @liic_sda_(i32 %0, i32 1)
%10 = tail call i32 @liic_delay_(i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sam_set_register(int /*<<< orphan*/);
int /*<<< orphan*/ sam_vdg_fsync();
void sam_reset(void) {
  sam_set_register(0);
  sam_vdg_fsync();
}


x86 assembly (clang, -O0):
<sam_reset>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1040 <sam_set_register@plt>
mov    $0x0,%al
call   1030 <sam_vdg_fsync@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sam_reset>:
push   %rax
xor    %edi,%edi
call   1040 <sam_set_register@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <sam_vdg_fsync@plt>

LLVM IR (-O0):
define void @sam_reset() {
%1 = call i32 @sam_set_register(i32 0)
%2 = call i32 (...) @sam_vdg_fsync()
ret void
}

LLVM IR (-O2):
define void @sam_reset() {
%1 = tail call i32 @sam_set_register(i32 0)
%2 = tail call i32 (...) @sam_vdg_fsync()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int main() {
  printf("hello world, from %s\n", "randy");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [22 x i8] c"hello world, from %s\0A\00"
@.str.1 = [6 x i8] c"randy\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [22 x i8] c"hello world, from %s\0A\00"
@.str.1 = [6 x i8] c"randy\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void dumpNode(int i, int c, void *data) {
  printf("%d\t%d\n", i, c);
  (void)(data);
}


x86 assembly (clang, -O0):
<dumpNode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dumpNode>:
mov    %esi,%edx
mov    %edi,%esi
lea    0xee5(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d\09%d\0A\00"
define void @dumpNode(i32 %0, i32 %1, i8* nocapture readnone %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
void SSIDataGet(uint32_t ui32Base, uint32_t *pui32Data) {
  ;
  while (!((*((volatile uint32_t *)(ui32Base + 0x0000000C))) & 0x00000004)) {
  }
  *pui32Data = (*((volatile uint32_t *)(ui32Base + 0x00000008)));
}


x86 assembly (clang, -O0):
<SSIDataGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    $0xc,%eax
cltq
mov    (%rax),%eax
and    $0x4,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
test   $0x1,%al
jne    112d <SSIDataGet+0x2d>
jmp    1132 <SSIDataGet+0x32>
jmp    110b <SSIDataGet+0xb>
mov    -0x4(%rbp),%eax
add    $0x8,%eax
cltq
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<SSIDataGet>:
movslq %edi,%rax
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
testl  $0x4,0xc(%rax)
je     1110 <SSIDataGet+0x10>
mov    0x8(%rax),%eax
mov    %eax,(%rsi)
ret

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

LLVM IR (-O2):
define void @SSIDataGet(i32 %0, i32* nocapture writeonly %1) {
%3 = add nsw i32 %0, 12
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
br label %6
6: ; preds = %6, %2
%7 = load volatile i32, i32* %5
%8 = and i32 %7, 4
%9 = icmp eq i32 %8, 0
br i1 %9, label %6, label %10
10: ; preds = %6
%11 = add nsw i32 %0, 8
%12 = sext i32 %11 to i64
%13 = inttoptr i64 %12 to i32*
%14 = load volatile i32, i32* %13
store i32 %14, i32* %1
ret void
}
/* Variables and functions */
int Q_isupper(int c) {
  if (c >= 'A' && c <= 'Z')
    return (1);
  return (0);
}


x86 assembly (clang, -O0):
<Q_isupper>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x41,-0x8(%rbp)
jl     1127 <Q_isupper+0x27>
cmpl   $0x5a,-0x8(%rbp)
jg     1127 <Q_isupper+0x27>
movl   $0x1,-0x4(%rbp)
jmp    112e <Q_isupper+0x2e>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_isupper>:
add    $0xffffffbf,%edi
xor    %eax,%eax
cmp    $0x1a,%edi
setb   %al
ret

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

LLVM IR (-O2):
define i32 @Q_isupper(i32 %0) {
%2 = add i32 %0, -65
%3 = icmp ult i32 %2, 26
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct winsize {
  int ws_col;
  int ws_row;
};

/* Variables and functions */
int /*<<< orphan*/ STDIN_FILENO;
int /*<<< orphan*/ TIOCGWINSZ;
int /*<<< orphan*/ ioctl(int /*<<< orphan*/, int /*<<< orphan*/,
                         struct winsize *);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ sleep(int);
int main(void) {
  struct winsize w;
  while (1) {
    ioctl(STDIN_FILENO, TIOCGWINSZ, &w);
    printf("width:%d, high:%d\n", w.ws_col, w.ws_row);
    sleep(1);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2e9a(%rip),%rax
mov    (%rax),%edi
mov    0x2e81(%rip),%rax
mov    (%rax),%esi
lea    -0x10(%rbp),%rdx
call   1040 <ioctl@plt>
mov    -0x10(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xe99(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    113f <main+0xf>

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    0x2ea1(%rip),%r15
mov    0x2e8a(%rip),%r12
mov    %rsp,%r14
lea    0xeb0(%rip),%rbx
mov    (%r15),%edi
mov    (%r12),%esi
mov    %r14,%rdx
call   1040 <ioctl@plt>
mov    (%rsp),%esi
mov    0x4(%rsp),%edx
mov    %rbx,%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <sleep@plt>
jmp    1150 <main+0x20>

LLVM IR (-O0):
%struct.winsize = type { i32, i32 }
@STDIN_FILENO = global i32 0
@TIOCGWINSZ = global i32 0
@.str = [19 x i8] c"width:%d, high:%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca %struct.winsize
store i32 0, i32* %1
br label %3
3: ; preds = %0, %3
%4 = load i32, i32* @STDIN_FILENO
%5 = load i32, i32* @TIOCGWINSZ
%6 = call i32 @ioctl(i32 %4, i32 %5, %struct.winsize* %2)
%7 = getelementptr inbounds %struct.winsize, %struct.winsize* %2, i32 0, i32 0
%8 = load i32, i32* %7
%9 = getelementptr inbounds %struct.winsize, %struct.winsize* %2, i32 0, i32 1
%10 = load i32, i32* %9
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %8, i32 %10)
%12 = call i32 @sleep(i32 1)
br label %3
}

LLVM IR (-O2):
%struct.winsize = type { i32, i32 }
@STDIN_FILENO = global i32 0
@TIOCGWINSZ = global i32 0
@.str = [19 x i8] c"width:%d, high:%d\0A\00"
define i32 @main() {
%1 = alloca %struct.winsize
%2 = bitcast %struct.winsize* %1 to i8*
%3 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i64 0, i32 0
%4 = getelementptr inbounds %struct.winsize, %struct.winsize* %1, i64 0, i32 1
br label %5
5: ; preds = %5, %0
%6 = load i32, i32* @STDIN_FILENO
%7 = load i32, i32* @TIOCGWINSZ
%8 = call i32 @ioctl(i32 %6, i32 %7, %struct.winsize* %1)
%9 = load i32, i32* %3
%10 = load i32, i32* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i32 %9, i32 %10)
%12 = call i32 @sleep(i32 1)
br label %5
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ get_pin(int /*<<< orphan*/, int /*<<< orphan*/, int, int);
uint8_t get_pin_polarity(uint8_t address, uint8_t pin) {
  return get_pin(address, pin, 0x02, 0x03);
}


x86 assembly (clang, -O0):
<get_pin_polarity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    $0x2,%edx
mov    $0x3,%ecx
call   1030 <get_pin@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_pin_polarity>:
mov    $0x2,%edx
mov    $0x3,%ecx
jmp    1030 <get_pin@plt>

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

LLVM IR (-O2):
define i32 @get_pin_polarity(i32 %0, i32 %1) {
%3 = tail call i32 @get_pin(i32 %0, i32 %1, i32 2, i32 3)
ret i32 %3
}
void manage_stmt_error() {}


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

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

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

LLVM IR (-O2):
define void @manage_stmt_error() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
void welcome() {
  delay(2000);
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
  ;
}


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

x86 assembly (clang, -O2):
<welcome>:
mov    $0x7d0,%edi
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @welcome() {
%1 = call i32 @delay(i32 2000)
ret void
}

LLVM IR (-O2):
define void @welcome() {
%1 = tail call i32 @delay(i32 2000)
ret void
}
int is_any_bit_equals_0(int x) { return !(!(~x)); }


x86 assembly (clang, -O0):
<is_any_bit_equals_0>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
xor    $0xffffffff,%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_any_bit_equals_0>:
xor    %eax,%eax
cmp    $0xffffffff,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @is_any_bit_equals_0(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = xor i32 %3, -1
%5 = icmp ne i32 %4, 0
%6 = xor i1 %5, true
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @is_any_bit_equals_0(i32 %0) {
%2 = icmp ne i32 %0, -1
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
main() { printf(" %d\n", '-' - '-' - '/' / '/'); }


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

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

LLVM IR (-O0):
@.str = [5 x i8] c" %d\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext -1)
ret i32 0
}

LLVM IR (-O2):
@.str = [5 x i8] c" %d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 signext -1)
ret i32 0
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ assert(unsigned char *);
uint16_t spy_mach_read_from_2(unsigned char *b) {
  assert(b);
  return ((uint16_t)(b[0] << 8) | (uint16_t)b[1]);
}


x86 assembly (clang, -O0):
<spy_mach_read_from_2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
movzbl (%rax),%eax
shl    $0x8,%eax
mov    -0x8(%rbp),%rcx
movzbl 0x1(%rcx),%ecx
or     %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<spy_mach_read_from_2>:
push   %rbx
mov    %rdi,%rbx
call   1030 <assert@plt>
movzwl (%rbx),%eax
shl    $0x10,%eax
bswap  %eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @spy_mach_read_from_2(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @assert(i8* %3)
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8, i8* %5, i64 0
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = shl i32 %8, 8
%10 = load i8*, i8** %2
%11 = getelementptr inbounds i8, i8* %10, i64 1
%12 = load i8, i8* %11
%13 = zext i8 %12 to i32
%14 = or i32 %9, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @spy_mach_read_from_2(i8* %0) {
%2 = tail call i32 @assert(i8* %0)
%3 = load i8, i8* %0
%4 = zext i8 %3 to i32
%5 = shl nuw nsw i32 %4, 8
%6 = getelementptr inbounds i8, i8* %0, i64 1
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = or i32 %5, %8
ret i32 %9
}
void foo192(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo192(i32 %0) {
ret void
}
int compare_int(const void *arg1, const void *arg2) {
  if (*((int *)arg1) < *((int *)arg2))
    return -1;
  if (*((int *)arg1) == *((int *)arg2))
    return 0;
  if (*((int *)arg1) > *((int *)arg2))
    return 1;
}


x86 assembly (clang, -O0):
<compare_int>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jge    112a <compare_int+0x2a>
movl   $0xffffffff,-0x4(%rbp)
jmp    1161 <compare_int+0x61>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jne    1148 <compare_int+0x48>
movl   $0x0,-0x4(%rbp)
jmp    1161 <compare_int+0x61>
mov    -0x10(%rbp),%rax
mov    (%rax),%eax
mov    -0x18(%rbp),%rcx
cmp    (%rcx),%eax
jle    1161 <compare_int+0x61>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_int>:
mov    (%rdi),%eax
xor    %ecx,%ecx
cmp    (%rsi),%eax
setne  %cl
mov    $0xffffffff,%eax
cmovge %ecx,%eax
ret

LLVM IR (-O0):
define i32 @compare_int(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 = bitcast i8* %6 to i32*
%8 = load i32, i32* %7
%9 = load i8*, i8** %5
%10 = bitcast i8* %9 to i32*
%11 = load i32, i32* %10
%12 = icmp slt i32 %8, %11
br i1 %12, label %13, label %14
13: ; preds = %2
store i32 -1, i32* %3
br label %32
14: ; preds = %2
%15 = load i8*, i8** %4
%16 = bitcast i8* %15 to i32*
%17 = load i32, i32* %16
%18 = load i8*, i8** %5
%19 = bitcast i8* %18 to i32*
%20 = load i32, i32* %19
%21 = icmp eq i32 %17, %20
br i1 %21, label %22, label %23
22: ; preds = %14
store i32 0, i32* %3
br label %32
23: ; preds = %14
%24 = load i8*, i8** %4
%25 = bitcast i8* %24 to i32*
%26 = load i32, i32* %25
%27 = load i8*, i8** %5
%28 = bitcast i8* %27 to i32*
%29 = load i32, i32* %28
%30 = icmp sgt i32 %26, %29
br i1 %30, label %31, label %32
31: ; preds = %23
store i32 1, i32* %3
br label %32
32: ; preds = %13, %22, %31, %23
%33 = load i32, i32* %3
ret i32 %33
}

LLVM IR (-O2):
define i32 @compare_int(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i32*
%4 = load i32, i32* %3
%5 = bitcast i8* %1 to i32*
%6 = load i32, i32* %5
%7 = icmp slt i32 %4, %6
%8 = icmp ne i32 %4, %6
%9 = zext i1 %8 to i32
%10 = select i1 %7, i32 -1, i32 %9
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isodigit(int);
void t_isodigit_0xe1() {
  Assert_real((isodigit(225) == 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",
              1130, ("isodigit should be 0 for 0xe1"));
}


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

x86 assembly (clang, -O2):
<t_isodigit_0xe1>:
push   %rax
mov    $0xe1,%edi
call   1040 <isodigit@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf67(%rip),%rcx
mov    $0x46a,%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 0xe1\00"
define void @t_isodigit_0xe1() {
%1 = call i64 @isodigit(i32 225)
%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 1130, 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 0xe1\00"
define void @t_isodigit_0xe1() {
%1 = tail call i64 @isodigit(i32 225)
%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 1130, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
char *string_ndup(char const *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char const *);
char *string_dup(const char *str) { return string_ndup(str, strlen(str)); }


x86 assembly (clang, -O0):
<string_dup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x10(%rbp),%rdi
mov    %eax,%esi
call   1040 <string_ndup@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<string_dup>:
push   %rbx
mov    %rdi,%rbx
call   1030 <strlen@plt>
mov    %rbx,%rdi
mov    %eax,%esi
pop    %rbx
jmp    1040 <string_ndup@plt>

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

LLVM IR (-O2):
define i8* @string_dup(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = tail call i8* @string_ndup(i8* %0, i32 %2)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ multitable_crc32c(int /*<<< orphan*/, unsigned char const *,
                                     unsigned int);
int /*<<< orphan*/ singletable_crc32c(int /*<<< orphan*/, unsigned char const *,
                                      unsigned int);
uint32_t crc32c(uint32_t crc32c, const unsigned char *buffer,
                unsigned int length) {
  if (length < 4) {
    return (singletable_crc32c(crc32c, buffer, length));
  } else {
    return (multitable_crc32c(crc32c, buffer, length));
  }
}


x86 assembly (clang, -O0):
<crc32c>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
cmpl   $0x4,-0x14(%rbp)
jae    1153 <crc32c+0x33>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <singletable_crc32c@plt>
mov    %eax,-0x4(%rbp)
jmp    1165 <crc32c+0x45>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <multitable_crc32c@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc32c>:
cmp    $0x3,%edx
ja     112a <crc32c+0xa>
jmp    1030 <singletable_crc32c@plt>
jmp    1040 <multitable_crc32c@plt>

LLVM IR (-O0):
define i32 @crc32c(i32 %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32
store i32 %0, i32* %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%8 = load i32, i32* %7
%9 = icmp ult i32 %8, 4
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @singletable_crc32c(i32 %11, i8* %12, i32 %13)
store i32 %14, i32* %4
br label %20
15: ; preds = %3
%16 = load i32, i32* %5
%17 = load i8*, i8** %6
%18 = load i32, i32* %7
%19 = call i32 @multitable_crc32c(i32 %16, i8* %17, i32 %18)
store i32 %19, i32* %4
br label %20
20: ; preds = %15, %10
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @crc32c(i32 %0, i8* %1, i32 %2) {
%4 = icmp ult i32 %2, 4
br i1 %4, label %5, label %7
5: ; preds = %3
%6 = tail call i32 @singletable_crc32c(i32 %0, i8* %1, i32 %2)
br label %9
7: ; preds = %3
%8 = tail call i32 @multitable_crc32c(i32 %0, i8* %1, i32 %2)
br label %9
9: ; preds = %7, %5
%10 = phi i32 [ %6, %5 ], [ %8, %7 ]
ret i32 %10
}
/* Variables and functions */
float cosf(float);
float sinf(float);
void sincosf(float r, float *restrict sr, float *restrict cr) {
  *sr = sinf(r);
  *cr = cosf(r);
}


x86 assembly (clang, -O0):
<sincosf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movss  %xmm0,-0x4(%rbp)
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movss  -0x4(%rbp),%xmm0
call   1030 <sinf@plt>
mov    -0x10(%rbp),%rax
movss  %xmm0,(%rax)
movss  -0x4(%rbp),%xmm0
call   1040 <cosf@plt>
mov    -0x18(%rbp),%rax
movss  %xmm0,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sincosf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movss  %xmm0,0x4(%rsp)
call   1030 <sinf@plt>
movss  %xmm0,(%rbx)
movss  0x4(%rsp),%xmm0
call   1040 <cosf@plt>
movss  %xmm0,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @sincosf(float %0, float* noalias %1, float* noalias %2) {
%4 = alloca float
%5 = alloca float*
%6 = alloca float*
store float %0, float* %4
store float* %1, float** %5
store float* %2, float** %6
%7 = load float, float* %4
%8 = call float @sinf(float %7)
%9 = load float*, float** %5
store float %8, float* %9
%10 = load float, float* %4
%11 = call float @cosf(float %10)
%12 = load float*, float** %6
store float %11, float* %12
ret void
}

LLVM IR (-O2):
define void @sincosf(float %0, float* noalias nocapture writeonly %1, float* noalias nocapture writeonly %2) {
%4 = tail call float @sinf(float %0)
store float %4, float* %1
%5 = tail call float @cosf(float %0)
store float %5, float* %2
ret void
}
void test81_TestProg_targetInit__I() {}


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

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

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

LLVM IR (-O2):
define void @test81_TestProg_targetInit__I() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_slli_epi64(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_srli_epi64(int /*<<< orphan*/, int);
int /*<<< orphan*/ _mm_xor_si128(int /*<<< orphan*/, int /*<<< orphan*/);
__m128i rol_epi64(__m128i v, int s) {
  __m128i v1 = _mm_slli_epi64(v, s);
  __m128i v2 = _mm_srli_epi64(v, 64 - s);
  return _mm_xor_si128(v1, v2);
}


x86 assembly (clang, -O0):
<rol_epi64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <_mm_slli_epi64@plt>
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x40,%esi
sub    -0x8(%rbp),%esi
call   1030 <_mm_srli_epi64@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1040 <_mm_xor_si128@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rol_epi64>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
call   1050 <_mm_slli_epi64@plt>
mov    %eax,%r14d
mov    $0x40,%esi
sub    %ebx,%esi
mov    %ebp,%edi
call   1030 <_mm_srli_epi64@plt>
mov    %r14d,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <_mm_xor_si128@plt>

LLVM IR (-O0):
define i32 @rol_epi64(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = call i32 @_mm_slli_epi64(i32 %7, i32 %8)
store i32 %9, i32* %5
%10 = load i32, i32* %3
%11 = load i32, i32* %4
%12 = sub nsw i32 64, %11
%13 = call i32 @_mm_srli_epi64(i32 %10, i32 %12)
store i32 %13, i32* %6
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @_mm_xor_si128(i32 %14, i32 %15)
ret i32 %16
}

LLVM IR (-O2):
define i32 @rol_epi64(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_slli_epi64(i32 %0, i32 %1)
%4 = sub nsw i32 64, %1
%5 = tail call i32 @_mm_srli_epi64(i32 %0, i32 %4)
%6 = tail call i32 @_mm_xor_si128(i32 %3, i32 %5)
ret i32 %6
}
int test_013(int a, int c, int b, int d) { return a + d + (b & 1) + b; }


x86 assembly (clang, -O0):
<test_013>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x10(%rbp),%eax
mov    -0xc(%rbp),%ecx
and    $0x1,%ecx
add    %ecx,%eax
add    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_013>:
lea    (%rdi,%rdx,1),%eax
and    $0x1,%edx
add    %ecx,%eax
add    %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @test_013(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = and i32 %2, 1
%6 = add i32 %2, %0
%7 = add i32 %6, %3
%8 = add i32 %7, %5
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ CleanupTest();
int /*<<< orphan*/ SetupTest();
int /*<<< orphan*/ printf(char *, ...);
void RunTest(void (*testFunction)(void), char *testName) {
  printf("Running test: %s...", testName);
  SetupTest();
  testFunction();
  CleanupTest();
  printf("SUCCESS!\n");
}


x86 assembly (clang, -O0):
<RunTest>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xeb5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <SetupTest@plt>
call   *-0x8(%rbp)
mov    $0x0,%al
call   1040 <CleanupTest@plt>
lea    0xeaa(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RunTest>:
push   %rbx
mov    %rdi,%rbx
lea    0xeb5(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <SetupTest@plt>
call   *%rbx
xor    %eax,%eax
call   1050 <CleanupTest@plt>
lea    0xeab(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Running test: %s...\00"
@.str.1 = [10 x i8] c"SUCCESS!\0A\00"
define void @RunTest(void ()* %0, i8* %1) {
%3 = alloca void ()*
%4 = alloca i8*
store void ()* %0, void ()** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = call i32 (...) @SetupTest()
%8 = load void ()*, void ()** %3
%9 = call i32 (...) @CleanupTest()
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Running test: %s...\00"
@str = [9 x i8] c"SUCCESS!\00"
define void @RunTest(void ()* nocapture %0, i8* %1) {
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 (...) @SetupTest()
tail call void %0()
%5 = tail call i32 (...) @CleanupTest()
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Serial_writeEnergia(int, unsigned char *, int);
void serialWriteEnergia(int port, unsigned char *bytestream, int size) {
  Serial_writeEnergia(port, bytestream, size);
}


x86 assembly (clang, -O0):
<serialWriteEnergia>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1030 <Serial_writeEnergia@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<serialWriteEnergia>:
jmp    1030 <Serial_writeEnergia@plt>

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

LLVM IR (-O2):
define void @serialWriteEnergia(i32 %0, i8* %1, i32 %2) {
%4 = tail call i32 @Serial_writeEnergia(i32 %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
scalar_t__ isalpha(char);
int is_alpha(char c) { return (isalpha(c) || (c == '_')); }


x86 assembly (clang, -O0):
<is_alpha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edi
call   1030 <isalpha@plt>
mov    %rax,%rcx
mov    $0x1,%al
cmp    $0x0,%rcx
mov    %al,-0x2(%rbp)
jne    1146 <is_alpha+0x36>
movsbl -0x1(%rbp),%eax
cmp    $0x5f,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_alpha>:
push   %rbx
mov    %edi,%ebx
call   1030 <isalpha@plt>
test   %rax,%rax
setne  %al
cmp    $0x5f,%bl
sete   %cl
or     %al,%cl
movzbl %cl,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @is_alpha(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i64 @isalpha(i8 signext %3)
%5 = icmp ne i64 %4, 0
br i1 %5, label %10, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ true, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @is_alpha(i8 signext %0) {
%2 = tail call i64 @isalpha(i8 signext %0)
%3 = icmp ne i64 %2, 0
%4 = icmp eq i8 %0, 95
%5 = or i1 %4, %3
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void hello_world() { printf("Hello World\n"); }


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

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

LLVM IR (-O0):
@.str = [13 x i8] c"Hello World\0A\00"
define void @hello_world() {
%1 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [12 x i8] c"Hello World\00"
define void @hello_world() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double log10(double);
double Log10(double a, double b) { return log10(a); }


x86 assembly (clang, -O0):
<Log10>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <log10@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Log10>:
jmp    1030 <log10@plt>

LLVM IR (-O0):
define double @Log10(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = call double @log10(double %5)
ret double %6
}

LLVM IR (-O2):
define double @Log10(double %0, double %1) {
%3 = tail call double @log10(double %0)
ret double %3
}
void test(double d1, float f1, long double ld1) {}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
movsd  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
fstpt  -0x20(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @test(double %0, float %1, x86_fp80 %2) {
%4 = alloca double
%5 = alloca float
%6 = alloca x86_fp80
store double %0, double* %4
store float %1, float* %5
store x86_fp80 %2, x86_fp80* %6
ret void
}

LLVM IR (-O2):
define void @test(double %0, float %1, x86_fp80 %2) {
ret void
}
void ARGBAttenuateRow_Any_SSSE3() {}


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

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

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

LLVM IR (-O2):
define void @ARGBAttenuateRow_Any_SSSE3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __softboundmpx_store_base_shadow_stack(int /*<<< orphan*/ *,
                                                          int /*<<< orphan*/);
int /*<<< orphan*/ __softboundmpx_store_bound_shadow_stack(int /*<<< orphan*/ *,
                                                           int /*<<< orphan*/);
__attribute__((__weak__, __always___)) void
__softboundmpx_store_null_return_metadata() {
  __softboundmpx_store_base_shadow_stack(NULL, 0);
  __softboundmpx_store_bound_shadow_stack(NULL, 0);
}


x86 assembly (clang, -O0):
<__softboundmpx_store_null_return_metadata>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1030 <__softboundmpx_store_base_shadow_stack@plt>
xor    %eax,%eax
mov    %eax,%edi
xor    %esi,%esi
call   1040 <__softboundmpx_store_bound_shadow_stack@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<__softboundmpx_store_null_return_metadata>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
call   1030 <__softboundmpx_store_base_shadow_stack@plt>
xor    %edi,%edi
xor    %esi,%esi
pop    %rax
jmp    1040 <__softboundmpx_store_bound_shadow_stack@plt>

LLVM IR (-O0):
define weak void @__softboundmpx_store_null_return_metadata() {
%1 = call i32 @__softboundmpx_store_base_shadow_stack(i32* null, i32 0)
%2 = call i32 @__softboundmpx_store_bound_shadow_stack(i32* null, i32 0)
ret void
}

LLVM IR (-O2):
define weak void @__softboundmpx_store_null_return_metadata() {
%1 = tail call i32 @__softboundmpx_store_base_shadow_stack(i32* null, i32 0)
%2 = tail call i32 @__softboundmpx_store_bound_shadow_stack(i32* null, i32 0)
ret void
}
void *deconst(const void *ptr) {
  return (char *)1 + ((const char *)ptr - (char *)1U);
}


x86 assembly (clang, -O0):
<deconst>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rcx
sub    $0x1,%rcx
mov    $0x1,%eax
add    %rcx,%rax
pop    %rbp
ret

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

LLVM IR (-O0):
define i8* @deconst(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = ptrtoint i8* %3 to i64
%5 = sub i64 %4, 1
%6 = getelementptr inbounds i8, i8* inttoptr (i64 1 to i8*), i64 %5
ret i8* %6
}

LLVM IR (-O2):
define i8* @deconst(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = add i64 %2, -1
%4 = getelementptr inbounds i8, i8* inttoptr (i64 1 to i8*), i64 %3
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
void local_step(char *buf) { printf("%s", buf); }


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

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

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define void @local_step(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;
typedef int int32_t;

/* Variables and functions */
__attribute__((always_)) uint32_t __SSAX(uint32_t x, uint32_t y) {
  int32_t r, s;
  r = ((((int32_t)x << 16) >> 16) + (((int32_t)y) >> 16)) & (int32_t)0x0000FFFF;
  s = ((((int32_t)x) >> 16) - (((int32_t)y << 16) >> 16)) & (int32_t)0x0000FFFF;
  return ((uint32_t)((s << 16) | (r)));
}


x86 assembly (clang, -O0):
<__SSAX>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
shl    $0x10,%eax
sar    $0x10,%eax
mov    -0x10(%rbp),%rcx
sar    $0x10,%ecx
add    %ecx,%eax
and    $0xffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
sar    $0x10,%eax
mov    -0x10(%rbp),%rcx
shl    $0x10,%ecx
sar    $0x10,%ecx
sub    %ecx,%eax
and    $0xffff,%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
shl    $0x10,%eax
or     -0x14(%rbp),%eax
cltq
pop    %rbp
ret

x86 assembly (clang, -O2):
<__SSAX>:
mov    %esi,%eax
shr    $0x10,%eax
add    %edi,%eax
movzwl %ax,%eax
shl    $0x10,%esi
sub    %esi,%edi
and    $0xffff0000,%edi
or     %eax,%edi
movslq %edi,%rax
ret

LLVM IR (-O0):
define i64 @__SSAX(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i32
%6 = alloca i32
store i64 %0, i64* %3
store i64 %1, i64* %4
%7 = load i64, i64* %3
%8 = trunc i64 %7 to i32
%9 = shl i32 %8, 16
%10 = ashr i32 %9, 16
%11 = load i64, i64* %4
%12 = trunc i64 %11 to i32
%13 = ashr i32 %12, 16
%14 = add nsw i32 %10, %13
%15 = and i32 %14, 65535
store i32 %15, i32* %5
%16 = load i64, i64* %3
%17 = trunc i64 %16 to i32
%18 = ashr i32 %17, 16
%19 = load i64, i64* %4
%20 = trunc i64 %19 to i32
%21 = shl i32 %20, 16
%22 = ashr i32 %21, 16
%23 = sub nsw i32 %18, %22
%24 = and i32 %23, 65535
store i32 %24, i32* %6
%25 = load i32, i32* %6
%26 = shl i32 %25, 16
%27 = load i32, i32* %5
%28 = or i32 %26, %27
%29 = sext i32 %28 to i64
ret i64 %29
}

LLVM IR (-O2):
define i64 @__SSAX(i64 %0, i64 %1) {
%3 = trunc i64 %0 to i32
%4 = trunc i64 %1 to i32
%5 = lshr i32 %4, 16
%6 = add i32 %5, %3
%7 = and i32 %6, 65535
%8 = mul i32 %4, -65536
%9 = add i32 %8, %3
%10 = and i32 %9, -65536
%11 = or i32 %10, %7
%12 = sext i32 %11 to i64
ret i64 %12
}