xunge/DecIR huggingface dataset:
/* Variables and functions */
unsigned long long R(unsigned long long, int);
unsigned long long sigma0(unsigned long long x) {
  return R(x, 1) ^ R(x, 8) ^ (x >> 7);
}


x86 assembly (clang, -O0):
<sigma0>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x1,%esi
call   1030 <R@plt>
mov    %rax,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0x8,%esi
call   1030 <R@plt>
mov    %rax,%rcx
mov    -0x10(%rbp),%rax
xor    %rcx,%rax
mov    -0x8(%rbp),%rcx
shr    $0x7,%rcx
xor    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<sigma0>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    $0x1,%esi
call   1030 <R@plt>
mov    %rax,%r14
mov    %rbx,%rdi
mov    $0x8,%esi
call   1030 <R@plt>
shr    $0x7,%rbx
xor    %r14,%rbx
xor    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define i64 @sigma0(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = call i64 @R(i64 %3, i32 1)
%5 = load i64, i64* %2
%6 = call i64 @R(i64 %5, i32 8)
%7 = xor i64 %4, %6
%8 = load i64, i64* %2
%9 = lshr i64 %8, 7
%10 = xor i64 %7, %9
ret i64 %10
}

LLVM IR (-O2):
define i64 @sigma0(i64 %0) {
%2 = tail call i64 @R(i64 %0, i32 1)
%3 = tail call i64 @R(i64 %0, i32 8)
%4 = lshr i64 %0, 7
%5 = xor i64 %2, %4
%6 = xor i64 %5, %3
ret i64 %6
}
/* Variables and functions */
int /*<<< orphan*/ LCD_WriteData(int);
void createBracket() {
  LCD_WriteData(0xf);
  LCD_WriteData(0x18);
  LCD_WriteData(0x1c);
  LCD_WriteData(0x6);
  LCD_WriteData(0x6);
  LCD_WriteData(0x1c);
  LCD_WriteData(0x18);
  LCD_WriteData(0xf);
}


x86 assembly (clang, -O0):
<createBracket>:
push   %rbp
mov    %rsp,%rbp
mov    $0xf,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x18,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x1c,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x1c,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x18,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xf,%edi
call   1030 <LCD_WriteData@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<createBracket>:
push   %rax
mov    $0xf,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x18,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x1c,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x6,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x1c,%edi
call   1030 <LCD_WriteData@plt>
mov    $0x18,%edi
call   1030 <LCD_WriteData@plt>
mov    $0xf,%edi
pop    %rax
jmp    1030 <LCD_WriteData@plt>

LLVM IR (-O0):
define void @createBracket() {
%1 = call i32 @LCD_WriteData(i32 15)
%2 = call i32 @LCD_WriteData(i32 24)
%3 = call i32 @LCD_WriteData(i32 28)
%4 = call i32 @LCD_WriteData(i32 6)
%5 = call i32 @LCD_WriteData(i32 6)
%6 = call i32 @LCD_WriteData(i32 28)
%7 = call i32 @LCD_WriteData(i32 24)
%8 = call i32 @LCD_WriteData(i32 15)
ret void
}

