xunge/DecIR huggingface dataset:
/* Variables and functions */
int objc_compare_strings(void const *, void const *);
int compare_strings(const void *k1, const void *k2) {
  return objc_compare_strings(k1, k2);
}


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

x86 assembly (clang, -O2):
<compare_strings>:
jmp    1030 <objc_compare_strings@plt>

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

LLVM IR (-O2):
define i32 @compare_strings(i8* %0, i8* %1) {
%3 = tail call i32 @objc_compare_strings(i8* %0, i8* %1)
ret i32 %3
}
char *libgit_version() { return "0.1"; }


x86 assembly (clang, -O0):
<libgit_version>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<libgit_version>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [4 x i8] c"0.1\00"
define i8* @libgit_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [4 x i8] c"0.1\00"
define i8* @libgit_version() {
ret i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
double V_blendIndexed(int, double *);
double V_blendIndexedOnEdge(int, double *);
double V_blendOnEntity(int vid, int etype, double *L) {
  if (etype == 1)
    return V_blendIndexedOnEdge(vid, L);
  else if (etype == 2 || etype == 4)
    return V_blendIndexed(vid, L);
  else
    return 0.0e0;
}


x86 assembly (clang, -O0):
<V_blendOnEntity>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0xc(%rbp)
mov    %esi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
cmpl   $0x1,-0x10(%rbp)
jne    1152 <V_blendOnEntity+0x32>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1040 <V_blendIndexedOnEdge@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1184 <V_blendOnEntity+0x64>
cmpl   $0x2,-0x10(%rbp)
je     1166 <V_blendOnEntity+0x46>
cmpl   $0x4,-0x10(%rbp)
jne    117c <V_blendOnEntity+0x5c>
mov    -0xc(%rbp),%edi
mov    -0x18(%rbp),%rsi
call   1030 <V_blendIndexed@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    1184 <V_blendOnEntity+0x64>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<V_blendOnEntity>:
cmp    $0x4,%esi
je     1137 <V_blendOnEntity+0x17>
cmp    $0x2,%esi
je     1137 <V_blendOnEntity+0x17>
cmp    $0x1,%esi
jne    113f <V_blendOnEntity+0x1f>
mov    %rdx,%rsi
jmp    1040 <V_blendIndexedOnEdge@plt>
mov    %rdx,%rsi
jmp    1030 <V_blendIndexed@plt>
xorps  %xmm0,%xmm0
ret

LLVM IR (-O0):
define double @V_blendOnEntity(i32 %0, i32 %1, double* %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i32
%7 = alloca double*
store i32 %0, i32* %5
store i32 %1, i32* %6
store double* %2, double** %7
%8 = load i32, i32* %6
%9 = icmp eq i32 %8, 1
br i1 %9, label %10, label %14
10: ; preds = %3
%11 = load i32, i32* %5
%12 = load double*, double** %7
%13 = call double @V_blendIndexedOnEdge(i32 %11, double* %12)
store double %13, double* %4
br label %25
14: ; preds = %3
%15 = load i32, i32* %6
%16 = icmp eq i32 %15, 2
br i1 %16, label %20, label %17
17: ; preds = %14
%18 = load i32, i32* %6
%19 = icmp eq i32 %18, 4
br i1 %19, label %20, label %24
20: ; preds = %17, %14
%21 = load i32, i32* %5
%22 = load double*, double** %7
%23 = call double @V_blendIndexed(i32 %21, double* %22)
store double %23, double* %4
br label %25
24: ; preds = %17
store double 0.000000e+00, double* %4
br label %25
25: ; preds = %24, %20, %10
%26 = load double, double* %4
ret double %26
}

LLVM IR (-O2):
define double @V_blendOnEntity(i32 %0, i32 %1, double* %2) {
switch i32 %1, label %8 [
i32 1, label %4
i32 4, label %6
i32 2, label %6
]
4: ; preds = %3
%5 = tail call double @V_blendIndexedOnEdge(i32 %0, double* %2)
br label %8
6: ; preds = %3, %3
%7 = tail call double @V_blendIndexed(i32 %0, double* %2)
br label %8
8: ; preds = %3, %6, %4
%9 = phi double [ %5, %4 ], [ %7, %6 ], [ 0.000000e+00, %3 ]
ret double %9
}
/* Variables and functions */
char *gettext(char *);
int /*<<< orphan*/ printf(char *);
void spkg_show_help(void) {
  printf(gettext("spkg is a generic Linux and BSD package manager\n"
                 "\n"
                 "Usage :\n"
                 "spkg [OPTIONS] [PACKAGES]\n"
                 "\n"
                 "-h, --help   Show this help and exit\n"
                 "-I, --initdb Start database estructure\n"));
}


x86 assembly (clang, -O0):
<spkg_show_help>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<spkg_show_help>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <gettext@plt>
mov    %rax,%rdi
pop    %rax
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [161 x i8] c"spkg is a generic Linux and BSD package manager\0A\0AUsage :\0Aspkg [OPTIONS] [PACKAGES]\0A\0A-h, --help Show this help and exit\0A-I, --initdb Start database estructure\0A\00"
define void @spkg_show_help() {
%1 = call i8* @gettext(i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* %1)
ret void
}

LLVM IR (-O2):
@.str = [161 x i8] c"spkg is a generic Linux and BSD package manager\0A\0AUsage :\0Aspkg [OPTIONS] [PACKAGES]\0A\0A-h, --help Show this help and exit\0A-I, --initdb Start database estructure\0A\00"
define void @spkg_show_help() {
%1 = tail call i8* @gettext(i8* getelementptr inbounds ([161 x i8], [161 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* dereferenceable(1) %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ bmi2_test();
void __attribute__((no)) do_test(void) { bmi2_test(); }


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

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

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

LLVM IR (-O2):
define void @do_test() {
%1 = tail call i32 (...) @bmi2_test()
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ ASN1_OCTET_STRING;

/* Variables and functions */
int M_ASN1_OCTET_STRING_set(int /*<<< orphan*/ *, unsigned char const *, int);
int ASN1_OCTET_STRING_set(ASN1_OCTET_STRING *x, const unsigned char *d,
                          int len) {
  return M_ASN1_OCTET_STRING_set(x, d, len);
}


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

x86 assembly (clang, -O2):
<ASN1_OCTET_STRING_set>:
jmp    1030 <M_ASN1_OCTET_STRING_set@plt>

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

LLVM IR (-O2):
define i32 @ASN1_OCTET_STRING_set(i32* %0, i8* %1, i32 %2) {
%4 = tail call i32 @M_ASN1_OCTET_STRING_set(i32* %0, i8* %1, i32 %2)
ret i32 %4
}
__attribute__((weak)) void TC2_IrqHandler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define weak void @TC2_IrqHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void rop3_142_0_0(unsigned char *D, unsigned char S, unsigned char T) {
  unsigned char stk1;
  unsigned char stk2;
  unsigned char stk3;
  stk2 = S ^ *D;
  stk3 = T ^ *D;
  stk2 = stk2 & stk3;
  stk1 = S ^ stk2;
  *D = stk1;
}


x86 assembly (clang, -O0):
<rop3_142_0_0>:
push   %rbp
mov    %rsp,%rbp
mov    %dl,%al
mov    %sil,%cl
mov    %rdi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
movzbl -0x9(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0xa(%rbp),%eax
mov    -0x8(%rbp),%rcx
movzbl (%rcx),%ecx
xor    %ecx,%eax
mov    %al,-0xd(%rbp)
movzbl -0xc(%rbp),%eax
movzbl -0xd(%rbp),%ecx
and    %ecx,%eax
mov    %al,-0xc(%rbp)
movzbl -0x9(%rbp),%eax
movzbl -0xc(%rbp),%ecx
xor    %ecx,%eax
mov    %al,-0xb(%rbp)
mov    -0xb(%rbp),%cl
mov    -0x8(%rbp),%rax
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<rop3_142_0_0>:
mov    (%rdi),%al
xor    %al,%dl
xor    %sil,%al
and    %al,%dl
xor    %sil,%dl
mov    %dl,(%rdi)
ret

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

LLVM IR (-O2):
define void @rop3_142_0_0(i8* nocapture %0, i8 zeroext %1, i8 zeroext %2) {
%4 = load i8, i8* %0
%5 = xor i8 %4, %1
%6 = xor i8 %4, %2
%7 = and i8 %5, %6
%8 = xor i8 %7, %1
store i8 %8, i8* %0
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;

/* Variables and functions */
int /*<<< orphan*/ emon_log_data(char *, float);
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int logData(char *dbtype, char *dbname, time_t date, float data) {
  char filename[256];
  sprintf(filename, "%s_%s", dbname, dbtype);
  emon_log_data(filename, data);
}


x86 assembly (clang, -O0):
<logData>:
push   %rbp
mov    %rsp,%rbp
sub    $0x120,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
movss  %xmm0,-0x20(%rbp)
lea    -0x120(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeaf(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x120(%rbp),%rdi
movss  -0x20(%rbp),%xmm0
call   1030 <emon_log_data@plt>
mov    -0x4(%rbp),%eax
add    $0x120,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<logData>:
push   %rbx
sub    $0x110,%rsp
movss  %xmm0,0xc(%rsp)
mov    %rsi,%rdx
mov    %rdi,%rcx
lea    0xec5(%rip),%rsi
lea    0x10(%rsp),%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
movss  0xc(%rsp),%xmm0
call   1030 <emon_log_data@plt>
add    $0x110,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [6 x i8] c"%s_%s\00"
define i32 @logData(i8* %0, i8* %1, i32 %2, float %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32
%9 = alloca float
%10 = alloca [256 x i8]
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32 %2, i32* %8
store float %3, float* %9
%11 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%12 = load i8*, i8** %7
%13 = load i8*, i8** %6
%14 = call i32 @sprintf(i8* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %12, i8* %13)
%15 = getelementptr inbounds [256 x i8], [256 x i8]* %10, i64 0, i64 0
%16 = load float, float* %9
%17 = call i32 @emon_log_data(i8* %15, float %16)
%18 = load i32, i32* %5
ret i32 %18
}

LLVM IR (-O2):
@.str = [6 x i8] c"%s_%s\00"
define i32 @logData(i8* %0, i8* %1, i32 %2, float %3) {
%5 = alloca [256 x i8]
%6 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
%7 = call i32 @sprintf(i8* %6, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %1, i8* %0)
%8 = call i32 @emon_log_data(i8* %6, float %3)
ret i32 undef
}
/* Type definitions */
typedef int /*<<< orphan*/ buf;

/* Variables and functions */
int /*<<< orphan*/ l64a_r(long, char *, int);
char *l64a(long value) {
  static char buf[8];
  (void)l64a_r(value, buf, sizeof(buf));
  return (buf);
}


x86 assembly (clang, -O0):
<l64a>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    0x2f02(%rip),%rsi
mov    $0x8,%edx
call   1030 <l64a_r@plt>
lea    0x2ef1(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<l64a>:
push   %rbx
lea    0x2f11(%rip),%rbx
mov    %rbx,%rsi
mov    $0x8,%edx
call   1030 <l64a_r@plt>
mov    %rbx,%rax
pop    %rbx
ret

LLVM IR (-O0):
@l64a.buf = internal global [8 x i8] zeroinitializer
define i8* @l64a(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i32 @l64a_r(i64 %3, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @l64a.buf, i64 0, i64 0), i32 8)
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @l64a.buf, i64 0, i64 0)
}

LLVM IR (-O2):
@l64a.buf = internal global [8 x i8] zeroinitializer
define i8* @l64a(i64 %0) {
%2 = tail call i32 @l64a_r(i64 %0, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @l64a.buf, i64 0, i64 0), i32 8)
ret i8* getelementptr inbounds ([8 x i8], [8 x i8]* @l64a.buf, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ acq_pause();
int comm_cb_end(char *buf, int len) {
  (void)buf;
  (void)len;
  acq_pause();
  return 1;
}


x86 assembly (clang, -O0):
<comm_cb_end>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    $0x0,%al
call   1030 <acq_pause@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<comm_cb_end>:
push   %rax
xor    %eax,%eax
call   1030 <acq_pause@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @comm_cb_end(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 (...) @acq_pause()
ret i32 1
}

LLVM IR (-O2):
define i32 @comm_cb_end(i8* nocapture readnone %0, i32 %1) {
%3 = tail call i32 (...) @acq_pause()
ret i32 1
}
void initializeStrings(char strings[5][32]) {
  for (int i = 0; i < 5; i++) {
    for (int j = 0; j < 32; j++) {
      strings[i][j] = '\0';
    }
  }
}


x86 assembly (clang, -O0):
<initializeStrings>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0x5,-0xc(%rbp)
jge    1162 <initializeStrings+0x62>
movl   $0x0,-0x10(%rbp)
cmpl   $0x20,-0x10(%rbp)
jge    114f <initializeStrings+0x4f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
shl    $0x5,%rcx
add    %rcx,%rax
movslq -0x10(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1120 <initializeStrings+0x20>
jmp    1154 <initializeStrings+0x54>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110f <initializeStrings+0xf>
pop    %rbp
ret

x86 assembly (clang, -O2):
<initializeStrings>:
xorps  %xmm0,%xmm0
movups %xmm0,0x90(%rdi)
movups %xmm0,0x80(%rdi)
movups %xmm0,0x70(%rdi)
movups %xmm0,0x60(%rdi)
movups %xmm0,0x50(%rdi)
movups %xmm0,0x40(%rdi)
movups %xmm0,0x30(%rdi)
movups %xmm0,0x20(%rdi)
movups %xmm0,0x10(%rdi)
movups %xmm0,(%rdi)
ret

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

LLVM IR (-O2):
define void @initializeStrings([32 x i8]* nocapture writeonly %0) {
%2 = getelementptr [32 x i8], [32 x i8]* %0, i64 0, i64 0
ret void
}
/* Variables and functions */
void *s3(size_t);
void *s4(size_t n) { return s3(n); }


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

x86 assembly (clang, -O2):
<s4>:
jmp    1030 <s3@plt>

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

LLVM IR (-O2):
define i8* @s4(i64 %0) {
%2 = tail call i8* @s3(i64 %0)
ret i8* %2
}
unsigned xrop3_240_1_1(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  return (T & (~S) & (~T)) | (D & S) | (D & T);
}


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

x86 assembly (clang, -O2):
<xrop3_240_1_1>:
mov    %edi,%eax
or     %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @xrop3_240_1_1(i8 zeroext %0, i8 zeroext %1) {
%3 = or i8 %1, %0
%4 = zext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ wmbusParser(char *, int);
void singleValueWithVariableLength(void) {
  wmbusParser("\x0D\x03\x08"
              "AbCdEFgH",
              sizeof("\x0D\x03\x08"
                     "AbCdEFgH") -
                  1);
  wmbusParser("\x0D\x03\xC2\x12\x34", sizeof("\x0D\x03\xC2\x12\x34") - 1);
  wmbusParser("\x0D\x03\xD3\x12\x34\x56",
              sizeof("\x0D\x03\xD3\x12\x34\x56") - 1);
  wmbusParser("\x0D\x03\xF8\x4a\x32\x65\x43",
              sizeof("\x0D\x03\xF8\x4a\x32\x65\x43") - 1);
}


x86 assembly (clang, -O0):
<singleValueWithVariableLength>:
push   %rbp
mov    %rsp,%rbp
lea    0xee5(%rip),%rdi
mov    $0xb,%esi
call   1030 <wmbusParser@plt>
lea    0xee0(%rip),%rdi
mov    $0x5,%esi
call   1030 <wmbusParser@plt>
lea    0xed5(%rip),%rdi
mov    $0x6,%esi
call   1030 <wmbusParser@plt>
lea    0xecb(%rip),%rdi
mov    $0x7,%esi
call   1030 <wmbusParser@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<singleValueWithVariableLength>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0xb,%esi
call   1030 <wmbusParser@plt>
lea    0xee3(%rip),%rdi
mov    $0x5,%esi
call   1030 <wmbusParser@plt>
lea    0xed8(%rip),%rdi
mov    $0x6,%esi
call   1030 <wmbusParser@plt>
lea    0xece(%rip),%rdi
mov    $0x7,%esi
pop    %rax
jmp    1030 <wmbusParser@plt>

LLVM IR (-O0):
@.str = [12 x i8] c"\0D\03\08AbCdEFgH\00"
@.str.1 = [6 x i8] c"\0D\03\C2\124\00"
@.str.2 = [7 x i8] c"\0D\03\D3\124V\00"
@.str.3 = [8 x i8] c"\0D\03\F8J2eC\00"
define void @singleValueWithVariableLength() {
%1 = call i32 @wmbusParser(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
%2 = call i32 @wmbusParser(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%3 = call i32 @wmbusParser(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 6)
%4 = call i32 @wmbusParser(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"\0D\03\08AbCdEFgH\00"
@.str.1 = [6 x i8] c"\0D\03\C2\124\00"
@.str.2 = [7 x i8] c"\0D\03\D3\124V\00"
@.str.3 = [8 x i8] c"\0D\03\F8J2eC\00"
define void @singleValueWithVariableLength() {
%1 = tail call i32 @wmbusParser(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i32 11)
%2 = tail call i32 @wmbusParser(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i32 5)
%3 = tail call i32 @wmbusParser(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i32 6)
%4 = tail call i32 @wmbusParser(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i32 7)
ret void
}
int do_exit(struct client *client, char **tokens) { return -1; }


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

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

LLVM IR (-O0):
%struct.client = type opaque
define i32 @do_exit(%struct.client* %0, i8** %1) {
%3 = alloca %struct.client*
%4 = alloca i8**
store %struct.client* %0, %struct.client** %3
store i8** %1, i8*** %4
ret i32 -1
}

LLVM IR (-O2):
%struct.client = type opaque
define i32 @do_exit(%struct.client* nocapture readnone %0, i8** nocapture readnone %1) {
ret i32 -1
}
/* Variables and functions */
scalar_t__ malloc(int);
int *mysum(int *x, int *y) {
  int *val = (int *)malloc(sizeof(int));
  *val = (*x) + (*y);
  return val;
}


x86 assembly (clang, -O0):
<mysum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%ecx
mov    -0x10(%rbp),%rax
add    (%rax),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mysum>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0x4,%edi
call   1030 <malloc@plt>
mov    (%rbx),%ecx
add    (%r14),%ecx
mov    %ecx,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32* @mysum(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = call i64 @malloc(i32 4)
%7 = inttoptr i64 %6 to i32*
store i32* %7, i32** %5
%8 = load i32*, i32** %3
%9 = load i32, i32* %8
%10 = load i32*, i32** %4
%11 = load i32, i32* %10
%12 = add nsw i32 %9, %11
%13 = load i32*, i32** %5
store i32 %12, i32* %13
%14 = load i32*, i32** %5
ret i32* %14
}

LLVM IR (-O2):
define i32* @mysum(i32* nocapture %0, i32* nocapture %1) {
%3 = tail call i64 @malloc(i32 4)
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* %0
%6 = load i32, i32* %1
%7 = add nsw i32 %6, %5
store i32 %7, i32* %4
ret i32* %4
}
int zig_subw_int(int lhs, int rhs, int min, int max) {
  return (int)(((unsigned)lhs) - ((unsigned)rhs));
}


x86 assembly (clang, -O0):
<zig_subw_int>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    -0x4(%rbp),%eax
sub    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<zig_subw_int>:
mov    %edi,%eax
sub    %esi,%eax
ret

LLVM IR (-O0):
define i32 @zig_subw_int(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = sub i32 %9, %10
ret i32 %11
}

LLVM IR (-O2):
define i32 @zig_subw_int(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = sub i32 %0, %1
ret i32 %5
}
char *AdmAcceptKeep(char *pt, char *dst) {
  *dst = '\0';
  while (*pt && (*pt != ' ' && *pt != '\t')) {
    *dst++ = *pt++;
  }
  *dst = '\0';
  return pt;
}


x86 assembly (clang, -O0):
<AdmAcceptKeep>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x11(%rbp)
je     1153 <AdmAcceptKeep+0x53>
mov    -0x8(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x12(%rbp)
je     114d <AdmAcceptKeep+0x4d>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
setne  %al
mov    %al,-0x12(%rbp)
mov    -0x12(%rbp),%al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
test   $0x1,%al
jne    1163 <AdmAcceptKeep+0x63>
jmp    118a <AdmAcceptKeep+0x8a>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,(%rax)
jmp    1113 <AdmAcceptKeep+0x13>
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AdmAcceptKeep>:
mov    %rdi,%rax
movb   $0x0,(%rsi)
movabs $0x100000201,%rcx
jmp    112a <AdmAcceptKeep+0x2a>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
add    $0x1,%rax
mov    %dl,(%rsi)
add    $0x1,%rsi
movzbl (%rax),%edx
cmp    $0x20,%rdx
ja     1120 <AdmAcceptKeep+0x20>
bt     %rdx,%rcx
jae    1120 <AdmAcceptKeep+0x20>
movb   $0x0,(%rsi)
ret

LLVM IR (-O0):
define i8* @AdmAcceptKeep(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
store i8 0, i8* %5
br label %6
6: ; preds = %25, %2
%7 = load i8*, i8** %3
%8 = load i8, i8* %7
%9 = sext i8 %8 to i32
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %23
11: ; preds = %6
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = sext i8 %13 to i32
%15 = icmp ne i32 %14, 32
br i1 %15, label %16, label %21
16: ; preds = %11
%17 = load i8*, i8** %3
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
%20 = icmp ne i32 %19, 9
br label %21
21: ; preds = %16, %11
%22 = phi i1 [ false, %11 ], [ %20, %16 ]
br label %23
23: ; preds = %21, %6
%24 = phi i1 [ false, %6 ], [ %22, %21 ]
br i1 %24, label %25, label %31
25: ; preds = %23
%26 = load i8*, i8** %3
%27 = getelementptr inbounds i8, i8* %26, i32 1
store i8* %27, i8** %3
%28 = load i8, i8* %26
%29 = load i8*, i8** %4
%30 = getelementptr inbounds i8, i8* %29, i32 1
store i8* %30, i8** %4
store i8 %28, i8* %29
br label %6
31: ; preds = %23
%32 = load i8*, i8** %4
store i8 0, i8* %32
%33 = load i8*, i8** %3
ret i8* %33
}

LLVM IR (-O2):
define i8* @AdmAcceptKeep(i8* %0, i8* nocapture writeonly %1) {
store i8 0, i8* %1
br label %3
3: ; preds = %7, %2
%4 = phi i8* [ %0, %2 ], [ %8, %7 ]
%5 = phi i8* [ %1, %2 ], [ %9, %7 ]
%6 = load i8, i8* %4
switch i8 %6, label %7 [
i8 0, label %10
i8 32, label %10
i8 9, label %10
]
7: ; preds = %3
%8 = getelementptr inbounds i8, i8* %4, i64 1
%9 = getelementptr inbounds i8, i8* %5, i64 1
store i8 %6, i8* %5
br label %3
10: ; preds = %3, %3, %3
store i8 0, i8* %5
ret i8* %4
}
int areSplitsEqual(int len, int sum_split_A, int sum_split_B) {}


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

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

LLVM IR (-O0):
define i32 @areSplitsEqual(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
%8 = load i32, i32* %4
ret i32 %8
}

LLVM IR (-O2):
define i32 @areSplitsEqual(i32 %0, i32 %1, i32 %2) {
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ _card_led_on();
void info_led_on() { _card_led_on(); }


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

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

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

LLVM IR (-O2):
define void @info_led_on() {
%1 = tail call i32 (...) @_card_led_on()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ glClearColor(float, float, float, float);
void ClearColor(float r, float g, float b, float a) {
  glClearColor(r, g, b, a);
}


x86 assembly (clang, -O0):
<ClearColor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  %xmm3,-0x10(%rbp)
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
movss  -0xc(%rbp),%xmm2
movss  -0x10(%rbp),%xmm3
call   1030 <glClearColor@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearColor>:
jmp    1030 <glClearColor@plt>

LLVM IR (-O0):
define void @ClearColor(float %0, float %1, float %2, float %3) {
%5 = alloca float
%6 = alloca float
%7 = alloca float
%8 = alloca float
store float %0, float* %5
store float %1, float* %6
store float %2, float* %7
store float %3, float* %8
%9 = load float, float* %5
%10 = load float, float* %6
%11 = load float, float* %7
%12 = load float, float* %8
%13 = call i32 @glClearColor(float %9, float %10, float %11, float %12)
ret void
}

LLVM IR (-O2):
define void @ClearColor(float %0, float %1, float %2, float %3) {
%5 = tail call i32 @glClearColor(float %0, float %1, float %2, float %3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ zfuse_umount();
int do_umount(void) {
  zfuse_umount();
  return 0;
}


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

x86 assembly (clang, -O2):
<do_umount>:
push   %rax
xor    %eax,%eax
call   1030 <zfuse_umount@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @do_umount() {
%1 = call i32 (...) @zfuse_umount()
ret i32 0
}

LLVM IR (-O2):
define i32 @do_umount() {
%1 = tail call i32 (...) @zfuse_umount()
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ g();
void f() {
  int f2 = 0;
  if (f2 == 0)
    ;
  g();
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    112e <f+0x1e>
jmp    112e <f+0x1e>
mov    $0x0,%al
call   1030 <g@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
define void @f() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* %1
%3 = icmp eq i32 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %0
br label %5
5: ; preds = %4, %0
%6 = call i32 (...) @g()
ret void
}

LLVM IR (-O2):
define void @f() {
%1 = tail call i32 (...) @g()
ret void
}
/* Variables and functions */
int ne_put_init_info(int, int, int, char *);
int /*<<< orphan*/ strcpy(char *, char *);
int ne_test_piinf(int fileid) {
  char ftype[3];
  strcpy(ftype, "s");
  return (ne_put_init_info(fileid, 10, 10, ftype));
}


x86 assembly (clang, -O0):
<ne_test_piinf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    -0x7(%rbp),%rdi
lea    0xeca(%rip),%rsi
call   1030 <strcpy@plt>
mov    -0x4(%rbp),%edi
lea    -0x7(%rbp),%rcx
mov    $0xa,%edx
mov    %edx,%esi
call   1040 <ne_put_init_info@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ne_test_piinf>:
push   %r14
push   %rbx
push   %rax
mov    %edi,%ebx
lea    0xed3(%rip),%rsi
lea    0x5(%rsp),%r14
mov    %r14,%rdi
call   1030 <strcpy@plt>
mov    %ebx,%edi
mov    $0xa,%esi
mov    $0xa,%edx
mov    %r14,%rcx
call   1040 <ne_put_init_info@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"s\00"
define i32 @ne_test_piinf(i32 %0) {
%2 = alloca [3 x i8]
%3 = getelementptr inbounds [3 x i8], [3 x i8]* %2, i64 0, i64 0
%4 = call i32 @strcpy(i8* %3, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @ne_put_init_info(i32 %0, i32 10, i32 10, i8* %3)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int pdf_numpages_1(void *, int /*<<< orphan*/);
int /*<<< orphan*/ *wfile_fopen_utf8(char *, char *);
int pdf_numpages(char *filename) {
  FILE *f;
  int np;
  f = wfile_fopen_utf8(filename, "rb");
  if (f == NULL)
    return (-1);
  np = pdf_numpages_1((void *)f, 0);
  fclose(f);
  return (np);
}


x86 assembly (clang, -O0):
<pdf_numpages>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xeb9(%rip),%rsi
call   1040 <wfile_fopen_utf8@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1167 <pdf_numpages+0x37>
movl   $0xffffffff,-0x4(%rbp)
jmp    1184 <pdf_numpages+0x54>
mov    -0x18(%rbp),%rdi
xor    %esi,%esi
call   1050 <pdf_numpages_1@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdf_numpages>:
push   %rbp
push   %rbx
push   %rax
lea    0xec6(%rip),%rsi
call   1040 <wfile_fopen_utf8@plt>
test   %rax,%rax
je     115f <pdf_numpages+0x2f>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
call   1050 <pdf_numpages_1@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fclose@plt>
mov    %ebp,%eax
jmp    1164 <pdf_numpages+0x34>
mov    $0xffffffff,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"rb\00"
define i32 @pdf_numpages(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
%6 = load i8*, i8** %3
%7 = call i32* @wfile_fopen_utf8(i8* %6, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
store i32* %7, i32** %4
%8 = load i32*, i32** %4
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %11
10: ; preds = %1
store i32 -1, i32* %2
br label %18
11: ; preds = %1
%12 = load i32*, i32** %4
%13 = bitcast i32* %12 to i8*
%14 = call i32 @pdf_numpages_1(i8* %13, i32 0)
store i32 %14, i32* %5
%15 = load i32*, i32** %4
%16 = call i32 @fclose(i32* %15)
%17 = load i32, i32* %5
store i32 %17, i32* %2
br label %18
18: ; preds = %11, %10
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
@.str = [3 x i8] c"rb\00"
define i32 @pdf_numpages(i8* %0) {
%2 = tail call i32* @wfile_fopen_utf8(i8* %0, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32* %2, null
br i1 %3, label %8, label %4
4: ; preds = %1
%5 = bitcast i32* %2 to i8*
%6 = tail call i32 @pdf_numpages_1(i8* %5, i32 0)
%7 = tail call i32 @fclose(i32* %2)
br label %8
8: ; preds = %1, %4
%9 = phi i32 [ %6, %4 ], [ -1, %1 ]
ret i32 %9
}
/* Variables and functions */
int /*<<< orphan*/ O_RDONLY;
int /*<<< orphan*/ close(int);
int open(char *, int /*<<< orphan*/);
int read(int, char *, int);
int read_file(char *path, char *output, int output_len) {
  int fd = open(path, O_RDONLY);
  if (fd >= 0) {
    output_len = read(fd, output, output_len);
    close(fd);
    return output_len;
  } else
    return -1;
}


x86 assembly (clang, -O0):
<read_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %edx,-0x1c(%rbp)
mov    -0x10(%rbp),%rdi
mov    0x2e9a(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
mov    %eax,-0x20(%rbp)
cmpl   $0x0,-0x20(%rbp)
jl     1187 <read_file+0x57>
mov    -0x20(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    -0x1c(%rbp),%edx
call   1040 <read@plt>
mov    %eax,-0x1c(%rbp)
mov    -0x20(%rbp),%edi
call   1030 <close@plt>
mov    -0x1c(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    118e <read_file+0x5e>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<read_file>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %rsi,%rbx
mov    0x2ea7(%rip),%rax
mov    (%rax),%esi
call   1050 <open@plt>
test   %eax,%eax
js     1168 <read_file+0x38>
mov    %eax,%ebp
mov    %eax,%edi
mov    %rbx,%rsi
mov    %r14d,%edx
call   1040 <read@plt>
mov    %eax,%ebx
mov    %ebp,%edi
call   1030 <close@plt>
mov    %ebx,%eax
jmp    116d <read_file+0x3d>
mov    $0xffffffff,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@O_RDONLY = global i32 0
define i32 @read_file(i8* %0, i8* %1, i32 %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i32
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
%9 = load i8*, i8** %5
%10 = load i32, i32* @O_RDONLY
%11 = call i32 @open(i8* %9, i32 %10)
store i32 %11, i32* %8
%12 = load i32, i32* %8
%13 = icmp sge i32 %12, 0
br i1 %13, label %14, label %22
14: ; preds = %3
%15 = load i32, i32* %8
%16 = load i8*, i8** %6
%17 = load i32, i32* %7
%18 = call i32 @read(i32 %15, i8* %16, i32 %17)
store i32 %18, i32* %7
%19 = load i32, i32* %8
%20 = call i32 @close(i32 %19)
%21 = load i32, i32* %7
store i32 %21, i32* %4
br label %23
22: ; preds = %3
store i32 -1, i32* %4
br label %23
23: ; preds = %22, %14
%24 = load i32, i32* %4
ret i32 %24
}

LLVM IR (-O2):
@O_RDONLY = global i32 0
define i32 @read_file(i8* nocapture %0, i8* nocapture %1, i32 %2) {
%4 = load i32, i32* @O_RDONLY
%5 = tail call i32 @open(i8* %0, i32 %4)
%6 = icmp sgt i32 %5, -1
br i1 %6, label %7, label %10
7: ; preds = %3
%8 = tail call i32 @read(i32 %5, i8* %1, i32 %2)
%9 = tail call i32 @close(i32 %5)
br label %10
10: ; preds = %3, %7
%11 = phi i32 [ %8, %7 ], [ -1, %3 ]
ret i32 %11
}
/* Type definitions */
typedef scalar_t__ uint;

/* Variables and functions */
uint _h2_uintmin(uint x, uint y) { return (x < y ? x : y); }


x86 assembly (clang, -O0):
<_h2_uintmin>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jge    1127 <_h2_uintmin+0x27>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
jmp    112f <_h2_uintmin+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<_h2_uintmin>:
mov    %rsi,%rax
cmp    %rsi,%rdi
cmovl  %rdi,%rax
ret

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

LLVM IR (-O2):
define i64 @_h2_uintmin(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = select i1 %3, i64 %0, i64 %1
ret i64 %4
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_ror_epi32(int /*<<< orphan*/, int);
__attribute__((always_)) __m128i rot12_128(__m128i x) {
  return _mm_ror_epi32(x, 12);
}


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

x86 assembly (clang, -O2):
<rot12_128>:
mov    $0xc,%esi
jmp    1030 <_mm_ror_epi32@plt>

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

LLVM IR (-O2):
define i32 @rot12_128(i32 %0) {
%2 = tail call i32 @_mm_ror_epi32(i32 %0, i32 12)
ret i32 %2
}
/* Variables and functions */
int detectPresence(char *);
scalar_t__ graphicMode();
int qarmaPresent(void) {
  static int lQarmaPresent = -1;
  if (lQarmaPresent < 0) {
    lQarmaPresent = detectPresence("qarma");
  }
  return lQarmaPresent && graphicMode();
}


x86 assembly (clang, -O0):
<qarmaPresent>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
cmpl   $0x0,0x2f01(%rip)
jge    1147 <qarmaPresent+0x27>
lea    0xec4(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2ee9(%rip)
xor    %eax,%eax
cmpl   $0x0,0x2ee0(%rip)
mov    %al,-0x1(%rbp)
je     116a <qarmaPresent+0x4a>
mov    $0x0,%al
call   1030 <graphicMode@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x1(%rbp)
mov    -0x1(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<qarmaPresent>:
push   %rax
mov    0x2f09(%rip),%eax
test   %eax,%eax
js     1143 <qarmaPresent+0x23>
test   %eax,%eax
je     1159 <qarmaPresent+0x39>
xor    %eax,%eax
call   1030 <graphicMode@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
pop    %rcx
ret
lea    0xeb6(%rip),%rdi
call   1040 <detectPresence@plt>
mov    %eax,0x2edb(%rip)
test   %eax,%eax
jne    112f <qarmaPresent+0xf>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@qarmaPresent.lQarmaPresent = internal global i32 -1
@.str = [6 x i8] c"qarma\00"
define i32 @qarmaPresent() {
%1 = load i32, i32* @qarmaPresent.lQarmaPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = call i32 @detectPresence(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @qarmaPresent.lQarmaPresent
br label %5
5: ; preds = %3, %0
%6 = load i32, i32* @qarmaPresent.lQarmaPresent
%7 = icmp ne i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %5
%9 = call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
br label %11
11: ; preds = %8, %5
%12 = phi i1 [ false, %5 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
@qarmaPresent.lQarmaPresent = internal unnamed_addr global i32 -1
@.str = [6 x i8] c"qarma\00"
define i32 @qarmaPresent() {
%1 = load i32, i32* @qarmaPresent.lQarmaPresent
%2 = icmp slt i32 %1, 0
br i1 %2, label %3, label %5
3: ; preds = %0
%4 = tail call i32 @detectPresence(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
store i32 %4, i32* @qarmaPresent.lQarmaPresent
br label %5
5: ; preds = %3, %0
%6 = phi i32 [ %4, %3 ], [ %1, %0 ]
%7 = icmp eq i32 %6, 0
br i1 %7, label %12, label %8
8: ; preds = %5
%9 = tail call i64 (...) @graphicMode()
%10 = icmp ne i64 %9, 0
%11 = zext i1 %10 to i32
br label %12
12: ; preds = %8, %5
%13 = phi i32 [ 0, %5 ], [ %11, %8 ]
ret i32 %13
}
/* Variables and functions */
int /*<<< orphan*/ playTextBlack(int);
int /*<<< orphan*/ playTextWhite(int);
void playTextAs(char color, int depth) {
  if (color == (0))
    playTextWhite(depth);
  if (color == (1 << 3))
    playTextBlack(depth);
}


x86 assembly (clang, -O0):
<playTextAs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
mov    %esi,-0x8(%rbp)
movsbl -0x1(%rbp),%eax
cmp    $0x0,%eax
jne    1146 <playTextAs+0x26>
mov    -0x8(%rbp),%edi
call   1030 <playTextWhite@plt>
movsbl -0x1(%rbp),%eax
cmp    $0x8,%eax
jne    115b <playTextAs+0x3b>
mov    -0x8(%rbp),%edi
call   1040 <playTextBlack@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<playTextAs>:
cmp    $0x8,%dil
je     1132 <playTextAs+0x12>
test   %dil,%dil
jne    1139 <playTextAs+0x19>
mov    %esi,%edi
jmp    1030 <playTextWhite@plt>
mov    %esi,%edi
jmp    1040 <playTextBlack@plt>
ret

LLVM IR (-O0):
define void @playTextAs(i8 signext %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 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 0
br i1 %7, label %8, label %11
8: ; preds = %2
%9 = load i32, i32* %4
%10 = call i32 @playTextWhite(i32 %9)
br label %11
11: ; preds = %8, %2
%12 = load i8, i8* %3
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 8
br i1 %14, label %15, label %18
15: ; preds = %11
%16 = load i32, i32* %4
%17 = call i32 @playTextBlack(i32 %16)
br label %18
18: ; preds = %15, %11
ret void
}

LLVM IR (-O2):
define void @playTextAs(i8 signext %0, i32 %1) {
switch i8 %0, label %7 [
i8 0, label %3
i8 8, label %5
]
3: ; preds = %2
%4 = tail call i32 @playTextWhite(i32 %1)
br label %7
5: ; preds = %2
%6 = tail call i32 @playTextBlack(i32 %1)
br label %7
7: ; preds = %3, %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ memset(void *, int /*<<< orphan*/, size_t);
void *the_ideas_of_its_rule(size_t);
void *thus_the_whole_bourgeoisie(size_t that_is_to_have_not_got,
                                 size_t all_that_is_required_of_him) {
  void *hence_the_cost_of_production = the_ideas_of_its_rule(
      that_is_to_have_not_got * all_that_is_required_of_him);
  memset(hence_the_cost_of_production, 0,
         that_is_to_have_not_got * all_that_is_required_of_him);
  return hence_the_cost_of_production;
}


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

x86 assembly (clang, -O2):
<thus_the_whole_bourgeoisie>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
imul   %rsi,%rbx
mov    %rbx,%rdi
call   1040 <the_ideas_of_its_rule@plt>
mov    %rax,%r14
mov    %rax,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <memset@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @thus_the_whole_bourgeoisie(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca i8*
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = load i64, i64* %4
%8 = mul i64 %6, %7
%9 = call i8* @the_ideas_of_its_rule(i64 %8)
store i8* %9, i8** %5
%10 = load i8*, i8** %5
%11 = load i64, i64* %3
%12 = load i64, i64* %4
%13 = mul i64 %11, %12
%14 = call i32 @memset(i8* %10, i32 0, i64 %13)
%15 = load i8*, i8** %5
ret i8* %15
}

LLVM IR (-O2):
define i8* @thus_the_whole_bourgeoisie(i64 %0, i64 %1) {
%3 = mul i64 %1, %0
%4 = tail call i8* @the_ideas_of_its_rule(i64 %3)
%5 = tail call i32 @memset(i8* %4, i32 0, i64 %3)
ret i8* %4
}
void PATMR3IsEnabled(void) {}


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

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

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

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