xunge/DecIR huggingface dataset:
int tst_si_test2(int a, int b, int c) {
  int d = a & 0x99999999;
  if (d <= 0)
    return 12;
  else
    return 18;
}


x86 assembly (clang, -O0):
<tst_si_test2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0x99999999,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jg     112e <tst_si_test2+0x2e>
movl   $0xc,-0x4(%rbp)
jmp    1135 <tst_si_test2+0x35>
movl   $0x12,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_si_test2>:
test   $0x99999999,%edi
mov    $0xc,%ecx
mov    $0x12,%eax
cmovle %ecx,%eax
ret

LLVM IR (-O0):
define i32 @tst_si_test2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%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
%9 = load i32, i32* %5
%10 = and i32 %9, -1717986919
store i32 %10, i32* %8
%11 = load i32, i32* %8
%12 = icmp sle i32 %11, 0
br i1 %12, label %13, label %14
13: ; preds = %3
store i32 12, i32* %4
br label %15
14: ; preds = %3
store i32 18, i32* %4
br label %15
15: ; preds = %14, %13
%16 = load i32, i32* %4
ret i32 %16
}

LLVM IR (-O2):
define i32 @tst_si_test2(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %0, -1717986919
%5 = icmp slt i32 %4, 1
%6 = select i1 %5, i32 12, i32 18
ret i32 %6
}
/* Variables and functions */
int lseek(int, int, int);
int _lseek(int fd, int offset, int whence) { return lseek(fd, offset, whence); }


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

x86 assembly (clang, -O2):
<_lseek>:
jmp    1030 <lseek@plt>

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

LLVM IR (-O2):
define i32 @_lseek(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @lseek(i32 %0, i32 %1, i32 %2)
ret i32 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char const *, char *);
int /*<<< orphan*/ fwrite(float const *, int, int const, int /*<<< orphan*/ *);
void write_float(const float *x, const int n, const char *fNam) {
  FILE *f;
  f = fopen(fNam, "wb");
  fwrite(x, sizeof(float), n, f);
  fclose(f);
}