LLVM IR (-O2):
define void @createBracket() {
%1 = tail call i32 @LCD_WriteData(i32 15)
%2 = tail call i32 @LCD_WriteData(i32 24)
%3 = tail call i32 @LCD_WriteData(i32 28)
%4 = tail call i32 @LCD_WriteData(i32 6)
%5 = tail call i32 @LCD_WriteData(i32 6)
%6 = tail call i32 @LCD_WriteData(i32 28)
%7 = tail call i32 @LCD_WriteData(i32 24)
%8 = tail call i32 @LCD_WriteData(i32 15)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ log_err(int /*<<< orphan*/, char *, char *);
void log_errn_open(char *fname) { log_err(0, "Could not open %s", fname); }


x86 assembly (clang, -O0):
<log_errn_open>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
lea    0xed7(%rip),%rsi
call   1030 <log_err@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<log_errn_open>:
mov    %rdi,%rdx
lea    0xee6(%rip),%rsi
xor    %edi,%edi
jmp    1030 <log_err@plt>

LLVM IR (-O0):
@.str = [18 x i8] c"Could not open %s\00"
define void @log_errn_open(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 @log_err(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %3)
ret void
}

LLVM IR (-O2):
@.str = [18 x i8] c"Could not open %s\00"
define void @log_errn_open(i8* %0) {
%2 = tail call i32 @log_err(i32 0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str, i64 0, i64 0), i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ F_GETFL;
int /*<<< orphan*/ F_SETFL;
int O_NONBLOCK;
int fcntl(int, int /*<<< orphan*/, int);
void ns_set_non_blocking_mode(int sock) {
  int flags = fcntl(sock, F_GETFL, 0);
  fcntl(sock, F_SETFL, flags | O_NONBLOCK);
}


x86 assembly (clang, -O0):
<ns_set_non_blocking_mode>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2eab(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    %eax,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    0x2e9d(%rip),%rax
mov    (%rax),%esi
mov    -0x8(%rbp),%edx
mov    0x2ea1(%rip),%rax
or     (%rax),%edx
call   1030 <fcntl@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ns_set_non_blocking_mode>:
push   %rbx
mov    %edi,%ebx
mov    0x2eb6(%rip),%rax
mov    (%rax),%esi
xor    %edx,%edx
call   1030 <fcntl@plt>
mov    0x2eae(%rip),%rcx
mov    (%rcx),%esi
mov    0x2eb5(%rip),%rcx
or     (%rcx),%eax
mov    %ebx,%edi
mov    %eax,%edx
pop    %rbx
jmp    1030 <fcntl@plt>

LLVM IR (-O0):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @ns_set_non_blocking_mode(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %2
%4 = load i32, i32* %2
%5 = load i32, i32* @F_GETFL
%6 = call i32 @fcntl(i32 %4, i32 %5, i32 0)
store i32 %6, i32* %3
%7 = load i32, i32* %2
%8 = load i32, i32* @F_SETFL
%9 = load i32, i32* %3
%10 = load i32, i32* @O_NONBLOCK
%11 = or i32 %9, %10
%12 = call i32 @fcntl(i32 %7, i32 %8, i32 %11)
ret void
}

LLVM IR (-O2):
@F_GETFL = global i32 0
@F_SETFL = global i32 0
@O_NONBLOCK = global i32 0
define void @ns_set_non_blocking_mode(i32 %0) {
%2 = load i32, i32* @F_GETFL
%3 = tail call i32 @fcntl(i32 %0, i32 %2, i32 0)
%4 = load i32, i32* @F_SETFL
%5 = load i32, i32* @O_NONBLOCK
%6 = or i32 %5, %3
%7 = tail call i32 @fcntl(i32 %0, i32 %4, i32 %6)
ret void
}
/* Type definitions */
struct scsi_device {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ scsi_internal_device_unblock(struct scsi_device *);
void device_unblock(struct scsi_device *sdev, void *data) {
  {
    scsi_internal_device_unblock(sdev);
    return;
  }
}


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

x86 assembly (clang, -O2):
<device_unblock>:
jmp    1030 <scsi_internal_device_unblock@plt>

LLVM IR (-O0):
%struct.scsi_device = type { i32 }
define void @device_unblock(%struct.scsi_device* %0, i8* %1) {
%3 = alloca %struct.scsi_device*
%4 = alloca i8*
store %struct.scsi_device* %0, %struct.scsi_device** %3
store i8* %1, i8** %4
%5 = load %struct.scsi_device*, %struct.scsi_device** %3
%6 = call i32 @scsi_internal_device_unblock(%struct.scsi_device* %5)
ret void
}

LLVM IR (-O2):
%struct.scsi_device = type { i32 }
define void @device_unblock(%struct.scsi_device* %0, i8* nocapture readnone %1) {
%3 = tail call i32 @scsi_internal_device_unblock(%struct.scsi_device* %0)
ret void
}
int main() {
  printf("BAR");
  printf(3);
}


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

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

LLVM IR (-O0):
@.str = [4 x i8] c"BAR\00"
define i32 @main() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* inttoptr (i64 3 to i8*))
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"BAR\00"
define i32 @main() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* inttoptr (i64 3 to i8*))
ret i32 0
}
void init_timestamp(void) {}


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

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

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

LLVM IR (-O2):
define void @init_timestamp() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char);
void printArray(char *a, int size) {
  for (int i = 0; i < size; i++)
    printf("%c", a[i]);
}


x86 assembly (clang, -O0):
<printArray>:
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    1158 <printArray+0x48>
mov    -0x8(%rbp),%rax
movslq -0x10(%rbp),%rcx
lea    0xebf(%rip),%rdi
movsbl (%rax,%rcx,1),%esi
call   1030 <printf@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1126 <printArray+0x16>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<printArray>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1146 <printArray+0x36>
mov    %rdi,%r15
mov    %esi,%r12d
xor    %ebx,%ebx
lea    0xed5(%rip),%r14
nopl   0x0(%rax,%rax,1)
movsbl (%r15,%rbx,1),%esi
mov    %r14,%rdi
call   1030 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r12
jne    1130 <printArray+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [3 x i8] c"%c\00"
define void @printArray(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
store i8* %0, i8** %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 i8*, i8** %3
%12 = load i32, i32* %5
%13 = sext i32 %12 to i64
%14 = getelementptr inbounds i8, i8* %11, i64 %13
%15 = load i8, i8* %14
%16 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %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
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"%c\00"
define void @printArray(i8* 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 %7
6: ; preds = %7, %2
ret void
7: ; preds = %4, %7
%8 = phi i64 [ 0, %4 ], [ %12, %7 ]
%9 = getelementptr inbounds i8, i8* %0, i64 %8
%10 = load i8, i8* %9
%11 = tail call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i8 signext %10)
%12 = add nuw nsw i64 %8, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %6, label %7
}
/* Variables and functions */
int /*<<< orphan*/ strerror(int);
int *test(void) {
  static int y __asm("bar");
  strerror(-1);
  return &y;
}


