xunge/DecIR huggingface dataset:
/* Variables and functions */
int /*<<< orphan*/ thr1(int /*<<< orphan*/);
int /*<<< orphan*/ thr2(int /*<<< orphan*/);
int main() {
__CPROVER_ASYNC_0:
  thr1(0);
__CPROVER_ASYNC_1:
  thr2(0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
jmp    1129 <main+0x9>
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1040 <thr2@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %edi,%edi
call   1030 <thr1@plt>
xor    %edi,%edi
call   1040 <thr2@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @main() {
br label %1
1: ; preds = %0
%2 = call i32 @thr1(i32 0)
br label %3
3: ; preds = %1
%4 = call i32 @thr2(i32 0)
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @thr1(i32 0)
%2 = tail call i32 @thr2(i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
void main(void) {
  int i = 0;
  for (; i <= 255; i++) {
    printf("%d-->%c \n", i, i);
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0xff,-0x4(%rbp)
jg     114c <main+0x3c>
mov    -0x4(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xec7(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111f <main+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %ebx,%ebx
lea    0xee3(%rip),%r14
nopl   (%rax)
mov    %r14,%rdi
mov    %ebx,%esi
mov    %ebx,%edx
call   1030 <printf@plt>
add    $0x1,%ebx
cmp    $0x100,%ebx
jne    1120 <main+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [10 x i8] c"%d-->%c \0A\00"
define void @main() {
%1 = alloca i32
store i32 0, i32* %1
br label %2
2: ; preds = %9, %0
%3 = load i32, i32* %1
%4 = icmp sle i32 %3, 255
br i1 %4, label %5, label %12
5: ; preds = %2
%6 = load i32, i32* %1
%7 = load i32, i32* %1
%8 = call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %6, i32 %7)
br label %9
9: ; preds = %5
%10 = load i32, i32* %1
%11 = add nsw i32 %10, 1
store i32 %11, i32* %1
br label %2
12: ; preds = %2
ret void
}

LLVM IR (-O2):
@.str = [10 x i8] c"%d-->%c \0A\00"
define void @main() {
br label %1
1: ; preds = %0, %1
%2 = phi i32 [ 0, %0 ], [ %4, %1 ]
%3 = tail call i32 @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i32 %2, i32 %2)
%4 = add nuw nsw i32 %2, 1
%5 = icmp eq i32 %4, 256
br i1 %5, label %6, label %1
6: ; preds = %1
ret void
}
/* Type definitions */
struct irc_handler_info {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ irc_reconnect(int /*<<< orphan*/ *);
int handle_error(int type, struct irc_handler_info *info) {
  irc_reconnect(NULL);
  return 0;
}


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

x86 assembly (clang, -O2):
<handle_error>:
push   %rax
xor    %edi,%edi
call   1030 <irc_reconnect@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
%struct.irc_handler_info = type { i32 }
define i32 @handle_error(i32 %0, %struct.irc_handler_info* %1) {
%3 = alloca i32
%4 = alloca %struct.irc_handler_info*
store i32 %0, i32* %3
store %struct.irc_handler_info* %1, %struct.irc_handler_info** %4
%5 = call i32 @irc_reconnect(i32* null)
ret i32 0
}

LLVM IR (-O2):
%struct.irc_handler_info = type { i32 }
define i32 @handle_error(i32 %0, %struct.irc_handler_info* nocapture readnone %1) {
%3 = tail call i32 @irc_reconnect(i32* null)
ret i32 0
}
int sscanf(line, format)
char *line, *format;
{
  int _sgetc(), _sungetc();
  return _scn(&format, &_sgetc, &_sungetc, &line);
}


x86 assembly (clang, -O0):
<sscanf>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2eb9(%rip),%rsi
mov    0x2eaa(%rip),%rdx
xor    %eax,%eax
lea    -0x10(%rbp),%rdi
lea    -0x8(%rbp),%rcx
call   1030 <_scn@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sscanf>:
sub    $0x18,%rsp
mov    %rdi,0x10(%rsp)
mov    %rsi,0x8(%rsp)
mov    0x2ebb(%rip),%rsi
mov    0x2eac(%rip),%rdx
lea    0x8(%rsp),%rdi
lea    0x10(%rsp),%rcx
xor    %eax,%eax
call   1030 <_scn@plt>
add    $0x18,%rsp
ret

LLVM IR (-O0):
define i32 @sscanf(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (i8**, i32 (...)*, i32 (...)*, i8**, ...) bitcast (i32 (...)* @_scn to i32 (i8**, i32 (...)*, i32 (...)*, i8**, ...)*)(i8** %4, i32 (...)* @_sgetc, i32 (...)* @_sungetc, i8** %3)
ret i32 %5
}

LLVM IR (-O2):
define i32 @sscanf(i8* %0, i8* %1, ...) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = call i32 (i8**, i32 (...)*, i32 (...)*, i8**, ...) bitcast (i32 (...)* @_scn to i32 (i8**, i32 (...)*, i32 (...)*, i8**, ...)*)(i8** %4, i32 (...)* @_sgetc, i32 (...)* @_sungetc, i8** %3)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int, int);
main() {
  int i = 0;
  int j = 1;
  ({
    int tmp;
    tmp = i, i = j, j = tmp;
  });
  printf("%d,%d\n", i, j);
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%d,%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 1, i32 0)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ _IO(int, int);
int ioctl(int, int /*<<< orphan*/);
int cbmarch_iec_poll(int f) { return ioctl(f, _IO(0xcb, 12)); }


x86 assembly (clang, -O0):
<cbmarch_iec_poll>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    $0xcb,%edi
mov    $0xc,%esi
call   1030 <_IO@plt>
mov    -0x8(%rbp),%edi
mov    %eax,%esi
call   1040 <ioctl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cbmarch_iec_poll>:
push   %rbx
mov    %edi,%ebx
mov    $0xcb,%edi
mov    $0xc,%esi
call   1030 <_IO@plt>
mov    %ebx,%edi
mov    %eax,%esi
pop    %rbx
jmp    1040 <ioctl@plt>

LLVM IR (-O0):
define i32 @cbmarch_iec_poll(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = call i32 @_IO(i32 203, i32 12)
%5 = call i32 @ioctl(i32 %3, i32 %4)
ret i32 %5
}

LLVM IR (-O2):
define i32 @cbmarch_iec_poll(i32 %0) {
%2 = tail call i32 @_IO(i32 203, i32 12)
%3 = tail call i32 @ioctl(i32 %0, i32 %2)
ret i32 %3
}
/* Variables and functions */
double atan2(int /*<<< orphan*/, int /*<<< orphan*/);
int /*<<< orphan*/ cos(double);
int /*<<< orphan*/ sin(double);
double geom_normalize(double angle) { return atan2(sin(angle), cos(angle)); }


x86 assembly (clang, -O0):
<geom_normalize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1040 <sin@plt>
mov    %eax,-0xc(%rbp)
movsd  -0x8(%rbp),%xmm0
call   1050 <cos@plt>
mov    -0xc(%rbp),%edi
mov    %eax,%esi
call   1030 <atan2@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<geom_normalize>:
push   %rbx
sub    $0x10,%rsp
movsd  %xmm0,0x8(%rsp)
call   1040 <sin@plt>
mov    %eax,%ebx
movsd  0x8(%rsp),%xmm0
call   1050 <cos@plt>
mov    %ebx,%edi
mov    %eax,%esi
add    $0x10,%rsp
pop    %rbx
jmp    1030 <atan2@plt>

LLVM IR (-O0):
define double @geom_normalize(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load double, double* %2
%4 = call i32 @sin(double %3)
%5 = load double, double* %2
%6 = call i32 @cos(double %5)
%7 = call double @atan2(i32 %4, i32 %6)
ret double %7
}

LLVM IR (-O2):
define double @geom_normalize(double %0) {
%2 = tail call i32 @sin(double %0)
%3 = tail call i32 @cos(double %0)
%4 = tail call double @atan2(i32 %2, i32 %3)
ret double %4
}
void Injector6ISR() {}


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

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

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

LLVM IR (-O2):
define void @Injector6ISR() {
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ sqlite3_vfs;

/* Variables and functions */
int SQLITE_IOERR_DELETE;
int memDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync) {
  return SQLITE_IOERR_DELETE;
}


x86 assembly (clang, -O0):
<memDelete>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    0x2ed2(%rip),%rax
mov    (%rax),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<memDelete>:
mov    0x2ee1(%rip),%rax
mov    (%rax),%eax
ret

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

LLVM IR (-O2):
@SQLITE_IOERR_DELETE = global i32 0
define i32 @memDelete(i32* nocapture readnone %0, i8* nocapture readnone %1, i32 %2) {
%4 = load i32, i32* @SQLITE_IOERR_DELETE
ret i32 %4
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void recurse(int count) {
  if (count == 5) {
    return;
  }
  printf("I am learning recursion.\n");
  recurse(count + 1);
  return;
}


x86 assembly (clang, -O0):
<recurse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jne    113a <recurse+0x1a>
jmp    1151 <recurse+0x31>
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
mov    -0x4(%rbp),%edi
add    $0x1,%edi
call   1030 <recurse@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recurse>:
push   %r14
push   %rbx
push   %rax
cmp    $0x5,%edi
je     113c <recurse+0x2c>
mov    %edi,%ebx
add    $0xfffffffb,%ebx
lea    0xedb(%rip),%r14
cs nopw 0x0(%rax,%rax,1)
nop
mov    %r14,%rdi
call   1030 <puts@plt>
inc    %ebx
jne    1130 <recurse+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [26 x i8] c"I am learning recursion.\0A\00"
define void @recurse(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp eq i32 %3, 5
br i1 %4, label %5, label %6
5: ; preds = %1
br label %10
6: ; preds = %1
%7 = call i32 @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* %2
%9 = add nsw i32 %8, 1
br label %10
10: ; preds = %6, %5
ret void
}

LLVM IR (-O2):
@str = [25 x i8] c"I am learning recursion.\00"
define void @recurse(i32 %0) {
%2 = icmp eq i32 %0, 5
br i1 %2, label %8, label %3
3: ; preds = %1, %3
%4 = phi i32 [ %6, %3 ], [ %0, %1 ]
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%6 = add nsw i32 %4, 1
%7 = icmp eq i32 %6, 5
br i1 %7, label %8, label %3
8: ; preds = %3, %1
ret void
}
/* Variables and functions */
int test_logc();
int main() { return -test_logc(); }


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <test_logc@plt>
neg    %eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @test_logc()
%2 = sub nsw i32 0, %1
ret i32 %2
}
void _exit(int i) {
  while (1) {
    __sys_exit(i);
    asm("	int $3");
  }
}


x86 assembly (clang, -O0):
<_exit>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1030 <__sys_exit@plt>
int3
jmp    111b <_exit+0xb>

x86 assembly (clang, -O2):
<_exit>:
push   %rbx
mov    %edi,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %ebx,%edi
xor    %eax,%eax
call   1030 <__sys_exit@plt>
int3
jmp    1120 <_exit+0x10>

LLVM IR (-O0):
define void @_exit(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
br label %3
3: ; preds = %1, %3
%4 = load i32, i32* %2
%5 = call i32 (i32, ...) bitcast (i32 (...)* @__sys_exit to i32 (i32, ...)*)(i32 %4)
br label %3
}

LLVM IR (-O2):
define void @_exit(i32 %0) {
br label %2
2: ; preds = %1, %2
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @__sys_exit to i32 (i32, ...)*)(i32 %0)
tail call void asm sideeffect "\09int $$3", "~{dirflag},~{fpsr},~{flags}"()
br label %2
}
/* Variables and functions */
int /*<<< orphan*/ free(char *);
char *strdup_together(char const *, char const *);
char *strdup_together3(const char *s, const char *t, const char *u) {
  char *two, *three;
  two = strdup_together(s, t);
  three = strdup_together(two, u);
  free(two);
  return three;
}


x86 assembly (clang, -O0):
<strdup_together3>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strdup_together@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1040 <strdup_together@plt>
mov    %rax,-0x28(%rbp)
mov    -0x20(%rbp),%rdi
call   1030 <free@plt>
mov    -0x28(%rbp),%rax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strdup_together3>:
push   %r14
push   %rbx
push   %rax
mov    %rdx,%r14
call   1040 <strdup_together@plt>
mov    %rax,%rbx
mov    %rax,%rdi
mov    %r14,%rsi
call   1040 <strdup_together@plt>
mov    %rax,%r14
mov    %rbx,%rdi
call   1030 <free@plt>
mov    %r14,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define i8* @strdup_together3(i8* %0, i8* %1, i8* %2) {
%4 = tail call i8* @strdup_together(i8* %0, i8* %1)
%5 = tail call i8* @strdup_together(i8* %4, i8* %2)
%6 = tail call i32 @free(i8* %4)
ret i8* %5
}
int test_imm_41uint16_mem(unsigned short *val) {
  return ((*val) & (-0x41 << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_41uint16_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzwl (%rax),%edx
and    $0xffffffbf,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_41uint16_mem>:
movzwl (%rdi),%eax
test   $0xffbf,%eax
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_41uint16_mem(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = load i16, i16* %3
%5 = zext i16 %4 to i32
%6 = and i32 %5, -65
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_41uint16_mem(i16* nocapture %0) {
%2 = load i16, i16* %0
%3 = and i16 %2, -65
%4 = icmp eq i16 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int main() {
  printf("Hello World from ex main!\n");
  return 0;
}


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

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

LLVM IR (-O0):
@.str = [27 x i8] c"Hello World from ex main!\0A\00"
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@str = [26 x i8] c"Hello World from ex main!\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @str, i64 0, i64 0))
ret i32 0
}
int test_imm_09int64_highword_mem(long long *val) {
  return ((*val >> 32) & (0x09 << 0)) ? -20 : -40;
}


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

x86 assembly (clang, -O2):
<test_imm_09int64_highword_mem>:
testb  $0x9,0x4(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_09int64_highword_mem(i64* %0) {
%2 = alloca i64*
store i64* %0, i64** %2
%3 = load i64*, i64** %2
%4 = load i64, i64* %3
%5 = ashr i64 %4, 32
%6 = and i64 %5, 9
%7 = icmp ne i64 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_09int64_highword_mem(i64* nocapture %0) {
%2 = load i64, i64* %0
%3 = and i64 %2, 38654705664
%4 = icmp eq i64 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void sched_ttwu_pending(void) {}


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

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

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

LLVM IR (-O2):
define void @sched_ttwu_pending() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ UPnPResponse_ContentDirectory_DeleteResource(void *);
int /*<<< orphan*/ printf(char *, char *);
void UPnPContentDirectory_DeleteResource(void *upnptoken, char *ResourceURI) {
  printf("Invoke: UPnPContentDirectory_DeleteResource(%s);\r\n", ResourceURI);
  UPnPResponse_ContentDirectory_DeleteResource(upnptoken);
}


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

x86 assembly (clang, -O2):
<UPnPContentDirectory_DeleteResource>:
push   %rbx
mov    %rdi,%rbx
lea    0xed5(%rip),%rdi
call   1030 <printf@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <UPnPResponse_ContentDirectory_DeleteResource@plt>

LLVM IR (-O0):
@.str = [51 x i8] c"Invoke: UPnPContentDirectory_DeleteResource(%s);\0D\0A\00"
define void @UPnPContentDirectory_DeleteResource(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
%5 = load i8*, i8** %4
%6 = call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8*, i8** %3
%8 = call i32 @UPnPResponse_ContentDirectory_DeleteResource(i8* %7)
ret void
}

LLVM IR (-O2):
@.str = [51 x i8] c"Invoke: UPnPContentDirectory_DeleteResource(%s);\0D\0A\00"
define void @UPnPContentDirectory_DeleteResource(i8* %0, i8* %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([51 x i8], [51 x i8]* @.str, i64 0, i64 0), i8* %1)
%4 = tail call i32 @UPnPResponse_ContentDirectory_DeleteResource(i8* %0)
ret void
}
/* Type definitions */
struct svc_req {
  int dummy;
};

/* Variables and functions */
int deletew(char *);
int *deletew_1_svc(char **argp, struct svc_req *rqstp) {
  static int result;
  result = deletew(*argp);
  return &result;
}


x86 assembly (clang, -O0):
<deletew_1_svc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rdi
call   1030 <deletew@plt>
mov    %eax,0x2efa(%rip)
lea    0x2ef3(%rip),%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<deletew_1_svc>:
push   %rax
mov    (%rdi),%rdi
call   1030 <deletew@plt>
mov    %eax,0x2f0d(%rip)
lea    0x2f06(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
%struct.svc_req = type { i32 }
@deletew_1_svc.result = internal global i32 0
define i32* @deletew_1_svc(i8** %0, %struct.svc_req* %1) {
%3 = alloca i8**
%4 = alloca %struct.svc_req*
store i8** %0, i8*** %3
store %struct.svc_req* %1, %struct.svc_req** %4
%5 = load i8**, i8*** %3
%6 = load i8*, i8** %5
%7 = call i32 @deletew(i8* %6)
store i32 %7, i32* @deletew_1_svc.result
ret i32* @deletew_1_svc.result
}

LLVM IR (-O2):
%struct.svc_req = type { i32 }
@deletew_1_svc.result = internal global i32 0
define i32* @deletew_1_svc(i8** nocapture %0, %struct.svc_req* nocapture readnone %1) {
%3 = load i8*, i8** %0
%4 = tail call i32 @deletew(i8* %3)
store i32 %4, i32* @deletew_1_svc.result
ret i32* @deletew_1_svc.result
}
/* Variables and functions */
int /*<<< orphan*/ itoa(unsigned int, char *);
int /*<<< orphan*/ printf(char *, char *);
int main() {
  char s[20];
  itoa(-((unsigned int)~0 >> 1) - 1, s);
  printf("%s\n", s);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    -0x20(%rbp),%rsi
mov    $0x80000000,%edi
call   1040 <itoa@plt>
lea    -0x20(%rbp),%rsi
lea    0xeb8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x20,%rsp
mov    %rsp,%rbx
mov    $0x80000000,%edi
mov    %rbx,%rsi
call   1040 <itoa@plt>
lea    0xec4(%rip),%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main() {
%1 = alloca [20 x i8]
%2 = getelementptr inbounds [20 x i8], [20 x i8]* %1, i64 0, i64 0
%3 = call i32 @itoa(i32 -2147483648, i8* %2)
%4 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %2)
ret i32 0
}
int time4(int a) { return a * 4; }


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

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

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

LLVM IR (-O2):
define i32 @time4(i32 %0) {
%2 = shl nsw i32 %0, 2
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ glb_error(char *);
double glbGetFilter() {
  glb_error("Function glbGetFilter is deprecated.");
  return -10;
}


x86 assembly (clang, -O0):
<glbGetFilter>:
push   %rbp
mov    %rsp,%rbp
lea    0xeed(%rip),%rdi
call   1030 <glb_error@plt>
movsd  0xed8(%rip),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<glbGetFilter>:
push   %rax
lea    0xef0(%rip),%rdi
call   1030 <glb_error@plt>
movsd  0xedb(%rip),%xmm0
pop    %rax
ret

LLVM IR (-O0):
@.str = [37 x i8] c"Function glbGetFilter is deprecated.\00"
define double @glbGetFilter() {
%1 = call i32 @glb_error(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret double -1.000000e+01
}

LLVM IR (-O2):
@.str = [37 x i8] c"Function glbGetFilter is deprecated.\00"
define double @glbGetFilter() {
%1 = tail call i32 @glb_error(i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str, i64 0, i64 0))
ret double -1.000000e+01
}
void set_user_nice(void) { nsc_assert(0, __func__); }


x86 assembly (clang, -O0):
<set_user_nice>:
push   %rbp
mov    %rsp,%rbp
xor    %edi,%edi
lea    0xee3(%rip),%rsi
mov    $0x0,%al
call   1030 <nsc_assert@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<set_user_nice>:
lea    0xee9(%rip),%rsi
xor    %edi,%edi
xor    %eax,%eax
jmp    1030 <nsc_assert@plt>

LLVM IR (-O0):
@__func__.set_user_nice = [14 x i8] c"set_user_nice\00"
define void @set_user_nice() {
%1 = call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.set_user_nice, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__func__.set_user_nice = [14 x i8] c"set_user_nice\00"
define void @set_user_nice() {
%1 = tail call i32 (i32, i8*, ...) bitcast (i32 (...)* @nsc_assert to i32 (i32, i8*, ...)*)(i32 0, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @__func__.set_user_nice, i64 0, i64 0))
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exercicio8();
int main() {
  exercicio8();
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
xor    %eax,%eax
call   1030 <exercicio8@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 (...) @exercicio8()
ret i32 0
}
void Interp3(unsigned char *pc, int c1, int c2) {
  c1 &= 0xf8f8f8;
  c2 &= 0xf8f8f8;
  *((int *)pc) = (c1 * 7 + c2) >> 3;
}


x86 assembly (clang, -O0):
<Interp3>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
and    $0xf8f8f8,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
and    $0xf8f8f8,%eax
mov    %eax,-0x10(%rbp)
imul   $0x7,-0xc(%rbp),%ecx
add    -0x10(%rbp),%ecx
sar    $0x3,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<Interp3>:
and    $0xf8f8f8,%esi
and    $0xf8f8f8,%edx
lea    0x0(,%rsi,8),%eax
sub    %esi,%eax
add    %edx,%eax
shr    $0x3,%eax
mov    %eax,(%rdi)
ret

LLVM IR (-O0):
define void @Interp3(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 i32, i32* %5
%8 = and i32 %7, 16316664
store i32 %8, i32* %5
%9 = load i32, i32* %6
%10 = and i32 %9, 16316664
store i32 %10, i32* %6
%11 = load i32, i32* %5
%12 = mul nsw i32 %11, 7
%13 = load i32, i32* %6
%14 = add nsw i32 %12, %13
%15 = ashr i32 %14, 3
%16 = load i8*, i8** %4
%17 = bitcast i8* %16 to i32*
store i32 %15, i32* %17
ret void
}

LLVM IR (-O2):
define void @Interp3(i8* nocapture writeonly %0, i32 %1, i32 %2) {
%4 = and i32 %1, 16316664
%5 = and i32 %2, 16316664
%6 = mul nuw nsw i32 %4, 7
%7 = add nuw nsw i32 %6, %5
%8 = lshr exact i32 %7, 3
%9 = bitcast i8* %0 to i32*
store i32 %8, i32* %9
ret void
}
/* Variables and functions */
int /*<<< orphan*/ addstr(char *);
int check_arg_count(int, int);
int /*<<< orphan*/ report_count(int);
int /*<<< orphan*/ report_return(int /*<<< orphan*/);
void cmd_addstr(int nargs, char **args) {
  if (check_arg_count(nargs, 1) == 1)
    return;
  report_count(1);
  report_return(addstr(args[0]));
}


x86 assembly (clang, -O0):
<cmd_addstr>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x1,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    116a <cmd_addstr+0x2a>
jmp    1187 <cmd_addstr+0x47>
mov    $0x1,%edi
call   1050 <report_count@plt>
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   1060 <addstr@plt>
mov    %eax,%edi
call   1030 <report_return@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cmd_addstr>:
push   %rbx
mov    %rsi,%rbx
mov    $0x1,%esi
call   1040 <check_arg_count@plt>
cmp    $0x1,%eax
jne    1155 <cmd_addstr+0x15>
pop    %rbx
ret
mov    $0x1,%edi
call   1050 <report_count@plt>
mov    (%rbx),%rdi
call   1060 <addstr@plt>
mov    %eax,%edi
pop    %rbx
jmp    1030 <report_return@plt>

LLVM IR (-O0):
define void @cmd_addstr(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* %3
%6 = call i32 @check_arg_count(i32 %5, i32 1)
%7 = icmp eq i32 %6, 1
br i1 %7, label %8, label %9
8: ; preds = %2
br label %16
9: ; preds = %2
%10 = call i32 @report_count(i32 1)
%11 = load i8**, i8*** %4
%12 = getelementptr inbounds i8*, i8** %11, i64 0
%13 = load i8*, i8** %12
%14 = call i32 @addstr(i8* %13)
%15 = call i32 @report_return(i32 %14)
br label %16
16: ; preds = %9, %8
ret void
}

LLVM IR (-O2):
define void @cmd_addstr(i32 %0, i8** nocapture %1) {
%3 = tail call i32 @check_arg_count(i32 %0, i32 1)
%4 = icmp eq i32 %3, 1
br i1 %4, label %10, label %5
5: ; preds = %2
%6 = tail call i32 @report_count(i32 1)
%7 = load i8*, i8** %1
%8 = tail call i32 @addstr(i8* %7)
%9 = tail call i32 @report_return(i32 %8)
br label %10
10: ; preds = %2, %5
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
void sig_int(int signo) { printf("\nCaught SIGINT!\n"); }


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

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

LLVM IR (-O0):
@.str = [17 x i8] c"\0ACaught SIGINT!\0A\00"
define void @sig_int(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@str = [16 x i8] c"\0ACaught SIGINT!\00"
define void @sig_int(i32 %0) {
%2 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @str, i64 0, i64 0))
ret void
}
/* Variables and functions */
scalar_t__ chown(char *, int, int);
int lha_arch_chown(char *filename, int unix_uid, int unix_gid) {
  return chown(filename, unix_uid, unix_gid) == 0;
}


x86 assembly (clang, -O0):
<lha_arch_chown>:
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 <chown@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @lha_arch_chown(i8* nocapture %0, i32 %1, i32 %2) {
%4 = tail call i64 @chown(i8* %0, i32 %1, i32 %2)
%5 = icmp eq i64 %4, 0
%6 = zext i1 %5 to i32
ret i32 %6
}
/* Variables and functions */
double ceil(double);
double floor(double);
double yy_trnc(double f) {
  if (f < 0.0)
    return ceil(f);
  return floor(f);
}


x86 assembly (clang, -O0):
<yy_trnc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x10(%rbp)
xorps  %xmm0,%xmm0
ucomisd -0x10(%rbp),%xmm0
jbe    114f <yy_trnc+0x2f>
movsd  -0x10(%rbp),%xmm0
call   1030 <ceil@plt>
movsd  %xmm0,-0x8(%rbp)
jmp    115e <yy_trnc+0x3e>
movsd  -0x10(%rbp),%xmm0
call   1040 <floor@plt>
movsd  %xmm0,-0x8(%rbp)
movsd  -0x8(%rbp),%xmm0
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<yy_trnc>:
xorpd  %xmm1,%xmm1
ucomisd %xmm0,%xmm1
jbe    112f <yy_trnc+0xf>
jmp    1030 <ceil@plt>
jmp    1040 <floor@plt>

LLVM IR (-O0):
define double @yy_trnc(double %0) {
%2 = alloca double
%3 = alloca double
store double %0, double* %3
%4 = load double, double* %3
%5 = fcmp olt double %4, 0.000000e+00
br i1 %5, label %6, label %9
6: ; preds = %1
%7 = load double, double* %3
%8 = call double @llvm.ceil.f64(double %7)
store double %8, double* %2
br label %12
9: ; preds = %1
%10 = load double, double* %3
%11 = call double @llvm.floor.f64(double %10)
store double %11, double* %2
br label %12
12: ; preds = %9, %6
%13 = load double, double* %2
ret double %13
}

LLVM IR (-O2):
define double @yy_trnc(double %0) {
%2 = fcmp olt double %0, 0.000000e+00
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call double @llvm.ceil.f64(double %0)
br label %7
5: ; preds = %1
%6 = tail call double @llvm.floor.f64(double %0)
br label %7
7: ; preds = %5, %3
%8 = phi double [ %4, %3 ], [ %6, %5 ]
ret double %8
}
int kvm_coalesced_mmio_init(struct kvm *kvm) { return 0; }


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

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

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

LLVM IR (-O2):
%struct.kvm = type opaque
define i32 @kvm_coalesced_mmio_init(%struct.kvm* nocapture readnone %0) {
ret i32 0
}
int foo(int x) {
  int y = 0;
  int z = x + 1;
  int w = z + y;
  return w - z;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
mov    -0x10(%rbp),%eax
sub    -0xc(%rbp),%eax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define i32 @foo(i32 %0) {
ret i32 0
}
void fdmi_dtype_op_SUM_float(void *a, void *b) {
  (*(float *)a = (*(float *)a) + (*(float *)b));
}


x86 assembly (clang, -O0):
<fdmi_dtype_op_SUM_float>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movss  (%rax),%xmm0
mov    -0x10(%rbp),%rax
addss  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movss  %xmm0,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<fdmi_dtype_op_SUM_float>:
movss  (%rdi),%xmm0
addss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
ret

LLVM IR (-O0):
define void @fdmi_dtype_op_SUM_float(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 = bitcast i8* %5 to float*
%7 = load float, float* %6
%8 = load i8*, i8** %4
%9 = bitcast i8* %8 to float*
%10 = load float, float* %9
%11 = fadd float %7, %10
%12 = load i8*, i8** %3
%13 = bitcast i8* %12 to float*
store float %11, float* %13
ret void
}

LLVM IR (-O2):
define void @fdmi_dtype_op_SUM_float(i8* nocapture %0, i8* nocapture %1) {
%3 = bitcast i8* %0 to float*
%4 = load float, float* %3
%5 = bitcast i8* %1 to float*
%6 = load float, float* %5
%7 = fadd float %4, %6
store float %7, float* %3
ret void
}
char *func() {
  char p[] = "Linkerist Heracles";
  return p;
}


x86 assembly (clang, -O0):
<func>:
push   %rbp
mov    %rsp,%rbp
mov    0xef5(%rip),%rax
mov    %rax,-0x20(%rbp)
mov    0xef2(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    0xeef(%rip),%ax
mov    %ax,-0x10(%rbp)
mov    0xee7(%rip),%al
mov    %al,-0xe(%rbp)
lea    -0x20(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<func>:
lea    -0x18(%rsp),%rax
ret

LLVM IR (-O0):
@__const.func.p = [19 x i8] c"Linkerist Heracles\00"
define i8* @func() {
%1 = alloca [19 x i8]
%2 = bitcast [19 x i8]* %1 to i8*
%3 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
ret i8* %3
}

LLVM IR (-O2):
define noalias i8* @func() {
%1 = alloca [19 x i8]
%2 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
ret i8* %2
}
int test_imm_CCuint8_mem(unsigned char *val) {
  return ((*val) & (-0xCC << 0)) ? -20 : -40;
}


x86 assembly (clang, -O0):
<test_imm_CCuint8_mem>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movzbl (%rax),%edx
and    $0xffffff34,%edx
mov    $0xffffffd8,%eax
mov    $0xffffffec,%ecx
cmp    $0x0,%edx
cmovne %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_imm_CCuint8_mem>:
testb  $0x34,(%rdi)
mov    $0xffffffd8,%ecx
mov    $0xffffffec,%eax
cmove  %ecx,%eax
ret

LLVM IR (-O0):
define i32 @test_imm_CCuint8_mem(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
%6 = and i32 %5, -204
%7 = icmp ne i32 %6, 0
%8 = zext i1 %7 to i64
%9 = select i1 %7, i32 -20, i32 -40
ret i32 %9
}

LLVM IR (-O2):
define i32 @test_imm_CCuint8_mem(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = and i8 %2, 52
%4 = icmp eq i8 %3, 0
%5 = select i1 %4, i32 -40, i32 -20
ret i32 %5
}
void xmile_builder_end_element(void *data) {}


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

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

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

LLVM IR (-O2):
define void @xmile_builder_end_element(i8* nocapture %0) {
ret void
}
/* Type definitions */
typedef scalar_t__ uint32_t;

/* Variables and functions */
int /*<<< orphan*/ NOROM_IntRegister(int, void (*)());
void stub1(uint32_t);
void TRNGIntRegister(void (*pfnHandler)(void)) {
  NOROM_IntRegister(49, pfnHandler);
  ((void (*)(uint32_t ui32Interrupt))(
      (uint32_t *)(((uint32_t *)0x10000180)[12]))[4])(49);
}


x86 assembly (clang, -O0):
<TRNGIntRegister>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
mov    $0x31,%edi
call   1030 <NOROM_IntRegister@plt>
mov    $0x10000180,%eax
mov    0x60(%rax),%rax
mov    $0x31,%edi
call   *0x20(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<TRNGIntRegister>:
push   %rax
mov    %rdi,%rsi
mov    $0x31,%edi
call   1030 <NOROM_IntRegister@plt>
mov    0x100001e0,%rax
10
mov    $0x31,%edi
pop    %rcx
jmp    *0x20(%rax)

LLVM IR (-O0):
define void @TRNGIntRegister(void ()* %0) {
%2 = alloca void ()*
store void ()* %0, void ()** %2
%3 = load void ()*, void ()** %2
%4 = bitcast void ()* %3 to void (...)*
%5 = call i32 @NOROM_IntRegister(i32 49, void (...)* %4)
%6 = load i64, i64* getelementptr inbounds (i64, i64* inttoptr (i64 268435840 to i64*), i64 12)
%7 = inttoptr i64 %6 to i64*
%8 = getelementptr inbounds i64, i64* %7, i64 4
%9 = load i64, i64* %8
%10 = inttoptr i64 %9 to void (i64)*
ret void
}

LLVM IR (-O2):
define void @TRNGIntRegister(void ()* %0) {
%2 = bitcast void ()* %0 to void (...)*
%3 = tail call i32 @NOROM_IntRegister(i32 49, void (...)* %2)
%4 = load i64, i64* inttoptr (i64 268435936 to i64*)
%5 = inttoptr i64 %4 to i64*
%6 = getelementptr inbounds i64, i64* %5, i64 4
%7 = load i64, i64* %6
%8 = inttoptr i64 %7 to void (i64)*
tail call void %8(i64 49)
ret void
}
int getgraphmode(void) { return 2; }


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

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

LLVM IR (-O0):
define i32 @getgraphmode() {
ret i32 2
}

LLVM IR (-O2):
define i32 @getgraphmode() {
ret i32 2
}
/* Variables and functions */
int unlink(char *);
int remove(char *name) { return unlink(name); }


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

x86 assembly (clang, -O2):
<remove>:
jmp    1030 <unlink@plt>

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

LLVM IR (-O2):
define i32 @remove(i8* nocapture %0) {
%2 = tail call i32 @unlink(i8* %0)
ret i32 %2
}
void ff_hevc_put_hevc_uni_w_pel_pixels16_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_w_pel_pixels16_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ put(char);
void new_line() { put('\n'); }


x86 assembly (clang, -O0):
<new_line>:
push   %rbp
mov    %rsp,%rbp
mov    $0xa,%edi
call   1030 <put@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<new_line>:
mov    $0xa,%edi
jmp    1030 <put@plt>

LLVM IR (-O0):
define void @new_line() {
%1 = call i32 @put(i8 signext 10)
ret void
}

LLVM IR (-O2):
define void @new_line() {
%1 = tail call i32 @put(i8 signext 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ TAB_Fct(char);
void IF_TABMin(void) { TAB_Fct('m'); }


x86 assembly (clang, -O0):
<IF_TABMin>:
push   %rbp
mov    %rsp,%rbp
mov    $0x6d,%edi
call   1030 <TAB_Fct@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<IF_TABMin>:
mov    $0x6d,%edi
jmp    1030 <TAB_Fct@plt>

LLVM IR (-O0):
define void @IF_TABMin() {
%1 = call i32 @TAB_Fct(i8 signext 109)
ret void
}

LLVM IR (-O2):
define void @IF_TABMin() {
%1 = tail call i32 @TAB_Fct(i8 signext 109)
ret void
}
void dt2mst(date, time) double *date;
double *time;
{
  double date0, gsec, dj;
  date0 = *date;
  dj = dt2jd(*date, *time);
  gsec = jd2mst(dj);
  ts2dt(gsec, date, time);
  *date = date0;
  return;
}


x86 assembly (clang, -O0):
<dt2mst>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
movsd  %xmm0,-0x18(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x10(%rbp),%rax
movsd  (%rax),%xmm1
mov    $0x2,%al
call   1040 <dt2jd@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x28(%rbp)
movsd  -0x28(%rbp),%xmm0
mov    $0x1,%al
call   1050 <jd2mst@plt>
cvtsi2sd %eax,%xmm0
movsd  %xmm0,-0x20(%rbp)
movsd  -0x20(%rbp),%xmm0
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
movsd  -0x18(%rbp),%xmm0
mov    -0x8(%rbp),%rax
movsd  %xmm0,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dt2mst>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  %xmm0,(%rsp)
movsd  (%rsi),%xmm1
mov    $0x2,%al
call   1040 <dt2jd@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    $0x1,%al
call   1050 <jd2mst@plt>
xorps  %xmm0,%xmm0
cvtsi2sd %eax,%xmm0
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x1,%al
call   1030 <ts2dt@plt>
movsd  (%rsp),%xmm0
movsd  %xmm0,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @dt2mst(double* %0, double* %1) {
%3 = alloca double*
%4 = alloca double*
%5 = alloca double
%6 = alloca double
%7 = alloca double
store double* %0, double** %3
store double* %1, double** %4
%8 = load double*, double** %3
%9 = load double, double* %8
store double %9, double* %5
%10 = load double*, double** %3
%11 = load double, double* %10
%12 = load double*, double** %4
%13 = load double, double* %12
%14 = call i32 (double, double, ...) bitcast (i32 (...)* @dt2jd to i32 (double, double, ...)*)(double %11, double %13)
%15 = sitofp i32 %14 to double
store double %15, double* %7
%16 = load double, double* %7
%17 = call i32 (double, ...) bitcast (i32 (...)* @jd2mst to i32 (double, ...)*)(double %16)
%18 = sitofp i32 %17 to double
store double %18, double* %6
%19 = load double, double* %6
%20 = load double*, double** %3
%21 = load double*, double** %4
%22 = call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %19, double* %20, double* %21)
%23 = load double, double* %5
%24 = load double*, double** %3
store double %23, double* %24
ret void
}

LLVM IR (-O2):
define void @dt2mst(double* %0, double* %1) {
%3 = load double, double* %0
%4 = load double, double* %1
%5 = tail call i32 (double, double, ...) bitcast (i32 (...)* @dt2jd to i32 (double, double, ...)*)(double %3, double %4)
%6 = sitofp i32 %5 to double
%7 = tail call i32 (double, ...) bitcast (i32 (...)* @jd2mst to i32 (double, ...)*)(double %6)
%8 = sitofp i32 %7 to double
%9 = tail call i32 (double, double*, double*, ...) bitcast (i32 (...)* @ts2dt to i32 (double, double*, double*, ...)*)(double %8, double* %0, double* %1)
store double %3, double* %0
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ff(int /*<<< orphan*/, int, int /*<<< orphan*/);
int main(void) {
  ff(0, 1, 0);
  return 0;
}


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

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

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

LLVM IR (-O2):
define i32 @main() {
%1 = tail call i32 @ff(i32 0, i32 1, i32 0)
ret i32 0
}
void USBD_USR_DeviceReset(unsigned char speed) {}


x86 assembly (clang, -O0):
<USBD_USR_DeviceReset>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @USBD_USR_DeviceReset(i8 zeroext %0) {
ret void
}
int hash(void *elt) {
  return (((char *)elt)[0] - 'a') * 26 + (((char *)elt)[1] - 'a');
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
sub    $0x61,%eax
imul   $0x1a,%eax,%eax
mov    -0x8(%rbp),%rcx
movsbl 0x1(%rcx),%ecx
sub    $0x61,%ecx
add    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
movsbl (%rdi),%eax
lea    (%rax,%rax,4),%ecx
lea    (%rcx,%rcx,4),%ecx
add    %eax,%ecx
movsbl 0x1(%rdi),%eax
add    %ecx,%eax
add    $0xfffff5c5,%eax
ret

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

LLVM IR (-O2):
define i32 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = sext i8 %2 to i32
%4 = mul nsw i32 %3, 26
%5 = getelementptr inbounds i8, i8* %0, i64 1
%6 = load i8, i8* %5
%7 = sext i8 %6 to i32
%8 = add nsw i32 %7, -2619
%9 = add nsw i32 %8, %4
ret i32 %9
}