xunge/DecIR huggingface dataset:
char *strcpy(char *s1, const char *s2) {
  char *save = s1;
  while ((*s1++ = *s2++) != '\0')
    ;
  return (save);
}


x86 assembly (clang, -O0):
<strcpy>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x10(%rbp)
mov    (%rax),%al
mov    -0x8(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %al,(%rcx)
movsbl %al,%eax
cmp    $0x0,%eax
je     1147 <strcpy+0x47>
jmp    1114 <strcpy+0x14>
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcpy>:
mov    %rdi,%rax
xor    %ecx,%ecx
cs nopw 0x0(%rax,%rax,1)
nop
movzbl (%rsi,%rcx,1),%edx
mov    %dl,(%rax,%rcx,1)
add    $0x1,%rcx
test   %dl,%dl
jne    1110 <strcpy+0x10>
ret

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

LLVM IR (-O2):
define i8* @strcpy(i8* returned writeonly %0, i8* nocapture %1) {
br label %3
3: ; preds = %3, %2
%4 = phi i8* [ %1, %2 ], [ %6, %3 ]
%5 = phi i8* [ %0, %2 ], [ %8, %3 ]
%6 = getelementptr inbounds i8, i8* %4, i64 1
%7 = load i8, i8* %4
%8 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %7, i8* %5
%9 = icmp eq i8 %7, 0
br i1 %9, label %10, label %3
10: ; preds = %3
ret i8* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ pthread_condattr_t;

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int pthread_condattr_setpshared(pthread_condattr_t *a, int b) { assert(0); }


x86 assembly (clang, -O0):
<pthread_condattr_setpshared>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
xor    %edi,%edi
call   1030 <assert@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pthread_condattr_setpshared>:
xor    %edi,%edi
jmp    1030 <assert@plt>

LLVM IR (-O0):
define i32 @pthread_condattr_setpshared(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 @assert(i32 0)
%7 = load i32, i32* %3
ret i32 %7
}

LLVM IR (-O2):
define i32 @pthread_condattr_setpshared(i32* nocapture readnone %0, i32 %1) {
%3 = tail call i32 @assert(i32 0)
ret i32 undef
}
int ld_blt_mm1(long double *a1, long double *a2) {
  return (__builtin_isless(*a1, *a2));
}


x86 assembly (clang, -O0):
<ld_blt_mm1>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
fldt   (%rax)
mov    -0x10(%rbp),%rax
fldt   (%rax)
fucomip %st(1),%st
fstp   %st(0)
seta   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ld_blt_mm1>:
fldt   (%rdi)
fldt   (%rsi)
xor    %eax,%eax
fucomip %st(1),%st
fstp   %st(0)
seta   %al
ret

LLVM IR (-O0):
define i32 @ld_blt_mm1(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* %5
%7 = load x86_fp80*, x86_fp80** %4
%8 = load x86_fp80, x86_fp80* %7
%9 = fcmp olt x86_fp80 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @ld_blt_mm1(x86_fp80* nocapture %0, x86_fp80* nocapture %1) {
%3 = load x86_fp80, x86_fp80* %0
%4 = load x86_fp80, x86_fp80* %1
%5 = fcmp olt x86_fp80 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
int f4(int a, int b) { return b ^ (b | a); }


x86 assembly (clang, -O0):
<f4>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    -0x8(%rbp),%ecx
or     -0x4(%rbp),%ecx
xor    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f4>:
mov    %esi,%eax
not    %eax
and    %edi,%eax
ret

LLVM IR (-O0):
define i32 @f4(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = or i32 %6, %7
%9 = xor i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @f4(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = and i32 %3, %0
ret i32 %4
}
/* Variables and functions */
int FastTimer(unsigned char);
unsigned long Timer(unsigned char Timer) { return FastTimer(Timer) / 10; }


x86 assembly (clang, -O0):
<Timer>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <FastTimer@plt>
mov    $0xa,%ecx
cltd
idiv   %ecx
cltq
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Timer>:
push   %rax
call   1030 <FastTimer@plt>
cltq
imul   $0x66666667,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x22,%rax
add    %ecx,%eax
cltq
pop    %rcx
ret

LLVM IR (-O0):
define i64 @Timer(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = call i32 @FastTimer(i8 zeroext %3)
%5 = sdiv i32 %4, 10
%6 = sext i32 %5 to i64
ret i64 %6
}

LLVM IR (-O2):
define i64 @Timer(i8 zeroext %0) {
%2 = tail call i32 @FastTimer(i8 zeroext %0)
%3 = sdiv i32 %2, 10
%4 = sext i32 %3 to i64
ret i64 %4
}
/* Variables and functions */
size_t tolower(int);
void __attribute__((always_)) re_set_fastmap(char *fastmap, int icase, int ch) {
  fastmap[ch] = 1;
  if (icase)
    fastmap[tolower(ch)] = 1;
}


x86 assembly (clang, -O0):
<re_set_fastmap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
movb   $0x1,(%rax,%rcx,1)
cmpl   $0x0,-0xc(%rbp)
je     1153 <re_set_fastmap+0x43>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%edi
call   1030 <tolower@plt>
mov    %rax,%rcx
mov    -0x18(%rbp),%rax
movb   $0x1,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<re_set_fastmap>:
push   %rbx
movslq %edx,%rax
movb   $0x1,(%rdi,%rax,1)
test   %esi,%esi
je     112a <re_set_fastmap+0x1a>
mov    %rdi,%rbx
mov    %edx,%edi
call   1030 <tolower@plt>
movb   $0x1,(%rbx,%rax,1)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @re_set_fastmap(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = sext i32 %2 to i64
%5 = getelementptr inbounds i8, i8* %0, i64 %4
store i8 1, i8* %5
%6 = icmp eq i32 %1, 0
br i1 %6, label %10, label %7
7: ; preds = %3
%8 = tail call i64 @tolower(i32 %2)
%9 = getelementptr inbounds i8, i8* %0, i64 %8
store i8 1, i8* %9
br label %10
10: ; preds = %7, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/);
int /*<<< orphan*/ stderr;
void usage(void) {
  fputs("Usage: tail [-f] [-c number | -n number] [file]\n", stderr);
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%esi
lea    0xecc(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%esi
lea    0xecf(%rip),%rdi
call   1030 <fputs@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [49 x i8] c"Usage: tail [-f] [-c number | -n number] [file]\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fputs(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@.str = [49 x i8] c"Usage: tail [-f] [-c number | -n number] [file]\0A\00"
@stderr = global i32 0
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fputs(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i32 %1)
%3 = tail call i32 @exit(i32 1)
unreachable
}
unsigned int I2CSlaveDataGet(unsigned int baseAdd) {
  unsigned int rData;
  rData = (*((volatile unsigned int *)(baseAdd + (0x9C))));
  return rData;
}


x86 assembly (clang, -O0):
<I2CSlaveDataGet>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x9c,%eax
mov    %eax,%eax
mov    (%rax),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<I2CSlaveDataGet>:
add    $0x9c,%edi
mov    (%rdi),%eax
ret

LLVM IR (-O0):
define i32 @I2CSlaveDataGet(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = add i32 %4, 156
%6 = zext i32 %5 to i64
%7 = inttoptr i64 %6 to i32*
%8 = load volatile i32, i32* %7
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @I2CSlaveDataGet(i32 %0) {
%2 = add i32 %0, 156
%3 = zext i32 %2 to i64
%4 = inttoptr i64 %3 to i32*
%5 = load volatile i32, i32* %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ strlen(char const *);
int /*<<< orphan*/ write(int, char const *, int /*<<< orphan*/);
void fprints(int f, const char *s) { write(f, s, strlen(s)); }


x86 assembly (clang, -O0):
<fprints>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1030 <write@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fprints>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
mov    %rsi,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <write@plt>

LLVM IR (-O0):
define void @fprints(i32 %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
store i32 %0, i32* %3
store i8* %1, i8** %4
%5 = load i32, i32* %3
%6 = load i8*, i8** %4
%7 = load i8*, i8** %4
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @write(i32 %5, i8* %6, i32 %8)
ret void
}

LLVM IR (-O2):
define void @fprints(i32 %0, i8* %1) {
%3 = tail call i32 @strlen(i8* %1)
%4 = tail call i32 @write(i32 %0, i8* %1, i32 %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pushNarray(char *, unsigned int);
void pushcomplex8array_(void *x, unsigned int *n) {
  pushNarray((char *)x, (*n * 8));
}


x86 assembly (clang, -O0):
<pushcomplex8array_>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    (%rax),%esi
shl    $0x3,%esi
call   1030 <pushNarray@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pushcomplex8array_>:
mov    (%rsi),%esi
shl    $0x3,%esi
jmp    1030 <pushNarray@plt>

LLVM IR (-O0):
define void @pushcomplex8array_(i8* %0, i32* %1) {
%3 = alloca i8*
%4 = alloca i32*
store i8* %0, i8** %3
store i32* %1, i32** %4
%5 = load i8*, i8** %3
%6 = load i32*, i32** %4
%7 = load i32, i32* %6
%8 = mul i32 %7, 8
%9 = call i32 @pushNarray(i8* %5, i32 %8)
ret void
}

LLVM IR (-O2):
define void @pushcomplex8array_(i8* %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = shl i32 %3, 3
%5 = tail call i32 @pushNarray(i8* %0, i32 %4)
ret void
}
/* Variables and functions */
int song_get_tempo();
int /*<<< orphan*/ song_set_tempo(int);
void seq_ctrl_adjust_tempo(int change, int fine) {
  if (fine) {
    song_set_tempo(song_get_tempo() + ((float)change * 0.1));
  } else {
    song_set_tempo((int)song_get_tempo() + change);
  }
}


x86 assembly (clang, -O0):
<seq_ctrl_adjust_tempo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
je     116a <seq_ctrl_adjust_tempo+0x4a>
mov    $0x0,%al
call   1040 <song_get_tempo@plt>
cvtsi2sd %eax,%xmm1
cvtsi2ssl -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xeac(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1030 <song_set_tempo@plt>
jmp    117b <seq_ctrl_adjust_tempo+0x5b>
mov    $0x0,%al
call   1040 <song_get_tempo@plt>
mov    %eax,%edi
add    -0x4(%rbp),%edi
call   1030 <song_set_tempo@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<seq_ctrl_adjust_tempo>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
xor    %eax,%eax
call   1040 <song_get_tempo@plt>
test   %ebp,%ebp
je     1150 <seq_ctrl_adjust_tempo+0x30>
cvtsi2sd %eax,%xmm0
cvtsi2ss %ebx,%xmm1
cvtss2sd %xmm1,%xmm1
mulsd  0xeba(%rip),%xmm1
addsd  %xmm0,%xmm1
cvttsd2si %xmm1,%eax
jmp    1152 <seq_ctrl_adjust_tempo+0x32>
add    %ebx,%eax
mov    %eax,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <song_set_tempo@plt>

LLVM IR (-O0):
define void @seq_ctrl_adjust_tempo(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = icmp ne i32 %5, 0
br i1 %6, label %7, label %16
7: ; preds = %2
%8 = call i32 (...) @song_get_tempo()
%9 = sitofp i32 %8 to double
%10 = load i32, i32* %3
%11 = sitofp i32 %10 to float
%12 = fpext float %11 to double
%13 = call double @llvm.fmuladd.f64(double %12, double 1.000000e-01, double %9)
%14 = fptosi double %13 to i32
%15 = call i32 @song_set_tempo(i32 %14)
br label %21
16: ; preds = %2
%17 = call i32 (...) @song_get_tempo()
%18 = load i32, i32* %3
%19 = add nsw i32 %17, %18
%20 = call i32 @song_set_tempo(i32 %19)
br label %21
21: ; preds = %16, %7
ret void
}

LLVM IR (-O2):
define void @seq_ctrl_adjust_tempo(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = tail call i32 (...) @song_get_tempo()
br i1 %3, label %11, label %5
5: ; preds = %2
%6 = sitofp i32 %4 to double
%7 = sitofp i32 %0 to float
%8 = fpext float %7 to double
%9 = tail call double @llvm.fmuladd.f64(double %8, double 1.000000e-01, double %6)
%10 = fptosi double %9 to i32
br label %13
11: ; preds = %2
%12 = add nsw i32 %4, %0
br label %13
13: ; preds = %11, %5
%14 = phi i32 [ %12, %11 ], [ %10, %5 ]
%15 = tail call i32 @song_set_tempo(i32 %14)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ GLdouble;

/* Variables and functions */
int /*<<< orphan*/ matrixScale(int /*<<< orphan*/ *, int, int);
int matrixVectorNorm(int /*<<< orphan*/ *, int);
void matrixVectorNormalize(GLdouble *vector, int size) {
  matrixScale(vector, 1 / matrixVectorNorm(vector, size), size);
}


x86 assembly (clang, -O0):
<matrixVectorNormalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
call   1030 <matrixVectorNorm@plt>
mov    -0x18(%rbp),%rdi
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
mov    %eax,%esi
mov    -0xc(%rbp),%edx
call   1040 <matrixScale@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<matrixVectorNormalize>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <matrixVectorNorm@plt>
lea    0x1(%rax),%ecx
xor    %esi,%esi
cmp    $0x3,%ecx
cmovb  %eax,%esi
mov    %rbx,%rdi
mov    %ebp,%edx
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1040 <matrixScale@plt>

LLVM IR (-O0):
define void @matrixVectorNormalize(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
%5 = load i32*, i32** %3
%6 = load i32*, i32** %3
%7 = load i32, i32* %4
%8 = call i32 @matrixVectorNorm(i32* %6, i32 %7)
%9 = sdiv i32 1, %8
%10 = load i32, i32* %4
%11 = call i32 @matrixScale(i32* %5, i32 %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @matrixVectorNormalize(i32* %0, i32 %1) {
%3 = tail call i32 @matrixVectorNorm(i32* %0, i32 %1)
%4 = add i32 %3, 1
%5 = icmp ult i32 %4, 3
%6 = select i1 %5, i32 %3, i32 0
%7 = tail call i32 @matrixScale(i32* %0, i32 %6, i32 %1)
ret void
}
/* Variables and functions */
void Default_EGU2_IRQHandler(void) {
  while (1)
    ;
}


x86 assembly (clang, -O0):
<Default_EGU2_IRQHandler>:
push   %rbp
mov    %rsp,%rbp
jmp    1109 <Default_EGU2_IRQHandler+0x9>
jmp    1109 <Default_EGU2_IRQHandler+0x9>

x86 assembly (clang, -O2):
<Default_EGU2_IRQHandler>:
jmp    1100 <Default_EGU2_IRQHandler>

LLVM IR (-O0):
define void @Default_EGU2_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}

LLVM IR (-O2):
define void @Default_EGU2_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage(void) { fprintf(stderr, "Usage: cp source_file target_file\n"); }


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ec5(%rip),%rax
mov    (%rax),%edi
lea    0xedc(%rip),%rsi
call   1030 <fprintf@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: cp source_file target_file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: cp source_file target_file\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
ret void
}
struct flags_parser *add_flags_udp(struct flags_parser *fp) {
  return (fp);
}


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

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

LLVM IR (-O0):
%struct.flags_parser = type opaque
define %struct.flags_parser* @add_flags_udp(%struct.flags_parser* %0) {
%2 = alloca %struct.flags_parser*
store %struct.flags_parser* %0, %struct.flags_parser** %2
%3 = load %struct.flags_parser*, %struct.flags_parser** %2
ret %struct.flags_parser* %3
}

LLVM IR (-O2):
%struct.flags_parser = type opaque
define %struct.flags_parser* @add_flags_udp(%struct.flags_parser* readnone returned %0) {
ret %struct.flags_parser* %0
}
/* Type definitions */
typedef int /*<<< orphan*/ value;
typedef int uint8_t;
struct nrf24l01 {
  int dummy;
};

/* Variables and functions */
scalar_t__ rf_command(struct nrf24l01 *, int, int *, int, int);
uint8_t rf_reg_read(struct nrf24l01 *dev, uint8_t addr) {
  uint8_t value;
  if (rf_command(dev, 0b00000000 | addr, &value, sizeof(value), 1) < 0)
    return 0xff;
  return value;
}


x86 assembly (clang, -O0):
<rf_reg_read>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x14(%rbp),%esi
or     $0x0,%esi
lea    -0x18(%rbp),%rdx
mov    $0x4,%ecx
mov    $0x1,%r8d
call   1030 <rf_command@plt>
cmp    $0x0,%rax
jge    1153 <rf_reg_read+0x43>
movl   $0xff,-0x4(%rbp)
jmp    1159 <rf_reg_read+0x49>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rf_reg_read>:
push   %rax
lea    0x4(%rsp),%rdx
mov    $0x4,%ecx
mov    $0x1,%r8d
call   1030 <rf_command@plt>
mov    %rax,%rcx
mov    $0xff,%eax
test   %rcx,%rcx
js     1137 <rf_reg_read+0x27>
mov    0x4(%rsp),%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.nrf24l01 = type { i32 }
define i32 @rf_reg_read(%struct.nrf24l01* %0, i32 %1) {
%3 = alloca i32
%4 = alloca %struct.nrf24l01*
%5 = alloca i32
%6 = alloca i32
store %struct.nrf24l01* %0, %struct.nrf24l01** %4
store i32 %1, i32* %5
%7 = load %struct.nrf24l01*, %struct.nrf24l01** %4
%8 = load i32, i32* %5
%9 = or i32 0, %8
%10 = call i64 @rf_command(%struct.nrf24l01* %7, i32 %9, i32* %6, i32 4, i32 1)
%11 = icmp slt i64 %10, 0
br i1 %11, label %12, label %13
12: ; preds = %2
store i32 255, i32* %3
br label %15
13: ; preds = %2
%14 = load i32, i32* %6
store i32 %14, i32* %3
br label %15
15: ; preds = %13, %12
%16 = load i32, i32* %3
ret i32 %16
}

LLVM IR (-O2):
%struct.nrf24l01 = type { i32 }
define i32 @rf_reg_read(%struct.nrf24l01* %0, i32 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = call i64 @rf_command(%struct.nrf24l01* %0, i32 %1, i32* %3, i32 4, i32 1)
%6 = icmp slt i64 %5, 0
%7 = load i32, i32* %3
%8 = select i1 %6, i32 255, i32 %7
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void common() { printf("common test exec\n"); }


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

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

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

LLVM IR (-O2):
@str = [17 x i8] c"common test exec\00"
define void @common() {
%1 = 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 */
int /*<<< orphan*/ printf(char *);
void ShutDown() { printf("\n Shutdown --  "); }


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

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

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

LLVM IR (-O2):
@.str = [16 x i8] c"\0A Shutdown -- \00"
define void @ShutDown() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int containsNearbyDuplicate(int *, int, int);
int /*<<< orphan*/ printf(char *, int);
int main(void) {
  int arr[] = {1, 0, 1, 1};
  printf("%d\n", containsNearbyDuplicate(arr, 4, 1));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xeca(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xec7(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x20(%rbp),%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <containsNearbyDuplicate@plt>
mov    %eax,%esi
lea    0xeaf(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
movaps 0xed5(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0x4,%esi
mov    $0x1,%edx
call   1040 <containsNearbyDuplicate@plt>
lea    0xec8(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@__const.main.arr = [4 x i32] [i32 1, i32 0, i32 1, i32 1]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [4 x i32]
store i32 0, i32* %1
%3 = bitcast [4 x i32]* %2 to i8*
%4 = getelementptr inbounds [4 x i32], [4 x i32]* %2, i64 0, i64 0
%5 = call i32 @containsNearbyDuplicate(i32* %4, i32 4, i32 1)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %5)
ret i32 0
}

LLVM IR (-O2):
@__const.main.arr = [4 x i32] [i32 1, i32 0, i32 1, i32 1]
@.str = [4 x i8] c"%d\0A\00"
define i32 @main() {
%1 = alloca [4 x i32]
%2 = bitcast [4 x i32]* %1 to i8*
%3 = getelementptr inbounds [4 x i32], [4 x i32]* %1, i64 0, i64 0
%4 = call i32 @containsNearbyDuplicate(i32* %3, i32 4, i32 1)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ XClose();
int /*<<< orphan*/ XDraw();
int /*<<< orphan*/ XInit();
int /*<<< orphan*/ closeRandom();
int /*<<< orphan*/ nextcoord();
int /*<<< orphan*/ openRandom();
int /*<<< orphan*/ setFont(char *);
int /*<<< orphan*/ wait(int);
int main() {
  XInit();
  openRandom();
  setFont("fixed");
  while (1) {
    wait(1000);
    XDraw();
    nextcoord();
  }
  closeRandom();
  XClose();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1040 <XInit@plt>
mov    $0x0,%al
call   1050 <openRandom@plt>
lea    0xe7c(%rip),%rdi
call   1070 <setFont@plt>
mov    $0x3e8,%edi
call   1080 <wait@plt>
mov    $0x0,%al
call   1030 <XDraw@plt>
mov    $0x0,%al
call   1060 <nextcoord@plt>
jmp    1189 <main+0x29>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1040 <XInit@plt>
xor    %eax,%eax
call   1050 <openRandom@plt>
lea    0xe8a(%rip),%rdi
call   1070 <setFont@plt>
nopl   0x0(%rax,%rax,1)
mov    $0x3e8,%edi
call   1080 <wait@plt>
xor    %eax,%eax
call   1030 <XDraw@plt>
xor    %eax,%eax
call   1060 <nextcoord@plt>
jmp    1180 <main+0x20>

LLVM IR (-O0):
@.str = [6 x i8] c"fixed\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @XInit()
%3 = call i32 (...) @openRandom()
%4 = call i32 @setFont(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %5
5: ; preds = %0, %5
%6 = call i32 @wait(i32 1000)
%7 = call i32 (...) @XDraw()
%8 = call i32 (...) @nextcoord()
br label %5
}

LLVM IR (-O2):
@.str = [6 x i8] c"fixed\00"
define i32 @main() {
%1 = tail call i32 (...) @XInit()
%2 = tail call i32 (...) @openRandom()
%3 = tail call i32 @setFont(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %0, %4
%5 = tail call i32 @wait(i32 1000)
%6 = tail call i32 (...) @XDraw()
%7 = tail call i32 (...) @nextcoord()
br label %4
}
/* Variables and functions */
int /*<<< orphan*/ card_benchmark_run(int /*<<< orphan*/);
void card_benchmark_task_quick() { card_benchmark_run(0); }


x86 assembly (clang, -O0):
<card_benchmark_task_quick>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <card_benchmark_run@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<card_benchmark_task_quick>:
xor    %edi,%edi
jmp    1030 <card_benchmark_run@plt>

LLVM IR (-O0):
define void @card_benchmark_task_quick() {
%1 = call i32 @card_benchmark_run(i32 0)
ret void
}

LLVM IR (-O2):
define void @card_benchmark_task_quick() {
%1 = tail call i32 @card_benchmark_run(i32 0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  char *s1 = 0;
  char *s2 = "2";
  void **s = (void **)&s1;
  if (*s)
    printf("a\n");
  else
    printf("b\n");
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
lea    0xed2(%rip),%rax
mov    %rax,-0x18(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
cmpq   $0x0,(%rax)
je     1159 <main+0x49>
lea    0xeb3(%rip),%rdi
call   1030 <printf@plt>
jmp    1165 <main+0x55>
lea    0xea5(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [2 x i8] c"b\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([2 x i8], [2 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  int type;
};
typedef TYPE_1__ XSelectionRequestEvent;

/* Variables and functions */
void set_XSelectionRequestEvent_type(void *_p, int _v) {
  ((XSelectionRequestEvent *)_p)->type = (int)_v;
}


x86 assembly (clang, -O0):
<set_XSelectionRequestEvent_type>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_XSelectionRequestEvent_type>:
mov    %esi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i32 }
define void @set_XSelectionRequestEvent_type(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i32 %5, i32* %8
ret void
}

LLVM IR (-O2):
define void @set_XSelectionRequestEvent_type(i8* nocapture writeonly %0, i32 %1) {
%3 = bitcast i8* %0 to i32*
store i32 %1, i32* %3
ret void
}
unsigned rotate_right(unsigned x, int n) {
  int w = sizeof(int) << 3;
  unsigned shift_left_count = 0;
  n == 0 || (shift_left_count = w - n);
  x = (x >> n) | (x << shift_left_count);
  return x;
}


x86 assembly (clang, -O0):
<rotate_right>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x20,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x8(%rbp)
mov    %al,-0x11(%rbp)
je     1139 <rotate_right+0x39>
mov    -0xc(%rbp),%eax
sub    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
cmp    $0x0,%eax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
shr    %cl,%eax
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%ecx
shl    %cl,%edx
mov    %edx,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rotate_right>:
mov    %esi,%ecx
mov    $0x20,%dl
sub    %cl,%dl
mov    %edi,%eax
shr    %cl,%eax
test   %esi,%esi
movzbl %dl,%edx
cmove  %esi,%edx
mov    %edx,%ecx
shl    %cl,%edi
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @rotate_right(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 32, i32* %5
store i32 0, i32* %6
%7 = load i32, i32* %4
%8 = icmp eq i32 %7, 0
br i1 %8, label %14, label %9
9: ; preds = %2
%10 = load i32, i32* %5
%11 = load i32, i32* %4
%12 = sub nsw i32 %10, %11
store i32 %12, i32* %6
%13 = icmp ne i32 %12, 0
br label %14
14: ; preds = %9, %2
%15 = phi i1 [ true, %2 ], [ %13, %9 ]
%16 = zext i1 %15 to i32
%17 = load i32, i32* %3
%18 = load i32, i32* %4
%19 = lshr i32 %17, %18
%20 = load i32, i32* %3
%21 = load i32, i32* %6
%22 = shl i32 %20, %21
%23 = or i32 %19, %22
store i32 %23, i32* %3
%24 = load i32, i32* %3
ret i32 %24
}

LLVM IR (-O2):
define i32 @rotate_right(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 0
%4 = sub nsw i32 32, %1
%5 = select i1 %3, i32 0, i32 %4
%6 = lshr i32 %0, %1
%7 = shl i32 %0, %5
%8 = or i32 %7, %6
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ EXIT_SUCCESS;
int /*<<< orphan*/ configFreeEntries();
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ msg(char *);
void terminationHandler(int signum) {
  configFreeEntries();
  msg("Terminated. Bye bye.");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<terminationHandler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1030 <configFreeEntries@plt>
lea    0xeb7(%rip),%rdi
call   1050 <msg@plt>
mov    0x2e8b(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<terminationHandler>:
push   %rax
xor    %eax,%eax
call   1030 <configFreeEntries@plt>
lea    0xec1(%rip),%rdi
call   1050 <msg@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [21 x i8] c"Terminated. Bye bye.\00"
@EXIT_SUCCESS = global i32 0
define void @terminationHandler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 (...) @configFreeEntries()
%4 = call i32 @msg(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_SUCCESS
%6 = call i32 @exit(i32 %5)
unreachable
}

LLVM IR (-O2):
@.str = [21 x i8] c"Terminated. Bye bye.\00"
@EXIT_SUCCESS = global i32 0
define void @terminationHandler(i32 %0) {
%2 = tail call i32 (...) @configFreeEntries()
%3 = tail call i32 @msg(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @EXIT_SUCCESS
%5 = tail call i32 @exit(i32 %4)
unreachable
}
int opt_numint_sgn(long long int num) {
  return ((num == 0) ? 0 : (num < 0) ? -1 : 1);
}


x86 assembly (clang, -O0):
<opt_numint_sgn>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    111d <opt_numint_sgn+0x1d>
xor    %eax,%eax
mov    %eax,-0xc(%rbp)
jmp    1135 <opt_numint_sgn+0x35>
mov    -0x8(%rbp),%rdx
mov    $0x1,%eax
mov    $0xffffffff,%ecx
cmp    $0x0,%rdx
cmovl  %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<opt_numint_sgn>:
xor    %ecx,%ecx
xor    %eax,%eax
test   %rdi,%rdi
setns  %al
lea    -0x1(%rax,%rax,1),%eax
cmove  %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @opt_numint_sgn(i64 %0) {
%2 = icmp eq i64 %0, 0
%3 = icmp slt i64 %0, 0
%4 = select i1 %3, i32 -1, i32 1
%5 = select i1 %2, i32 0, i32 %4
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ outl_local(unsigned int, int);
__attribute__((always_)) void outl(unsigned int value, int port) {
  outl_local(value, port);
}


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

x86 assembly (clang, -O2):
<outl>:
jmp    1030 <outl_local@plt>

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

LLVM IR (-O2):
define void @outl(i32 %0, i32 %1) {
%3 = tail call i32 @outl_local(i32 %0, i32 %1)
ret void
}
float calculadora(float x, float y, int operacao) {
  float resultado;
  switch (operacao) {
  case 1:
    resultado = x + y;
    break;
  case 2:
    resultado = x - y;
    break;
  case 3:
    resultado = x * y;
    break;
  case 4:
    resultado = x / y;
    break;
  default:
    break;
  }
  return resultado;
}


x86 assembly (clang, -O0):
<calculadora>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,%ecx
mov    %rcx,-0x18(%rbp)
sub    $0x3,%eax
ja     118a <calculadora+0x8a>
mov    -0x18(%rbp),%rax
lea    0xecf(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movss  -0x4(%rbp),%xmm0
addss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    118f <calculadora+0x8f>
movss  -0x4(%rbp),%xmm0
subss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    118f <calculadora+0x8f>
movss  -0x4(%rbp),%xmm0
mulss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    118f <calculadora+0x8f>
movss  -0x4(%rbp),%xmm0
divss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x10(%rbp)
jmp    118f <calculadora+0x8f>
jmp    118f <calculadora+0x8f>
movss  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<calculadora>:
add    $0xffffffff,%edi
cmp    $0x3,%edi
ja     111d <calculadora+0x1d>
lea    0xef1(%rip),%rax
movslq (%rax,%rdi,4),%rcx
add    %rax,%rcx
jmp    *%rcx
addss  %xmm1,%xmm0
ret
ret
subss  %xmm1,%xmm0
ret
mulss  %xmm1,%xmm0
ret
divss  %xmm1,%xmm0
ret

LLVM IR (-O0):
define float @calculadora(float %0, float %1, i32 %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca i32
%7 = alloca float
store float %0, float* %4
store float %1, float* %5
store i32 %2, i32* %6
%8 = load i32, i32* %6
switch i32 %8, label %25 [
i32 1, label %9
i32 2, label %13
i32 3, label %17
i32 4, label %21
]
9: ; preds = %3
%10 = load float, float* %4
%11 = load float, float* %5
%12 = fadd float %10, %11
store float %12, float* %7
br label %26
13: ; preds = %3
%14 = load float, float* %4
%15 = load float, float* %5
%16 = fsub float %14, %15
store float %16, float* %7
br label %26
17: ; preds = %3
%18 = load float, float* %4
%19 = load float, float* %5
%20 = fmul float %18, %19
store float %20, float* %7
br label %26
21: ; preds = %3
%22 = load float, float* %4
%23 = load float, float* %5
%24 = fdiv float %22, %23
store float %24, float* %7
br label %26
25: ; preds = %3
br label %26
26: ; preds = %25, %21, %17, %13, %9
%27 = load float, float* %7
ret float %27
}

LLVM IR (-O2):
define float @calculadora(float %0, float %1, i32 %2) {
switch i32 %2, label %12 [
i32 1, label %4
i32 2, label %6
i32 3, label %8
i32 4, label %10
]
4: ; preds = %3
%5 = fadd float %0, %1
br label %12
6: ; preds = %3
%7 = fsub float %0, %1
br label %12
8: ; preds = %3
%9 = fmul float %0, %1
br label %12
10: ; preds = %3
%11 = fdiv float %0, %1
br label %12
12: ; preds = %3, %10, %8, %6, %4
%13 = phi float [ undef, %3 ], [ %11, %10 ], [ %9, %8 ], [ %7, %6 ], [ %5, %4 ]
ret float %13
}
void gtk_rc_parse_state() {}


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

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

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

LLVM IR (-O2):
define void @gtk_rc_parse_state() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ sscanf(char *, char const *, ...);
void uninivar_sscanf(void) {
  char *string;
  const char *format;
  int i;
  (void)sscanf(string, format);
  (void)sscanf(string, format, &i);
}


x86 assembly (clang, -O0):
<uninivar_sscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1030 <sscanf@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    -0x14(%rbp),%rdx
mov    $0x0,%al
call   1030 <sscanf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninivar_sscanf>:
push   %rax
xor    %eax,%eax
call   1030 <sscanf@plt>
lea    0x4(%rsp),%rdx
xor    %eax,%eax
call   1030 <sscanf@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @uninivar_sscanf() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i32
%4 = load i8*, i8** %1
%5 = load i8*, i8** %2
%6 = call i32 (i8*, i8*, ...) @sscanf(i8* %4, i8* %5)
%7 = load i8*, i8** %1
%8 = load i8*, i8** %2
%9 = call i32 (i8*, i8*, ...) @sscanf(i8* %7, i8* %8, i32* %3)
ret void
}

LLVM IR (-O2):
define void @uninivar_sscanf() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, i8*, ...) @sscanf(i8* undef, i8* undef)
%4 = call i32 (i8*, i8*, ...) @sscanf(i8* undef, i8* undef, i32* %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
size_t mbrtowc(int /*<<< orphan*/, char const *, size_t, int /*<<< orphan*/ *);
size_t mbrlen(const char *s, size_t n, mbstate_t *st) {
  static unsigned internal;
  return mbrtowc(0, s, n, st ? st : (mbstate_t *)&internal);
}


x86 assembly (clang, -O0):
<mbrlen>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x18(%rbp)
je     114c <mbrlen+0x3c>
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
jmp    115c <mbrlen+0x4c>
lea    0x2ed9(%rip),%rax
mov    %rax,-0x30(%rbp)
jmp    115c <mbrlen+0x4c>
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rcx
xor    %edi,%edi
call   1030 <mbrtowc@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mbrlen>:
mov    %rsi,%rax
mov    %rdi,%rsi
test   %rdx,%rdx
lea    0x2f0c(%rip),%rcx
cmovne %rdx,%rcx
xor    %edi,%edi
mov    %rax,%rdx
jmp    1030 <mbrtowc@plt>

LLVM IR (-O0):
@mbrlen.internal = internal global i32 0
define i64 @mbrlen(i8* %0, i64 %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i32*
store i8* %0, i8** %4
store i64 %1, i64* %5
store i32* %2, i32** %6
%7 = load i8*, i8** %4
%8 = load i64, i64* %5
%9 = load i32*, i32** %6
%10 = icmp ne i32* %9, null
br i1 %10, label %11, label %13
11: ; preds = %3
%12 = load i32*, i32** %6
br label %14
13: ; preds = %3
br label %14
14: ; preds = %13, %11
%15 = phi i32* [ %12, %11 ], [ @mbrlen.internal, %13 ]
%16 = call i64 @mbrtowc(i32 0, i8* %7, i64 %8, i32* %15)
ret i64 %16
}

LLVM IR (-O2):
@mbrlen.internal = internal global i32 0
define i64 @mbrlen(i8* %0, i64 %1, i32* %2) {
%4 = icmp eq i32* %2, null
%5 = select i1 %4, i32* @mbrlen.internal, i32* %2
%6 = tail call i64 @mbrtowc(i32 0, i8* %0, i64 %1, i32* %5)
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ INT_MIN;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ f(int /*<<< orphan*/);
int main(int argc, char *argv[]) {
  f(INT_MIN);
  exit(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    0x2eab(%rip),%rax
mov    (%rax),%edi
call   1030 <f@plt>
xor    %edi,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
call   1030 <f@plt>
xor    %edi,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@INT_MIN = global i32 0
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* @INT_MIN
%7 = call i32 @f(i32 %6)
%8 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
@INT_MIN = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = load i32, i32* @INT_MIN
%4 = tail call i32 @f(i32 %3)
%5 = tail call i32 @exit(i32 0)
unreachable
}
void foo129(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo129(i32 %0) {
ret void
}
int get_shifts(unsigned long mask) {
  int i = 0;
  while (mask) {
    mask >>= 1;
    i++;
  }
  return i;
}


x86 assembly (clang, -O0):
<get_shifts>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1134 <get_shifts+0x34>
mov    -0x8(%rbp),%rax
shr    $0x1,%rax
mov    %rax,-0x8(%rbp)
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <get_shifts+0xf>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_shifts>:
xor    %eax,%eax
test   %rdi,%rdi
je     111f <get_shifts+0x1f>
mov    %rdi,%rcx
nopw   0x0(%rax,%rax,1)
shr    %rcx
add    $0x1,%eax
cmp    $0x1,%rdi
mov    %rcx,%rdi
ja     1110 <get_shifts+0x10>
ret

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

LLVM IR (-O2):
define i32 @get_shifts(i64 %0) {
%2 = icmp eq i64 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %7, %3 ], [ 0, %1 ]
%5 = phi i64 [ %6, %3 ], [ %0, %1 ]
%6 = lshr i64 %5, 1
%7 = add nuw nsw i32 %4, 1
%8 = icmp ult i64 %5, 2
br i1 %8, label %9, label %3
9: ; preds = %3, %1
%10 = phi i32 [ 0, %1 ], [ %7, %3 ]
ret i32 %10
}
int nxgrk(long long a, long long b) { return ~(a ^ b) ? 23 : 42; }


x86 assembly (clang, -O0):
<nxgrk>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdx
xor    -0x10(%rbp),%rdx
xor    $0xffffffffffffffff,%rdx
mov    $0x2a,%eax
mov    $0x17,%ecx
cmp    $0x0,%rdx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nxgrk>:
xor    %rsi,%rdi
cmp    $0xffffffffffffffff,%rdi
mov    $0x2a,%ecx
mov    $0x17,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @nxgrk(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 = xor i64 %5, %6
%8 = xor i64 %7, -1
%9 = icmp ne i64 %8, 0
%10 = zext i1 %9 to i64
%11 = select i1 %9, i32 23, i32 42
ret i32 %11
}

LLVM IR (-O2):
define i32 @nxgrk(i64 %0, i64 %1) {
%3 = xor i64 %1, %0
%4 = icmp eq i64 %3, -1
%5 = select i1 %4, i32 42, i32 23
ret i32 %5
}
/* Variables and functions */
const char *logYesNo(bool yes) { return (yes ? "true" : "false"); }


x86 assembly (clang, -O0):
<logYesNo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xef4(%rip),%rax
lea    0xee8(%rip),%rcx
cmp    $0x0,%edx
cmovne %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<logYesNo>:
test   %edi,%edi
lea    0xefc(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i8* @logYesNo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ne i32 %3, 0
%5 = zext i1 %4 to i64
%6 = select i1 %4, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0)
ret i8* %6
}

LLVM IR (-O2):
@.str = [5 x i8] c"true\00"
@.str.1 = [6 x i8] c"false\00"
define i8* @logYesNo(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}