xunge/DecIR huggingface dataset:
/* Type definitions */
typedef scalar_t__ pthread_t;
typedef scalar_t__ pid_t;

/* Variables and functions */
scalar_t__ getpid();
int /*<<< orphan*/ printf(char *, char const *, unsigned long, unsigned long,
                          unsigned long);
scalar_t__ pthread_self();
void printids(const char *s) {
  pid_t pid;
  pthread_t tid;
  pid = getpid();
  tid = pthread_self();
  printf("%s pid = %lu tid = %lu (0x%lx)\n", s, (unsigned long)pid,
         (unsigned long)tid, (unsigned long)tid);
}


x86 assembly (clang, -O0):
<printids>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1030 <getpid@plt>
mov    %rax,-0x10(%rbp)
mov    $0x0,%al
call   1050 <pthread_self@plt>
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x18(%rbp),%rcx
mov    -0x18(%rbp),%r8
lea    0xe97(%rip),%rdi
call   1040 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printids>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1030 <getpid@plt>
mov    %rax,%rbx
xor    %eax,%eax
call   1050 <pthread_self@plt>
lea    0xeb1(%rip),%rdi
mov    %r14,%rsi
mov    %rbx,%rdx
mov    %rax,%rcx
mov    %rax,%r8
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [32 x i8] c"%s pid = %lu tid = %lu (0x%lx)\0A\00"
define void @printids(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
%4 = alloca i64
store i8* %0, i8** %2
%5 = call i64 (...) @getpid()
store i64 %5, i64* %3
%6 = call i64 (...) @pthread_self()
store i64 %6, i64* %4
%7 = load i8*, i8** %2
%8 = load i64, i64* %3
%9 = load i64, i64* %4
%10 = load i64, i64* %4
%11 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %7, i64 %8, i64 %9, i64 %10)
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"%s pid = %lu tid = %lu (0x%lx)\0A\00"
define void @printids(i8* %0) {
%2 = tail call i64 (...) @getpid()
%3 = tail call i64 (...) @pthread_self()
%4 = tail call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i8* %0, i64 %2, i64 %3, i64 %3)
ret void
}
int maximum(int a, int b) {
  char buffer[4096];
  if (a < b)
    return b;
  return a;
}