x86 assembly (clang, -O0):
<test>:
push   %rbp
mov    %rsp,%rbp
mov    $0xffffffff,%edi
call   1030 <strerror@plt>
lea    0x2f07(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<test>:
push   %rax
mov    $0xffffffff,%edi
call   1030 <strerror@plt>
lea    0x2f0a(%rip),%rax
pop    %rcx
ret

LLVM IR (-O0):
@bar = internal global i32 0
define i32* @test() {
%1 = call i32 @strerror(i32 -1)
ret i32* @bar
}

LLVM IR (-O2):
@bar = internal global i32 0
define i32* @test() {
%1 = tail call i32 @strerror(i32 -1)
ret i32* @bar
}
/* Variables and functions */
int /*<<< orphan*/ swapone(int *, int, int);
int swap(int *A, int left, int right) {
  while (left < right) {
    swapone(A, left, right);
    left++;
    right--;
  }
  return 0;
}


x86 assembly (clang, -O0):
<swap>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    1154 <swap+0x44>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
call   1030 <swapone@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0x10(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x10(%rbp)
jmp    1122 <swap+0x12>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<swap>:
push   %rbp
push   %r14
push   %rbx
cmp    %edx,%esi
jge    1136 <swap+0x26>
mov    %edx,%ebx
mov    %esi,%ebp
mov    %rdi,%r14
nop
mov    %r14,%rdi
mov    %ebp,%esi
mov    %ebx,%edx
call   1030 <swapone@plt>
add    $0x1,%ebp
add    $0xffffffff,%ebx
cmp    %ebx,%ebp
jl     1120 <swap+0x10>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define i32 @swap(i32* %0, i32 %1, i32 %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
br label %7
7: ; preds = %11, %3
%8 = load i32, i32* %5
%9 = load i32, i32* %6
%10 = icmp slt i32 %8, %9
br i1 %10, label %11, label %20
11: ; preds = %7
%12 = load i32*, i32** %4
%13 = load i32, i32* %5
%14 = load i32, i32* %6
%15 = call i32 @swapone(i32* %12, i32 %13, i32 %14)
%16 = load i32, i32* %5
%17 = add nsw i32 %16, 1
store i32 %17, i32* %5
%18 = load i32, i32* %6
%19 = add nsw i32 %18, -1
store i32 %19, i32* %6
br label %7
20: ; preds = %7
ret i32 0
}

LLVM IR (-O2):
define i32 @swap(i32* %0, i32 %1, i32 %2) {
%4 = icmp slt i32 %1, %2
br i1 %4, label %5, label %12
5: ; preds = %3, %5
%6 = phi i32 [ %10, %5 ], [ %2, %3 ]
%7 = phi i32 [ %9, %5 ], [ %1, %3 ]
%8 = tail call i32 @swapone(i32* %0, i32 %7, i32 %6)
%9 = add nsw i32 %7, 1
%10 = add nsw i32 %6, -1
%11 = icmp slt i32 %9, %10
br i1 %11, label %5, label %12
12: ; preds = %5, %3
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
void total(int n) {
  int total = (n - 2);
  total *= total;
  printf("%d\n", total);
}


x86 assembly (clang, -O0):
<total>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
sub    $0x2,%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%eax
imul   -0x8(%rbp),%eax
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<total>:
lea    -0x2(%rdi),%esi
imul   %esi,%esi
lea    0xee3(%rip),%rdi
jmp    1030 <printf@plt>

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

LLVM IR (-O2):
@.str = [4 x i8] c"%d\0A\00"
define void @total(i32 %0) {
%2 = add nsw i32 %0, -2
%3 = mul nsw i32 %2, %2
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %3)
ret void
}
/* Variables and functions */
int dup2(int, int);
int /*<<< orphan*/ exit(int);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, int, int);
int /*<<< orphan*/ stderr;
void dup2Safe(int oldfd, int newfd) {
  int return_value = dup2(oldfd, newfd);
  if (return_value == -1) {
    fprintf(stderr, "Unable to execute dup2(%d, %d)", oldfd, newfd);
    exit(1);
  }
}


x86 assembly (clang, -O0):
<dup2Safe>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <dup2@plt>
mov    %eax,-0xc(%rbp)
cmpl   $0xffffffff,-0xc(%rbp)
jne    117b <dup2Safe+0x4b>
mov    0x2e83(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x8(%rbp),%ecx
lea    0xe94(%rip),%rsi
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<dup2Safe>:
push   %rbp
push   %rbx
push   %rax
mov    %esi,%ebx
mov    %edi,%ebp
call   1030 <dup2@plt>
cmp    $0xffffffff,%eax
je     1148 <dup2Safe+0x18>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret
mov    0x2e91(%rip),%rax
mov    (%rax),%edi
lea    0xea8(%rip),%rsi
mov    %ebp,%edx
mov    %ebx,%ecx
call   1040 <fprintf@plt>
mov    $0x1,%edi
call   1050 <exit@plt>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [31 x i8] c"Unable to execute dup2(%d, %d)\00"
define void @dup2Safe(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = call i32 @dup2(i32 %6, i32 %7)
store i32 %8, i32* %5
%9 = load i32, i32* %5
%10 = icmp eq i32 %9, -1
br i1 %10, label %11, label %17
11: ; preds = %2
%12 = load i32, i32* @stderr
%13 = load i32, i32* %3
%14 = load i32, i32* %4
%15 = call i32 @fprintf(i32 %12, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %13, i32 %14)
%16 = call i32 @exit(i32 1)
unreachable
17: ; preds = %2
ret void
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [31 x i8] c"Unable to execute dup2(%d, %d)\00"
define void @dup2Safe(i32 %0, i32 %1) {
%3 = tail call i32 @dup2(i32 %0, i32 %1)
%4 = icmp eq i32 %3, -1
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 @fprintf(i32 %6, i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str, i64 0, i64 0), i32 %0, i32 %1)
%8 = tail call i32 @exit(i32 1)
unreachable
9: ; preds = %2
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
void print_list(int *l, int len) {
  int c;
  for (c = 0; c < len; c++)
    printf("%d ", l[c]);
  printf("\n");
}


x86 assembly (clang, -O0):
<print_list>:
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 <print_list+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 <print_list+0x16>
lea    0xea4(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<print_list>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
test   %esi,%esi
jle    1157 <print_list+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 <print_list+0x20>
mov    $0xa,%edi
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
jmp    1030 <putchar@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%d \00"
@.str.1 = [2 x i8] c"\0A\00"
define void @print_list(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 ([4 x i8], [4 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 = [4 x i8] c"%d \00"
define void @print_list(i32* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %13
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %6
%7 = phi i64 [ 0, %4 ], [ %11, %6 ]
%8 = getelementptr inbounds i32, i32* %0, i64 %7
%9 = load i32, i32* %8
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = add nuw nsw i64 %7, 1
%12 = icmp eq i64 %11, %5
br i1 %12, label %13, label %6
13: ; preds = %6, %2
%14 = tail call i32 @putchar(i32 10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay_x();
int /*<<< orphan*/ hack_init(int);
int /*<<< orphan*/ hack_off(int);
int /*<<< orphan*/ hack_on(int);
int /*<<< orphan*/ led_init();
int /*<<< orphan*/ status_off();
int /*<<< orphan*/ status_on();
void blink(void) {
  led_init();
  hack_init(9);
  for (;;) {
    hack_off(9);
    status_on();
    delay_x();
    hack_on(9);
    status_off();
    delay_x();
  }
}


x86 assembly (clang, -O0):
<blink>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1070 <led_init@plt>
mov    $0x9,%edi
call   1060 <hack_init@plt>
mov    $0x9,%edi
call   1050 <hack_off@plt>
mov    $0x0,%al
call   1080 <status_on@plt>
mov    $0x0,%al
call   1040 <delay_x@plt>
mov    $0x9,%edi
call   1030 <hack_on@plt>
mov    $0x0,%al
call   1090 <status_off@plt>
mov    $0x0,%al
call   1040 <delay_x@plt>
jmp    1185 <blink+0x15>

x86 assembly (clang, -O2):
<blink>:
push   %rax
xor    %eax,%eax
call   1070 <led_init@plt>
mov    $0x9,%edi
call   1060 <hack_init@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x9,%edi
call   1050 <hack_off@plt>
xor    %eax,%eax
call   1080 <status_on@plt>
xor    %eax,%eax
call   1040 <delay_x@plt>
mov    $0x9,%edi
call   1030 <hack_on@plt>
xor    %eax,%eax
call   1090 <status_off@plt>
xor    %eax,%eax
call   1040 <delay_x@plt>
jmp    1190 <blink+0x20>

LLVM IR (-O0):
define void @blink() {
%1 = call i32 (...) @led_init()
%2 = call i32 @hack_init(i32 9)
br label %3
3: ; preds = %3, %0
%4 = call i32 @hack_off(i32 9)
%5 = call i32 (...) @status_on()
%6 = call i32 (...) @delay_x()
%7 = call i32 @hack_on(i32 9)
%8 = call i32 (...) @status_off()
%9 = call i32 (...) @delay_x()
br label %3
}

LLVM IR (-O2):
define void @blink() {
%1 = tail call i32 (...) @led_init()
%2 = tail call i32 @hack_init(i32 9)
br label %3
3: ; preds = %3, %0
%4 = tail call i32 @hack_off(i32 9)
%5 = tail call i32 (...) @status_on()
%6 = tail call i32 (...) @delay_x()
%7 = tail call i32 @hack_on(i32 9)
%8 = tail call i32 (...) @status_off()
%9 = tail call i32 (...) @delay_x()
br label %3
}
void XkbComputeShapeTop() {}


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

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

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

LLVM IR (-O2):
define void @XkbComputeShapeTop() {
ret void
}
/* Variables and functions */
int EXIT_SUCCESS;
int /*<<< orphan*/ printf(char *);
int main(int argc, char **argv, char **envp) {
  printf("Hello, World!\n");
  return EXIT_SUCCESS;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
lea    0xecf(%rip),%rdi
call   1030 <printf@plt>
mov    0x2ea3(%rip),%rax
mov    (%rax),%eax
add    $0x20,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@EXIT_SUCCESS = global i32 0
@str = [14 x i8] c"Hello, World!\00"
define i32 @main(i32 %0, i8** nocapture readnone %1, i8** nocapture readnone %2) {
%4 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%5 = load i32, i32* @EXIT_SUCCESS
ret i32 %5
}
int *foo() {
  int i;
  int array[5];
  for (i = 0; i < 5; ++i) {
    array[i] = 42;
  }
  return array;
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
cmpl   $0x5,-0x4(%rbp)
jge    112f <foo+0x2f>
movslq -0x4(%rbp),%rax
movl   $0x2a,-0x20(%rbp,%rax,4)
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    110b <foo+0xb>
lea    -0x20(%rbp),%rax
pop    %rbp
ret

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

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

LLVM IR (-O2):
define noalias i32* @foo() {
%1 = alloca [5 x i32]
%2 = bitcast [5 x i32]* %1 to i8*
%3 = getelementptr inbounds [5 x i32], [5 x i32]* %1, i64 0, i64 0
ret i32* %3
}
/* Type definitions */
struct wbuf {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
size_t wbuf_size(struct wbuf const *);
size_t wbuf_nmemb(struct wbuf const *buf, size_t elem_size) {
  assert(buf != NULL);
  return wbuf_size(buf) / elem_size;
}


x86 assembly (clang, -O0):
<wbuf_nmemb>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1030 <assert@plt>
mov    -0x8(%rbp),%rdi
call   1040 <wbuf_size@plt>
xor    %ecx,%ecx
mov    %ecx,%edx
divq   -0x10(%rbp)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<wbuf_nmemb>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %edi,%edi
test   %rbx,%rbx
setne  %dil
call   1030 <assert@plt>
mov    %rbx,%rdi
call   1040 <wbuf_size@plt>
mov    %rax,%rcx
or     %r14,%rcx
shr    $0x20,%rcx
je     1153 <wbuf_nmemb+0x33>
xor    %edx,%edx
div    %r14
jmp    1158 <wbuf_nmemb+0x38>
xor    %edx,%edx
div    %r14d
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
%struct.wbuf = type { i32 }
define i64 @wbuf_nmemb(%struct.wbuf* %0, i64 %1) {
%3 = alloca %struct.wbuf*
%4 = alloca i64
store %struct.wbuf* %0, %struct.wbuf** %3
store i64 %1, i64* %4
%5 = load %struct.wbuf*, %struct.wbuf** %3
%6 = icmp ne %struct.wbuf* %5, null
%7 = zext i1 %6 to i32
%8 = call i32 @assert(i32 %7)
%9 = load %struct.wbuf*, %struct.wbuf** %3
%10 = call i64 @wbuf_size(%struct.wbuf* %9)
%11 = load i64, i64* %4
%12 = udiv i64 %10, %11
ret i64 %12
}

LLVM IR (-O2):
%struct.wbuf = type { i32 }
define i64 @wbuf_nmemb(%struct.wbuf* %0, i64 %1) {
%3 = icmp ne %struct.wbuf* %0, null
%4 = zext i1 %3 to i32
%5 = tail call i32 @assert(i32 %4)
%6 = tail call i64 @wbuf_size(%struct.wbuf* %0)
%7 = udiv i64 %6, %1
ret i64 %7
}
void foo_2_1_1_2_2_1_2_2_2() {}


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

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

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

LLVM IR (-O2):
define void @foo_2_1_1_2_2_1_2_2_2() {
ret void
}
void i2d_PKCS7_bio(void) {}


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

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

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

LLVM IR (-O2):
define void @i2d_PKCS7_bio() {
ret void
}
int leapyear(int year) {
  if (year % 400 == 0)
    return 1;
  else if (year % 4 == 0 && year % 100 != 0)
    return 1;
  else
    return 0;
}


x86 assembly (clang, -O0):
<leapyear>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    $0x190,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    1127 <leapyear+0x27>
movl   $0x1,-0x4(%rbp)
jmp    1162 <leapyear+0x62>
mov    -0x8(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    115b <leapyear+0x5b>
mov    -0x8(%rbp),%eax
mov    $0x64,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
je     115b <leapyear+0x5b>
movl   $0x1,-0x4(%rbp)
jmp    1162 <leapyear+0x62>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<leapyear>:
imul   $0xc28f5c29,%edi,%eax
add    $0x51eb850,%eax
mov    %eax,%ecx
ror    $0x4,%ecx
cmp    $0xa3d70b,%ecx
jb     1130 <leapyear+0x30>
test   $0x3,%dil
sete   %cl
ror    $0x2,%eax
cmp    $0x28f5c29,%eax
setae  %al
and    %cl,%al
movzbl %al,%eax
ret
mov    $0x1,%eax
ret

LLVM IR (-O0):
define i32 @leapyear(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
%5 = srem i32 %4, 400
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %8
7: ; preds = %1
store i32 1, i32* %2
br label %18
8: ; preds = %1
%9 = load i32, i32* %3
%10 = srem i32 %9, 4
%11 = icmp eq i32 %10, 0
br i1 %11, label %12, label %17
12: ; preds = %8
%13 = load i32, i32* %3
%14 = srem i32 %13, 100
%15 = icmp ne i32 %14, 0
br i1 %15, label %16, label %17
16: ; preds = %12
store i32 1, i32* %2
br label %18
17: ; preds = %12, %8
store i32 0, i32* %2
br label %18
18: ; preds = %17, %16, %7
%19 = load i32, i32* %2
ret i32 %19
}

LLVM IR (-O2):
define i32 @leapyear(i32 %0) {
%2 = srem i32 %0, 400
%3 = icmp eq i32 %2, 0
br i1 %3, label %11, label %4
4: ; preds = %1
%5 = and i32 %0, 3
%6 = icmp eq i32 %5, 0
%7 = srem i32 %0, 100
%8 = icmp ne i32 %7, 0
%9 = and i1 %6, %8
%10 = zext i1 %9 to i32
br label %11
11: ; preds = %4, %1
%12 = phi i32 [ 1, %1 ], [ %10, %4 ]
ret i32 %12
}
void PKCS7_ENVELOPE_free(void) {}


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

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

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

LLVM IR (-O2):
define void @PKCS7_ENVELOPE_free() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ ENOSYS;
int /*<<< orphan*/ __set_errno(int /*<<< orphan*/);
int __getpid(void) {
  __set_errno(ENOSYS);
  return -1;
}


x86 assembly (clang, -O0):
<__getpid>:
push   %rbp
mov    %rsp,%rbp
mov    0x2ecd(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<__getpid>:
push   %rax
mov    0x2ed0(%rip),%rax
mov    (%rax),%edi
call   1030 <__set_errno@plt>
mov    $0xffffffff,%eax
pop    %rcx
ret

LLVM IR (-O0):
@ENOSYS = global i32 0
define i32 @__getpid() {
%1 = load i32, i32* @ENOSYS
%2 = call i32 @__set_errno(i32 %1)
ret i32 -1
}

LLVM IR (-O2):
@ENOSYS = global i32 0
define i32 @__getpid() {
%1 = load i32, i32* @ENOSYS
%2 = tail call i32 @__set_errno(i32 %1)
ret i32 -1
}
/* Variables and functions */
int fieldstrcmp(char *, char *);
int /*<<< orphan*/ substring(char *, char *);
int strcmp(char *a, char *b) {
  char a1[100];
  char b1[100];
  substring(a, a1);
  substring(b, b1);
  return fieldstrcmp(a1, b1);
}


x86 assembly (clang, -O0):
<strcmp>:
push   %rbp
mov    %rsp,%rbp
sub    $0xf0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
lea    -0x80(%rbp),%rsi
call   1030 <substring@plt>
mov    -0x10(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1030 <substring@plt>
lea    -0x80(%rbp),%rdi
lea    -0xf0(%rbp),%rsi
call   1040 <fieldstrcmp@plt>
add    $0xf0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<strcmp>:
push   %r15
push   %r14
push   %rbx
sub    $0xe0,%rsp
mov    %rsi,%rbx
lea    0x70(%rsp),%r14
mov    %r14,%rsi
call   1030 <substring@plt>
mov    %rsp,%r15
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <substring@plt>
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <fieldstrcmp@plt>
add    $0xe0,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [100 x i8]
%6 = alloca [100 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%7 = load i8*, i8** %3
%8 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%9 = call i32 @substring(i8* %7, i8* %8)
%10 = load i8*, i8** %4
%11 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%12 = call i32 @substring(i8* %10, i8* %11)
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %5, i64 0, i64 0
%14 = getelementptr inbounds [100 x i8], [100 x i8]* %6, i64 0, i64 0
%15 = call i32 @fieldstrcmp(i8* %13, i8* %14)
ret i32 %15
}

LLVM IR (-O2):
define i32 @strcmp(i8* %0, i8* %1) {
%3 = alloca [100 x i8]
%4 = alloca [100 x i8]
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %3, i64 0, i64 0
%6 = getelementptr inbounds [100 x i8], [100 x i8]* %4, i64 0, i64 0
%7 = call i32 @substring(i8* %0, i8* %5)
%8 = call i32 @substring(i8* %1, i8* %6)
%9 = call i32 @fieldstrcmp(i8* %5, i8* %6)
ret i32 %9
}
void XtIsComposite() {}


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

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

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

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

/* Variables and functions */
uint64_t b_flip(uint64_t n, int32_t len) {
  uint64_t retVal = 0;
  --len;
  while (n > 0) {
    retVal |= ((n & 1) << len--);
    n >>= 1;
  }
  return retVal;
}


x86 assembly (clang, -O0):
<b_flip>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x8(%rbp)
cmpl   $0x0,-0x4(%rbp)
jle    114b <b_flip+0x4b>
mov    -0x4(%rbp),%eax
and    $0x1,%eax
mov    -0x8(%rbp),%ecx
mov    %ecx,%edx
add    $0xffffffff,%edx
mov    %edx,-0x8(%rbp)
shl    %cl,%eax
or     -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x4(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    111a <b_flip+0x1a>
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<b_flip>:
test   %edi,%edi
jle    1126 <b_flip+0x26>
mov    %esi,%ecx
add    $0xffffffff,%ecx
xor    %eax,%eax
mov    %edi,%edx
nopl   (%rax)
mov    %edi,%esi
and    $0x1,%esi
shl    %cl,%esi
or     %esi,%eax
shr    %edx
add    $0xffffffff,%ecx
cmp    $0x1,%edi
mov    %edx,%edi
ja     1110 <b_flip+0x10>
ret
xor    %eax,%eax
ret

LLVM IR (-O0):
define i32 @b_flip(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
%6 = load i32, i32* %4
%7 = add nsw i32 %6, -1
store i32 %7, i32* %4
br label %8
8: ; preds = %11, %2
%9 = load i32, i32* %3
%10 = icmp sgt i32 %9, 0
br i1 %10, label %11, label %21
11: ; preds = %8
%12 = load i32, i32* %3
%13 = and i32 %12, 1
%14 = load i32, i32* %4
%15 = add nsw i32 %14, -1
store i32 %15, i32* %4
%16 = shl i32 %13, %14
%17 = load i32, i32* %5
%18 = or i32 %17, %16
store i32 %18, i32* %5
%19 = load i32, i32* %3
%20 = ashr i32 %19, 1
store i32 %20, i32* %3
br label %8
21: ; preds = %8
%22 = load i32, i32* %5
ret i32 %22
}

LLVM IR (-O2):
define i32 @b_flip(i32 %0, i32 %1) {
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %14
4: ; preds = %2, %4
%5 = phi i32 [ %8, %4 ], [ %1, %2 ]
%6 = phi i32 [ %11, %4 ], [ 0, %2 ]
%7 = phi i32 [ %12, %4 ], [ %0, %2 ]
%8 = add nsw i32 %5, -1
%9 = and i32 %7, 1
%10 = shl nuw i32 %9, %8
%11 = or i32 %10, %6
%12 = lshr i32 %7, 1
%13 = icmp ult i32 %7, 2
br i1 %13, label %14, label %4
14: ; preds = %4, %2
%15 = phi i32 [ 0, %2 ], [ %11, %4 ]
ret i32 %15
}
/* Type definitions */
typedef scalar_t__ int_fast32_t;

/* Variables and functions */
bool SHAREMIND_MAP_KEY_LESS_int_fast32_t(int_fast32_t const k1,
                                         int_fast32_t const k2) {
  return k1 < k2;
}


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

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

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

LLVM IR (-O2):
define i32 @SHAREMIND_MAP_KEY_LESS_int_fast32_t(i64 %0, i64 %1) {
%3 = icmp slt i64 %0, %1
%4 = zext i1 %3 to i32
ret i32 %4
}
void foo501(int p) {}


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

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

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

LLVM IR (-O2):
define void @foo501(i32 %0) {
ret void
}
int __gthread_active_p(void) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__gthread_active_p() {
ret i32 0
}
/* Variables and functions */
int divisao(int *inteiros, size_t quantos) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @divisao(i32* nocapture readnone %0, i64 %1) {
ret i32 0
}
/* Variables and functions */
int npok(int, int);
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, int *, int *);
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  printf("%d", npok(n, k));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
lea    0xec1(%rip),%rdi
lea    -0x4(%rbp),%rsi
lea    -0x8(%rbp),%rdx
call   1050 <scanf@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <npok@plt>
mov    %eax,%esi
lea    0xea3(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [6 x i8] c"%d %d\00"
@.str.1 = [3 x i8] c"%d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32* %1, i32* %2)
%6 = load i32, i32* %1
%7 = load i32, i32* %2
%8 = call i32 @npok(i32 %6, i32 %7)
%9 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0), i32 %8)
ret i32 0
}
/* Variables and functions */
int IPC_CREAT;
int shmget(int, int, int);
int init_shmem(int SHMKEY, int SHMSIZE) {
  int shid = 0;
  shid = shmget(SHMKEY, SHMSIZE, IPC_CREAT | 0666);
  return shid;
}


x86 assembly (clang, -O0):
<init_shmem>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0x0,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    0x2eae(%rip),%rax
mov    (%rax),%edx
or     $0x1b6,%edx
call   1030 <shmget@plt>
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_shmem>:
mov    0x2ec9(%rip),%rax
mov    $0x1b6,%edx
or     (%rax),%edx
jmp    1030 <shmget@plt>

LLVM IR (-O0):
@IPC_CREAT = global i32 0
define i32 @init_shmem(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
%6 = load i32, i32* %3
%7 = load i32, i32* %4
%8 = load i32, i32* @IPC_CREAT
%9 = or i32 %8, 438
%10 = call i32 @shmget(i32 %6, i32 %7, i32 %9)
store i32 %10, i32* %5
%11 = load i32, i32* %5
ret i32 %11
}

LLVM IR (-O2):
@IPC_CREAT = global i32 0
define i32 @init_shmem(i32 %0, i32 %1) {
%3 = load i32, i32* @IPC_CREAT
%4 = or i32 %3, 438
%5 = tail call i32 @shmget(i32 %0, i32 %1, i32 %4)
ret i32 %5
}
/* Type definitions */
typedef int /*<<< orphan*/ array;

/* Variables and functions */
int /*<<< orphan*/ es4(float *, int);
int main() {
  float array[] = {1.1, 2.2, 3.3, 4.4, 5.5, 6.6, 7.7, 8.8, 9.9, 10.1};
  es4(array, sizeof(array) / sizeof(array[0]));
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
lea    -0x30(%rbp),%rdi
lea    0xecd(%rip),%rsi
mov    $0x28,%edx
call   1040 <memcpy@plt>
lea    -0x30(%rbp),%rdi
mov    $0xa,%esi
call   1030 <es4@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
sub    $0x28,%rsp
mov    0xf05(%rip),%rax
mov    %rax,0x20(%rsp)
movaps 0xee9(%rip),%xmm0
movaps %xmm0,0x10(%rsp)
movaps 0xecd(%rip),%xmm0
movaps %xmm0,(%rsp)
mov    %rsp,%rdi
mov    $0xa,%esi
call   1030 <es4@plt>
xor    %eax,%eax
add    $0x28,%rsp
ret

LLVM IR (-O0):
@__const.main.array = [10 x float] [float 0x3FF19999A0000000, float 0x40019999A0000000, float 0x400A666660000000, float 0x40119999A0000000, float 5.500000e+00, float 0x401A666660000000, float 0x401ECCCCC0000000, float 0x40219999A0000000, float 0x4023CCCCC0000000, float 0x4024333340000000]
define i32 @main() {
%1 = alloca [10 x float]
%2 = bitcast [10 x float]* %1 to i8*
%3 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 0
%4 = call i32 @es4(float* %3, i32 10)
ret i32 0
}

LLVM IR (-O2):
@__const.main.array = [10 x float] [float 0x3FF19999A0000000, float 0x40019999A0000000, float 0x400A666660000000, float 0x40119999A0000000, float 5.500000e+00, float 0x401A666660000000, float 0x401ECCCCC0000000, float 0x40219999A0000000, float 0x4023CCCCC0000000, float 0x4024333340000000]
define i32 @main() {
%1 = alloca [10 x float]
%2 = bitcast [10 x float]* %1 to i8*
%3 = getelementptr inbounds [10 x float], [10 x float]* %1, i64 0, i64 0
%4 = call i32 @es4(float* %3, i32 10)
ret i32 0
}
void toi_checksum_exit(void) {}


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

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

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

LLVM IR (-O2):
define void @toi_checksum_exit() {
ret void
}
int foo1(int a) { return a + 0x01f001e0; }


x86 assembly (clang, -O0):
<foo1>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x1f001e0,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo1>:
lea    0x1f001e0(%rdi),%eax
ret

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

LLVM IR (-O2):
define i32 @foo1(i32 %0) {
%2 = add nsw i32 %0, 32506336
ret i32 %2
}
char brick_type_char(int brick_type) {
  switch (brick_type) {
  case 0:
    return 'i';
  case 1:
    return 'j';
  case 2:
    return 'l';
  case 3:
    return 'o';
  case 4:
    return 's';
  case 5:
    return 't';
  default:
    return 'z';
  }
}


x86 assembly (clang, -O0):
<brick_type_char>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %rax,-0x10(%rbp)
sub    $0x5,%rax
ja     1162 <brick_type_char+0x62>
mov    -0x10(%rbp),%rax
lea    0xedd(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
movb   $0x69,-0x1(%rbp)
jmp    1166 <brick_type_char+0x66>
movb   $0x6a,-0x1(%rbp)
jmp    1166 <brick_type_char+0x66>
movb   $0x6c,-0x1(%rbp)
jmp    1166 <brick_type_char+0x66>
movb   $0x6f,-0x1(%rbp)
jmp    1166 <brick_type_char+0x66>
movb   $0x73,-0x1(%rbp)
jmp    1166 <brick_type_char+0x66>
movb   $0x74,-0x1(%rbp)
jmp    1166 <brick_type_char+0x66>
movb   $0x7a,-0x1(%rbp)
movsbl -0x1(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<brick_type_char>:
lea    0x0(,%rdi,8),%ecx
movabs $0x74736f6c6a69,%rdx
shr    %cl,%rdx
cmp    $0x6,%edi
mov    $0x7a,%eax
cmovb  %edx,%eax
ret

LLVM IR (-O0):
define signext i8 @brick_type_char(i32 %0) {
%2 = alloca i8
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %11 [
i32 0, label %5
i32 1, label %6
i32 2, label %7
i32 3, label %8
i32 4, label %9
i32 5, label %10
]
5: ; preds = %1
store i8 105, i8* %2
br label %12
6: ; preds = %1
store i8 106, i8* %2
br label %12
7: ; preds = %1
store i8 108, i8* %2
br label %12
8: ; preds = %1
store i8 111, i8* %2
br label %12
9: ; preds = %1
store i8 115, i8* %2
br label %12
10: ; preds = %1
store i8 116, i8* %2
br label %12
11: ; preds = %1
store i8 122, i8* %2
br label %12
12: ; preds = %11, %10, %9, %8, %7, %6, %5
%13 = load i8, i8* %2
ret i8 %13
}

LLVM IR (-O2):
define signext i8 @brick_type_char(i32 %0) {
%2 = icmp ult i32 %0, 6
%3 = zext i32 %0 to i48
%4 = shl nuw nsw i48 %3, 3
%5 = lshr i48 128039139437161, %4
%6 = trunc i48 %5 to i8
%7 = select i1 %2, i8 %6, i8 122
ret i8 %7
}
int find_first_non_zero(double *v, int n) {
  int i;
  for (i = 0; i < n; ++i) {
    if (v[i] != 0.)
      return i;
  }
  return -1;
}


x86 assembly (clang, -O0):
<find_first_non_zero>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
movl   $0x0,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x14(%rbp),%eax
jge    1161 <find_first_non_zero+0x61>
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
movsd  (%rax,%rcx,8),%xmm0
xorps  %xmm1,%xmm1
ucomisd %xmm1,%xmm0
jne    1143 <find_first_non_zero+0x43>
jp     1143 <find_first_non_zero+0x43>
jmp    114e <find_first_non_zero+0x4e>
mov    -0x18(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1168 <find_first_non_zero+0x68>
jmp    1153 <find_first_non_zero+0x53>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    1112 <find_first_non_zero+0x12>
movl   $0xffffffff,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<find_first_non_zero>:
mov    $0xffffffff,%eax
test   %esi,%esi
jle    1136 <find_first_non_zero+0x36>
mov    %esi,%edx
xor    %ecx,%ecx
xorpd  %xmm0,%xmm0
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movsd  (%rdi,%rcx,8),%xmm1
ucomisd %xmm0,%xmm1
jne    1137 <find_first_non_zero+0x37>
jp     1137 <find_first_non_zero+0x37>
add    $0x1,%rcx
cmp    %rcx,%rdx
jne    1120 <find_first_non_zero+0x20>
ret
mov    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @find_first_non_zero(double* nocapture %0, i32 %1) {
%3 = icmp sgt i32 %1, 0
br i1 %3, label %4, label %16
4: ; preds = %2
%5 = zext i32 %1 to i64
br label %6
6: ; preds = %4, %11
%7 = phi i64 [ 0, %4 ], [ %12, %11 ]
%8 = getelementptr inbounds double, double* %0, i64 %7
%9 = load double, double* %8
%10 = fcmp une double %9, 0.000000e+00
br i1 %10, label %14, label %11
11: ; preds = %6
%12 = add nuw nsw i64 %7, 1
%13 = icmp eq i64 %12, %5
br i1 %13, label %16, label %6
14: ; preds = %6
%15 = trunc i64 %7 to i32
br label %16
16: ; preds = %11, %14, %2
%17 = phi i32 [ -1, %2 ], [ %15, %14 ], [ -1, %11 ]
ret i32 %17
}