xunge/DecIR huggingface dataset:
double StraightDown(double x, double min, double max) {
  if (max == min) {
    return (0.0);
  }
  if (x < min) {
    return (1.0);
  }
  if (x > max) {
    return (0.0);
  }
  return ((max - x) / (max - min));
}


x86 assembly (clang, -O0):
<StraightDown>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x10(%rbp)
movsd  %xmm1,-0x18(%rbp)
movsd  %xmm2,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
ucomisd -0x18(%rbp),%xmm0
jne    1136 <StraightDown+0x36>
jp     1136 <StraightDown+0x36>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1196 <StraightDown+0x96>
movsd  -0x10(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
ucomisd %xmm1,%xmm0
jbe    115c <StraightDown+0x5c>
movsd  0xeae(%rip),%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1196 <StraightDown+0x96>
movsd  -0x10(%rbp),%xmm0
ucomisd -0x20(%rbp),%xmm0
jbe    1179 <StraightDown+0x79>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
jmp    1196 <StraightDown+0x96>
movsd  -0x20(%rbp),%xmm0
subsd  -0x10(%rbp),%xmm0
movsd  -0x20(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<StraightDown>:
movapd %xmm0,%xmm3
xorpd  %xmm0,%xmm0
ucomisd %xmm1,%xmm2
jne    1111 <StraightDown+0x11>
jp     1111 <StraightDown+0x11>
ret
ucomisd %xmm3,%xmm1
jbe    1120 <StraightDown+0x20>
movsd  0xee1(%rip),%xmm0
ret
ucomisd %xmm2,%xmm3
ja     1110 <StraightDown+0x10>
movapd %xmm2,%xmm0
subsd  %xmm3,%xmm0
subsd  %xmm1,%xmm2
divsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @StraightDown(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double %0, double* %5
store double %1, double* %6
store double %2, double* %7
%8 = load double, double* %7
%9 = load double, double* %6
%10 = fcmp oeq double %8, %9
br i1 %10, label %11, label %12
11: ; preds = %3
store double 0.000000e+00, double* %4
br label %30
12: ; preds = %3
%13 = load double, double* %5
%14 = load double, double* %6
%15 = fcmp olt double %13, %14
br i1 %15, label %16, label %17
16: ; preds = %12
store double 1.000000e+00, double* %4
br label %30
17: ; preds = %12
%18 = load double, double* %5
%19 = load double, double* %7
%20 = fcmp ogt double %18, %19
br i1 %20, label %21, label %22
21: ; preds = %17
store double 0.000000e+00, double* %4
br label %30
22: ; preds = %17
%23 = load double, double* %7
%24 = load double, double* %5
%25 = fsub double %23, %24
%26 = load double, double* %7
%27 = load double, double* %6
%28 = fsub double %26, %27
%29 = fdiv double %25, %28
store double %29, double* %4
br label %30
30: ; preds = %22, %21, %16, %11
%31 = load double, double* %4
ret double %31
}

LLVM IR (-O2):
define double @StraightDown(double %0, double %1, double %2) {
%4 = fcmp oeq double %2, %1
br i1 %4, label %13, label %5
5: ; preds = %3
%6 = fcmp olt double %0, %1
br i1 %6, label %13, label %7
7: ; preds = %5
%8 = fcmp ogt double %0, %2
br i1 %8, label %13, label %9
9: ; preds = %7
%10 = fsub double %2, %0
%11 = fsub double %2, %1
%12 = fdiv double %10, %11
br label %13
13: ; preds = %7, %5, %3, %9
%14 = phi double [ %12, %9 ], [ 0.000000e+00, %3 ], [ 1.000000e+00, %5 ], [ 0.000000e+00, %7 ]
ret double %14
}
void XCreatePixmapCursor() {}


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

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

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

LLVM IR (-O2):
define void @XCreatePixmapCursor() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stdout;
int userWarning(char *warningText) {
  fprintf(stdout, "\n WARNING: %s\n\n", warningText);
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<userWarning>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<userWarning>:
push   %rbx
mov    %rdi,%rdx
mov    0x2eb5(%rip),%rbx
mov    (%rbx),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    (%rbx),%edi
call   1040 <fflush@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@stdout = global i32 0
@.str = [16 x i8] c"\0A WARNING: %s\0A\0A\00"
define i32 @userWarning(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stdout
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @stdout
%7 = call i32 @fflush(i32 %6)
ret i32 0
}

LLVM IR (-O2):
@stdout = global i32 0
@.str = [16 x i8] c"\0A WARNING: %s\0A\0A\00"
define i32 @userWarning(i8* %0) {
%2 = load i32, i32* @stdout
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @stdout
%5 = tail call i32 @fflush(i32 %4)
ret i32 0
}
/* Variables and functions */
int DoMatch(char const *, char const *);
int wildmat(const char *text, const char *p) {
  if (p[0] == '*' && p[1] == '\0')
    return 1;
  return DoMatch(text, p) == 1;
}


x86 assembly (clang, -O0):
<wildmat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2a,%eax
jne    114d <wildmat+0x3d>
mov    -0x18(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    114d <wildmat+0x3d>
movl   $0x1,-0x4(%rbp)
jmp    1168 <wildmat+0x58>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <DoMatch@plt>
cmp    $0x1,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wildmat>:
push   %rax
cmpb   $0x2a,(%rsi)
jne    111c <wildmat+0xc>
cmpb   $0x0,0x1(%rsi)
je     112d <wildmat+0x1d>
call   1030 <DoMatch@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
sete   %al
pop    %rcx
ret
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @wildmat(i8* %0, i8* %1) {
%3 = load i8, i8* %1
%4 = icmp eq i8 %3, 42
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %1, i64 1
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 0
br i1 %8, label %13, label %9
9: ; preds = %5, %2
%10 = tail call i32 @DoMatch(i8* %0, i8* %1)
%11 = icmp eq i32 %10, 1
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %5, %9
%14 = phi i32 [ %12, %9 ], [ 1, %5 ]
ret i32 %14
}
/* Type definitions */
typedef scalar_t__ pid_t;

/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
scalar_t__ fork();
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ worker(int);
int do_fork(int m) {
  pid_t pid;
  pid = fork();
  if (pid < 0) {
    perror("fork");
    return -1;
  } else if (pid == 0) {
    worker(m);
    exit(0);
  }
  return 0;
}


x86 assembly (clang, -O0):
<do_fork>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    $0x0,%al
call   1060 <fork@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jge    1179 <do_fork+0x39>
lea    0xe98(%rip),%rdi
call   1040 <perror@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    119f <do_fork+0x5f>
cmpq   $0x0,-0x10(%rbp)
jne    1193 <do_fork+0x53>
mov    -0x8(%rbp),%edi
call   1030 <worker@plt>
xor    %edi,%edi
call   1050 <exit@plt>
jmp    1198 <do_fork+0x58>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_fork>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %ebx,%ebx
xor    %eax,%eax
call   1060 <fork@plt>
test   %rax,%rax
js     115e <do_fork+0x1e>
je     1171 <do_fork+0x31>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
lea    0xe9b(%rip),%rdi
call   1040 <perror@plt>
mov    $0xffffffff,%ebx
jmp    1155 <do_fork+0x15>
mov    %ebp,%edi
call   1030 <worker@plt>
xor    %edi,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"fork\00"
define i32 @do_fork(i32 %0) {
%2 = alloca i32
%3 = alloca i32
%4 = alloca i64
store i32 %0, i32* %3
%5 = call i64 (...) @fork()
store i64 %5, i64* %4
%6 = load i64, i64* %4
%7 = icmp slt i64 %6, 0
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %19
10: ; preds = %1
%11 = load i64, i64* %4
%12 = icmp eq i64 %11, 0
br i1 %12, label %13, label %17
13: ; preds = %10
%14 = load i32, i32* %3
%15 = call i32 @worker(i32 %14)
%16 = call i32 @exit(i32 0)
unreachable
17: ; preds = %10
br label %18
18: ; preds = %17
store i32 0, i32* %2
br label %19
19: ; preds = %18, %8
%20 = load i32, i32* %2
ret i32 %20
}

LLVM IR (-O2):
@.str = [5 x i8] c"fork\00"
define i32 @do_fork(i32 %0) {
%2 = tail call i64 (...) @fork()
%3 = icmp slt i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 @perror(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
br label %11
6: ; preds = %1
%7 = icmp eq i64 %2, 0
br i1 %7, label %8, label %11
8: ; preds = %6
%9 = tail call i32 @worker(i32 %0)
%10 = tail call i32 @exit(i32 0)
unreachable
11: ; preds = %6, %4
%12 = phi i32 [ -1, %4 ], [ 0, %6 ]
ret i32 %12
}
/* Variables and functions */
int rand();
int Q_irand(int value1, int value2) {
  int r;
  r = rand() % value2;
  r += value1;
  return r;
}


x86 assembly (clang, -O0):
<Q_irand>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <rand@plt>
cltd
idivl  -0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Q_irand>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
xor    %eax,%eax
call   1030 <rand@plt>
cltd
idiv   %ebx
add    %edx,%ebp
mov    %ebp,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @Q_irand(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = call i32 (...) @rand()
%7 = load i32, i32* %4
%8 = srem i32 %6, %7
store i32 %8, i32* %5
%9 = load i32, i32* %3
%10 = load i32, i32* %5
%11 = add nsw i32 %10, %9
store i32 %11, i32* %5
%12 = load i32, i32* %5
ret i32 %12
}

LLVM IR (-O2):
define i32 @Q_irand(i32 %0, i32 %1) {
%3 = tail call i32 (...) @rand()
%4 = srem i32 %3, %1
%5 = add nsw i32 %4, %0
ret i32 %5
}
extern int __get_adc_mode(void) { return 33; }


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

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

LLVM IR (-O0):
define i32 @__get_adc_mode() {
ret i32 33
}

LLVM IR (-O2):
define i32 @__get_adc_mode() {
ret i32 33
}
/* Variables and functions */
int /*<<< orphan*/ xop(char *, long double, long double, long double);
void fsub(long double a, long double b) { xop("sub", a, b, a - b); }


x86 assembly (clang, -O0):
<fsub>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
fldt   0x20(%rbp)
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
fstpt  -0x20(%rbp)
fldt   -0x10(%rbp)
fld    %st(0)
fldt   -0x20(%rbp)
fld    %st(0)
fxch   %st(3)
fsubp  %st,%st(1)
mov    %rsp,%rax
fstpt  0x20(%rax)
fxch   %st(1)
fstpt  0x10(%rax)
fstpt  (%rax)
lea    0xeba(%rip),%rdi
call   1030 <xop@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fsub>:
sub    $0x38,%rsp
fldt   0x50(%rsp)
fldt   0x40(%rsp)
fld    %st(0)
fsub   %st(2),%st
fstpt  0x20(%rsp)
fxch   %st(1)
fstpt  0x10(%rsp)
fstpt  (%rsp)
lea    0xecc(%rip),%rdi
call   1030 <xop@plt>
add    $0x38,%rsp
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"sub\00"
define void @fsub(x86_fp80 %0, x86_fp80 %1) {
%3 = fsub x86_fp80 %0, %1
%4 = tail call i32 @xop(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), x86_fp80 %0, x86_fp80 %1, x86_fp80 %3)
ret void
}
/* Type definitions */
struct kdtree {
  int dummy;
};
struct kdres {
  int dummy;
};

/* Variables and functions */
struct kdres *kd_nearest(struct kdtree *, float *);
struct kdres *kd_nearest3(struct kdtree *tree, float x, float y, float z) {
  float pos[3];
  pos[0] = x;
  pos[1] = y;
  pos[2] = z;
  return kd_nearest(tree, pos);
}


x86 assembly (clang, -O0):
<kd_nearest3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movss  %xmm0,-0xc(%rbp)
movss  %xmm1,-0x10(%rbp)
movss  %xmm2,-0x14(%rbp)
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x10(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x14(%rbp),%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1030 <kd_nearest@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<kd_nearest3>:
sub    $0x18,%rsp
movss  %xmm0,0xc(%rsp)
movss  %xmm1,0x10(%rsp)
movss  %xmm2,0x14(%rsp)
lea    0xc(%rsp),%rsi
call   1030 <kd_nearest@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.kdres = type { i32 }
%struct.kdtree = type { i32 }
define %struct.kdres* @kd_nearest3(%struct.kdtree* %0, float %1, float %2, float %3) {
%5 = alloca %struct.kdtree*
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca [3 x float]
store %struct.kdtree* %0, %struct.kdtree** %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%10 = load float, float* %6
%11 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 0
store float %10, float* %11
%12 = load float, float* %7
%13 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 1
store float %12, float* %13
%14 = load float, float* %8
%15 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 2
store float %14, float* %15
%16 = load %struct.kdtree*, %struct.kdtree** %5
%17 = getelementptr inbounds [3 x float], [3 x float]* %9, i64 0, i64 0
%18 = call %struct.kdres* @kd_nearest(%struct.kdtree* %16, float* %17)
ret %struct.kdres* %18
}

LLVM IR (-O2):
%struct.kdres = type { i32 }
%struct.kdtree = type { i32 }
define %struct.kdres* @kd_nearest3(%struct.kdtree* %0, float %1, float %2, float %3) {
%5 = alloca [3 x float]
%6 = bitcast [3 x float]* %5 to i8*
%7 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 0
store float %1, float* %7
%8 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 1
store float %2, float* %8
%9 = getelementptr inbounds [3 x float], [3 x float]* %5, i64 0, i64 2
store float %3, float* %9
%10 = call %struct.kdres* @kd_nearest(%struct.kdtree* %0, float* %7)
ret %struct.kdres* %10
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
scalar_t__ fprintf(int /*<<< orphan*/ *, char *, int);
int /*<<< orphan*/ perror(char *);
int /*<<< orphan*/ rewind(int /*<<< orphan*/ *);
void __set(FILE *stream, int value, char *err_msg) {
  rewind(stream);
  if (fprintf(stream, "%d", value) < 0) {
    perror(err_msg);
  }
}


x86 assembly (clang, -O0):
<__set>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <rewind@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xea6(%rip),%rsi
call   1040 <fprintf@plt>
cmp    $0x0,%rax
jge    1172 <__set+0x42>
mov    -0x18(%rbp),%rdi
call   1050 <perror@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<__set>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <rewind@plt>
lea    0xeb8(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
call   1040 <fprintf@plt>
test   %rax,%rax
js     115c <__set+0x2c>
pop    %rbx
pop    %r14
pop    %rbp
ret
mov    %r14,%rdi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1050 <perror@plt>

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

LLVM IR (-O2):
@.str = [3 x i8] c"%d\00"
define void @__set(i32* nocapture %0, i32 %1, i8* nocapture %2) {
%4 = tail call i32 @rewind(i32* %0)
%5 = tail call i64 @fprintf(i32* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %1)
%6 = icmp slt i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %3
%8 = tail call i32 @perror(i8* %2)
br label %9
9: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ testGlobalAssertions();
int /*<<< orphan*/ testPredicateEntry();
int /*<<< orphan*/ testPredicateEntryANDIterator();
int /*<<< orphan*/ testPredicateEntryORIterator();
int /*<<< orphan*/ testPredicateEntryORIteratorNested();
int /*<<< orphan*/ testTriple();
int main(void) {
  testGlobalAssertions();
  testTriple();
  testPredicateEntry();
  testPredicateEntryORIterator();
  testPredicateEntryORIteratorNested();
  testPredicateEntryANDIterator();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <testGlobalAssertions@plt>
mov    $0x0,%al
call   1060 <testTriple@plt>
mov    $0x0,%al
call   1040 <testPredicateEntry@plt>
mov    $0x0,%al
call   1030 <testPredicateEntryORIterator@plt>
mov    $0x0,%al
call   1080 <testPredicateEntryORIteratorNested@plt>
mov    $0x0,%al
call   1050 <testPredicateEntryANDIterator@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1070 <testGlobalAssertions@plt>
xor    %eax,%eax
call   1060 <testTriple@plt>
xor    %eax,%eax
call   1040 <testPredicateEntry@plt>
xor    %eax,%eax
call   1030 <testPredicateEntryORIterator@plt>
xor    %eax,%eax
call   1080 <testPredicateEntryORIteratorNested@plt>
xor    %eax,%eax
call   1050 <testPredicateEntryANDIterator@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 (...) @testGlobalAssertions()
%2 = call i32 (...) @testTriple()
%3 = call i32 (...) @testPredicateEntry()
%4 = call i32 (...) @testPredicateEntryORIterator()
%5 = call i32 (...) @testPredicateEntryORIteratorNested()
%6 = call i32 (...) @testPredicateEntryANDIterator()
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @testGlobalAssertions()
%2 = tail call i32 (...) @testTriple()
%3 = tail call i32 (...) @testPredicateEntry()
%4 = tail call i32 (...) @testPredicateEntryORIterator()
%5 = tail call i32 (...) @testPredicateEntryORIteratorNested()
%6 = tail call i32 (...) @testPredicateEntryANDIterator()
ret i32 0
}
/* Variables and functions */
int U_WMRCORENONE_get(char *);
int U_WMRC7_get(void) { return U_WMRCORENONE_get("U_WMRC7"); }


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

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

LLVM IR (-O0):
@.str = [8 x i8] c"U_WMRC7\00"
define i32 @U_WMRC7_get() {
%1 = call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}

LLVM IR (-O2):
@.str = [8 x i8] c"U_WMRC7\00"
define i32 @U_WMRC7_get() {
%1 = tail call i32 @U_WMRCORENONE_get(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 %1
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
void I2CMasterIntEnable(uint32_t ui32Base) {
  ;
  (*((volatile unsigned long *)(0x40002000 + 0x00000810))) = 0x00000001;
}


x86 assembly (clang, -O0):
<I2CMasterIntEnable>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    $0x40002810,%eax
movq   $0x1,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CMasterIntEnable>:
movq   $0x1,0x40002810
ret

LLVM IR (-O0):
define void @I2CMasterIntEnable(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
store volatile i64 1, i64* inttoptr (i64 1073752080 to i64*)
ret void
}

LLVM IR (-O2):
define void @I2CMasterIntEnable(i32 %0) {
store volatile i64 1, i64* inttoptr (i64 1073752080 to i64*)
ret void
}
unsigned long __ffs(unsigned long word) {
  __asm__("bsf %1,%0" : "=r"(word) : "rm"(word));
  return (word);
}


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

x86 assembly (clang, -O2):
<__ffs>:
mov    %rdi,-0x8(%rsp)
bsf    -0x8(%rsp),%rax
ret

LLVM IR (-O0):
define i64 @__ffs(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 asm "bsf $1,$0", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i64 %3)
store i64 %4, i64* %2
%5 = load i64, i64* %2
ret i64 %5
}

LLVM IR (-O2):
define i64 @__ffs(i64 %0) {
%2 = tail call i64 asm "bsf $1,$0", "=r,rm,~{dirflag},~{fpsr},~{flags}"(i64 %0)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ convert_cltos(int /*<<< orphan*/);
int /*<<< orphan*/ convert_dtocl(double, int);
int my_puts(int /*<<< orphan*/);
scalar_t__ verify_inf_size(int, int);
int my_putdouble_base(double f, int b) {
  if (verify_inf_size(b, 37) != 0) {
    return -1;
  }
  return my_puts(convert_cltos(convert_dtocl(f, b)));
}


x86 assembly (clang, -O0):
<my_putdouble_base>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x10(%rbp)
mov    %edi,-0x14(%rbp)
mov    -0x14(%rbp),%edi
mov    $0x25,%esi
call   1040 <verify_inf_size@plt>
cmp    $0x0,%rax
je     1173 <my_putdouble_base+0x33>
movl   $0xffffffff,-0x4(%rbp)
jmp    1191 <my_putdouble_base+0x51>
movsd  -0x10(%rbp),%xmm0
mov    -0x14(%rbp),%edi
call   1050 <convert_dtocl@plt>
mov    %eax,%edi
call   1060 <convert_cltos@plt>
mov    %eax,%edi
call   1030 <my_puts@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_putdouble_base>:
push   %rbx
sub    $0x10,%rsp
mov    %edi,%ebx
movsd  %xmm0,0x8(%rsp)
mov    $0x25,%esi
call   1040 <verify_inf_size@plt>
test   %rax,%rax
je     1167 <my_putdouble_base+0x27>
mov    $0xffffffff,%eax
add    $0x10,%rsp
pop    %rbx
ret
movsd  0x8(%rsp),%xmm0
mov    %ebx,%edi
call   1050 <convert_dtocl@plt>
mov    %eax,%edi
call   1060 <convert_cltos@plt>
mov    %eax,%edi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <my_puts@plt>

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

LLVM IR (-O2):
define i32 @my_putdouble_base(double %0, i32 %1) {
%3 = tail call i64 @verify_inf_size(i32 %1, i32 37)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = tail call i32 @convert_dtocl(double %0, i32 %1)
%7 = tail call i32 @convert_cltos(i32 %6)
%8 = tail call i32 @my_puts(i32 %7)
br label %9
9: ; preds = %2, %5
%10 = phi i32 [ %8, %5 ], [ -1, %2 ]
ret i32 %10
}
double sync(x)
double x;
{
  extern double sin();
  return (sin(x) / x);
}


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

x86 assembly (clang, -O2):
<sync>:
push   %rax
movsd  %xmm0,(%rsp)
call   1030 <sin@plt>
divsd  (%rsp),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @sync(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call double @sin(double %3)
%5 = load double, double* %2
%6 = fdiv double %4, %5
ret double %6
}

LLVM IR (-O2):
define double @sync(double %0) {
%2 = tail call double @sin(double %0)
%3 = fdiv double %2, %0
ret double %3
}
void UYVYToUV422Row_Any_NEON() {}


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

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

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

LLVM IR (-O2):
define void @UYVYToUV422Row_Any_NEON() {
ret void
}
int main() {
  int hex20_faces[6][8] = {
      {0, 1, 5, 4, 12, 8, 13, 16},  {1, 2, 6, 5, 13, 9, 14, 17},
      {3, 2, 6, 7, 15, 10, 14, 18}, {0, 3, 7, 4, 12, 11, 15, 19},
      {4, 5, 6, 7, 19, 16, 17, 18}, {0, 1, 2, 3, 11, 8, 9, 10}};
  int tet10_faces[4][6] = {{0, 1, 3, 4, 8, 7},
                           {2, 3, 1, 9, 8, 5},
                           {0, 3, 2, 7, 9, 6},
                           {0, 2, 1, 6, 5, 4}};
  int *faces;
  faces = hex20_faces;
  faces = tet10_faces;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0xd0(%rbp),%rdi
lea    0xed0(%rip),%rsi
mov    $0xc0,%edx
call   1030 <memcpy@plt>
lea    -0x130(%rbp),%rdi
lea    0xf78(%rip),%rsi
mov    $0x60,%edx
call   1030 <memcpy@plt>
lea    -0xd0(%rbp),%rax
mov    %rax,-0x138(%rbp)
lea    -0x130(%rbp),%rax
mov    %rax,-0x138(%rbp)
xor    %eax,%eax
add    $0x140,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__const.main.hex20_faces = [6 x [8 x i32]] [[8 x i32] [i32 0, i32 1, i32 5, i32 4, i32 12, i32 8, i32 13, i32 16], [8 x i32] [i32 1, i32 2, i32 6, i32 5, i32 13, i32 9, i32 14, i32 17], [8 x i32] [i32 3, i32 2, i32 6, i32 7, i32 15, i32 10, i32 14, i32 18], [8 x i32] [i32 0, i32 3, i32 7, i32 4, i32 12, i32 11, i32 15, i32 19], [8 x i32] [i32 4, i32 5, i32 6, i32 7, i32 19, i32 16, i32 17, i32 18], [8 x i32] [i32 0, i32 1, i32 2, i32 3, i32 11, i32 8, i32 9, i32 10]]
@__const.main.tet10_faces = [4 x [6 x i32]] [[6 x i32] [i32 0, i32 1, i32 3, i32 4, i32 8, i32 7], [6 x i32] [i32 2, i32 3, i32 1, i32 9, i32 8, i32 5], [6 x i32] [i32 0, i32 3, i32 2, i32 7, i32 9, i32 6], [6 x i32] [i32 0, i32 2, i32 1, i32 6, i32 5, i32 4]]
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x [8 x i32]]
%3 = alloca [4 x [6 x i32]]
%4 = alloca i32*
store i32 0, i32* %1
%5 = bitcast [6 x [8 x i32]]* %2 to i8*
%6 = bitcast [4 x [6 x i32]]* %3 to i8*
%7 = getelementptr inbounds [6 x [8 x i32]], [6 x [8 x i32]]* %2, i64 0, i64 0
%8 = bitcast [8 x i32]* %7 to i32*
store i32* %8, i32** %4
%9 = getelementptr inbounds [4 x [6 x i32]], [4 x [6 x i32]]* %3, i64 0, i64 0
%10 = bitcast [6 x i32]* %9 to i32*
store i32* %10, i32** %4
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
char *langRomTypeSvi328col80() { return "SVI-328 80 Column Card"; }


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

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

LLVM IR (-O0):
@.str = [23 x i8] c"SVI-328 80 Column Card\00"
define i8* @langRomTypeSvi328col80() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [23 x i8] c"SVI-328 80 Column Card\00"
define i8* @langRomTypeSvi328col80() {
ret i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
double DSlater_2S_3S(double, double, double);
double DSlater_3S_2S(double rij, double xii, double xij) {
  return DSlater_2S_3S(rij, xij, xii);
}


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

x86 assembly (clang, -O2):
<DSlater_3S_2S>:
movaps %xmm1,%xmm3
movaps %xmm2,%xmm1
movaps %xmm3,%xmm2
jmp    1030 <DSlater_2S_3S@plt>

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

LLVM IR (-O2):
define double @DSlater_3S_2S(double %0, double %1, double %2) {
%4 = tail call double @DSlater_2S_3S(double %0, double %2, double %1)
ret double %4
}
/* Type definitions */
struct UPnPDevice {
  int dummy;
};

/* Variables and functions */
struct UPnPDevice *RNDGetDevice2(struct UPnPDevice *, int, int *);
struct UPnPDevice *RNDGetDevice1(struct UPnPDevice *device, int index) {
  int c_Index = -1;
  return (RNDGetDevice2(device, index, &c_Index));
}


x86 assembly (clang, -O0):
<RNDGetDevice1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0xffffffff,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
lea    -0x10(%rbp),%rdx
call   1030 <RNDGetDevice2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RNDGetDevice1>:
push   %rax
movl   $0xffffffff,0x4(%rsp)
ff
lea    0x4(%rsp),%rdx
call   1030 <RNDGetDevice2@plt>
pop    %rcx
ret

LLVM IR (-O0):
%struct.UPnPDevice = type { i32 }
define %struct.UPnPDevice* @RNDGetDevice1(%struct.UPnPDevice* %0, i32 %1) {
%3 = alloca %struct.UPnPDevice*
%4 = alloca i32
%5 = alloca i32
store %struct.UPnPDevice* %0, %struct.UPnPDevice** %3
store i32 %1, i32* %4
store i32 -1, i32* %5
%6 = load %struct.UPnPDevice*, %struct.UPnPDevice** %3
%7 = load i32, i32* %4
%8 = call %struct.UPnPDevice* @RNDGetDevice2(%struct.UPnPDevice* %6, i32 %7, i32* %5)
ret %struct.UPnPDevice* %8
}

LLVM IR (-O2):
%struct.UPnPDevice = type { i32 }
define %struct.UPnPDevice* @RNDGetDevice1(%struct.UPnPDevice* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 -1, i32* %3
%5 = call %struct.UPnPDevice* @RNDGetDevice2(%struct.UPnPDevice* %0, i32 %1, i32* %3)
ret %struct.UPnPDevice* %5
}
float do_fmin(float a, float b) { return __builtin_fminf(a, b); }


x86 assembly (clang, -O0):
<do_fmin>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  -0x4(%rbp),%xmm3
movss  -0x8(%rbp),%xmm2
movaps %xmm2,%xmm4
movaps %xmm3,%xmm0
cmpunordss %xmm0,%xmm0
movaps %xmm0,%xmm1
pand   %xmm4,%xmm1
minss  %xmm3,%xmm2
pandn  %xmm2,%xmm0
por    %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<do_fmin>:
movaps %xmm0,%xmm2
cmpunordss %xmm0,%xmm2
movaps %xmm2,%xmm3
andps  %xmm1,%xmm3
minss  %xmm0,%xmm1
andnps %xmm1,%xmm2
orps   %xmm3,%xmm2
movaps %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @do_fmin(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @llvm.minnum.f32(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @do_fmin(float %0, float %1) {
%3 = tail call float @llvm.minnum.f32(float %0, float %1)
ret float %3
}
void _asm_generic3parm_retd_end(void) {}


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

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

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

LLVM IR (-O2):
define void @_asm_generic3parm_retd_end() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ serv_uart_SendString(char *, int);
void main() { serv_uart_SendString("Enter app_1.\n", 13); }


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

x86 assembly (clang, -O2):
<main>:
lea    0xee9(%rip),%rdi
mov    $0xd,%esi
jmp    1030 <serv_uart_SendString@plt>

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

LLVM IR (-O2):
@.str = [14 x i8] c"Enter app_1.\0A\00"
define void @main() {
%1 = tail call i32 @serv_uart_SendString(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 13)
ret void
}
/* Variables and functions */
char *strdup(char *);
char *strtok(char *, char *);
char *get_URL_from_request(char *request) {
  char *copy = strdup(request);
  void *temp = (void *)copy;
  temp += 4 * sizeof(char);
  copy = (char *)temp;
  copy = strtok(copy, " ");
  return copy;
}


x86 assembly (clang, -O0):
<get_URL_from_request>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strdup@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xea0(%rip),%rsi
call   1030 <strtok@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_URL_from_request>:
push   %rax
call   1040 <strdup@plt>
lea    0x4(%rax),%rdi
lea    0xecf(%rip),%rsi
pop    %rax
jmp    1030 <strtok@plt>

LLVM IR (-O0):
@.str = [2 x i8] c" \00"
define i8* @get_URL_from_request(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %2
%5 = load i8*, i8** %2
%6 = call i8* @strdup(i8* %5)
store i8* %6, i8** %3
%7 = load i8*, i8** %3
store i8* %7, i8** %4
%8 = load i8*, i8** %4
%9 = getelementptr i8, i8* %8, i64 4
store i8* %9, i8** %4
%10 = load i8*, i8** %4
store i8* %10, i8** %3
%11 = load i8*, i8** %3
%12 = call i8* @strtok(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
store i8* %12, i8** %3
%13 = load i8*, i8** %3
ret i8* %13
}

LLVM IR (-O2):
@.str = [2 x i8] c" \00"
define i8* @get_URL_from_request(i8* nocapture %0) {
%2 = tail call i8* @strdup(i8* %0)
%3 = getelementptr i8, i8* %2, i64 4
%4 = tail call i8* @strtok(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i8* %4
}
/* Variables and functions */
int /*<<< orphan*/ USB0_DriverIRQHandler();
__attribute__((weak)) void USB0_IRQHandler(void) { USB0_DriverIRQHandler(); }


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

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

LLVM IR (-O0):
define weak void @USB0_IRQHandler() {
%1 = call i32 (...) @USB0_DriverIRQHandler()
ret void
}

LLVM IR (-O2):
define weak void @USB0_IRQHandler() {
%1 = tail call i32 (...) @USB0_DriverIRQHandler()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ calloc(size_t, int);
scalar_t__ memcpy(int /*<<< orphan*/, char const *, size_t);
char *substr(const char *str, size_t len) {
  return (char *)memcpy(calloc(len + 1, sizeof(char)), str, len);
}


x86 assembly (clang, -O0):
<substr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x1,%rdi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
call   1040 <memcpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<substr>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
lea    0x1(%rsi),%rdi
mov    $0x1,%esi
call   1030 <calloc@plt>
mov    %eax,%edi
mov    %r14,%rsi
mov    %rbx,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <memcpy@plt>

LLVM IR (-O0):
define i8* @substr(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = add i64 %5, 1
%7 = call i32 @calloc(i64 %6, i32 1)
%8 = load i8*, i8** %3
%9 = load i64, i64* %4
%10 = call i64 @memcpy(i32 %7, i8* %8, i64 %9)
%11 = inttoptr i64 %10 to i8*
ret i8* %11
}

LLVM IR (-O2):
define i8* @substr(i8* %0, i64 %1) {
%3 = add i64 %1, 1
%4 = tail call i32 @calloc(i64 %3, i32 1)
%5 = tail call i64 @memcpy(i32 %4, i8* %0, i64 %1)
%6 = inttoptr i64 %5 to i8*
ret i8* %6
}
/* Variables and functions */
float __ocml_fdim_f32(float, float);
float fdimf(float x, float y) { return __ocml_fdim_f32(x, y); }


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

x86 assembly (clang, -O2):
<fdimf>:
jmp    1030 <__ocml_fdim_f32@plt>

LLVM IR (-O0):
define float @fdimf(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load float, float* %3
%6 = load float, float* %4
%7 = call float @__ocml_fdim_f32(float %5, float %6)
ret float %7
}

LLVM IR (-O2):
define float @fdimf(float %0, float %1) {
%3 = tail call float @__ocml_fdim_f32(float %0, float %1)
ret float %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
main(int argc, char *argv[]) {
  int i;
  for (i = 1; i < argc; i++)
    printf("%s", argv[i]);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    115f <main+0x4f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    112d <main+0x1d>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
cmp    $0x2,%edi
jl     1145 <main+0x35>
mov    %rsi,%r15
mov    %edi,%r12d
mov    $0x1,%ebx
lea    0xed1(%rip),%r14
nop
mov    (%r15,%rbx,8),%rsi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <main+0x20>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %0 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 1, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i8*, i8** %1, i64 %7
%9 = load i8*, i8** %8
%10 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8* %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ DIR_Scan();
int /*<<< orphan*/ IRC_Connect();
int /*<<< orphan*/ IRC_Disconnect();
int /*<<< orphan*/ IRC_Login();
int /*<<< orphan*/ RunMainLoop();
int /*<<< orphan*/ parseCommandline(int, char **);
int /*<<< orphan*/ setDefaults();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
int main(int argc, char **argv) {
  parseCommandline(argc, argv);
  srand(time(NULL));
  setDefaults();
  DIR_Scan();
  IRC_Connect();
  IRC_Login();
  RunMainLoop();
  IRC_Disconnect();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1080 <parseCommandline@plt>
xor    %eax,%eax
mov    %eax,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
mov    $0x0,%al
call   10b0 <setDefaults@plt>
mov    $0x0,%al
call   1090 <DIR_Scan@plt>
mov    $0x0,%al
call   1040 <IRC_Connect@plt>
mov    $0x0,%al
call   1060 <IRC_Login@plt>
mov    $0x0,%al
call   10a0 <RunMainLoop@plt>
mov    $0x0,%al
call   1030 <IRC_Disconnect@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
call   1080 <parseCommandline@plt>
xor    %edi,%edi
call   1070 <time@plt>
mov    %eax,%edi
call   1050 <srand@plt>
xor    %eax,%eax
call   10b0 <setDefaults@plt>
xor    %eax,%eax
call   1090 <DIR_Scan@plt>
xor    %eax,%eax
call   1040 <IRC_Connect@plt>
xor    %eax,%eax
call   1060 <IRC_Login@plt>
xor    %eax,%eax
call   10a0 <RunMainLoop@plt>
xor    %eax,%eax
call   1030 <IRC_Disconnect@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i32, i32* %4
%7 = load i8**, i8*** %5
%8 = call i32 @parseCommandline(i32 %6, i8** %7)
%9 = call i32 @time(i32* null)
%10 = call i32 @srand(i32 %9)
%11 = call i32 (...) @setDefaults()
%12 = call i32 (...) @DIR_Scan()
%13 = call i32 (...) @IRC_Connect()
%14 = call i32 (...) @IRC_Login()
%15 = call i32 (...) @RunMainLoop()
%16 = call i32 (...) @IRC_Disconnect()
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @parseCommandline(i32 %0, i8** %1)
%4 = tail call i32 @time(i32* null)
%5 = tail call i32 @srand(i32 %4)
%6 = tail call i32 (...) @setDefaults()
%7 = tail call i32 (...) @DIR_Scan()
%8 = tail call i32 (...) @IRC_Connect()
%9 = tail call i32 (...) @IRC_Login()
%10 = tail call i32 (...) @RunMainLoop()
%11 = tail call i32 (...) @IRC_Disconnect()
ret i32 0
}
/* Type definitions */
struct passwd {
  int pw_gid;
};

/* Variables and functions */
int posix___Passwd_gid___impl(struct passwd *recv) { return recv->pw_gid; }


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

x86 assembly (clang, -O2):
<posix___Passwd_gid___impl>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.passwd = type { i32 }
define i32 @posix___Passwd_gid___impl(%struct.passwd* %0) {
%2 = alloca %struct.passwd*
store %struct.passwd* %0, %struct.passwd** %2
%3 = load %struct.passwd*, %struct.passwd** %2
%4 = getelementptr inbounds %struct.passwd, %struct.passwd* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.passwd = type { i32 }
define i32 @posix___Passwd_gid___impl(%struct.passwd* nocapture %0) {
%2 = getelementptr inbounds %struct.passwd, %struct.passwd* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, double);
double sin(int);
int main(int argc, const char *argv[]) {
  printf("sine of 1 in radians is: %.3f\n", sin(1));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
call   1040 <sin@plt>
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"sine of 1 in radians is: %.3f\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call double @sin(i32 1)
%7 = call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %6)
ret i32 0
}

LLVM IR (-O2):
@.str = [31 x i8] c"sine of 1 in radians is: %.3f\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call double @sin(i32 1)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
int test_imm_F9uint32_mem(unsigned int *val) {
  return ((*val) & (0xF9 << 0)) ? -20 : -40;
}


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

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

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

LLVM IR (-O2):
define i32 @test_imm_F9uint32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 249
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct SN_env {
  int dummy;
};

/* Variables and functions */
struct SN_env *SN_create_env(int /*<<< orphan*/, int, int /*<<< orphan*/);
extern struct SN_env *hungarian_UTF_8_create_env(void) {
  return SN_create_env(0, 1, 0);
}


x86 assembly (clang, -O0):
<hungarian_UTF_8_create_env>:
push   %rbp
mov    %rsp,%rbp
xor    %edx,%edx
mov    $0x1,%esi
mov    %edx,%edi
call   1030 <SN_create_env@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hungarian_UTF_8_create_env>:
xor    %edi,%edi
mov    $0x1,%esi
xor    %edx,%edx
jmp    1030 <SN_create_env@plt>

LLVM IR (-O0):
%struct.SN_env = type { i32 }
define %struct.SN_env* @hungarian_UTF_8_create_env() {
%1 = call %struct.SN_env* @SN_create_env(i32 0, i32 1, i32 0)
ret %struct.SN_env* %1
}

LLVM IR (-O2):
%struct.SN_env = type { i32 }
define %struct.SN_env* @hungarian_UTF_8_create_env() {
%1 = tail call %struct.SN_env* @SN_create_env(i32 0, i32 1, i32 0)
ret %struct.SN_env* %1
}
int XWidthOfScreen() {}


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

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

LLVM IR (-O0):
define i32 @XWidthOfScreen() {
%1 = alloca i32
%2 = load i32, i32* %1
ret i32 %2
}

LLVM IR (-O2):
define i32 @XWidthOfScreen() {
ret i32 undef
}
int rcu_read_lock_bh_held(void) { return 1; }


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

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

LLVM IR (-O0):
define i32 @rcu_read_lock_bh_held() {
ret i32 1
}

LLVM IR (-O2):
define i32 @rcu_read_lock_bh_held() {
ret i32 1
}