xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ CMT1_delay_core(int, int);
void CMT1_delay_10us(int n) { CMT1_delay_core(25, n); }


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

x86 assembly (clang, -O2):
<CMT1_delay_10us>:
mov    %edi,%esi
mov    $0x19,%edi
jmp    1030 <CMT1_delay_core@plt>

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

LLVM IR (-O2):
define void @CMT1_delay_10us(i32 %0) {
%2 = tail call i32 @CMT1_delay_core(i32 25, i32 %0)
ret void
}
void genericInterrupt(void) {
  __asm__("cli");
  prints("UNHANDLED INTERRUPT");
  __asm__("sti");
}


x86 assembly (clang, -O0):
<genericInterrupt>:
push   %rbp
mov    %rsp,%rbp
cli
lea    0xee4(%rip),%rdi
mov    $0x0,%al
call   1030 <prints@plt>
sti
pop    %rbp
ret

x86 assembly (clang, -O2):
<genericInterrupt>:
push   %rax
cli
lea    0xee7(%rip),%rdi
xor    %eax,%eax
call   1030 <prints@plt>
sti
pop    %rax
ret

LLVM IR (-O0):
@.str = [20 x i8] c"UNHANDLED INTERRUPT\00"
define void @genericInterrupt() {
%1 = call i32 (i8*, ...) bitcast (i32 (...)* @prints to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"UNHANDLED INTERRUPT\00"
define void @genericInterrupt() {
tail call void asm sideeffect "cli", "~{dirflag},~{fpsr},~{flags}"()
%1 = tail call i32 (i8*, ...) bitcast (i32 (...)* @prints to i32 (i8*, ...)*)(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0))
tail call void asm sideeffect "sti", "~{dirflag},~{fpsr},~{flags}"()
ret void
}
int quick_tcompress() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @quick_tcompress() {
ret i32 0
}
/* Variables and functions */
unsigned long long clock();
unsigned long long clock_stop(void) { return clock(); }


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

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

LLVM IR (-O0):
define i64 @clock_stop() {
%1 = call i64 (...) @clock()
ret i64 %1
}

LLVM IR (-O2):
define i64 @clock_stop() {
%1 = tail call i64 (...) @clock()
ret i64 %1
}
void *alloc_space_from_buddy_sys(int sys_id, int len) {}


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

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

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

LLVM IR (-O2):
define noalias i8* @alloc_space_from_buddy_sys(i32 %0, i32 %1) {
ret i8* undef
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void supervisor_resource_mmr_read(void) {
  int *i = (void *)0xFFC00014;
  printf("chip id = %x", *i);
}


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

x86 assembly (clang, -O2):
<supervisor_resource_mmr_read>:
mov    $0xffc00014,%eax
mov    (%rax),%esi
lea    0xee2(%rip),%rdi
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"chip id = %x\00"
define void @supervisor_resource_mmr_read() {
%1 = alloca i32*
store i32* inttoptr (i64 4290773012 to i32*), i32** %1
%2 = load i32*, i32** %1
%3 = load i32, i32* %2
%4 = call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"chip id = %x\00"
define void @supervisor_resource_mmr_read() {
%1 = load i32, i32* inttoptr (i64 4290773012 to i32*)
%2 = tail call i32 @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i32 %1)
ret void
}
void register_iommu(struct iommu_ops *ops) {}


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

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

LLVM IR (-O0):
%struct.iommu_ops = type opaque
define void @register_iommu(%struct.iommu_ops* %0) {
%2 = alloca %struct.iommu_ops*
store %struct.iommu_ops* %0, %struct.iommu_ops** %2
ret void
}

LLVM IR (-O2):
%struct.iommu_ops = type opaque
define void @register_iommu(%struct.iommu_ops* nocapture %0) {
ret void
}
/* Variables and functions */
scalar_t__ MemAlloc(scalar_t__, char *);
int /*<<< orphan*/ strcpy(char *, char *);
scalar_t__ strlen(char *);
char *StringCopy(char *s, char *typ) {
  char *r;
  r = (char *)MemAlloc(1 + strlen(s), typ);
  strcpy(r, s);
  return (r);
}


x86 assembly (clang, -O0):
<StringCopy>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <strlen@plt>
mov    %rax,%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
call   1050 <MemAlloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1030 <strcpy@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<StringCopy>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
call   1040 <strlen@plt>
lea    0x1(%rax),%rdi
mov    %r14,%rsi
call   1050 <MemAlloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r15,%rsi
call   1030 <strcpy@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define i8* @StringCopy(i8* %0, i8* %1) {
%3 = tail call i64 @strlen(i8* dereferenceable(1) %0)
%4 = add nsw i64 %3, 1
%5 = tail call i64 @MemAlloc(i64 %4, i8* %1)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @strcpy(i8* %6, i8* %0)
ret i8* %6
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
unsigned short crc_ccitt_update(uint16_t crc, uint8_t data) {
  data ^= (crc & 0xFF);
  data ^= data << 4;
  return ((((uint16_t)data << 8) | ((crc >> 8) & 0xFF)) ^ (uint8_t)(data >> 4) ^
          ((uint16_t)data << 3));
}


x86 assembly (clang, -O0):
<crc_ccitt_update>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
and    $0xff,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x4,%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
shl    $0x8,%eax
mov    -0x4(%rbp),%ecx
sar    $0x8,%ecx
and    $0xff,%ecx
or     %ecx,%eax
mov    -0x8(%rbp),%ecx
sar    $0x4,%ecx
xor    %ecx,%eax
mov    -0x8(%rbp),%ecx
shl    $0x3,%ecx
xor    %ecx,%eax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<crc_ccitt_update>:
mov    %edi,%ecx
movzbl %cl,%edx
xor    %esi,%edx
mov    %edx,%eax
shl    $0x4,%eax
xor    %edx,%eax
mov    %eax,%edx
shl    $0x8,%edx
movzbl %ch,%ecx
or     %edx,%ecx
mov    %eax,%edx
shr    $0x4,%edx
shl    $0x3,%eax
xor    %edx,%eax
xor    %ecx,%eax
ret

LLVM IR (-O0):
define zeroext i16 @crc_ccitt_update(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 = and i32 %5, 255
%7 = load i32, i32* %4
%8 = xor i32 %7, %6
store i32 %8, i32* %4
%9 = load i32, i32* %4
%10 = shl i32 %9, 4
%11 = load i32, i32* %4
%12 = xor i32 %11, %10
store i32 %12, i32* %4
%13 = load i32, i32* %4
%14 = shl i32 %13, 8
%15 = load i32, i32* %3
%16 = ashr i32 %15, 8
%17 = and i32 %16, 255
%18 = or i32 %14, %17
%19 = load i32, i32* %4
%20 = ashr i32 %19, 4
%21 = xor i32 %18, %20
%22 = load i32, i32* %4
%23 = shl i32 %22, 3
%24 = xor i32 %21, %23
%25 = trunc i32 %24 to i16
ret i16 %25
}

LLVM IR (-O2):
define zeroext i16 @crc_ccitt_update(i32 %0, i32 %1) {
%3 = and i32 %0, 255
%4 = xor i32 %3, %1
%5 = shl i32 %4, 4
%6 = xor i32 %5, %4
%7 = shl i32 %6, 8
%8 = lshr i32 %0, 8
%9 = and i32 %8, 255
%10 = or i32 %7, %9
%11 = lshr i32 %6, 4
%12 = shl i32 %6, 3
%13 = xor i32 %12, %11
%14 = xor i32 %13, %10
%15 = trunc i32 %14 to i16
ret i16 %15
}
char *yesno(int n) {
  static char *YES = "yes";
  static char *NO = "no";
  if (n) {
    return (YES);
  }
  return (NO);
}


x86 assembly (clang, -O0):
<yesno>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
je     1121 <yesno+0x21>
mov    0x2f08(%rip),%rax
mov    %rax,-0x8(%rbp)
jmp    112c <yesno+0x2c>
mov    0x2f00(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<yesno>:
test   %edi,%edi
lea    0xefb(%rip),%rcx
lea    0xef0(%rip),%rax
cmove  %rcx,%rax
ret

LLVM IR (-O0):
@yesno.YES = internal global i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i32 0, i32 0)
@.str = [4 x i8] c"yes\00"
@yesno.NO = internal global i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i32 0, i32 0)
@.str.1 = [3 x i8] c"no\00"
define i8* @yesno(i32 %0) {
%2 = alloca i8*
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = icmp ne i32 %4, 0
br i1 %5, label %6, label %8
6: ; preds = %1
%7 = load i8*, i8** @yesno.YES
store i8* %7, i8** %2
br label %10
8: ; preds = %1
%9 = load i8*, i8** @yesno.NO
store i8* %9, i8** %2
br label %10
10: ; preds = %8, %6
%11 = load i8*, i8** %2
ret i8* %11
}

LLVM IR (-O2):
@.str = [4 x i8] c"yes\00"
@.str.1 = [3 x i8] c"no\00"
define i8* @yesno(i32 %0) {
%2 = icmp eq i32 %0, 0
%3 = select i1 %2, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0)
ret i8* %3
}
void common2() {
  printf("\n%s: \n", __func__);
  printf("libb common2\n");
}


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

x86 assembly (clang, -O2):
<common2>:
push   %rax
lea    0xed8(%rip),%rdi
lea    0xedd(%rip),%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [7 x i8] c"\0A%s: \0A\00"
@__func__.common2 = [8 x i8] c"common2\00"
@.str.1 = [14 x i8] c"libb common2\0A\00"
define void @common2() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.common2, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [7 x i8] c"\0A%s: \0A\00"
@__func__.common2 = [8 x i8] c"common2\00"
@str = [13 x i8] c"libb common2\00"
define void @common2() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @__func__.common2, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @str, i64 0, i64 0))
ret void
}
unsigned long rho_ruby_get_class_byname(const char *szName) { return 0; }


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

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

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

