xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ lgen(char *, char *, int);
void cgdefl(int v) { lgen("%s\toffset %c%d", "dw", v); }


x86 assembly (clang, -O0):
<cgdefl>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xee3(%rip),%rsi
call   1030 <lgen@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cgdefl>:
mov    %edi,%edx
lea    0xee7(%rip),%rdi
lea    0xeef(%rip),%rsi
jmp    1030 <lgen@plt>

LLVM IR (-O0):
@.str = [15 x i8] c"%s\09offset %c%d\00"
@.str.1 = [3 x i8] c"dw\00"
define void @cgdefl(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @lgen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %3)
ret void
}

LLVM IR (-O2):
@.str = [15 x i8] c"%s\09offset %c%d\00"
@.str.1 = [3 x i8] c"dw\00"
define void @cgdefl(i32 %0) {
%2 = tail call i32 @lgen(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, float);
int /*<<< orphan*/ scanf(char *, float *, float *, float *);
int main() {
  float u, n, s, cena;
  scanf("%f%f%f", &u, &n, &s);
  cena = s / ((u / 2) + n);
  printf("%.2f", cena);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xed5(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
lea    -0xc(%rbp),%rcx
call   1040 <scanf@plt>
movss  -0xc(%rbp),%xmm0
movss  -0x4(%rbp),%xmm1
movss  0xeae(%rip),%xmm2
divss  %xmm2,%xmm1
addss  -0x8(%rbp),%xmm1
divss  %xmm1,%xmm0
movss  %xmm0,-0x10(%rbp)
movss  -0x10(%rbp),%xmm0
lea    0xe9b(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x18,%rsp
lea    0xed9(%rip),%rdi
lea    0x14(%rsp),%rsi
lea    0x10(%rsp),%rdx
lea    0xc(%rsp),%rcx
call   1040 <scanf@plt>
movss  0x14(%rsp),%xmm1
mulss  0xeb3(%rip),%xmm1
movss  0xc(%rsp),%xmm0
addss  0x10(%rsp),%xmm1
divss  %xmm1,%xmm0
lea    0xea7(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x18,%rsp
ret

LLVM IR (-O0):
@.str = [7 x i8] c"%f%f%f\00"
@.str.1 = [5 x i8] c"%.2f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = alloca float
%5 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
%6 = load float, float* %3
%7 = load float, float* %1
%8 = fdiv float %7, 2.000000e+00
%9 = load float, float* %2
%10 = fadd float %8, %9
%11 = fdiv float %6, %10
store float %11, float* %4
%12 = load float, float* %4
%13 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %12)
ret i32 0
}

LLVM IR (-O2):
@.str = [7 x i8] c"%f%f%f\00"
@.str.1 = [5 x i8] c"%.2f\00"
define i32 @main() {
%1 = alloca float
%2 = alloca float
%3 = alloca float
%4 = bitcast float* %1 to i8*
%5 = bitcast float* %2 to i8*
%6 = bitcast float* %3 to i8*
%7 = call i32 @scanf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), float* %1, float* %2, float* %3)
%8 = load float, float* %3
%9 = load float, float* %1
%10 = fmul float %9, 5.000000e-01
%11 = load float, float* %2
%12 = fadd float %10, %11
%13 = fdiv float %8, %12
%14 = call i32 @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0), float %13)
ret i32 0
}
int fll3(int j, signed short *b, long long i) { return j + b[i]; }


x86 assembly (clang, -O0):
<fll3>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x10(%rbp),%rcx
mov    -0x18(%rbp),%rdx
movswl (%rcx,%rdx,2),%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<fll3>:
movswl (%rsi,%rdx,2),%eax
add    %edi,%eax
ret

LLVM IR (-O0):
define i32 @fll3(i32 %0, i16* %1, i64 %2) {
%4 = alloca i32
%5 = alloca i16*
%6 = alloca i64
store i32 %0, i32* %4
store i16* %1, i16** %5
store i64 %2, i64* %6
%7 = load i32, i32* %4
%8 = load i16*, i16** %5
%9 = load i64, i64* %6
%10 = getelementptr inbounds i16, i16* %8, i64 %9
%11 = load i16, i16* %10
%12 = sext i16 %11 to i32
%13 = add nsw i32 %7, %12
ret i32 %13
}

