xunge/DecIR huggingface dataset:
/* Variables and functions */
double log(double);
unsigned int primes_under(const unsigned int n) {
  if (n == 0)
    return 0;
  return (unsigned int)((1.25506 * n) / log((double)n));
}


x86 assembly (clang, -O0):
<primes_under>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x0,-0x8(%rbp)
jne    1131 <primes_under+0x21>
movl   $0x0,-0x4(%rbp)
jmp    1166 <primes_under+0x56>
mov    -0x8(%rbp),%eax
cvtsi2sd %rax,%xmm0
movsd  0xebf(%rip),%xmm2
movaps %xmm0,%xmm1
mulsd  %xmm2,%xmm1
movsd  %xmm1,-0x10(%rbp)
call   1030 <log@plt>
movaps %xmm0,%xmm1
movsd  -0x10(%rbp),%xmm0
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<primes_under>:
test   %edi,%edi
je     1145 <primes_under+0x35>
push   %rax
mov    %edi,%eax
cvtsi2sd %rax,%xmm0
movsd  0xedc(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  %xmm1,(%rsp)
call   1030 <log@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rax
add    $0x8,%rsp
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @primes_under(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp eq i32 %4, 0
br i1 %5, label %6, label %7
6: ; preds = %1
store i32 0, i32* %2
br label %16
7: ; preds = %1
%8 = load i32, i32* %3
%9 = uitofp i32 %8 to double
%10 = fmul double 1.255060e+00, %9
%11 = load i32, i32* %3
%12 = uitofp i32 %11 to double
%13 = call double @log(double %12)
%14 = fdiv double %10, %13
%15 = fptoui double %14 to i32
store i32 %15, i32* %2
br label %16
16: ; preds = %7, %6
%17 = load i32, i32* %2
ret i32 %17
}

LLVM IR (-O2):
define i32 @primes_under(i32 %0) {
%2 = icmp eq i32 %0, 0
br i1 %2, label %9, label %3
3: ; preds = %1
%4 = uitofp i32 %0 to double
%5 = fmul double %4, 1.255060e+00
%6 = tail call double @log(double %4)
%7 = fdiv double %5, %6
%8 = fptoui double %7 to i32
br label %9
9: ; preds = %1, %3
%10 = phi i32 [ %8, %3 ], [ 0, %1 ]
ret i32 %10
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_RenderingControl_SelectPreset(void *);
int /*<<< orphan*/ printf(char *, unsigned int, char *);
void UPnPRenderingControl_SelectPreset(void *upnptoken, unsigned int InstanceID,
                                       char *PresetName) {
  printf("Invoke: UPnPRenderingControl_SelectPreset(%u,%s);\r\n", InstanceID,
         PresetName);
  UPnPResponse_RenderingControl_SelectPreset(upnptoken);
}


x86 assembly (clang, -O0):
<UPnPRenderingControl_SelectPreset>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
lea    0xebf(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1040 <UPnPResponse_RenderingControl_SelectPreset@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UPnPRenderingControl_SelectPreset>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UPnPResponse_RenderingControl_SelectPreset@plt>

LLVM IR (-O0):
@.str = [52 x i8] c"Invoke: UPnPRenderingControl_SelectPreset(%u,%s);\0D\0A\00"
define void @UPnPRenderingControl_SelectPreset(i8* %0, i32 %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i8*
store i8* %0, i8** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = load i8*, i8** %6
%9 = call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %7, i8* %8)
%10 = load i8*, i8** %4
%11 = call i32 @UPnPResponse_RenderingControl_SelectPreset(i8* %10)
ret void
}

LLVM IR (-O2):
@.str = [52 x i8] c"Invoke: UPnPRenderingControl_SelectPreset(%u,%s);\0D\0A\00"
define void @UPnPRenderingControl_SelectPreset(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @printf(i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str, i64 0, i64 0), i32 %1, i8* %2)
%5 = tail call i32 @UPnPResponse_RenderingControl_SelectPreset(i8* %0)
ret void
}
double BsplnWght0(long i, double x) {
  x -= (double)i;
  return ((x >= 0.5) ? (0.0) : ((x < -0.5) ? (0.0) : (1.0)));
}


x86 assembly (clang, -O0):
<BsplnWght0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movsd  %xmm0,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm1
movsd  -0x10(%rbp),%xmm0
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  0xed2(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     1145 <BsplnWght0+0x45>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1176 <BsplnWght0+0x76>
movsd  -0x10(%rbp),%xmm0
xorps  %xmm3,%xmm3
movsd  0xeb3(%rip),%xmm2
movsd  0xeb3(%rip),%xmm1
cmpltsd %xmm1,%xmm0
movaps %xmm0,%xmm1
andpd  %xmm3,%xmm1
andnpd %xmm2,%xmm0
orpd   %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<BsplnWght0>:
cvtsi2sd %rdi,%xmm1
subsd  %xmm1,%xmm0
movapd %xmm0,%xmm2
cmpltsd 0xeea(%rip),%xmm2
movsd  0xef2(%rip),%xmm1
cmpnlesd %xmm0,%xmm1
movsd  0xedd(%rip),%xmm0
andnpd %xmm0,%xmm2
andpd  %xmm2,%xmm1
movapd %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @BsplnWght0(i64 %0, double %1) {
%3 = alloca i64
%4 = alloca double
store i64 %0, i64* %3
store double %1, double* %4
%5 = load i64, i64* %3
%6 = sitofp i64 %5 to double
%7 = load double, double* %4
%8 = fsub double %7, %6
store double %8, double* %4
%9 = load double, double* %4
%10 = fcmp oge double %9, 5.000000e-01
br i1 %10, label %11, label %12
11: ; preds = %2
br label %17
12: ; preds = %2
%13 = load double, double* %4
%14 = fcmp olt double %13, -5.000000e-01
%15 = zext i1 %14 to i64
%16 = select i1 %14, double 0.000000e+00, double 1.000000e+00
br label %17
17: ; preds = %12, %11
%18 = phi double [ 0.000000e+00, %11 ], [ %16, %12 ]
ret double %18
}

LLVM IR (-O2):
define double @BsplnWght0(i64 %0, double %1) {
%3 = sitofp i64 %0 to double
%4 = fsub double %1, %3
%5 = fcmp ult double %4, 5.000000e-01
%6 = fcmp olt double %4, -5.000000e-01
%7 = select i1 %6, double 0.000000e+00, double 1.000000e+00
%8 = select i1 %5, double %7, double 0.000000e+00
ret double %8
}
unsigned int get_InitYYYYMMDDHH(unsigned char *pds) {
  return ((((100 * (pds[24] - 1) + pds[12]) * 100 + pds[13]) * 100 + pds[14]) *
              100 +
          pds[15]);
}


x86 assembly (clang, -O0):
<get_InitYYYYMMDDHH>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl 0x18(%rax),%eax
sub    $0x1,%eax
imul   $0x64,%eax,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xc(%rcx),%ecx
add    %ecx,%eax
imul   $0x64,%eax,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xd(%rcx),%ecx
add    %ecx,%eax
imul   $0x64,%eax,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xe(%rcx),%ecx
add    %ecx,%eax
imul   $0x64,%eax,%eax
mov    -0x8(%rbp),%rcx
movzbl 0xf(%rcx),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_InitYYYYMMDDHH>:
movzbl 0x18(%rdi),%eax
imul   $0x64,%eax,%eax
movzbl 0xc(%rdi),%ecx
add    %eax,%ecx
imul   $0x64,%ecx,%eax
movzbl 0xd(%rdi),%ecx
add    %eax,%ecx
imul   $0x64,%ecx,%eax
movzbl 0xe(%rdi),%ecx
add    %eax,%ecx
imul   $0x64,%ecx,%eax
movzbl 0xf(%rdi),%ecx
add    %ecx,%eax
add    $0xfa0a1f00,%eax
ret

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

LLVM IR (-O2):
define i32 @get_InitYYYYMMDDHH(i8* nocapture %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 24
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = mul nuw nsw i32 %4, 100
%6 = add nsw i32 %5, -100
%7 = getelementptr inbounds i8, i8* %0, i64 12
%8 = load i8, i8* %7
%9 = zext i8 %8 to i32
%10 = add nsw i32 %6, %9
%11 = mul nsw i32 %10, 100
%12 = getelementptr inbounds i8, i8* %0, i64 13
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = add nsw i32 %11, %14
%16 = mul nsw i32 %15, 100
%17 = getelementptr inbounds i8, i8* %0, i64 14
%18 = load i8, i8* %17
%19 = zext i8 %18 to i32
%20 = add nsw i32 %16, %19
%21 = mul nsw i32 %20, 100
%22 = getelementptr inbounds i8, i8* %0, i64 15
%23 = load i8, i8* %22
%24 = zext i8 %23 to i32
%25 = add nsw i32 %21, %24
ret i32 %25
}
wycc_high_bit(long itm) {
  int tmpa, tmpb;
  tmpb = 0;
  for (tmpa = itm; tmpa > 0; tmpa &= (tmpa - 1)) {
    tmpb = tmpa;
  }
  return tmpb;
}


x86 assembly (clang, -O0):
<wycc_high_bit>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    1137 <wycc_high_bit+0x37>
mov    -0xc(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sub    $0x1,%eax
and    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1116 <wycc_high_bit+0x16>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<wycc_high_bit>:
test   %edi,%edi
jle    111a <wycc_high_bit+0x1a>
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %edi,%eax
lea    -0x1(%rax),%edi
and    %eax,%edi
jne    1110 <wycc_high_bit+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @wycc_high_bit(i64 %0) {
%2 = alloca i64
%3 = alloca i32
%4 = alloca i32
store i64 %0, i64* %2
store i32 0, i32* %4
%5 = load i64, i64* %2
%6 = trunc i64 %5 to i32
store i32 %6, i32* %3
br label %7
7: ; preds = %12, %1
%8 = load i32, i32* %3
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %17
10: ; preds = %7
%11 = load i32, i32* %3
store i32 %11, i32* %4
br label %12
12: ; preds = %10
%13 = load i32, i32* %3
%14 = sub nsw i32 %13, 1
%15 = load i32, i32* %3
%16 = and i32 %15, %14
store i32 %16, i32* %3
br label %7
17: ; preds = %7
%18 = load i32, i32* %4
ret i32 %18
}

LLVM IR (-O2):
define i32 @wycc_high_bit(i64 %0) {
%2 = trunc i64 %0 to i32
%3 = icmp sgt i32 %2, 0
br i1 %3, label %4, label %9
4: ; preds = %1, %4
%5 = phi i32 [ %7, %4 ], [ %2, %1 ]
%6 = add nsw i32 %5, -1
%7 = and i32 %6, %5
%8 = icmp eq i32 %7, 0
br i1 %8, label %9, label %4
9: ; preds = %4, %1
%10 = phi i32 [ 0, %1 ], [ %5, %4 ]
ret i32 %10
}
/* Variables and functions */
int core3_swap(char *, int);
int U_EMRSELECTPALETTE_swap(char *record, int torev) {
  return (core3_swap(record, torev));
}


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

x86 assembly (clang, -O2):
<U_EMRSELECTPALETTE_swap>:
jmp    1030 <core3_swap@plt>

LLVM IR (-O0):
define i32 @U_EMRSELECTPALETTE_swap(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 = call i32 @core3_swap(i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
define i32 @U_EMRSELECTPALETTE_swap(i8* %0, i32 %1) {
%3 = tail call i32 @core3_swap(i8* %0, i32 %1)
ret i32 %3
}
/* Type definitions */
struct ship {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Writestr(int, struct ship *, char const *);
void send_signal(struct ship *ship, const char *astr) {
  Writestr(24, ship, astr);
}


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

x86 assembly (clang, -O2):
<send_signal>:
mov    %rsi,%rdx
mov    %rdi,%rsi
mov    $0x18,%edi
jmp    1030 <Writestr@plt>

LLVM IR (-O0):
%struct.ship = type { i32 }
define void @send_signal(%struct.ship* %0, i8* %1) {
%3 = alloca %struct.ship*
%4 = alloca i8*
store %struct.ship* %0, %struct.ship** %3
store i8* %1, i8** %4
%5 = load %struct.ship*, %struct.ship** %3
%6 = load i8*, i8** %4
%7 = call i32 @Writestr(i32 24, %struct.ship* %5, i8* %6)
ret void
}

LLVM IR (-O2):
%struct.ship = type { i32 }
define void @send_signal(%struct.ship* %0, i8* %1) {
%3 = tail call i32 @Writestr(i32 24, %struct.ship* %0, i8* %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void gad_check_block(int b1, int b2) {
  if (b1 != b2) {
    fprintf(stderr, "CUTE: Corrupted block!\n");
    exit(1);
  }
}


x86 assembly (clang, -O0):
<gad_check_block>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cmp    -0x8(%rbp),%eax
je     1159 <gad_check_block+0x39>
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
lea    0xeb6(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gad_check_block>:
cmp    %esi,%edi
jne    1125 <gad_check_block+0x5>
ret
push   %rax
mov    0x2eb3(%rip),%rax
mov    (%rax),%edi
lea    0xeca(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [24 x i8] c"CUTE: Corrupted block!\0A\00"
define void @gad_check_block(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 = icmp ne i32 %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i32, i32* @stderr
%10 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%11 = call i32 @exit(i32 1)
unreachable
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [24 x i8] c"CUTE: Corrupted block!\0A\00"
define void @gad_check_block(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str, i64 0, i64 0))
%7 = tail call i32 @exit(i32 1)
unreachable
8: ; preds = %2
ret void
}
/* Variables and functions */
double **matriz_nula(int, int);
double **matriz_quadrada_nula(int dim) { return matriz_nula(dim, dim); }


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

x86 assembly (clang, -O2):
<matriz_quadrada_nula>:
mov    %edi,%esi
jmp    1030 <matriz_nula@plt>

LLVM IR (-O0):
define double** @matriz_quadrada_nula(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = load i32, i32* %2
%5 = call double** @matriz_nula(i32 %3, i32 %4)
ret double** %5
}

LLVM IR (-O2):
define double** @matriz_quadrada_nula(i32 %0) {
%2 = tail call double** @matriz_nula(i32 %0, i32 %0)
ret double** %2
}
/* Variables and functions */
int f408(int *);
int f409(int *p) { return f408(p); }


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

x86 assembly (clang, -O2):
<f409>:
jmp    1030 <f408@plt>

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

LLVM IR (-O2):
define i32 @f409(i32* %0) {
%2 = tail call i32 @f408(i32* %0)
ret i32 %2
}
void unmap_physmem(void *vaddr, unsigned long len) {}


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

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

LLVM IR (-O0):
define void @unmap_physmem(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
ret void
}

LLVM IR (-O2):
define void @unmap_physmem(i8* nocapture %0, i64 %1) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ strncpy(char *, char *, int);
void getHeader(char *HTTPBuffer, int size) {
  strncpy(HTTPBuffer,
          "HTTP/1.0 200 OK\r\n"
          "Server: NetEye Safed/1.0\r\n"
          "MIME-version: 1.0\r\n"
          "Content-type: text/html\r\n\r\n",
          size);
}


x86 assembly (clang, -O0):
<getHeader>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%edx
lea    0xed3(%rip),%rsi
call   1030 <strncpy@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getHeader>:
mov    %esi,%edx
lea    0xee7(%rip),%rsi
jmp    1030 <strncpy@plt>

LLVM IR (-O0):
@.str = [90 x i8] c"HTTP/1.0 200 OK\0D\0AServer: NetEye Safed/1.0\0D\0AMIME-version: 1.0\0D\0AContent-type: text/html\0D\0A\0D\0A\00"
define void @getHeader(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 = call i32 @strncpy(i8* %5, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str, i64 0, i64 0), i32 %6)
ret void
}

LLVM IR (-O2):
@.str = [90 x i8] c"HTTP/1.0 200 OK\0D\0AServer: NetEye Safed/1.0\0D\0AMIME-version: 1.0\0D\0AContent-type: text/html\0D\0A\0D\0A\00"
define void @getHeader(i8* %0, i32 %1) {
%3 = tail call i32 @strncpy(i8* %0, i8* getelementptr inbounds ([90 x i8], [90 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
double baz(double x, double y) { return x * x * x * x * y * y * y * y; }


x86 assembly (clang, -O0):
<baz>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x8(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<baz>:
movapd %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm0,%xmm2
mulsd  %xmm2,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
mulsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @baz(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %3
%7 = fmul double %5, %6
%8 = load double, double* %3
%9 = fmul double %7, %8
%10 = load double, double* %3
%11 = fmul double %9, %10
%12 = load double, double* %4
%13 = fmul double %11, %12
%14 = load double, double* %4
%15 = fmul double %13, %14
%16 = load double, double* %4
%17 = fmul double %15, %16
%18 = load double, double* %4
%19 = fmul double %17, %18
ret double %19
}

LLVM IR (-O2):
define double @baz(double %0, double %1) {
%3 = fmul double %0, %0
%4 = fmul double %3, %0
%5 = fmul double %4, %0
%6 = fmul double %5, %1
%7 = fmul double %6, %1
%8 = fmul double %7, %1
%9 = fmul double %8, %1
ret double %9
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int /*<<< orphan*/, int /*<<< orphan*/);
void print_ver(void) {
  printf("as16 %d.%d.%d -- a Chip16 assembler\n", 1, 0, 0);
}


x86 assembly (clang, -O0):
<print_ver>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0x1,%esi
xor    %ecx,%ecx
mov    %ecx,%edx
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_ver>:
lea    0xee9(%rip),%rdi
mov    $0x1,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [37 x i8] c"as16 %d.%d.%d -- a Chip16 assembler\0A\00"
define void @print_ver() {
%1 = call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
ret void
}

LLVM IR (-O2):
@.str = [37 x i8] c"as16 %d.%d.%d -- a Chip16 assembler\0A\00"
define void @print_ver() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0), i32 1, i32 0, i32 0)
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *, int /*<<< orphan*/);
int clear_dobldobl_Laurent_data(void) {
  int *a, *b, fail;
  double *c;
  fail = _ada_use_c2phc(772, a, b, c, 0);
  return fail;
}


x86 assembly (clang, -O0):
<clear_dobldobl_Laurent_data>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x304,%edi
xor    %r8d,%r8d
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<clear_dobldobl_Laurent_data>:
mov    $0x304,%edi
xor    %r8d,%r8d
jmp    1030 <_ada_use_c2phc@plt>

LLVM IR (-O0):
define i32 @clear_dobldobl_Laurent_data() {
%1 = alloca i32*
%2 = alloca i32*
%3 = alloca i32
%4 = alloca double*
%5 = load i32*, i32** %1
%6 = load i32*, i32** %2
%7 = load double*, double** %4
%8 = call i32 @_ada_use_c2phc(i32 772, i32* %5, i32* %6, double* %7, i32 0)
store i32 %8, i32* %3
%9 = load i32, i32* %3
ret i32 %9
}

LLVM IR (-O2):
define i32 @clear_dobldobl_Laurent_data() {
%1 = tail call i32 @_ada_use_c2phc(i32 772, i32* undef, i32* undef, double* undef, i32 0)
ret i32 %1
}
void R_BeginDebugUtilsLabel(const char *name) {}


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

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

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

LLVM IR (-O2):
define void @R_BeginDebugUtilsLabel(i8* nocapture %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ vcall(float *, int);
void v2i(long int *vec) {
  float v[2];
  v[0] = vec[0];
  v[1] = vec[1];
  vcall(v, 2);
}


x86 assembly (clang, -O0):
<v2i>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2ssq (%rax),%xmm0
movss  %xmm0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cvtsi2ssq 0x8(%rax),%xmm0
movss  %xmm0,-0xc(%rbp)
lea    -0x10(%rbp),%rdi
mov    $0x2,%esi
call   1030 <vcall@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<v2i>:
push   %rax
cvtsi2ssq (%rdi),%xmm0
movss  %xmm0,(%rsp)
xorps  %xmm0,%xmm0
cvtsi2ssq 0x8(%rdi),%xmm0
movss  %xmm0,0x4(%rsp)
mov    %rsp,%rdi
mov    $0x2,%esi
call   1030 <vcall@plt>
pop    %rax
ret

LLVM IR (-O0):
define void @v2i(i64* %0) {
%2 = alloca i64*
%3 = alloca [2 x float]
store i64* %0, i64** %2
%4 = load i64*, i64** %2
%5 = getelementptr inbounds i64, i64* %4, i64 0
%6 = load i64, i64* %5
%7 = sitofp i64 %6 to float
%8 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
store float %7, float* %8
%9 = load i64*, i64** %2
%10 = getelementptr inbounds i64, i64* %9, i64 1
%11 = load i64, i64* %10
%12 = sitofp i64 %11 to float
%13 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 1
store float %12, float* %13
%14 = getelementptr inbounds [2 x float], [2 x float]* %3, i64 0, i64 0
%15 = call i32 @vcall(float* %14, i32 2)
ret void
}

LLVM IR (-O2):
define void @v2i(i64* nocapture %0) {
%2 = alloca [2 x float]
%3 = bitcast [2 x float]* %2 to i8*
%4 = load i64, i64* %0
%5 = sitofp i64 %4 to float
%6 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 0
store float %5, float* %6
%7 = getelementptr inbounds i64, i64* %0, i64 1
%8 = load i64, i64* %7
%9 = sitofp i64 %8 to float
%10 = getelementptr inbounds [2 x float], [2 x float]* %2, i64 0, i64 1
store float %9, float* %10
%11 = call i32 @vcall(float* %6, i32 2)
ret void
}
/* Type definitions */
struct ohci_hcd {
  int dummy;
};

/* Variables and functions */
struct ohci_hcd *hcd_to_ohci(void *);
int /*<<< orphan*/ ohci_dbg(struct ohci_hcd *, char *);
void ohci_rh_resume(void *_hcd) {
  struct ohci_hcd *ohci = hcd_to_ohci(_hcd);
  ohci_dbg(ohci, "rh_resume ??\n");
}


x86 assembly (clang, -O0):
<ohci_rh_resume>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <hcd_to_ohci@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xebc(%rip),%rsi
call   1030 <ohci_dbg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ohci_rh_resume>:
push   %rax
call   1040 <hcd_to_ohci@plt>
lea    0xed3(%rip),%rsi
mov    %rax,%rdi
pop    %rax
jmp    1030 <ohci_dbg@plt>

LLVM IR (-O0):
%struct.ohci_hcd = type { i32 }
@.str = [14 x i8] c"rh_resume ??\0A\00"
define void @ohci_rh_resume(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.ohci_hcd*
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call %struct.ohci_hcd* @hcd_to_ohci(i8* %4)
store %struct.ohci_hcd* %5, %struct.ohci_hcd** %3
%6 = load %struct.ohci_hcd*, %struct.ohci_hcd** %3
%7 = call i32 @ohci_dbg(%struct.ohci_hcd* %6, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
%struct.ohci_hcd = type { i32 }
@.str = [14 x i8] c"rh_resume ??\0A\00"
define void @ohci_rh_resume(i8* %0) {
%2 = tail call %struct.ohci_hcd* @hcd_to_ohci(i8* %0)
%3 = tail call i32 @ohci_dbg(%struct.ohci_hcd* %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
ret void
}
double geom_dV_cyl_rpz(double xm[], double xp[]) {
  return 0.5 * (xp[0] + xm[0]) * (xp[0] - xm[0]) * (xp[1] - xm[1]);
}


x86 assembly (clang, -O0):
<geom_dV_cyl_rpz>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
addsd  (%rax),%xmm1
movsd  0xedc(%rip),%xmm0
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  (%rax),%xmm1
mulsd  %xmm1,%xmm0
mov    -0x10(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
subsd  0x8(%rax),%xmm1
mulsd  %xmm1,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_dV_cyl_rpz>:
movupd (%rsi),%xmm0
movupd (%rdi),%xmm1
movapd %xmm0,%xmm2
addsd  %xmm1,%xmm2
mulsd  0xee8(%rip),%xmm2
subpd  %xmm1,%xmm0
mulsd  %xmm0,%xmm2
unpckhpd %xmm0,%xmm0
mulsd  %xmm2,%xmm0
ret

LLVM IR (-O0):
define double @geom_dV_cyl_rpz(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
store double* %0, double** %3
store double* %1, double** %4
%5 = load double*, double** %4
%6 = getelementptr inbounds double, double* %5, i64 0
%7 = load double, double* %6
%8 = load double*, double** %3
%9 = getelementptr inbounds double, double* %8, i64 0
%10 = load double, double* %9
%11 = fadd double %7, %10
%12 = fmul double 5.000000e-01, %11
%13 = load double*, double** %4
%14 = getelementptr inbounds double, double* %13, i64 0
%15 = load double, double* %14
%16 = load double*, double** %3
%17 = getelementptr inbounds double, double* %16, i64 0
%18 = load double, double* %17
%19 = fsub double %15, %18
%20 = fmul double %12, %19
%21 = load double*, double** %4
%22 = getelementptr inbounds double, double* %21, i64 1
%23 = load double, double* %22
%24 = load double*, double** %3
%25 = getelementptr inbounds double, double* %24, i64 1
%26 = load double, double* %25
%27 = fsub double %23, %26
%28 = fmul double %20, %27
ret double %28
}

LLVM IR (-O2):
define double @geom_dV_cyl_rpz(double* nocapture %0, double* nocapture %1) {
%3 = bitcast double* %1 to <2 x double>*
%4 = load <2 x double>, <2 x double>* %3
%5 = bitcast double* %0 to <2 x double>*
%6 = load <2 x double>, <2 x double>* %5
%7 = fadd <2 x double> %4, %6
%8 = extractelement <2 x double> %7, i64 0
%9 = fmul double %8, 5.000000e-01
%10 = fsub <2 x double> %4, %6
%11 = extractelement <2 x double> %10, i64 0
%12 = fmul double %11, %9
%13 = extractelement <2 x double> %10, i64 1
%14 = fmul double %12, %13
ret double %14
}
void RTUtf16DupExTag(void) {}


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

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

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

LLVM IR (-O2):
define void @RTUtf16DupExTag() {
ret void
}
/* Variables and functions */
int ds_get_int(int /*<<< orphan*/, int);
int snmp_get_suffix_only(void) { return ds_get_int(0, 4); }


x86 assembly (clang, -O0):
<snmp_get_suffix_only>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
mov    $0x4,%esi
call   1030 <ds_get_int@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<snmp_get_suffix_only>:
xor    %edi,%edi
mov    $0x4,%esi
jmp    1030 <ds_get_int@plt>

LLVM IR (-O0):
define i32 @snmp_get_suffix_only() {
%1 = call i32 @ds_get_int(i32 0, i32 4)
ret i32 %1
}

LLVM IR (-O2):
define i32 @snmp_get_suffix_only() {
%1 = tail call i32 @ds_get_int(i32 0, i32 4)
ret i32 %1
}
/* Type definitions */
struct mesh_var {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ quad_border_cond(struct mesh_var *, int const, int const,
                                    int, int, int, int);
int /*<<< orphan*/ quad_mesh(struct mesh_var *, int const, int const);
void RMI_mesh(struct mesh_var *mv) {
  const int n_x_a = 2, n_y_a = 0;
  quad_mesh(mv, n_x_a, n_y_a);
  quad_border_cond(mv, n_x_a, n_y_a, -3, -7, -3, -7);
}


x86 assembly (clang, -O0):
<RMI_mesh>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x2,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <quad_mesh@plt>
mov    -0x8(%rbp),%rdi
mov    $0x2,%esi
xor    %edx,%edx
mov    $0xfffffffd,%r9d
mov    $0xfffffff9,%r8d
mov    %r9d,%ecx
movl   $0xfffffff9,(%rsp)
call   1040 <quad_border_cond@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<RMI_mesh>:
push   %rbx
sub    $0x10,%rsp
mov    %rdi,%rbx
mov    $0x2,%esi
xor    %edx,%edx
call   1030 <quad_mesh@plt>
movl   $0xfffffff9,(%rsp)
mov    %rbx,%rdi
mov    $0x2,%esi
xor    %edx,%edx
mov    $0xfffffffd,%ecx
mov    $0xfffffff9,%r8d
mov    $0xfffffffd,%r9d
call   1040 <quad_border_cond@plt>
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
%struct.mesh_var = type { i32 }
define void @RMI_mesh(%struct.mesh_var* %0) {
%2 = alloca %struct.mesh_var*
%3 = alloca i32
%4 = alloca i32
store %struct.mesh_var* %0, %struct.mesh_var** %2
store i32 2, i32* %3
store i32 0, i32* %4
%5 = load %struct.mesh_var*, %struct.mesh_var** %2
%6 = call i32 @quad_mesh(%struct.mesh_var* %5, i32 2, i32 0)
%7 = load %struct.mesh_var*, %struct.mesh_var** %2
%8 = call i32 @quad_border_cond(%struct.mesh_var* %7, i32 2, i32 0, i32 -3, i32 -7, i32 -3, i32 -7)
ret void
}

LLVM IR (-O2):
%struct.mesh_var = type { i32 }
define void @RMI_mesh(%struct.mesh_var* %0) {
%2 = tail call i32 @quad_mesh(%struct.mesh_var* %0, i32 2, i32 0)
%3 = tail call i32 @quad_border_cond(%struct.mesh_var* %0, i32 2, i32 0, i32 -3, i32 -7, i32 -3, i32 -7)
ret void
}
int fn3(int x, int y) { return x & ~(y & x); }


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

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

LLVM IR (-O0):
define i32 @fn3(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 = load i32, i32* %3
%8 = and i32 %6, %7
%9 = xor i32 %8, -1
%10 = and i32 %5, %9
ret i32 %10
}

LLVM IR (-O2):
define i32 @fn3(i32 %0, i32 %1) {
%3 = xor i32 %1, -1
%4 = and i32 %3, %0
ret i32 %4
}
void once_handler(void) {}


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

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

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

LLVM IR (-O2):
define void @once_handler() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(void **);
void gcClean(void **gc) {
  if (gc == NULL) {
    return;
  }
  size_t i = 0;
  while (gc[i]) {
    free(*((void **)gc[i]));
    i++;
  }
  free(gc);
}


x86 assembly (clang, -O0):
<gcClean>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    112c <gcClean+0x1c>
jmp    1175 <gcClean+0x65>
movq   $0x0,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
cmpq   $0x0,(%rax,%rcx,8)
je     116c <gcClean+0x5c>
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
mov    (%rax),%rdi
call   1030 <free@plt>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1134 <gcClean+0x24>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gcClean>:
test   %rdi,%rdi
je     1153 <gcClean+0x43>
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%rax
test   %rax,%rax
je     1144 <gcClean+0x34>
lea    0x8(%r14),%rbx
nopl   0x0(%rax,%rax,1)
mov    (%rax),%rdi
call   1030 <free@plt>
mov    (%rbx),%rax
add    $0x8,%rbx
test   %rax,%rax
jne    1130 <gcClean+0x20>
mov    %r14,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1030 <free@plt>
ret

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

LLVM IR (-O2):
define void @gcClean(i8** %0) {
%2 = icmp eq i8** %0, null
br i1 %2, label %18, label %3
3: ; preds = %1
%4 = load i8*, i8** %0
%5 = icmp eq i8* %4, null
br i1 %5, label %16, label %6
6: ; preds = %3, %6
%7 = phi i8* [ %14, %6 ], [ %4, %3 ]
%8 = phi i64 [ %12, %6 ], [ 0, %3 ]
%9 = bitcast i8* %7 to i8***
%10 = load i8**, i8*** %9
%11 = tail call i32 @free(i8** %10)
%12 = add i64 %8, 1
%13 = getelementptr inbounds i8*, i8** %0, i64 %12
%14 = load i8*, i8** %13
%15 = icmp eq i8* %14, null
br i1 %15, label %16, label %6
16: ; preds = %6, %3
%17 = tail call i32 @free(i8** %0)
br label %18
18: ; preds = %1, %16
ret void
}
void foo021(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo021(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int strlen(char *);
int main(int argc, char **argv) {
  sprintf(*argv, "%-19s = ", "Hello");
  memcpy(*argv + strlen(*argv), "World", 5);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
lea    0xeac(%rip),%rsi
lea    0xeae(%rip),%rdx
call   1050 <sprintf@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1030 <strlen@plt>
mov    -0x18(%rbp),%rdi
cltq
add    %rax,%rdi
lea    0xe88(%rip),%rsi
mov    $0x5,%edx
call   1040 <memcpy@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    (%rsi),%rdi
lea    0xec2(%rip),%rsi
lea    0xec4(%rip),%rdx
call   1050 <sprintf@plt>
mov    (%rbx),%rbx
mov    %rbx,%rdi
call   1030 <strlen@plt>
movslq %eax,%rdi
add    %rbx,%rdi
lea    0xead(%rip),%rsi
mov    $0x5,%edx
call   1040 <memcpy@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [9 x i8] c"%-19s = \00"
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [6 x i8] c"World\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = load i8**, i8*** %5
%7 = load i8*, i8** %6
%8 = call i32 @sprintf(i8* %7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%9 = load i8**, i8*** %5
%10 = load i8*, i8** %9
%11 = load i8**, i8*** %5
%12 = load i8*, i8** %11
%13 = call i32 @strlen(i8* %12)
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds i8, i8* %10, i64 %14
%16 = call i32 @memcpy(i8* %15, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
ret i32 0
}

LLVM IR (-O2):
@.str = [9 x i8] c"%-19s = \00"
@.str.1 = [6 x i8] c"Hello\00"
@.str.2 = [6 x i8] c"World\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @sprintf(i8* dereferenceable(1) %3, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = load i8*, i8** %1
%6 = tail call i32 @strlen(i8* %5)
%7 = sext i32 %6 to i64
%8 = getelementptr inbounds i8, i8* %5, i64 %7
%9 = tail call i32 @memcpy(i8* %8, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i32 5)
ret i32 0
}
/* Variables and functions */
unsigned int pulledbits();
void ardecexit(unsigned int *codelength) { *codelength = pulledbits(); }


x86 assembly (clang, -O0):
<ardecexit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <pulledbits@plt>
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ardecexit>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1030 <pulledbits@plt>
mov    %eax,(%rbx)
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ardecexit(i32* nocapture writeonly %0) {
%2 = tail call i32 (...) @pulledbits()
store i32 %2, i32* %0
ret void
}
/* Type definitions */
typedef int uint16_t;

/* Variables and functions */
int /*<<< orphan*/ UART_writeHexU8(int);
void UART_writeHexU16(uint16_t v) {
  UART_writeHexU8(v >> 8);
  UART_writeHexU8(v & 0xFF);
}


x86 assembly (clang, -O0):
<UART_writeHexU16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
call   1030 <UART_writeHexU8@plt>
mov    -0x4(%rbp),%edi
and    $0xff,%edi
call   1030 <UART_writeHexU8@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<UART_writeHexU16>:
push   %rbx
mov    %edi,%ebx
sar    $0x8,%edi
call   1030 <UART_writeHexU8@plt>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <UART_writeHexU8@plt>

LLVM IR (-O0):
define void @UART_writeHexU16(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 8
%5 = call i32 @UART_writeHexU8(i32 %4)
%6 = load i32, i32* %2
%7 = and i32 %6, 255
%8 = call i32 @UART_writeHexU8(i32 %7)
ret void
}

LLVM IR (-O2):
define void @UART_writeHexU16(i32 %0) {
%2 = ashr i32 %0, 8
%3 = tail call i32 @UART_writeHexU8(i32 %2)
%4 = and i32 %0, 255
%5 = tail call i32 @UART_writeHexU8(i32 %4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ usleep(int);
void brush_motor_back(void *brushmotor_address) {
  *((volatile int *)brushmotor_address + 4) = 0;
  usleep(50);
}


x86 assembly (clang, -O0):
<brush_motor_back>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movl   $0x0,0x10(%rax)
mov    $0x32,%edi
call   1030 <usleep@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<brush_motor_back>:
movl   $0x0,0x10(%rdi)
mov    $0x32,%edi
jmp    1030 <usleep@plt>

LLVM IR (-O0):
define void @brush_motor_back(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to i32*
%5 = getelementptr inbounds i32, i32* %4, i64 4
store volatile i32 0, i32* %5
%6 = call i32 @usleep(i32 50)
ret void
}

LLVM IR (-O2):
define void @brush_motor_back(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 16
%3 = bitcast i8* %2 to i32*
store volatile i32 0, i32* %3
%4 = tail call i32 @usleep(i32 50)
ret void
}
void pyi_path_normalize(char *result, const char *path) {}


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

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

LLVM IR (-O0):
define void @pyi_path_normalize(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
ret void
}

LLVM IR (-O2):
define void @pyi_path_normalize(i8* nocapture %0, i8* nocapture %1) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ EOF;
scalar_t__ putchar(int /*<<< orphan*/);
int tx(uint8_t c) { return (putchar(c) != EOF); }


x86 assembly (clang, -O0):
<tx>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1030 <putchar@plt>
mov    0x2ebe(%rip),%rcx
cmp    (%rcx),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tx>:
push   %rax
call   1030 <putchar@plt>
mov    0x2ecb(%rip),%rdx
xor    %ecx,%ecx
cmp    (%rdx),%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@EOF = global i64 0
define i32 @tx(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i64 @putchar(i32 %3)
%5 = load i64, i64* @EOF
%6 = icmp ne i64 %4, %5
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
@EOF = global i64 0
define i32 @tx(i32 %0) {
%2 = tail call i64 @putchar(i32 %0)
%3 = load i64, i64* @EOF
%4 = icmp ne i64 %2, %3
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void printUsage() {
  printf("\n");
  printf("Supported commands:\n\n");
  printf("Arithmetic: '+', '-', '*', '/, '^', '_s' (sin), '_c' (cos), '_e' "
         "(exp)\n\n");
  printf("Advanced  : 'p'- print stack, 's' - swap the top two in stack,\n"
         " 'd' - duplicate stack, 'c' - clear stack\n\n");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
lea    0xf42(%rip),%rdi
call   1030 <printf@plt>
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
lea    0xee3(%rip),%rdi
call   1030 <printf@plt>
lea    0xf20(%rip),%rdi
call   1030 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xece(%rip),%rdi
call   1040 <puts@plt>
lea    0xed7(%rip),%rdi
call   1040 <puts@plt>
lea    0xf13(%rip),%rdi
pop    %rax
jmp    1040 <puts@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [22 x i8] c"Supported commands:\0A\0A\00"
@.str.2 = [73 x i8] c"Arithmetic: '+', '-', '*', '/, '^', '_s' (sin), '_c' (cos), '_e' (exp)\0A\0A\00"
@.str.3 = [107 x i8] c"Advanced : 'p'- print stack, 's' - swap the top two in stack,\0A 'd' - duplicate stack, 'c' - clear stack\0A\0A\00"
define void @printUsage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([73 x i8], [73 x i8]* @.str.2, i64 0, i64 0))
%4 = call i32 @printf(i8* getelementptr inbounds ([107 x i8], [107 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [21 x i8] c"Supported commands:\0A\00"
@str.4 = [72 x i8] c"Arithmetic: '+', '-', '*', '/, '^', '_s' (sin), '_c' (cos), '_e' (exp)\0A\00"
@str.5 = [106 x i8] c"Advanced : 'p'- print stack, 's' - swap the top two in stack,\0A 'd' - duplicate stack, 'c' - clear stack\0A\00"
define void @printUsage() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @str.4, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([106 x i8], [106 x i8]* @str.5, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ perror(char *);
void _error(char *message) {
  perror(message);
  exit(1);
}


x86 assembly (clang, -O0):
<_error>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<_error>:
push   %rax
call   1030 <perror@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
define void @_error(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @perror(i8* %3)
%5 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
define void @_error(i8* nocapture %0) {
%2 = tail call i32 @perror(i8* %0)
%3 = tail call i32 @exit(i32 1)
unreachable
}
int vde_chain_nm2_free(void *mem) {
  (void)mem;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @vde_chain_nm2_free(i8* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
void *__dlsym(void *, char const *, int /*<<< orphan*/);
void *dlsym(void *restrict p, const char *restrict s) {
  return __dlsym(p, s, 0);
}


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

x86 assembly (clang, -O2):
<dlsym>:
xor    %edx,%edx
jmp    1030 <__dlsym@plt>

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

LLVM IR (-O2):
define i8* @dlsym(i8* noalias %0, i8* noalias %1) {
%3 = tail call i8* @__dlsym(i8* %0, i8* %1, i32 0)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ chdir(char *);
int client_handle_input(int, char const **);
int /*<<< orphan*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  chdir("/tmp/pcs");
  int ret = client_handle_input(argc, argv);
  printf("ret: %d\n", ret);
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xeb3(%rip),%rdi
call   1030 <chdir@plt>
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
call   1050 <client_handle_input@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe9e(%rip),%rdi
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %edi,%ebp
lea    0xec1(%rip),%rdi
call   1030 <chdir@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
call   1050 <client_handle_input@plt>
mov    %eax,%ebx
lea    0xeb2(%rip),%rdi
mov    %eax,%esi
call   1040 <printf@plt>
mov    %ebx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [9 x i8] c"/tmp/pcs\00"
@.str.1 = [9 x i8] c"ret: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = call i32 @chdir(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = load i8**, i8*** %5
%10 = call i32 @client_handle_input(i32 %8, i8** %9)
store i32 %10, i32* %6
%11 = load i32, i32* %6
%12 = call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %11)
%13 = load i32, i32* %6
ret i32 %13
}

LLVM IR (-O2):
@.str = [9 x i8] c"/tmp/pcs\00"
@.str.1 = [9 x i8] c"ret: %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = tail call i32 @chdir(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @client_handle_input(i32 %0, i8** %1)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i32 %4)
ret i32 %4
}