LLVM IR (-O2):
define i64 @rho_ruby_get_class_byname(i8* nocapture readnone %0) {
ret i64 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char const *);
int /*<<< orphan*/ puts(char *);
void printUsage(const char *progName) {
  printf("Usage: %s [OPTION]\n", progName);
  puts("  -e, --expression=EXPR    evaluate expression");
  puts("  -h, --help               display this help and exit");
  puts("  -V, --version            output version information and exit");
}


x86 assembly (clang, -O0):
<printUsage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
call   1040 <printf@plt>
lea    0xed1(%rip),%rdi
call   1030 <puts@plt>
lea    0xef4(%rip),%rdi
call   1030 <puts@plt>
lea    0xf1e(%rip),%rdi
call   1030 <puts@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printUsage>:
push   %rax
mov    %rdi,%rsi
lea    0xed5(%rip),%rdi
call   1040 <printf@plt>
lea    0xedd(%rip),%rdi
call   1030 <puts@plt>
lea    0xf00(%rip),%rdi
call   1030 <puts@plt>
lea    0xf2a(%rip),%rdi
pop    %rax
jmp    1030 <puts@plt>

LLVM IR (-O0):
@.str = [20 x i8] c"Usage: %s [OPTION]\0A\00"
@.str.1 = [47 x i8] c" -e, --expression=EXPR evaluate expression\00"
@.str.2 = [54 x i8] c" -h, --help display this help and exit\00"
@.str.3 = [63 x i8] c" -V, --version output version information and exit\00"
define void @printUsage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = call i32 @puts(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @puts(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%7 = call i32 @puts(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [20 x i8] c"Usage: %s [OPTION]\0A\00"
@.str.1 = [47 x i8] c" -e, --expression=EXPR evaluate expression\00"
@.str.2 = [54 x i8] c" -h, --help display this help and exit\00"
@.str.3 = [63 x i8] c" -V, --version output version information and exit\00"
define void @printUsage(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([54 x i8], [54 x i8]* @.str.2, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([63 x i8], [63 x i8]* @.str.3, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ abort();
int /*<<< orphan*/ foo(int *);
int main() {
  int i = 0;
  foo(&i);
  if (i != 1)
    abort();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    -0x8(%rbp),%rdi
call   1040 <foo@plt>
cmpl   $0x1,-0x8(%rbp)
je     1150 <main+0x30>
mov    $0x0,%al
call   1030 <abort@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1040 <foo@plt>
cmpl   $0x1,0x4(%rsp)
jne    113e <main+0x1e>
xor    %eax,%eax
pop    %rcx
ret
xor    %eax,%eax
call   1030 <abort@plt>

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @foo(i32* %2)
%4 = load i32, i32* %2
%5 = icmp ne i32 %4, 1
br i1 %5, label %6, label %8
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
store i32 0, i32* %1
%3 = call i32 @foo(i32* %1)
%4 = load i32, i32* %1
%5 = icmp eq i32 %4, 1
br i1 %5, label %8, label %6
6: ; preds = %0
%7 = call i32 (...) @abort()
unreachable
8: ; preds = %0
ret i32 0
}
void main3(void) {}


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

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

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

LLVM IR (-O2):
define void @main3() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ puts(char *);
int /*<<< orphan*/ stdin;
int /*<<< orphan*/ strtok(char *, char *);
int main() {
  char spam[266];
  printf("LewisMCYoutube Spam Generator - Press Ctrl+C to exit\nPlease enter "
         "some spam: \n");
  fgets(spam, 266, stdin);
  strtok(spam, "\n");
  while (1) {
    puts(spam);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xea7(%rip),%rdi
call   1040 <printf@plt>
lea    -0x110(%rbp),%rdi
mov    0x2e7c(%rip),%rax
mov    (%rax),%edx
mov    $0x10a,%esi
call   1050 <fgets@plt>
lea    -0x110(%rbp),%rdi
lea    0xec7(%rip),%rsi
call   1060 <strtok@plt>
lea    -0x110(%rbp),%rdi
call   1030 <puts@plt>
jmp    118b <main+0x4b>

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x110,%rsp
lea    0xec3(%rip),%rdi
call   1030 <puts@plt>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edx
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    $0x10a,%esi
call   1040 <fgets@plt>
lea    0xe9c(%rip),%rsi
mov    %rbx,%rdi
call   1050 <strtok@plt>
nopl   0x0(%rax)
mov    %rbx,%rdi
call   1030 <puts@plt>
jmp    1170 <main+0x40>

LLVM IR (-O0):
@.str = [79 x i8] c"LewisMCYoutube Spam Generator - Press Ctrl+C to exit\0APlease enter some spam: \0A\00"
@stdin = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [266 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([79 x i8], [79 x i8]* @.str, i64 0, i64 0))
%4 = getelementptr inbounds [266 x i8], [266 x i8]* %2, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i32 @fgets(i8* %4, i32 266, i32 %5)
%7 = getelementptr inbounds [266 x i8], [266 x i8]* %2, i64 0, i64 0
%8 = call i32 @strtok(i8* %7, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %9
9: ; preds = %0, %9
%10 = getelementptr inbounds [266 x i8], [266 x i8]* %2, i64 0, i64 0
%11 = call i32 @puts(i8* %10)
br label %9
}

LLVM IR (-O2):
@stdin = global i32 0
@.str.1 = [2 x i8] c"\0A\00"
@str = [78 x i8] c"LewisMCYoutube Spam Generator - Press Ctrl+C to exit\0APlease enter some spam: \00"
define i32 @main() {
%1 = alloca [266 x i8]
%2 = getelementptr inbounds [266 x i8], [266 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([78 x i8], [78 x i8]* @str, i64 0, i64 0))
%4 = load i32, i32* @stdin
%5 = call i32 @fgets(i8* %2, i32 266, i32 %4)
%6 = call i32 @strtok(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %7
7: ; preds = %7, %0
%8 = call i32 @puts(i8* %2)
br label %7
}
int test_imm_62uint16_reg(unsigned short val) {
  return ((val) & (0x62 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_62uint16_reg>:
push   %rbp
mov    %rsp,%rbp
mov    %di,%ax
mov    %ax,-0x2(%rbp)
movzwl -0x2(%rbp),%edx
and    $0x62,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

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

LLVM IR (-O0):
define i32 @test_imm_62uint16_reg(i16 zeroext %0) {
%2 = alloca i16
store i16 %0, i16* %2
%3 = load i16, i16* %2
%4 = zext i16 %3 to i32
%5 = and i32 %4, 98
%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_62uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 98
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ errno;
int dup(int oldfd) {
  errno = ENOSYS;
  return -1;
}


x86 assembly (clang, -O0):
<dup>:
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):
<dup>:
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 @dup(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 @dup(i32 %0) {
%2 = load i32, i32* @ENOSYS
store i32 %2, i32* @errno
ret i32 -1
}
/* Type definitions */
struct termios {
  int /*<<< orphan*/ c_ispeed;
};
typedef int /*<<< orphan*/ speed_t;

/* Variables and functions */
speed_t cfgetospeed(const struct termios *t) { return t->c_ispeed; }


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

x86 assembly (clang, -O2):
<cfgetospeed>:
mov    (%rdi),%eax
ret

LLVM IR (-O0):
%struct.termios = type { i32 }
define i32 @cfgetospeed(%struct.termios* %0) {
%2 = alloca %struct.termios*
store %struct.termios* %0, %struct.termios** %2
%3 = load %struct.termios*, %struct.termios** %2
%4 = getelementptr inbounds %struct.termios, %struct.termios* %3, i32 0, i32 0
%5 = load i32, i32* %4
ret i32 %5
}

LLVM IR (-O2):
%struct.termios = type { i32 }
define i32 @cfgetospeed(%struct.termios* nocapture %0) {
%2 = getelementptr inbounds %struct.termios, %struct.termios* %0, i64 0, i32 0
%3 = load i32, i32* %2
ret i32 %3
}
/* Type definitions */
typedef int /*<<< orphan*/ int64_t;

/* Variables and functions */
int /*<<< orphan*/ rr__write(int /*<<< orphan*/);
void rr_ref(int64_t refid) { rr__write(refid); }


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

x86 assembly (clang, -O2):
<rr_ref>:
jmp    1030 <rr__write@plt>

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

LLVM IR (-O2):
define void @rr_ref(i32 %0) {
%2 = tail call i32 @rr__write(i32 %0)
ret void
}
int psync_fs_isstarted() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @psync_fs_isstarted() {
ret i32 0
}
int __nedf2(double a1, double a2) {
  return *(long long *)&a1 != *(long long *)&a2;
}


x86 assembly (clang, -O0):
<__nedf2>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
mov    -0x8(%rbp),%rax
cmp    -0x10(%rbp),%rax
setne  %al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__nedf2>:
movq   %xmm0,%rcx
movq   %xmm1,%rdx
xor    %eax,%eax
cmp    %rdx,%rcx
setne  %al
ret

LLVM IR (-O0):
define i32 @__nedf2(double %0, double %1) {
%3 = alloca double
%4 = alloca double
store double %0, double* %3
store double %1, double* %4
%5 = bitcast double* %3 to i64*
%6 = load i64, i64* %5
%7 = bitcast double* %4 to i64*
%8 = load i64, i64* %7
%9 = icmp ne i64 %6, %8
%10 = zext i1 %9 to i32
ret i32 %10
}

LLVM IR (-O2):
define i32 @__nedf2(double %0, double %1) {
%3 = bitcast double %0 to i64
%4 = bitcast double %1 to i64
%5 = icmp ne i64 %3, %4
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
char *create400Message();
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ sendResponse(int, char *, int /*<<< orphan*/);
int /*<<< orphan*/ strlen(char *);
void send400Message(int acceptedFileDescriptor) {
  char *response = create400Message();
  sendResponse(acceptedFileDescriptor, response, strlen(response));
  free(response);
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    $0x0,%al
call   1050 <create400Message@plt>
mov    %rax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    -0x1c(%rbp),%edi
mov    -0x18(%rbp),%rsi
mov    %eax,%edx
call   1060 <sendResponse@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
xor    %eax,%eax
call   1050 <create400Message@plt>
mov    %rax,%rbx
mov    %rax,%rdi
call   1040 <strlen@plt>
mov    %ebp,%edi
mov    %rbx,%rsi
mov    %eax,%edx
call   1060 <sendResponse@plt>
mov    %rbx,%rdi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <free@plt>

LLVM IR (-O0):
define void @send400Message(i32 %0) {
%2 = alloca i32
%3 = alloca i8*
store i32 %0, i32* %2
%4 = call i8* (...) @create400Message()
store i8* %4, i8** %3
%5 = load i32, i32* %2
%6 = load i8*, i8** %3
%7 = load i8*, i8** %3
%8 = call i32 @strlen(i8* %7)
%9 = call i32 @sendResponse(i32 %5, i8* %6, i32 %8)
%10 = load i8*, i8** %3
%11 = call i32 @free(i8* %10)
ret void
}

LLVM IR (-O2):
define void @send400Message(i32 %0) {
%2 = tail call i8* (...) @create400Message()
%3 = tail call i32 @strlen(i8* %2)
%4 = tail call i32 @sendResponse(i32 %0, i8* %2, i32 %3)
%5 = tail call i32 @free(i8* %2)
ret void
}
/* Variables and functions */
scalar_t__ gb_ceil(float);
scalar_t__ gb_floor(float);
float gb_round(float x) {
  return (float)((x >= 0.0f) ? gb_floor(x + 0.5f) : gb_ceil(x - 0.5f));
}


x86 assembly (clang, -O0):
<gb_round>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jb     1159 <gb_round+0x39>
movss  0xeba(%rip),%xmm0
addss  -0x4(%rbp),%xmm0
call   1040 <gb_floor@plt>
mov    %rax,-0x10(%rbp)
jmp    1173 <gb_round+0x53>
movss  -0x4(%rbp),%xmm0
movss  0xe9a(%rip),%xmm1
subss  %xmm1,%xmm0
call   1030 <gb_ceil@plt>
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
cvtsi2ss %rax,%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gb_round>:
push   %rax
xorps  %xmm1,%xmm1
ucomiss %xmm1,%xmm0
jae    1138 <gb_round+0x18>
addss  0xed3(%rip),%xmm0
call   1030 <gb_ceil@plt>
jmp    1145 <gb_round+0x25>
addss  0xec0(%rip),%xmm0
call   1040 <gb_floor@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
pop    %rax
ret

LLVM IR (-O0):
define float @gb_round(float %0) {
%2 = alloca float
store float %0, float* %2
%3 = load float, float* %2
%4 = fcmp oge float %3, 0.000000e+00
br i1 %4, label %5, label %9
5: ; preds = %1
%6 = load float, float* %2
%7 = fadd float %6, 5.000000e-01
%8 = call i64 @gb_floor(float %7)
br label %13
9: ; preds = %1
%10 = load float, float* %2
%11 = fsub float %10, 5.000000e-01
%12 = call i64 @gb_ceil(float %11)
br label %13
13: ; preds = %9, %5
%14 = phi i64 [ %8, %5 ], [ %12, %9 ]
%15 = sitofp i64 %14 to float
ret float %15
}

LLVM IR (-O2):
define float @gb_round(float %0) {
%2 = fcmp ult float %0, 0.000000e+00
br i1 %2, label %6, label %3
3: ; preds = %1
%4 = fadd float %0, 5.000000e-01
%5 = tail call i64 @gb_floor(float %4)
br label %9
6: ; preds = %1
%7 = fadd float %0, -5.000000e-01
%8 = tail call i64 @gb_ceil(float %7)
br label %9
9: ; preds = %6, %3
%10 = phi i64 [ %5, %3 ], [ %8, %6 ]
%11 = sitofp i64 %10 to float
ret float %11
}
/* Variables and functions */
int /*<<< orphan*/ Sound_Play(int, int);
void ToneC() { Sound_Play(1046, 50); }


x86 assembly (clang, -O0):
<ToneC>:
push   %rbp
mov    %rsp,%rbp
mov    $0x416,%edi
mov    $0x32,%esi
call   1030 <Sound_Play@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<ToneC>:
mov    $0x416,%edi
mov    $0x32,%esi
jmp    1030 <Sound_Play@plt>

LLVM IR (-O0):
define void @ToneC() {
%1 = call i32 @Sound_Play(i32 1046, i32 50)
ret void
}

LLVM IR (-O2):
define void @ToneC() {
%1 = tail call i32 @Sound_Play(i32 1046, i32 50)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
scalar_t__ malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
char *cambiarEspacioDeString(char *s, int tamanio, int cambioEnEspacio) {
  char *sAux;
  int i;
  sAux = (char *)malloc((tamanio + cambioEnEspacio) * sizeof(char));
  memcpy(sAux, s, sizeof(char) * tamanio);
  free(s);
  return sAux;
}


x86 assembly (clang, -O0):
<cambiarEspacioDeString>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
add    -0x10(%rbp),%eax
cltq
shl    $0x0,%rax
mov    %eax,%edi
call   1050 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rsi
movslq -0xc(%rbp),%rax
shl    $0x0,%rax
mov    %eax,%edx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rdi
call   1030 <free@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cambiarEspacioDeString>:
push   %r15
push   %r14
push   %rbx
mov    %esi,%r15d
mov    %rdi,%r14
lea    (%rdx,%r15,1),%edi
call   1050 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
mov    %r15d,%edx
call   1040 <memcpy@plt>
mov    %r14,%rdi
call   1030 <free@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i8* @cambiarEspacioDeString(i8* %0, i32 %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = add nsw i32 %9, %10
%12 = sext i32 %11 to i64
%13 = mul i64 %12, 1
%14 = trunc i64 %13 to i32
%15 = call i64 @malloc(i32 %14)
%16 = inttoptr i64 %15 to i8*
store i8* %16, i8** %7
%17 = load i8*, i8** %7
%18 = load i8*, i8** %4
%19 = load i32, i32* %5
%20 = sext i32 %19 to i64
%21 = mul i64 1, %20
%22 = trunc i64 %21 to i32
%23 = call i32 @memcpy(i8* %17, i8* %18, i32 %22)
%24 = load i8*, i8** %4
%25 = call i32 @free(i8* %24)
%26 = load i8*, i8** %7
ret i8* %26
}

LLVM IR (-O2):
define i8* @cambiarEspacioDeString(i8* %0, i32 %1, i32 %2) {
%4 = add nsw i32 %2, %1
%5 = tail call i64 @malloc(i32 %4)
%6 = inttoptr i64 %5 to i8*
%7 = tail call i32 @memcpy(i8* %6, i8* %0, i32 %1)
%8 = tail call i32 @free(i8* %0)
ret i8* %6
}
double dlt(x, y)
double x, y;
{ return ((double)(x < y)); }


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

x86 assembly (clang, -O2):
<dlt>:
cmpltsd %xmm1,%xmm0
movsd  0xef3(%rip),%xmm1
andpd  %xmm1,%xmm0
ret

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

LLVM IR (-O2):
define double @dlt(double %0, double %1) {
%3 = fcmp olt double %0, %1
%4 = uitofp i1 %3 to double
ret double %4
}
/* Variables and functions */
double sla_pa_(double *, double *, double *);
double slaPa(double ha, double dec, double phi) {
  double HA;
  double DEC;
  double PHI;
  double RETVAL;
  double retval;
  HA = ha;
  DEC = dec;
  PHI = phi;
  RETVAL = sla_pa_(&HA, &DEC, &PHI);
  retval = RETVAL;
  return retval;
}


x86 assembly (clang, -O0):
<slaPa>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  %xmm1,-0x10(%rbp)
movsd  %xmm2,-0x18(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  %xmm0,-0x30(%rbp)
lea    -0x20(%rbp),%rdi
lea    -0x28(%rbp),%rsi
lea    -0x30(%rbp),%rdx
call   1030 <sla_pa_@plt>
movsd  %xmm0,-0x38(%rbp)
movsd  -0x38(%rbp),%xmm0
movsd  %xmm0,-0x40(%rbp)
movsd  -0x40(%rbp),%xmm0
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<slaPa>:
sub    $0x18,%rsp
movsd  %xmm0,0x10(%rsp)
movsd  %xmm1,0x8(%rsp)
movsd  %xmm2,(%rsp)
lea    0x10(%rsp),%rdi
lea    0x8(%rsp),%rsi
mov    %rsp,%rdx
call   1030 <sla_pa_@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @slaPa(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = alloca double
%8 = alloca double
%9 = alloca double
%10 = alloca double
%11 = alloca double
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%12 = load double, double* %4
store double %12, double* %7
%13 = load double, double* %5
store double %13, double* %8
%14 = load double, double* %6
store double %14, double* %9
%15 = call double @sla_pa_(double* %7, double* %8, double* %9)
store double %15, double* %10
%16 = load double, double* %10
store double %16, double* %11
%17 = load double, double* %11
ret double %17
}

LLVM IR (-O2):
define double @slaPa(double %0, double %1, double %2) {
%4 = alloca double
%5 = alloca double
%6 = alloca double
%7 = bitcast double* %4 to i8*
%8 = bitcast double* %5 to i8*
%9 = bitcast double* %6 to i8*
store double %0, double* %4
store double %1, double* %5
store double %2, double* %6
%10 = call double @sla_pa_(double* %4, double* %5, double* %6)
ret double %10
}
void foo447() {}


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

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

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

LLVM IR (-O2):
define void @foo447() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
int strcoll(char const *, char const *);
int strcoll_wrapper(const void *v1, const void *v2) {
  const char **s1 = (const char **)v1;
  const char **s2 = (const char **)v2;
  assert(v1 != NULL);
  assert(v2 != NULL);
  return strcoll(*s1, *s2);
}


x86 assembly (clang, -O0):
<strcoll_wrapper>:
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    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
cmpq   $0x0,-0x10(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x18(%rbp),%rax
mov    (%rax),%rdi
mov    -0x20(%rbp),%rax
mov    (%rax),%rsi
call   1040 <strcoll@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcoll_wrapper>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
xor    %edi,%edi
test   %r14,%r14
setne  %dil
call   1030 <assert@plt>
mov    (%rbx),%rdi
mov    (%r14),%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <strcoll@plt>

LLVM IR (-O0):
define i32 @strcoll_wrapper(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
%8 = bitcast i8* %7 to i8**
store i8** %8, i8*** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to i8**
store i8** %10, i8*** %6
%11 = load i8*, i8** %3
%12 = icmp ne i8* %11, null
%13 = zext i1 %12 to i32
%14 = call i32 @assert(i32 %13)
%15 = load i8*, i8** %4
%16 = icmp ne i8* %15, null
%17 = zext i1 %16 to i32
%18 = call i32 @assert(i32 %17)
%19 = load i8**, i8*** %5
%20 = load i8*, i8** %19
%21 = load i8**, i8*** %6
%22 = load i8*, i8** %21
%23 = call i32 @strcoll(i8* %20, i8* %22)
ret i32 %23
}

LLVM IR (-O2):
define i32 @strcoll_wrapper(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i8**
%4 = bitcast i8* %1 to i8**
%5 = icmp ne i8* %0, null
%6 = zext i1 %5 to i32
%7 = tail call i32 @assert(i32 %6)
%8 = icmp ne i8* %1, null
%9 = zext i1 %8 to i32
%10 = tail call i32 @assert(i32 %9)
%11 = load i8*, i8** %3
%12 = load i8*, i8** %4
%13 = tail call i32 @strcoll(i8* %11, i8* %12)
ret i32 %13
}
/* Variables and functions */
int _main();
int main(void) {
  return _main();
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @_main()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ strpbrk(char *, char *);
void uninivar_strpbrk(void) {
  char *cs;
  char *ct;
  (void)strpbrk(cs, ct);
}


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

x86 assembly (clang, -O2):
<uninivar_strpbrk>:
jmp    1030 <strpbrk@plt>

LLVM IR (-O0):
define void @uninivar_strpbrk() {
%1 = alloca i8*
%2 = alloca i8*
%3 = load i8*, i8** %1
%4 = load i8*, i8** %2
%5 = call i32 @strpbrk(i8* %3, i8* %4)
ret void
}

LLVM IR (-O2):
define void @uninivar_strpbrk() {
%1 = tail call i32 @strpbrk(i8* undef, i8* undef)
ret void
}
/* Type definitions */
struct ibv_wq {
  int dummy;
};

/* Variables and functions */
int ibv_destroy_wq(struct ibv_wq *);
int mlx4_glue_destroy_wq(struct ibv_wq *wq) { return ibv_destroy_wq(wq); }


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

x86 assembly (clang, -O2):
<mlx4_glue_destroy_wq>:
jmp    1030 <ibv_destroy_wq@plt>

LLVM IR (-O0):
%struct.ibv_wq = type { i32 }
define i32 @mlx4_glue_destroy_wq(%struct.ibv_wq* %0) {
%2 = alloca %struct.ibv_wq*
store %struct.ibv_wq* %0, %struct.ibv_wq** %2
%3 = load %struct.ibv_wq*, %struct.ibv_wq** %2
%4 = call i32 @ibv_destroy_wq(%struct.ibv_wq* %3)
ret i32 %4
}

LLVM IR (-O2):
%struct.ibv_wq = type { i32 }
define i32 @mlx4_glue_destroy_wq(%struct.ibv_wq* %0) {
%2 = tail call i32 @ibv_destroy_wq(%struct.ibv_wq* %0)
ret i32 %2
}
/* Variables and functions */
double acos(int);
int sqrt(int);
double atan(double x) {
  double res = acos(1 / sqrt(1 + x * x));
  if (x < 0) {
    res *= -1;
  }
  return res;
}


x86 assembly (clang, -O0):
<atan>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
mulsd  %xmm1,%xmm0
movsd  0xebd(%rip),%xmm1
addsd  %xmm1,%xmm0
cvttsd2si %xmm0,%edi
call   1040 <sqrt@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cltd
idiv   %ecx
mov    %eax,%edi
call   1030 <acos@plt>
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x8(%rbp),%xmm0
jbe    1186 <atan+0x66>
movsd  0xe8c(%rip),%xmm0
mulsd  -0x10(%rbp),%xmm0
movsd  %xmm0,-0x10(%rbp)
movsd  -0x10(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<atan>:
sub    $0x18,%rsp
movapd %xmm0,(%rsp)
movapd %xmm0,%xmm1
mulsd  %xmm0,%xmm1
addsd  0xec7(%rip),%xmm1
cvttsd2si %xmm1,%edi
call   1040 <sqrt@plt>
lea    0x1(%rax),%ecx
xor    %edi,%edi
cmp    $0x3,%ecx
cmovb  %eax,%edi
call   1030 <acos@plt>
movapd 0xeb6(%rip),%xmm1
xorpd  %xmm0,%xmm1
xorpd  %xmm2,%xmm2
movapd (%rsp),%xmm3
cmpltsd %xmm2,%xmm3
movapd %xmm3,%xmm2
andnpd %xmm0,%xmm2
andpd  %xmm1,%xmm3
orpd   %xmm2,%xmm3
movapd %xmm3,%xmm0
add    $0x18,%rsp
ret

LLVM IR (-O0):
define double @atan(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %2
%4 = load double, double* %2
%5 = load double, double* %2
%6 = call double @llvm.fmuladd.f64(double %4, double %5, double 1.000000e+00)
%7 = fptosi double %6 to i32
%8 = call i32 @sqrt(i32 %7)
%9 = sdiv i32 1, %8
%10 = call double @acos(i32 %9)
store double %10, double* %3
%11 = load double, double* %2
%12 = fcmp olt double %11, 0.000000e+00
br i1 %12, label %13, label %16
13: ; preds = %1
%14 = load double, double* %3
%15 = fmul double %14, -1.000000e+00
store double %15, double* %3
br label %16
16: ; preds = %13, %1
%17 = load double, double* %3
ret double %17
}

LLVM IR (-O2):
define double @atan(double %0) {
%2 = tail call double @llvm.fmuladd.f64(double %0, double %0, double 1.000000e+00)
%3 = fptosi double %2 to i32
%4 = tail call i32 @sqrt(i32 %3)
%5 = add i32 %4, 1
%6 = icmp ult i32 %5, 3
%7 = select i1 %6, i32 %4, i32 0
%8 = tail call double @acos(i32 %7)
%9 = fcmp olt double %0, 0.000000e+00
%10 = fneg double %8
%11 = select i1 %9, double %10, double %8
ret double %11
}
/* Type definitions */
typedef int /*<<< orphan*/ const uint64_t;

/* Variables and functions */
uint64_t peek64(const uint64_t *address) { return (*address); }


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

x86 assembly (clang, -O2):
<peek64>:
mov    (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @peek64(i32* nocapture %0) {
%2 = load i32, i32* %0
ret i32 %2
}
/* Variables and functions */
unsigned long X86_EFLAGS_IF;
int arch_irqs_disabled_flags(unsigned long flags) {
  return !(flags & X86_EFLAGS_IF);
}


x86 assembly (clang, -O0):
<arch_irqs_disabled_flags>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x2ee5(%rip),%rcx
and    (%rcx),%rax
cmp    $0x0,%rax
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<arch_irqs_disabled_flags>:
mov    0x2ef1(%rip),%rcx
xor    %eax,%eax
test   %rdi,(%rcx)
sete   %al
ret

LLVM IR (-O0):
@X86_EFLAGS_IF = global i64 0
define i32 @arch_irqs_disabled_flags(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = load i64, i64* @X86_EFLAGS_IF
%5 = and i64 %3, %4
%6 = icmp ne i64 %5, 0
%7 = xor i1 %6, true
%8 = zext i1 %7 to i32
ret i32 %8
}

LLVM IR (-O2):
@X86_EFLAGS_IF = global i64 0
define i32 @arch_irqs_disabled_flags(i64 %0) {
%2 = load i64, i64* @X86_EFLAGS_IF
%3 = and i64 %2, %0
%4 = icmp eq i64 %3, 0
%5 = zext i1 %4 to i32
ret i32 %5
}
/* Variables and functions */
long long __nv_llround(double);
long long llround(double __a) { return __nv_llround(__a); }


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

x86 assembly (clang, -O2):
<llround>:
jmp    1030 <__nv_llround@plt>

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

LLVM IR (-O2):
define i64 @llround(double %0) {
%2 = tail call i64 @__nv_llround(double %0)
ret i64 %2
}
extern unsigned long long double_to_bits(double a) {
  return *((unsigned long long *)&a);
}


x86 assembly (clang, -O0):
<double_to_bits>:
push   %rbp
mov    %rsp,%rbp
movsd  %xmm0,-0x8(%rbp)
mov    -0x8(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<double_to_bits>:
movq   %xmm0,%rax
ret

LLVM IR (-O0):
define i64 @double_to_bits(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = bitcast double* %2 to i64*
%4 = load i64, i64* %3
ret i64 %4
}

LLVM IR (-O2):
define i64 @double_to_bits(double %0) {
%2 = bitcast double %0 to i64
ret i64 %2
}
int empty_line_state(char line[], int i) {
  while (line[i] == '\n') {
    ++i;
  }
  return i;
}


x86 assembly (clang, -O0):
<empty_line_state>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0xa,%eax
jne    112e <empty_line_state+0x2e>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    110b <empty_line_state+0xb>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<empty_line_state>:
movslq %esi,%rcx
lea    -0x1(%rcx),%eax
add    %rcx,%rdi
nopl   0x0(%rax)
add    $0x1,%eax
cmpb   $0xa,(%rdi)
lea    0x1(%rdi),%rdi
je     1110 <empty_line_state+0x10>
ret

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

LLVM IR (-O2):
define i32 @empty_line_state(i8* nocapture %0, i32 %1) {
%3 = sext i32 %1 to i64
br label %4
4: ; preds = %4, %2
%5 = phi i64 [ %9, %4 ], [ %3, %2 ]
%6 = getelementptr inbounds i8, i8* %0, i64 %5
%7 = load i8, i8* %6
%8 = icmp eq i8 %7, 10
%9 = add i64 %5, 1
br i1 %8, label %4, label %10
10: ; preds = %4
%11 = trunc i64 %5 to i32
ret i32 %11
}
void X509V3_extensions_print(void) {}


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

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

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

LLVM IR (-O2):
define void @X509V3_extensions_print() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ __VERIFIER_assert(int);
void main() {
  int i, j;
  i = 1;
  j = 10;
  while (j >= i) {
    i = i + 2;
    j = -1 + j;
  }
  __VERIFIER_assert(j == 6);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x1,-0x4(%rbp)
movl   $0xa,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0x4(%rbp),%eax
jl     114b <main+0x3b>
mov    -0x4(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x4(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
jmp    1126 <main+0x16>
cmpl   $0x6,-0x8(%rbp)
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <__VERIFIER_assert@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0xb,%eax
mov    $0x3,%ecx
nopw   0x0(%rax,%rax,1)
add    $0xffffffff,%eax
lea    0x2(%rcx),%edx
cmp    %ecx,%eax
mov    %edx,%ecx
jg     1120 <main+0x10>
xor    %edi,%edi
cmp    $0x7,%eax
sete   %dil
jmp    1030 <__VERIFIER_assert@plt>

LLVM IR (-O0):
define void @main() {
%1 = alloca i32
%2 = alloca i32
store i32 1, i32* %1
store i32 10, i32* %2
br label %3
3: ; preds = %7, %0
%4 = load i32, i32* %2
%5 = load i32, i32* %1
%6 = icmp sge i32 %4, %5
br i1 %6, label %7, label %12
7: ; preds = %3
%8 = load i32, i32* %1
%9 = add nsw i32 %8, 2
store i32 %9, i32* %1
%10 = load i32, i32* %2
%11 = add nsw i32 -1, %10
store i32 %11, i32* %2
br label %3
12: ; preds = %3
%13 = load i32, i32* %2
%14 = icmp eq i32 %13, 6
%15 = zext i1 %14 to i32
%16 = call i32 @__VERIFIER_assert(i32 %15)
ret void
}

LLVM IR (-O2):
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 10, %0 ], [ %5, %1 ]
%3 = phi i32 [ 1, %0 ], [ %4, %1 ]
%4 = add nuw nsw i32 %3, 2
%5 = add nsw i32 %2, -1
%6 = icmp sgt i32 %2, %4
br i1 %6, label %1, label %7
7: ; preds = %1
%8 = icmp eq i32 %5, 6
%9 = zext i1 %8 to i32
%10 = tail call i32 @__VERIFIER_assert(i32 %9)
ret void
}