LLVM IR (-O2):
define i32 @fll3(i32 %0, i16* nocapture %1, i64 %2) {
%4 = getelementptr inbounds i16, i16* %1, i64 %2
%5 = load i16, i16* %4
%6 = sext i16 %5 to i32
%7 = add nsw i32 %6, %0
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ foo(int);
int main() {
  foo(100);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @foo(i32 100)
ret i32 0
}
/* Variables and functions */
void *xbp_dlopen(char const *, int);
void *__wrap_dlopen(const char *filename, int flag) {
  return xbp_dlopen(filename, flag);
}


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

x86 assembly (clang, -O2):
<__wrap_dlopen>:
jmp    1030 <xbp_dlopen@plt>

LLVM IR (-O0):
define i8* @__wrap_dlopen(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 i8* @xbp_dlopen(i8* %5, i32 %6)
ret i8* %7
}

LLVM IR (-O2):
define i8* @__wrap_dlopen(i8* %0, i32 %1) {
%3 = tail call i8* @xbp_dlopen(i8* %0, i32 %1)
ret i8* %3
}
/* Type definitions */
typedef int /*<<< orphan*/ va_list;

/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ verror_errf(int, char const *, int /*<<< orphan*/);
void vdie_errf(int status, int errcode, const char *msg, va_list ap) {
  verror_errf(errcode, msg, ap);
  exit(status);
}


x86 assembly (clang, -O0):
<vdie_errf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%edi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%edx
call   1040 <verror_errf@plt>
mov    -0x4(%rbp),%edi
call   1030 <exit@plt>

x86 assembly (clang, -O2):
<vdie_errf>:
push   %rbx
mov    %edi,%ebx
mov    %esi,%edi
mov    %rdx,%rsi
mov    %ecx,%edx
call   1040 <verror_errf@plt>
mov    %ebx,%edi
call   1030 <exit@plt>

LLVM IR (-O0):
define void @vdie_errf(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i8* %2, i8** %7
store i32 %3, i32* %8
%9 = load i32, i32* %6
%10 = load i8*, i8** %7
%11 = load i32, i32* %8
%12 = call i32 @verror_errf(i32 %9, i8* %10, i32 %11)
%13 = load i32, i32* %5
%14 = call i32 @exit(i32 %13)
unreachable
}

LLVM IR (-O2):
define void @vdie_errf(i32 %0, i32 %1, i8* %2, i32 %3) {
%5 = tail call i32 @verror_errf(i32 %1, i8* %2, i32 %3)
%6 = tail call i32 @exit(i32 %0)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ decrease_speed();
void slow_down() { decrease_speed(); }


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

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

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

LLVM IR (-O2):
define void @slow_down() {
%1 = tail call i32 (...) @decrease_speed()
ret void
}
/* Type definitions */
typedef int uint8_t;
typedef int uint16_t;

/* Variables and functions */
uint8_t instruction_extension_extract_register(uint16_t instruction) {
  return (instruction >> 0x0C) & 0x07;
}


x86 assembly (clang, -O0):
<instruction_extension_extract_register>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sar    $0xc,%eax
and    $0x7,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<instruction_extension_extract_register>:
mov    %edi,%eax
shr    $0xc,%eax
and    $0x7,%eax
ret

LLVM IR (-O0):
define i32 @instruction_extension_extract_register(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 12
%5 = and i32 %4, 7
ret i32 %5
}

LLVM IR (-O2):
define i32 @instruction_extension_extract_register(i32 %0) {
%2 = lshr i32 %0, 12
%3 = and i32 %2, 7
ret i32 %3
}
/* Type definitions */
struct stat {
  int dummy;
};

/* Variables and functions */
scalar_t__ stat(char const *, struct stat *);
int file_exists(const char *path) {
  struct stat st;
  return stat(path, &st) == 0;
}


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

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

LLVM IR (-O0):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca i8*
%3 = alloca %struct.stat
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = call i64 @stat(i8* %4, %struct.stat* %3)
%6 = icmp eq i64 %5, 0
%7 = zext i1 %6 to i32
ret i32 %7
}

LLVM IR (-O2):
%struct.stat = type { i32 }
define i32 @file_exists(i8* %0) {
%2 = alloca %struct.stat
%3 = bitcast %struct.stat* %2 to i8*
%4 = call i64 @stat(i8* %0, %struct.stat* %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
int OSGetTickCount() {}


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

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

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

LLVM IR (-O2):
define i32 @OSGetTickCount() {
ret i32 undef
}
/* Variables and functions */
int dev_clear_lps301();
int cleanup(void) { return dev_clear_lps301(); }


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

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

LLVM IR (-O0):
define i32 @cleanup() {
%1 = call i32 (...) @dev_clear_lps301()
ret i32 %1
}

LLVM IR (-O2):
define i32 @cleanup() {
%1 = tail call i32 (...) @dev_clear_lps301()
ret i32 %1
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ printf(char *);
void badargdie() {
  printf("Invalid argument. Please specify output file.\n");
  exit(1);
}


x86 assembly (clang, -O0):
<badargdie>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<badargdie>:
push   %rax
lea    0xed8(%rip),%rdi
call   1030 <puts@plt>
mov    $0x1,%edi
call   1040 <exit@plt>

LLVM IR (-O0):
@.str = [47 x i8] c"Invalid argument. Please specify output file.\0A\00"
define void @badargdie() {
%1 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@str = [46 x i8] c"Invalid argument. Please specify output file.\00"
define void @badargdie() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @exit(i32 1)
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void printf_array(int A[], int array_size) {
  for (int i = 0; i < array_size; i++)
    printf("%-4d", A[i]);
  printf("\n");
}


x86 assembly (clang, -O0):
<printf_array>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
mov    -0x10(%rbp),%eax
cmp    -0xc(%rbp),%eax
jge    1159 <printf_array+0x49>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
mov    (%rax,%rcx,4),%esi
lea    0xebc(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printf_array+0x16>
lea    0xea5(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printf_array>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <printf_array+0x37>
mov    %rdi,%r15
mov    %esi,%r12d
lea    0xec7(%rip),%r14
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
mov    (%r15,%rbx,4),%esi
mov    %r14,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1140 <printf_array+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [5 x i8] c"%-4d\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @printf_array(i32* %0, i32 %1) {
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
store i32 %1, i32* %4
store i32 0, i32* %5
br label %6
6: ; preds = %17, %2
%7 = load i32, i32* %5
%8 = load i32, i32* %4
%9 = icmp slt i32 %7, %8
br i1 %9, label %10, label %20
10: ; preds = %6
%11 = load i32*, i32** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i32, i32* %11, i64 %13
%15 = load i32, i32* %14
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %15)
br label %17
17: ; preds = %10
%18 = load i32, i32* %5
%19 = add nsw i32 %18, 1
store i32 %19, i32* %5
br label %6
20: ; preds = %6
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [5 x i8] c"%-4d\00"
define void @printf_array(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %6
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %8
6: ; preds = %8, %2
%7 = tail call i32 @putchar(i32 10)
ret void
8: ; preds = %4, %8
%9 = phi i64 [ 0, %4 ], [ %13, %8 ]
%10 = getelementptr inbounds i32, i32* %0, i64 %9
%11 = load i32, i32* %10
%12 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i32 %11)
%13 = add nuw nsw i64 %9, 1
%14 = icmp eq i64 %13, %5
br i1 %14, label %6, label %8
}
/* Variables and functions */
int /*<<< orphan*/ PowerManagerP__0__ResourceDefaultOwner__requested();
void ArbiterP__0__ResourceDefaultOwner__requested(void) {
  PowerManagerP__0__ResourceDefaultOwner__requested();
}


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

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

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

LLVM IR (-O2):
define void @ArbiterP__0__ResourceDefaultOwner__requested() {
%1 = tail call i32 (...) @PowerManagerP__0__ResourceDefaultOwner__requested()
ret void
}
/* Variables and functions */
char const *irc_nick_find_color_name(char const *);
const char *irc_info_info_irc_nick_color_name_cb(const void *pointer,
                                                 void *data,
                                                 const char *info_name,
                                                 const char *arguments) {
  (void)pointer;
  (void)data;
  (void)info_name;
  return (arguments && arguments[0]) ? irc_nick_find_color_name(arguments)
                                     : NULL;
}


x86 assembly (clang, -O0):
<irc_info_info_irc_nick_color_name_cb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
je     1155 <irc_info_info_irc_nick_color_name_cb+0x45>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1155 <irc_info_info_irc_nick_color_name_cb+0x45>
mov    -0x20(%rbp),%rdi
call   1030 <irc_nick_find_color_name@plt>
mov    %rax,-0x28(%rbp)
jmp    1160 <irc_info_info_irc_nick_color_name_cb+0x50>
xor    %eax,%eax
mov    %rax,-0x28(%rbp)
jmp    1160 <irc_info_info_irc_nick_color_name_cb+0x50>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<irc_info_info_irc_nick_color_name_cb>:
test   %rcx,%rcx
je     1122 <irc_info_info_irc_nick_color_name_cb+0x12>
cmpb   $0x0,(%rcx)
je     1122 <irc_info_info_irc_nick_color_name_cb+0x12>
mov    %rcx,%rdi
jmp    1030 <irc_nick_find_color_name@plt>
xor    %eax,%eax
ret

LLVM IR (-O0):
define i8* @irc_info_info_irc_nick_color_name_cb(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
%9 = load i8*, i8** %5
%10 = load i8*, i8** %6
%11 = load i8*, i8** %7
%12 = load i8*, i8** %8
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %23
14: ; preds = %4
%15 = load i8*, i8** %8
%16 = getelementptr inbounds i8, i8* %15, i64 0
%17 = load i8, i8* %16
%18 = sext i8 %17 to i32
%19 = icmp ne i32 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %14
%21 = load i8*, i8** %8
%22 = call i8* @irc_nick_find_color_name(i8* %21)
br label %24
23: ; preds = %14, %4
br label %24
24: ; preds = %23, %20
%25 = phi i8* [ %22, %20 ], [ null, %23 ]
ret i8* %25
}

LLVM IR (-O2):
define i8* @irc_info_info_irc_nick_color_name_cb(i8* nocapture readnone %0, i8* nocapture readnone %1, i8* nocapture readnone %2, i8* %3) {
%5 = icmp eq i8* %3, null
br i1 %5, label %11, label %6
6: ; preds = %4
%7 = load i8, i8* %3
%8 = icmp eq i8 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i8* @irc_nick_find_color_name(i8* %3)
br label %11
11: ; preds = %4, %6, %9
%12 = phi i8* [ %10, %9 ], [ null, %6 ], [ null, %4 ]
ret i8* %12
}
int test_imm_F4uint16_reg(unsigned short val) {
  return ((val) & (0xF4 << 0)) ? -20 : -40;
}


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

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

LLVM IR (-O0):
define i32 @test_imm_F4uint16_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, 244
%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_F4uint16_reg(i16 zeroext %0) {
%2 = and i16 %0, 244
%3 = icmp eq i16 %2, 0
%4 = select i1 %3, i32 -40, i32 -20
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ *strstr(char *, char *);
int filename_substring_filter(char *filename, char *textcontent) {
  if (strstr(filename, textcontent) == NULL)
    return 0;
  return 1;
}


x86 assembly (clang, -O0):
<filename_substring_filter>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1030 <strstr@plt>
cmp    $0x0,%rax
jne    1143 <filename_substring_filter+0x33>
movl   $0x0,-0x4(%rbp)
jmp    114a <filename_substring_filter+0x3a>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<filename_substring_filter>:
push   %rax
call   1030 <strstr@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @filename_substring_filter(i8* %0, i8* %1) {
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %4
store i8* %1, i8** %5
%6 = load i8*, i8** %4
%7 = load i8*, i8** %5
%8 = call i32* @strstr(i8* %6, i8* %7)
%9 = icmp eq i32* %8, null
br i1 %9, label %10, label %11
10: ; preds = %2
store i32 0, i32* %3
br label %12
11: ; preds = %2
store i32 1, i32* %3
br label %12
12: ; preds = %11, %10
%13 = load i32, i32* %3
ret i32 %13
}

LLVM IR (-O2):
define i32 @filename_substring_filter(i8* %0, i8* nocapture %1) {
%3 = tail call i32* @strstr(i8* dereferenceable(1) %0, i8* dereferenceable(1) %1)
%4 = icmp ne i32* %3, null
%5 = zext i1 %4 to i32
ret i32 %5
}
int divide_power2(int x, int k) {
  int mask = x >> ((sizeof(int) << 3) - 1u);
  int bias = mask & ((1 << k) - 1);
  return (x + bias) >> k;
}


x86 assembly (clang, -O0):
<divide_power2>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1f,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
sub    $0x1,%ecx
and    %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x4(%rbp),%eax
add    -0x10(%rbp),%eax
mov    -0x8(%rbp),%ecx
sar    %cl,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<divide_power2>:
mov    %esi,%ecx
mov    $0xffffffff,%edx
shl    %cl,%edx
not    %edx
mov    %edi,%eax
sar    $0x1f,%eax
and    %edx,%eax
add    %edi,%eax
sar    %cl,%eax
ret

LLVM IR (-O0):
define i32 @divide_power2(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = ashr i32 %7, 31
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = load i32, i32* %4
%11 = shl i32 1, %10
%12 = sub nsw i32 %11, 1
%13 = and i32 %9, %12
store i32 %13, i32* %6
%14 = load i32, i32* %3
%15 = load i32, i32* %6
%16 = add nsw i32 %14, %15
%17 = load i32, i32* %4
%18 = ashr i32 %16, %17
ret i32 %18
}

LLVM IR (-O2):
define i32 @divide_power2(i32 %0, i32 %1) {
%3 = shl nsw i32 -1, %1
%4 = xor i32 %3, -1
%5 = icmp slt i32 %0, 0
%6 = select i1 %5, i32 %4, i32 0
%7 = add nsw i32 %6, %0
%8 = ashr i32 %7, %1
ret i32 %8
}
void _swift_slowAlloc(void) {}


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

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

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

LLVM IR (-O2):
define void @_swift_slowAlloc() {
ret void
}
double slot_2_fir(long slot, long firlatlen) {
  double outval;
  outval = (slot + 0.5) / (firlatlen);
  if (outval > 1.00)
    outval = 1.00;
  if (outval < 0.0)
    outval = 0.0;
  return (outval);
}


x86 assembly (clang, -O0):
<slot_2_fir>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cvtsi2sdq -0x8(%rbp),%xmm0
movsd  0xeee(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsi2sdq -0x10(%rbp),%xmm1
divsd  %xmm1,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
movsd  0xec6(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1151 <slot_2_fir+0x51>
movsd  0xeb4(%rip),%xmm0
movsd  %xmm0,-0x18(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x18(%rbp),%xmm0
jbe    1167 <slot_2_fir+0x67>
xorps  %xmm0,%xmm0
movsd  %xmm0,-0x18(%rbp)
movsd  -0x18(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<slot_2_fir>:
cvtsi2sd %rdi,%xmm0
addsd  0xef3(%rip),%xmm0
cvtsi2sd %rsi,%xmm1
divsd  %xmm1,%xmm0
movsd  0xeea(%rip),%xmm1
minsd  %xmm0,%xmm1
xorpd  %xmm0,%xmm0
maxsd  %xmm1,%xmm0
ret

LLVM IR (-O0):
define double @slot_2_fir(i64 %0, i64 %1) {
%3 = alloca i64
%4 = alloca i64
%5 = alloca double
store i64 %0, i64* %3
store i64 %1, i64* %4
%6 = load i64, i64* %3
%7 = sitofp i64 %6 to double
%8 = fadd double %7, 5.000000e-01
%9 = load i64, i64* %4
%10 = sitofp i64 %9 to double
%11 = fdiv double %8, %10
store double %11, double* %5
%12 = load double, double* %5
%13 = fcmp ogt double %12, 1.000000e+00
br i1 %13, label %14, label %15
14: ; preds = %2
store double 1.000000e+00, double* %5
br label %15
15: ; preds = %14, %2
%16 = load double, double* %5
%17 = fcmp olt double %16, 0.000000e+00
br i1 %17, label %18, label %19
18: ; preds = %15
store double 0.000000e+00, double* %5
br label %19
19: ; preds = %18, %15
%20 = load double, double* %5
ret double %20
}

LLVM IR (-O2):
define double @slot_2_fir(i64 %0, i64 %1) {
%3 = sitofp i64 %0 to double
%4 = fadd double %3, 5.000000e-01
%5 = sitofp i64 %1 to double
%6 = fdiv double %4, %5
%7 = fcmp ogt double %6, 1.000000e+00
%8 = select i1 %7, double 1.000000e+00, double %6
%9 = fcmp olt double %8, 0.000000e+00
%10 = select i1 %9, double 0.000000e+00, double %8
ret double %10
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
my_free(void *ptr) {
  if (ptr) {
    free(ptr);
  }
}


x86 assembly (clang, -O0):
<my_free>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1130 <my_free+0x20>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<my_free>:
test   %rdi,%rdi
je     111f <my_free+0xf>
push   %rax
call   1030 <free@plt>
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @my_free(i8* %0) {
%2 = icmp eq i8* %0, null
br i1 %2, label %5, label %3
3: ; preds = %1
%4 = tail call i32 @free(i8* %0)
br label %5
5: ; preds = %3, %1
ret i32 undef
}
/* Variables and functions */
int /*<<< orphan*/ sprintf(char *, char *, char *, char *);
int write_to_database(char *, char *, int);
int write_duration_to_database(char *insert, char *reason, int cycle) {
  char csv[512];
  sprintf(csv, "%s,'%s'", insert, reason);
  return write_to_database("pauses", csv, cycle);
}


x86 assembly (clang, -O0):
<write_duration_to_database>:
push   %rbp
mov    %rsp,%rbp
sub    $0x220,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
lea    -0x220(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    -0x10(%rbp),%rcx
lea    0xeb4(%rip),%rsi
call   1040 <sprintf@plt>
lea    -0x220(%rbp),%rsi
mov    -0x14(%rbp),%edx
lea    0xea6(%rip),%rdi
call   1030 <write_to_database@plt>
add    $0x220,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<write_duration_to_database>:
push   %r14
push   %rbx
sub    $0x208,%rsp
mov    %edx,%ebx
mov    %rsi,%rcx
mov    %rdi,%rdx
lea    0xec7(%rip),%rsi
mov    %rsp,%r14
mov    %r14,%rdi
call   1040 <sprintf@plt>
lea    0xebd(%rip),%rdi
mov    %r14,%rsi
mov    %ebx,%edx
call   1030 <write_to_database@plt>
add    $0x208,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [8 x i8] c"%s,'%s'\00"
@.str.1 = [7 x i8] c"pauses\00"
define i32 @write_duration_to_database(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
%7 = alloca [512 x i8]
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%8 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%9 = load i8*, i8** %4
%10 = load i8*, i8** %5
%11 = call i32 @sprintf(i8* %8, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %9, i8* %10)
%12 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%13 = load i32, i32* %6
%14 = call i32 @write_to_database(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %12, i32 %13)
ret i32 %14
}

LLVM IR (-O2):
@.str = [8 x i8] c"%s,'%s'\00"
@.str.1 = [7 x i8] c"pauses\00"
define i32 @write_duration_to_database(i8* %0, i8* %1, i32 %2) {
%4 = alloca [512 x i8]
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %4, i64 0, i64 0
%6 = call i32 @sprintf(i8* %5, i8* dereferenceable(1) getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
%7 = call i32 @write_to_database(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i8* %5, i32 %2)
ret i32 %7
}
void isr_usage_fault(void) {
  while (1) {
    asm("nop");
  }
}


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

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

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

LLVM IR (-O2):
define void @isr_usage_fault() {
br label %1
1: ; preds = %0, %1
tail call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"()
br label %1
}
signed int __htclog_read_masks(char *buf __attribute__((__unused__)),
                               signed int len __attribute__((__unused__))) {
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @__htclog_read_masks(i8* nocapture readnone %0, i32 %1) {
ret i32 0
}
/* Type definitions */
struct sdiov {
  int dummy;
};
struct sdcore {
  int dummy;
};

/* Variables and functions */
int do_read(struct sdcore *, unsigned int, struct sdiov *, int);
int sdreadv(struct sdcore *sd, unsigned int sector, struct sdiov *iov,
            int niov) {
  return do_read(sd, sector, iov, niov);
}


x86 assembly (clang, -O0):
<sdreadv>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x18(%rbp),%rdx
mov    -0x1c(%rbp),%ecx
call   1030 <do_read@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sdreadv>:
jmp    1030 <do_read@plt>

LLVM IR (-O0):
%struct.sdcore = type { i32 }
%struct.sdiov = type { i32 }
define i32 @sdreadv(%struct.sdcore* %0, i32 %1, %struct.sdiov* %2, i32 %3) {
%5 = alloca %struct.sdcore*
%6 = alloca i32
%7 = alloca %struct.sdiov*
%8 = alloca i32
store %struct.sdcore* %0, %struct.sdcore** %5
store i32 %1, i32* %6
store %struct.sdiov* %2, %struct.sdiov** %7
store i32 %3, i32* %8
%9 = load %struct.sdcore*, %struct.sdcore** %5
%10 = load i32, i32* %6
%11 = load %struct.sdiov*, %struct.sdiov** %7
%12 = load i32, i32* %8
%13 = call i32 @do_read(%struct.sdcore* %9, i32 %10, %struct.sdiov* %11, i32 %12)
ret i32 %13
}

LLVM IR (-O2):
%struct.sdcore = type { i32 }
%struct.sdiov = type { i32 }
define i32 @sdreadv(%struct.sdcore* %0, i32 %1, %struct.sdiov* %2, i32 %3) {
%5 = tail call i32 @do_read(%struct.sdcore* %0, i32 %1, %struct.sdiov* %2, i32 %3)
ret i32 %5
}
/* Variables and functions */
scalar_t__ regmatchInsensitive(char *, char *);
int isLogFileToKeep(char *string) {
  if (regmatchInsensitive(string, "^logFileToKeep")) {
    return (1);
  }
  return (0);
}


x86 assembly (clang, -O0):
<isLogFileToKeep>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xed9(%rip),%rsi
call   1030 <regmatchInsensitive@plt>
cmp    $0x0,%rax
je     1142 <isLogFileToKeep+0x32>
movl   $0x1,-0x4(%rbp)
jmp    1149 <isLogFileToKeep+0x39>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isLogFileToKeep>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <regmatchInsensitive@plt>
xor    %ecx,%ecx
test   %rax,%rax
setne  %cl
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [15 x i8] c"^logFileToKeep\00"
define i32 @isLogFileToKeep(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
store i8* %0, i8** %3
%4 = load i8*, i8** %3
%5 = call i64 @regmatchInsensitive(i8* %4, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%6 = icmp ne i64 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %9
8: ; preds = %1
store i32 0, i32* %2
br label %9
9: ; preds = %8, %7
%10 = load i32, i32* %2
ret i32 %10
}

LLVM IR (-O2):
@.str = [15 x i8] c"^logFileToKeep\00"
define i32 @isLogFileToKeep(i8* %0) {
%2 = tail call i64 @regmatchInsensitive(i8* %0, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0))
%3 = icmp ne i64 %2, 0
%4 = zext i1 %3 to i32
ret i32 %4
}
int main() {
  int x = 1;
  int y = 0;
  x /= y;
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ motor_off();
void free_fdc(void) { motor_off(); }


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

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

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

LLVM IR (-O2):
define void @free_fdc() {
%1 = tail call i32 (...) @motor_off()
ret void
}
/* Variables and functions */
int /*<<< orphan*/ banktitle(char *);
void obank(void) {
  banktitle("    Welcome to the First National Bank of Larn.");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c" Welcome to the First National Bank of Larn.\00"
define void @obank() {
%1 = call i32 @banktitle(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [48 x i8] c" Welcome to the First National Bank of Larn.\00"
define void @obank() {
%1 = tail call i32 @banktitle(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int tst2(void *param) {
  printf("Task 2: %s\n", (char *)param);
  return (0);
}


x86 assembly (clang, -O0):
<tst2>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xed9(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst2>:
push   %rax
mov    %rdi,%rsi
lea    0xee5(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [12 x i8] c"Task 2: %s\0A\00"
define i32 @tst2(i8* %0) {
%2 = tail call i32 @printf(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0), i8* %0)
ret i32 0
}
/* Type definitions */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
scalar_t__ cmp1(void const *, void const *);
scalar_t__ cmp8(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
bool cmp9(const void *a, const void *b) {
  return cmp1(a, b) && cmp8((uint8_t *)a + 1, (uint8_t *)b + 1);
}


x86 assembly (clang, -O0):
<cmp9>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1030 <cmp1@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    $0x0,%rcx
mov    %al,-0x11(%rbp)
je     116e <cmp9+0x4e>
mov    -0x8(%rbp),%rdi
add    $0x4,%rdi
mov    -0x10(%rbp),%rsi
add    $0x4,%rsi
call   1040 <cmp8@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x11(%rbp)
mov    -0x11(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmp9>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
call   1030 <cmp1@plt>
test   %rax,%rax
je     1154 <cmp9+0x34>
add    $0x4,%rbx
add    $0x4,%r14
mov    %rbx,%rdi
mov    %r14,%rsi
call   1040 <cmp8@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
jmp    1156 <cmp9+0x36>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i32 @cmp9(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 i64 @cmp1(i8* %5, i8* %6)
%8 = icmp ne i64 %7, 0
br i1 %8, label %9, label %18
9: ; preds = %2
%10 = load i8*, i8** %3
%11 = bitcast i8* %10 to i32*
%12 = getelementptr inbounds i32, i32* %11, i64 1
%13 = load i8*, i8** %4
%14 = bitcast i8* %13 to i32*
%15 = getelementptr inbounds i32, i32* %14, i64 1
%16 = call i64 @cmp8(i32* %12, i32* %15)
%17 = icmp ne i64 %16, 0
br label %18
18: ; preds = %9, %2
%19 = phi i1 [ false, %2 ], [ %17, %9 ]
%20 = zext i1 %19 to i32
ret i32 %20
}

LLVM IR (-O2):
define i32 @cmp9(i8* %0, i8* %1) {
%3 = tail call i64 @cmp1(i8* %0, i8* %1)
%4 = icmp eq i64 %3, 0
br i1 %4, label %13, label %5
5: ; preds = %2
%6 = getelementptr inbounds i8, i8* %0, i64 4
%7 = bitcast i8* %6 to i32*
%8 = getelementptr inbounds i8, i8* %1, i64 4
%9 = bitcast i8* %8 to i32*
%10 = tail call i64 @cmp8(i32* %7, i32* %9)
%11 = icmp ne i64 %10, 0
%12 = zext i1 %11 to i32
br label %13
13: ; preds = %5, %2
%14 = phi i32 [ 0, %2 ], [ %12, %5 ]
ret i32 %14
}
int ebur128_double_cmp(const void *p1, const void *p2) {
  const double *d1 = (const double *)p1;
  const double *d2 = (const double *)p2;
  return (*d1 > *d2) - (*d1 < *d2);
}


x86 assembly (clang, -O0):
<ebur128_double_cmp>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x20(%rbp),%rax
ucomisd (%rax),%xmm0
seta   %al
and    $0x1,%al
movzbl %al,%eax
mov    -0x18(%rbp),%rcx
movsd  (%rcx),%xmm1
mov    -0x20(%rbp),%rcx
movsd  (%rcx),%xmm0
ucomisd %xmm1,%xmm0
seta   %cl
and    $0x1,%cl
movzbl %cl,%ecx
sub    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ebur128_double_cmp>:
movsd  (%rdi),%xmm0
movsd  (%rsi),%xmm1
xor    %eax,%eax
ucomisd %xmm1,%xmm0
seta   %al
xor    %ecx,%ecx
ucomisd %xmm0,%xmm1
seta   %cl
sub    %ecx,%eax
ret

LLVM IR (-O0):
define i32 @ebur128_double_cmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca double*
%6 = alloca double*
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = bitcast i8* %7 to double*
store double* %8, double** %5
%9 = load i8*, i8** %4
%10 = bitcast i8* %9 to double*
store double* %10, double** %6
%11 = load double*, double** %5
%12 = load double, double* %11
%13 = load double*, double** %6
%14 = load double, double* %13
%15 = fcmp ogt double %12, %14
%16 = zext i1 %15 to i32
%17 = load double*, double** %5
%18 = load double, double* %17
%19 = load double*, double** %6
%20 = load double, double* %19
%21 = fcmp olt double %18, %20
%22 = zext i1 %21 to i32
%23 = sub nsw i32 %16, %22
ret i32 %23
}

LLVM IR (-O2):
define i32 @ebur128_double_cmp(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to double*
%4 = bitcast i8* %1 to double*
%5 = load double, double* %3
%6 = load double, double* %4
%7 = fcmp ogt double %5, %6
%8 = zext i1 %7 to i32
%9 = fcmp olt double %5, %6
%10 = sext i1 %9 to i32
%11 = add nsw i32 %10, %8
ret i32 %11
}
/* Variables and functions */
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, char *);
int /*<<< orphan*/ stderr;
void usage(char *name) {
  fprintf(stderr, "Usage: %s [mapping file]\n", name);
  exit(1);
}


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

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

LLVM IR (-O0):
@stderr = global i32 0
@.str = [26 x i8] c"Usage: %s [mapping file]\0A\00"
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 ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %4)
%6 = call i32 @exit(i32 1)
unreachable
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [26 x i8] c"Usage: %s [mapping file]\0A\00"
define void @usage(i8* %0) {
%2 = load i32, i32* @stderr
%3 = tail call i32 @fprintf(i32 %2, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0), i8* %0)
%4 = tail call i32 @exit(i32 1)
unreachable
}
int test_00(volatile char *x) { return x[5]; }


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    0x5(%rax),%al
movsbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
movsbl 0x5(%rdi),%eax
ret

LLVM IR (-O0):
define i32 @test_00(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = getelementptr inbounds i8, i8* %3, i64 5
%5 = load volatile i8, i8* %4
%6 = sext i8 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @test_00(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 5
%3 = load volatile i8, i8* %2
%4 = sext i8 %3 to i32
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("                                 Pepito Pérez\n");
  printf("                           Calle: 13 Rue del Percebe\n");
  printf("                                 555-69-96-69\n");
}


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

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

LLVM IR (-O0):
@.str = [48 x i8] c" Pepito P\C3\A9rez\0A\00"
@.str.1 = [54 x i8] c" Calle: 13 Rue del Percebe\0A\00"
@.str.2 = [47 x i8] c" 555-69-96-69\0A\00"
define i32 @main() {
%1 = call i32 @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str, i64 0, i64 0))
%2 = call i32 @printf(i8* getelementptr inbounds ([54 x i8], [54 x i8]* @.str.1, i64 0, i64 0))
%3 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [47 x i8] c" Pepito P\C3\A9rez\00"
@str.3 = [53 x i8] c" Calle: 13 Rue del Percebe\00"
@str.4 = [46 x i8] c" 555-69-96-69\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @str, i64 0, i64 0))
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([53 x i8], [53 x i8]* @str.3, i64 0, i64 0))
%3 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str.4, i64 0, i64 0))
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ foo(int *, int *);
int main(void) {
  int a = 0;
  foo(&a, &a);
  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),%rsi
mov    %rsi,%rdi
call   1030 <foo@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
mov    %rdi,%rsi
call   1030 <foo@plt>
xor    %eax,%eax
pop    %rcx
ret

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, i32* %2)
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, i32* %1)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ addbyte(int);
void MMX_PSLLQ_imm(int dst_reg, int amount) {
  addbyte(0x66);
  addbyte(0x0f);
  addbyte(0x73);
  addbyte(0xc0 | dst_reg | 0x30);
  addbyte(amount);
}


x86 assembly (clang, -O0):
<MMX_PSLLQ_imm>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x73,%edi
call   1030 <addbyte@plt>
mov    -0x4(%rbp),%edi
or     $0xc0,%edi
or     $0x30,%edi
call   1030 <addbyte@plt>
mov    -0x8(%rbp),%edi
call   1030 <addbyte@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MMX_PSLLQ_imm>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
mov    $0x66,%edi
call   1030 <addbyte@plt>
mov    $0xf,%edi
call   1030 <addbyte@plt>
mov    $0x73,%edi
call   1030 <addbyte@plt>
or     $0xf0,%ebp
mov    %ebp,%edi
call   1030 <addbyte@plt>
mov    %ebx,%edi
add    $0x8,%rsp
pop    %rbx
pop    %rbp
jmp    1030 <addbyte@plt>

LLVM IR (-O0):
define void @MMX_PSLLQ_imm(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = call i32 @addbyte(i32 102)
%6 = call i32 @addbyte(i32 15)
%7 = call i32 @addbyte(i32 115)
%8 = load i32, i32* %3
%9 = or i32 192, %8
%10 = or i32 %9, 48
%11 = call i32 @addbyte(i32 %10)
%12 = load i32, i32* %4
%13 = call i32 @addbyte(i32 %12)
ret void
}

LLVM IR (-O2):
define void @MMX_PSLLQ_imm(i32 %0, i32 %1) {
%3 = tail call i32 @addbyte(i32 102)
%4 = tail call i32 @addbyte(i32 15)
%5 = tail call i32 @addbyte(i32 115)
%6 = or i32 %0, 240
%7 = tail call i32 @addbyte(i32 %6)
%8 = tail call i32 @addbyte(i32 %1)
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int EOF;
int fgetc(int /*<<< orphan*/ *);
unsigned int fget2l(FILE *stream) {
  int b1;
  int b2;
  b1 = fgetc(stream);
  b2 = fgetc(stream);
  if ((b1 != EOF) && (b2 != EOF)) {
    return b1 | (b2 * 0x0100);
  }
  return EOF;
}


x86 assembly (clang, -O0):
<fget2l>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <fgetc@plt>
mov    %eax,-0x18(%rbp)
mov    -0x14(%rbp),%eax
mov    0x2eaa(%rip),%rcx
cmp    (%rcx),%eax
je     116b <fget2l+0x5b>
mov    -0x18(%rbp),%eax
mov    0x2e98(%rip),%rcx
cmp    (%rcx),%eax
je     116b <fget2l+0x5b>
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
shl    $0x8,%ecx
or     %ecx,%eax
mov    %eax,-0x4(%rbp)
jmp    1177 <fget2l+0x67>
mov    0x2e76(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<fget2l>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <fgetc@plt>
mov    %eax,%ebp
mov    %rbx,%rdi
call   1030 <fgetc@plt>
mov    0x2ebc(%rip),%rcx
mov    (%rcx),%edx
mov    %eax,%ecx
shl    $0x8,%ecx
or     %ebp,%ecx
cmp    %edx,%eax
cmove  %edx,%ecx
cmp    %edx,%ebp
cmove  %edx,%ecx
mov    %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
@EOF = global i32 0
define i32 @fget2l(i32* %0) {
%2 = alloca i32
%3 = alloca i32*
%4 = alloca i32
%5 = alloca i32
store i32* %0, i32** %3
%6 = load i32*, i32** %3
%7 = call i32 @fgetc(i32* %6)
store i32 %7, i32* %4
%8 = load i32*, i32** %3
%9 = call i32 @fgetc(i32* %8)
store i32 %9, i32* %5
%10 = load i32, i32* %4
%11 = load i32, i32* @EOF
%12 = icmp ne i32 %10, %11
br i1 %12, label %13, label %22
13: ; preds = %1
%14 = load i32, i32* %5
%15 = load i32, i32* @EOF
%16 = icmp ne i32 %14, %15
br i1 %16, label %17, label %22
17: ; preds = %13
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = mul nsw i32 %19, 256
%21 = or i32 %18, %20
store i32 %21, i32* %2
br label %24
22: ; preds = %13, %1
%23 = load i32, i32* @EOF
store i32 %23, i32* %2
br label %24
24: ; preds = %22, %17
%25 = load i32, i32* %2
ret i32 %25
}

LLVM IR (-O2):
@EOF = global i32 0
define i32 @fget2l(i32* nocapture %0) {
%2 = tail call i32 @fgetc(i32* %0)
%3 = tail call i32 @fgetc(i32* %0)
%4 = load i32, i32* @EOF
%5 = icmp eq i32 %2, %4
%6 = icmp eq i32 %3, %4
%7 = or i1 %5, %6
%8 = shl nsw i32 %3, 8
%9 = or i32 %8, %2
%10 = select i1 %7, i32 %4, i32 %9
ret i32 %10
}