xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ clrtoeol();
int /*<<< orphan*/ endwin();
int /*<<< orphan*/ refresh();
void endNCWindow() {
  clrtoeol();
  refresh();
  endwin();
}


x86 assembly (clang, -O0):
<endNCWindow>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1050 <clrtoeol@plt>
mov    $0x0,%al
call   1030 <refresh@plt>
mov    $0x0,%al
call   1040 <endwin@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<endNCWindow>:
push   %rax
xor    %eax,%eax
call   1050 <clrtoeol@plt>
xor    %eax,%eax
call   1030 <refresh@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <endwin@plt>

LLVM IR (-O0):
define void @endNCWindow() {
%1 = call i32 (...) @clrtoeol()
%2 = call i32 (...) @refresh()
%3 = call i32 (...) @endwin()
ret void
}

LLVM IR (-O2):
define void @endNCWindow() {
%1 = tail call i32 (...) @clrtoeol()
%2 = tail call i32 (...) @refresh()
%3 = tail call i32 (...) @endwin()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DEBUG_ASSERT(int);
void FanChannelConfigAuto(unsigned long ulBase, unsigned long ulChannel,
                          unsigned long ulConfig) {
  DEBUG_ASSERT(ulBase == 0x40084000);
  DEBUG_ASSERT(ulChannel < 6);
  (*((volatile unsigned long *)(ulBase + 0x00000010 + (ulChannel * 0x10)))) =
      ~0x00000001 & ulConfig;
}


x86 assembly (clang, -O0):
<FanChannelConfigAuto>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpq   $0x40084000,-0x8(%rbp)
40
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
cmpq   $0x6,-0x10(%rbp)
setb   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <DEBUG_ASSERT@plt>
mov    -0x18(%rbp),%rcx
and    $0xfffffffffffffffe,%rcx
mov    -0x8(%rbp),%rax
add    $0x10,%rax
mov    -0x10(%rbp),%rdx
shl    $0x4,%rdx
add    %rdx,%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FanChannelConfigAuto>:
push   %r15
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
xor    %edi,%edi
cmp    $0x40084000,%r15
sete   %dil
call   1030 <DEBUG_ASSERT@plt>
xor    %edi,%edi
cmp    $0x6,%rbx
setb   %dil
call   1030 <DEBUG_ASSERT@plt>
and    $0xfffffffffffffffe,%r14
shl    $0x4,%rbx
mov    %r14,0x10(%r15,%rbx,1)
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @FanChannelConfigAuto(i64 %0, i64 %1, i64 %2) {
%4 = alloca i64
%5 = alloca i64
%6 = alloca i64
store i64 %0, i64* %4
store i64 %1, i64* %5
store i64 %2, i64* %6
%7 = load i64, i64* %4
%8 = icmp eq i64 %7, 1074282496
%9 = zext i1 %8 to i32
%10 = call i32 @DEBUG_ASSERT(i32 %9)
%11 = load i64, i64* %5
%12 = icmp ult i64 %11, 6
%13 = zext i1 %12 to i32
%14 = call i32 @DEBUG_ASSERT(i32 %13)
%15 = load i64, i64* %6
%16 = and i64 -2, %15
%17 = load i64, i64* %4
%18 = add i64 %17, 16
%19 = load i64, i64* %5
%20 = mul i64 %19, 16
%21 = add i64 %18, %20
%22 = inttoptr i64 %21 to i64*
store volatile i64 %16, i64* %22
ret void
}

LLVM IR (-O2):
define void @FanChannelConfigAuto(i64 %0, i64 %1, i64 %2) {
%4 = icmp eq i64 %0, 1074282496
%5 = zext i1 %4 to i32
%6 = tail call i32 @DEBUG_ASSERT(i32 %5)
%7 = icmp ult i64 %1, 6
%8 = zext i1 %7 to i32
%9 = tail call i32 @DEBUG_ASSERT(i32 %8)
%10 = and i64 %2, -2
%11 = add i64 %0, 16
%12 = shl i64 %1, 4
%13 = add i64 %11, %12
%14 = inttoptr i64 %13 to i64*
store volatile i64 %10, i64* %14
ret void
}
/* Variables and functions */
int genrand(int);
int *gencoords(void) {
  static int ret[2];
  ret[0] = genrand(256);
  ret[1] = genrand(450);
  return ret;
}


x86 assembly (clang, -O0):
<gencoords>:
push   %rbp
mov    %rsp,%rbp
mov    $0x100,%edi
call   1030 <genrand@plt>
mov    %eax,0x2f08(%rip)
mov    $0x1c2,%edi
call   1030 <genrand@plt>
mov    %eax,0x2efc(%rip)
lea    0x2ef1(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gencoords>:
push   %rbx
mov    $0x100,%edi
call   1030 <genrand@plt>
mov    %eax,0x2f0b(%rip)
lea    0x2f04(%rip),%rbx
mov    $0x1c2,%edi
call   1030 <genrand@plt>
mov    %eax,0x2ef8(%rip)
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@gencoords.ret = internal global [2 x i32] zeroinitializer
define i32* @gencoords() {
%1 = call i32 @genrand(i32 256)
store i32 %1, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @gencoords.ret, i64 0, i64 0)
%2 = call i32 @genrand(i32 450)
store i32 %2, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @gencoords.ret, i64 0, i64 1)
ret i32* getelementptr inbounds ([2 x i32], [2 x i32]* @gencoords.ret, i64 0, i64 0)
}

