xunge/DecIR huggingface dataset:
/* Variables and functions */
scalar_t__ ft_strlen(char *);
void ft_strclr(char *s) {
  int i;
  i = (int)ft_strlen(s) - 1;
  while (i >= 0) {
    s[i] = '\0';
    i--;
  }
}


x86 assembly (clang, -O0):
<ft_strclr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <ft_strlen@plt>
sub    $0x1,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
jl     114f <ft_strclr+0x3f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xc(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xc(%rbp)
jmp    112b <ft_strclr+0x1b>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ft_strclr>:
push   %rbx
mov    %rdi,%rbx
call   1030 <ft_strlen@plt>
test   %eax,%eax
jle    1139 <ft_strclr+0x19>
mov    %eax,%edx
mov    %rbx,%rdi
xor    %esi,%esi
call   1040 <memset@plt>
pop    %rbx
ret

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

LLVM IR (-O2):
define void @ft_strclr(i8* %0) {
%2 = tail call i64 @ft_strlen(i8* %0)
%3 = trunc i64 %2 to i32
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = and i64 %2, 4294967295
br label %7
7: ; preds = %5, %1
ret void
}
void HMAC_Final(void) {}


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

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

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

LLVM IR (-O2):
define void @HMAC_Final() {
ret void
}
void gtk_toolbar_get_show_arrow() {}


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

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

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

LLVM IR (-O2):
define void @gtk_toolbar_get_show_arrow() {
ret void
}
void foo751(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo751(i32 %0) {
ret void
}
void gun_classifier(char *datacfg, char *cfgfile, char *weightfile,
                    int cam_index, const char *filename) {}


x86 assembly (clang, -O0):
<gun_classifier>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @gun_classifier(i8* %0, i8* %1, i8* %2, i32 %3, i8* %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
define void @gun_classifier(i8* nocapture %0, i8* nocapture %1, i8* nocapture %2, i32 %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int syscon_retrieve_standard_term(int i, int j, int n, int *exp, double *c) {
  int a[3], fail;
  a[0] = n;
  a[1] = i;
  a[2] = j;
  fail = _ada_use_c2phc(25, a, exp, c);
  return fail;
}


x86 assembly (clang, -O0):
<syscon_retrieve_standard_term>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x24(%rbp)
lea    -0x2c(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    $0x19,%edi
call   1030 <_ada_use_c2phc@plt>
mov    %eax,-0x30(%rbp)
mov    -0x30(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<syscon_retrieve_standard_term>:
sub    $0x18,%rsp
mov    %edx,0xc(%rsp)
mov    %edi,0x10(%rsp)
mov    %esi,0x14(%rsp)
lea    0xc(%rsp),%rsi
mov    $0x19,%edi
mov    %rcx,%rdx
mov    %r8,%rcx
call   1030 <_ada_use_c2phc@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @syscon_retrieve_standard_term(i32 %0, i32 %1, i32 %2, i32* %3, double* %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32*
%10 = alloca double*
%11 = alloca [3 x i32]
%12 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32* %3, i32** %9
store double* %4, double** %10
%13 = load i32, i32* %8
%14 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
store i32 %13, i32* %14
%15 = load i32, i32* %6
%16 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 1
store i32 %15, i32* %16
%17 = load i32, i32* %7
%18 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 2
store i32 %17, i32* %18
%19 = getelementptr inbounds [3 x i32], [3 x i32]* %11, i64 0, i64 0
%20 = load i32*, i32** %9
%21 = load double*, double** %10
%22 = call i32 @_ada_use_c2phc(i32 25, i32* %19, i32* %20, double* %21)
store i32 %22, i32* %12
%23 = load i32, i32* %12
ret i32 %23
}

LLVM IR (-O2):
define i32 @syscon_retrieve_standard_term(i32 %0, i32 %1, i32 %2, i32* %3, double* %4) {
%6 = alloca [3 x i32]
%7 = bitcast [3 x i32]* %6 to i8*
%8 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 0
store i32 %2, i32* %8
%9 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 1
store i32 %0, i32* %9
%10 = getelementptr inbounds [3 x i32], [3 x i32]* %6, i64 0, i64 2
store i32 %1, i32* %10
%11 = call i32 @_ada_use_c2phc(i32 25, i32* %8, i32* %3, double* %4)
ret i32 %11
}
/* Variables and functions */
bool nxorg(bool s, bool c) { return !(s ^ c); }


x86 assembly (clang, -O0):
<nxorg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<nxorg>:
xor    %eax,%eax
cmp    %esi,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @nxorg(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 = xor i32 %5, %6
%8 = icmp ne i32 %7, 0
%9 = xor i1 %8, true
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @nxorg(i32 %0, i32 %1) {
%3 = icmp eq i32 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
float FormatRange0to2PI(float compAngle) {
  while (compAngle >= 6.2831853f) {
    compAngle = compAngle - 6.2831853f;
  }
  while (compAngle < 0.0f) {
    compAngle = compAngle + 6.2831853f;
  }
  return compAngle;
}


x86 assembly (clang, -O0):
<FormatRange0to2PI>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xeea(%rip),%xmm1
ucomiss %xmm1,%xmm0
jb     113a <FormatRange0to2PI+0x3a>
movss  -0x4(%rbp),%xmm0
movss  0xed4(%rip),%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1109 <FormatRange0to2PI+0x9>
jmp    113f <FormatRange0to2PI+0x3f>
xorps  %xmm0,%xmm0
ucomiss -0x4(%rbp),%xmm0
jbe    1163 <FormatRange0to2PI+0x63>
movss  0xeac(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    113f <FormatRange0to2PI+0x3f>
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<FormatRange0to2PI>:
ucomiss 0xef9(%rip),%xmm0
jb     1129 <FormatRange0to2PI+0x29>
movss  0xef3(%rip),%xmm1
movss  0xee7(%rip),%xmm2
nopl   0x0(%rax)
addss  %xmm1,%xmm0
ucomiss %xmm2,%xmm0
jae    1120 <FormatRange0to2PI+0x20>
xorps  %xmm1,%xmm1
ucomiss %xmm0,%xmm1
jbe    1149 <FormatRange0to2PI+0x49>
movss  0xec7(%rip),%xmm2
nopl   0x0(%rax)
addss  %xmm2,%xmm0
ucomiss %xmm0,%xmm1
ja     1140 <FormatRange0to2PI+0x40>
ret

LLVM IR (-O0):
define float @FormatRange0to2PI(float %0) {
%2 = alloca float
store float %0, float* %2
br label %3
3: ; preds = %6, %1
%4 = load float, float* %2
%5 = fcmp oge float %4, 0x401921FB60000000
br i1 %5, label %6, label %9
6: ; preds = %3
%7 = load float, float* %2
%8 = fsub float %7, 0x401921FB60000000
store float %8, float* %2
br label %3
9: ; preds = %3
br label %10
10: ; preds = %13, %9
%11 = load float, float* %2
%12 = fcmp olt float %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %10
%14 = load float, float* %2
%15 = fadd float %14, 0x401921FB60000000
store float %15, float* %2
br label %10
16: ; preds = %10
%17 = load float, float* %2
ret float %17
}

LLVM IR (-O2):
define float @FormatRange0to2PI(float %0) {
%2 = fcmp ult float %0, 0x401921FB60000000
br i1 %2, label %3, label %6
3: ; preds = %6, %1
%4 = phi float [ %0, %1 ], [ %8, %6 ]
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %10, label %14
6: ; preds = %1, %6
%7 = phi float [ %8, %6 ], [ %0, %1 ]
%8 = fadd float %7, 0xC01921FB60000000
%9 = fcmp ult float %8, 0x401921FB60000000
br i1 %9, label %3, label %6
10: ; preds = %3, %10
%11 = phi float [ %12, %10 ], [ %4, %3 ]
%12 = fadd float %11, 0x401921FB60000000
%13 = fcmp olt float %12, 0.000000e+00
br i1 %13, label %10, label %14
14: ; preds = %10, %3
%15 = phi float [ %4, %3 ], [ %12, %10 ]
ret float %15
}
int b(void) { return 'b'; }


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

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

LLVM IR (-O0):
define i32 @b() {
ret i32 98
}

LLVM IR (-O2):
define i32 @b() {
ret i32 98
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i;
  while (1) {
    i++;
    printf("looping %d \n", i);
    if (i >= 10)
      break;
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
cmpl   $0xa,-0x8(%rbp)
jl     1146 <main+0x36>
jmp    114b <main+0x3b>
jmp    111f <main+0xf>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [13 x i8] c"looping %d \0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 undef)
ret i32 0
}
/* Variables and functions */
scalar_t__ isdigit(int);
scalar_t__ isupper(int);
int hex2dig(char c) {
  if (isdigit((int)c))
    return c - '0';
  if (isupper((int)c))
    return c - 'A' + 10;
  else
    return c - 'a' + 10;
}


x86 assembly (clang, -O0):
<hex2dig>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1150 <hex2dig+0x30>
movsbl -0x5(%rbp),%eax
sub    $0x30,%eax
mov    %eax,-0x4(%rbp)
jmp    1182 <hex2dig+0x62>
movsbl -0x5(%rbp),%edi
call   1040 <isupper@plt>
cmp    $0x0,%rax
je     1175 <hex2dig+0x55>
movsbl -0x5(%rbp),%eax
sub    $0x41,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
jmp    1182 <hex2dig+0x62>
movsbl -0x5(%rbp),%eax
sub    $0x61,%eax
add    $0xa,%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hex2dig>:
push   %rbx
mov    %edi,%ebx
call   1030 <isdigit@plt>
mov    %rax,%rcx
mov    $0xffffffd0,%eax
test   %rcx,%rcx
jne    114d <hex2dig+0x2d>
mov    %ebx,%edi
call   1040 <isupper@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
shl    $0x5,%eax
add    $0xffffffa9,%eax
add    %ebx,%eax
pop    %rbx
ret

LLVM IR (-O0):
define i32 @hex2dig(i8 signext %0) {
%2 = alloca i32
%3 = alloca i8
store i8 %0, i8* %3
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = call i64 @isdigit(i32 %5)
%7 = icmp ne i64 %6, 0
br i1 %7, label %8, label %12
8: ; preds = %1
%9 = load i8, i8* %3
%10 = sext i8 %9 to i32
%11 = sub nsw i32 %10, 48
store i32 %11, i32* %2
br label %27
12: ; preds = %1
%13 = load i8, i8* %3
%14 = sext i8 %13 to i32
%15 = call i64 @isupper(i32 %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %22
17: ; preds = %12
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = sub nsw i32 %19, 65
%21 = add nsw i32 %20, 10
store i32 %21, i32* %2
br label %27
22: ; preds = %12
%23 = load i8, i8* %3
%24 = sext i8 %23 to i32
%25 = sub nsw i32 %24, 97
%26 = add nsw i32 %25, 10
store i32 %26, i32* %2
br label %27
27: ; preds = %22, %17, %8
%28 = load i32, i32* %2
ret i32 %28
}

LLVM IR (-O2):
define i32 @hex2dig(i8 signext %0) {
%2 = sext i8 %0 to i32
%3 = tail call i64 @isdigit(i32 %2)
%4 = icmp eq i64 %3, 0
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = tail call i64 @isupper(i32 %2)
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i32 -87, i32 -55
br label %9
9: ; preds = %5, %1
%10 = phi i32 [ -48, %1 ], [ %8, %5 ]
%11 = add nsw i32 %10, %2
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int main() {
  abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @abort()
unreachable
}
int is_sep(char c) { return c == '/'; }


x86 assembly (clang, -O0):
<is_sep>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x2f,%eax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_sep>:
xor    %eax,%eax
cmp    $0x2f,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @is_sep(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 47
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @is_sep(i8 signext %0) {
%2 = icmp eq i8 %0, 47
%3 = zext i1 %2 to i32
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ __expand(char *, char const *, char, char *, char *, char *);
void expand3(char *str, const char *fmt, char **args, char out) {
  __expand(str, fmt, out, args[0], args[1], args[2]);
}


x86 assembly (clang, -O0):
<expand3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %cl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %al,-0x19(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x19(%rbp),%al
mov    -0x18(%rbp),%rcx
mov    (%rcx),%rcx
mov    -0x18(%rbp),%rdx
mov    0x8(%rdx),%r8
mov    -0x18(%rbp),%rdx
mov    0x10(%rdx),%r9
movsbl %al,%edx
call   1030 <__expand@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<expand3>:
mov    (%rdx),%rax
mov    0x8(%rdx),%r8
mov    0x10(%rdx),%r9
mov    %ecx,%edx
mov    %rax,%rcx
jmp    1030 <__expand@plt>

LLVM IR (-O0):
define void @expand3(i8* %0, i8* %1, i8** %2, i8 signext %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8**
%8 = alloca i8
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8** %2, i8*** %7
store i8 %3, i8* %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8, i8* %8
%12 = load i8**, i8*** %7
%13 = getelementptr inbounds i8*, i8** %12, i64 0
%14 = load i8*, i8** %13
%15 = load i8**, i8*** %7
%16 = getelementptr inbounds i8*, i8** %15, i64 1
%17 = load i8*, i8** %16
%18 = load i8**, i8*** %7
%19 = getelementptr inbounds i8*, i8** %18, i64 2
%20 = load i8*, i8** %19
%21 = call i32 @__expand(i8* %9, i8* %10, i8 signext %11, i8* %14, i8* %17, i8* %20)
ret void
}

LLVM IR (-O2):
define void @expand3(i8* %0, i8* %1, i8** nocapture %2, i8 signext %3) {
%5 = load i8*, i8** %2
%6 = getelementptr inbounds i8*, i8** %2, i64 1
%7 = load i8*, i8** %6
%8 = getelementptr inbounds i8*, i8** %2, i64 2
%9 = load i8*, i8** %8
%10 = tail call i32 @__expand(i8* %0, i8* %1, i8 signext %3, i8* %5, i8* %7, i8* %9)
ret void
}
int f0(volatile int *a) {
  int b = a[0];
  int c = a[1];
  return b + c;
}


x86 assembly (clang, -O0):
<f0>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f0>:
mov    (%rdi),%eax
add    0x4(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @f0(i32* %0) {
%2 = alloca i32*
%3 = alloca i32
%4 = alloca i32
store i32* %0, i32** %2
%5 = load i32*, i32** %2
%6 = getelementptr inbounds i32, i32* %5, i64 0
%7 = load volatile i32, i32* %6
store i32 %7, i32* %3
%8 = load i32*, i32** %2
%9 = getelementptr inbounds i32, i32* %8, i64 1
%10 = load volatile i32, i32* %9
store i32 %10, i32* %4
%11 = load i32, i32* %3
%12 = load i32, i32* %4
%13 = add nsw i32 %11, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @f0(i32* %0) {
%2 = load volatile i32, i32* %0
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load volatile i32, i32* %3
%5 = add nsw i32 %4, %2
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ int_fast64_t;

/* Variables and functions */
void SHAREMIND_MAP_KEY_FREE_int_fast64_t(int_fast64_t *const dest) {
  (void)dest;
}


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

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

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

LLVM IR (-O2):
define void @SHAREMIND_MAP_KEY_FREE_int_fast64_t(i32* nocapture %0) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ uint32_t;

/* Variables and functions */
uint32_t null_index_hole_pos(int drive, int side) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @null_index_hole_pos(i32 %0, i32 %1) {
ret i32 0
}
unsigned int xor128(void) {
  static unsigned int x = 123456789;
  static unsigned int y = 362436069;
  static unsigned int z = 521288629;
  static unsigned int w = 88675123;
  unsigned int t;
  t = x ^ (x << 11);
  x = y;
  y = z;
  z = w;
  return w = (w ^ (w >> 19)) ^ (t ^ (t >> 8));
}


x86 assembly (clang, -O0):
<xor128>:
push   %rbp
mov    %rsp,%rbp
mov    0x2f16(%rip),%eax
mov    0x2f10(%rip),%ecx
shl    $0xb,%ecx
xor    %ecx,%eax
mov    %eax,-0x4(%rbp)
mov    0x2f06(%rip),%eax
mov    %eax,0x2efc(%rip)
mov    0x2efe(%rip),%eax
mov    %eax,0x2ef4(%rip)
mov    0x2ef6(%rip),%eax
mov    %eax,0x2eec(%rip)
mov    0x2eea(%rip),%eax
mov    0x2ee4(%rip),%ecx
shr    $0x13,%ecx
xor    %ecx,%eax
mov    -0x4(%rbp),%ecx
mov    -0x4(%rbp),%edx
shr    $0x8,%edx
xor    %edx,%ecx
xor    %ecx,%eax
mov    %eax,0x2ecc(%rip)
pop    %rbp
ret

x86 assembly (clang, -O2):
<xor128>:
mov    0x2f1a(%rip),%ecx
mov    %ecx,%eax
shl    $0xb,%eax
xor    %ecx,%eax
mov    0x2f11(%rip),%ecx
mov    %ecx,0x2f07(%rip)
mov    0x2f09(%rip),%ecx
mov    %ecx,0x2eff(%rip)
mov    0x2f01(%rip),%ecx
mov    %ecx,0x2ef7(%rip)
mov    %eax,%edx
shr    $0x8,%edx
xor    %ecx,%eax
shr    $0x13,%ecx
xor    %edx,%eax
xor    %ecx,%eax
mov    %eax,0x2ee7(%rip)
ret

LLVM IR (-O0):
@xor128.x = internal global i32 123456789
@xor128.y = internal global i32 362436069
@xor128.z = internal global i32 521288629
@xor128.w = internal global i32 88675123
define i32 @xor128() {
%1 = alloca i32
%2 = load i32, i32* @xor128.x
%3 = load i32, i32* @xor128.x
%4 = shl i32 %3, 11
%5 = xor i32 %2, %4
store i32 %5, i32* %1
%6 = load i32, i32* @xor128.y
store i32 %6, i32* @xor128.x
%7 = load i32, i32* @xor128.z
store i32 %7, i32* @xor128.y
%8 = load i32, i32* @xor128.w
store i32 %8, i32* @xor128.z
%9 = load i32, i32* @xor128.w
%10 = load i32, i32* @xor128.w
%11 = lshr i32 %10, 19
%12 = xor i32 %9, %11
%13 = load i32, i32* %1
%14 = load i32, i32* %1
%15 = lshr i32 %14, 8
%16 = xor i32 %13, %15
%17 = xor i32 %12, %16
store i32 %17, i32* @xor128.w
ret i32 %17
}

LLVM IR (-O2):
@xor128.x = internal unnamed_addr global i32 123456789
@xor128.y = internal unnamed_addr global i32 362436069
@xor128.z = internal unnamed_addr global i32 521288629
@xor128.w = internal unnamed_addr global i32 88675123
define i32 @xor128() {
%1 = load i32, i32* @xor128.x
%2 = shl i32 %1, 11
%3 = xor i32 %2, %1
%4 = load i32, i32* @xor128.y
store i32 %4, i32* @xor128.x
%5 = load i32, i32* @xor128.z
store i32 %5, i32* @xor128.y
%6 = load i32, i32* @xor128.w
store i32 %6, i32* @xor128.z
%7 = lshr i32 %6, 19
%8 = lshr i32 %3, 8
%9 = xor i32 %8, %3
%10 = xor i32 %9, %6
%11 = xor i32 %10, %7
store i32 %11, i32* @xor128.w
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ initialize_arr(int *, int);
void call_initialize_arr_Good() {
  int arr[10];
  initialize_arr(arr, 5);
}


x86 assembly (clang, -O0):
<call_initialize_arr_Good>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
mov    $0x5,%esi
call   1030 <initialize_arr@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<call_initialize_arr_Good>:
sub    $0x28,%rsp
mov    %rsp,%rdi
mov    $0x5,%esi
call   1030 <initialize_arr@plt>
add    $0x28,%rsp
ret

LLVM IR (-O0):
define void @call_initialize_arr_Good() {
%1 = alloca [10 x i32]
%2 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%3 = call i32 @initialize_arr(i32* %2, i32 5)
ret void
}

LLVM IR (-O2):
define void @call_initialize_arr_Good() {
%1 = alloca [10 x i32]
%2 = bitcast [10 x i32]* %1 to i8*
%3 = getelementptr inbounds [10 x i32], [10 x i32]* %1, i64 0, i64 0
%4 = call i32 @initialize_arr(i32* %3, i32 5)
ret void
}
/* Variables and functions */
int readlink(char *, char *, int);
int get_path_to_executable(char *buf, int bufSize) {
  return readlink("/proc/self/exe", buf, bufSize);
}


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

x86 assembly (clang, -O2):
<get_path_to_executable>:
mov    %esi,%edx
mov    %rdi,%rsi
lea    0xee4(%rip),%rdi
jmp    1030 <readlink@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"/proc/self/exe\00"
define i32 @get_path_to_executable(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 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %5, i32 %6)
ret i32 %7
}

LLVM IR (-O2):
@.str = [15 x i8] c"/proc/self/exe\00"
define i32 @get_path_to_executable(i8* nocapture %0, i32 %1) {
%3 = tail call i32 @readlink(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %1)
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char, char, char);
int main() {
  char c1 = 'a', c2 = 'b', c3 = 'c';
  printf("%c\n%c\n%c\n", c1, c2, c3);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
movb   $0x62,-0x6(%rbp)
movb   $0x63,-0x7(%rbp)
mov    -0x5(%rbp),%cl
mov    -0x6(%rbp),%al
lea    0xec8(%rip),%rdi
movsbl %cl,%esi
movsbl %al,%edx
movsbl -0x7(%rbp),%ecx
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x61,%esi
mov    $0x62,%edx
mov    $0x63,%ecx
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%c\0A%c\0A%c\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8
%4 = alloca i8
store i32 0, i32* %1
store i8 97, i8* %2
store i8 98, i8* %3
store i8 99, i8* %4
%5 = load i8, i8* %2
%6 = load i8, i8* %3
%7 = load i8, i8* %4
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext %5, i8 signext %6, i8 signext %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [10 x i8] c"%c\0A%c\0A%c\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8 signext 97, i8 signext 98, i8 signext 99)
ret i32 0
}
/* Variables and functions */
unsigned char check_read(int, char *);
unsigned char inb(unsigned short int port) {
  return check_read((int)port, "inb");
}


x86 assembly (clang, -O0):
<inb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edi
lea    0xed6(%rip),%rsi
call   1030 <check_read@plt>
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [4 x i8] c"inb\00"
define zeroext i8 @inb(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = call zeroext i8 @check_read(i32 %4, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i8 %5
}

LLVM IR (-O2):
@.str = [4 x i8] c"inb\00"
define zeroext i8 @inb(i16 zeroext %0) {
%2 = zext i16 %0 to i32
%3 = tail call zeroext i8 @check_read(i32 %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
ret i8 %3
}
/* Variables and functions */
int /*<<< orphan*/ itoa(int, char *, int);
int /*<<< orphan*/ printf(char *, char *);
int main(void) {
  int n = 123;
  char s[32];
  itoa(1233, s, 8);
  printf("%s\n", s);
  itoa(n, s, 32);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x7b,-0x8(%rbp)
lea    -0x30(%rbp),%rsi
mov    $0x4d1,%edi
mov    $0x8,%edx
call   1040 <itoa@plt>
lea    -0x30(%rbp),%rsi
lea    0xeac(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%edi
lea    -0x30(%rbp),%rsi
mov    $0x20,%edx
call   1040 <itoa@plt>
lea    -0x30(%rbp),%rsi
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x28,%rsp
mov    %rsp,%rbx
mov    $0x4d1,%edi
mov    %rbx,%rsi
mov    $0x8,%edx
call   1040 <itoa@plt>
lea    0xebd(%rip),%r14
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
mov    $0x7b,%edi
mov    %rbx,%rsi
mov    $0x20,%edx
call   1040 <itoa@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca [32 x i8]
store i32 0, i32* %1
store i32 123, i32* %2
%4 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%5 = call i32 @itoa(i32 1233, i8* %4, i32 8)
%6 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%7 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = load i32, i32* %2
%9 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%10 = call i32 @itoa(i32 %8, i8* %9, i32 32)
%11 = getelementptr inbounds [32 x i8], [32 x i8]* %3, i64 0, i64 0
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %11)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [32 x i8]
%2 = getelementptr inbounds [32 x i8], [32 x i8]* %1, i64 0, i64 0
%3 = call i32 @itoa(i32 1233, i8* %2, i32 8)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
%5 = call i32 @itoa(i32 123, i8* %2, i32 32)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ assem_debug(char *);
int /*<<< orphan*/ output_byte(int);
int /*<<< orphan*/ output_modrm(int /*<<< orphan*/, int, int);
int /*<<< orphan*/ output_sib(int /*<<< orphan*/, int, int);
void emit_fnstcw_stack() {
  assem_debug("fnstcw (%%esp)\n");
  output_byte(0xd9);
  output_modrm(0, 4, 7);
  output_sib(0, 4, 4);
}


x86 assembly (clang, -O0):
<emit_fnstcw_stack>:
push   %rbp
mov    %rsp,%rbp
lea    0xeb5(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd9,%edi
call   1040 <output_byte@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x7,%edx
call   1050 <output_modrm@plt>
xor    %edi,%edi
mov    $0x4,%edx
mov    %edx,%esi
call   1060 <output_sib@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<emit_fnstcw_stack>:
push   %rax
lea    0xeb8(%rip),%rdi
call   1030 <assem_debug@plt>
mov    $0xd9,%edi
call   1040 <output_byte@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x7,%edx
call   1050 <output_modrm@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    $0x4,%edx
pop    %rax
jmp    1060 <output_sib@plt>

LLVM IR (-O0):
@.str = [16 x i8] c"fnstcw (%%esp)\0A\00"
define void @emit_fnstcw_stack() {
%1 = call i32 @assem_debug(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @output_byte(i32 217)
%3 = call i32 @output_modrm(i32 0, i32 4, i32 7)
%4 = call i32 @output_sib(i32 0, i32 4, i32 4)
ret void
}

LLVM IR (-O2):
@.str = [16 x i8] c"fnstcw (%%esp)\0A\00"
define void @emit_fnstcw_stack() {
%1 = tail call i32 @assem_debug(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @output_byte(i32 217)
%3 = tail call i32 @output_modrm(i32 0, i32 4, i32 7)
%4 = tail call i32 @output_sib(i32 0, i32 4, i32 4)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ HomeLocationHandle();
int /*<<< orphan*/ UAVObjRequestUpdate(int /*<<< orphan*/);
void HomeLocationRequestUpdate() { UAVObjRequestUpdate(HomeLocationHandle()); }


x86 assembly (clang, -O0):
<HomeLocationRequestUpdate>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1040 <HomeLocationHandle@plt>
mov    %eax,%edi
call   1030 <UAVObjRequestUpdate@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<HomeLocationRequestUpdate>:
push   %rax
xor    %eax,%eax
call   1040 <HomeLocationHandle@plt>
mov    %eax,%edi
pop    %rax
jmp    1030 <UAVObjRequestUpdate@plt>

LLVM IR (-O0):
define void @HomeLocationRequestUpdate() {
%1 = call i32 (...) @HomeLocationHandle()
%2 = call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}

LLVM IR (-O2):
define void @HomeLocationRequestUpdate() {
%1 = tail call i32 (...) @HomeLocationHandle()
%2 = tail call i32 @UAVObjRequestUpdate(i32 %1)
ret void
}
/* Variables and functions */
int __get_array_size(char const *);
scalar_t__ malloc(int);
char *strdup(const char *s) {
  int size;
  size = __get_array_size(s);
  return (char *)malloc(size);
}


x86 assembly (clang, -O0):
<strdup>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <__get_array_size@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%edi
call   1040 <malloc@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup>:
push   %rax
call   1030 <__get_array_size@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <malloc@plt>

LLVM IR (-O0):
define i8* @strdup(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @__get_array_size(i8* %4)
store i32 %5, i32* %3
%6 = load i32, i32* %3
%7 = call i64 @malloc(i32 %6)
%8 = inttoptr i64 %7 to i8*
ret i8* %8
}

LLVM IR (-O2):
define i8* @strdup(i8* %0) {
%2 = tail call i32 @__get_array_size(i8* %0)
%3 = tail call i64 @malloc(i32 %2)
%4 = inttoptr i64 %3 to i8*
ret i8* %4
}
void doStuff_constPointerToConstPointerToConstInt(int const *const *const u) {}


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

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

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

LLVM IR (-O2):
define void @doStuff_constPointerToConstPointerToConstInt(i32** nocapture %0) {
ret void
}
void jstrAddC(char *s) {}


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

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

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

LLVM IR (-O2):
define void @jstrAddC(i8* nocapture %0) {
ret void
}
main() {
  enum { A = 5 };
  struct {
    int a : 5 - 3;
    int b : A;
  };
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ strncmp(char *, char *, int);
int net_is_url(char *name) {
  return !strncmp(name, "http://", 7) || !strncmp(name, "ftp://", 6);
}


x86 assembly (clang, -O0):
<net_is_url>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0xed9(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
mov    %eax,%ecx
mov    $0x1,%al
cmp    $0x0,%ecx
mov    %al,-0x9(%rbp)
je     1161 <net_is_url+0x51>
mov    -0x8(%rbp),%rdi
lea    0xebc(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x9(%rbp)
mov    -0x9(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<net_is_url>:
push   %rbx
mov    %rdi,%rbx
lea    0xee5(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1148 <net_is_url+0x38>
lea    0xed8(%rip),%rsi
mov    %rbx,%rdi
mov    $0x6,%edx
call   1030 <strncmp@plt>
mov    %eax,%ecx
xor    %eax,%eax
test   %ecx,%ecx
sete   %al
pop    %rbx
ret
mov    $0x1,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"http://\00"
@.str.1 = [7 x i8] c"ftp://\00"
define i32 @net_is_url(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @strncmp(i8* %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %11
6: ; preds = %1
%7 = load i8*, i8** %2
%8 = call i32 @strncmp(i8* %7, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
%9 = icmp ne i32 %8, 0
%10 = xor i1 %9, true
br label %11
11: ; preds = %6, %1
%12 = phi i1 [ true, %1 ], [ %10, %6 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@.str = [8 x i8] c"http://\00"
@.str.1 = [7 x i8] c"ftp://\00"
define i32 @net_is_url(i8* %0) {
%2 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%3 = icmp eq i32 %2, 0
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 6)
%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 */
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ scanf(char *, double *);
int main() {
  double n;
  scanf("%lf", &n);
  printf("A=%.4f\n", n * n * 3.14159);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xed2(%rip),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <scanf@plt>
movsd  -0x10(%rbp),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  0xeaf(%rip),%xmm1
mulsd  %xmm1,%xmm0
lea    0xeb0(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee0(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
movsd  (%rsp),%xmm0
mulsd  %xmm0,%xmm0
mulsd  0xebf(%rip),%xmm0
lea    0xec4(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [8 x i8] c"A=%.4f\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
store i32 0, i32* %1
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %2)
%4 = load double, double* %2
%5 = load double, double* %2
%6 = fmul double %4, %5
%7 = fmul double %6, 3.141590e+00
%8 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %7)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%lf\00"
@.str.1 = [8 x i8] c"A=%.4f\0A\00"
define i32 @main() {
%1 = alloca double
%2 = bitcast double* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), double* %1)
%4 = load double, double* %1
%5 = fmul double %4, %4
%6 = fmul double %5, 3.141590e+00
%7 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.1, i64 0, i64 0), double %6)
ret i32 0
}
void foo388(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo388(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ LCD_Delay(int);
int /*<<< orphan*/ hx8347d_WriteReg(int, int);
void hx8347d_DisplayOff(void) {
  hx8347d_WriteReg(0x17, 0x0000);
  hx8347d_WriteReg(0x18, 0x0000);
  hx8347d_WriteReg(0x19, 0x0000);
  hx8347d_WriteReg(0x1C, 0x0000);
  hx8347d_WriteReg(0x1F, 0x0000);
  hx8347d_WriteReg(0x36, 0x0000);
  hx8347d_WriteReg(0x28, 0x38);
  LCD_Delay(60);
  hx8347d_WriteReg(0x28, 0x04);
}


x86 assembly (clang, -O0):
<hx8347d_DisplayOff>:
push   %rbp
mov    %rsp,%rbp
mov    $0x17,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x18,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x19,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x1c,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x1f,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x36,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x28,%edi
mov    $0x38,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x3c,%edi
call   1030 <LCD_Delay@plt>
mov    $0x28,%edi
mov    $0x4,%esi
call   1040 <hx8347d_WriteReg@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<hx8347d_DisplayOff>:
push   %rax
mov    $0x17,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x18,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x19,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x1c,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x1f,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x36,%edi
xor    %esi,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x28,%edi
mov    $0x38,%esi
call   1040 <hx8347d_WriteReg@plt>
mov    $0x3c,%edi
call   1030 <LCD_Delay@plt>
mov    $0x28,%edi
mov    $0x4,%esi
pop    %rax
jmp    1040 <hx8347d_WriteReg@plt>

LLVM IR (-O0):
define void @hx8347d_DisplayOff() {
%1 = call i32 @hx8347d_WriteReg(i32 23, i32 0)
%2 = call i32 @hx8347d_WriteReg(i32 24, i32 0)
%3 = call i32 @hx8347d_WriteReg(i32 25, i32 0)
%4 = call i32 @hx8347d_WriteReg(i32 28, i32 0)
%5 = call i32 @hx8347d_WriteReg(i32 31, i32 0)
%6 = call i32 @hx8347d_WriteReg(i32 54, i32 0)
%7 = call i32 @hx8347d_WriteReg(i32 40, i32 56)
%8 = call i32 @LCD_Delay(i32 60)
%9 = call i32 @hx8347d_WriteReg(i32 40, i32 4)
ret void
}

LLVM IR (-O2):
define void @hx8347d_DisplayOff() {
%1 = tail call i32 @hx8347d_WriteReg(i32 23, i32 0)
%2 = tail call i32 @hx8347d_WriteReg(i32 24, i32 0)
%3 = tail call i32 @hx8347d_WriteReg(i32 25, i32 0)
%4 = tail call i32 @hx8347d_WriteReg(i32 28, i32 0)
%5 = tail call i32 @hx8347d_WriteReg(i32 31, i32 0)
%6 = tail call i32 @hx8347d_WriteReg(i32 54, i32 0)
%7 = tail call i32 @hx8347d_WriteReg(i32 40, i32 56)
%8 = tail call i32 @LCD_Delay(i32 60)
%9 = tail call i32 @hx8347d_WriteReg(i32 40, i32 4)
ret void
}
void vreset() {}


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

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

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

LLVM IR (-O2):
define void @vreset() {
ret void
}
int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) { return -1; }


x86 assembly (clang, -O0):
<xen_setup_msi_irqs>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    $0xffffffff,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.pci_dev = type opaque
define i32 @xen_setup_msi_irqs(%struct.pci_dev* %0, i32 %1, i32 %2) {
%4 = alloca %struct.pci_dev*
%5 = alloca i32
%6 = alloca i32
store %struct.pci_dev* %0, %struct.pci_dev** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
ret i32 -1
}

LLVM IR (-O2):
%struct.pci_dev = type opaque
define i32 @xen_setup_msi_irqs(%struct.pci_dev* nocapture readnone %0, i32 %1, i32 %2) {
ret i32 -1
}
/* Variables and functions */
int remove(char *);
int DeleteLock(char *filename) { return remove(filename); }


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

x86 assembly (clang, -O2):
<DeleteLock>:
jmp    1030 <remove@plt>

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

LLVM IR (-O2):
define i32 @DeleteLock(i8* nocapture %0) {
%2 = tail call i32 @remove(i8* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ memmove(void *, void const *, size_t);
void bcopy(const void *whence, void *whither, size_t size) {
  memmove(whither, whence, size);
}


x86 assembly (clang, -O0):
<bcopy>:
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    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <memmove@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bcopy>:
mov    %rdi,%rax
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <memmove@plt>

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

LLVM IR (-O2):
define void @bcopy(i8* %0, i8* %1, i64 %2) {
%4 = tail call i32 @memmove(i8* %1, i8* %0, i64 %2)
ret void
}
void RTFileReadAllEx(void) {}


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

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

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

LLVM IR (-O2):
define void @RTFileReadAllEx() {
ret void
}
/* Variables and functions */
int atoi(char *);
int mySqrt(int);
int /*<<< orphan*/ printf(char *, int, int);
int main(int argc, char **argv) {
  if (argc > 1) {
    printf("sqrt(%d)=%d", atoi(argv[1]), mySqrt(atoi(argv[1])));
  }
  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)
cmpl   $0x1,-0x8(%rbp)
jle    1185 <main+0x55>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   1050 <atoi@plt>
mov    %eax,%edi
call   1030 <mySqrt@plt>
mov    -0x14(%rbp),%esi
mov    %eax,%edx
lea    0xe80(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
cmp    $0x2,%edi
jl     1159 <main+0x29>
push   %rbx
mov    0x8(%rsi),%rdi
call   1050 <atoi@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1030 <mySqrt@plt>
lea    0xeb1(%rip),%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1040 <printf@plt>
pop    %rbx
xor    %eax,%eax
ret

LLVM IR (-O0):
@.str = [12 x i8] c"sqrt(%d)=%d\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 i32, i32* %4
%7 = icmp sgt i32 %6, 1
br i1 %7, label %8, label %19
8: ; preds = %2
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 1
%11 = load i8*, i8** %10
%12 = call i32 @atoi(i8* %11)
%13 = load i8**, i8*** %5
%14 = getelementptr inbounds i8*, i8** %13, i64 1
%15 = load i8*, i8** %14
%16 = call i32 @atoi(i8* %15)
%17 = call i32 @mySqrt(i32 %16)
%18 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %12, i32 %17)
br label %19
19: ; preds = %8, %2
ret i32 0
}

LLVM IR (-O2):
@.str = [12 x i8] c"sqrt(%d)=%d\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp sgt i32 %0, 1
br i1 %3, label %4, label %10
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i32 @atoi(i8* %6)
%8 = tail call i32 @mySqrt(i32 %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 %7, i32 %8)
br label %10
10: ; preds = %4, %2
ret i32 0
}
/* Type definitions */
struct expression {
  int dummy;
};

/* Variables and functions */
long long __get_expression_value(struct expression *, int);
long long const_expression_value(struct expression *expr) {
  return __get_expression_value(expr, 1);
}


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

x86 assembly (clang, -O2):
<const_expression_value>:
mov    $0x1,%esi
jmp    1030 <__get_expression_value@plt>

LLVM IR (-O0):
%struct.expression = type { i32 }
define i64 @const_expression_value(%struct.expression* %0) {
%2 = alloca %struct.expression*
store %struct.expression* %0, %struct.expression** %2
%3 = load %struct.expression*, %struct.expression** %2
%4 = call i64 @__get_expression_value(%struct.expression* %3, i32 1)
ret i64 %4
}

LLVM IR (-O2):
%struct.expression = type { i32 }
define i64 @const_expression_value(%struct.expression* %0) {
%2 = tail call i64 @__get_expression_value(%struct.expression* %0, i32 1)
ret i64 %2
}
/* Variables and functions */
int /*<<< orphan*/ glmMax3fv(float *, float *, float const *);
void glmMax3fv_(float x[3], const float y[3]) { glmMax3fv(x, x, y); }


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

x86 assembly (clang, -O2):
<glmMax3fv_>:
mov    %rsi,%rdx
mov    %rdi,%rsi
jmp    1030 <glmMax3fv@plt>

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

LLVM IR (-O2):
define void @glmMax3fv_(float* %0, float* %1) {
%3 = tail call i32 @glmMax3fv(float* %0, float* %0, float* %1)
ret void
}