xunge/DecIR huggingface dataset:
void fle(int *y) {
  char x;
  asm(""
      : "=@cc"
        "le"(x));
  if (!x)
    *y = 0;
}


x86 assembly (clang, -O0):
<fle>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
setle  %al
mov    %al,-0x9(%rbp)
cmpb   $0x0,-0x9(%rbp)
jne    1122 <fle+0x22>
mov    -0x8(%rbp),%rax
movl   $0x0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fle>:
jg     1103 <fle+0x3>
ret
movl   $0x0,(%rdi)
ret

LLVM IR (-O0):
define void @fle(i32* %0) {
%2 = alloca i32*
%3 = alloca i8
store i32* %0, i32** %2
%4 = call i8 asm "", "={@ccle},~{dirflag},~{fpsr},~{flags}"()
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = icmp ne i8 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = load i32*, i32** %2
store i32 0, i32* %8
br label %9
9: ; preds = %7, %1
ret void
}

LLVM IR (-O2):
define void @fle(i32* nocapture writeonly %0) {
%2 = tail call i8 asm "", "={@ccle},~{dirflag},~{fpsr},~{flags}"()
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %5
4: ; preds = %1
store i32 0, i32* %0
br label %5
5: ; preds = %4, %1
ret void
}
/* Variables and functions */
int /*<<< orphan*/ pushNarray(char *, unsigned int);
void pushcomplex32array(char *x, int n) {
  pushNarray((char *)x, (unsigned int)(n * 32));
}


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

x86 assembly (clang, -O2):
<pushcomplex32array>:
shl    $0x5,%esi
jmp    1030 <pushNarray@plt>

LLVM IR (-O0):
define void @pushcomplex32array(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 = mul nsw i32 %6, 32
%8 = call i32 @pushNarray(i8* %5, i32 %7)
ret void
}