LLVM IR (-O2):
@gencoords.ret = internal global [2 x i32] zeroinitializer
define i32* @gencoords() {
%1 = tail call i32 @genrand(i32 256)
store i32 %1, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @gencoords.ret, i64 0, i64 0)
%2 = tail call i32 @genrand(i32 450)
store i32 %2, i32* getelementptr inbounds ([2 x i32], [2 x i32]* @gencoords.ret, i64 0, i64 1)
ret i32* getelementptr inbounds ([2 x i32], [2 x i32]* @gencoords.ret, i64 0, i64 0)
}
long compareKeysDefault(const void *a, const void *b) {
  return ((long)a - (long)b);
}


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

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

LLVM IR (-O0):
define i64 @compareKeysDefault(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %3
%6 = ptrtoint i8* %5 to i64
%7 = load i8*, i8** %4
%8 = ptrtoint i8* %7 to i64
%9 = sub nsw i64 %6, %8
ret i64 %9
}

LLVM IR (-O2):
define i64 @compareKeysDefault(i8* %0, i8* %1) {
%3 = ptrtoint i8* %0 to i64
%4 = ptrtoint i8* %1 to i64
%5 = sub nsw i64 %3, %4
ret i64 %5
}
void OnExit(int State) {}


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

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

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

LLVM IR (-O2):
define void @OnExit(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ EventSync();
void mps_telemetry_flush(void) { EventSync(); }


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

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

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

LLVM IR (-O2):
define void @mps_telemetry_flush() {
%1 = tail call i32 (...) @EventSync()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *);
void om_html_print_footer(FILE *fp) { fprintf(fp, "</table></body></html>\n"); }


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

x86 assembly (clang, -O2):
<om_html_print_footer>:
mov    %rdi,%rcx
lea    0xee6(%rip),%rdi
mov    $0x17,%esi
mov    $0x1,%edx
jmp    1030 <fwrite@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"</table></body></html>\0A\00"
define void @om_html_print_footer(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = call i32 @fprintf(i32* %3, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"</table></body></html>\0A\00"
define void @om_html_print_footer(i32* nocapture %0) {
%2 = tail call i64 @fwrite(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0), i64 23, i64 1, i32* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ gets(char *);
int /*<<< orphan*/ printf(char *);
void make_note() {
  char note[40];
  printf("Make a Note About your listing...: ");
  gets(note);
}


x86 assembly (clang, -O0):
<make_note>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    -0x30(%rbp),%rdi
call   1040 <gets@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_note>:
sub    $0x28,%rsp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rsp,%rdi
call   1040 <gets@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
@.str = [36 x i8] c"Make a Note About your listing...: \00"
define void @make_note() {
%1 = alloca [40 x i8]
%2 = call i32 @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%3 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%4 = call i32 @gets(i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [36 x i8] c"Make a Note About your listing...: \00"
define void @make_note() {
%1 = alloca [40 x i8]
%2 = getelementptr inbounds [40 x i8], [40 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @gets(i8* %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ DeinitFields();
void SwitchFrom_ST9(void) { DeinitFields(); }


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

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

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

LLVM IR (-O2):
define void @SwitchFrom_ST9() {
%1 = tail call i32 (...) @DeinitFields()
ret void
}
/* Type definitions */
typedef scalar_t__ GLubyte;
typedef double GLdouble;

/* Variables and functions */
int /*<<< orphan*/ assert(int);
void shoveUbyte(GLdouble value, int index, void *data) {
  assert(0.0 <= value && value < 256.0);
  ((GLubyte *)data)[index] = (GLubyte)value;
}


x86 assembly (clang, -O0):
<shoveUbyte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
xor    %eax,%eax
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
mov    %al,-0x19(%rbp)
jb     114e <shoveUbyte+0x3e>
movsd  0xebd(%rip),%xmm0
ucomisd -0x8(%rbp),%xmm0
seta   %al
mov    %al,-0x19(%rbp)
mov    -0x19(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cvttsd2si -0x8(%rbp),%rdx
mov    -0x18(%rbp),%rax
movslq -0xc(%rbp),%rcx
mov    %rdx,(%rax,%rcx,8)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<shoveUbyte>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
movsd  %xmm0,(%rsp)
xorpd  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
setae  %al
movsd  0xed0(%rip),%xmm1
ucomisd %xmm0,%xmm1
seta   %cl
and    %al,%cl
movzbl %cl,%edi
call   1030 <assert@plt>
cvttsd2si (%rsp),%rax
movslq %ebp,%rcx
mov    %rax,(%rbx,%rcx,8)
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define void @shoveUbyte(double %0, i32 %1, i8* %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i8*
store double %0, double* %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load double, double* %4
%8 = fcmp ole double 0.000000e+00, %7
br i1 %8, label %9, label %12
9: ; preds = %3
%10 = load double, double* %4
%11 = fcmp olt double %10, 2.560000e+02
br label %12
12: ; preds = %9, %3
%13 = phi i1 [ false, %3 ], [ %11, %9 ]
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = load double, double* %4
%17 = fptosi double %16 to i64
%18 = load i8*, i8** %6
%19 = bitcast i8* %18 to i64*
%20 = load i32, i32* %5
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds i64, i64* %19, i64 %21
store i64 %17, i64* %22
ret void
}

LLVM IR (-O2):
define void @shoveUbyte(double %0, i32 %1, i8* nocapture writeonly %2) {
%4 = fcmp oge double %0, 0.000000e+00
%5 = fcmp olt double %0, 2.560000e+02
%6 = and i1 %4, %5
%7 = zext i1 %6 to i32
%8 = tail call i32 @assert(i32 %7)
%9 = fptosi double %0 to i64
%10 = bitcast i8* %2 to i64*
%11 = sext i32 %1 to i64
%12 = getelementptr inbounds i64, i64* %10, i64 %11
store i64 %9, i64* %12
ret void
}
/* Variables and functions */
char req_swa_char(char *, char const *, char const *, char const *);
char switch_on(const char *hostname, const char *session_id, const char *ain) {
  return req_swa_char("setswitchon", hostname, session_id, ain);
}


x86 assembly (clang, -O0):
<switch_on>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
lea    0xec9(%rip),%rdi
call   1030 <req_swa_char@plt>
movsbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<switch_on>:
mov    %rdx,%rcx
mov    %rsi,%rdx
mov    %rdi,%rsi
lea    0xee0(%rip),%rdi
jmp    1030 <req_swa_char@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"setswitchon\00"
define signext i8 @switch_on(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %4
%8 = load i8*, i8** %5
%9 = load i8*, i8** %6
%10 = call signext i8 @req_swa_char(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %7, i8* %8, i8* %9)
ret i8 %10
}

LLVM IR (-O2):
@.str = [12 x i8] c"setswitchon\00"
define signext i8 @switch_on(i8* %0, i8* %1, i8* %2) {
%4 = tail call signext i8 @req_swa_char(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1, i8* %2)
ret i8 %4
}
double fmax(double x, double y) {
  if (x > y) {
    return x;
  }
  return y;
}


x86 assembly (clang, -O0):
<fmax>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  -0x10(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    112d <fmax+0x2d>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1137 <fmax+0x37>
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

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

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

LLVM IR (-O2):
define double @fmax(double %0, double %1) {
%3 = fcmp ogt double %0, %1
%4 = select i1 %3, double %0, double %1
ret double %4
}
int entity_func1(void) { return 5; }


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

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

LLVM IR (-O0):
define i32 @entity_func1() {
ret i32 5
}

LLVM IR (-O2):
define i32 @entity_func1() {
ret i32 5
}
main() {
  double lX;
  double lY;
  double dX;
  double dY;
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca double
%2 = alloca double
%3 = alloca double
%4 = alloca double
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
islword(c) {
  return ((040 < c && c < 0177 && c != '(' && c != ')' && c != ';' &&
           c != '"' && c != '\\')
              ? 1
              : 0);
}


x86 assembly (clang, -O0):
<islword>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
xor    %eax,%eax
mov    $0x20,%ecx
cmp    -0x4(%rbp),%ecx
mov    %al,-0x5(%rbp)
jge    116f <islword+0x6f>
xor    %eax,%eax
cmpl   $0x7f,-0x4(%rbp)
mov    %al,-0x5(%rbp)
jge    116f <islword+0x6f>
xor    %eax,%eax
cmpl   $0x28,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116f <islword+0x6f>
xor    %eax,%eax
cmpl   $0x29,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116f <islword+0x6f>
xor    %eax,%eax
cmpl   $0x3b,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116f <islword+0x6f>
xor    %eax,%eax
cmpl   $0x22,-0x4(%rbp)
mov    %al,-0x5(%rbp)
je     116f <islword+0x6f>
cmpl   $0x5c,-0x4(%rbp)
setne  %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%dl
xor    %eax,%eax
mov    $0x1,%ecx
test   $0x1,%dl
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<islword>:
lea    -0x21(%rdi),%ecx
xor    %eax,%eax
cmp    $0x5d,%ecx
ja     1121 <islword+0x21>
cmp    $0x3b,%edi
ja     1122 <islword+0x22>
mov    %edi,%ecx
movabs $0x800030400000000,%rdx
bt     %rcx,%rdx
jae    1122 <islword+0x22>
ret
xor    %eax,%eax
cmp    $0x5c,%edi
setne  %al
ret

LLVM IR (-O0):
define i32 @islword(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 32, %3
br i1 %4, label %5, label %23
5: ; preds = %1
%6 = load i32, i32* %2
%7 = icmp slt i32 %6, 127
br i1 %7, label %8, label %23
8: ; preds = %5
%9 = load i32, i32* %2
%10 = icmp ne i32 %9, 40
br i1 %10, label %11, label %23
11: ; preds = %8
%12 = load i32, i32* %2
%13 = icmp ne i32 %12, 41
br i1 %13, label %14, label %23
14: ; preds = %11
%15 = load i32, i32* %2
%16 = icmp ne i32 %15, 59
br i1 %16, label %17, label %23
17: ; preds = %14
%18 = load i32, i32* %2
%19 = icmp ne i32 %18, 34
br i1 %19, label %20, label %23
20: ; preds = %17
%21 = load i32, i32* %2
%22 = icmp ne i32 %21, 92
br label %23
23: ; preds = %20, %17, %14, %11, %8, %5, %1
%24 = phi i1 [ false, %17 ], [ false, %14 ], [ false, %11 ], [ false, %8 ], [ false, %5 ], [ false, %1 ], [ %22, %20 ]
%25 = zext i1 %24 to i64
%26 = select i1 %24, i32 1, i32 0
ret i32 %26
}

LLVM IR (-O2):
define i32 @islword(i32 %0) {
%2 = add i32 %0, -33
%3 = icmp ult i32 %2, 94
br i1 %3, label %4, label %8
4: ; preds = %1
switch i32 %0, label %5 [
i32 59, label %8
i32 41, label %8
i32 40, label %8
i32 34, label %8
]
5: ; preds = %4
%6 = icmp ne i32 %0, 92
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %4, %4, %4, %1, %5
%9 = phi i32 [ 0, %4 ], [ %7, %5 ], [ 0, %1 ], [ 0, %4 ], [ 0, %4 ], [ 0, %4 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ Direct(int);
int /*<<< orphan*/ STY8(int /*<<< orphan*/);
void Op84X1(void) { STY8(Direct(2)); }


x86 assembly (clang, -O0):
<Op84X1>:
push   %rbp
mov    %rsp,%rbp
mov    $0x2,%edi
call   1030 <Direct@plt>
mov    %eax,%edi
call   1040 <STY8@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<Op84X1>:
push   %rax
mov    $0x2,%edi
call   1030 <Direct@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <STY8@plt>

LLVM IR (-O0):
define void @Op84X1() {
%1 = call i32 @Direct(i32 2)
%2 = call i32 @STY8(i32 %1)
ret void
}

LLVM IR (-O2):
define void @Op84X1() {
%1 = tail call i32 @Direct(i32 2)
%2 = tail call i32 @STY8(i32 %1)
ret void
}
/* Type definitions */
struct uart {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ nvic_enable(int);
int serial3_getc();
int /*<<< orphan*/ serial_putc(int);
int /*<<< orphan*/ uart_rx_enable(struct uart *);
void serial_test(void) {
  int c;
  nvic_enable(39);
  uart_rx_enable((struct uart *)0x40004800);
  for (;;)
    ;
  for (;;) {
    c = serial3_getc();
    serial_putc(c);
  }
}


x86 assembly (clang, -O0):
<serial_test>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x27,%edi
call   1030 <nvic_enable@plt>
mov    $0x40004800,%edi
call   1040 <uart_rx_enable@plt>
jmp    113c <serial_test+0x1c>

x86 assembly (clang, -O2):
<serial_test>:
push   %rax
mov    $0x27,%edi
call   1030 <nvic_enable@plt>
mov    $0x40004800,%edi
call   1040 <uart_rx_enable@plt>
cs nopw 0x0(%rax,%rax,1)
nop
jmp    1140 <serial_test+0x20>

LLVM IR (-O0):
%struct.uart = type { i32 }
define void @serial_test() {
%1 = alloca i32
%2 = call i32 @nvic_enable(i32 39)
%3 = call i32 @uart_rx_enable(%struct.uart* inttoptr (i64 1073760256 to %struct.uart*))
br label %4
4: ; preds = %4, %0
br label %4
}

LLVM IR (-O2):
%struct.uart = type { i32 }
define void @serial_test() {
%1 = tail call i32 @nvic_enable(i32 39)
%2 = tail call i32 @uart_rx_enable(%struct.uart* inttoptr (i64 1073760256 to %struct.uart*))
br label %3
3: ; preds = %3, %0
br label %3
}
int idcmp(unsigned char *a, unsigned char *b) {
  for (int i = 0; i < 4; i++)
    if (a[i] != b[i])
      return 0;
  return 1;
}


x86 assembly (clang, -O0):
<idcmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jge    115c <idcmp+0x5c>
mov    -0x10(%rbp),%rax
movslq -0x1c(%rbp),%rcx
movzbl (%rax,%rcx,1),%eax
mov    -0x18(%rbp),%rcx
movslq -0x1c(%rbp),%rdx
movzbl (%rcx,%rdx,1),%ecx
cmp    %ecx,%eax
je     1149 <idcmp+0x49>
movl   $0x0,-0x4(%rbp)
jmp    1163 <idcmp+0x63>
jmp    114e <idcmp+0x4e>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    1113 <idcmp+0x13>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<idcmp>:
mov    (%rdi),%cl
xor    %eax,%eax
cmp    (%rsi),%cl
jne    1123 <idcmp+0x23>
mov    0x1(%rdi),%cl
cmp    0x1(%rsi),%cl
jne    1123 <idcmp+0x23>
mov    0x2(%rdi),%cl
cmp    0x2(%rsi),%cl
jne    1123 <idcmp+0x23>
mov    0x3(%rdi),%cl
xor    %eax,%eax
cmp    0x3(%rsi),%cl
sete   %al
ret

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

LLVM IR (-O2):
define i32 @idcmp(i8* nocapture %0, i8* nocapture %1) {
%3 = load i8, i8* %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %3, %4
br i1 %5, label %6, label %25
6: ; preds = %2
%7 = getelementptr inbounds i8, i8* %0, i64 1
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %1, i64 1
%10 = load i8, i8* %9
%11 = icmp eq i8 %8, %10
br i1 %11, label %12, label %25
12: ; preds = %6
%13 = getelementptr inbounds i8, i8* %0, i64 2
%14 = load i8, i8* %13
%15 = getelementptr inbounds i8, i8* %1, i64 2
%16 = load i8, i8* %15
%17 = icmp eq i8 %14, %16
br i1 %17, label %18, label %25
18: ; preds = %12
%19 = getelementptr inbounds i8, i8* %0, i64 3
%20 = load i8, i8* %19
%21 = getelementptr inbounds i8, i8* %1, i64 3
%22 = load i8, i8* %21
%23 = icmp eq i8 %20, %22
%24 = zext i1 %23 to i32
br label %25
25: ; preds = %18, %12, %6, %2
%26 = phi i32 [ 0, %2 ], [ 0, %6 ], [ 0, %12 ], [ %24, %18 ]
ret i32 %26
}
/* Variables and functions */
int /*<<< orphan*/ HplMsp430GeneralIOP__43__IO__selectModuleFunc();
void Msp430Adc12ImplP__Port63__selectModuleFunc(void) {
  HplMsp430GeneralIOP__43__IO__selectModuleFunc();
}


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

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

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

LLVM IR (-O2):
define void @Msp430Adc12ImplP__Port63__selectModuleFunc() {
%1 = tail call i32 (...) @HplMsp430GeneralIOP__43__IO__selectModuleFunc()
ret void
}
/* Type definitions */
typedef int ssize_t;
typedef int /*<<< orphan*/ __ptr_t;

/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
ssize_t __send(int fd, const __ptr_t buf, size_t n, int flags) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__send>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    0x2ebc(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__send>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__send(i32 %0, i32 %1, i64 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i64
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i64 %2, i64* %7
store i32 %3, i32* %8
%9 = load i32, i32* @ENOSYS
%10 = call i32 @__set_errno(i32 %9)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__send(i32 %0, i32 %1, i64 %2, i32 %3) {
%5 = load i32, i32* @ENOSYS
%6 = tail call i32 @__set_errno(i32 %5)
ret i32 -1
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
char *indent(int, int /*<<< orphan*/);
int /*<<< orphan*/ mp4tree_hexdump(int const *, size_t, int);
int /*<<< orphan*/ printf(char *, char *, int const);
void mp4tree_box_btrt_print(const uint8_t *p, size_t len, int depth) {
  printf("%s  Version:                 %u\n", indent(depth, 0), p[0]);
  mp4tree_hexdump(p, len, depth);
}


x86 assembly (clang, -O0):
<mp4tree_box_btrt_print>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x14(%rbp),%edi
xor    %esi,%esi
call   1040 <indent@plt>
mov    %rax,%rsi
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1050 <mp4tree_hexdump@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mp4tree_box_btrt_print>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%ebp
mov    %rsi,%r14
mov    %rdi,%rbx
mov    %edx,%edi
xor    %esi,%esi
call   1040 <indent@plt>
mov    (%rbx),%edx
lea    0xeb2(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %ebp,%edx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <mp4tree_hexdump@plt>

LLVM IR (-O0):
@.str = [33 x i8] c"%s Version: %u\0A\00"
define void @mp4tree_box_btrt_print(i32* %0, i64 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i64
%6 = alloca i32
store i32* %0, i32** %4
store i64 %1, i64* %5
store i32 %2, i32* %6
%7 = load i32, i32* %6
%8 = call i8* @indent(i32 %7, i32 0)
%9 = load i32*, i32** %4
%10 = getelementptr inbounds i32, i32* %9, i64 0
%11 = load i32, i32* %10
%12 = call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %8, i32 %11)
%13 = load i32*, i32** %4
%14 = load i64, i64* %5
%15 = load i32, i32* %6
%16 = call i32 @mp4tree_hexdump(i32* %13, i64 %14, i32 %15)
ret void
}

LLVM IR (-O2):
@.str = [33 x i8] c"%s Version: %u\0A\00"
define void @mp4tree_box_btrt_print(i32* %0, i64 %1, i32 %2) {
%4 = tail call i8* @indent(i32 %2, i32 0)
%5 = load i32, i32* %0
%6 = tail call i32 @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0), i8* %4, i32 %5)
%7 = tail call i32 @mp4tree_hexdump(i32* %0, i64 %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int, int);
int main() {
  foo(10, 3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0xa,%edi
mov    $0x3,%esi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0xa,%edi
mov    $0x3,%esi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 10, i32 3)
ret i32 0
}
void intel_gvt_cleanup(struct drm_i915_private *dev_priv) {}


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

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

LLVM IR (-O0):
%struct.drm_i915_private = type opaque
define void @intel_gvt_cleanup(%struct.drm_i915_private* %0) {
%2 = alloca %struct.drm_i915_private*
store %struct.drm_i915_private* %0, %struct.drm_i915_private** %2
ret void
}

LLVM IR (-O2):
%struct.drm_i915_private = type opaque
define void @intel_gvt_cleanup(%struct.drm_i915_private* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sig_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
char *getFileLocation(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, char *);
void signalHandler(sig_t s) {
  printf("\n\nStopped writing user stories in %s\n\n", getFileLocation(0));
  exit(1);
}


x86 assembly (clang, -O0):
<signalHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1040 <getFileLocation@plt>
mov    %rax,%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

x86 assembly (clang, -O2):
<signalHandler>:
push   %rax
xor    %edi,%edi
call   1040 <getFileLocation@plt>
lea    0xec1(%rip),%rdi
mov    %rax,%rsi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [39 x i8] c"\0A\0AStopped writing user stories in %s\0A\0A\00"
define void @signalHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i8* @getFileLocation(i32 0)
%4 = call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [39 x i8] c"\0A\0AStopped writing user stories in %s\0A\0A\00"
define void @signalHandler(i32 %0) {
%2 = tail call i8* @getFileLocation(i32 0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str, i64 0, i64 0), i8* %2)
%4 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
size_t bmax_size(size_t a, size_t b) { return (a > b ? a : b); }


x86 assembly (clang, -O0):
<bmax_size>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jbe    1127 <bmax_size+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <bmax_size+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<bmax_size>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmova  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @bmax_size(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
store i64 %0, i64* %3
store i64 %1, i64* %4
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp ugt i64 %5, %6
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i64, i64* %3
br label %12
10: ; preds = %2
%11 = load i64, i64* %4
br label %12
12: ; preds = %10, %8
%13 = phi i64 [ %9, %8 ], [ %11, %10 ]
ret i64 %13
}

LLVM IR (-O2):
define i64 @bmax_size(i64 %0, i64 %1) {
%3 = icmp ugt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ error_issue(int /*<<< orphan*/, char *, char const *);
void error_fatal(const char *message) {
  error_issue(EXIT_FAILURE, "FATAL", message);
}


x86 assembly (clang, -O0):
<error_fatal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xed0(%rip),%rsi
call   1030 <error_issue@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<error_fatal>:
mov    %rdi,%rdx
mov    0x2ec6(%rip),%rax
mov    (%rax),%edi
lea    0xedd(%rip),%rsi
jmp    1030 <error_issue@plt>

LLVM IR (-O0):
@EXIT_FAILURE = global i32 0
@.str = [6 x i8] c"FATAL\00"
define void @error_fatal(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @EXIT_FAILURE
%4 = load i8*, i8** %2
%5 = call i32 @error_issue(i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@EXIT_FAILURE = global i32 0
@.str = [6 x i8] c"FATAL\00"
define void @error_fatal(i8* %0) {
%2 = load i32, i32* @EXIT_FAILURE
%3 = tail call i32 @error_issue(i32 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ notimplemented(char *);
void __svgalib_driver24p_putboxmask(int x, int y, int w, int h, void *b) {
  {
    notimplemented("24-bit paged putboxmask");
    return;
  };
}


x86 assembly (clang, -O0):
<__svgalib_driver24p_putboxmask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
lea    0xed1(%rip),%rdi
call   1030 <notimplemented@plt>
add    $0x20,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [24 x i8] c"24-bit paged putboxmask\00"
define void @__svgalib_driver24p_putboxmask(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i8*
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i8* %4, i8** %10
%11 = call i32 @notimplemented(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"24-bit paged putboxmask\00"
define void @__svgalib_driver24p_putboxmask(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture readnone %4) {
%6 = tail call i32 @notimplemented(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
float log(float);
float futhark_log32(float x) { return log(x); }


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

x86 assembly (clang, -O2):
<futhark_log32>:
jmp    1030 <log@plt>

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

LLVM IR (-O2):
define float @futhark_log32(float %0) {
%2 = tail call float @log(float %0)
ret float %2
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void PostTraceHook(FILE *where) {
  fprintf(stderr, "\n");
  return;
}


x86 assembly (clang, -O0):
<PostTraceHook>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ebd(%rip),%rax
mov    (%rax),%edi
lea    0xed4(%rip),%rsi
call   1030 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PostTraceHook>:
mov    0x2ec9(%rip),%rax
mov    (%rax),%edi
lea    0xee0(%rip),%rsi
jmp    1030 <fprintf@plt>

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

LLVM IR (-O2):
@stderr = global i32 0
@.str = [2 x i8] c"\0A\00"
define void @PostTraceHook(i32* nocapture readnone %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Type definitions */
struct scm_command {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ free(struct scm_command *);
void free_scm_command(struct scm_command *cmd) { free(cmd); }


x86 assembly (clang, -O0):
<free_scm_command>:
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):
<free_scm_command>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.scm_command = type { i32 }
define void @free_scm_command(%struct.scm_command* nocapture %0) {
%2 = tail call i32 @free(%struct.scm_command* %0)
ret void
}
char *aum_Name(void) { return "AUM64"; }


x86 assembly (clang, -O0):
<aum_Name>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<aum_Name>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [6 x i8] c"AUM64\00"
define i8* @aum_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [6 x i8] c"AUM64\00"
define i8* @aum_Name() {
ret i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0)
}
/* Type definitions */
typedef size_t ulong;

/* Variables and functions */
ulong roundTo512(size_t size) {
  return size % 512 ? size + 512 - (size % 512) : size;
}


x86 assembly (clang, -O0):
<roundTo512>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0x1ff,%rax
cmp    $0x0,%rax
je     113d <roundTo512+0x3d>
mov    -0x8(%rbp),%rax
add    $0x200,%rax
mov    -0x8(%rbp),%rcx
and    $0x1ff,%rcx
sub    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1145 <roundTo512+0x45>
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<roundTo512>:
lea    0x200(%rdi),%rax
and    $0xfffffffffffffe00,%rax
test   $0x1ff,%edi
cmove  %rdi,%rax
ret

LLVM IR (-O0):
define i64 @roundTo512(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = urem i64 %3, 512
%5 = icmp ne i64 %4, 0
br i1 %5, label %6, label %12
6: ; preds = %1
%7 = load i64, i64* %2
%8 = add i64 %7, 512
%9 = load i64, i64* %2
%10 = urem i64 %9, 512
%11 = sub i64 %8, %10
br label %14
12: ; preds = %1
%13 = load i64, i64* %2
br label %14
14: ; preds = %12, %6
%15 = phi i64 [ %11, %6 ], [ %13, %12 ]
ret i64 %15
}

LLVM IR (-O2):
define i64 @roundTo512(i64 %0) {
%2 = and i64 %0, 511
%3 = icmp eq i64 %2, 0
%4 = add i64 %0, 512
%5 = and i64 %4, -512
%6 = select i1 %3, i64 %0, i64 %5
ret i64 %6
}
void suspend_nvs_restore(void) {}


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

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

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

LLVM IR (-O2):
define void @suspend_nvs_restore() {
ret void
}
void testClosureLLSrV(void (*closure)(long long, short), long long a1,
                      short a2) {
  (*closure)(a1, a2);
}


x86 assembly (clang, -O0):
<testClosureLLSrV>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dx,%ax
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %ax,-0x12(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdi
movswl -0x12(%rbp),%esi
call   *%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<testClosureLLSrV>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %edx,%esi
jmp    *%rax

LLVM IR (-O0):
define void @testClosureLLSrV(void (i64, i16)* %0, i64 %1, i16 signext %2) {
%4 = alloca void (i64, i16)*
%5 = alloca i64
%6 = alloca i16
store void (i64, i16)* %0, void (i64, i16)** %4
store i64 %1, i64* %5
store i16 %2, i16* %6
%7 = load void (i64, i16)*, void (i64, i16)** %4
%8 = load i64, i64* %5
%9 = load i16, i16* %6
ret void
}

LLVM IR (-O2):
define void @testClosureLLSrV(void (i64, i16)* nocapture %0, i64 %1, i16 signext %2) {
tail call void %0(i64 %1, i16 signext %2)
ret void
}
float __glsl_faceforward_f(float N, float I, float Nref) {
  return Nref * I < 0 ? N : -N;
}


x86 assembly (clang, -O0):
<__glsl_faceforward_f>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0xc(%rbp),%xmm1
mulss  -0x8(%rbp),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jbe    1138 <__glsl_faceforward_f+0x38>
movss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    114f <__glsl_faceforward_f+0x4f>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<__glsl_faceforward_f>:
mulss  %xmm2,%xmm1
movaps 0xef5(%rip),%xmm2
xorps  %xmm0,%xmm2
xorps  %xmm3,%xmm3
cmpltss %xmm3,%xmm1
andps  %xmm1,%xmm0
andnps %xmm2,%xmm1
orps   %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @__glsl_faceforward_f(float %0, float %1, float %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* %6
%8 = load float, float* %5
%9 = fmul float %7, %8
%10 = fcmp olt float %9, 0.000000e+00
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load float, float* %4
br label %16
13: ; preds = %3
%14 = load float, float* %4
%15 = fneg float %14
br label %16
16: ; preds = %13, %11
%17 = phi float [ %12, %11 ], [ %15, %13 ]
ret float %17
}

LLVM IR (-O2):
define float @__glsl_faceforward_f(float %0, float %1, float %2) {
%4 = fmul float %1, %2
%5 = fcmp olt float %4, 0.000000e+00
%6 = fneg float %0
%7 = select i1 %5, float %0, float %6
ret float %7
}
/* Variables and functions */
int number_returner();
int main(void) { return number_returner() == 100 ? 0 : 1; }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <number_returner@plt>
mov    %eax,%edx
mov    $0x1,%eax
xor    %ecx,%ecx
cmp    $0x64,%edx
cmove  %ecx,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <number_returner@plt>
xor    %ecx,%ecx
cmp    $0x64,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @number_returner()
%3 = icmp eq i32 %2, 100
%4 = zext i1 %3 to i64
%5 = select i1 %3, i32 0, i32 1
ret i32 %5
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @number_returner()
%2 = icmp ne i32 %1, 100
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int wycc_type_flags(int);
int wycc_type_is_iter(int id) {
  int flgs = wycc_type_flags(id);
  if (flgs & 16) {
    return 1;
  };
  if (flgs & 32) {
    return 1;
  };
  if (flgs & 64) {
    return 1;
  };
  if (flgs & 256) {
    return 1;
  };
  return 0;
}


x86 assembly (clang, -O0):
<wycc_type_is_iter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
call   1030 <wycc_type_flags@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
and    $0x10,%eax
cmp    $0x0,%eax
je     1141 <wycc_type_is_iter+0x31>
movl   $0x1,-0x4(%rbp)
jmp    119b <wycc_type_is_iter+0x8b>
mov    -0xc(%rbp),%eax
and    $0x20,%eax
cmp    $0x0,%eax
je     115c <wycc_type_is_iter+0x4c>
movl   $0x1,-0x4(%rbp)
jmp    119b <wycc_type_is_iter+0x8b>
mov    -0xc(%rbp),%eax
and    $0x40,%eax
cmp    $0x0,%eax
je     1177 <wycc_type_is_iter+0x67>
movl   $0x1,-0x4(%rbp)
jmp    119b <wycc_type_is_iter+0x8b>
mov    -0xc(%rbp),%eax
and    $0x100,%eax
cmp    $0x0,%eax
je     1194 <wycc_type_is_iter+0x84>
movl   $0x1,-0x4(%rbp)
jmp    119b <wycc_type_is_iter+0x8b>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wycc_type_is_iter>:
push   %rax
call   1030 <wycc_type_flags@plt>
xor    %ecx,%ecx
test   $0x170,%eax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @wycc_type_is_iter(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
%5 = load i32, i32* %3
%6 = call i32 @wycc_type_flags(i32 %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
%8 = and i32 %7, 16
%9 = icmp ne i32 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 1, i32* %2
br label %27
11: ; preds = %1
%12 = load i32, i32* %4
%13 = and i32 %12, 32
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %11
store i32 1, i32* %2
br label %27
16: ; preds = %11
%17 = load i32, i32* %4
%18 = and i32 %17, 64
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %21
20: ; preds = %16
store i32 1, i32* %2
br label %27
21: ; preds = %16
%22 = load i32, i32* %4
%23 = and i32 %22, 256
%24 = icmp ne i32 %23, 0
br i1 %24, label %25, label %26
25: ; preds = %21
store i32 1, i32* %2
br label %27
26: ; preds = %21
store i32 0, i32* %2
br label %27
27: ; preds = %26, %25, %20, %15, %10
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @wycc_type_is_iter(i32 %0) {
%2 = tail call i32 @wycc_type_flags(i32 %0)
%3 = and i32 %2, 368
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage_error() {
  printf("\x1B[31m"
         "usage: altPhisics ");
  printf("<input_file> ");
  printf("<output_file> ");
  printf("<number of interations> ");
  printf("<number of processors>\n"
         "\x1B[0m");
}


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

x86 assembly (clang, -O2):
<print_usage_error>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <printf@plt>
lea    0xef4(%rip),%rdi
call   1030 <printf@plt>
lea    0xef6(%rip),%rdi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
pop    %rax
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"\1B[31musage: altPhisics \00"
@.str.1 = [14 x i8] c"<input_file> \00"
@.str.2 = [15 x i8] c"<output_file> \00"
@.str.3 = [25 x i8] c"<number of interations> \00"
@.str.4 = [28 x i8] c"<number of processors>\0A\1B[0m\00"
define void @print_usage_error() {
%1 = call i32 @printf(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%5 = call i32 @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [24 x i8] c"\1B[31musage: altPhisics \00"
@.str.1 = [14 x i8] c"<input_file> \00"
@.str.2 = [15 x i8] c"<output_file> \00"
@.str.3 = [25 x i8] c"<number of interations> \00"
@.str.4 = [28 x i8] c"<number of processors>\0A\1B[0m\00"
define void @print_usage_error() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([28 x i8], [28 x i8]* @.str.4, i64 0, i64 0))
ret void
}