x86 assembly (clang, -O0):
<write_float>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
lea    0xeb2(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
mov    -0x20(%rbp),%rcx
mov    $0x4,%esi
call   1050 <fwrite@plt>
mov    -0x20(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_float>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%r14d
mov    %rdi,%rbx
lea    0xebf(%rip),%rsi
mov    %rdx,%rdi
call   1040 <fopen@plt>
mov    %rax,%rbp
mov    %rbx,%rdi
mov    $0x4,%esi
mov    %r14d,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbp,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"wb\00"
define void @write_float(float* %0, i32 %1, i8* %2) {
%4 = alloca float*
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i32*
store float* %0, float** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%8 = load i8*, i8** %6
%9 = call i32* @fopen(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %9, i32** %7
%10 = load float*, float** %4
%11 = load i32, i32* %5
%12 = load i32*, i32** %7
%13 = call i32 @fwrite(float* %10, i32 4, i32 %11, i32* %12)
%14 = load i32*, i32** %7
%15 = call i32 @fclose(i32* %14)
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"wb\00"
define void @write_float(float* nocapture %0, i32 %1, i8* nocapture %2) {
%4 = tail call i32* @fopen(i8* %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%5 = tail call i32 @fwrite(float* %0, i32 4, i32 %1, i32* %4)
%6 = tail call i32 @fclose(i32* %4)
ret void
}
void gtk_file_chooser_get_use_preview_label() {}


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

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

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

LLVM IR (-O2):
define void @gtk_file_chooser_get_use_preview_label() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGINT;
int /*<<< orphan*/ SIG_DFL;
int /*<<< orphan*/ sysv_signal(int /*<<< orphan*/, int /*<<< orphan*/);
void default_signals() { (void)sysv_signal(SIGINT, SIG_DFL); }


x86 assembly (clang, -O0):
<default_signals>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
call   1030 <sysv_signal@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<default_signals>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
jmp    1030 <sysv_signal@plt>

LLVM IR (-O0):
@SIGINT = global i32 0
@SIG_DFL = global i32 0
define void @default_signals() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_DFL
%3 = call i32 @sysv_signal(i32 %1, i32 %2)
ret void
}

LLVM IR (-O2):
@SIGINT = global i32 0
@SIG_DFL = global i32 0
define void @default_signals() {
%1 = load i32, i32* @SIGINT
%2 = load i32, i32* @SIG_DFL
%3 = tail call i32 @sysv_signal(i32 %1, i32 %2)
ret void
}
__attribute__((__no__)) void
do_nothing_big_hole_runtime_all(struct test_big_hole *ptr) {
  if ((unsigned long)ptr > 0x2)
    return;
  else
    return;
}


x86 assembly (clang, -O0):
<do_nothing_big_hole_runtime_all>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmp    $0x2,%rax
jbe    111b <do_nothing_big_hole_runtime_all+0x1b>
jmp    1120 <do_nothing_big_hole_runtime_all+0x20>
jmp    1120 <do_nothing_big_hole_runtime_all+0x20>
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.test_big_hole = type opaque
define void @do_nothing_big_hole_runtime_all(%struct.test_big_hole* %0) {
%2 = alloca %struct.test_big_hole*
store %struct.test_big_hole* %0, %struct.test_big_hole** %2
%3 = load %struct.test_big_hole*, %struct.test_big_hole** %2
%4 = ptrtoint %struct.test_big_hole* %3 to i64
%5 = icmp ugt i64 %4, 2
br i1 %5, label %6, label %7
6: ; preds = %1
br label %8
7: ; preds = %1
br label %8
8: ; preds = %7, %6
ret void
}

LLVM IR (-O2):
%struct.test_big_hole = type opaque
define void @do_nothing_big_hole_runtime_all(%struct.test_big_hole* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ PAL_WriteConfig(int);
void PAL_Reset(void) { PAL_WriteConfig(0x0c0); }


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

x86 assembly (clang, -O2):
<PAL_Reset>:
mov    $0xc0,%edi
jmp    1030 <PAL_WriteConfig@plt>

LLVM IR (-O0):
define void @PAL_Reset() {
%1 = call i32 @PAL_WriteConfig(i32 192)
ret void
}

LLVM IR (-O2):
define void @PAL_Reset() {
%1 = tail call i32 @PAL_WriteConfig(i32 192)
ret void
}
/* Variables and functions */
scalar_t__ rand();
int fRandInt(int iMIN, int iMAX) {
  return (iMIN + (int)((iMAX - iMIN + 1) * (((float)rand()) / (float)32768)));
}


x86 assembly (clang, -O0):
<fRandInt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
cvtsi2ss %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
movss  -0x10(%rbp),%xmm0
mov    %rax,%rcx
mov    -0xc(%rbp),%eax
cvtsi2ss %rcx,%xmm1
movss  0xeab(%rip),%xmm2
divss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%ecx
add    %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fRandInt>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
sub    %edi,%esi
add    $0x1,%esi
cvtsi2ss %esi,%xmm0
movss  %xmm0,0xc(%rsp)
xor    %eax,%eax
call   1030 <rand@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
mulss  0xec3(%rip),%xmm0
mulss  0xc(%rsp),%xmm0
cvttss2si %xmm0,%eax
add    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @fRandInt(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 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = sitofp i32 %9 to float
%11 = call i64 (...) @rand()
%12 = sitofp i64 %11 to float
%13 = fdiv float %12, 3.276800e+04
%14 = fmul float %10, %13
%15 = fptosi float %14 to i32
%16 = add nsw i32 %5, %15
ret i32 %16
}

LLVM IR (-O2):
define i32 @fRandInt(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = sitofp i32 %4 to float
%6 = tail call i64 (...) @rand()
%7 = sitofp i64 %6 to float
%8 = fmul float %7, 0x3F00000000000000
%9 = fmul float %8, %5
%10 = fptosi float %9 to i32
%11 = add nsw i32 %10, %0
ret i32 %11
}
int strindexof(char elem, const char *array, int size) {
  int i;
  for (i = 0; i < size; i++)
    if (elem == array[i])
      return i;
  return -1;
}


x86 assembly (clang, -O0):
<strindexof>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    115a <strindexof+0x5a>
movsbl -0x5(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x18(%rbp),%rdx
movsbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
jne    1147 <strindexof+0x47>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1161 <strindexof+0x61>
jmp    114c <strindexof+0x4c>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1118 <strindexof+0x18>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strindexof>:
mov    $0xffffffff,%eax
test   %edx,%edx
jle    111f <strindexof+0x1f>
mov    %edx,%edx
xor    %ecx,%ecx
nopl   (%rax)
cmp    %dil,(%rsi,%rcx,1)
je     1120 <strindexof+0x20>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1110 <strindexof+0x10>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @strindexof(i8 signext %0, i8* nocapture %1, i32 %2) {
%4 = icmp sgt i32 %2, 0
br i1 %4, label %5, label %17
5: ; preds = %3
%6 = zext i32 %2 to i64
br label %7
7: ; preds = %5, %12
%8 = phi i64 [ 0, %5 ], [ %13, %12 ]
%9 = getelementptr inbounds i8, i8* %1, i64 %8
%10 = load i8, i8* %9
%11 = icmp eq i8 %10, %0
br i1 %11, label %15, label %12
12: ; preds = %7
%13 = add nuw nsw i64 %8, 1
%14 = icmp eq i64 %13, %6
br i1 %14, label %17, label %7
15: ; preds = %7
%16 = trunc i64 %8 to i32
br label %17
17: ; preds = %12, %15, %3
%18 = phi i32 [ -1, %3 ], [ %16, %15 ], [ -1, %12 ]
ret i32 %18
}
void xenbus_backend_device_register(void) {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @TM07_intr() {
ret void
}
int f3(char *p, int c) { return (1); }


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

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

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

LLVM IR (-O2):
define i32 @f3(i8* nocapture readnone %0, i32 %1) {
ret i32 1
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

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


x86 assembly (clang, -O0):
<difftime>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
xorps  %xmm0,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<difftime>:
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @difftime(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
ret double 0.000000e+00
}

LLVM IR (-O2):
define double @difftime(i32 %0, i32 %1) {
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__37__IO__makeOutput();
void Msp430GpioC__1__HplGeneralIO__makeOutput(void) {
  HplMsp430GeneralIOP__37__IO__makeOutput();
}


x86 assembly (clang, -O0):
<Msp430GpioC__1__HplGeneralIO__makeOutput>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <HplMsp430GeneralIOP__37__IO__makeOutput@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Msp430GpioC__1__HplGeneralIO__makeOutput>:
xor    %eax,%eax
jmp    1030 <HplMsp430GeneralIOP__37__IO__makeOutput@plt>

LLVM IR (-O0):
define void @Msp430GpioC__1__HplGeneralIO__makeOutput() {
%1 = call i32 (...) @HplMsp430GeneralIOP__37__IO__makeOutput()
ret void
}

LLVM IR (-O2):
define void @Msp430GpioC__1__HplGeneralIO__makeOutput() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__37__IO__makeOutput()
ret void
}
unsigned char lower(unsigned char c) {
  if (c >= 'A' && c <= 'Z')
    return (c + 'a' - 'A');
  if (c >= 0340 && c <= 0377)
    return (c - 040);
  if (c == 0263)
    return (0243);
  return (c);
}


x86 assembly (clang, -O0):
<lower>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x2(%rbp)
movzbl -0x2(%rbp),%eax
cmp    $0x41,%eax
jl     1136 <lower+0x36>
movzbl -0x2(%rbp),%eax
cmp    $0x5a,%eax
jg     1136 <lower+0x36>
movzbl -0x2(%rbp),%eax
add    $0x61,%eax
sub    $0x41,%eax
mov    %al,-0x1(%rbp)
jmp    1181 <lower+0x81>
movzbl -0x2(%rbp),%eax
cmp    $0xe0,%eax
jl     1163 <lower+0x63>
movzbl -0x2(%rbp),%eax
cmp    $0xff,%eax
jg     1163 <lower+0x63>
movzbl -0x2(%rbp),%eax
sub    $0x20,%eax
mov    %al,-0x1(%rbp)
jmp    1181 <lower+0x81>
movzbl -0x2(%rbp),%eax
cmp    $0xb3,%eax
jne    117b <lower+0x7b>
movb   $0xa3,-0x1(%rbp)
jmp    1181 <lower+0x81>
mov    -0x2(%rbp),%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<lower>:
mov    %edi,%eax
lea    -0x41(%rax),%ecx
cmp    $0x19,%cl
ja     110d <lower+0xd>
add    $0x20,%al
ret
cmp    $0xe0,%al
jb     1114 <lower+0x14>
add    $0xe0,%al
ret
cmp    $0xb3,%al
movzbl %al,%ecx
mov    $0xa3,%eax
cmovne %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i8 @lower(i8 zeroext %0) {
%2 = alloca i8
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = zext i8 %4 to i32
%6 = icmp sge i32 %5, 65
br i1 %6, label %7, label %17
7: ; preds = %1
%8 = load i8, i8* %3
%9 = zext i8 %8 to i32
%10 = icmp sle i32 %9, 90
br i1 %10, label %11, label %17
11: ; preds = %7
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = add nsw i32 %13, 97
%15 = sub nsw i32 %14, 65
%16 = trunc i32 %15 to i8
store i8 %16, i8* %2
br label %37
17: ; preds = %7, %1
%18 = load i8, i8* %3
%19 = zext i8 %18 to i32
%20 = icmp sge i32 %19, 224
br i1 %20, label %21, label %30
21: ; preds = %17
%22 = load i8, i8* %3
%23 = zext i8 %22 to i32
%24 = icmp sle i32 %23, 255
br i1 %24, label %25, label %30
25: ; preds = %21
%26 = load i8, i8* %3
%27 = zext i8 %26 to i32
%28 = sub nsw i32 %27, 32
%29 = trunc i32 %28 to i8
store i8 %29, i8* %2
br label %37
30: ; preds = %21, %17
%31 = load i8, i8* %3
%32 = zext i8 %31 to i32
%33 = icmp eq i32 %32, 179
br i1 %33, label %34, label %35
34: ; preds = %30
store i8 -93, i8* %2
br label %37
35: ; preds = %30
%36 = load i8, i8* %3
store i8 %36, i8* %2
br label %37
37: ; preds = %35, %34, %25, %11
%38 = load i8, i8* %2
ret i8 %38
}

LLVM IR (-O2):
define zeroext i8 @lower(i8 zeroext %0) {
%2 = add i8 %0, -65
%3 = icmp ult i8 %2, 26
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = add nuw nsw i8 %0, 32
br label %13
6: ; preds = %1
%7 = icmp ugt i8 %0, -33
br i1 %7, label %8, label %10
8: ; preds = %6
%9 = add nsw i8 %0, -32
br label %13
10: ; preds = %6
%11 = icmp eq i8 %0, -77
%12 = select i1 %11, i8 -93, i8 %0
br label %13
13: ; preds = %10, %8, %4
%14 = phi i8 [ %5, %4 ], [ %9, %8 ], [ %12, %10 ]
ret i8 %14
}
/* Variables and functions */
int putchar(int);
int my_putchar(int c) {
  if (c == '\n')
    putchar('\r');
  return (putchar(c));
}


x86 assembly (clang, -O0):
<my_putchar>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jne    112f <my_putchar+0x1f>
mov    $0xd,%edi
call   1030 <putchar@plt>
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putchar>:
push   %rbx
mov    %edi,%ebx
cmp    $0xa,%edi
jne    1122 <my_putchar+0x12>
mov    $0xd,%edi
call   1030 <putchar@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1030 <putchar@plt>

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

LLVM IR (-O2):
define i32 @my_putchar(i32 %0) {
%2 = icmp eq i32 %0, 10
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 @putchar(i32 13)
br label %5
5: ; preds = %3, %1
%6 = tail call i32 @putchar(i32 %0)
ret i32 %6
}
int ands_si_test2(int a, int b, int c) {
  int d = a & 0xff;
  if (d == 0)
    return a + c;
  else
    return b + d + c;
}


x86 assembly (clang, -O0):
<ands_si_test2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%eax
and    $0xff,%eax
mov    %eax,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jne    1130 <ands_si_test2+0x30>
mov    -0x8(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    113c <ands_si_test2+0x3c>
mov    -0xc(%rbp),%eax
add    -0x14(%rbp),%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ands_si_test2>:
movzbl %dil,%ecx
lea    (%rsi,%rcx,1),%eax
test   %ecx,%ecx
cmove  %edi,%eax
add    %edx,%eax
ret

LLVM IR (-O0):
define i32 @ands_si_test2(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%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
%9 = load i32, i32* %5
%10 = and i32 %9, 255
store i32 %10, i32* %8
%11 = load i32, i32* %8
%12 = icmp eq i32 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %3
%14 = load i32, i32* %5
%15 = load i32, i32* %7
%16 = add nsw i32 %14, %15
store i32 %16, i32* %4
br label %23
17: ; preds = %3
%18 = load i32, i32* %6
%19 = load i32, i32* %8
%20 = add nsw i32 %18, %19
%21 = load i32, i32* %7
%22 = add nsw i32 %20, %21
store i32 %22, i32* %4
br label %23
23: ; preds = %17, %13
%24 = load i32, i32* %4
ret i32 %24
}

LLVM IR (-O2):
define i32 @ands_si_test2(i32 %0, i32 %1, i32 %2) {
%4 = and i32 %0, 255
%5 = icmp eq i32 %4, 0
%6 = add nsw i32 %4, %1
%7 = select i1 %5, i32 %0, i32 %6
%8 = add nsw i32 %7, %2
ret i32 %8
}
/* Variables and functions */
double exp(double);
double f(int k, int n) { return exp((double)k / n) - 1; }


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cvtsi2sdl -0x4(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
movsd  0xec7(%rip),%xmm1
subsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
push   %rax
cvtsi2sd %edi,%xmm0
cvtsi2sd %esi,%xmm1
divsd  %xmm1,%xmm0
call   1030 <exp@plt>
addsd  0xed6(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f(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 = sitofp i32 %5 to double
%7 = load i32, i32* %4
%8 = sitofp i32 %7 to double
%9 = fdiv double %6, %8
%10 = call double @exp(double %9)
%11 = fsub double %10, 1.000000e+00
ret double %11
}

LLVM IR (-O2):
define double @f(i32 %0, i32 %1) {
%3 = sitofp i32 %0 to double
%4 = sitofp i32 %1 to double
%5 = fdiv double %3, %4
%6 = tail call double @exp(double %5)
%7 = fadd double %6, -1.000000e+00
ret double %7
}
/* Variables and functions */
scalar_t__ abs(int);
char intto6bitsigned(int x) {
  char ax5 = ((char)abs(x)) & 0x1f;
  if (x < 0) {
    return ((ax5 ^ 0x3f) + 1);
  } else {
    return (ax5);
  }
}


x86 assembly (clang, -O0):
<intto6bitsigned>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <abs@plt>
movsbl %al,%eax
and    $0x1f,%eax
mov    %al,-0x9(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    1148 <intto6bitsigned+0x38>
movsbl -0x9(%rbp),%eax
xor    $0x3f,%eax
add    $0x1,%eax
mov    %al,-0x1(%rbp)
jmp    114e <intto6bitsigned+0x3e>
mov    -0x9(%rbp),%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<intto6bitsigned>:
push   %rbx
mov    %edi,%ebx
call   1030 <abs@plt>
and    $0x1f,%al
mov    $0x40,%cl
sub    %al,%cl
test   %ebx,%ebx
movzbl %cl,%ecx
movzbl %al,%eax
cmovs  %ecx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define signext i8 @intto6bitsigned(i32 %0) {
%2 = alloca i8
%3 = alloca i32
%4 = alloca i8
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i64 @abs(i32 %5)
%7 = trunc i64 %6 to i8
%8 = sext i8 %7 to i32
%9 = and i32 %8, 31
%10 = trunc i32 %9 to i8
store i8 %10, i8* %4
%11 = load i32, i32* %3
%12 = icmp slt i32 %11, 0
br i1 %12, label %13, label %19
13: ; preds = %1
%14 = load i8, i8* %4
%15 = sext i8 %14 to i32
%16 = xor i32 %15, 63
%17 = add nsw i32 %16, 1
%18 = trunc i32 %17 to i8
store i8 %18, i8* %2
br label %21
19: ; preds = %1
%20 = load i8, i8* %4
store i8 %20, i8* %2
br label %21
21: ; preds = %19, %13
%22 = load i8, i8* %2
ret i8 %22
}

LLVM IR (-O2):
define signext i8 @intto6bitsigned(i32 %0) {
%2 = tail call i64 @abs(i32 %0)
%3 = trunc i64 %2 to i8
%4 = and i8 %3, 31
%5 = icmp slt i32 %0, 0
%6 = sub nuw nsw i8 64, %4
%7 = select i1 %5, i8 %6, i8 %4
ret i8 %7
}
/* Variables and functions */
int ap_cmd_set_int(int, int, int);
int ap_set_playlist_looping(int session, int looping) {
  return (ap_cmd_set_int(session, 0xcc2e, looping));
}


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

x86 assembly (clang, -O2):
<ap_set_playlist_looping>:
mov    %esi,%edx
mov    $0xcc2e,%esi
jmp    1030 <ap_cmd_set_int@plt>

LLVM IR (-O0):
define i32 @ap_set_playlist_looping(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 @ap_cmd_set_int(i32 %5, i32 52270, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @ap_set_playlist_looping(i32 %0, i32 %1) {
%3 = tail call i32 @ap_cmd_set_int(i32 %0, i32 52270, i32 %1)
ret i32 %3
}
void RTTcpClientConnect(void) {}


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

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

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

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

/* Variables and functions */
int /*<<< orphan*/ getcwd(char *, int);
int /*<<< orphan*/ printf(char *, ...);
void builtin_pwd(char *c_argv[], int c_argc) {
  if (c_argc != 0) {
    printf("usage: pwd\n");
  } else {
    char cwd[256];
    getcwd(cwd, sizeof(cwd));
    printf("%s\n", cwd);
  }
}


x86 assembly (clang, -O0):
<builtin_pwd>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     114f <builtin_pwd+0x2f>
lea    0xebd(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1175 <builtin_pwd+0x55>
lea    -0x110(%rbp),%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
lea    -0x110(%rbp),%rsi
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<builtin_pwd>:
test   %esi,%esi
je     1130 <builtin_pwd+0x10>
lea    0xed5(%rip),%rdi
jmp    1030 <puts@plt>
push   %rbx
sub    $0x100,%rsp
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x100,%esi
call   1040 <getcwd@plt>
mov    %rbx,%rdi
call   1030 <puts@plt>
add    $0x100,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [12 x i8] c"usage: pwd\0A\00"
@.str.1 = [4 x i8] c"%s\0A\00"
define void @builtin_pwd(i8** %0, i32 %1) {
%3 = alloca i8**
%4 = alloca i32
%5 = alloca [256 x i8]
store i8** %0, i8*** %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
br label %15
10: ; preds = %2
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%12 = call i32 @getcwd(i8* %11, i32 256)
%13 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i8* %13)
br label %15
15: ; preds = %10, %8
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"usage: pwd\00"
define void @builtin_pwd(i8** nocapture readnone %0, i32 %1) {
%3 = alloca [256 x i8]
%4 = icmp eq i32 %1, 0
br i1 %4, label %7, label %5
5: ; preds = %2
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
br label %11
7: ; preds = %2
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%9 = call i32 @getcwd(i8* %8, i32 256)
%10 = call i32 @puts(i8* %8)
br label %11
11: ; preds = %7, %5
ret void
}
/* Variables and functions */
int powMy(int, int);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int number;
  int pow2, pow3;
  scanf("%d", &number);
  pow2 = powMy(number, 2);
  pow3 = powMy(number, 3);
  printf("%d\n%d", pow2, pow3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xebd(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1050 <scanf@plt>
mov    -0x8(%rbp),%edi
mov    $0x2,%esi
call   1040 <powMy@plt>
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%edi
mov    $0x3,%esi
call   1040 <powMy@plt>
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
lea    0xe84(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
lea    0xec7(%rip),%rdi
lea    0xc(%rsp),%rsi
call   1050 <scanf@plt>
mov    0xc(%rsp),%edi
mov    $0x2,%esi
call   1040 <powMy@plt>
mov    %eax,%ebx
mov    0xc(%rsp),%edi
mov    $0x3,%esi
call   1040 <powMy@plt>
lea    0xe95(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
@.str.1 = [6 x i8] c"%d\0A%d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @powMy(i32 %4, i32 2)
%6 = load i32, i32* %1
%7 = call i32 @powMy(i32 %6, i32 3)
%8 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 %5, i32 %7)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ LOG_ERR;
int /*<<< orphan*/ errno;
int /*<<< orphan*/ report(int /*<<< orphan*/, char *, char const *,
                          int /*<<< orphan*/);
int /*<<< orphan*/ strerror(int /*<<< orphan*/);
void log_chdir(const char *newroot) {
  report(LOG_ERR, "chdir(\"/\") error after chroot to %s: %s", newroot,
         strerror(errno));
}


x86 assembly (clang, -O0):
<log_chdir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2e9d(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
mov    -0x14(%rbp),%edi
mov    -0x10(%rbp),%rdx
mov    %eax,%ecx
lea    0xea2(%rip),%rsi
call   1030 <report@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_chdir>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea3(%rip),%rax
mov    (%rax),%ebp
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
call   1040 <strerror@plt>
lea    0xebc(%rip),%rsi
mov    %ebp,%edi
mov    %rbx,%rdx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <report@plt>

LLVM IR (-O0):
@LOG_ERR = global i32 0
@.str = [40 x i8] c"chdir(\22/\22) error after chroot to %s: %s\00"
@errno = global i32 0
define void @log_chdir(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @LOG_ERR
%4 = load i8*, i8** %2
%5 = load i32, i32* @errno
%6 = call i32 @strerror(i32 %5)
%7 = call i32 @report(i32 %3, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %6)
ret void
}

LLVM IR (-O2):
@LOG_ERR = global i32 0
@.str = [40 x i8] c"chdir(\22/\22) error after chroot to %s: %s\00"
@errno = global i32 0
define void @log_chdir(i8* %0) {
%2 = load i32, i32* @LOG_ERR
%3 = load i32, i32* @errno
%4 = tail call i32 @strerror(i32 %3)
%5 = tail call i32 @report(i32 %2, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_quaddobl_Laurent_size_limit(int k, int *szl) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(606, &k, szl, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_quaddobl_Laurent_size_limit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x25e,%edi
lea    -0x4(%rbp),%rsi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_quaddobl_Laurent_size_limit>:
push   %rax
mov    %rsi,%rdx
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x25e,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

LLVM IR (-O0):
define i32 @syscon_quaddobl_Laurent_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
%4 = alloca i32*
%5 = alloca i32
%6 = alloca double*
store i32 %0, i32* %3
store i32* %1, i32** %4
%7 = load i32*, i32** %4
%8 = load double*, double** %6
%9 = call i32 @_ada_use_c2phc(i32 606, i32* %3, i32* %7, double* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %5
ret i32 %10
}

LLVM IR (-O2):
define i32 @syscon_quaddobl_Laurent_size_limit(i32 %0, i32* %1) {
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 @_ada_use_c2phc(i32 606, i32* %3, i32* %1, double* undef)
ret i32 %4
}
void GPMCECCColumnSelect(unsigned int baseAddr, unsigned int eccColVal) {
  (*((volatile unsigned int *)(baseAddr + (0x1F4)))) &= ~(0x00000080u);
  (*((volatile unsigned int *)(baseAddr + (0x1F4)))) |=
      ((eccColVal << (0x00000007u)) & (0x00000080u));
}


x86 assembly (clang, -O0):
<GPMCECCColumnSelect>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1f4,%eax
mov    %eax,%eax
mov    (%rax),%ecx
and    $0xffffff7f,%ecx
mov    %ecx,(%rax)
mov    -0x8(%rbp),%edx
shl    $0x7,%edx
and    $0x80,%edx
mov    -0x4(%rbp),%eax
add    $0x1f4,%eax
mov    %eax,%eax
mov    (%rax),%ecx
or     %edx,%ecx
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<GPMCECCColumnSelect>:
add    $0x1f4,%edi
andl   $0xffffff7f,(%rdi)
shl    $0x7,%esi
movzbl %sil,%eax
or     %eax,(%rdi)
ret

LLVM IR (-O0):
define void @GPMCECCColumnSelect(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 = add i32 %5, 500
%7 = zext i32 %6 to i64
%8 = inttoptr i64 %7 to i32*
%9 = load volatile i32, i32* %8
%10 = and i32 %9, -129
store volatile i32 %10, i32* %8
%11 = load i32, i32* %4
%12 = shl i32 %11, 7
%13 = and i32 %12, 128
%14 = load i32, i32* %3
%15 = add i32 %14, 500
%16 = zext i32 %15 to i64
%17 = inttoptr i64 %16 to i32*
%18 = load volatile i32, i32* %17
%19 = or i32 %18, %13
store volatile i32 %19, i32* %17
ret void
}

LLVM IR (-O2):
define void @GPMCECCColumnSelect(i32 %0, i32 %1) {
%3 = add i32 %0, 500
%4 = zext i32 %3 to i64
%5 = inttoptr i64 %4 to i32*
%6 = load volatile i32, i32* %5
%7 = and i32 %6, -129
store volatile i32 %7, i32* %5
%8 = shl i32 %1, 7
%9 = and i32 %8, 128
%10 = load volatile i32, i32* %5
%11 = or i32 %10, %9
store volatile i32 %11, i32* %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void mozhi_unicodefree(void *ptr) { free((char *)ptr); }


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

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

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

LLVM IR (-O2):
define void @mozhi_unicodefree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
_Bool f_scalar_0(_Bool x) { return x; }


x86 assembly (clang, -O0):
<f_scalar_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
and    $0x1,%al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define zeroext i1 @f_scalar_0(i1 zeroext %0) {
%2 = alloca i8
%3 = zext i1 %0 to i8
store i8 %3, i8* %2
%4 = load i8, i8* %2
%5 = trunc i8 %4 to i1
ret i1 %5
}

LLVM IR (-O2):
define zeroext i1 @f_scalar_0(i1 returned zeroext %0) {
ret i1 %0
}
/* Variables and functions */
int get_data_int();
int /*<<< orphan*/ send_int_to_srv(int);
int get_avg_bitrate() {
  send_int_to_srv(0x33);
  return get_data_int();
}


x86 assembly (clang, -O0):
<get_avg_bitrate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x33,%edi
call   1030 <send_int_to_srv@plt>
mov    $0x0,%al
call   1040 <get_data_int@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_avg_bitrate>:
push   %rax
mov    $0x33,%edi
call   1030 <send_int_to_srv@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <get_data_int@plt>

LLVM IR (-O0):
define i32 @get_avg_bitrate() {
%1 = call i32 @send_int_to_srv(i32 51)
%2 = call i32 (...) @get_data_int()
ret i32 %2
}

LLVM IR (-O2):
define i32 @get_avg_bitrate() {
%1 = tail call i32 @send_int_to_srv(i32 51)
%2 = tail call i32 (...) @get_data_int()
ret i32 %2
}
/* Variables and functions */
double exp(double);
double tzircZr(const double M, const double T) {
  double Zrsat = 496000.0 / exp(10108.0 / (T + 273.15) - 1.16 * (M - 1) - 1.48);
  return Zrsat;
}


x86 assembly (clang, -O0):
<tzircZr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  0xefe(%rip),%xmm0
addsd  -0x10(%rbp),%xmm0
movsd  0xee9(%rip),%xmm1
divsd  %xmm0,%xmm1
movsd  -0x8(%rbp),%xmm0
movsd  0xed0(%rip),%xmm2
subsd  %xmm2,%xmm0
movsd  0xebc(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  0xea4(%rip),%xmm1
subsd  %xmm1,%xmm0
call   1030 <exp@plt>
movaps %xmm0,%xmm1
movsd  0xe88(%rip),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tzircZr>:
push   %rax
addsd  0xee7(%rip),%xmm1
movsd  0xee7(%rip),%xmm2
addsd  0xee7(%rip),%xmm0
mulsd  0xee7(%rip),%xmm0
divsd  %xmm1,%xmm2
addsd  %xmm2,%xmm0
addsd  0xedf(%rip),%xmm0
call   1030 <exp@plt>
movsd  0xeda(%rip),%xmm1
divsd  %xmm0,%xmm1
movapd %xmm1,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @tzircZr(double %0, double %1) {
%3 = alloca double
%4 = alloca double
%5 = alloca double
store double %0, double* %3
store double %1, double* %4
%6 = load double, double* %4
%7 = fadd double %6, 2.731500e+02
%8 = fdiv double 1.010800e+04, %7
%9 = load double, double* %3
%10 = fsub double %9, 1.000000e+00
%11 = call double @llvm.fmuladd.f64(double -1.160000e+00, double %10, double %8)
%12 = fsub double %11, 1.480000e+00
%13 = call double @exp(double %12)
%14 = fdiv double 4.960000e+05, %13
store double %14, double* %5
%15 = load double, double* %5
ret double %15
}

LLVM IR (-O2):
define double @tzircZr(double %0, double %1) {
%3 = fadd double %1, 2.731500e+02
%4 = fdiv double 1.010800e+04, %3
%5 = fadd double %0, -1.000000e+00
%6 = tail call double @llvm.fmuladd.f64(double %5, double -1.160000e+00, double %4)
%7 = fadd double %6, -1.480000e+00
%8 = tail call double @exp(double %7)
%9 = fdiv double 4.960000e+05, %8
ret double %9
}
void CheckNetConn(void) {}


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

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

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

LLVM IR (-O2):
define void @CheckNetConn() {
ret void
}
/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
uint32_t next_boundary(const uint32_t location, const uint32_t block_size) {
  return (location + (block_size - 1)) & ~(block_size - 1);
}


x86 assembly (clang, -O0):
<next_boundary>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
add    %ecx,%eax
mov    -0x8(%rbp),%ecx
sub    $0x1,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<next_boundary>:
lea    (%rdi,%rsi,1),%eax
add    $0xffffffff,%eax
neg    %esi
and    %esi,%eax
ret

LLVM IR (-O0):
define i32 @next_boundary(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 = sub nsw i32 %6, 1
%8 = add nsw i32 %5, %7
%9 = load i32, i32* %4
%10 = sub nsw i32 %9, 1
%11 = xor i32 %10, -1
%12 = and i32 %8, %11
ret i32 %12
}

LLVM IR (-O2):
define i32 @next_boundary(i32 %0, i32 %1) {
%3 = add i32 %0, -1
%4 = add i32 %3, %1
%5 = sub i32 0, %1
%6 = and i32 %4, %5
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ gui_delete_message();
int /*<<< orphan*/ gui_draw_message(char *);
int gui_wait_for_key(char *);
int gui_option(char *msg, char *options) {
  int c;
  gui_draw_message(msg);
  c = gui_wait_for_key(options);
  gui_delete_message();
  return c;
}


x86 assembly (clang, -O0):
<gui_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <gui_draw_message@plt>
mov    -0x10(%rbp),%rdi
call   1040 <gui_wait_for_key@plt>
mov    %eax,-0x14(%rbp)
mov    $0x0,%al
call   1050 <gui_delete_message@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gui_option>:
push   %rbx
mov    %rsi,%rbx
call   1030 <gui_draw_message@plt>
mov    %rbx,%rdi
call   1040 <gui_wait_for_key@plt>
mov    %eax,%ebx
xor    %eax,%eax
call   1050 <gui_delete_message@plt>
mov    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @gui_option(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = load i8*, i8** %3
%7 = call i32 @gui_draw_message(i8* %6)
%8 = load i8*, i8** %4
%9 = call i32 @gui_wait_for_key(i8* %8)
store i32 %9, i32* %5
%10 = call i32 (...) @gui_delete_message()
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
define i32 @gui_option(i8* %0, i8* %1) {
%3 = tail call i32 @gui_draw_message(i8* %0)
%4 = tail call i32 @gui_wait_for_key(i8* %1)
%5 = tail call i32 (...) @gui_delete_message()
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ini_getdouble_port(double *, char *, char *);
double ini_getdouble_port_def(char *port, char *param, double def) {
  double value;
  if (!ini_getdouble_port(&value, port, param))
    return def;
  return value;
}


x86 assembly (clang, -O0):
<ini_getdouble_port_def>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  %xmm0,-0x20(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0x28(%rbp),%rdi
call   1030 <ini_getdouble_port@plt>
cmp    $0x0,%eax
jne    114e <ini_getdouble_port_def+0x3e>
movsd  -0x20(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1158 <ini_getdouble_port_def+0x48>
movsd  -0x28(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ini_getdouble_port_def>:
sub    $0x18,%rsp
movsd  %xmm0,0x8(%rsp)
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0x10(%rsp),%rdi
call   1030 <ini_getdouble_port@plt>
movsd  0x8(%rsp),%xmm0
test   %eax,%eax
je     113a <ini_getdouble_port_def+0x2a>
movsd  0x10(%rsp),%xmm0
add    $0x18,%rsp
ret

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

LLVM IR (-O2):
define double @ini_getdouble_port_def(i8* %0, i8* %1, double %2) {
%4 = alloca double
%5 = bitcast double* %4 to i8*
%6 = call i32 @ini_getdouble_port(double* %4, i8* %0, i8* %1)
%7 = icmp eq i32 %6, 0
%8 = load double, double* %4
%9 = select i1 %7, double %2, double %8
ret double %9
}
/* Variables and functions */
int munmap(void *__addr, size_t __len) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @munmap(i8* nocapture readnone %0, i64 %1) {
ret i32 -1
}
int fi3(int j, short *b, int i) { return j + b[i]; }


x86 assembly (clang, -O0):
<fi3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
movswl (%rcx,%rdx,2),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fi3>:
movslq %edx,%rax
movswl (%rsi,%rax,2),%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @fi3(i32 %0, i16* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i16*
%6 = alloca i32
store i32 %0, i32* %4
store i16* %1, i16** %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i16*, i16** %5
%9 = load i32, i32* %6
%10 = sext i32 %9 to i64
%11 = getelementptr inbounds i16, i16* %8, i64 %10
%12 = load i16, i16* %11
%13 = sext i16 %12 to i32
%14 = add nsw i32 %7, %13
ret i32 %14
}

LLVM IR (-O2):
define i32 @fi3(i32 %0, i16* nocapture %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i16, i16* %1, i64 %4
%6 = load i16, i16* %5
%7 = sext i16 %6 to i32
%8 = add nsw i32 %7, %0
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int fn1(char *);
int main(void) {
  char p[] = "barfoo";
  if (fn1(p) != 4)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xecb(%rip),%eax
mov    %eax,-0xb(%rbp)
mov    0xec5(%rip),%ax
mov    %ax,-0x7(%rbp)
mov    0xebd(%rip),%al
mov    %al,-0x5(%rbp)
lea    -0xb(%rbp),%rdi
call   1040 <fn1@plt>
cmp    $0x4,%eax
je     1165 <main+0x45>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x6f6f66,0x3(%rsp)
movl   $0x66726162,(%rsp)
mov    %rsp,%rdi
call   1040 <fn1@plt>
cmp    $0x4,%eax
jne    1141 <main+0x21>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@__const.main.p = [7 x i8] c"barfoo\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [7 x i8]
store i32 0, i32* %1
%3 = bitcast [7 x i8]* %2 to i8*
%4 = getelementptr inbounds [7 x i8], [7 x i8]* %2, i64 0, i64 0
%5 = call i32 @fn1(i8* %4)
%6 = icmp ne i32 %5, 4
br i1 %6, label %7, label %9
7: ; preds = %0
%8 = call i32 (...) @abort()
unreachable
9: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
@__const.main.p = [7 x i8] c"barfoo\00"
define i32 @main() {
%1 = alloca [7 x i8]
%2 = getelementptr inbounds [7 x i8], [7 x i8]* %1, i64 0, i64 0
%3 = call i32 @fn1(i8* %2)
%4 = icmp eq i32 %3, 4
br i1 %4, label %7, label %5
5: ; preds = %0
%6 = call i32 (...) @abort()
unreachable
7: ; preds = %0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ __fputc(int, int /*<<< orphan*/);
int ser_out(int c) {
  __fputc(c, 0);
  if (c == '\n')
    ser_out('\r');
  return 0;
}


x86 assembly (clang, -O0):
<ser_out>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
xor    %esi,%esi
call   1030 <__fputc@plt>
cmpl   $0xa,-0x4(%rbp)
jne    1149 <ser_out+0x29>
mov    $0xd,%edi
call   1040 <ser_out@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ser_out>:
push   %rbx
mov    %edi,%ebx
xor    %esi,%esi
call   1030 <__fputc@plt>
cmp    $0xa,%ebx
jne    112b <ser_out+0x1b>
mov    $0xd,%edi
xor    %esi,%esi
call   1030 <__fputc@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @ser_out(i32 %0) {
%2 = tail call i32 @__fputc(i32 %0, i32 0)
%3 = icmp eq i32 %0, 10
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @__fputc(i32 13, i32 0)
br label %6
6: ; preds = %4, %1
ret i32 0
}