LLVM IR (-O2):
define void @pushcomplex32array(i8* %0, i32 %1) {
%3 = shl nsw i32 %1, 5
%4 = tail call i32 @pushNarray(i8* %0, i32 %3)
ret void
}
/* Variables and functions */
int ack(int, int);
int /*<<< orphan*/ test_assert(int);
int main() { test_assert(ack(1, 2) == 4); }


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <ack@plt>
cmp    $0x4,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1040 <test_assert@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x1,%edi
mov    $0x2,%esi
call   1030 <ack@plt>
xor    %edi,%edi
cmp    $0x4,%eax
sete   %dil
call   1040 <test_assert@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = call i32 @ack(i32 1, i32 2)
%2 = icmp eq i32 %1, 4
%3 = zext i1 %2 to i32
%4 = call i32 @test_assert(i32 %3)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @ack(i32 1, i32 2)
%2 = icmp eq i32 %1, 4
%3 = zext i1 %2 to i32
%4 = tail call i32 @test_assert(i32 %3)
ret i32 0
}
void irq_handler_dummy(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @irq_handler_dummy() {
br label %1
1: ; preds = %0, %1
br label %1
}
void ASN1_STRING_TABLE_cleanup(void) {}


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

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

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

LLVM IR (-O2):
define void @ASN1_STRING_TABLE_cleanup() {
ret void
}
int main() { return 1 && 0; }


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_CINF;

/* Variables and functions */
scalar_t__ ASN1_item_new(int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_CINF_it;
X509_CINF *X509_CINF_new(void) {
  return (X509_CINF *)ASN1_item_new(&X509_CINF_it);
}


x86 assembly (clang, -O0):
<X509_CINF_new>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rdi
call   1030 <ASN1_item_new@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<X509_CINF_new>:
mov    0x2ed1(%rip),%rdi
jmp    1030 <ASN1_item_new@plt>

LLVM IR (-O0):
@X509_CINF_it = global i32 0
define i32* @X509_CINF_new() {
%1 = call i64 @ASN1_item_new(i32* @X509_CINF_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}

LLVM IR (-O2):
@X509_CINF_it = global i32 0
define i32* @X509_CINF_new() {
%1 = tail call i64 @ASN1_item_new(i32* @X509_CINF_it)
%2 = inttoptr i64 %1 to i32*
ret i32* %2
}
void fa19(void) {
P0A:
  goto P0A;
  ({
    p01A:
      goto p01A;
      goto a;
    P01A:
      goto P01A;
      ({
        P012A:
          goto P012A;
          0;
      });
    P01B:
      goto P01B;
      ({
        P013A:
          goto P013A;
          0;
      });
    a:
      0;
  });
P0B:
  goto P0B;
  ({
    P02A:
      goto P02A;
      ({
        P024A:
          goto P024A;
          0;
      });
    P02B:
      goto P02B;
      ({
        P025A:
          goto P025A;
          0;
      });
    P02C:
      goto P02C;
      0;
  });
P0C:
  goto P0C;
  0;
P0D:
  goto P0D;
}


x86 assembly (clang, -O0):
<fa19>:
push   %rbp
mov    %rsp,%rbp
jmp    1104 <fa19+0x4>

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

LLVM IR (-O0):
define void @fa19() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
br label %7
7: ; preds = %7, %0
br label %7
8: ; No predecessors!
br label %9
9: ; preds = %9, %8
br label %9
10: ; preds = %10
br label %10
11: ; No predecessors!
br label %12
12: ; preds = %12, %11
br label %12
13: ; preds = %13
br label %13
14: ; No predecessors!
br label %15
15: ; preds = %15, %14
br label %15
16: ; preds = %16
br label %16
17: ; No predecessors!
br label %18
18: ; preds = %18, %17
br label %18
19: ; No predecessors!
br label %20
20: ; preds = %20, %19
br label %20
21: ; preds = %21
br label %21
22: ; No predecessors!
br label %23
23: ; preds = %23, %22
br label %23
24: ; preds = %24
br label %24
25: ; preds = %25
br label %25
26: ; preds = %26
br label %26
}

LLVM IR (-O2):
define void @fa19() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ mode_t;

/* Variables and functions */
int s_ischr(mode_t mode) { return -1; }


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

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

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

LLVM IR (-O2):
define i32 @s_ischr(i32 %0) {
ret i32 -1
}
/* Variables and functions */
int /*<<< orphan*/ ERR_get_state();
int /*<<< orphan*/ OPENSSL_INIT_LOAD_CRYPTO_STRINGS;
int /*<<< orphan*/ OPENSSL_init_crypto(int /*<<< orphan*/,
                                       int /*<<< orphan*/ *);
int FuzzerInitialize(int *argc, char ***argv) {
  OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL);
  ERR_get_state();
  return 1;
}


x86 assembly (clang, -O0):
<FuzzerInitialize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb1(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1040 <OPENSSL_init_crypto@plt>
mov    $0x0,%al
call   1030 <ERR_get_state@plt>
mov    $0x1,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<FuzzerInitialize>:
push   %rax
mov    0x2ec0(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
call   1040 <OPENSSL_init_crypto@plt>
xor    %eax,%eax
call   1030 <ERR_get_state@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@OPENSSL_INIT_LOAD_CRYPTO_STRINGS = global i32 0
define i32 @FuzzerInitialize(i32* %0, i8*** %1) {
%3 = alloca i32*
%4 = alloca i8***
store i32* %0, i32** %3
store i8*** %1, i8**** %4
%5 = load i32, i32* @OPENSSL_INIT_LOAD_CRYPTO_STRINGS
%6 = call i32 @OPENSSL_init_crypto(i32 %5, i32* null)
%7 = call i32 (...) @ERR_get_state()
ret i32 1
}

LLVM IR (-O2):
@OPENSSL_INIT_LOAD_CRYPTO_STRINGS = global i32 0
define i32 @FuzzerInitialize(i32* nocapture readnone %0, i8*** nocapture readnone %1) {
%3 = load i32, i32* @OPENSSL_INIT_LOAD_CRYPTO_STRINGS
%4 = tail call i32 @OPENSSL_init_crypto(i32 %3, i32* null)
%5 = tail call i32 (...) @ERR_get_state()
ret i32 1
}
unsigned long long gg(unsigned long long a) { return a | 0x100001000ull; }


x86 assembly (clang, -O0):
<gg>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movabs $0x100001000,%rax
or     -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<gg>:
movabs $0x100001000,%rax
or     %rdi,%rax
ret

LLVM IR (-O0):
define i64 @gg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = or i64 %3, 4294971392
ret i64 %4
}

LLVM IR (-O2):
define i64 @gg(i64 %0) {
%2 = or i64 %0, 4294971392
ret i64 %2
}
/* Type definitions */
typedef double int32_t;

/* Variables and functions */
double fabsk(double);
double mla(double, double, double);
__attribute__((always_)) const double ptrunc(double x) {
  double fr = mla(-(double)(1LL << 31), (int32_t)(x * (1.0 / (1LL << 31))), x);
  return fabsk(x) >= (double)(1LL << 52) ? x : (x - (fr - (int32_t)fr));
}


x86 assembly (clang, -O0):
<ptrunc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  0xedb(%rip),%xmm1
mulsd  -0x8(%rbp),%xmm1
movsd  -0x8(%rbp),%xmm2
movsd  0xec1(%rip),%xmm0
call   1040 <mla@plt>
movsd  %xmm0,-0x10(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1030 <fabsk@plt>
movsd  0xe9d(%rip),%xmm1
ucomisd %xmm1,%xmm0
jb     117c <ptrunc+0x5c>
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x18(%rbp)
jmp    1194 <ptrunc+0x74>
movsd  -0x8(%rbp),%xmm0
movsd  -0x10(%rbp),%xmm1
subsd  -0x10(%rbp),%xmm1
subsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptrunc>:
sub    $0x28,%rsp
movapd %xmm0,%xmm2
movsd  %xmm0,0x8(%rsp)
movsd  0xeca(%rip),%xmm1
mulsd  %xmm0,%xmm1
movsd  0xec6(%rip),%xmm0
call   1040 <mla@plt>
movaps %xmm0,0x10(%rsp)
movsd  0x8(%rsp),%xmm0
call   1030 <fabsk@plt>
movapd 0x10(%rsp),%xmm2
subsd  %xmm2,%xmm2
movsd  0xea7(%rip),%xmm1
cmpnlesd %xmm0,%xmm1
andpd  %xmm2,%xmm1
movsd  0x8(%rsp),%xmm0
subsd  %xmm1,%xmm0
add    $0x28,%rsp
ret

LLVM IR (-O0):
define double @ptrunc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = fmul double %4, 0x3E00000000000000
%6 = load double, double* %2
%7 = call double @mla(double 0xC1E0000000000000, double %5, double %6)
store double %7, double* %3
%8 = load double, double* %2
%9 = call double @fabsk(double %8)
%10 = fcmp oge double %9, 0x4330000000000000
br i1 %10, label %11, label %13
11: ; preds = %1
%12 = load double, double* %2
br label %19
13: ; preds = %1
%14 = load double, double* %2
%15 = load double, double* %3
%16 = load double, double* %3
%17 = fsub double %15, %16
%18 = fsub double %14, %17
br label %19
19: ; preds = %13, %11
%20 = phi double [ %12, %11 ], [ %18, %13 ]
ret double %20
}

LLVM IR (-O2):
define double @ptrunc(double %0) {
%2 = fmul double %0, 0x3E00000000000000
%3 = tail call double @mla(double 0xC1E0000000000000, double %2, double %0)
%4 = tail call double @fabsk(double %0)
%5 = fcmp ult double %4, 0x4330000000000000
%6 = fsub double %3, %3
%7 = select i1 %5, double %6, double 0.000000e+00
%8 = fsub double %0, %7
ret double %8
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void C() { printf("upper C();\n"); }


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

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

LLVM IR (-O0):
@.str = [12 x i8] c"upper C();\0A\00"
define void @C() {
%1 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [11 x i8] c"upper C();\00"
define void @C() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @str, i64 0, i64 0))
ret void
}
void test_non_identifiers() {
  int i, x;
#pragma omp parallel for;
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel for private(x);
  for (i = 0; i < 16; ++i)
    ;
#pragma omp parallel for, private(x);
  for (i = 0; i < 16; ++i)
    ;
}


x86 assembly (clang, -O0):
<test_non_identifiers>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1128 <test_non_identifiers+0x28>
jmp    111a <test_non_identifiers+0x1a>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <test_non_identifiers+0xb>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    114c <test_non_identifiers+0x4c>
jmp    113e <test_non_identifiers+0x3e>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_non_identifiers+0x2f>
movl   $0x0,-0x4(%rbp)
cmpl   $0x10,-0x4(%rbp)
jge    1170 <test_non_identifiers+0x70>
jmp    1162 <test_non_identifiers+0x62>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    1153 <test_non_identifiers+0x53>
pop    %rbp
ret

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

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

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


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

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

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

LLVM IR (-O2):
define i32 @execute_prctl() {
ret i32 0
}
double SFMMPHToMPC(double mph) {
  return (mph * (1609.347 / 3600.0 * (double)(1000 * 1000) / 1000000.0));
}


x86 assembly (clang, -O0):
<SFMMPHToMPC>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  0xeef(%rip),%xmm0
mulsd  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<SFMMPHToMPC>:
mulsd  0xef8(%rip),%xmm0
ret

LLVM IR (-O0):
define double @SFMMPHToMPC(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = fmul double %3, 0x3FDC9C5127C92B10
ret double %4
}

LLVM IR (-O2):
define double @SFMMPHToMPC(double %0) {
%2 = fmul double %0, 0x3FDC9C5127C92B10
ret double %2
}
void haversine(double *distance, double *radius, double lat1, double long1,
               double lat2, double long2) {}


x86 assembly (clang, -O0):
<haversine>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movsd  %xmm0,-0x18(%rbp)
movsd  %xmm1,-0x20(%rbp)
movsd  %xmm2,-0x28(%rbp)
movsd  %xmm3,-0x30(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @haversine(double* %0, double* %1, double %2, double %3, double %4, double %5) {
%7 = alloca double*
%8 = alloca double*
%9 = alloca double
%10 = alloca double
%11 = alloca double
%12 = alloca double
store double* %0, double** %7
store double* %1, double** %8
store double %2, double* %9
store double %3, double* %10
store double %4, double* %11
store double %5, double* %12
ret void
}

LLVM IR (-O2):
define void @haversine(double* nocapture %0, double* nocapture %1, double %2, double %3, double %4, double %5) {
ret void
}
/* Variables and functions */
void Default_GPIOTE0_IRQHandler(void) {
  while (1)
    ;
}


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

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

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

LLVM IR (-O2):
define void @Default_GPIOTE0_IRQHandler() {
br label %1
1: ; preds = %0, %1
br label %1
}
void gc_deinit(void) {}


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

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

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

LLVM IR (-O2):
define void @gc_deinit() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ls_vmemdump_ex(void const *const, size_t const, int, int,
                                  char const *const);
void ls_vmemdump(const void *const restrict ptr, const size_t size,
                 const char *const restrict str) {
  ls_vmemdump_ex(ptr, size, 16, 1, str);
}


x86 assembly (clang, -O0):
<ls_vmemdump>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%r8
mov    $0x10,%edx
mov    $0x1,%ecx
call   1030 <ls_vmemdump_ex@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ls_vmemdump>:
mov    %rdx,%r8
mov    $0x10,%edx
mov    $0x1,%ecx
jmp    1030 <ls_vmemdump_ex@plt>

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

LLVM IR (-O2):
define void @ls_vmemdump(i8* noalias %0, i64 %1, i8* noalias %2) {
%4 = tail call i32 @ls_vmemdump_ex(i8* %0, i64 %1, i32 16, i32 1, i8* %2)
ret void
}
void m2f(double *in, double *out) { *out = *in * 3.2808; }


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

x86 assembly (clang, -O2):
<m2f>:
movsd  (%rdi),%xmm0
mulsd  0xef4(%rip),%xmm0
movsd  %xmm0,(%rsi)
ret

LLVM IR (-O0):
define void @m2f(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* %5
%7 = fmul double %6, 3.280800e+00
%8 = load double*, double** %4
store double %7, double* %8
ret void
}

LLVM IR (-O2):
define void @m2f(double* nocapture %0, double* nocapture writeonly %1) {
%3 = load double, double* %0
%4 = fmul double %3, 3.280800e+00
store double %4, double* %1
ret void
}
void ff_hevc_put_hevc_bi_epel_h24_10_avx2() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_epel_h24_10_avx2() {
ret void
}
/* Variables and functions */
int _ada_use_c2phc(int, int *, int *, double *);
int celcon_number_of_points_in_cell(int i, int r, int *length) {
  int fail;
  double *c;
  fail = _ada_use_c2phc(88, &i, length, c);
  return fail;
}


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

x86 assembly (clang, -O2):
<celcon_number_of_points_in_cell>:
push   %rax
mov    %edi,0x4(%rsp)
lea    0x4(%rsp),%rsi
mov    $0x58,%edi
call   1030 <_ada_use_c2phc@plt>
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @celcon_number_of_points_in_cell(i32 %0, i32 %1, i32* %2) {
%4 = alloca i32
store i32 %0, i32* %4
%5 = call i32 @_ada_use_c2phc(i32 88, i32* %4, i32* %2, double* undef)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ bar(int);
int /*<<< orphan*/ printf(char *);
void foo(int i) {
  printf("foo\n");
  bar(i);
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
call   1030 <bar@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
push   %rbx
mov    %edi,%ebx
lea    0xed6(%rip),%rdi
call   1030 <puts@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <bar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"foo\0A\00"
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
%5 = call i32 @bar(i32 %4)
ret void
}

LLVM IR (-O2):
@str = [4 x i8] c"foo\00"
define void @foo(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @str, i64 0, i64 0))
%3 = tail call i32 @bar(i32 %0)
ret void
}
/* Type definitions */
typedef unsigned long uint32_t;

/* Variables and functions */
int /*<<< orphan*/ usDelay(unsigned long);
__attribute__((always_)) void msDelay(uint32_t ms) { usDelay(ms * 1000UL); }


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

x86 assembly (clang, -O2):
<msDelay>:
imul   $0x3e8,%rdi,%rdi
jmp    1030 <usDelay@plt>

LLVM IR (-O0):
define void @msDelay(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = mul i64 %3, 1000
%5 = call i32 @usDelay(i64 %4)
ret void
}

LLVM IR (-O2):
define void @msDelay(i64 %0) {
%2 = mul i64 %0, 1000
%3 = tail call i32 @usDelay(i64 %2)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ SIGKILL;
int /*<<< orphan*/ kill(int, int /*<<< orphan*/);
int main() {
  kill(7, SIGKILL);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eba(%rip),%rax
mov    (%rax),%esi
mov    $0x7,%edi
call   1030 <kill@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2ec8(%rip),%rax
mov    (%rax),%esi
mov    $0x7,%edi
call   1030 <kill@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@SIGKILL = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @SIGKILL
%3 = call i32 @kill(i32 7, i32 %2)
ret i32 0
}

LLVM IR (-O2):
@SIGKILL = global i32 0
define i32 @main() {
%1 = load i32, i32* @SIGKILL
%2 = tail call i32 @kill(i32 7, i32 %1)
ret i32 0
}
void ff_hevc_put_hevc_bi_pel_pixels16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_bi_pel_pixels16_12_sse4() {
ret void
}
int rtl839x_dma_rx_base(int i) { return (0x780c) + (i << 2); }


x86 assembly (clang, -O0):
<rtl839x_dma_rx_base>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
shl    $0x2,%eax
add    $0x780c,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<rtl839x_dma_rx_base>:
lea    0x780c(,%rdi,4),%eax
ret

LLVM IR (-O0):
define i32 @rtl839x_dma_rx_base(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = shl i32 %3, 2
%5 = add nsw i32 30732, %4
ret i32 %5
}

LLVM IR (-O2):
define i32 @rtl839x_dma_rx_base(i32 %0) {
%2 = shl i32 %0, 2
%3 = add nsw i32 %2, 30732
ret i32 %3
}
/* Variables and functions */
int /*<<< orphan*/ send_and_get(char *, char *);
int main(int argc, char **argv) {
  send_and_get(argv[1], argv[2]);
  return 0;
}


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    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rsi
call   1030 <send_and_get@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x8(%rsi),%rdi
mov    0x10(%rsi),%rsi
call   1030 <send_and_get@plt>
xor    %eax,%eax
pop    %rcx
ret

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 = load i8**, i8*** %5
%7 = getelementptr inbounds i8*, i8** %6, i64 1
%8 = load i8*, i8** %7
%9 = load i8**, i8*** %5
%10 = getelementptr inbounds i8*, i8** %9, i64 2
%11 = load i8*, i8** %10
%12 = call i32 @send_and_get(i8* %8, i8* %11)
ret i32 0
}

LLVM IR (-O2):
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = getelementptr inbounds i8*, i8** %1, i64 2
%6 = load i8*, i8** %5
%7 = tail call i32 @send_and_get(i8* %4, i8* %6)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ int16_t;

/* Variables and functions */
size_t fmt_s32_dfp(char *, int /*<<< orphan*/, int);
size_t fmt_s16_dfp(char *out, int16_t val, int fp_digits) {
  return fmt_s32_dfp(out, val, fp_digits);
}


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

x86 assembly (clang, -O2):
<fmt_s16_dfp>:
jmp    1030 <fmt_s32_dfp@plt>

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

LLVM IR (-O2):
define i64 @fmt_s16_dfp(i8* %0, i32 %1, i32 %2) {
%4 = tail call i64 @fmt_s32_dfp(i8* %0, i32 %1, i32 %2)
ret i64 %4
}
int getBirdFlag(int pos) { return ((1 << pos)); }


x86 assembly (clang, -O0):
<getBirdFlag>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%ecx
mov    $0x1,%eax
shl    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<getBirdFlag>:
mov    %edi,%ecx
mov    $0x1,%eax
shl    %cl,%eax
ret

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

LLVM IR (-O2):
define i32 @getBirdFlag(i32 %0) {
%2 = shl nuw i32 1, %0
ret i32 %2
}
void genbc1t_test() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @INT_Excep_TMR0_CMI0A() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
void usage() {
  fprintf(stderr, "Usage:  jfs_checklog <volumename>\n");
  exit(1);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
mov    0x2eb5(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1030 <fprintf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: jfs_checklog <volumename>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [35 x i8] c"Usage: jfs_checklog <volumename>\0A\00"
define void @usage() {
%1 = load i32, i32* @stderr
%2 = tail call i32 @fprintf(i32 %1, i8* getelementptr inbounds ([35 x i8], [35 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 @exit(i32 1)
unreachable
}
void pv_remote_init(void) {}


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

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

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

LLVM IR (-O2):
define void @pv_remote_init() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
int isqrt(int);
void t_sqrt_228() {
  Assert_real((isqrt(228) == 15),
              "/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",
              1145, ("Integer square root of 228 should be 15"));
}


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

x86 assembly (clang, -O2):
<t_sqrt_228>:
push   %rax
mov    $0xe4,%edi
call   1030 <isqrt@plt>
xor    %edi,%edi
cmp    $0xf,%eax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf60(%rip),%rcx
mov    $0x479,%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 228 should be 15\00"
define void @t_sqrt_228() {
%1 = call i32 @isqrt(i32 228)
%2 = icmp eq i32 %1, 15
%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 1145, 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 228 should be 15\00"
define void @t_sqrt_228() {
%1 = tail call i32 @isqrt(i32 228)
%2 = icmp eq i32 %1, 15
%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 1145, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.1, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ gsm_hex2int(char *, int);
char *pdu_get_tpoa_length(char *body, char *oa_length) {
  char *pBegin, *pEnd;
  pBegin = body;
  pEnd = pBegin + 2;
  *oa_length = (char)gsm_hex2int(pBegin, 2);
  return pEnd;
}


x86 assembly (clang, -O0):
<pdu_get_tpoa_length>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
mov    $0x2,%esi
call   1030 <gsm_hex2int@plt>
mov    %al,%cl
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x20(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pdu_get_tpoa_length>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
lea    0x2(%rdi),%rbx
mov    $0x2,%esi
call   1030 <gsm_hex2int@plt>
mov    %al,(%r14)
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i8* @pdu_get_tpoa_length(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
store i8* %7, i8** %5
%8 = load i8*, i8** %5
%9 = getelementptr inbounds i8, i8* %8, i64 2
store i8* %9, i8** %6
%10 = load i8*, i8** %5
%11 = call i64 @gsm_hex2int(i8* %10, i32 2)
%12 = trunc i64 %11 to i8
%13 = load i8*, i8** %4
store i8 %12, i8* %13
%14 = load i8*, i8** %6
ret i8* %14
}

LLVM IR (-O2):
define i8* @pdu_get_tpoa_length(i8* %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 2
%4 = tail call i64 @gsm_hex2int(i8* %0, i32 2)
%5 = trunc i64 %4 to i8
store i8 %5, i8* %1
ret i8* %3
}
/* Variables and functions */
int /*<<< orphan*/ bitwise_expr_stub();
int /*<<< orphan*/ relational_expr();
void bitwise_expr() {
  relational_expr();
  bitwise_expr_stub();
}


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

x86 assembly (clang, -O2):
<bitwise_expr>:
push   %rax
xor    %eax,%eax
call   1040 <relational_expr@plt>
xor    %eax,%eax
pop    %rcx
jmp    1030 <bitwise_expr_stub@plt>

LLVM IR (-O0):
define void @bitwise_expr() {
%1 = call i32 (...) @relational_expr()
%2 = call i32 (...) @bitwise_expr_stub()
ret void
}

LLVM IR (-O2):
define void @bitwise_expr() {
%1 = tail call i32 (...) @relational_expr()
%2 = tail call i32 (...) @bitwise_expr_stub()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *,
                           unsigned int, char const *, char const *, long);
int /*<<< orphan*/ stderr;
void bugon_trace(const char *assertion, const char *filename, const char *func,
                 unsigned line, long val) {
  if (!val)
    return;
  fprintf(stderr, "%s:%u: %s: BUG_ON `%s` triggered, value %ld\n", filename,
          line, func, assertion, val);
  abort();
  exit(1);
}


x86 assembly (clang, -O0):
<bugon_trace>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    %r8,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    114c <bugon_trace+0x2c>
add    $0x30,%rsp
pop    %rbp
ret
mov    0x2e8d(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8
mov    -0x8(%rbp),%r9
mov    -0x28(%rbp),%rax
lea    0xe91(%rip),%rsi
mov    %rax,(%rsp)
call   1040 <fprintf@plt>
mov    $0x0,%al
call   1030 <abort@plt>

x86 assembly (clang, -O2):
<bugon_trace>:
test   %r8,%r8
jne    1126 <bugon_trace+0x6>
ret
push   %rax
mov    %rdx,%rax
mov    %rsi,%rdx
mov    %rdi,%r9
mov    0x2ea9(%rip),%rsi
mov    (%rsi),%edi
mov    %r8,(%rsp)
lea    0xebc(%rip),%rsi
mov    %rax,%r8
call   1040 <fprintf@plt>
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [45 x i8] c"%s:%u: %s: BUG_ON `%s` triggered, value %ld\0A\00"
define void @bugon_trace(i8* %0, i8* %1, i8* %2, i32 %3, i64 %4) {
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i32
%10 = alloca i64
store i8* %0, i8** %6
store i8* %1, i8** %7
store i8* %2, i8** %8
store i32 %3, i32* %9
store i64 %4, i64* %10
%11 = load i64, i64* %10
%12 = icmp ne i64 %11, 0
br i1 %12, label %14, label %13
13: ; preds = %5
ret void
14: ; preds = %5
%15 = load i32, i32* @stderr
%16 = load i8*, i8** %7
%17 = load i32, i32* %9
%18 = load i8*, i8** %8
%19 = load i8*, i8** %6
%20 = load i64, i64* %10
%21 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %16, i32 %17, i8* %18, i8* %19, i64 %20)
%22 = call i32 (...) @abort()
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [45 x i8] c"%s:%u: %s: BUG_ON `%s` triggered, value %ld\0A\00"
define void @bugon_trace(i8* %0, i8* %1, i8* %2, i32 %3, i64 %4) {
%6 = icmp eq i64 %4, 0
br i1 %6, label %7, label %8
7: ; preds = %5
ret void
8: ; preds = %5
%9 = load i32, i32* @stderr
%10 = tail call i32 @fprintf(i32 %9, i8* getelementptr inbounds ([45 x i8], [45 x i8]* @.str, i64 0, i64 0), i8* %1, i32 %3, i8* %2, i8* %0, i64 %4)
%11 = tail call i32 (...) @abort()
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int help_shell(int argc, char **argv) {
  printf("\n\033[1m! [command [args]]\033[0m\n"
         " Invoke an OS command with the 'args' as its arguments\n");
  return 1;
}


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

x86 assembly (clang, -O2):
<help_shell>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [84 x i8] c"\0A\1B[1m! [command [args]]\1B[0m\0A Invoke an OS command with the 'args' as its arguments\0A\00"
define i32 @help_shell(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = call i32 @printf(i8* getelementptr inbounds ([84 x i8], [84 x i8]* @.str, i64 0, i64 0))
ret i32 1
}

LLVM IR (-O2):
@str = [83 x i8] c"\0A\1B[1m! [command [args]]\1B[0m\0A Invoke an OS command with the 'args' as its arguments\00"
define i32 @help_shell(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([83 x i8], [83 x i8]* @str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int /*<<< orphan*/ int80(int, char *, char *, char *, int /*<<< orphan*/,
                         int /*<<< orphan*/, int /*<<< orphan*/);
char getYear() {
  char y;
  char mo;
  char d;
  int80(7, &d, &mo, &y, 0, 0, 0);
  return y;
}


x86 assembly (clang, -O0):
<getYear>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x7,%edi
lea    -0x3(%rbp),%rsi
lea    -0x2(%rbp),%rdx
lea    -0x1(%rbp),%rcx
xor    %r9d,%r9d
mov    %r9d,%r8d
movl   $0x0,(%rsp)
call   1030 <int80@plt>
movsbl -0x1(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getYear>:
sub    $0x18,%rsp
movl   $0x0,(%rsp)
lea    0x16(%rsp),%rsi
lea    0x17(%rsp),%rdx
lea    0x15(%rsp),%rcx
mov    $0x7,%edi
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <int80@plt>
mov    0x15(%rsp),%al
add    $0x18,%rsp
ret

LLVM IR (-O0):
define signext i8 @getYear() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 @int80(i32 7, i8* %3, i8* %2, i8* %1, i32 0, i32 0, i32 0)
%5 = load i8, i8* %1
ret i8 %5
}

LLVM IR (-O2):
define signext i8 @getYear() {
%1 = alloca i8
%2 = alloca i8
%3 = alloca i8
%4 = call i32 @int80(i32 7, i8* %3, i8* %2, i8* %1, i32 0, i32 0, i32 0)
%5 = load i8, i8* %1
ret i8 %5
}
int *___errno_location() {
  static int _errorno = 0;
  return &_errorno;
}


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

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

LLVM IR (-O0):
@___errno_location._errorno = internal global i32 0
define i32* @___errno_location() {
ret i32* @___errno_location._errorno
}

LLVM IR (-O2):
@___errno_location._errorno = internal global i32 0
define i32* @___errno_location() {
ret i32* @___errno_location._errorno
}
/* Variables and functions */
int /*<<< orphan*/ bnd_unbind(char *);
int /*<<< orphan*/ build_command_key(char *, char *);
int /*<<< orphan*/ memset(char *, char, int);
void irc_unbind_command(char *command) {
  char key[50];
  memset(key, '\0', 50);
  build_command_key(key, command);
  bnd_unbind(key);
}


x86 assembly (clang, -O0):
<irc_unbind_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1030 <memset@plt>
lea    -0x40(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1050 <build_command_key@plt>
lea    -0x40(%rbp),%rdi
call   1040 <bnd_unbind@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_unbind_command>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
xor    %esi,%esi
mov    $0x32,%edx
call   1030 <memset@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <build_command_key@plt>
mov    %r14,%rdi
call   1040 <bnd_unbind@plt>
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @irc_unbind_command(i8* %0) {
%2 = alloca i8*
%3 = alloca [50 x i8]
store i8* %0, i8** %2
%4 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%5 = call i32 @memset(i8* %4, i8 signext 0, i32 50)
%6 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%7 = load i8*, i8** %2
%8 = call i32 @build_command_key(i8* %6, i8* %7)
%9 = getelementptr inbounds [50 x i8], [50 x i8]* %3, i64 0, i64 0
%10 = call i32 @bnd_unbind(i8* %9)
ret void
}

LLVM IR (-O2):
define void @irc_unbind_command(i8* %0) {
%2 = alloca [50 x i8]
%3 = getelementptr inbounds [50 x i8], [50 x i8]* %2, i64 0, i64 0
%4 = call i32 @memset(i8* %3, i8 signext 0, i32 50)
%5 = call i32 @build_command_key(i8* %3, i8* %0)
%6 = call i32 @bnd_unbind(i8* %3)
ret void
}
int main() {
  unsigned __int128 res;
  res = foo(3, 4);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
xor    %eax,%eax
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <foo@plt>
movslq %eax,%rcx
mov    %rcx,%rax
sar    $0x3f,%rax
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x18(%rbp)
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    $0x3,%edi
mov    $0x4,%esi
xor    %eax,%eax
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i128
store i32 0, i32* %1
%3 = call i32 (i32, i32, ...) bitcast (i32 (...)* @foo to i32 (i32, i32, ...)*)(i32 3, i32 4)
%4 = sext i32 %3 to i128
store i128 %4, i128* %2
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @foo to i32 (i32, i32, ...)*)(i32 3, i32 4)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ scanf(char *, int *);
int main() {
  int x;
  scanf("%x", &x);
  printf("%x ---- %d\n", x, x);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeca(%rip),%rdi
lea    -0x8(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x8(%rbp),%esi
mov    -0x8(%rbp),%edx
lea    0xeb7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0x4(%rsp),%rsi
call   1040 <scanf@plt>
mov    0x4(%rsp),%edx
lea    0xec6(%rip),%rdi
mov    %edx,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [3 x i8] c"%x\00"
@.str.1 = [12 x i8] c"%x ---- %d\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32* %1)
%4 = load i32, i32* %1
%5 = call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %4)
ret i32 0
}
float max(float a, float b) {
  if (a >= b) {
    return a;
  }
  return b;
}


x86 assembly (clang, -O0):
<max>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x8(%rbp)
movss  %xmm1,-0xc(%rbp)
movss  -0x8(%rbp),%xmm0
ucomiss -0xc(%rbp),%xmm0
jb     112c <max+0x2c>
movss  -0x8(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
jmp    1136 <max+0x36>
movss  -0xc(%rbp),%xmm0
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<max>:
movaps %xmm1,%xmm2
cmpless %xmm0,%xmm2
andps  %xmm2,%xmm0
andnps %xmm1,%xmm2
orps   %xmm2,%xmm0
ret

LLVM IR (-O0):
define float @max(float %0, float %1) {
%3 = alloca float
%4 = alloca float
%5 = alloca float
store float %0, float* %4
store float %1, float* %5
%6 = load float, float* %4
%7 = load float, float* %5
%8 = fcmp oge float %6, %7
br i1 %8, label %9, label %11
9: ; preds = %2
%10 = load float, float* %4
store float %10, float* %3
br label %13
11: ; preds = %2
%12 = load float, float* %5
store float %12, float* %3
br label %13
13: ; preds = %11, %9
%14 = load float, float* %3
ret float %14
}

LLVM IR (-O2):
define float @max(float %0, float %1) {
%3 = fcmp oge float %0, %1
%4 = select i1 %3, float %0, float %1
ret float %4
}
/* Variables and functions */
scalar_t__ isprint(char);
int /*<<< orphan*/ snprintf(char *, size_t, char *, unsigned char);
char *format_printable(char *buf, size_t size, char ch) {
  if (isprint(ch)) {
    snprintf(buf, size, "\"%c\"", ch);
  } else {
    snprintf(buf, size, "0x%02x", (unsigned char)ch);
  }
  return buf;
}


x86 assembly (clang, -O0):
<format_printable>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
movsbl -0x11(%rbp),%edi
call   1040 <isprint@plt>
cmp    $0x0,%rax
je     1165 <format_printable+0x45>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xea9(%rip),%rdx
movzbl -0x11(%rbp),%ecx
call   1030 <snprintf@plt>
jmp    117d <format_printable+0x5d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
lea    0xe91(%rip),%rdx
movzbl -0x11(%rbp),%ecx
call   1030 <snprintf@plt>
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<format_printable>:
push   %r15
push   %r14
push   %rbx
mov    %edx,%ebx
mov    %rsi,%r14
mov    %rdi,%r15
mov    %edx,%edi
call   1040 <isprint@plt>
test   %rax,%rax
lea    0xec7(%rip),%rax
lea    0xebb(%rip),%rdx
cmove  %rax,%rdx
movzbl %bl,%ecx
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <snprintf@plt>
mov    %r15,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [5 x i8] c"\22%c\22\00"
@.str.1 = [7 x i8] c"0x%02x\00"
define i8* @format_printable(i8* %0, i64 %1, i8 signext %2) {
%4 = alloca i8*
%5 = alloca i64
%6 = alloca i8
store i8* %0, i8** %4
store i64 %1, i64* %5
store i8 %2, i8* %6
%7 = load i8, i8* %6
%8 = call i64 @isprint(i8 signext %7)
%9 = icmp ne i64 %8, 0
br i1 %9, label %10, label %15
10: ; preds = %3
%11 = load i8*, i8** %4
%12 = load i64, i64* %5
%13 = load i8, i8* %6
%14 = call i32 @snprintf(i8* %11, i64 %12, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8 zeroext %13)
br label %20
15: ; preds = %3
%16 = load i8*, i8** %4
%17 = load i64, i64* %5
%18 = load i8, i8* %6
%19 = call i32 @snprintf(i8* %16, i64 %17, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8 zeroext %18)
br label %20
20: ; preds = %15, %10
%21 = load i8*, i8** %4
ret i8* %21
}

LLVM IR (-O2):
@.str = [5 x i8] c"\22%c\22\00"
@.str.1 = [7 x i8] c"0x%02x\00"
define i8* @format_printable(i8* returned %0, i64 %1, i8 signext %2) {
%4 = tail call i64 @isprint(i8 signext %2)
%5 = icmp eq i64 %4, 0
%6 = select i1 %5, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0)
%7 = tail call i32 @snprintf(i8* %0, i64 %1, i8* %6, i8 zeroext %2)
ret i8* %0
}