x86 assembly (clang, -O0):
<maximum>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf90,%rsp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1128 <maximum+0x28>
mov    -0xc(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    112e <maximum+0x2e>
mov    -0x8(%rbp),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0xf90,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<maximum>:
mov    %edi,%eax
cmp    %esi,%edi
cmovl  %esi,%eax
ret

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

LLVM IR (-O2):
define i32 @maximum(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, %1
%4 = select i1 %3, i32 %1, i32 %0
ret i32 %4
}
int d_eq_rr1(double a1, double a2) { return (((a1) == (a2))); }


x86 assembly (clang, -O0):
<d_eq_rr1>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
ucomisd -0x10(%rbp),%xmm0
sete   %al
setnp  %cl
and    %cl,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<d_eq_rr1>:
cmpeqsd %xmm1,%xmm0
movq   %xmm0,%rax
and    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @d_eq_rr1(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp oeq double %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @d_eq_rr1(double %0, double %1) {
%3 = fcmp oeq double %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ bb(int);
__attribute__((no)) void aa(int x) { bb(x); }


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

x86 assembly (clang, -O2):
<aa>:
jmp    1030 <bb@plt>

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

LLVM IR (-O2):
define void @aa(i32 %0) {
%2 = tail call i32 @bb(i32 %0)
ret void
}
int test_imm_B3uint32_reg(unsigned int val) {
  return ((val) & (0xB3 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_B3uint32_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
and    $0xb3,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_B3uint32_reg>:
test   $0xb3,%dil
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_B3uint32_reg(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = and i32 %3, 179
%5 = icmp ne i32 %4, 0
%6 = zext i1 %5 to i64
%7 = select i1 %5, i32 -20, i32 -40
ret i32 %7
}

LLVM IR (-O2):
define i32 @test_imm_B3uint32_reg(i32 %0) {
%2 = and i32 %0, 179
%3 = icmp eq i32 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ OutputClearCount(unsigned char);
void ResetRotationCount(unsigned char Outputs) { OutputClearCount(Outputs); }


x86 assembly (clang, -O0):
<ResetRotationCount>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movzbl -0x1(%rbp),%edi
call   1030 <OutputClearCount@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ResetRotationCount>:
jmp    1030 <OutputClearCount@plt>

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

LLVM IR (-O2):
define void @ResetRotationCount(i8 zeroext %0) {
%2 = tail call i32 @OutputClearCount(i8 zeroext %0)
ret void
}
int emac2_ifoutbroadcastpkts_set(unsigned int dev_id,
                                 union emac2_ifoutbroadcastpkts_u *value) {
  return 1;
}


x86 assembly (clang, -O0):
<emac2_ifoutbroadcastpkts_set>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x1,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
%union.emac2_ifoutbroadcastpkts_u = type opaque
define i32 @emac2_ifoutbroadcastpkts_set(i32 %0, %union.emac2_ifoutbroadcastpkts_u* %1) {
%3 = alloca i32
%4 = alloca %union.emac2_ifoutbroadcastpkts_u*
store i32 %0, i32* %3
store %union.emac2_ifoutbroadcastpkts_u* %1, %union.emac2_ifoutbroadcastpkts_u** %4
ret i32 1
}

LLVM IR (-O2):
%union.emac2_ifoutbroadcastpkts_u = type opaque
define i32 @emac2_ifoutbroadcastpkts_set(i32 %0, %union.emac2_ifoutbroadcastpkts_u* nocapture readnone %1) {
ret i32 1
}
/* Variables and functions */
double log10(int);
int /*<<< orphan*/ printf(char *, double);
int main() {
  double d = 300000;
  double p = 6000;
  double r = 0.01, m;
  m = log10(p / (p - d * r)) / log10(1 + r);
  printf("m = %d\n", m);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
movsd  0xee1(%rip),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  0xecc(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  0xeb7(%rip),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  -0x18(%rbp),%xmm2
movsd  -0x10(%rbp),%xmm1
movsd  -0x20(%rbp),%xmm3
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
mulsd  %xmm3,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <log10@plt>
movsd  %xmm0,-0x30(%rbp)
movsd  0xe5d(%rip),%xmm0
addsd  -0x20(%rbp),%xmm0
cvttsd2si %xmm0,%edi
call   1040 <log10@plt>
movaps %xmm0,%xmm1
movsd  -0x30(%rbp),%xmm0
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
lea    0xe52(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x2,%edi
call   1040 <log10@plt>
movsd  %xmm0,(%rsp)
mov    $0x1,%edi
call   1040 <log10@plt>
movsd  (%rsp),%xmm1
divsd  %xmm0,%xmm1
lea    0xeb6(%rip),%rdi
movapd %xmm1,%xmm0
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"m = %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca double
%3 = alloca double
%4 = alloca double
%5 = alloca double
store i32 0, i32* %1
store double 3.000000e+05, double* %2
store double 6.000000e+03, double* %3
store double 1.000000e-02, double* %4
%6 = load double, double* %3
%7 = load double, double* %3
%8 = load double, double* %2
%9 = load double, double* %4
%10 = fneg double %8
%11 = call double @llvm.fmuladd.f64(double %10, double %9, double %7)
%12 = fdiv double %6, %11
%13 = fptosi double %12 to i32
%14 = call double @log10(i32 %13)
%15 = load double, double* %4
%16 = fadd double 1.000000e+00, %15
%17 = fptosi double %16 to i32
%18 = call double @log10(i32 %17)
%19 = fdiv double %14, %18
store double %19, double* %5
%20 = load double, double* %5
%21 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %20)
ret i32 0
}

LLVM IR (-O2):
@.str = [8 x i8] c"m = %d\0A\00"
define i32 @main() {
%1 = tail call double @log10(i32 2)
%2 = tail call double @log10(i32 1)
%3 = fdiv double %1, %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), double %3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ MON_1;
char *nl_langinfo(int /*<<< orphan*/);
char *langinfo_mon_1() { return nl_langinfo(MON_1); }


x86 assembly (clang, -O0):
<langinfo_mon_1>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <nl_langinfo@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<langinfo_mon_1>:
mov    0x2ed1(%rip),%rax
mov    (%rax),%edi
jmp    1030 <nl_langinfo@plt>

LLVM IR (-O0):
@MON_1 = global i32 0
define i8* @langinfo_mon_1() {
%1 = load i32, i32* @MON_1
%2 = call i8* @nl_langinfo(i32 %1)
ret i8* %2
}

LLVM IR (-O2):
@MON_1 = global i32 0
define i8* @langinfo_mon_1() {
%1 = load i32, i32* @MON_1
%2 = tail call i8* @nl_langinfo(i32 %1)
ret i8* %2
}
/* Variables and functions */
char a;
char e;
char i;
int letras(char, char, char);
int /*<<< orphan*/ printf(char *, int);
int main() {
  char a = a;
  char e = e;
  char i = i;
  printf("%d\n", letras(a, e, i));
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
xor    %esi,%esi
xor    %edx,%edx
call   1040 <letras@plt>
lea    0xecd(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
@a = global i8 0
@e = global i8 0
@i = global i8 0
define i32 @main() {
%1 = tail call i32 @letras(i8 signext undef, i8 signext undef, i8 signext undef)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void print_usage(void) {
  printf("Usage: ./ledctl <seconds-to-wait>\nExample: ./ledctl 5\n");
}


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

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

LLVM IR (-O0):
@.str = [55 x i8] c"Usage: ./ledctl <seconds-to-wait>\0AExample: ./ledctl 5\0A\00"
define void @print_usage() {
%1 = call i32 @printf(i8* getelementptr inbounds ([55 x i8], [55 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [54 x i8] c"Usage: ./ledctl <seconds-to-wait>\0AExample: ./ledctl 5\00"
define void @print_usage() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
long __builtin_vis_bmask(long, long);
long test_bmask(long x, long y) { return __builtin_vis_bmask(x, y); }


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

x86 assembly (clang, -O2):
<test_bmask>:
jmp    1030 <__builtin_vis_bmask@plt>

LLVM IR (-O0):
define i64 @test_bmask(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 = call i64 @__builtin_vis_bmask(i64 %5, i64 %6)
ret i64 %7
}

LLVM IR (-O2):
define i64 @test_bmask(i64 %0, i64 %1) {
%3 = tail call i64 @__builtin_vis_bmask(i64 %0, i64 %1)
ret i64 %3
}
int test_imm_30int32_mem(int *val) {
  return ((*val) & (0x30 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_30int32_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%edx
and    $0x30,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_30int32_mem(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = load i32, i32* %3
%5 = and i32 %4, 48
%6 = icmp ne i32 %5, 0
%7 = zext i1 %6 to i64
%8 = select i1 %6, i32 -20, i32 -40
ret i32 %8
}

LLVM IR (-O2):
define i32 @test_imm_30int32_mem(i32* nocapture %0) {
%2 = load i32, i32* %0
%3 = and i32 %2, 48
%4 = icmp eq i32 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           char const *, char const *, int);
int /*<<< orphan*/ stderr;
void __assert(const char *func, const char *file, int line, const char *expr) {
  fprintf(stderr,
          "Assertion failed: (%s), in function: %s, file: %s, line: %d.\n",
          expr, func, file, line);
  abort();
}


x86 assembly (clang, -O0):
<__assert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    %rcx,-0x20(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
mov    -0x20(%rbp),%rdx
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
mov    -0x14(%rbp),%r9d
lea    0xea9(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<__assert>:
push   %rax
mov    %edx,%r9d
mov    %rsi,%r8
mov    %rdi,%rax
mov    0x2eaf(%rip),%rdx
mov    (%rdx),%edi
lea    0xec6(%rip),%rsi
mov    %rcx,%rdx
mov    %rax,%rcx
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [62 x i8] c"Assertion failed: (%s), in function: %s, file: %s, line: %d.\0A\00"
define void @__assert(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i32
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i32 %2, i32* %7
store i8* %3, i8** %8
%9 = load i32, i32* @stderr
%10 = load i8*, i8** %8
%11 = load i8*, i8** %5
%12 = load i8*, i8** %6
%13 = load i32, i32* %7
%14 = call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %10, i8* %11, i8* %12, i32 %13)
%15 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [62 x i8] c"Assertion failed: (%s), in function: %s, file: %s, line: %d.\0A\00"
define void @__assert(i8* %0, i8* %1, i32 %2, i8* %3) {
%5 = load i32, i32* @stderr
%6 = tail call i32 @fprintf(i32 %5, i8* getelementptr inbounds ([62 x i8], [62 x i8]* @.str, i64 0, i64 0), i8* %3, i8* %0, i8* %1, i32 %2)
%7 = tail call i32 (...) @abort()
unreachable
}
void soru_1() {}


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

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

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

LLVM IR (-O2):
define void @soru_1() {
ret void
}
/* Type definitions */
struct wl_proxy {
  int dummy;
};
struct wl_data_source {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ wl_proxy_destroy(struct wl_proxy *);
int /*<<< orphan*/ wl_proxy_marshal(struct wl_proxy *, int);
void wl_data_source_destroy(struct wl_data_source *wl_data_source) {
  wl_proxy_marshal((struct wl_proxy *)wl_data_source, 1);
  wl_proxy_destroy((struct wl_proxy *)wl_data_source);
}


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

x86 assembly (clang, -O2):
<wl_data_source_destroy>:
push   %rbx
mov    %rdi,%rbx
mov    $0x1,%esi
call   1040 <wl_proxy_marshal@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <wl_proxy_destroy@plt>

LLVM IR (-O0):
%struct.wl_data_source = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_data_source_destroy(%struct.wl_data_source* %0) {
%2 = alloca %struct.wl_data_source*
store %struct.wl_data_source* %0, %struct.wl_data_source** %2
%3 = load %struct.wl_data_source*, %struct.wl_data_source** %2
%4 = bitcast %struct.wl_data_source* %3 to %struct.wl_proxy*
%5 = call i32 @wl_proxy_marshal(%struct.wl_proxy* %4, i32 1)
%6 = load %struct.wl_data_source*, %struct.wl_data_source** %2
%7 = bitcast %struct.wl_data_source* %6 to %struct.wl_proxy*
%8 = call i32 @wl_proxy_destroy(%struct.wl_proxy* %7)
ret void
}

LLVM IR (-O2):
%struct.wl_data_source = type { i32 }
%struct.wl_proxy = type { i32 }
define void @wl_data_source_destroy(%struct.wl_data_source* %0) {
%2 = bitcast %struct.wl_data_source* %0 to %struct.wl_proxy*
%3 = tail call i32 @wl_proxy_marshal(%struct.wl_proxy* %2, i32 1)
%4 = tail call i32 @wl_proxy_destroy(%struct.wl_proxy* %2)
ret void
}
/* Variables and functions */
void *calloc(size_t, size_t);
void *calloc_and_null_check(size_t nmemb, size_t size) {
  void *tmp = calloc(nmemb, size);
  if (!tmp) {
    ;
  }
  return tmp;
}


x86 assembly (clang, -O0):
<calloc_and_null_check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <calloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1141 <calloc_and_null_check+0x31>
jmp    1141 <calloc_and_null_check+0x31>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<calloc_and_null_check>:
jmp    1030 <calloc@plt>

LLVM IR (-O0):
define i8* @calloc_and_null_check(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 = call i8* @calloc(i64 %6, i64 %7)
store i8* %8, i8** %5
%9 = load i8*, i8** %5
%10 = icmp ne i8* %9, null
br i1 %10, label %12, label %11
11: ; preds = %2
br label %12
12: ; preds = %11, %2
%13 = load i8*, i8** %5
ret i8* %13
}

LLVM IR (-O2):
define noalias i8* @calloc_and_null_check(i64 %0, i64 %1) {
%3 = tail call i8* @calloc(i64 %0, i64 %1)
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ ccw_load_display(char *);
int /*<<< orphan*/ sprintf(char *, char *, unsigned long);
void progress_print_disp(unsigned long addr) {
  char msg[24];
  if (addr % (1024 * 1024 * 16) != 0)
    return;
  sprintf(msg, "%08u", addr >> 20);
  ccw_load_display(msg);
}


x86 assembly (clang, -O0):
<progress_print_disp>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
and    $0xffffff,%rax
cmp    $0x0,%rax
je     1145 <progress_print_disp+0x25>
jmp    1166 <progress_print_disp+0x46>
lea    -0x20(%rbp),%rdi
mov    -0x8(%rbp),%rdx
shr    $0x14,%rdx
lea    0xea8(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x20(%rbp),%rdi
call   1030 <ccw_load_display@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<progress_print_disp>:
mov    %rdi,%rdx
test   $0xffffff,%edx
je     112c <progress_print_disp+0xc>
ret
push   %rbx
sub    $0x20,%rsp
shr    $0x14,%rdx
lea    0xec4(%rip),%rsi
mov    %rsp,%rbx
mov    %rbx,%rdi
call   1040 <sprintf@plt>
mov    %rbx,%rdi
call   1030 <ccw_load_display@plt>
add    $0x20,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [5 x i8] c"%08u\00"
define void @progress_print_disp(i64 %0) {
%2 = alloca i64
%3 = alloca [24 x i8]
store i64 %0, i64* %2
%4 = load i64, i64* %2
%5 = urem i64 %4, 16777216
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
br label %15
8: ; preds = %1
%9 = getelementptr inbounds [24 x i8], [24 x i8]* %3, i64 0, i64 0
%10 = load i64, i64* %2
%11 = lshr i64 %10, 20
%12 = call i32 @sprintf(i8* %9, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %11)
%13 = getelementptr inbounds [24 x i8], [24 x i8]* %3, i64 0, i64 0
%14 = call i32 @ccw_load_display(i8* %13)
br label %15
15: ; preds = %8, %7
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%08u\00"
define void @progress_print_disp(i64 %0) {
%2 = alloca [24 x i8]
%3 = getelementptr inbounds [24 x i8], [24 x i8]* %2, i64 0, i64 0
%4 = and i64 %0, 16777215
%5 = icmp eq i64 %4, 0
br i1 %5, label %6, label %10
6: ; preds = %1
%7 = lshr i64 %0, 20
%8 = call i32 @sprintf(i8* %3, i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i64 %7)
%9 = call i32 @ccw_load_display(i8* %3)
br label %10
10: ; preds = %1, %6
ret void
}
/* Type definitions */
struct FindjoB {
  int dummy;
};

/* Variables and functions */
int Findjob_set_prop_filter(struct FindjoB *, int, int /*<<< orphan*/,
                            int /*<<< orphan*/);
int Findjob_set_prune(struct FindjoB *o, int flag) {
  int ret;
  ret = Findjob_set_prop_filter(o, 12, 0, 0);
  return (ret);
}


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

x86 assembly (clang, -O2):
<Findjob_set_prune>:
mov    $0xc,%esi
xor    %edx,%edx
xor    %ecx,%ecx
jmp    1030 <Findjob_set_prop_filter@plt>

LLVM IR (-O0):
%struct.FindjoB = type { i32 }
define i32 @Findjob_set_prune(%struct.FindjoB* %0, i32 %1) {
%3 = alloca %struct.FindjoB*
%4 = alloca i32
%5 = alloca i32
store %struct.FindjoB* %0, %struct.FindjoB** %3
store i32 %1, i32* %4
%6 = load %struct.FindjoB*, %struct.FindjoB** %3
%7 = call i32 @Findjob_set_prop_filter(%struct.FindjoB* %6, i32 12, i32 0, i32 0)
store i32 %7, i32* %5
%8 = load i32, i32* %5
ret i32 %8
}

LLVM IR (-O2):
%struct.FindjoB = type { i32 }
define i32 @Findjob_set_prune(%struct.FindjoB* %0, i32 %1) {
%3 = tail call i32 @Findjob_set_prop_filter(%struct.FindjoB* %0, i32 12, i32 0, i32 0)
ret i32 %3
}
int param_get_int(char *buffer, struct kernel_param *kp) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.kernel_param = type opaque
define i32 @param_get_int(i8* nocapture readnone %0, %struct.kernel_param* nocapture readnone %1) {
ret i32 0
}
int oz_SetWindowSize(int Width, int Height) {
  return oz_Unimplemented(__FUNCTION__);
}


x86 assembly (clang, -O0):
<oz_SetWindowSize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0xedb(%rip),%rdi
mov    $0x0,%al
call   1030 <oz_Unimplemented@plt>
add    $0x10,%rsp
pop    %rbp
ret

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

LLVM IR (-O0):
@__FUNCTION__.oz_SetWindowSize = [17 x i8] c"oz_SetWindowSize\00"
define i32 @oz_SetWindowSize(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 (i8*, ...) bitcast (i32 (...)* @oz_Unimplemented to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.oz_SetWindowSize, i64 0, i64 0))
ret i32 %5
}

LLVM IR (-O2):
@__FUNCTION__.oz_SetWindowSize = [17 x i8] c"oz_SetWindowSize\00"
define i32 @oz_SetWindowSize(i32 %0, i32 %1) {
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @oz_Unimplemented to i32 (i8*, ...)*)(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @__FUNCTION__.oz_SetWindowSize, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ VirtualizeTimerC__0__Timer__stop(unsigned int);
void DeferredPowerManagerP__0__TimerMilli__stop(void) {
  VirtualizeTimerC__0__Timer__stop(3U);
}


x86 assembly (clang, -O0):
<DeferredPowerManagerP__0__TimerMilli__stop>:
push   %rbp
mov    %rsp,%rbp
mov    $0x3,%edi
call   1030 <VirtualizeTimerC__0__Timer__stop@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<DeferredPowerManagerP__0__TimerMilli__stop>:
mov    $0x3,%edi
jmp    1030 <VirtualizeTimerC__0__Timer__stop@plt>

LLVM IR (-O0):
define void @DeferredPowerManagerP__0__TimerMilli__stop() {
%1 = call i32 @VirtualizeTimerC__0__Timer__stop(i32 3)
ret void
}

LLVM IR (-O2):
define void @DeferredPowerManagerP__0__TimerMilli__stop() {
%1 = tail call i32 @VirtualizeTimerC__0__Timer__stop(i32 3)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ write(int, char *, int);
void __attribute__((destructor)) fini(void) { write(1, "7", 1); }


x86 assembly (clang, -O0):
<fini>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edx
lea    0xee0(%rip),%rsi
mov    %edx,%edi
call   1030 <write@plt>
pop    %rbp
ret

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

LLVM IR (-O0):
@.str = [2 x i8] c"7\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @fini, i8* null }]
define void @fini() {
%1 = call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"7\00"
@llvm.global_dtors = appending global [1 x { i32, void ()*, i8* }] [{ i32, void ()*, i8* } { i32 65535, void ()* @fini, i8* null }]
define void @fini() {
%1 = tail call i32 @write(i32 1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1)
ret void
}
void muxdebug(const char *format, ...) {}


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

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

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

LLVM IR (-O2):
define void @muxdebug(i8* nocapture %0, ...) {
ret void
}
/* Variables and functions */
int flash_image(void *, unsigned int, char *);
int flash_testos(void *data, unsigned sz) {
  return flash_image(data, sz, "testos");
}


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

x86 assembly (clang, -O2):
<flash_testos>:
lea    0xee9(%rip),%rdx
jmp    1030 <flash_image@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"testos\00"
define i32 @flash_testos(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 @flash_image(i8* %5, i32 %6, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %7
}

LLVM IR (-O2):
@.str = [7 x i8] c"testos\00"
define i32 @flash_testos(i8* %0, i32 %1) {
%3 = tail call i32 @flash_image(i8* %0, i32 %1, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0))
ret i32 %3
}
/* Variables and functions */
scalar_t__ alien_pointer();
int /*<<< orphan*/ box_float(float);
void primitive_alien_float(void) { box_float(*(float *)alien_pointer()); }


x86 assembly (clang, -O0):
<primitive_alien_float>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <alien_pointer@plt>
movss  (%rax),%xmm0
call   1040 <box_float@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<primitive_alien_float>:
push   %rax
xor    %eax,%eax
call   1030 <alien_pointer@plt>
movss  (%rax),%xmm0
pop    %rax
jmp    1040 <box_float@plt>

LLVM IR (-O0):
define void @primitive_alien_float() {
%1 = call i64 (...) @alien_pointer()
%2 = inttoptr i64 %1 to float*
%3 = load float, float* %2
%4 = call i32 @box_float(float %3)
ret void
}

LLVM IR (-O2):
define void @primitive_alien_float() {
%1 = tail call i64 (...) @alien_pointer()
%2 = inttoptr i64 %1 to float*
%3 = load float, float* %2
%4 = tail call i32 @box_float(float %3)
ret void
}
/* Variables and functions */
int coco_remove_directory_no_msc(char const *);
int coco_remove_directory(const char *path) {
  return coco_remove_directory_no_msc(path);
}


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

x86 assembly (clang, -O2):
<coco_remove_directory>:
jmp    1030 <coco_remove_directory_no_msc@plt>

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

LLVM IR (-O2):
define i32 @coco_remove_directory(i8* %0) {
%2 = tail call i32 @coco_remove_directory_no_msc(i8* %0)
ret i32 %2
}
char *hash_plugin_detailed(void) {
  return ("osx-ml - OSX Mountain Lion plugin\n"
          "------------------------\n"
          "Use this module to crack OSX Mountain Lion passwords\n"
          "Input should be a plist file\n"
          "Known software that uses this password hashing method:\n"
          "OSX Mountain Lion\n"
          "\nAuthor: Milen Rangelov <gat3way@gat3way.eu>\n");
}


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

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

LLVM IR (-O0):
@.str = [260 x i8] c"osx-ml - OSX Mountain Lion plugin\0A------------------------\0AUse this module to crack OSX Mountain Lion passwords\0AInput should be a plist file\0AKnown software that uses this password hashing method:\0AOSX Mountain Lion\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([260 x i8], [260 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [260 x i8] c"osx-ml - OSX Mountain Lion plugin\0A------------------------\0AUse this module to crack OSX Mountain Lion passwords\0AInput should be a plist file\0AKnown software that uses this password hashing method:\0AOSX Mountain Lion\0A\0AAuthor: Milen Rangelov <gat3way@gat3way.eu>\0A\00"
define i8* @hash_plugin_detailed() {
ret i8* getelementptr inbounds ([260 x i8], [260 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int ksft_exit_pass();
int /*<<< orphan*/ ksft_print_header();
int /*<<< orphan*/ ksft_set_plan(int);
int /*<<< orphan*/ test_pidfd_send_signal_exited_fail();
int /*<<< orphan*/ test_pidfd_send_signal_recycled_pid_fail();
int /*<<< orphan*/ test_pidfd_send_signal_simple_success();
int /*<<< orphan*/ test_pidfd_send_signal_syscall_support();
int main(int argc, char **argv) {
  ksft_print_header();
  ksft_set_plan(4);
  test_pidfd_send_signal_syscall_support();
  test_pidfd_send_signal_simple_success();
  test_pidfd_send_signal_exited_fail();
  test_pidfd_send_signal_recycled_pid_fail();
  return ksft_exit_pass();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x0,%al
call   1090 <ksft_print_header@plt>
mov    $0x4,%edi
call   1030 <ksft_set_plan@plt>
mov    $0x0,%al
call   1070 <test_pidfd_send_signal_syscall_support@plt>
mov    $0x0,%al
call   1080 <test_pidfd_send_signal_simple_success@plt>
mov    $0x0,%al
call   1060 <test_pidfd_send_signal_exited_fail@plt>
mov    $0x0,%al
call   1050 <test_pidfd_send_signal_recycled_pid_fail@plt>
mov    $0x0,%al
call   1040 <ksft_exit_pass@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1090 <ksft_print_header@plt>
mov    $0x4,%edi
call   1030 <ksft_set_plan@plt>
xor    %eax,%eax
call   1070 <test_pidfd_send_signal_syscall_support@plt>
xor    %eax,%eax
call   1080 <test_pidfd_send_signal_simple_success@plt>
xor    %eax,%eax
call   1060 <test_pidfd_send_signal_exited_fail@plt>
xor    %eax,%eax
call   1050 <test_pidfd_send_signal_recycled_pid_fail@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <ksft_exit_pass@plt>

LLVM IR (-O0):
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 = call i32 (...) @ksft_print_header()
%7 = call i32 @ksft_set_plan(i32 4)
%8 = call i32 (...) @test_pidfd_send_signal_syscall_support()
%9 = call i32 (...) @test_pidfd_send_signal_simple_success()
%10 = call i32 (...) @test_pidfd_send_signal_exited_fail()
%11 = call i32 (...) @test_pidfd_send_signal_recycled_pid_fail()
%12 = call i32 (...) @ksft_exit_pass()
ret i32 %12
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 (...) @ksft_print_header()
%4 = tail call i32 @ksft_set_plan(i32 4)
%5 = tail call i32 (...) @test_pidfd_send_signal_syscall_support()
%6 = tail call i32 (...) @test_pidfd_send_signal_simple_success()
%7 = tail call i32 (...) @test_pidfd_send_signal_exited_fail()
%8 = tail call i32 (...) @test_pidfd_send_signal_recycled_pid_fail()
%9 = tail call i32 (...) @ksft_exit_pass()
ret i32 %9
}
/* Type definitions */
typedef int uint8_t;
typedef int uint64_t;

/* Variables and functions */
uint64_t tsaf_get_pcr(const uint8_t *p_ts) {
  return ((uint64_t)p_ts[6] << 25) | (p_ts[7] << 17) | (p_ts[8] << 9) |
         (p_ts[9] << 1) | (p_ts[10] >> 7);
}


x86 assembly (clang, -O0):
<tsaf_get_pcr>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
shl    $0x19,%eax
mov    -0x8(%rbp),%rcx
mov    0x1c(%rcx),%ecx
shl    $0x11,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x20(%rcx),%ecx
shl    $0x9,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x24(%rcx),%ecx
shl    $0x1,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%rcx
mov    0x28(%rcx),%ecx
sar    $0x7,%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<tsaf_get_pcr>:
mov    0x18(%rdi),%eax
mov    0x1c(%rdi),%ecx
shl    $0x19,%eax
shl    $0x11,%ecx
or     %eax,%ecx
mov    0x20(%rdi),%eax
shl    $0x9,%eax
mov    0x24(%rdi),%edx
add    %edx,%edx
or     %eax,%edx
or     %ecx,%edx
mov    0x28(%rdi),%eax
sar    $0x7,%eax
or     %edx,%eax
ret

LLVM IR (-O0):
define i32 @tsaf_get_pcr(i32* %0) {
%2 = alloca i32*
store i32* %0, i32** %2
%3 = load i32*, i32** %2
%4 = getelementptr inbounds i32, i32* %3, i64 6
%5 = load i32, i32* %4
%6 = shl i32 %5, 25
%7 = load i32*, i32** %2
%8 = getelementptr inbounds i32, i32* %7, i64 7
%9 = load i32, i32* %8
%10 = shl i32 %9, 17
%11 = or i32 %6, %10
%12 = load i32*, i32** %2
%13 = getelementptr inbounds i32, i32* %12, i64 8
%14 = load i32, i32* %13
%15 = shl i32 %14, 9
%16 = or i32 %11, %15
%17 = load i32*, i32** %2
%18 = getelementptr inbounds i32, i32* %17, i64 9
%19 = load i32, i32* %18
%20 = shl i32 %19, 1
%21 = or i32 %16, %20
%22 = load i32*, i32** %2
%23 = getelementptr inbounds i32, i32* %22, i64 10
%24 = load i32, i32* %23
%25 = ashr i32 %24, 7
%26 = or i32 %21, %25
ret i32 %26
}

LLVM IR (-O2):
define i32 @tsaf_get_pcr(i32* nocapture %0) {
%2 = getelementptr inbounds i32, i32* %0, i64 6
%3 = load i32, i32* %2
%4 = shl i32 %3, 25
%5 = getelementptr inbounds i32, i32* %0, i64 7
%6 = load i32, i32* %5
%7 = shl i32 %6, 17
%8 = or i32 %7, %4
%9 = getelementptr inbounds i32, i32* %0, i64 8
%10 = load i32, i32* %9
%11 = shl i32 %10, 9
%12 = or i32 %8, %11
%13 = getelementptr inbounds i32, i32* %0, i64 9
%14 = load i32, i32* %13
%15 = shl i32 %14, 1
%16 = or i32 %12, %15
%17 = getelementptr inbounds i32, i32* %0, i64 10
%18 = load i32, i32* %17
%19 = ashr i32 %18, 7
%20 = or i32 %16, %19
ret i32 %20
}
int din_index(int n1, int n2) { return (n1 * 5) + n2; }


x86 assembly (clang, -O0):
<din_index>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
imul   $0x5,-0x4(%rbp),%eax
add    -0x8(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<din_index>:
lea    (%rdi,%rdi,4),%eax
add    %esi,%eax
ret

LLVM IR (-O0):
define i32 @din_index(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 = mul nsw i32 %5, 5
%7 = load i32, i32* %4
%8 = add nsw i32 %6, %7
ret i32 %8
}

LLVM IR (-O2):
define i32 @din_index(i32 %0, i32 %1) {
%3 = mul nsw i32 %0, 5
%4 = add nsw i32 %3, %1
ret i32 %4
}
int __vsnprintf__is_print(int c, int allow_space) {
  if ((c <= '"' || c == '`' || c == '\\') && !(allow_space && c == ' ')) {
    return 0;
  } else {
    return 1;
  }
}


x86 assembly (clang, -O0):
<__vsnprintf__is_print>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
cmpl   $0x22,-0x8(%rbp)
jle    1128 <__vsnprintf__is_print+0x28>
cmpl   $0x60,-0x8(%rbp)
je     1128 <__vsnprintf__is_print+0x28>
cmpl   $0x5c,-0x8(%rbp)
jne    1148 <__vsnprintf__is_print+0x48>
cmpl   $0x0,-0xc(%rbp)
je     113c <__vsnprintf__is_print+0x3c>
cmpl   $0x20,-0x8(%rbp)
je     1148 <__vsnprintf__is_print+0x48>
movl   $0x0,-0x4(%rbp)
jmp    114f <__vsnprintf__is_print+0x4f>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__vsnprintf__is_print>:
cmp    $0x23,%edi
jge    1116 <__vsnprintf__is_print+0x16>
test   %esi,%esi
setne  %cl
cmp    $0x20,%edi
sete   %al
and    %cl,%al
movzbl %al,%eax
ret
add    $0xffffffa4,%edi
test   $0xfffffffb,%edi
setne  %al
movzbl %al,%eax
ret

LLVM IR (-O0):
define i32 @__vsnprintf__is_print(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
%6 = load i32, i32* %4
%7 = icmp sle i32 %6, 34
br i1 %7, label %14, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp eq i32 %9, 96
br i1 %10, label %14, label %11
11: ; preds = %8
%12 = load i32, i32* %4
%13 = icmp eq i32 %12, 92
br i1 %13, label %14, label %21
14: ; preds = %11, %8, %2
%15 = load i32, i32* %5
%16 = icmp ne i32 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %14
%18 = load i32, i32* %4
%19 = icmp eq i32 %18, 32
br i1 %19, label %21, label %20
20: ; preds = %17, %14
store i32 0, i32* %3
br label %22
21: ; preds = %17, %11
store i32 1, i32* %3
br label %22
22: ; preds = %21, %20
%23 = load i32, i32* %3
ret i32 %23
}

LLVM IR (-O2):
define i32 @__vsnprintf__is_print(i32 %0, i32 %1) {
%3 = icmp slt i32 %0, 35
br i1 %3, label %8, label %4
4: ; preds = %2
%5 = icmp ne i32 %0, 96
%6 = icmp ne i32 %0, 92
%7 = and i1 %5, %6
br label %12
8: ; preds = %2
%9 = icmp ne i32 %1, 0
%10 = icmp eq i32 %0, 32
%11 = and i1 %10, %9
br label %12
12: ; preds = %8, %4
%13 = phi i1 [ %7, %4 ], [ %11, %8 ]
%14 = zext i1 %13 to i32
ret i32 %14
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int h(int a) {
  printf("h 0: a = %d\n", a);
  a = 4;
  printf("h 1: a = %d\n", a);
}


x86 assembly (clang, -O0):
<h>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xedb(%rip),%rdi
call   1030 <printf@plt>
movl   $0x4,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xed2(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<h>:
push   %rax
mov    %edi,%esi
lea    0xee6(%rip),%rdi
call   1030 <printf@plt>
lea    0xee7(%rip),%rdi
mov    $0x4,%esi
pop    %rax
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [13 x i8] c"h 0: a = %d\0A\00"
@.str.1 = [13 x i8] c"h 1: a = %d\0A\00"
define i32 @h(i32 %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %0)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i32 4)
ret i32 undef
}
/* Type definitions */
struct curl_hash {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ Curl_cfree(struct curl_hash *);
int /*<<< orphan*/ Curl_hash_clean(struct curl_hash *);
void Curl_hash_destroy(struct curl_hash *h) {
  if (!h)
    return;
  Curl_hash_clean(h);
  Curl_cfree(h);
}


x86 assembly (clang, -O0):
<Curl_hash_destroy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
jne    113c <Curl_hash_destroy+0x1c>
jmp    114e <Curl_hash_destroy+0x2e>
mov    -0x8(%rbp),%rdi
call   1030 <Curl_hash_clean@plt>
mov    -0x8(%rbp),%rdi
call   1040 <Curl_cfree@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Curl_hash_destroy>:
test   %rdi,%rdi
je     1137 <Curl_hash_destroy+0x17>
push   %rbx
mov    %rdi,%rbx
call   1030 <Curl_hash_clean@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <Curl_cfree@plt>
ret

LLVM IR (-O0):
%struct.curl_hash = type { i32 }
define void @Curl_hash_destroy(%struct.curl_hash* %0) {
%2 = alloca %struct.curl_hash*
store %struct.curl_hash* %0, %struct.curl_hash** %2
%3 = load %struct.curl_hash*, %struct.curl_hash** %2
%4 = icmp ne %struct.curl_hash* %3, null
br i1 %4, label %6, label %5
5: ; preds = %1
br label %11
6: ; preds = %1
%7 = load %struct.curl_hash*, %struct.curl_hash** %2
%8 = call i32 @Curl_hash_clean(%struct.curl_hash* %7)
%9 = load %struct.curl_hash*, %struct.curl_hash** %2
%10 = call i32 @Curl_cfree(%struct.curl_hash* %9)
br label %11
11: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
%struct.curl_hash = type { i32 }
define void @Curl_hash_destroy(%struct.curl_hash* %0) {
%2 = icmp eq %struct.curl_hash* %0, null
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = tail call i32 @Curl_hash_clean(%struct.curl_hash* %0)
%5 = tail call i32 @Curl_cfree(%struct.curl_hash* %0)
br label %6
6: ; preds = %1, %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_117() {
  Assert_real((isqrt(117) == 10),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/stdlib/isqrt.c",
              590, ("Integer square root of 117 should be 10"));
}


x86 assembly (clang, -O0):
<t_sqrt_117>:
push   %rbp
mov    %rsp,%rbp
mov    $0x75,%edi
call   1030 <isqrt@plt>
cmp    $0xa,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xec0(%rip),%rsi
mov    $0x24e,%edx
lea    0xf56(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_sqrt_117>:
push   %rax
mov    $0x75,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xa,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x24e,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 117 should be 10\00"
define void @t_sqrt_117() {
%1 = call i32 @isqrt(i32 117)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [162 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/stdlib/isqrt.c\00"
@.str.1 = [40 x i8] c"Integer square root of 117 should be 10\00"
define void @t_sqrt_117() {
%1 = tail call i32 @isqrt(i32 117)
%2 = icmp eq i32 %1, 10
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([162 x i8], [162 x i8]* @.str, i64 0, i64 0), i32 590, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
int strcmp(char const *, char const *);
int condexpr_wrapper(const char *a, const char *b) {
  return (a < b) ? strcmp(a, b) : strcmp(b, a);
}


x86 assembly (clang, -O0):
<condexpr_wrapper>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
jae    1143 <condexpr_wrapper+0x33>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x14(%rbp)
jmp    1153 <condexpr_wrapper+0x43>
mov    -0x10(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcmp@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<condexpr_wrapper>:
mov    %rdi,%rax
cmp    %rsi,%rdi
jae    1120 <condexpr_wrapper+0x10>
mov    %rax,%rdi
jmp    1030 <strcmp@plt>
mov    %rsi,%rdi
mov    %rax,%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @condexpr_wrapper(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 = icmp ult i8* %5, %6
br i1 %7, label %8, label %12
8: ; preds = %2
%9 = load i8*, i8** %3
%10 = load i8*, i8** %4
%11 = call i32 @strcmp(i8* %9, i8* %10)
br label %16
12: ; preds = %2
%13 = load i8*, i8** %4
%14 = load i8*, i8** %3
%15 = call i32 @strcmp(i8* %13, i8* %14)
br label %16
16: ; preds = %12, %8
%17 = phi i32 [ %11, %8 ], [ %15, %12 ]
ret i32 %17
}

LLVM IR (-O2):
define i32 @condexpr_wrapper(i8* %0, i8* %1) {
%3 = icmp ult i8* %0, %1
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* %1)
br label %8
6: ; preds = %2
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %1, i8* dereferenceable(1) %0)
br label %8
8: ; preds = %6, %4
%9 = phi i32 [ %5, %4 ], [ %7, %6 ]
ret i32 %9
}