xunge/DecIR huggingface dataset:
int test_imm_1Eint8_reg(signed char val) {
  return ((val) & (-0x1E << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_1Eint8_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%edx
and    $0xffffffe2,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_1Eint8_reg(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = and i32 %4, -30
%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_1Eint8_reg(i8 signext %0) {
%2 = and i8 %0, -30
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
char *dfi_vmcoreinfo_get();
void *nt_init(void *, int /*<<< orphan*/, char *, int /*<<< orphan*/, char *);
int /*<<< orphan*/ strlen(char *);
void *nt_vmcoreinfo(void *ptr) {
  char *vmcoreinfo = dfi_vmcoreinfo_get();
  if (!vmcoreinfo)
    return ptr;
  return nt_init(ptr, 0, vmcoreinfo, strlen(vmcoreinfo), "VMCOREINFO");
}


x86 assembly (clang, -O0):
<nt_vmcoreinfo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    $0x0,%al
call   1050 <dfi_vmcoreinfo_get@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    115f <nt_vmcoreinfo+0x2f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x8(%rbp)
jmp    1194 <nt_vmcoreinfo+0x64>
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rdx
mov    %eax,%ecx
xor    %esi,%esi
lea    0xe75(%rip),%r8
call   1040 <nt_init@plt>
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<nt_vmcoreinfo>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
xor    %eax,%eax
call   1050 <dfi_vmcoreinfo_get@plt>
test   %rax,%rax
je     116b <nt_vmcoreinfo+0x3b>
mov    %rax,%rbx
mov    %rax,%rdi
call   1030 <strlen@plt>
lea    0xeab(%rip),%r8
mov    %r14,%rdi
xor    %esi,%esi
mov    %rbx,%rdx
mov    %eax,%ecx
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <nt_init@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [11 x i8] c"VMCOREINFO\00"
define i8* @nt_vmcoreinfo(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
%5 = call i8* (...) @dfi_vmcoreinfo_get()
store i8* %5, i8** %4
%6 = load i8*, i8** %4
%7 = icmp ne i8* %6, null
br i1 %7, label %10, label %8
8: ; preds = %1
%9 = load i8*, i8** %3
store i8* %9, i8** %2
br label %16
10: ; preds = %1
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = load i8*, i8** %4
%14 = call i32 @strlen(i8* %13)
%15 = call i8* @nt_init(i8* %11, i32 0, i8* %12, i32 %14, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
store i8* %15, i8** %2
br label %16
16: ; preds = %10, %8
%17 = load i8*, i8** %2
ret i8* %17
}

LLVM IR (-O2):
@.str = [11 x i8] c"VMCOREINFO\00"
define i8* @nt_vmcoreinfo(i8* %0) {
%2 = tail call i8* (...) @dfi_vmcoreinfo_get()
%3 = icmp eq i8* %2, null
br i1 %3, label %7, label %4
4: ; preds = %1
%5 = tail call i32 @strlen(i8* %2)
%6 = tail call i8* @nt_init(i8* %0, i32 0, i8* %2, i32 %5, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
br label %7
7: ; preds = %1, %4
%8 = phi i8* [ %6, %4 ], [ %0, %1 ]
ret i8* %8
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fputs(char *, int /*<<< orphan*/ *);
int make_command_file(char *filename) {
  FILE *fp;
  int i;
  fp = fopen("/tmp/data.tmp", "w+");
  fputs("uname -a;id;touch /tmp/success", fp);
  fclose(fp);
}


x86 assembly (clang, -O0):
<make_command_file>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
lea    0xebd(%rip),%rdi
lea    0xec4(%rip),%rsi
call   1050 <fopen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rsi
lea    0xeb3(%rip),%rdi
call   1040 <fputs@plt>
mov    -0x18(%rbp),%rdi
call   1030 <fclose@plt>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<make_command_file>:
push   %rbx
lea    0xec8(%rip),%rdi
lea    0xecf(%rip),%rsi
call   1040 <fopen@plt>
mov    %rax,%rbx
lea    0xec3(%rip),%rdi
mov    $0x1e,%esi
mov    $0x1,%edx
mov    %rax,%rcx
call   1050 <fwrite@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <fclose@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"/tmp/data.tmp\00"
@.str.1 = [3 x i8] c"w+\00"
@.str.2 = [31 x i8] c"uname -a;id;touch /tmp/success\00"
define i32 @make_command_file(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32*
%5 = alloca i32
store i8* %0, i8** %3
%6 = call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
store i32* %6, i32** %4
%7 = load i32*, i32** %4
%8 = call i32 @fputs(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32* %7)
%9 = load i32*, i32** %4
%10 = call i32 @fclose(i32* %9)
%11 = load i32, i32* %2
ret i32 %11
}

LLVM IR (-O2):
@.str = [14 x i8] c"/tmp/data.tmp\00"
@.str.1 = [3 x i8] c"w+\00"
@.str.2 = [31 x i8] c"uname -a;id;touch /tmp/success\00"
define i32 @make_command_file(i8* nocapture readnone %0) {
%2 = tail call i32* @fopen(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i64 @fwrite(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i64 30, i64 1, i32* %2)
%4 = tail call i32 @fclose(i32* %2)
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main(int argc, char *argv[]) {
  printf("FOO not defined\n");
  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)
lea    0xed3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@str = [16 x i8] c"FOO not defined\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret i32 0
}
float __glsl_normalize_f(float x) { return x; }


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

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

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

LLVM IR (-O2):
define float @__glsl_normalize_f(float returned %0) {
ret float %0
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ pclose(int /*<<< orphan*/ *);
void pclosep(FILE **p) {
  if (*p)
    pclose(*p);
}


x86 assembly (clang, -O0):
<pclosep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
cmpq   $0x0,(%rax)
je     1136 <pclosep+0x26>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <pclose@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pclosep>:
mov    (%rdi),%rdi
test   %rdi,%rdi
je     111d <pclosep+0xd>
jmp    1030 <pclose@plt>
ret

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

LLVM IR (-O2):
define void @pclosep(i32** nocapture %0) {
%2 = load i32*, i32** %0
%3 = icmp eq i32* %2, null
br i1 %3, label %6, label %4
4: ; preds = %1
%5 = tail call i32 @pclose(i32* %2)
br label %6
6: ; preds = %4, %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ X509_VAL;
typedef int /*<<< orphan*/ ASN1_VALUE;

/* Variables and functions */
scalar_t__ ASN1_item_d2i(int /*<<< orphan*/ **, unsigned char const **, long,
                         int /*<<< orphan*/ *);
int /*<<< orphan*/ X509_VAL_it;
X509_VAL *d2i_X509_VAL(X509_VAL **a, const unsigned char **in, long len) {
  return (X509_VAL *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_VAL_it);
}


x86 assembly (clang, -O0):
<d2i_X509_VAL>:
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),%rdx
mov    0x2eb1(%rip),%rcx
call   1030 <ASN1_item_d2i@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<d2i_X509_VAL>:
mov    0x2ed1(%rip),%rcx
jmp    1030 <ASN1_item_d2i@plt>

LLVM IR (-O0):
@X509_VAL_it = global i32 0
define i32* @d2i_X509_VAL(i32** %0, i8** %1, i64 %2) {
%4 = alloca i32**
%5 = alloca i8**
%6 = alloca i64
store i32** %0, i32*** %4
store i8** %1, i8*** %5
store i64 %2, i64* %6
%7 = load i32**, i32*** %4
%8 = load i8**, i8*** %5
%9 = load i64, i64* %6
%10 = call i64 @ASN1_item_d2i(i32** %7, i8** %8, i64 %9, i32* @X509_VAL_it)
%11 = inttoptr i64 %10 to i32*
ret i32* %11
}

LLVM IR (-O2):
@X509_VAL_it = global i32 0
define i32* @d2i_X509_VAL(i32** %0, i8** %1, i64 %2) {
%4 = tail call i64 @ASN1_item_d2i(i32** %0, i8** %1, i64 %2, i32* @X509_VAL_it)
%5 = inttoptr i64 %4 to i32*
ret i32* %5
}
/* Type definitions */
typedef int /*<<< orphan*/ i2d_of_void;
typedef int /*<<< orphan*/ RSA;
typedef int /*<<< orphan*/ BIO;

/* Variables and functions */
int PEM_ASN1_write_bio(int /*<<< orphan*/ *, int /*<<< orphan*/,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *, int /*<<< orphan*/ *,
                       int /*<<< orphan*/, int /*<<< orphan*/ *,
                       int /*<<< orphan*/ *);
int /*<<< orphan*/ PEM_STRING_PUBLIC;
scalar_t__ i2d_RSA_PUBKEY;
int PEM_write_bio_RSA_PUBKEY(BIO *bp, RSA *x) {
  return PEM_ASN1_write_bio((i2d_of_void *)i2d_RSA_PUBKEY, PEM_STRING_PUBLIC,
                            bp, x, NULL, NULL, 0, NULL, NULL);
}


x86 assembly (clang, -O0):
<PEM_write_bio_RSA_PUBKEY>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rax
mov    (%rax),%rdi
mov    0x2eb7(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r9d
xor    %eax,%eax
mov    %r9,%r8
movl   $0x0,(%rsp)
movq   $0x0,0x8(%rsp)
movq   $0x0,0x10(%rsp)
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<PEM_write_bio_RSA_PUBKEY>:
sub    $0x18,%rsp
mov    %rsi,%rcx
mov    %rdi,%rdx
mov    0x2ebf(%rip),%rax
mov    (%rax),%rdi
mov    0x2ebd(%rip),%rax
mov    (%rax),%esi
xorps  %xmm0,%xmm0
movups %xmm0,0x8(%rsp)
movl   $0x0,(%rsp)
xor    %r8d,%r8d
xor    %r9d,%r9d
call   1030 <PEM_ASN1_write_bio@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
@i2d_RSA_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32 @PEM_write_bio_RSA_PUBKEY(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
store i32* %0, i32** %3
store i32* %1, i32** %4
%5 = load i64, i64* @i2d_RSA_PUBKEY
%6 = inttoptr i64 %5 to i32*
%7 = load i32, i32* @PEM_STRING_PUBLIC
%8 = load i32*, i32** %3
%9 = load i32*, i32** %4
%10 = call i32 @PEM_ASN1_write_bio(i32* %6, i32 %7, i32* %8, i32* %9, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %10
}

LLVM IR (-O2):
@i2d_RSA_PUBKEY = global i64 0
@PEM_STRING_PUBLIC = global i32 0
define i32 @PEM_write_bio_RSA_PUBKEY(i32* %0, i32* %1) {
%3 = load i64, i64* @i2d_RSA_PUBKEY
%4 = inttoptr i64 %3 to i32*
%5 = load i32, i32* @PEM_STRING_PUBLIC
%6 = tail call i32 @PEM_ASN1_write_bio(i32* %4, i32 %5, i32* %0, i32* %1, i32* null, i32* null, i32 0, i32* null, i32* null)
ret i32 %6
}
/* Type definitions */
typedef unsigned int uint32_t;
typedef scalar_t__ uint16_t;

/* Variables and functions */
__attribute__((always_)) void mchp_espi_sram_bar_maddr_set(uintptr_t bar_addr,
                                                           uint32_t maddr) {
  *((volatile uint16_t *)(uintptr_t)(bar_addr + 2ul)) = (uint16_t)maddr;
  *((volatile uint16_t *)(uintptr_t)(bar_addr + 4ul)) =
      (uint16_t)(maddr >> 16u);
}


x86 assembly (clang, -O0):
<mchp_espi_sram_bar_maddr_set>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %rcx,0x2(%rax)
mov    -0xc(%rbp),%eax
shr    $0x10,%eax
mov    %eax,%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %rcx,0x4(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<mchp_espi_sram_bar_maddr_set>:
mov    %esi,%eax
mov    %rax,0x2(%rdi)
shr    $0x10,%esi
mov    %rsi,0x4(%rdi)
ret

LLVM IR (-O0):
define void @mchp_espi_sram_bar_maddr_set(i64 %0, i32 %1) {
%3 = alloca i64
%4 = alloca i32
store i64 %0, i64* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = zext i32 %5 to i64
%7 = load i64, i64* %3
%8 = add i64 %7, 2
%9 = inttoptr i64 %8 to i64*
store volatile i64 %6, i64* %9
%10 = load i32, i32* %4
%11 = lshr i32 %10, 16
%12 = zext i32 %11 to i64
%13 = load i64, i64* %3
%14 = add i64 %13, 4
%15 = inttoptr i64 %14 to i64*
store volatile i64 %12, i64* %15
ret void
}

LLVM IR (-O2):
define void @mchp_espi_sram_bar_maddr_set(i64 %0, i32 %1) {
%3 = zext i32 %1 to i64
%4 = add i64 %0, 2
%5 = inttoptr i64 %4 to i64*
store volatile i64 %3, i64* %5
%6 = lshr i32 %1, 16
%7 = zext i32 %6 to i64
%8 = add i64 %0, 4
%9 = inttoptr i64 %8 to i64*
store volatile i64 %7, i64* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fflush(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, double);
int /*<<< orphan*/ stdout;
double putdouble(double x) {
  printf("result: %0.6f", x);
  fflush(stdout);
  return 0;
}


x86 assembly (clang, -O0):
<putdouble>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    0x2e9b(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xorps  %xmm0,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putdouble>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
mov    0x2eac(%rip),%rax
mov    (%rax),%edi
call   1040 <fflush@plt>
xorps  %xmm0,%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [14 x i8] c"result: %0.6f\00"
@stdout = global i32 0
define double @putdouble(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %3)
%5 = load i32, i32* @stdout
%6 = call i32 @fflush(i32 %5)
ret double 0.000000e+00
}

LLVM IR (-O2):
@.str = [14 x i8] c"result: %0.6f\00"
@stdout = global i32 0
define double @putdouble(double %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), double %0)
%3 = load i32, i32* @stdout
%4 = tail call i32 @fflush(i32 %3)
ret double 0.000000e+00
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
int /*<<< orphan*/ sleep(int);
int main() {
  char alpha = 'a';
  while (1) {
    sleep(1);
    if (alpha > 'z')
      alpha = 'a';
    printf("%c\n", alpha);
    alpha++;
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movb   $0x61,-0x5(%rbp)
mov    $0x1,%edi
call   1040 <sleep@plt>
movsbl -0x5(%rbp),%eax
cmp    $0x7a,%eax
jle    114e <main+0x2e>
movb   $0x61,-0x5(%rbp)
lea    0xeab(%rip),%rdi
movsbl -0x5(%rbp),%esi
call   1030 <printf@plt>
mov    -0x5(%rbp),%al
add    $0x1,%al
mov    %al,-0x5(%rbp)
jmp    1133 <main+0x13>

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x61,%bpl
mov    $0x61,%r14d
lea    0xecc(%rip),%rbx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    $0x1,%edi
call   1040 <sleep@plt>
cmp    $0x7b,%bpl
movzbl %bpl,%eax
cmovge %r14d,%eax
movsbl %al,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
call   1030 <printf@plt>
add    $0x1,%bpl
jmp    1140 <main+0x20>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%c\0A\00"
define i32 @main() {
br label %1
1: ; preds = %1, %0
%2 = phi i8 [ 97, %0 ], [ %7, %1 ]
%3 = tail call i32 @sleep(i32 1)
%4 = icmp sgt i8 %2, 122
%5 = select i1 %4, i8 97, i8 %2
%6 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8 signext %5)
%7 = add nsw i8 %5, 1
br label %1
}
/* Type definitions */
typedef int /*<<< orphan*/ sigset_t;

/* Variables and functions */
int sigemptyset(int /*<<< orphan*/ *);
int sigpending(sigset_t *_set) { return sigemptyset(_set); }


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

x86 assembly (clang, -O2):
<sigpending>:
jmp    1030 <sigemptyset@plt>

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

LLVM IR (-O2):
define i32 @sigpending(i32* %0) {
%2 = tail call i32 @sigemptyset(i32* %0)
ret i32 %2
}
void g_strip_context() {}


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

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

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

LLVM IR (-O2):
define void @g_strip_context() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main() {
  int a = 3;
  int *b = &a;
  foo(*b);
#pragma omp taskwait
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x3,-0x4(%rbp)
lea    -0x4(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%edi
call   1030 <foo@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 3)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ BezierCircle(double, char *);
int /*<<< orphan*/ SetTransferMatrix(int, int /*<<< orphan*/,
                                     int /*<<< orphan*/, int, double, double);
void ECirc(double *args) {
  SetTransferMatrix(1, 0, 0, 1, args[0], args[1]);
  BezierCircle(args[2], "S");
}


x86 assembly (clang, -O0):
<ECirc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    $0x1,%ecx
xor    %edx,%edx
mov    %ecx,%edi
mov    %edx,%esi
call   1040 <SetTransferMatrix@plt>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
lea    0xea3(%rip),%rdi
call   1030 <BezierCircle@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ECirc>:
push   %rbx
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
mov    $0x1,%edi
xor    %esi,%esi
xor    %edx,%edx
mov    $0x1,%ecx
call   1040 <SetTransferMatrix@plt>
movsd  0x10(%rbx),%xmm0
lea    0xeb4(%rip),%rdi
pop    %rbx
jmp    1030 <BezierCircle@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"S\00"
define void @ECirc(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
%5 = load double, double* %4
%6 = load double*, double** %2
%7 = getelementptr inbounds double, double* %6, i64 1
%8 = load double, double* %7
%9 = call i32 @SetTransferMatrix(i32 1, i32 0, i32 0, i32 1, double %5, double %8)
%10 = load double*, double** %2
%11 = getelementptr inbounds double, double* %10, i64 2
%12 = load double, double* %11
%13 = call i32 @BezierCircle(double %12, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"S\00"
define void @ECirc(double* nocapture %0) {
%2 = load double, double* %0
%3 = getelementptr inbounds double, double* %0, i64 1
%4 = load double, double* %3
%5 = tail call i32 @SetTransferMatrix(i32 1, i32 0, i32 0, i32 1, double %2, double %4)
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = load double, double* %6
%8 = tail call i32 @BezierCircle(double %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int verify_sgi(int /*<<< orphan*/);
int sgi_gaps(void) { return verify_sgi(0); }


x86 assembly (clang, -O0):
<sgi_gaps>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
call   1030 <verify_sgi@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<sgi_gaps>:
xor    %edi,%edi
jmp    1030 <verify_sgi@plt>

LLVM IR (-O0):
define i32 @sgi_gaps() {
%1 = call i32 @verify_sgi(i32 0)
ret i32 %1
}

LLVM IR (-O2):
define i32 @sgi_gaps() {
%1 = tail call i32 @verify_sgi(i32 0)
ret i32 %1
}
int main() {
  int x;
  int *p;
  int **pp;
  x = 1;
  p = &x;
  pp = &p;
  **pp = 0;
  return x;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
lea    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%rax
movl   $0x0,(%rax)
mov    -0x8(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
size_t get_tag_size(unsigned number) {
  if (number < (1 << 4)) {
    return 1;
  } else if (number < (1 << 11)) {
    return 2;
  } else if (number < (1 << 18)) {
    return 3;
  } else if (number < (1 << 25)) {
    return 4;
  } else {
    return 5;
  }
}


x86 assembly (clang, -O0):
<get_tag_size>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x10,-0xc(%rbp)
jae    111e <get_tag_size+0x1e>
movq   $0x1,-0x8(%rbp)
jmp    1174 <get_tag_size+0x74>
cmpl   $0x800,-0xc(%rbp)
jae    1138 <get_tag_size+0x38>
movq   $0x2,-0x8(%rbp)
jmp    1174 <get_tag_size+0x74>
cmpl   $0x40000,-0xc(%rbp)
jae    1152 <get_tag_size+0x52>
movq   $0x3,-0x8(%rbp)
jmp    1174 <get_tag_size+0x74>
cmpl   $0x2000000,-0xc(%rbp)
jae    116c <get_tag_size+0x6c>
movq   $0x4,-0x8(%rbp)
jmp    1174 <get_tag_size+0x74>
movq   $0x5,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_tag_size>:
mov    $0x1,%eax
cmp    $0x10,%edi
jb     1133 <get_tag_size+0x33>
mov    $0x2,%eax
cmp    $0x800,%edi
jb     1133 <get_tag_size+0x33>
mov    $0x3,%eax
cmp    $0x40000,%edi
jb     1133 <get_tag_size+0x33>
cmp    $0x2000000,%edi
mov    $0x5,%eax
sbb    $0x0,%rax
ret

LLVM IR (-O0):
define i64 @get_tag_size(i32 %0) {
%2 = alloca i64
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ult i32 %4, 16
br i1 %5, label %6, label %7
6: ; preds = %1
store i64 1, i64* %2
br label %20
7: ; preds = %1
%8 = load i32, i32* %3
%9 = icmp ult i32 %8, 2048
br i1 %9, label %10, label %11
10: ; preds = %7
store i64 2, i64* %2
br label %20
11: ; preds = %7
%12 = load i32, i32* %3
%13 = icmp ult i32 %12, 262144
br i1 %13, label %14, label %15
14: ; preds = %11
store i64 3, i64* %2
br label %20
15: ; preds = %11
%16 = load i32, i32* %3
%17 = icmp ult i32 %16, 33554432
br i1 %17, label %18, label %19
18: ; preds = %15
store i64 4, i64* %2
br label %20
19: ; preds = %15
store i64 5, i64* %2
br label %20
20: ; preds = %19, %18, %14, %10, %6
%21 = load i64, i64* %2
ret i64 %21
}

LLVM IR (-O2):
define i64 @get_tag_size(i32 %0) {
%2 = icmp ult i32 %0, 16
br i1 %2, label %10, label %3
3: ; preds = %1
%4 = icmp ult i32 %0, 2048
br i1 %4, label %10, label %5
5: ; preds = %3
%6 = icmp ult i32 %0, 262144
br i1 %6, label %10, label %7
7: ; preds = %5
%8 = icmp ult i32 %0, 33554432
%9 = select i1 %8, i64 4, i64 5
br label %10
10: ; preds = %7, %5, %3, %1
%11 = phi i64 [ 1, %1 ], [ 2, %3 ], [ 3, %5 ], [ %9, %7 ]
ret i64 %11
}
int test_imm_C5int64_lowword_reg(long long val) {
  return ((val) & (0xC5 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_C5int64_lowword_reg(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = and i64 %3, 197
%5 = icmp ne i64 %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_C5int64_lowword_reg(i64 %0) {
%2 = and i64 %0, 197
%3 = icmp eq i64 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void foo668(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo668(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int socket_fastopen(int s) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<socket_fastopen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    0x2eda(%rip),%rax
mov    (%rax),%ecx
mov    0x2ec1(%rip),%rax
mov    %ecx,(%rax)
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<socket_fastopen>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
mov    0x2ec8(%rip),%rcx
mov    %eax,(%rcx)
mov    $0xffffffff,%eax
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @socket_fastopen(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* @ENOSYS
store i32 %3, i32* @errno
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
@errno = global i32 0
define i32 @socket_fastopen(i32 %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
unsigned int arikkei_pointer_equal(const void *l, const void *r) {
  return l == r;
}


x86 assembly (clang, -O0):
<arikkei_pointer_equal>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arikkei_pointer_equal>:
xor    %eax,%eax
cmp    %rsi,%rdi
sete   %al
ret

LLVM IR (-O0):
define i32 @arikkei_pointer_equal(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 eq i8* %5, %6
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
define i32 @arikkei_pointer_equal(i8* readnone %0, i8* readnone %1) {
%3 = icmp eq i8* %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Variables and functions */
unsigned int readw(void *);
unsigned int ioread16(void *addr) { return readw(addr); }


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

x86 assembly (clang, -O2):
<ioread16>:
jmp    1030 <readw@plt>

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

LLVM IR (-O2):
define i32 @ioread16(i8* %0) {
%2 = tail call i32 @readw(i8* %0)
ret i32 %2
}
void gtk_quit_add_full() {}


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

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

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

LLVM IR (-O2):
define void @gtk_quit_add_full() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ termReset();
void cleanup() {
  printf("\e[?25h\e[2J\e[;H");
  termReset();
}


x86 assembly (clang, -O0):
<cleanup>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <termReset@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<cleanup>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
jmp    1040 <termReset@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"\1B[?25h\1B[2J\1B[;H\00"
define void @cleanup() {
%1 = call i32 @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (...) @termReset()
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"\1B[?25h\1B[2J\1B[;H\00"
define void @cleanup() {
%1 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (...) @termReset()
ret void
}
unsigned long mf_sec2ticks(secs, division, tempo)
int division;
unsigned long tempo;
double secs;
{ return (unsigned long)(((secs * 1000.0) / 4.0 * division) / tempo); }


x86 assembly (clang, -O0):
<mf_sec2ticks>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    %edi,-0xc(%rbp)
mov    %rsi,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  0xee3(%rip),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xedf(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsi2sdl -0xc(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movaps 0xee3(%rip),%xmm2
movq   -0x18(%rbp),%xmm1
punpckldq %xmm2,%xmm1
movapd 0xee2(%rip),%xmm2
subpd  %xmm2,%xmm1
movaps %xmm1,%xmm2
unpckhpd %xmm1,%xmm1
addsd  %xmm2,%xmm1
divsd  %xmm1,%xmm0
movaps %xmm0,%xmm1
cvttsd2si %xmm1,%rax
mov    %rax,%rdx
sar    $0x3f,%rdx
movsd  0xe98(%rip),%xmm1
subsd  %xmm1,%xmm0
cvttsd2si %xmm0,%rcx
and    %rdx,%rcx
or     %rcx,%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<mf_sec2ticks>:
mulsd  0xef8(%rip),%xmm0
mulsd  0xef8(%rip),%xmm0
cvtsi2sd %edi,%xmm1
movq   %rsi,%xmm2
punpckldq 0xeff(%rip),%xmm2
mulsd  %xmm0,%xmm1
subpd  0xf03(%rip),%xmm2
movapd %xmm2,%xmm0
unpckhpd %xmm2,%xmm0
addsd  %xmm2,%xmm0
divsd  %xmm0,%xmm1
cvttsd2si %xmm1,%rcx
mov    %rcx,%rdx
sar    $0x3f,%rdx
subsd  0xebf(%rip),%xmm1
cvttsd2si %xmm1,%rax
and    %rdx,%rax
or     %rcx,%rax
ret

LLVM IR (-O0):
define i64 @mf_sec2ticks(double %0, i32 %1, i64 %2) {
%4 = alloca double
%5 = alloca i32
%6 = alloca i64
store double %0, double* %4
store i32 %1, i32* %5
store i64 %2, i64* %6
%7 = load double, double* %4
%8 = fmul double %7, 1.000000e+03
%9 = fdiv double %8, 4.000000e+00
%10 = load i32, i32* %5
%11 = sitofp i32 %10 to double
%12 = fmul double %9, %11
%13 = load i64, i64* %6
%14 = uitofp i64 %13 to double
%15 = fdiv double %12, %14
%16 = fptoui double %15 to i64
ret i64 %16
}

LLVM IR (-O2):
define i64 @mf_sec2ticks(double %0, i32 %1, i64 %2) {
%4 = fmul double %0, 1.000000e+03
%5 = fmul double %4, 2.500000e-01
%6 = sitofp i32 %1 to double
%7 = fmul double %5, %6
%8 = uitofp i64 %2 to double
%9 = fdiv double %7, %8
%10 = fptoui double %9 to i64
ret i64 %10
}
/* Variables and functions */
int write_value_to_fcd(int, unsigned int, unsigned int *);
int fcdppSetFreq(unsigned int nufreq, unsigned int *fcdfreq) {
  return write_value_to_fcd(101, nufreq, fcdfreq);
}


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

x86 assembly (clang, -O2):
<fcdppSetFreq>:
mov    %rsi,%rdx
mov    %edi,%esi
mov    $0x65,%edi
jmp    1030 <write_value_to_fcd@plt>

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

LLVM IR (-O2):
define i32 @fcdppSetFreq(i32 %0, i32* %1) {
%3 = tail call i32 @write_value_to_fcd(i32 101, i32 %0, i32* %1)
ret i32 %3
}
void gtk_tree_model_get() {}


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

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

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

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


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

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

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

LLVM IR (-O2):
define void @assertFalse() {
ret void
}
/* Type definitions */
struct timeval {
  double tv_sec;
  int tv_usec;
};

/* Variables and functions */
int /*<<< orphan*/ gettimeofday(struct timeval *, int /*<<< orphan*/ *);
double gettime(void) {
  struct timeval tv;
  gettimeofday(&tv, NULL);
  return tv.tv_sec + (tv.tv_usec / 1e6);
}


x86 assembly (clang, -O0):
<gettime>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    -0x10(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
call   1030 <gettimeofday@plt>
movsd  -0x10(%rbp),%xmm0
cvtsi2sdl -0x8(%rbp),%xmm1
movsd  0xec9(%rip),%xmm2
divsd  %xmm2,%xmm1
addsd  %xmm1,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gettime>:
sub    $0x18,%rsp
lea    0x8(%rsp),%rdi
xor    %esi,%esi
call   1030 <gettimeofday@plt>
cvtsi2sdl 0x10(%rsp),%xmm0
divsd  0xed2(%rip),%xmm0
addsd  0x8(%rsp),%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
%struct.timeval = type { double, i32 }
define double @gettime() {
%1 = alloca %struct.timeval
%2 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%3 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 0
%4 = load double, double* %3
%5 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i32 0, i32 1
%6 = load i32, i32* %5
%7 = sitofp i32 %6 to double
%8 = fdiv double %7, 1.000000e+06
%9 = fadd double %4, %8
ret double %9
}

LLVM IR (-O2):
%struct.timeval = type { double, i32 }
define double @gettime() {
%1 = alloca %struct.timeval
%2 = bitcast %struct.timeval* %1 to i8*
%3 = call i32 @gettimeofday(%struct.timeval* %1, i32* null)
%4 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 0
%5 = load double, double* %4
%6 = getelementptr inbounds %struct.timeval, %struct.timeval* %1, i64 0, i32 1
%7 = load i32, i32* %6
%8 = sitofp i32 %7 to double
%9 = fdiv double %8, 1.000000e+06
%10 = fadd double %5, %9
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ assert(void *);
void memory_set_byte(void *p_memory, unsigned int idx, unsigned char val) {
  assert(p_memory);
  unsigned char *p_buffer = (unsigned char *)p_memory;
  *(p_buffer + idx) = val;
}


x86 assembly (clang, -O0):
<memory_set_byte>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %dl,%al
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0xd(%rbp),%dl
mov    -0x18(%rbp),%rax
mov    -0xc(%rbp),%ecx
mov    %dl,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<memory_set_byte>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <assert@plt>
mov    %ebp,%eax
mov    %r14b,(%rbx,%rax,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @memory_set_byte(i8* %0, i32 %1, i8 zeroext %2) {
%4 = tail call i32 @assert(i8* %0)
%5 = zext i32 %1 to i64
%6 = getelementptr inbounds i8, i8* %0, i64 %5
store i8 %2, i8* %6
ret void
}
int issafe(ch)
char ch;
{
  if (ch == '%')
    return 0;
  if (ch < 33)
    return 0;
  if (ch > 126)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<issafe>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x5(%rbp)
movsbl -0x5(%rbp),%eax
cmp    $0x25,%eax
jne    1123 <issafe+0x23>
movl   $0x0,-0x4(%rbp)
jmp    115c <issafe+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x21,%eax
jge    113c <issafe+0x3c>
movl   $0x0,-0x4(%rbp)
jmp    115c <issafe+0x5c>
movsbl -0x5(%rbp),%eax
cmp    $0x7e,%eax
jle    1155 <issafe+0x55>
movl   $0x0,-0x4(%rbp)
jmp    115c <issafe+0x5c>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<issafe>:
shl    $0x18,%edi
cmp    $0x25000000,%edi
setne  %al
add    $0xdf000000,%edi
cmp    $0x5d000001,%edi
setb   %cl
and    %al,%cl
movzbl %cl,%eax
ret

LLVM IR (-O0):
define i32 @issafe(i32 %0) {
%2 = alloca i32
%3 = alloca i8
%4 = trunc i32 %0 to i8
store i8 %4, i8* %3
%5 = load i8, i8* %3
%6 = sext i8 %5 to i32
%7 = icmp eq i32 %6, 37
br i1 %7, label %8, label %9
8: ; preds = %1
store i32 0, i32* %2
br label %20
9: ; preds = %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp slt i32 %11, 33
br i1 %12, label %13, label %14
13: ; preds = %9
store i32 0, i32* %2
br label %20
14: ; preds = %9
%15 = load i8, i8* %3
%16 = sext i8 %15 to i32
%17 = icmp sgt i32 %16, 126
br i1 %17, label %18, label %19
18: ; preds = %14
store i32 0, i32* %2
br label %20
19: ; preds = %14
store i32 1, i32* %2
br label %20
20: ; preds = %19, %18, %13, %8
%21 = load i32, i32* %2
ret i32 %21
}

LLVM IR (-O2):
define i32 @issafe(i32 %0) {
%2 = shl i32 %0, 24
%3 = icmp ne i32 %2, 620756992
%4 = add i32 %2, -553648128
%5 = icmp ult i32 %4, 1560281089
%6 = and i1 %3, %5
%7 = zext i1 %6 to i32
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ assert(int);
void check(int *a, int *b) {
  int i;
  for (i = 0; i < 100; i++)
    assert(a[i] == b[i]);
}


x86 assembly (clang, -O0):
<check>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x64,-0x14(%rbp)
jge    1162 <check+0x52>
mov    -0x8(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%eax
mov    -0x10(%rbp),%rcx
movslq -0x14(%rbp),%rdx
cmp    (%rcx,%rdx,4),%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1127 <check+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<check>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
xor    %ebx,%ebx
nopl   (%rax)
mov    (%r15,%rbx,4),%eax
xor    %edi,%edi
cmp    (%r14,%rbx,4),%eax
sete   %dil
call   1030 <assert@plt>
add    $0x1,%rbx
cmp    $0x64,%rbx
jne    1120 <check+0x10>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @check(i32* nocapture %0, i32* nocapture %1) {
br label %3
3: ; preds = %2, %3
%4 = phi i64 [ 0, %2 ], [ %12, %3 ]
%5 = getelementptr inbounds i32, i32* %0, i64 %4
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %1, i64 %4
%8 = load i32, i32* %7
%9 = icmp eq i32 %6, %8
%10 = zext i1 %9 to i32
%11 = tail call i32 @assert(i32 %10)
%12 = add nuw nsw i64 %4, 1
%13 = icmp eq i64 %12, 100
br i1 %13, label %14, label %3
14: ; preds = %3
ret void
}
/* Variables and functions */
int /*<<< orphan*/ internal_print_dvtab(int);
int /*<<< orphan*/ internal_print_hline(int);
int /*<<< orphan*/ internal_print_neighbours(int);
int /*<<< orphan*/ internal_print_rtab(int);
int num_destinations();
void print_tabs(void) {
  int size = num_destinations();
  internal_print_rtab(size);
  internal_print_neighbours(size);
  internal_print_hline(size);
  internal_print_dvtab(size);
  internal_print_hline(size);
}


x86 assembly (clang, -O0):
<print_tabs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x0,%al
call   1030 <num_destinations@plt>
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%edi
call   1060 <internal_print_rtab@plt>
mov    -0x4(%rbp),%edi
call   1050 <internal_print_neighbours@plt>
mov    -0x4(%rbp),%edi
call   1040 <internal_print_hline@plt>
mov    -0x4(%rbp),%edi
call   1070 <internal_print_dvtab@plt>
mov    -0x4(%rbp),%edi
call   1040 <internal_print_hline@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_tabs>:
push   %rbx
xor    %eax,%eax
call   1030 <num_destinations@plt>
mov    %eax,%ebx
mov    %eax,%edi
call   1060 <internal_print_rtab@plt>
mov    %ebx,%edi
call   1050 <internal_print_neighbours@plt>
mov    %ebx,%edi
call   1040 <internal_print_hline@plt>
mov    %ebx,%edi
call   1070 <internal_print_dvtab@plt>
mov    %ebx,%edi
pop    %rbx
jmp    1040 <internal_print_hline@plt>

LLVM IR (-O0):
define void @print_tabs() {
%1 = alloca i32
%2 = call i32 (...) @num_destinations()
store i32 %2, i32* %1
%3 = load i32, i32* %1
%4 = call i32 @internal_print_rtab(i32 %3)
%5 = load i32, i32* %1
%6 = call i32 @internal_print_neighbours(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 @internal_print_hline(i32 %7)
%9 = load i32, i32* %1
%10 = call i32 @internal_print_dvtab(i32 %9)
%11 = load i32, i32* %1
%12 = call i32 @internal_print_hline(i32 %11)
ret void
}

LLVM IR (-O2):
define void @print_tabs() {
%1 = tail call i32 (...) @num_destinations()
%2 = tail call i32 @internal_print_rtab(i32 %1)
%3 = tail call i32 @internal_print_neighbours(i32 %1)
%4 = tail call i32 @internal_print_hline(i32 %1)
%5 = tail call i32 @internal_print_dvtab(i32 %1)
%6 = tail call i32 @internal_print_hline(i32 %1)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
void adsfree(void *ptr) { free((char *)ptr); }


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

x86 assembly (clang, -O2):
<adsfree>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @adsfree(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
int main(int count) {
  int v1 = 6 + 5;
  int v2 = v1 + 7;
  int v3 = 0;
  v3 = v1 + 4 + v2;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
movl   $0xb,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x7,%eax
mov    %eax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0xc(%rbp),%eax
add    $0x4,%eax
add    -0x10(%rbp),%eax
mov    %eax,-0x14(%rbp)
xor    %eax,%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @main(i32 %0) {
ret i32 0
}
void g_relation_count() {}


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

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

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

LLVM IR (-O2):
define void @g_relation_count() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ lex(int /*<<< orphan*/);
int /*<<< orphan*/ stdin;
int main() {
  lex(stdin);
  return 0;
}


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

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

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

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main() {
%1 = load i32, i32* @stdin
%2 = tail call i32 @lex(i32 %1)
ret i32 0
}
/* Type definitions */
typedef scalar_t__ int32_t;

/* Variables and functions */
scalar_t__ __stdfix_sat_r(scalar_t__);
int32_t __stdfix_ssub_r(int32_t x, int32_t y) {
  return (__stdfix_sat_r((int32_t)x - (int32_t)y));
}


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

x86 assembly (clang, -O2):
<__stdfix_ssub_r>:
sub    %rsi,%rdi
jmp    1030 <__stdfix_sat_r@plt>

LLVM IR (-O0):
define i64 @__stdfix_ssub_r(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 = sub nsw i64 %5, %6
%8 = call i64 @__stdfix_sat_r(i64 %7)
ret i64 %8
}

LLVM IR (-O2):
define i64 @__stdfix_ssub_r(i64 %0, i64 %1) {
%3 = sub nsw i64 %0, %1
%4 = tail call i64 @__stdfix_sat_r(i64 %3)
ret i64 %4
}