xunge/DecIR huggingface dataset:
/* Variables and functions */
int getnpar(int, char *, char *, unsigned short *);
int getnparushort(int n, char *name, unsigned short *ptr) {
  return getnpar(n, name, "u", ptr);
}


x86 assembly (clang, -O0):
<getnparushort>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rcx
lea    0xecb(%rip),%rdx
call   1030 <getnpar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnparushort>:
mov    %rdx,%rcx
lea    0xee6(%rip),%rdx
jmp    1030 <getnpar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"u\00"
define i32 @getnparushort(i32 %0, i8* %1, i16* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i16*
store i32 %0, i32* %4
store i8* %1, i8** %5
store i16* %2, i16** %6
%7 = load i32, i32* %4
%8 = load i8*, i8** %5
%9 = load i16*, i16** %6
%10 = call i32 @getnpar(i32 %7, i8* %8, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i16* %9)
ret i32 %10
}

LLVM IR (-O2):
@.str = [2 x i8] c"u\00"
define i32 @getnparushort(i32 %0, i8* %1, i16* %2) {
%4 = tail call i32 @getnpar(i32 %0, i8* %1, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i16* %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ fn_glutKeyboardFunc(void *);
void glutKeyboardFunc(void *fn) { fn_glutKeyboardFunc(fn); }


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

x86 assembly (clang, -O2):
<glutKeyboardFunc>:
jmp    1030 <fn_glutKeyboardFunc@plt>

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

LLVM IR (-O2):
define void @glutKeyboardFunc(i8* %0) {
%2 = tail call i32 @fn_glutKeyboardFunc(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ setup_gdt_segment_descriptor_bits(int, int /*<<< orphan*/,
                                                     unsigned int,
                                                     unsigned char,
                                                     unsigned char);
void setup_gdt_segment_descriptor(int entryn, unsigned int base,
                                  unsigned char sec, unsigned char gran) {
  setup_gdt_segment_descriptor_bits(entryn, 0, base, sec, gran);
}


x86 assembly (clang, -O0):
<setup_gdt_segment_descriptor>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %cl,%al
mov    %dl,%cl
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %cl,-0x9(%rbp)
mov    %al,-0xa(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%edx
mov    -0x9(%rbp),%al
xor    %esi,%esi
movzbl %al,%ecx
movzbl -0xa(%rbp),%r8d
call   1030 <setup_gdt_segment_descriptor_bits@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<setup_gdt_segment_descriptor>:
mov    %ecx,%r8d
mov    %edx,%ecx
mov    %esi,%edx
xor    %esi,%esi
jmp    1030 <setup_gdt_segment_descriptor_bits@plt>

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

LLVM IR (-O2):
define void @setup_gdt_segment_descriptor(i32 %0, i32 %1, i8 zeroext %2, i8 zeroext %3) {
%5 = tail call i32 @setup_gdt_segment_descriptor_bits(i32 %0, i32 0, i32 %1, i8 zeroext %2, i8 zeroext %3)
ret void
}
/* Variables and functions */
int xatoll_range(char const *, int, int);
int xatoi_range(const char *str, int l, int u) {
  return xatoll_range(str, l, u);
}


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

x86 assembly (clang, -O2):
<xatoi_range>:
jmp    1030 <xatoll_range@plt>

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

LLVM IR (-O2):
define i32 @xatoi_range(i8* %0, i32 %1, i32 %2) {
%4 = tail call i32 @xatoll_range(i8* %0, i32 %1, i32 %2)
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
void textOutAbortHandler() { exit(-1); }


x86 assembly (clang, -O0):
<textOutAbortHandler>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<textOutAbortHandler>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @textOutAbortHandler() {
%1 = call i32 @exit(i32 -1)
unreachable
}

LLVM IR (-O2):
define void @textOutAbortHandler() {
%1 = tail call i32 @exit(i32 -1)
unreachable
}
/* Variables and functions */
scalar_t__ strcasecmp(void const *, void const *);
int dictSdsKeyCaseCompare(void *privdata, const void *key1, const void *key2) {
  return strcasecmp(key1, key2) == 0;
}


x86 assembly (clang, -O0):
<dictSdsKeyCaseCompare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strcasecmp@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dictSdsKeyCaseCompare>:
push   %rax
mov    %rsi,%rdi
mov    %rdx,%rsi
call   1030 <strcasecmp@plt>
xor    %ecx,%ecx
test   %rax,%rax
sete   %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @dictSdsKeyCaseCompare(i8* %0, i8* %1, i8* %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
store i8* %2, i8** %6
%7 = load i8*, i8** %5
%8 = load i8*, i8** %6
%9 = call i64 @strcasecmp(i8* %7, i8* %8)
%10 = icmp eq i64 %9, 0
%11 = zext i1 %10 to i32
ret i32 %11
}

LLVM IR (-O2):
define i32 @dictSdsKeyCaseCompare(i8* nocapture readnone %0, i8* nocapture %1, i8* nocapture %2) {
%4 = tail call i64 @strcasecmp(i8* %1, i8* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
void *malloc(unsigned int);
__attribute((malloc)) void *xalloc(unsigned n) { return malloc(n); }


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

x86 assembly (clang, -O2):
<xalloc>:
jmp    1030 <malloc@plt>

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

LLVM IR (-O2):
define noalias i8* @xalloc(i32 %0) {
%2 = tail call i8* @malloc(i32 %0)
ret i8* %2
}
/* Type definitions */
struct stat {
  int /*<<< orphan*/ st_mode;
};

/* Variables and functions */
scalar_t__ S_ISDIR(int /*<<< orphan*/);
int /*<<< orphan*/ stat(char *, struct stat *);
int file_is_dir(char *path) {
  struct stat buf;
  stat(path, &buf);
  return (int)S_ISDIR(buf.st_mode);
}


x86 assembly (clang, -O0):
<file_is_dir>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1040 <stat@plt>
mov    -0x10(%rbp),%edi
call   1030 <S_ISDIR@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<file_is_dir>:
push   %rax
mov    %rsp,%rsi
call   1040 <stat@plt>
mov    (%rsp),%edi
pop    %rax
jmp    1030 <S_ISDIR@plt>

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_is_dir(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i32 @stat(i8* %4, %struct.stat* %3)
%6 = getelementptr inbounds %struct.stat, %struct.stat* %3, i32 0, i32 0
%7 = load i32, i32* %6
%8 = call i64 @S_ISDIR(i32 %7)
%9 = trunc i64 %8 to i32
ret i32 %9
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_is_dir(i8* nocapture %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i32 @stat(i8* %0, %struct.stat* %2)
%5 = getelementptr inbounds %struct.stat, %struct.stat* %2, i64 0, i32 0
%6 = load i32, i32* %5
%7 = tail call i64 @S_ISDIR(i32 %6)
%8 = trunc i64 %7 to i32
ret i32 %8
}
/* Variables and functions */
double sin(double);
double Dsin(double x) { return sin(x); }


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

x86 assembly (clang, -O2):
<Dsin>:
jmp    1030 <sin@plt>

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

LLVM IR (-O2):
define double @Dsin(double %0) {
%2 = tail call double @sin(double %0)
ret double %2
}
/* Variables and functions */
int /*<<< orphan*/ memcpy(void *, void *, int);
void __attribute__((regparm(3))) memcpy_14(void *dest, void *src) {
  memcpy(dest, src, 14);
}


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

x86 assembly (clang, -O2):
<memcpy_14>:
mov    $0xe,%edx
jmp    1030 <memcpy@plt>

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

LLVM IR (-O2):
define void @memcpy_14(i8* %0, i8* %1) {
%3 = tail call i32 @memcpy(i8* %0, i8* %1, i32 14)
ret void
}
/* Variables and functions */
scalar_t__ calloc(unsigned int, int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int *ivector(int nl, int nh) {
  int *v;
  v = (int *)calloc((unsigned)(nh - nl + 1), sizeof(int));
  if (!v)
    fprintf(stderr, "allocation failure in ivector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<ivector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
sub    -0x4(%rbp),%edi
add    $0x1,%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1165 <ivector+0x45>
mov    0x2e89(%rip),%rax
mov    (%rax),%edi
lea    0xea0(%rip),%rsi
call   1040 <fprintf@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
shl    $0x2,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ivector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x1(%rsi),%edi
mov    $0x4,%esi
call   1030 <calloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1151 <ivector+0x31>
mov    0x2e9d(%rip),%rax
mov    (%rax),%edi
lea    0xeb4(%rip),%rsi
call   1040 <fprintf@plt>
movslq %ebp,%rax
shl    $0x2,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [32 x i8] c"allocation failure in ivector()\00"
define i32* @ivector(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32*
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %4
%7 = load i32, i32* %3
%8 = sub nsw i32 %6, %7
%9 = add nsw i32 %8, 1
%10 = call i64 @calloc(i32 %9, i32 4)
%11 = inttoptr i64 %10 to i32*
store i32* %11, i32** %5
%12 = load i32*, i32** %5
%13 = icmp ne i32* %12, null
br i1 %13, label %17, label %14
14: ; preds = %2
%15 = load i32, i32* @stderr
%16 = call i32 @fprintf(i32 %15, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %17
17: ; preds = %14, %2
%18 = load i32*, i32** %5
%19 = load i32, i32* %3
%20 = sext i32 %19 to i64
%21 = sub i64 0, %20
%22 = getelementptr inbounds i32, i32* %18, i64 %21
ret i32* %22
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [32 x i8] c"allocation failure in ivector()\00"
define i32* @ivector(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = tail call i64 @calloc(i32 %4, i32 4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = load i32, i32* @stderr
%9 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %10
10: ; preds = %7, %2
%11 = inttoptr i64 %5 to i32*
%12 = sext i32 %0 to i64
%13 = sub nsw i64 0, %12
%14 = getelementptr inbounds i32, i32* %11, i64 %13
ret i32* %14
}
char *convert(unsigned int num, int base) {
  static char buf[33];
  char *ptr;
  ptr = &buf[sizeof(buf) - 1];
  *ptr = '\0';
  do {
    *--ptr = "0123456789abcdef"[num % base];
    num /= base;
  } while (num != 0);
  return (ptr);
}


x86 assembly (clang, -O0):
<convert>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
lea    0x2f1f(%rip),%rax
add    $0x20,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x4(%rbp),%eax
xor    %edx,%edx
divl   -0x8(%rbp)
mov    %edx,%eax
mov    %eax,%ecx
lea    0xecd(%rip),%rax
mov    (%rax,%rcx,1),%cl
mov    -0x10(%rbp),%rax
mov    %rax,%rdx
add    $0xffffffffffffffff,%rdx
mov    %rdx,-0x10(%rbp)
mov    %cl,-0x1(%rax)
mov    -0x8(%rbp),%ecx
mov    -0x4(%rbp),%eax
xor    %edx,%edx
div    %ecx
mov    %eax,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jne    1120 <convert+0x20>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<convert>:
movb   $0x0,0x2f49(%rip)
lea    0x2f42(%rip),%rcx
lea    0xeeb(%rip),%r8
cs nopw 0x0(%rax,%rax,1)
nop
mov    %edi,%eax
xor    %edx,%edx
div    %esi
movzbl (%rdx,%r8,1),%edx
mov    %dl,-0x1(%rcx)
add    $0xffffffffffffffff,%rcx
cmp    %esi,%edi
mov    %eax,%edi
jae    1120 <convert+0x20>
mov    %rcx,%rax
ret

LLVM IR (-O0):
@convert.buf = internal global [33 x i8] zeroinitializer
@.str = [17 x i8] c"0123456789abcdef\00"
define i8* @convert(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
store i32 %0, i32* %3
store i32 %1, i32* %4
store i8* getelementptr inbounds ([33 x i8], [33 x i8]* @convert.buf, i64 0, i64 32), i8** %5
%6 = load i8*, i8** %5
store i8 0, i8* %6
br label %7
7: ; preds = %19, %2
%8 = load i32, i32* %3
%9 = load i32, i32* %4
%10 = urem i32 %8, %9
%11 = zext i32 %10 to i64
%12 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %11
%13 = load i8, i8* %12
%14 = load i8*, i8** %5
%15 = getelementptr inbounds i8, i8* %14, i32 -1
store i8* %15, i8** %5
store i8 %13, i8* %15
%16 = load i32, i32* %4
%17 = load i32, i32* %3
%18 = udiv i32 %17, %16
store i32 %18, i32* %3
br label %19
19: ; preds = %7
%20 = load i32, i32* %3
%21 = icmp ne i32 %20, 0
br i1 %21, label %7, label %22
22: ; preds = %19
%23 = load i8*, i8** %5
ret i8* %23
}

LLVM IR (-O2):
@convert.buf = internal global [33 x i8] zeroinitializer
@.str = [17 x i8] c"0123456789abcdef\00"
define i8* @convert(i32 %0, i32 %1) {
store i8 0, i8* getelementptr inbounds ([33 x i8], [33 x i8]* @convert.buf, i64 0, i64 32)
br label %3
3: ; preds = %3, %2
%4 = phi i32 [ %0, %2 ], [ %11, %3 ]
%5 = phi i8* [ getelementptr inbounds ([33 x i8], [33 x i8]* @convert.buf, i64 0, i64 32), %2 ], [ %10, %3 ]
%6 = urem i32 %4, %1
%7 = zext i32 %6 to i64
%8 = getelementptr inbounds [17 x i8], [17 x i8]* @.str, i64 0, i64 %7
%9 = load i8, i8* %8
%10 = getelementptr inbounds i8, i8* %5, i64 -1
store i8 %9, i8* %10
%11 = udiv i32 %4, %1
%12 = icmp ult i32 %4, %1
br i1 %12, label %13, label %3
13: ; preds = %3
ret i8* %10
}
void __attribute__((format(printf, 3, 4)))
ATH5K_DBG(struct ath5k_softc *sc, unsigned int m, const char *fmt, ...) {}


x86 assembly (clang, -O0):
<ATH5K_DBG>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.ath5k_softc = type opaque
define void @ATH5K_DBG(%struct.ath5k_softc* %0, i32 %1, i8* %2, ...) {
%4 = alloca %struct.ath5k_softc*
%5 = alloca i32
%6 = alloca i8*
store %struct.ath5k_softc* %0, %struct.ath5k_softc** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
ret void
}

LLVM IR (-O2):
%struct.ath5k_softc = type opaque
define void @ATH5K_DBG(%struct.ath5k_softc* nocapture %0, i32 %1, i8* nocapture %2, ...) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ U_WMRNOTIMPLEMENTED_swap(char *, int);
void U_WMR59_swap(char *record, int torev) {
  U_WMRNOTIMPLEMENTED_swap(record, torev);
}


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

x86 assembly (clang, -O2):
<U_WMR59_swap>:
jmp    1030 <U_WMRNOTIMPLEMENTED_swap@plt>

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

LLVM IR (-O2):
define void @U_WMR59_swap(i8* %0, i32 %1) {
%3 = tail call i32 @U_WMRNOTIMPLEMENTED_swap(i8* %0, i32 %1)
ret void
}
void pm_system_lp(const char *const progName, void stdinFeeder(int, void *),
                  void *const feederParm, void stdoutAccepter(int, void *),
                  void *const accepterParm, ...) {}


x86 assembly (clang, -O0):
<pm_system_lp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
define void @pm_system_lp(i8* %0, void (i32, i8*)* %1, i8* %2, void (i32, i8*)* %3, i8* %4, ...) {
%6 = alloca i8*
%7 = alloca void (i32, i8*)*
%8 = alloca i8*
%9 = alloca void (i32, i8*)*
%10 = alloca i8*
store i8* %0, i8** %6
store void (i32, i8*)* %1, void (i32, i8*)** %7
store i8* %2, i8** %8
store void (i32, i8*)* %3, void (i32, i8*)** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
define void @pm_system_lp(i8* nocapture %0, void (i32, i8*)* nocapture %1, i8* nocapture %2, void (i32, i8*)* nocapture %3, i8* nocapture %4, ...) {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int /*<<< orphan*/ _mm_set_ps1(float);
__m128 test_mm_set_ps1(float A) { return _mm_set_ps1(A); }


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

x86 assembly (clang, -O2):
<test_mm_set_ps1>:
jmp    1030 <_mm_set_ps1@plt>

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

LLVM IR (-O2):
define i32 @test_mm_set_ps1(float %0) {
%2 = tail call i32 @_mm_set_ps1(float %0)
ret i32 %2
}
/* Type definitions */
typedef union pthread_attr_t {
  int dummy;
} pthread_attr_t;

/* Variables and functions */
void *malloc(unsigned long);
int /*<<< orphan*/ pthread_create(unsigned long *, union pthread_attr_t const *,
                                  void *(*)(void *), void *);
unsigned long int *createThread(void *function, void *argument) {
  unsigned long int *thread;
  void *tmp;
  tmp = malloc(8ul);
  thread = (unsigned long int *)tmp;
  pthread_create((unsigned long int *)thread,
                 ((const union pthread_attr_t *)((void *)0)),
                 (void *(*)(void *))function, (void *)argument);
  return thread;
}


x86 assembly (clang, -O0):
<createThread>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%esi
call   1040 <pthread_create@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<createThread>:
push   %r15
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%r15
mov    $0x8,%edi
call   1030 <malloc@plt>
mov    %rax,%rbx
mov    %rax,%rdi
xor    %esi,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1040 <pthread_create@plt>
mov    %rbx,%rax
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
%union.pthread_attr_t = type { i32 }
define i64* @createThread(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i64*
%6 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = call i8* @malloc(i64 8)
store i8* %7, i8** %6
%8 = load i8*, i8** %6
%9 = bitcast i8* %8 to i64*
store i64* %9, i64** %5
%10 = load i64*, i64** %5
%11 = load i8*, i8** %3
%12 = bitcast i8* %11 to i8* (i8*)*
%13 = load i8*, i8** %4
%14 = call i32 @pthread_create(i64* %10, %union.pthread_attr_t* null, i8* (i8*)* %12, i8* %13)
%15 = load i64*, i64** %5
ret i64* %15
}

LLVM IR (-O2):
%union.pthread_attr_t = type { i32 }
define i64* @createThread(i8* %0, i8* %1) {
%3 = tail call dereferenceable_or_null(8) i8* @malloc(i64 8)
%4 = bitcast i8* %3 to i64*
%5 = bitcast i8* %0 to i8* (i8*)*
%6 = tail call i32 @pthread_create(i64* %4, %union.pthread_attr_t* null, i8* (i8*)* %5, i8* %1)
ret i64* %4
}
void emit_maybe_just(struct processor_explicatory_state *process_state,
                     struct modern_stream *stream, void *stream_state,
                     struct modern_vfile *vfile, void *vfile_state) {}


x86 assembly (clang, -O0):
<emit_maybe_just>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
pop    %rbp
ret

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

LLVM IR (-O0):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_maybe_just(%struct.processor_explicatory_state* %0, %struct.modern_stream* %1, i8* %2, %struct.modern_vfile* %3, i8* %4) {
%6 = alloca %struct.processor_explicatory_state*
%7 = alloca %struct.modern_stream*
%8 = alloca i8*
%9 = alloca %struct.modern_vfile*
%10 = alloca i8*
store %struct.processor_explicatory_state* %0, %struct.processor_explicatory_state** %6
store %struct.modern_stream* %1, %struct.modern_stream** %7
store i8* %2, i8** %8
store %struct.modern_vfile* %3, %struct.modern_vfile** %9
store i8* %4, i8** %10
ret void
}

LLVM IR (-O2):
%struct.processor_explicatory_state = type opaque
%struct.modern_stream = type opaque
%struct.modern_vfile = type opaque
define void @emit_maybe_just(%struct.processor_explicatory_state* nocapture %0, %struct.modern_stream* nocapture %1, i8* nocapture %2, %struct.modern_vfile* nocapture %3, i8* nocapture %4) {
ret void
}
/* Variables and functions */
int bp_sw_base_from_char(char);
int bp_sw_base_number_func(int type, void *data, char *seq) {
  return bp_sw_base_from_char(*seq);
}


x86 assembly (clang, -O0):
<bp_sw_base_number_func>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movsbl (%rax),%edi
call   1030 <bp_sw_base_from_char@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<bp_sw_base_number_func>:
movsbl (%rdx),%edi
jmp    1030 <bp_sw_base_from_char@plt>

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

LLVM IR (-O2):
define i32 @bp_sw_base_number_func(i32 %0, i8* nocapture readnone %1, i8* nocapture %2) {
%4 = load i8, i8* %2
%5 = tail call i32 @bp_sw_base_from_char(i8 signext %4)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sdb_error(char *);
void alloc_fail(void) { sdb_error("Memory allocation failure"); }


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

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

LLVM IR (-O0):
@.str = [26 x i8] c"Memory allocation failure\00"
define void @alloc_fail() {
%1 = call i32 @sdb_error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [26 x i8] c"Memory allocation failure\00"
define void @alloc_fail() {
%1 = tail call i32 @sdb_error(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
ret void
}
void glmGenerateIdentityMatrix3d(double m[9]) {
  m[0] = 1;
  m[3] = 0;
  m[6] = 0;
  m[1] = 0;
  m[4] = 1;
  m[7] = 0;
  m[2] = 0;
  m[5] = 0;
  m[8] = 1;
}


x86 assembly (clang, -O0):
<glmGenerateIdentityMatrix3d>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsd  0xeec(%rip),%xmm0
movsd  %xmm0,(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x18(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x30(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x8(%rax)
mov    -0x8(%rbp),%rax
movsd  0xeb8(%rip),%xmm0
movsd  %xmm0,0x20(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x38(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x10(%rax)
mov    -0x8(%rbp),%rax
xorps  %xmm0,%xmm0
movsd  %xmm0,0x28(%rax)
mov    -0x8(%rbp),%rax
movsd  0xe83(%rip),%xmm0
movsd  %xmm0,0x40(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<glmGenerateIdentityMatrix3d>:
movsd  0xef8(%rip),%xmm0
movups %xmm0,(%rdi)
xorps  %xmm1,%xmm1
movups %xmm1,0x30(%rdi)
movups %xmm1,0x10(%rdi)
movups %xmm0,0x20(%rdi)
movabs $0x3ff0000000000000,%rax
mov    %rax,0x40(%rdi)
ret

LLVM IR (-O0):
define void @glmGenerateIdentityMatrix3d(double* %0) {
%2 = alloca double*
store double* %0, double** %2
%3 = load double*, double** %2
%4 = getelementptr inbounds double, double* %3, i64 0
store double 1.000000e+00, double* %4
%5 = load double*, double** %2
%6 = getelementptr inbounds double, double* %5, i64 3
store double 0.000000e+00, double* %6
%7 = load double*, double** %2
%8 = getelementptr inbounds double, double* %7, i64 6
store double 0.000000e+00, double* %8
%9 = load double*, double** %2
%10 = getelementptr inbounds double, double* %9, i64 1
store double 0.000000e+00, double* %10
%11 = load double*, double** %2
%12 = getelementptr inbounds double, double* %11, i64 4
store double 1.000000e+00, double* %12
%13 = load double*, double** %2
%14 = getelementptr inbounds double, double* %13, i64 7
store double 0.000000e+00, double* %14
%15 = load double*, double** %2
%16 = getelementptr inbounds double, double* %15, i64 2
store double 0.000000e+00, double* %16
%17 = load double*, double** %2
%18 = getelementptr inbounds double, double* %17, i64 5
store double 0.000000e+00, double* %18
%19 = load double*, double** %2
%20 = getelementptr inbounds double, double* %19, i64 8
store double 1.000000e+00, double* %20
ret void
}

LLVM IR (-O2):
define void @glmGenerateIdentityMatrix3d(double* nocapture writeonly %0) {
%2 = getelementptr inbounds double, double* %0, i64 6
%3 = bitcast double* %0 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 0.000000e+00>, <2 x double>* %3
%4 = getelementptr inbounds double, double* %0, i64 4
%5 = bitcast double* %2 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %5
%6 = getelementptr inbounds double, double* %0, i64 2
%7 = bitcast double* %6 to <2 x double>*
store <2 x double> zeroinitializer, <2 x double>* %7
%8 = bitcast double* %4 to <2 x double>*
store <2 x double> <double 1.000000e+00, double 0.000000e+00>, <2 x double>* %8
%9 = getelementptr inbounds double, double* %0, i64 8
store double 1.000000e+00, double* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ iasm_parse();
void parse(void) { iasm_parse(); }


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

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

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

LLVM IR (-O2):
define void @parse() {
%1 = tail call i32 (...) @iasm_parse()
ret void
}
int test_imm_8Duint8_reg(unsigned char val) {
  return ((val) & (0x8D << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_8Duint8_reg(i8 zeroext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = and i32 %4, 141
%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_8Duint8_reg(i8 zeroext %0) {
%2 = and i8 %0, -115
%3 = icmp eq i8 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
void R_SurfacePatch(void) {}


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

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

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

LLVM IR (-O2):
define void @R_SurfacePatch() {
ret void
}
void GLimp_BeginFrame(float camera_separation) {}


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

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

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

LLVM IR (-O2):
define void @GLimp_BeginFrame(float %0) {
ret void
}
/* Variables and functions */
int strcmp(char *, char *);
int str_cmp(void *elem1, void *elem2) {
  char *s1 = *(char **)elem1;
  char *s2 = *(char **)elem2;
  return strcmp(s1, s2);
}


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

x86 assembly (clang, -O2):
<str_cmp>:
mov    (%rdi),%rdi
mov    (%rsi),%rsi
jmp    1030 <strcmp@plt>

LLVM IR (-O0):
define i32 @str_cmp(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**
%9 = load i8*, i8** %8
store i8* %9, i8** %5
%10 = load i8*, i8** %4
%11 = bitcast i8* %10 to i8**
%12 = load i8*, i8** %11
store i8* %12, i8** %6
%13 = load i8*, i8** %5
%14 = load i8*, i8** %6
%15 = call i32 @strcmp(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @str_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to i8**
%4 = load i8*, i8** %3
%5 = bitcast i8* %1 to i8**
%6 = load i8*, i8** %5
%7 = tail call i32 @strcmp(i8* dereferenceable(1) %4, i8* dereferenceable(1) %6)
ret i32 %7
}
int f(int b, int c) {
  int a = (short)b * (short)c;
  return a;
}


x86 assembly (clang, -O0):
<f>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
cwtl
mov    -0x8(%rbp),%ecx
movswl %cx,%ecx
imul   %ecx,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<f>:
movswl %di,%ecx
movswl %si,%eax
imul   %ecx,%eax
ret

LLVM IR (-O0):
define i32 @f(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = trunc i32 %6 to i16
%8 = sext i16 %7 to i32
%9 = load i32, i32* %4
%10 = trunc i32 %9 to i16
%11 = sext i16 %10 to i32
%12 = mul nsw i32 %8, %11
store i32 %12, i32* %5
%13 = load i32, i32* %5
ret i32 %13
}

LLVM IR (-O2):
define i32 @f(i32 %0, i32 %1) {
%3 = shl i32 %0, 16
%4 = ashr exact i32 %3, 16
%5 = shl i32 %1, 16
%6 = ashr exact i32 %5, 16
%7 = mul nsw i32 %6, %4
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ bzero(char *, int);
char *malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
void AllocateMemory(char **s, int l, char *d) {
  *s = malloc(l + 1);
  bzero(*s, l + 1);
  memcpy(*s, d, l);
}


x86 assembly (clang, -O0):
<AllocateMemory>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0xc(%rbp),%edi
add    $0x1,%edi
call   1040 <malloc@plt>
mov    %rax,%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0xc(%rbp),%esi
add    $0x1,%esi
call   1050 <bzero@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
mov    -0x18(%rbp),%rsi
mov    -0xc(%rbp),%edx
call   1030 <memcpy@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<AllocateMemory>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rdx,%r14
mov    %esi,%r12d
mov    %rdi,%r15
lea    0x1(%r12),%ebp
mov    %ebp,%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
mov    %rax,(%r15)
mov    %rax,%rdi
mov    %ebp,%esi
call   1050 <bzero@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r12d,%edx
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <memcpy@plt>

LLVM IR (-O0):
define void @AllocateMemory(i8** %0, i32 %1, i8* %2) {
%4 = alloca i8**
%5 = alloca i32
%6 = alloca i8*
store i8** %0, i8*** %4
store i32 %1, i32* %5
store i8* %2, i8** %6
%7 = load i32, i32* %5
%8 = add nsw i32 %7, 1
%9 = call i8* @malloc(i32 %8)
%10 = load i8**, i8*** %4
store i8* %9, i8** %10
%11 = load i8**, i8*** %4
%12 = load i8*, i8** %11
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
%15 = call i32 @bzero(i8* %12, i32 %14)
%16 = load i8**, i8*** %4
%17 = load i8*, i8** %16
%18 = load i8*, i8** %6
%19 = load i32, i32* %5
%20 = call i32 @memcpy(i8* %17, i8* %18, i32 %19)
ret void
}

LLVM IR (-O2):
define void @AllocateMemory(i8** nocapture writeonly %0, i32 %1, i8* %2) {
%4 = add nsw i32 %1, 1
%5 = tail call i8* @malloc(i32 %4)
store i8* %5, i8** %0
%6 = tail call i32 @bzero(i8* %5, i32 %4)
%7 = tail call i32 @memcpy(i8* %5, i8* %2, i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ time_t;
struct tm {
  int dummy;
};

/* Variables and functions */
struct tm *localtime(int /*<<< orphan*/ *);
int /*<<< orphan*/ strftime(char *, size_t, char *, struct tm *);
int /*<<< orphan*/ time(int /*<<< orphan*/ *);
void getnow(char *timestr, size_t len) {
  time_t t = time(NULL);
  struct tm *info;
  info = localtime(&t);
  strftime(timestr, len, "%a %b %d %Y at %H:%M:%S %Z", info);
}


x86 assembly (clang, -O0):
<getnow>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   1040 <time@plt>
mov    %eax,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1030 <localtime@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rcx
lea    0xe94(%rip),%rdx
call   1050 <strftime@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getnow>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
call   1040 <time@plt>
mov    %eax,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1030 <localtime@plt>
lea    0xeaa(%rip),%rdx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %rax,%rcx
call   1050 <strftime@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.tm = type { i32 }
@.str = [27 x i8] c"%a %b %d %Y at %H:%M:%S %Z\00"
define void @getnow(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
%5 = alloca i32
%6 = alloca %struct.tm*
store i8* %0, i8** %3
store i64 %1, i64* %4
%7 = call i32 @time(i32* null)
store i32 %7, i32* %5
%8 = call %struct.tm* @localtime(i32* %5)
store %struct.tm* %8, %struct.tm** %6
%9 = load i8*, i8** %3
%10 = load i64, i64* %4
%11 = load %struct.tm*, %struct.tm** %6
%12 = call i32 @strftime(i8* %9, i64 %10, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), %struct.tm* %11)
ret void
}

LLVM IR (-O2):
%struct.tm = type { i32 }
@.str = [27 x i8] c"%a %b %d %Y at %H:%M:%S %Z\00"
define void @getnow(i8* %0, i64 %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
%5 = tail call i32 @time(i32* null)
store i32 %5, i32* %3
%6 = call %struct.tm* @localtime(i32* %3)
%7 = call i32 @strftime(i8* %0, i64 %1, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0), %struct.tm* %6)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ mvprintw(int, int, char *);
void drawItem(int x, int y) {
  mvprintw(y, x, "[*]");
  mvprintw(y - 1, x, "=^=");
}


x86 assembly (clang, -O0):
<drawItem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x4(%rbp),%esi
lea    0xed5(%rip),%rdx
call   1030 <mvprintw@plt>
mov    -0x8(%rbp),%edi
sub    $0x1,%edi
mov    -0x4(%rbp),%esi
lea    0xec4(%rip),%rdx
call   1030 <mvprintw@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawItem>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xee2(%rip),%rdx
mov    %esi,%edi
mov    %ebp,%esi
call   1030 <mvprintw@plt>
add    $0xffffffff,%ebx
lea    0xed3(%rip),%rdx
mov    %ebx,%edi
mov    %ebp,%esi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <mvprintw@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"[*]\00"
@.str.1 = [4 x i8] c"=^=\00"
define void @drawItem(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %4
%6 = load i32, i32* %3
%7 = call i32 @mvprintw(i32 %5, i32 %6, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %4
%9 = sub nsw i32 %8, 1
%10 = load i32, i32* %3
%11 = call i32 @mvprintw(i32 %9, i32 %10, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"[*]\00"
@.str.1 = [4 x i8] c"=^=\00"
define void @drawItem(i32 %0, i32 %1) {
%3 = tail call i32 @mvprintw(i32 %1, i32 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%4 = add nsw i32 %1, -1
%5 = tail call i32 @mvprintw(i32 %4, i32 %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void av_find_info_tag() {}


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

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

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

LLVM IR (-O2):
define void @av_find_info_tag() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ scanf(char *, int *);
int siniflandir(int);
int main() {
  int alinan_not;
  printf("Yuzluk sistemdeki notunuzu giriniz:");
  scanf("%d", &alinan_not);
  int beslik_sistemde_not;
  beslik_sistemde_not = siniflandir(alinan_not);
  printf("Yuzluk sistemdeki %d notunuzun beslik sistemdeki degeri %d",
         alinan_not, beslik_sistemde_not);
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [36 x i8] c"Yuzluk sistemdeki notunuzu giriniz:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [59 x i8] c"Yuzluk sistemdeki %d notunuzun beslik sistemdeki degeri %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
store i32 0, i32* %1
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%5 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %2)
%6 = load i32, i32* %2
%7 = call i32 @siniflandir(i32 %6)
store i32 %7, i32* %3
%8 = load i32, i32* %2
%9 = load i32, i32* %3
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %8, i32 %9)
ret i32 0
}

LLVM IR (-O2):
@.str = [36 x i8] c"Yuzluk sistemdeki notunuzu giriniz:\00"
@.str.1 = [3 x i8] c"%d\00"
@.str.2 = [59 x i8] c"Yuzluk sistemdeki %d notunuzun beslik sistemdeki degeri %d\00"
define i32 @main() {
%1 = alloca i32
%2 = bitcast i32* %1 to i8*
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([36 x i8], [36 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @scanf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%5 = load i32, i32* %1
%6 = call i32 @siniflandir(i32 %5)
%7 = load i32, i32* %1
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.2, i64 0, i64 0), i32 %7, i32 %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ EX_USAGE;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char const *);
int /*<<< orphan*/ stderr;
void usage(const char *progname) {
  fprintf(stderr, "%s inputfile\n", progname);
  exit(EX_USAGE);
}


x86 assembly (clang, -O0):
<usage>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    0x2ea5(%rip),%rax
mov    (%rax),%edi
mov    -0x8(%rbp),%rdx
lea    0xec0(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2e9c(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<usage>:
push   %rax
mov    %rdi,%rdx
mov    0x2ead(%rip),%rax
mov    (%rax),%edi
lea    0xecc(%rip),%rsi
call   1030 <fprintf@plt>
mov    0x2ea8(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [14 x i8] c"%s inputfile\0A\00"
@EX_USAGE = global i32 0
define void @usage(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i32, i32* @stderr
%4 = load i8*, i8** %2
%5 = call i32 @fprintf(i32 %3, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = load i32, i32* @EX_USAGE
%7 = call i32 @exit(i32 %6)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [14 x i8] c"%s inputfile\0A\00"
@EX_USAGE = global i32 0
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = load i32, i32* @EX_USAGE
%5 = tail call i32 @exit(i32 %4)
unreachable
}
/* Variables and functions */
scalar_t__ getcwd(char *, int);
char *strncat(char *, char *, int);
char *get_app_path(void) {
  static char buf[1024];
  if (getcwd(buf, 1024)) {
    return strncat(buf, "/", 1024);
  } else {
    return "";
  }
}


x86 assembly (clang, -O0):
<get_app_path>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0x2f11(%rip),%rdi
mov    $0x400,%esi
call   1030 <getcwd@plt>
cmp    $0x0,%rax
je     1164 <get_app_path+0x44>
lea    0x2ef6(%rip),%rdi
lea    0xeaf(%rip),%rsi
mov    $0x400,%edx
call   1040 <strncat@plt>
mov    %rax,-0x8(%rbp)
jmp    116f <get_app_path+0x4f>
lea    0xe96(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<get_app_path>:
push   %rax
lea    0x2f18(%rip),%rdi
mov    $0x400,%esi
call   1030 <getcwd@plt>
test   %rax,%rax
je     1150 <get_app_path+0x30>
lea    0x2f02(%rip),%rdi
lea    0xebb(%rip),%rsi
mov    $0x400,%edx
pop    %rax
jmp    1040 <strncat@plt>
lea    0xeaa(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@get_app_path.buf = internal global [1024 x i8] zeroinitializer
@.str = [2 x i8] c"/\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @get_app_path() {
%1 = alloca i8*
%2 = call i64 @getcwd(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_app_path.buf, i64 0, i64 0), i32 1024)
%3 = icmp ne i64 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %0
%5 = call i8* @strncat(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_app_path.buf, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1024)
store i8* %5, i8** %1
br label %7
6: ; preds = %0
store i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), i8** %1
br label %7
7: ; preds = %6, %4
%8 = load i8*, i8** %1
ret i8* %8
}

LLVM IR (-O2):
@get_app_path.buf = internal global [1024 x i8] zeroinitializer
@.str = [2 x i8] c"/\00"
@.str.1 = [1 x i8] zeroinitializer
define i8* @get_app_path() {
%1 = tail call i64 @getcwd(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_app_path.buf, i64 0, i64 0), i32 1024)
%2 = icmp eq i64 %1, 0
br i1 %2, label %5, label %3
3: ; preds = %0
%4 = tail call i8* @strncat(i8* getelementptr inbounds ([1024 x i8], [1024 x i8]* @get_app_path.buf, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0), i32 1024)
br label %5
5: ; preds = %0, %3
%6 = phi i8* [ %4, %3 ], [ getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0), %0 ]
ret i8* %6
}
void mutex_clear_owner(struct mutex *lock) {}


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

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

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

LLVM IR (-O2):
%struct.mutex = type opaque
define void @mutex_clear_owner(%struct.mutex* nocapture %0) {
ret void
}
unsigned int zext8(p)
unsigned char *p;
{ return *p; }


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

x86 assembly (clang, -O2):
<zext8>:
movzbl (%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @zext8(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = zext i8 %2 to i32
ret i32 %3
}
/* Type definitions */
struct lifo {
  int dummy;
};

/* Variables and functions */
double cosh(double);
double pop(struct lifo *);
double opr_cosh(struct lifo *stack) {
  double op = pop(stack);
  return cosh(op);
}


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

x86 assembly (clang, -O2):
<opr_cosh>:
push   %rax
call   1040 <pop@plt>
pop    %rax
jmp    1030 <cosh@plt>

LLVM IR (-O0):
%struct.lifo = type { i32 }
define double @opr_cosh(%struct.lifo* %0) {
%2 = alloca %struct.lifo*
%3 = alloca double
store %struct.lifo* %0, %struct.lifo** %2
%4 = load %struct.lifo*, %struct.lifo** %2
%5 = call double @pop(%struct.lifo* %4)
store double %5, double* %3
%6 = load double, double* %3
%7 = call double @cosh(double %6)
ret double %7
}

LLVM IR (-O2):
%struct.lifo = type { i32 }
define double @opr_cosh(%struct.lifo* %0) {
%2 = tail call double @pop(%struct.lifo* %0)
%3 = tail call double @cosh(double %2)
ret double %3
}
/* Type definitions */
typedef int /*<<< orphan*/ u_int32_t;

/* Variables and functions */
u_int32_t drv_received(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @drv_received() {
ret i32 0
}