xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ scanf(char *, int *);
int ler_dados() {
  int cod;
  printf("Digite o codigo:");
  scanf("%d", &cod);
  return cod;
}


x86 assembly (clang, -O0):
<ler_dados>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed1(%rip),%rdi
call   1030 <printf@plt>
lea    0xed6(%rip),%rdi
lea    -0x4(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ler_dados>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
lea    0xedd(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [17 x i8] c"Digite o codigo:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @ler_dados() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
ret i32 %4
}

LLVM IR (-O2):
@.str = [17 x i8] c"Digite o codigo:\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @ler_dados() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
ret i32 %5
}
int do_172() { return 172; }


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

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

LLVM IR (-O0):
define i32 @do_172() {
ret i32 172
}

LLVM IR (-O2):
define i32 @do_172() {
ret i32 172
}
/* Variables and functions */
int /*<<< orphan*/ fatal(int, char *, char const *);
char *get_opt_arg(const char *option, char *arg) {
  if (!arg) {
    fatal(2, "missing argument for option %s", option);
  }
  return arg;
}


x86 assembly (clang, -O0):
<get_opt_arg>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1140 <get_opt_arg+0x30>
mov    -0x8(%rbp),%rdx
mov    $0x2,%edi
lea    0xec5(%rip),%rsi
call   1030 <fatal@plt>
mov    -0x10(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_opt_arg>:
push   %rbx
mov    %rsi,%rbx
test   %rsi,%rsi
jne    112d <get_opt_arg+0x1d>
mov    %rdi,%rdx
lea    0xedd(%rip),%rsi
mov    $0x2,%edi
call   1030 <fatal@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [31 x i8] c"missing argument for option %s\00"
define i8* @get_opt_arg(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = icmp ne i8* %5, null
br i1 %6, label %10, label %7
7: ; preds = %2
%8 = load i8*, i8** %3
%9 = call i32 @fatal(i32 2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %8)
br label %10
10: ; preds = %7, %2
%11 = load i8*, i8** %4
ret i8* %11
}

LLVM IR (-O2):
@.str = [31 x i8] c"missing argument for option %s\00"
define i8* @get_opt_arg(i8* %0, i8* readnone returned %1) {
%3 = icmp eq i8* %1, null
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @fatal(i32 2, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %6
6: ; preds = %4, %2
ret i8* %1
}
unsigned int gnu_dev_minor(unsigned long long int __dev) {
  return (unsigned int)(__dev & (unsigned long int)255 |
                        (unsigned long int)((unsigned int)(__dev >> 12) &
                                            (unsigned int)~255));
}


x86 assembly (clang, -O0):
<gnu_dev_minor>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xff,%rax
mov    -0x8(%rbp),%rcx
shr    $0xc,%rcx
and    $0xffffff00,%ecx
mov    %ecx,%ecx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gnu_dev_minor>:
movzbl %dil,%eax
shr    $0xc,%rdi
and    $0xffffff00,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @gnu_dev_minor(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 255
%5 = load i64, i64* %2
%6 = lshr i64 %5, 12
%7 = trunc i64 %6 to i32
%8 = and i32 %7, -256
%9 = zext i32 %8 to i64
%10 = or i64 %4, %9
%11 = trunc i64 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @gnu_dev_minor(i64 %0) {
%2 = and i64 %0, 255
%3 = lshr i64 %0, 12
%4 = and i64 %3, 4294967040
%5 = or i64 %4, %2
%6 = trunc i64 %5 to i32
ret i32 %6
}
/* Variables and functions */
int /*<<< orphan*/ fmax(double, double);
double log(double);
int sqrt(int /*<<< orphan*/);
double saltCorrectS(double mv, double dv, double dntp) {
  if (dv <= 0)
    dntp = dv;
  return 0.368 * ((log((mv + 120 * (sqrt(fmax(0.0, dv - dntp)))) / 1000)));
}


x86 assembly (clang, -O0):
<saltCorrectS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jb     115f <saltCorrectS+0x2f>
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm1
subsd  -0x18(%rbp),%xmm1
xorps  %xmm0,%xmm0
call   1030 <fmax@plt>
mov    %eax,%edi
call   1050 <sqrt@plt>
movsd  -0x20(%rbp),%xmm0
imul   $0x78,%eax,%eax
cvtsi2sd %eax,%xmm1
addsd  %xmm1,%xmm0
movsd  0xe6e(%rip),%xmm1
divsd  %xmm1,%xmm0
call   1040 <log@plt>
movaps %xmm0,%xmm1
movsd  0xe52(%rip),%xmm0
mulsd  %xmm1,%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<saltCorrectS>:
push   %rax
movsd  %xmm0,(%rsp)
xorpd  %xmm0,%xmm0
movapd %xmm1,%xmm3
cmpnlesd %xmm0,%xmm3
andpd  %xmm3,%xmm2
andnpd %xmm1,%xmm3
orpd   %xmm2,%xmm3
subsd  %xmm3,%xmm1
xorpd  %xmm0,%xmm0
call   1030 <fmax@plt>
mov    %eax,%edi
call   1050 <sqrt@plt>
imul   $0x78,%eax,%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
addsd  (%rsp),%xmm0
divsd  0xe86(%rip),%xmm0
call   1040 <log@plt>
mulsd  0xe81(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @saltCorrectS(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* %5
%8 = fcmp ole double %7, 0.000000e+00
br i1 %8, label %9, label %11
9: ; preds = %3
%10 = load double, double* %5
store double %10, double* %6
br label %11
11: ; preds = %9, %3
%12 = load double, double* %4
%13 = load double, double* %5
%14 = load double, double* %6
%15 = fsub double %13, %14
%16 = call i32 @fmax(double 0.000000e+00, double %15)
%17 = call i32 @sqrt(i32 %16)
%18 = mul nsw i32 120, %17
%19 = sitofp i32 %18 to double
%20 = fadd double %12, %19
%21 = fdiv double %20, 1.000000e+03
%22 = call double @log(double %21)
%23 = fmul double 3.680000e-01, %22
ret double %23
}

LLVM IR (-O2):
define double @saltCorrectS(double %0, double %1, double %2) {
%4 = fcmp ugt double %1, 0.000000e+00
%5 = select i1 %4, double %2, double %1
%6 = fsub double %1, %5
%7 = tail call i32 @fmax(double 0.000000e+00, double %6)
%8 = tail call i32 @sqrt(i32 %7)
%9 = mul nsw i32 %8, 120
%10 = sitofp i32 %9 to double
%11 = fadd double %10, %0
%12 = fdiv double %11, 1.000000e+03
%13 = tail call double @log(double %12)
%14 = fmul double %13, 3.680000e-01
ret double %14
}
/* Variables and functions */
int /*<<< orphan*/ usleep(unsigned int);
void delay(unsigned int delay) { usleep(delay); }


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

x86 assembly (clang, -O2):
<delay>:
jmp    1030 <usleep@plt>

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

LLVM IR (-O2):
define void @delay(i32 %0) {
%2 = tail call i32 @usleep(i32 %0)
ret void
}
void testfunc_00(const char *ap, char *bp) {
  bp[0] = ap[15];
  bp[2] = ap[5];
  bp[9] = ap[7];
  bp[0] = ap[25];
  bp[1] = ap[26];
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0xf(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x5(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x2(%rax)
mov    -0x8(%rbp),%rax
mov    0x7(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x9(%rax)
mov    -0x8(%rbp),%rax
mov    0x19(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    0x1a(%rax),%cl
mov    -0x10(%rbp),%rax
mov    %cl,0x1(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
mov    0xf(%rdi),%al
mov    %al,(%rsi)
mov    0x5(%rdi),%al
mov    %al,0x2(%rsi)
mov    0x7(%rdi),%al
mov    %al,0x9(%rsi)
mov    0x19(%rdi),%al
mov    %al,(%rsi)
mov    0x1a(%rdi),%al
mov    %al,0x1(%rsi)
ret

LLVM IR (-O0):
define void @testfunc_00(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 = getelementptr inbounds i8, i8* %5, i64 15
%7 = load i8, i8* %6
%8 = load i8*, i8** %4
%9 = getelementptr inbounds i8, i8* %8, i64 0
store i8 %7, i8* %9
%10 = load i8*, i8** %3
%11 = getelementptr inbounds i8, i8* %10, i64 5
%12 = load i8, i8* %11
%13 = load i8*, i8** %4
%14 = getelementptr inbounds i8, i8* %13, i64 2
store i8 %12, i8* %14
%15 = load i8*, i8** %3
%16 = getelementptr inbounds i8, i8* %15, i64 7
%17 = load i8, i8* %16
%18 = load i8*, i8** %4
%19 = getelementptr inbounds i8, i8* %18, i64 9
store i8 %17, i8* %19
%20 = load i8*, i8** %3
%21 = getelementptr inbounds i8, i8* %20, i64 25
%22 = load i8, i8* %21
%23 = load i8*, i8** %4
%24 = getelementptr inbounds i8, i8* %23, i64 0
store i8 %22, i8* %24
%25 = load i8*, i8** %3
%26 = getelementptr inbounds i8, i8* %25, i64 26
%27 = load i8, i8* %26
%28 = load i8*, i8** %4
%29 = getelementptr inbounds i8, i8* %28, i64 1
store i8 %27, i8* %29
ret void
}

LLVM IR (-O2):
define void @testfunc_00(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 15
%4 = load i8, i8* %3
store i8 %4, i8* %1
%5 = getelementptr inbounds i8, i8* %0, i64 5
%6 = load i8, i8* %5
%7 = getelementptr inbounds i8, i8* %1, i64 2
store i8 %6, i8* %7
%8 = getelementptr inbounds i8, i8* %0, i64 7
%9 = load i8, i8* %8
%10 = getelementptr inbounds i8, i8* %1, i64 9
store i8 %9, i8* %10
%11 = getelementptr inbounds i8, i8* %0, i64 25
%12 = load i8, i8* %11
store i8 %12, i8* %1
%13 = getelementptr inbounds i8, i8* %0, i64 26
%14 = load i8, i8* %13
%15 = getelementptr inbounds i8, i8* %1, i64 1
store i8 %14, i8* %15
ret void
}
/* Type definitions */
struct vec2i {
  int dummy;
};
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
float vec2i_distance(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
__attribute__((always_)) float psvec2i_distance(struct vec2i *a,
                                                struct vec2i *b) {
  return vec2i_distance((int32_t *)a, (int32_t *)b);
}


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

x86 assembly (clang, -O2):
<psvec2i_distance>:
jmp    1030 <vec2i_distance@plt>

LLVM IR (-O0):
%struct.vec2i = type { i32 }
define float @psvec2i_distance(%struct.vec2i* %0, %struct.vec2i* %1) {
%3 = alloca %struct.vec2i*
%4 = alloca %struct.vec2i*
store %struct.vec2i* %0, %struct.vec2i** %3
store %struct.vec2i* %1, %struct.vec2i** %4
%5 = load %struct.vec2i*, %struct.vec2i** %3
%6 = bitcast %struct.vec2i* %5 to i32*
%7 = load %struct.vec2i*, %struct.vec2i** %4
%8 = bitcast %struct.vec2i* %7 to i32*
%9 = call float @vec2i_distance(i32* %6, i32* %8)
ret float %9
}

LLVM IR (-O2):
%struct.vec2i = type { i32 }
define float @psvec2i_distance(%struct.vec2i* %0, %struct.vec2i* %1) {
%3 = getelementptr %struct.vec2i, %struct.vec2i* %0, i64 0, i32 0
%4 = getelementptr %struct.vec2i, %struct.vec2i* %1, i64 0, i32 0
%5 = tail call float @vec2i_distance(i32* %3, i32* %4)
ret float %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ grabline(char *, int, int /*<<< orphan*/ *, char *);
void grabline_nocomment(char *buf, int buflen, FILE *f, char *errstr) {
start:
  grabline(buf, buflen, f, errstr);
  if (buf[0] == '#')
    goto start;
}


x86 assembly (clang, -O0):
<grabline_nocomment>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <grabline@plt>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x23,%eax
jne    1150 <grabline_nocomment+0x40>
jmp    1127 <grabline_nocomment+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<grabline_nocomment>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %esi,%ebp
mov    %rdi,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <grabline@plt>
cmpb   $0x23,(%rbx)
je     1130 <grabline_nocomment+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

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

LLVM IR (-O2):
define void @grabline_nocomment(i8* %0, i32 %1, i32* %2, i8* %3) {
br label %5
5: ; preds = %5, %4
%6 = tail call i32 @grabline(i8* %0, i32 %1, i32* %2, i8* %3)
%7 = load i8, i8* %0
%8 = icmp eq i8 %7, 35
br i1 %8, label %5, label %9
9: ; preds = %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
char *deepCopyStr(char *, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
void deepCopyStrTestB() {
  char *result = deepCopyStr("test string", 0);
  assert(result && result[0] == '\0');
  printf("Test successful.\n");
}


x86 assembly (clang, -O0):
<deepCopyStrTestB>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
xor    %esi,%esi
call   1050 <deepCopyStr@plt>
mov    %rax,-0x8(%rbp)
xor    %eax,%eax
cmpq   $0x0,-0x8(%rbp)
mov    %al,-0x9(%rbp)
je     116a <deepCopyStrTestB+0x3a>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
sete   %al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1040 <assert@plt>
lea    0xe8e(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deepCopyStrTestB>:
push   %rbx
lea    0xec8(%rip),%rdi
xor    %ebx,%ebx
xor    %esi,%esi
call   1050 <deepCopyStr@plt>
test   %rax,%rax
je     114e <deepCopyStrTestB+0x1e>
xor    %ebx,%ebx
cmpb   $0x0,(%rax)
sete   %bl
mov    %ebx,%edi
call   1040 <assert@plt>
lea    0xeb0(%rip),%rdi
pop    %rbx
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"test string\00"
@.str.1 = [18 x i8] c"Test successful.\0A\00"
define void @deepCopyStrTestB() {
%1 = alloca i8*
%2 = call i8* @deepCopyStr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0)
store i8* %2, i8** %1
%3 = load i8*, i8** %1
%4 = icmp ne i8* %3, null
br i1 %4, label %5, label %11
5: ; preds = %0
%6 = load i8*, i8** %1
%7 = getelementptr inbounds i8, i8* %6, i64 0
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp eq i32 %9, 0
br label %11
11: ; preds = %5, %0
%12 = phi i1 [ false, %0 ], [ %10, %5 ]
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"test string\00"
@str = [17 x i8] c"Test successful.\00"
define void @deepCopyStrTestB() {
%1 = tail call i8* @deepCopyStr(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 0)
%2 = icmp eq i8* %1, null
br i1 %2, label %7, label %3
3: ; preds = %0
%4 = load i8, i8* %1
%5 = icmp eq i8 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %0
%8 = phi i32 [ 0, %0 ], [ %6, %3 ]
%9 = tail call i32 @assert(i32 %8)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([17 x i8], [17 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
double julian_yyyy_mm_dd_time_hhmm_to_julian(char *, char *);
double julian_yyyy_mm_dd_to_julian(char *yyyy_mm_dd) {
  return julian_yyyy_mm_dd_time_hhmm_to_julian(yyyy_mm_dd, "0000");
}


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

x86 assembly (clang, -O2):
<julian_yyyy_mm_dd_to_julian>:
lea    0xee9(%rip),%rsi
jmp    1030 <julian_yyyy_mm_dd_time_hhmm_to_julian@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"0000\00"
define double @julian_yyyy_mm_dd_to_julian(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call double @julian_yyyy_mm_dd_time_hhmm_to_julian(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret double %4
}

LLVM IR (-O2):
@.str = [5 x i8] c"0000\00"
define double @julian_yyyy_mm_dd_to_julian(i8* %0) {
%2 = tail call double @julian_yyyy_mm_dd_time_hhmm_to_julian(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int XCreateFontSet() {
  printf("XCreateFontSet called\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [22 x i8] c"XCreateFontSet called\00"
define i32 @XCreateFontSet() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @str, i64 0, i64 0))
ret i32 0
}
ISR(TIMER1_CAPT_vect) {
  DEBUG("ISR "
        "TIMER1_CAPT"
        " occured");
}


x86 assembly (clang, -O0):
<ISR>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
lea    0xede(%rip),%rdi
mov    $0x0,%al
call   1030 <DEBUG@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ISR>:
lea    0xee9(%rip),%rdi
xor    %eax,%eax
jmp    1030 <DEBUG@plt>

LLVM IR (-O0):
@.str = [24 x i8] c"ISR TIMER1_CAPT occured\00"
define i32 @ISR(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* %2
ret i32 %5
}

LLVM IR (-O2):
@.str = [24 x i8] c"ISR TIMER1_CAPT occured\00"
define i32 @ISR(i32 %0) {
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @DEBUG to i32 (i8*, ...)*)(i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
double sin_taylor4(const double x) {
  const double x2 = x * x;
  const double x3 = x * x2;
  const double x5 = x3 * x2;
  const double x7 = x5 * x2;
  return x - x3 * (1.0 / 6) + x5 * (1.0 / 120) - x7 * (1.0 / 5040);
}


x86 assembly (clang, -O0):
<sin_taylor4>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x8(%rbp),%xmm1
movsd  -0x18(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xea2(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
movsd  -0x20(%rbp),%xmm1
movsd  0xe85(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movsd  -0x28(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xe51(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<sin_taylor4>:
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm1,%xmm2
mulsd  %xmm0,%xmm2
movapd %xmm1,%xmm3
mulsd  %xmm2,%xmm3
mulsd  0xee0(%rip),%xmm2
addsd  %xmm2,%xmm0
mulsd  %xmm3,%xmm1
mulsd  0xed8(%rip),%xmm3
addsd  %xmm3,%xmm0
mulsd  0xed4(%rip),%xmm1
addsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @sin_taylor4(double %0) {
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
%6 = alloca double
store double %0, double* %2
%7 = load double, double* %2
%8 = load double, double* %2
%9 = fmul double %7, %8
store double %9, double* %3
%10 = load double, double* %2
%11 = load double, double* %3
%12 = fmul double %10, %11
store double %12, double* %4
%13 = load double, double* %4
%14 = load double, double* %3
%15 = fmul double %13, %14
store double %15, double* %5
%16 = load double, double* %5
%17 = load double, double* %3
%18 = fmul double %16, %17
store double %18, double* %6
%19 = load double, double* %2
%20 = load double, double* %4
%21 = fneg double %20
%22 = call double @llvm.fmuladd.f64(double %21, double 0x3FC5555555555555, double %19)
%23 = load double, double* %5
%24 = call double @llvm.fmuladd.f64(double %23, double 0x3F81111111111111, double %22)
%25 = load double, double* %6
%26 = fneg double %25
%27 = call double @llvm.fmuladd.f64(double %26, double 0x3F2A01A01A01A01A, double %24)
ret double %27
}

LLVM IR (-O2):
define double @sin_taylor4(double %0) {
%2 = fmul double %0, %0
%3 = fmul double %2, %0
%4 = fmul double %2, %3
%5 = fneg double %3
%6 = tail call double @llvm.fmuladd.f64(double %5, double 0x3FC5555555555555, double %0)
%7 = tail call double @llvm.fmuladd.f64(double %4, double 0x3F81111111111111, double %6)
%8 = fneg double %4
%9 = fmul double %2, %8
%10 = tail call double @llvm.fmuladd.f64(double %9, double 0x3F2A01A01A01A01A, double %7)
ret double %10
}
int test_imm_DAint64_highword_mem(long long *val) {
  return ((*val >> 32) & (0xDA << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_DAint64_highword_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdx
sar    $0x20,%rdx
and    $0xda,%rdx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @test_imm_DAint64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 936302870528
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ SteamAPI_RunCallbacks();
void Steam_RunCallbacks(void) { SteamAPI_RunCallbacks(); }


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

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

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

LLVM IR (-O2):
define void @Steam_RunCallbacks() {
%1 = tail call i32 (...) @SteamAPI_RunCallbacks()
ret void
}
int fun120() { return 120; }


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

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

LLVM IR (-O0):
define i32 @fun120() {
ret i32 120
}

LLVM IR (-O2):
define i32 @fun120() {
ret i32 120
}
/* Variables and functions */
int bic(int /*<<< orphan*/, int);
int bis(int, int);
int bool_xor(int x, int y) {
  int result = bis(bic(~0, bis(bic(~0, x), y)), bic(~0, bis(x, bic(~0, y))));
  return result;
}


x86 assembly (clang, -O0):
<bool_xor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%esi
mov    $0xffffffff,%edi
call   1030 <bic@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%esi
call   1040 <bis@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1030 <bic@plt>
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%esi
mov    $0xffffffff,%edi
call   1030 <bic@plt>
mov    -0x14(%rbp),%edi
mov    %eax,%esi
call   1040 <bis@plt>
mov    %eax,%esi
mov    $0xffffffff,%edi
call   1030 <bic@plt>
mov    -0x10(%rbp),%edi
mov    %eax,%esi
call   1040 <bis@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bool_xor>:
push   %rbp
push   %r14
push   %rbx
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0xffffffff,%edi
mov    %ebp,%esi
call   1030 <bic@plt>
mov    %eax,%edi
mov    %ebx,%esi
call   1040 <bis@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1030 <bic@plt>
mov    %eax,%r14d
mov    $0xffffffff,%edi
mov    %ebx,%esi
call   1030 <bic@plt>
mov    %ebp,%edi
mov    %eax,%esi
call   1040 <bis@plt>
mov    $0xffffffff,%edi
mov    %eax,%esi
call   1030 <bic@plt>
mov    %r14d,%edi
mov    %eax,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <bis@plt>

LLVM IR (-O0):
define i32 @bool_xor(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @bic(i32 -1, i32 %6)
%8 = load i32, i32* %4
%9 = call i32 @bis(i32 %7, i32 %8)
%10 = call i32 @bic(i32 -1, i32 %9)
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = call i32 @bic(i32 -1, i32 %12)
%14 = call i32 @bis(i32 %11, i32 %13)
%15 = call i32 @bic(i32 -1, i32 %14)
%16 = call i32 @bis(i32 %10, i32 %15)
store i32 %16, i32* %5
%17 = load i32, i32* %5
ret i32 %17
}

LLVM IR (-O2):
define i32 @bool_xor(i32 %0, i32 %1) {
%3 = tail call i32 @bic(i32 -1, i32 %0)
%4 = tail call i32 @bis(i32 %3, i32 %1)
%5 = tail call i32 @bic(i32 -1, i32 %4)
%6 = tail call i32 @bic(i32 -1, i32 %1)
%7 = tail call i32 @bis(i32 %0, i32 %6)
%8 = tail call i32 @bic(i32 -1, i32 %7)
%9 = tail call i32 @bis(i32 %5, i32 %8)
ret i32 %9
}
long math___Int_bor___impl(long self, long i) { return self | i; }


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

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

LLVM IR (-O0):
define i64 @math___Int_bor___impl(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 = or i64 %5, %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @math___Int_bor___impl(i64 %0, i64 %1) {
%3 = or i64 %1, %0
ret i64 %3
}
/* Variables and functions */
int /*<<< orphan*/ collect_register_by_name(char *, unsigned long *);
int cris_stopped_by_watchpoint(void) {
  unsigned long exs;
  collect_register_by_name("exs", &exs);
  return (((exs & 0xff00) >> 8) == 0xc);
}


x86 assembly (clang, -O0):
<cris_stopped_by_watchpoint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xee1(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1030 <collect_register_by_name@plt>
mov    -0x8(%rbp),%rax
and    $0xff00,%rax
shr    $0x8,%rax
cmp    $0xc,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cris_stopped_by_watchpoint>:
push   %rax
lea    0xee8(%rip),%rdi
mov    %rsp,%rsi
call   1030 <collect_register_by_name@plt>
movzbl 0x1(%rsp),%ecx
shl    $0x8,%ecx
xor    %eax,%eax
cmp    $0xc00,%ecx
sete   %al
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"exs\00"
define i32 @cris_stopped_by_watchpoint() {
%1 = alloca i64
%2 = call i32 @collect_register_by_name(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%3 = load i64, i64* %1
%4 = and i64 %3, 65280
%5 = lshr i64 %4, 8
%6 = icmp eq i64 %5, 12
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@.str = [4 x i8] c"exs\00"
define i32 @cris_stopped_by_watchpoint() {
%1 = alloca i64
%2 = bitcast i64* %1 to i8*
%3 = call i32 @collect_register_by_name(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %1)
%4 = load i64, i64* %1
%5 = and i64 %4, 65280
%6 = icmp eq i64 %5, 3072
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Type definitions */
typedef int uint32_t;
typedef int int32_t;

/* Variables and functions */
int32_t div_s32_by_2_25(const int32_t v) {
  const int32_t roundoff = ((uint32_t)(v >> 31)) >> 7;
  return (v + roundoff) >> 25;
}


x86 assembly (clang, -O0):
<div_s32_by_2_25>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
sar    $0x7,%eax
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    -0x8(%rbp),%eax
sar    $0x19,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<div_s32_by_2_25>:
mov    %edi,%eax
sar    $0x1f,%eax
add    %edi,%eax
sar    $0x19,%eax
ret

LLVM IR (-O0):
define i32 @div_s32_by_2_25(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = ashr i32 %4, 31
%6 = ashr i32 %5, 7
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* %3
%9 = add nsw i32 %7, %8
%10 = ashr i32 %9, 25
ret i32 %10
}

LLVM IR (-O2):
define i32 @div_s32_by_2_25(i32 %0) {
%2 = ashr i32 %0, 31
%3 = add nsw i32 %2, %0
%4 = ashr i32 %3, 25
ret i32 %4
}
/* Type definitions */
typedef scalar_t__ uint64_t;

/* Variables and functions */
int compare_uint64_ptr(void *a, void *b) {
  uint64_t *sa = (uint64_t *)a;
  uint64_t *sb = (uint64_t *)b;
  if (*sa > *sb) {
    return 1;
  }
  if (*sa < *sb) {
    return -1;
  }
  return 0;
}


x86 assembly (clang, -O0):
<compare_uint64_ptr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jle    113c <compare_uint64_ptr+0x3c>
movl   $0x1,-0x4(%rbp)
jmp    1163 <compare_uint64_ptr+0x63>
mov    -0x20(%rbp),%rax
mov    (%rax),%rax
mov    -0x28(%rbp),%rcx
cmp    (%rcx),%rax
jge    115c <compare_uint64_ptr+0x5c>
movl   $0xffffffff,-0x4(%rbp)
jmp    1163 <compare_uint64_ptr+0x63>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<compare_uint64_ptr>:
mov    (%rdi),%rax
mov    (%rsi),%rcx
xor    %edx,%edx
cmp    %rcx,%rax
setl   %dl
neg    %edx
cmp    %rcx,%rax
mov    $0x1,%eax
cmovle %edx,%eax
ret

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

LLVM IR (-O2):
define i32 @compare_uint64_ptr(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i64*
%4 = bitcast i8* %1 to i64*
%5 = load i64, i64* %3
%6 = load i64, i64* %4
%7 = icmp sgt i64 %5, %6
%8 = icmp slt i64 %5, %6
%9 = sext i1 %8 to i32
%10 = select i1 %7, i32 1, i32 %9
ret i32 %10
}
int btesh2_clamp255(int v) {
  if (v < 0)
    return (0);
  if (v > 255)
    return (255);
  return (v);
}


x86 assembly (clang, -O0):
<btesh2_clamp255>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jge    111d <btesh2_clamp255+0x1d>
movl   $0x0,-0x4(%rbp)
jmp    113c <btesh2_clamp255+0x3c>
cmpl   $0xff,-0x8(%rbp)
jle    1136 <btesh2_clamp255+0x36>
movl   $0xff,-0x4(%rbp)
jmp    113c <btesh2_clamp255+0x3c>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<btesh2_clamp255>:
cmp    $0xff,%edi
mov    $0xff,%ecx
cmovl  %edi,%ecx
xor    %eax,%eax
test   %ecx,%ecx
cmovns %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @btesh2_clamp255(i32 %0) {
%2 = icmp slt i32 %0, 255
%3 = select i1 %2, i32 %0, i32 255
%4 = icmp sgt i32 %3, 0
%5 = select i1 %4, i32 %3, i32 0
ret i32 %5
}
/* Type definitions */
struct cstr_t {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ cstr_destroy(struct cstr_t *);
int /*<<< orphan*/ free(struct cstr_t *);
void cstr_free(struct cstr_t *v) {
  ;
  cstr_destroy(v);
  free(v);
  { return; };
}


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

x86 assembly (clang, -O2):
<cstr_free>:
push   %rbx
mov    %rdi,%rbx
call   1040 <cstr_destroy@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <free@plt>

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

LLVM IR (-O2):
%struct.cstr_t = type { i32 }
define void @cstr_free(%struct.cstr_t* %0) {
%2 = tail call i32 @cstr_destroy(%struct.cstr_t* %0)
%3 = tail call i32 @free(%struct.cstr_t* %0)
ret void
}
void foo697(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo697(i32 %0) {
ret void
}
int benchmark_fini() {
  ;
  return (0);
}


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

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

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

LLVM IR (-O2):
define i32 @benchmark_fini() {
ret i32 0
}
/* Variables and functions */
size_t align(size_t, size_t);
void *size(size_t);
void *allot(size_t n, size_t unit_sz, size_t log_lot) {
  return size(align(n, log_lot) * unit_sz);
}


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

x86 assembly (clang, -O2):
<allot>:
push   %rbx
mov    %rsi,%rbx
mov    %rdx,%rsi
call   1040 <align@plt>
imul   %rax,%rbx
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <size@plt>

LLVM IR (-O0):
define i8* @allot(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 = load i64, i64* %6
%9 = call i64 @align(i64 %7, i64 %8)
%10 = load i64, i64* %5
%11 = mul i64 %9, %10
%12 = call i8* @size(i64 %11)
ret i8* %12
}

LLVM IR (-O2):
define i8* @allot(i64 %0, i64 %1, i64 %2) {
%4 = tail call i64 @align(i64 %0, i64 %2)
%5 = mul i64 %4, %1
%6 = tail call i8* @size(i64 %5)
ret i8* %6
}
/* Variables and functions */
int /*<<< orphan*/ feastinit_(int *);
void feastinit(int *feastparam) { feastinit_(feastparam); }


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

x86 assembly (clang, -O2):
<feastinit>:
jmp    1030 <feastinit_@plt>

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

LLVM IR (-O2):
define void @feastinit(i32* %0) {
%2 = tail call i32 @feastinit_(i32* %0)
ret void
}
void foo2(int a, int b) {
  for (; a < b; a += 4)
    ;
}


x86 assembly (clang, -O0):
<foo2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1129 <foo2+0x29>
jmp    111b <foo2+0x1b>
mov    -0x4(%rbp),%eax
add    $0x4,%eax
mov    %eax,-0x4(%rbp)
jmp    110a <foo2+0xa>
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @foo2(i32 %0, i32 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *progname) {
  fprintf(stderr, "Usage: %s [-h] [-n time] [-s signal] <command>\n", progname);
}


x86 assembly (clang, -O0):
<usage>:
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 <fprintf@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [48 x i8] c"Usage: %s [-h] [-n time] [-s signal] <command>\0A\00"
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %4)
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [48 x i8] c"Usage: %s [-h] [-n time] [-s signal] <command>\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
int dot(double v1[3], double v2[3], double *dot) {
  *dot = v1[0] * v2[0] + v1[1] * v2[1] + v1[2] * v2[2];
}


x86 assembly (clang, -O0):
<dot>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm0
mov    -0x18(%rbp),%rax
mulsd  0x8(%rax),%xmm0
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
mov    -0x10(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x18(%rbp),%rax
movsd  0x10(%rax),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
mov    -0x20(%rbp),%rax
movsd  %xmm0,(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<dot>:
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mulsd  0x8(%rsi),%xmm1
mulsd  (%rsi),%xmm0
addsd  %xmm1,%xmm0
movsd  0x10(%rdi),%xmm1
mulsd  0x10(%rsi),%xmm1
addsd  %xmm0,%xmm1
movsd  %xmm1,(%rdx)
ret

LLVM IR (-O0):
define i32 @dot(double* %0, double* %1, double* %2) {
%4 = alloca i32
%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** %5
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = load double*, double** %6
%12 = getelementptr inbounds double, double* %11, i64 0
%13 = load double, double* %12
%14 = load double*, double** %5
%15 = getelementptr inbounds double, double* %14, i64 1
%16 = load double, double* %15
%17 = load double*, double** %6
%18 = getelementptr inbounds double, double* %17, i64 1
%19 = load double, double* %18
%20 = fmul double %16, %19
%21 = call double @llvm.fmuladd.f64(double %10, double %13, double %20)
%22 = load double*, double** %5
%23 = getelementptr inbounds double, double* %22, i64 2
%24 = load double, double* %23
%25 = load double*, double** %6
%26 = getelementptr inbounds double, double* %25, i64 2
%27 = load double, double* %26
%28 = call double @llvm.fmuladd.f64(double %24, double %27, double %21)
%29 = load double*, double** %7
store double %28, double* %29
%30 = load i32, i32* %4
ret i32 %30
}

LLVM IR (-O2):
define i32 @dot(double* nocapture %0, double* nocapture %1, double* nocapture writeonly %2) {
%4 = load double, double* %0
%5 = load double, double* %1
%6 = getelementptr inbounds double, double* %0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds double, double* %1, i64 1
%9 = load double, double* %8
%10 = fmul double %7, %9
%11 = tail call double @llvm.fmuladd.f64(double %4, double %5, double %10)
%12 = getelementptr inbounds double, double* %0, i64 2
%13 = load double, double* %12
%14 = getelementptr inbounds double, double* %1, i64 2
%15 = load double, double* %14
%16 = tail call double @llvm.fmuladd.f64(double %13, double %15, double %11)
store double %16, double* %2
ret i32 undef
}
SP_CASE(imacro, imetamacro_foreach) {
  __ii__xx(0, "1");
  __ii__xx(1, "2");
  __ii__xx(2, "3");
  __ii__xx(3, "4");
}


x86 assembly (clang, -O0):
<SP_CASE>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
xor    %edi,%edi
lea    0xed9(%rip),%rsi
mov    $0x0,%al
call   1030 <__ii__xx@plt>
mov    $0x1,%edi
lea    0xec8(%rip),%rsi
mov    $0x0,%al
call   1030 <__ii__xx@plt>
mov    $0x2,%edi
lea    0xeb7(%rip),%rsi
mov    $0x0,%al
call   1030 <__ii__xx@plt>
mov    $0x3,%edi
lea    0xea6(%rip),%rsi
mov    $0x0,%al
call   1030 <__ii__xx@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SP_CASE>:
push   %rax
lea    0xee8(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
call   1030 <__ii__xx@plt>
lea    0xeda(%rip),%rsi
mov    $0x1,%edi
xor    %eax,%eax
call   1030 <__ii__xx@plt>
lea    0xec9(%rip),%rsi
mov    $0x2,%edi
xor    %eax,%eax
call   1030 <__ii__xx@plt>
lea    0xeb8(%rip),%rsi
mov    $0x3,%edi
xor    %eax,%eax
pop    %rcx
jmp    1030 <__ii__xx@plt>

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

LLVM IR (-O2):
@.str = [2 x i8] c"1\00"
@.str.1 = [2 x i8] c"2\00"
@.str.2 = [2 x i8] c"3\00"
@.str.3 = [2 x i8] c"4\00"
define i32 @SP_CASE(i32 %0, i32 %1) {
%3 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @__ii__xx to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @__ii__xx to i32 (i32, i8*, ...)*)(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @__ii__xx to i32 (i32, i8*, ...)*)(i32 2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%6 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @__ii__xx to i32 (i32, i8*, ...)*)(i32 3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ fork();
int /*<<< orphan*/ printf(char *);
int main(int argc, char const *argv[]) {
  fork();
  printf("Novo processo criado\n");
  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    $0x0,%al
call   1040 <fork@plt>
lea    0xebc(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <fork@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [22 x i8] c"Novo processo criado\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 i32 (...) @fork()
%7 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [21 x i8] c"Novo processo criado\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @fork()
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ cvmx_pow_tag_sw_null_nocheck();
int /*<<< orphan*/ cvmx_pow_tag_sw_wait();
void cvmx_pow_tag_sw_null(void) {
  cvmx_pow_tag_sw_wait();
  cvmx_pow_tag_sw_null_nocheck();
}


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

x86 assembly (clang, -O2):
<cvmx_pow_tag_sw_null>:
push   %rax
xor    %eax,%eax
call   1040 <cvmx_pow_tag_sw_wait@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <cvmx_pow_tag_sw_null_nocheck@plt>

LLVM IR (-O0):
define void @cvmx_pow_tag_sw_null() {
%1 = call i32 (...) @cvmx_pow_tag_sw_wait()
%2 = call i32 (...) @cvmx_pow_tag_sw_null_nocheck()
ret void
}

LLVM IR (-O2):
define void @cvmx_pow_tag_sw_null() {
%1 = tail call i32 (...) @cvmx_pow_tag_sw_wait()
%2 = tail call i32 (...) @cvmx_pow_tag_sw_null_nocheck()
ret void
}