xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int strlen(char *);
void printS(char s[]) {
  int i;
  for (i = 0; i < strlen(s) - 1; i++) {
    printf("%c ", s[i]);
  }
}


x86 assembly (clang, -O0):
<printS>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
sub    $0x1,%ecx
cmp    %ecx,%eax
jge    1178 <printS+0x58>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
lea    0xe9f(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1040 <printf@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1133 <printS+0x13>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printS>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%r15
call   1030 <strlen@plt>
cmp    $0x2,%eax
jl     1163 <printS+0x43>
xor    %ebx,%ebx
lea    0xec5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1040 <printf@plt>
add    $0x1,%rbx
mov    %r15,%rdi
call   1030 <strlen@plt>
add    $0xffffffff,%eax
cltq
cmp    %rax,%rbx
jl     1140 <printS+0x20>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c \00"
define void @printS(i8* %0) {
%2 = tail call i32 @strlen(i8* %0)
%3 = icmp sgt i32 %2, 1
br i1 %3, label %4, label %14
4: ; preds = %1, %4
%5 = phi i64 [ %9, %4 ], [ 0, %1 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %7)
%9 = add nuw nsw i64 %5, 1
%10 = tail call i32 @strlen(i8* %0)
%11 = add nsw i32 %10, -1
%12 = sext i32 %11 to i64
%13 = icmp slt i64 %9, %12
br i1 %13, label %4, label %14
14: ; preds = %4, %1
ret void
}
tftpsetbinary(argc, argv) char *argv[];
{ tftpsetmode("octet"); }


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

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"octet\00"
define i32 @tftpsetbinary(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @tftpsetmode to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
ret i32 undef
}
/* Variables and functions */
double sin(double);
float EaseInEaseOut(float p) {
  if (p < 0.5) {
    return 0.5 * sin(3.12 * p);
  } else {
    return -0.5 * sin(3.12 * p) + 1;
  }
}


x86 assembly (clang, -O0):
<EaseInEaseOut>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xed2(%rip),%xmm0
ucomisd %xmm1,%xmm0
jbe    116f <EaseInEaseOut+0x5f>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xecf(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
movaps %xmm0,%xmm1
movsd  0xea3(%rip),%xmm0
mulsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    11aa <EaseInEaseOut+0x9a>
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe98(%rip),%xmm0
mulsd  %xmm1,%xmm0
call   1030 <sin@plt>
movsd  0xe77(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xe73(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<EaseInEaseOut>:
push   %rax
movss  %xmm0,0x4(%rsp)
cvtss2sd %xmm0,%xmm0
mulsd  0xedd(%rip),%xmm0
call   1030 <sin@plt>
movss  0xef0(%rip),%xmm1
ucomiss 0x4(%rsp),%xmm1
ja     1149 <EaseInEaseOut+0x39>
mulsd  0xed1(%rip),%xmm0
addsd  0xed1(%rip),%xmm0
jmp    1151 <EaseInEaseOut+0x41>
mulsd  0xeb7(%rip),%xmm0
cvtsd2ss %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @EaseInEaseOut(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %3
%4 = load float, float* %3
%5 = fpext float %4 to double
%6 = fcmp olt double %5, 5.000000e-01
br i1 %6, label %7, label %14
7: ; preds = %1
%8 = load float, float* %3
%9 = fpext float %8 to double
%10 = fmul double 3.120000e+00, %9
%11 = call double @sin(double %10)
%12 = fmul double 5.000000e-01, %11
%13 = fptrunc double %12 to float
store float %13, float* %2
br label %21
14: ; preds = %1
%15 = load float, float* %3
%16 = fpext float %15 to double
%17 = fmul double 3.120000e+00, %16
%18 = call double @sin(double %17)
%19 = call double @llvm.fmuladd.f64(double -5.000000e-01, double %18, double 1.000000e+00)
%20 = fptrunc double %19 to float
store float %20, float* %2
br label %21
21: ; preds = %14, %7
%22 = load float, float* %2
ret float %22
}

LLVM IR (-O2):
define float @EaseInEaseOut(float %0) {
%2 = fpext float %0 to double
%3 = fcmp olt float %0, 5.000000e-01
%4 = fmul double %2, 3.120000e+00
%5 = tail call double @sin(double %4)
%6 = fmul double %5, 5.000000e-01
%7 = tail call double @llvm.fmuladd.f64(double %5, double -5.000000e-01, double 1.000000e+00)
%8 = select i1 %3, double %6, double %7
%9 = fptrunc double %8 to float
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ lcd_putch(char);
int /*<<< orphan*/ lcd_putstr(char *);
void lcd_disp_1(unsigned int x) {
  if (x < 10) {
    lcd_putch((char)(x + 0x30));
  } else if (x < 16) {
    lcd_putch((char)(x - 10 + 'A'));
  } else {
    lcd_putstr("X");
  }
}


x86 assembly (clang, -O0):
<lcd_disp_1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0xa,-0x4(%rbp)
jae    1148 <lcd_disp_1+0x28>
mov    -0x4(%rbp),%eax
add    $0x30,%eax
movsbl %al,%edi
call   1040 <lcd_putch@plt>
jmp    1179 <lcd_disp_1+0x59>
cmpl   $0x10,-0x4(%rbp)
jae    1168 <lcd_disp_1+0x48>
mov    -0x4(%rbp),%eax
sub    $0xa,%eax
add    $0x41,%eax
movsbl %al,%edi
call   1040 <lcd_putch@plt>
jmp    1174 <lcd_disp_1+0x54>
lea    0xe91(%rip),%rdi
call   1030 <lcd_putstr@plt>
jmp    1179 <lcd_disp_1+0x59>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<lcd_disp_1>:
cmp    $0x9,%edi
ja     1132 <lcd_disp_1+0x12>
add    $0x30,%dil
movsbl %dil,%edi
jmp    1040 <lcd_putch@plt>
cmp    $0xf,%edi
ja     1144 <lcd_disp_1+0x24>
add    $0x37,%dil
movsbl %dil,%edi
jmp    1040 <lcd_putch@plt>
lea    0xeb5(%rip),%rdi
jmp    1030 <lcd_putstr@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"X\00"
define void @lcd_disp_1(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp ult i32 %3, 10
br i1 %4, label %5, label %10
5: ; preds = %1
%6 = load i32, i32* %2
%7 = add i32 %6, 48
%8 = trunc i32 %7 to i8
%9 = call i32 @lcd_putch(i8 signext %8)
br label %22
10: ; preds = %1
%11 = load i32, i32* %2
%12 = icmp ult i32 %11, 16
br i1 %12, label %13, label %19
13: ; preds = %10
%14 = load i32, i32* %2
%15 = sub i32 %14, 10
%16 = add i32 %15, 65
%17 = trunc i32 %16 to i8
%18 = call i32 @lcd_putch(i8 signext %17)
br label %21
19: ; preds = %10
%20 = call i32 @lcd_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %19, %13
br label %22
22: ; preds = %21, %5
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"X\00"
define void @lcd_disp_1(i32 %0) {
%2 = icmp ult i32 %0, 10
br i1 %2, label %3, label %7
3: ; preds = %1
%4 = trunc i32 %0 to i8
%5 = add nuw nsw i8 %4, 48
%6 = tail call i32 @lcd_putch(i8 signext %5)
br label %15
7: ; preds = %1
%8 = icmp ult i32 %0, 16
br i1 %8, label %9, label %13
9: ; preds = %7
%10 = trunc i32 %0 to i8
%11 = add nuw nsw i8 %10, 55
%12 = tail call i32 @lcd_putch(i8 signext %11)
br label %15
13: ; preds = %7
%14 = tail call i32 @lcd_putstr(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %15
15: ; preds = %9, %13, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, size_t, char *);
void *malloc(size_t);
int /*<<< orphan*/ stderr;
void *Malloc_buf(size_t s, char *purpose) {
  void *r = NULL;
  r = malloc(s);
  if (r == NULL) {
    fprintf(stderr, "Error: Cannot allocate %d bytes for %s.\n", s, purpose);
    exit(1);
  }
  return r;
}


x86 assembly (clang, -O0):
<Malloc_buf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movq   $0x0,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1187 <Malloc_buf+0x57>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xe88(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Malloc_buf>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1040 <malloc@plt>
test   %rax,%rax
je     114c <Malloc_buf+0x1c>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
lea    0xea4(%rip),%rsi
mov    %rbx,%rdx
mov    %r14,%rcx
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [41 x i8] c"Error: Cannot allocate %d bytes for %s.\0A\00"
define i8* @Malloc_buf(i64 %0, i8* %1) {
%3 = alloca i64
%4 = alloca i8*
%5 = alloca i8*
store i64 %0, i64* %3
store i8* %1, i8** %4
store i8* null, i8** %5
%6 = load i64, i64* %3
%7 = call i8* @malloc(i64 %6)
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = icmp eq i8* %8, null
br i1 %9, label %10, label %16
10: ; preds = %2
%11 = load i32, i32* @stderr
%12 = load i64, i64* %3
%13 = load i8*, i8** %4
%14 = call i32 @fprintf(i32 %11, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %12, i8* %13)
%15 = call i32 @exit(i32 1)
unreachable
16: ; preds = %2
%17 = load i8*, i8** %5
ret i8* %17
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [41 x i8] c"Error: Cannot allocate %d bytes for %s.\0A\00"
define noalias i8* @Malloc_buf(i64 %0, i8* %1) {
%3 = tail call i8* @malloc(i64 %0)
%4 = icmp eq i8* %3, null
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str, i64 0, i64 0), i64 %0, i8* %1)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret i8* %3
}
unsigned xrop3_93_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  stk3 = ~S;
  stk2 = T | stk3;
  stk1 = D & stk2;
  stk1 = ~stk1;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_93_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
and    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_93_1_0>:
mov    %edi,%ecx
shl    $0x8,%ecx
or     %edi,%ecx
mov    %edi,%eax
xor    $0xff,%eax
or     %esi,%eax
or     %ecx,%eax
not    %eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_93_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%11 = load i8, i8* %3
%12 = zext i8 %11 to i32
%13 = shl i32 %12, 8
%14 = load i8, i8* %3
%15 = zext i8 %14 to i32
%16 = or i32 %13, %15
store i32 %16, i32* %6
%17 = load i8, i8* %4
%18 = zext i8 %17 to i32
%19 = shl i32 %18, 8
%20 = load i8, i8* %4
%21 = zext i8 %20 to i32
%22 = or i32 %19, %21
store i32 %22, i32* %7
%23 = load i32, i32* %6
%24 = xor i32 %23, -1
store i32 %24, i32* %10
%25 = load i32, i32* %7
%26 = load i32, i32* %10
%27 = or i32 %25, %26
store i32 %27, i32* %9
%28 = load i32, i32* %5
%29 = load i32, i32* %9
%30 = and i32 %28, %29
store i32 %30, i32* %8
%31 = load i32, i32* %8
%32 = xor i32 %31, -1
store i32 %32, i32* %8
%33 = load i32, i32* %8
%34 = load i32, i32* %6
%35 = xor i32 %34, -1
%36 = and i32 %33, %35
%37 = load i32, i32* %5
%38 = load i32, i32* %6
%39 = and i32 %37, %38
%40 = or i32 %36, %39
ret i32 %40
}

LLVM IR (-O2):
define i32 @xrop3_93_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = mul nuw nsw i32 %3, 257
%5 = zext i8 %1 to i32
%6 = xor i32 %3, 255
%7 = or i32 %6, %5
%8 = or i32 %7, %4
%9 = xor i32 %8, -1
%10 = or i32 %9, %3
ret i32 %10
}
int power_even(int number, int even) {
  if (even == 1) {
    return number;
  } else {
    return power_even(number, even / 2) * power_even(number, even / 2);
  }
}


x86 assembly (clang, -O0):
<power_even>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x1,-0xc(%rbp)
jne    1133 <power_even+0x23>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    116b <power_even+0x5b>
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1030 <power_even@plt>
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%edi
mov    -0xc(%rbp),%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
call   1030 <power_even@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
imul   %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<power_even>:
mov    %edi,%eax
cmp    $0x1,%esi
je     1131 <power_even+0x21>
push   %rax
mov    %esi,%ecx
shr    $0x1f,%ecx
add    %esi,%ecx
sar    %ecx
mov    %eax,%edi
mov    %ecx,%esi
call   1030 <power_even@plt>
imul   %eax,%eax
add    $0x8,%rsp
ret

LLVM IR (-O0):
define i32 @power_even(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %5
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %10
8: ; preds = %2
%9 = load i32, i32* %4
store i32 %9, i32* %3
br label %20
10: ; preds = %2
%11 = load i32, i32* %4
%12 = load i32, i32* %5
%13 = sdiv i32 %12, 2
%14 = call i32 @power_even(i32 %11, i32 %13)
%15 = load i32, i32* %4
%16 = load i32, i32* %5
%17 = sdiv i32 %16, 2
%18 = call i32 @power_even(i32 %15, i32 %17)
%19 = mul nsw i32 %14, %18
store i32 %19, i32* %3
br label %20
20: ; preds = %10, %8
%21 = load i32, i32* %3
ret i32 %21
}

LLVM IR (-O2):
define i32 @power_even(i32 %0, i32 %1) {
%3 = icmp eq i32 %1, 1
br i1 %3, label %4, label %6
4: ; preds = %2, %6
%5 = phi i32 [ %9, %6 ], [ %0, %2 ]
ret i32 %5
6: ; preds = %2
%7 = sdiv i32 %1, 2
%8 = tail call i32 @power_even(i32 %0, i32 %7)
%9 = mul nsw i32 %8, %8
br label %4
}
/* Variables and functions */
char *strncat(char *, char *, int);
char *t7(char *x) { return strncat(x, "", 1); }


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

x86 assembly (clang, -O2):
<t7>:
lea    0xee9(%rip),%rsi
mov    $0x1,%edx
jmp    1030 <strncat@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
define i8* @t7(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i8* @strncat(i8* %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1)
ret i8* %4
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
define i8* @t7(i8* %0) {
%2 = tail call i8* @strncat(i8* %0, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 1)
ret i8* %2
}
/* Type definitions */
struct connection {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ log_add(char *, char *);
int /*<<< orphan*/ send_hello(struct connection *);
void on_connect(void *handle) {
  struct connection *conn = handle;
  log_add("INFO", "on_connect");
  send_hello(conn);
}


x86 assembly (clang, -O0):
<on_connect>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    0xec5(%rip),%rdi
lea    0xec3(%rip),%rsi
call   1030 <log_add@plt>
mov    -0x10(%rbp),%rdi
call   1040 <send_hello@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<on_connect>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
lea    0xed3(%rip),%rsi
call   1030 <log_add@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <send_hello@plt>

LLVM IR (-O0):
%struct.connection = type { i32 }
@.str = [5 x i8] c"INFO\00"
@.str.1 = [11 x i8] c"on_connect\00"
define void @on_connect(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.connection*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = bitcast i8* %4 to %struct.connection*
store %struct.connection* %5, %struct.connection** %3
%6 = call i32 @log_add(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%7 = load %struct.connection*, %struct.connection** %3
%8 = call i32 @send_hello(%struct.connection* %7)
ret void
}

LLVM IR (-O2):
%struct.connection = type { i32 }
@.str = [5 x i8] c"INFO\00"
@.str.1 = [11 x i8] c"on_connect\00"
define void @on_connect(i8* %0) {
%2 = bitcast i8* %0 to %struct.connection*
%3 = tail call i32 @log_add(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @send_hello(%struct.connection* %2)
ret void
}
void foo266(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo266(i32 %0) {
ret void
}
void test16_Test_targetInit__I() {}


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

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

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

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

/* Variables and functions */
uint32_t xattr_inode_hash_fn(uint32_t inode) {
  return ((inode * 0x72B5F387U) & (65536 - 1));
}


x86 assembly (clang, -O0):
<xattr_inode_hash_fn>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
imul   $0x72b5f387,-0x4(%rbp),%eax
and    $0xffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xattr_inode_hash_fn>:
imul   $0x72b5f387,%edi,%eax
movzwl %ax,%eax
ret

LLVM IR (-O0):
define i32 @xattr_inode_hash_fn(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = mul i32 %3, 1924526983
%5 = and i32 %4, 65535
ret i32 %5
}

LLVM IR (-O2):
define i32 @xattr_inode_hash_fn(i32 %0) {
%2 = mul i32 %0, 1924526983
%3 = and i32 %2, 65535
ret i32 %3
}
void barrier(void) { asm volatile("mfence"); }


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

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

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

LLVM IR (-O2):
define void @barrier() {
tail call void asm sideeffect "mfence", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
void led_status_emm_ok(void) {}


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

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

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

LLVM IR (-O2):
define void @led_status_emm_ok() {
ret void
}
int isNumRex(char ch) { return ((ch >= '0') && (ch <= '9')); }


x86 assembly (clang, -O0):
<isNumRex>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
xor    %eax,%eax
cmp    $0x30,%ecx
mov    %al,-0x2(%rbp)
jl     1129 <isNumRex+0x29>
movsbl -0x1(%rbp),%eax
cmp    $0x39,%eax
setle  %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<isNumRex>:
add    $0xd0,%dil
xor    %eax,%eax
cmp    $0xa,%dil
setb   %al
ret

LLVM IR (-O0):
define i32 @isNumRex(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp sge i32 %4, 48
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp sle i32 %8, 57
br label %10
10: ; preds = %6, %1
%11 = phi i1 [ false, %1 ], [ %9, %6 ]
%12 = zext i1 %11 to i32
ret i32 %12
}

LLVM IR (-O2):
define i32 @isNumRex(i8 signext %0) {
%2 = add i8 %0, -48
%3 = icmp ult i8 %2, 10
%4 = zext i1 %3 to i32
ret i32 %4
}
int test_imm_8Auint64_midword_mem(unsigned long long *val) {
  return ((*val >> 16) & (0x8A << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_8Auint64_midword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = lshr i64 %4, 16
%6 = and i64 %5, 138
%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_8Auint64_midword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 9043968
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Type definitions */
struct YsGLSL3DRenderer {
  int dummy;
};

/* Variables and functions */
struct YsGLSL3DRenderer *YsGLSLCreateVariColorPerVtxShading3DRenderer();
struct YsGLSL3DRenderer *YsGLSLCreateMonoColorPerVtxShading3DRenderer(void) {
  return YsGLSLCreateVariColorPerVtxShading3DRenderer();
}


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

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

LLVM IR (-O0):
%struct.YsGLSL3DRenderer = type { i32 }
define %struct.YsGLSL3DRenderer* @YsGLSLCreateMonoColorPerVtxShading3DRenderer() {
%1 = call %struct.YsGLSL3DRenderer* (...) @YsGLSLCreateVariColorPerVtxShading3DRenderer()
ret %struct.YsGLSL3DRenderer* %1
}

LLVM IR (-O2):
%struct.YsGLSL3DRenderer = type { i32 }
define %struct.YsGLSL3DRenderer* @YsGLSLCreateMonoColorPerVtxShading3DRenderer() {
%1 = tail call %struct.YsGLSL3DRenderer* (...) @YsGLSLCreateVariColorPerVtxShading3DRenderer()
ret %struct.YsGLSL3DRenderer* %1
}
/* Variables and functions */
int /*<<< orphan*/ parse_error();
int parse_option(char const *, char *);
void assign_option(int *target, const char *val, char *options) {
  int t = parse_option(val, options);
  if (t == -1) {
    parse_error();
  } else {
    *target = t;
  }
}


x86 assembly (clang, -O0):
<assign_option>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <parse_option@plt>
mov    %eax,-0x1c(%rbp)
cmpl   $0xffffffff,-0x1c(%rbp)
jne    115a <assign_option+0x3a>
mov    $0x0,%al
call   1040 <parse_error@plt>
jmp    1163 <assign_option+0x43>
mov    -0x1c(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<assign_option>:
push   %rbx
mov    %rdi,%rbx
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <parse_option@plt>
cmp    $0xffffffff,%eax
je     1138 <assign_option+0x18>
mov    %eax,(%rbx)
pop    %rbx
ret
xor    %eax,%eax
pop    %rbx
jmp    1040 <parse_error@plt>

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

LLVM IR (-O2):
define void @assign_option(i32* nocapture writeonly %0, i8* %1, i8* %2) {
%4 = tail call i32 @parse_option(i8* %1, i8* %2)
%5 = icmp eq i32 %4, -1
br i1 %5, label %6, label %8
6: ; preds = %3
%7 = tail call i32 (...) @parse_error()
br label %9
8: ; preds = %3
store i32 %4, i32* %0
br label %9
9: ; preds = %8, %6
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int /*<<< orphan*/);
void real_signal_handler(int signum) { exit(0); }


x86 assembly (clang, -O0):
<real_signal_handler>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<real_signal_handler>:
push   %rax
xor    %edi,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @real_signal_handler(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @exit(i32 0)
unreachable
}

LLVM IR (-O2):
define void @real_signal_handler(i32 %0) {
%2 = tail call i32 @exit(i32 0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ SHUT_WR;
int /*<<< orphan*/ shutdown(int, int /*<<< orphan*/);
void socket_endwrite(int fd) {
  if (fd < 0)
    return;
  shutdown(fd, SHUT_WR);
}


x86 assembly (clang, -O0):
<socket_endwrite>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    112a <socket_endwrite+0x1a>
jmp    113b <socket_endwrite+0x2b>
mov    -0x4(%rbp),%edi
mov    0x2eb4(%rip),%rax
mov    (%rax),%esi
call   1030 <shutdown@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_endwrite>:
test   %edi,%edi
js     1122 <socket_endwrite+0x12>
mov    0x2ecd(%rip),%rax
mov    (%rax),%esi
jmp    1030 <shutdown@plt>
ret

LLVM IR (-O0):
@SHUT_WR = global i32 0
define void @socket_endwrite(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = load i32, i32* %2
%8 = load i32, i32* @SHUT_WR
%9 = call i32 @shutdown(i32 %7, i32 %8)
br label %10
10: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@SHUT_WR = global i32 0
define void @socket_endwrite(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = load i32, i32* @SHUT_WR
%5 = tail call i32 @shutdown(i32 %0, i32 %4)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ puts(char *);
int main(void) { puts("Bye bye!"); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
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 = [9 x i8] c"Bye bye!\00"
define i32 @main() {
%1 = call i32 @puts(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"Bye bye!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ double_ts_to_str(int /*<<< orphan*/, char *, char *, int);
int /*<<< orphan*/ get_ts();
void get_now_ts(char *format_str, char *dest, int dest_size) {
  double_ts_to_str(get_ts(), format_str, dest, dest_size);
}


x86 assembly (clang, -O0):
<get_now_ts>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    $0x0,%al
call   1030 <get_ts@plt>
mov    %eax,%edi
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x14(%rbp),%ecx
call   1040 <double_ts_to_str@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_now_ts>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    %rdi,%rbp
xor    %eax,%eax
call   1030 <get_ts@plt>
mov    %eax,%edi
mov    %rbp,%rsi
mov    %rbx,%rdx
mov    %r14d,%ecx
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <double_ts_to_str@plt>

LLVM IR (-O0):
define void @get_now_ts(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = call i32 (...) @get_ts()
%8 = load i8*, i8** %4
%9 = load i8*, i8** %5
%10 = load i32, i32* %6
%11 = call i32 @double_ts_to_str(i32 %7, i8* %8, i8* %9, i32 %10)
ret void
}

LLVM IR (-O2):
define void @get_now_ts(i8* %0, i8* %1, i32 %2) {
%4 = tail call i32 (...) @get_ts()
%5 = tail call i32 @double_ts_to_str(i32 %4, i8* %0, i8* %1, i32 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ putchar(int);
int rand();
int /*<<< orphan*/ srand(int /*<<< orphan*/);
int /*<<< orphan*/ time(int /*<<< orphan*/);
int main() {
  int flag = 0;
  srand(time(0));
  while (1) {
    int c = rand() % (26 + flag);
    if (c >= 26)
      putchar('\n');
    else
      putchar(c + 'a');
    flag = c < 26;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
mov    $0x0,%al
call   1060 <rand@plt>
mov    -0x8(%rbp),%ecx
add    $0x1a,%ecx
cltd
idiv   %ecx
mov    %edx,-0xc(%rbp)
cmpl   $0x1a,-0xc(%rbp)
jl     1190 <main+0x50>
mov    $0xa,%edi
call   1030 <putchar@plt>
jmp    119b <main+0x5b>
mov    -0xc(%rbp),%edi
add    $0x61,%edi
call   1030 <putchar@plt>
cmpl   $0x1a,-0xc(%rbp)
setl   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x8(%rbp)
jmp    1164 <main+0x24>

x86 assembly (clang, -O2):
<main>:
push   %rbx
xor    %edi,%edi
call   1050 <time@plt>
mov    %eax,%edi
call   1040 <srand@plt>
xor    %ebx,%ebx
jmp    116b <main+0x2b>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
setl   %bl
call   1030 <putchar@plt>
movzbl %bl,%ebx
xor    %eax,%eax
call   1060 <rand@plt>
or     $0x1a,%ebx
cltd
idiv   %ebx
lea    0x61(%rdx),%eax
mov    $0xa,%edi
cmp    $0x1a,%edx
jge    1160 <main+0x20>
mov    %eax,%edi
jmp    1160 <main+0x20>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%4 = call i32 @time(i32 0)
%5 = call i32 @srand(i32 %4)
br label %6
6: ; preds = %0, %19
%7 = call i32 (...) @rand()
%8 = load i32, i32* %2
%9 = add nsw i32 26, %8
%10 = srem i32 %7, %9
store i32 %10, i32* %3
%11 = load i32, i32* %3
%12 = icmp sge i32 %11, 26
br i1 %12, label %13, label %15
13: ; preds = %6
%14 = call i32 @putchar(i32 10)
br label %19
15: ; preds = %6
%16 = load i32, i32* %3
%17 = add nsw i32 %16, 97
%18 = call i32 @putchar(i32 %17)
br label %19
19: ; preds = %15, %13
%20 = load i32, i32* %3
%21 = icmp slt i32 %20, 26
%22 = zext i1 %21 to i32
store i32 %22, i32* %2
br label %6
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @time(i32 0)
%2 = tail call i32 @srand(i32 %1)
br label %3
3: ; preds = %3, %0
%4 = phi i32 [ 0, %0 ], [ %13, %3 ]
%5 = tail call i32 (...) @rand()
%6 = or i32 %4, 26
%7 = srem i32 %5, %6
%8 = icmp sgt i32 %7, 25
%9 = add nsw i32 %7, 97
%10 = select i1 %8, i32 10, i32 %9
%11 = tail call i32 @putchar(i32 %10)
%12 = icmp slt i32 %7, 26
%13 = zext i1 %12 to i32
br label %3
}
/* Type definitions */
typedef int uint8_t;
typedef int uint32_t;

/* Variables and functions */
void wm32(uint8_t a[4], uint32_t x) {
  a[0] = x >> 24;
  a[1] = x >> 16;
  a[2] = x >> 8;
  a[3] = x >> 0;
}


x86 assembly (clang, -O0):
<wm32>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%ecx
sar    $0x18,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x10,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x8,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0xc(%rbp),%ecx
sar    $0x0,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<wm32>:
mov    %esi,%eax
sar    $0x18,%eax
mov    %eax,(%rdi)
mov    %esi,%eax
sar    $0x10,%eax
mov    %eax,0x4(%rdi)
mov    %esi,%eax
sar    $0x8,%eax
mov    %eax,0x8(%rdi)
mov    %esi,0xc(%rdi)
ret

LLVM IR (-O0):
define void @wm32(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 = ashr i32 %5, 24
%7 = load i32*, i32** %3
%8 = getelementptr inbounds i32, i32* %7, i64 0
store i32 %6, i32* %8
%9 = load i32, i32* %4
%10 = ashr i32 %9, 16
%11 = load i32*, i32** %3
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32 %10, i32* %12
%13 = load i32, i32* %4
%14 = ashr i32 %13, 8
%15 = load i32*, i32** %3
%16 = getelementptr inbounds i32, i32* %15, i64 2
store i32 %14, i32* %16
%17 = load i32, i32* %4
%18 = ashr i32 %17, 0
%19 = load i32*, i32** %3
%20 = getelementptr inbounds i32, i32* %19, i64 3
store i32 %18, i32* %20
ret void
}

LLVM IR (-O2):
define void @wm32(i32* nocapture writeonly %0, i32 %1) {
%3 = ashr i32 %1, 24
store i32 %3, i32* %0
%4 = ashr i32 %1, 16
%5 = getelementptr inbounds i32, i32* %0, i64 1
store i32 %4, i32* %5
%6 = ashr i32 %1, 8
%7 = getelementptr inbounds i32, i32* %0, i64 2
store i32 %6, i32* %7
%8 = getelementptr inbounds i32, i32* %0, i64 3
store i32 %1, i32* %8
ret void
}
/* Type definitions */
struct stack_st_OPENSSL_BLOCK {
  int dummy;
};
typedef int /*<<< orphan*/ OPENSSL_STACK;

/* Variables and functions */
int OPENSSL_sk_find(int /*<<< orphan*/ *, void const *);
int sk_OPENSSL_BLOCK_find(struct stack_st_OPENSSL_BLOCK *sk, void *ptr) {
  return OPENSSL_sk_find((OPENSSL_STACK *)sk, (const void *)ptr);
}


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

x86 assembly (clang, -O2):
<sk_OPENSSL_BLOCK_find>:
jmp    1030 <OPENSSL_sk_find@plt>

LLVM IR (-O0):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i32 @sk_OPENSSL_BLOCK_find(%struct.stack_st_OPENSSL_BLOCK* %0, i8* %1) {
%3 = alloca %struct.stack_st_OPENSSL_BLOCK*
%4 = alloca i8*
store %struct.stack_st_OPENSSL_BLOCK* %0, %struct.stack_st_OPENSSL_BLOCK** %3
store i8* %1, i8** %4
%5 = load %struct.stack_st_OPENSSL_BLOCK*, %struct.stack_st_OPENSSL_BLOCK** %3
%6 = bitcast %struct.stack_st_OPENSSL_BLOCK* %5 to i32*
%7 = load i8*, i8** %4
%8 = call i32 @OPENSSL_sk_find(i32* %6, i8* %7)
ret i32 %8
}

LLVM IR (-O2):
%struct.stack_st_OPENSSL_BLOCK = type { i32 }
define i32 @sk_OPENSSL_BLOCK_find(%struct.stack_st_OPENSSL_BLOCK* %0, i8* %1) {
%3 = getelementptr %struct.stack_st_OPENSSL_BLOCK, %struct.stack_st_OPENSSL_BLOCK* %0, i64 0, i32 0
%4 = tail call i32 @OPENSSL_sk_find(i32* %3, i8* %1)
ret i32 %4
}
/* Variables and functions */
int pow(double, int);
double f_linha(double x) { return 3 * pow(x, 2); }


x86 assembly (clang, -O0):
<f_linha>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
mov    $0x2,%edi
call   1030 <pow@plt>
imul   $0x3,%eax,%eax
cvtsi2sd %eax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<f_linha>:
push   %rax
mov    $0x2,%edi
call   1030 <pow@plt>
lea    (%rax,%rax,2),%eax
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define double @f_linha(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @pow(double %3, i32 2)
%5 = mul nsw i32 3, %4
%6 = sitofp i32 %5 to double
ret double %6
}

LLVM IR (-O2):
define double @f_linha(double %0) {
%2 = tail call i32 @pow(double %0, i32 2)
%3 = mul nsw i32 %2, 3
%4 = sitofp i32 %3 to double
ret double %4
}
/* Variables and functions */
int clear_msb(int, int);
int test_clear_msb() { return 0b000111 == clear_msb(0b111111, 3); }


x86 assembly (clang, -O0):
<test_clear_msb>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3f,%edi
mov    $0x3,%esi
call   1030 <clear_msb@plt>
mov    %eax,%ecx
mov    $0x7,%eax
cmp    %ecx,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_clear_msb>:
push   %rax
mov    $0x3f,%edi
mov    $0x3,%esi
call   1030 <clear_msb@plt>
xor    %ecx,%ecx
cmp    $0x7,%eax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @test_clear_msb() {
%1 = call i32 @clear_msb(i32 63, i32 3)
%2 = icmp eq i32 7, %1
%3 = zext i1 %2 to i32
ret i32 %3
}

LLVM IR (-O2):
define i32 @test_clear_msb() {
%1 = tail call i32 @clear_msb(i32 63, i32 3)
%2 = icmp eq i32 %1, 7
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int BIT(int);
int wpa_key_mgmt_ft(int akm) { return akm == BIT(6) || akm == BIT(5); }


x86 assembly (clang, -O0):
<wpa_key_mgmt_ft>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    $0x6,%edi
call   1030 <BIT@plt>
mov    -0xc(%rbp),%ecx
mov    %eax,%edx
mov    $0x1,%al
cmp    %edx,%ecx
mov    %al,-0x5(%rbp)
je     115a <wpa_key_mgmt_ft+0x4a>
mov    -0x4(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    -0x10(%rbp),%eax
cmp    %ecx,%eax
sete   %al
mov    %al,-0x5(%rbp)
mov    -0x5(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wpa_key_mgmt_ft>:
push   %rbx
mov    %edi,%ebx
mov    $0x6,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ebx,%ecx
je     113b <wpa_key_mgmt_ft+0x2b>
mov    $0x5,%edi
call   1030 <BIT@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    %ebx,%ecx
sete   %al
pop    %rbx
ret

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

LLVM IR (-O2):
define i32 @wpa_key_mgmt_ft(i32 %0) {
%2 = tail call i32 @BIT(i32 6)
%3 = icmp eq i32 %2, %0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @BIT(i32 5)
%6 = icmp eq i32 %5, %0
%7 = zext i1 %6 to i32
br label %8
8: ; preds = %4, %1
%9 = phi i32 [ 1, %1 ], [ %7, %4 ]
ret i32 %9
}
/* Variables and functions */
float __nv_y1f(float);
float y1f(float __a) { return __nv_y1f(__a); }


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

x86 assembly (clang, -O2):
<y1f>:
jmp    1030 <__nv_y1f@plt>

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

LLVM IR (-O2):
define float @y1f(float %0) {
%2 = tail call float @__nv_y1f(float %0)
ret float %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void muj_free_string_copy_target(char *string) { free(string); }


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

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

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

LLVM IR (-O2):
define void @muj_free_string_copy_target(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello Snickerdoodle\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeda(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%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 = [21 x i8] c"Hello Snickerdoodle\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [20 x i8] c"Hello Snickerdoodle\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ boardCoordAdditionWorksInRange();
int /*<<< orphan*/ boardCoordGetsCoordinates();
int /*<<< orphan*/ boardCoordMultiplicationWorkInRange();
int /*<<< orphan*/ boardCoordSubtractionWorksInRange();
int /*<<< orphan*/ differentBoardCoordAreNotEqual();
int /*<<< orphan*/ sameBoardCoordsAreEqual();
void testBoardCoord(void) {
  boardCoordGetsCoordinates();
  boardCoordAdditionWorksInRange();
  boardCoordSubtractionWorksInRange();
  boardCoordMultiplicationWorkInRange();
  sameBoardCoordsAreEqual();
  differentBoardCoordAreNotEqual();
}


x86 assembly (clang, -O0):
<testBoardCoord>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <boardCoordGetsCoordinates@plt>
mov    $0x0,%al
call   1080 <boardCoordAdditionWorksInRange@plt>
mov    $0x0,%al
call   1060 <boardCoordSubtractionWorksInRange@plt>
mov    $0x0,%al
call   1040 <boardCoordMultiplicationWorkInRange@plt>
mov    $0x0,%al
call   1050 <sameBoardCoordsAreEqual@plt>
mov    $0x0,%al
call   1030 <differentBoardCoordAreNotEqual@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<testBoardCoord>:
push   %rax
xor    %eax,%eax
call   1070 <boardCoordGetsCoordinates@plt>
xor    %eax,%eax
call   1080 <boardCoordAdditionWorksInRange@plt>
xor    %eax,%eax
call   1060 <boardCoordSubtractionWorksInRange@plt>
xor    %eax,%eax
call   1040 <boardCoordMultiplicationWorkInRange@plt>
xor    %eax,%eax
call   1050 <sameBoardCoordsAreEqual@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <differentBoardCoordAreNotEqual@plt>

LLVM IR (-O0):
define void @testBoardCoord() {
%1 = call i32 (...) @boardCoordGetsCoordinates()
%2 = call i32 (...) @boardCoordAdditionWorksInRange()
%3 = call i32 (...) @boardCoordSubtractionWorksInRange()
%4 = call i32 (...) @boardCoordMultiplicationWorkInRange()
%5 = call i32 (...) @sameBoardCoordsAreEqual()
%6 = call i32 (...) @differentBoardCoordAreNotEqual()
ret void
}

LLVM IR (-O2):
define void @testBoardCoord() {
%1 = tail call i32 (...) @boardCoordGetsCoordinates()
%2 = tail call i32 (...) @boardCoordAdditionWorksInRange()
%3 = tail call i32 (...) @boardCoordSubtractionWorksInRange()
%4 = tail call i32 (...) @boardCoordMultiplicationWorkInRange()
%5 = tail call i32 (...) @sameBoardCoordsAreEqual()
%6 = tail call i32 (...) @differentBoardCoordAreNotEqual()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ cm_accent_generic(int, int, int, char *, char,
                                     int /*<<< orphan*/, char *);
void cm_accent_tilde(int arg, int start, int end) {
  cm_accent_generic(arg, start, end, "ANOano", '~', 0, "tilde");
}


x86 assembly (clang, -O0):
<cm_accent_tilde>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
lea    0xecf(%rip),%rcx
mov    $0x7e,%r8d
xor    %r9d,%r9d
lea    0xec6(%rip),%rax
mov    %rax,(%rsp)
call   1030 <cm_accent_generic@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cm_accent_tilde>:
push   %rax
lea    0xeef(%rip),%rax
mov    %rax,(%rsp)
lea    0xedd(%rip),%rcx
mov    $0x7e,%r8d
xor    %r9d,%r9d
call   1030 <cm_accent_generic@plt>
pop    %rax
ret

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

LLVM IR (-O2):
@.str = [7 x i8] c"ANOano\00"
@.str.1 = [6 x i8] c"tilde\00"
define void @cm_accent_tilde(i32 %0, i32 %1, i32 %2) {
%4 = tail call i32 @cm_accent_generic(i32 %0, i32 %1, i32 %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8 signext 126, i32 0, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
ret void
}
int foo(int *p) {
  *p = *p + 10;
  return *p;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
add    $0xa,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    (%rdi),%eax
add    $0xa,%eax
mov    %eax,(%rdi)
ret

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

LLVM IR (-O2):
define i32 @foo(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = add nsw i32 %2, 10
store i32 %3, i32* %0
ret i32 %3
}
void foo(void) { int A[-2 / -1] = {}; }


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x8(%rbp),%rdi
xor    %esi,%esi
mov    $0x8,%edx
call   1030 <memset@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @foo() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
ret void
}

LLVM IR (-O2):
define void @foo() {
ret void
}
int c060(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @c060() {
ret i32 0
}
/* Variables and functions */
bool nrf52_errata_146(void) { return false; }


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

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

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

LLVM IR (-O2):
define i32 @nrf52_errata_146() {
ret i32 0
}