xunge/DecIR huggingface dataset:
void ft_swap(int *a, int *b) {
  int temp;
  temp = *b;
  *b = *a;
  *a = temp;
}


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

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

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

LLVM IR (-O2):
define void @ft_swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %1
%4 = load i32, i32* %0
store i32 %4, i32* %1
store i32 %3, i32* %0
ret void
}
/* Type definitions */
typedef scalar_t__ ushort;
typedef size_t uint;

/* Variables and functions */
size_t cannawcstrlen(scalar_t__ *);
int /*<<< orphan*/ memcpy(scalar_t__ *, scalar_t__ *, size_t);
ushort *cannawcstrcat(ushort *p1, ushort *p2) {
  uint l1, l2;
  l1 = cannawcstrlen(p1);
  l2 = cannawcstrlen(p2);
  memcpy(&(p1[l1]), p2, l2);
  p1[l1 + l2] = 0;
  return p1;
}


x86 assembly (clang, -O0):
<cannawcstrcat>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <cannawcstrlen@plt>
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <cannawcstrlen@plt>
mov    %rax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x20(%rbp),%rdx
call   1040 <memcpy@plt>
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rcx
add    -0x20(%rbp),%rcx
movq   $0x0,(%rax,%rcx,8)
mov    -0x8(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<cannawcstrcat>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%r12
call   1030 <cannawcstrlen@plt>
mov    %rax,%r15
mov    %r14,%rdi
call   1030 <cannawcstrlen@plt>
mov    %rax,%rbx
lea    (%r12,%r15,8),%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1040 <memcpy@plt>
add    %r15,%rbx
movq   $0x0,(%r12,%rbx,8)
mov    %r12,%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define i64* @cannawcstrcat(i64* %0, i64* %1) {
%3 = alloca i64*
%4 = alloca i64*
%5 = alloca i64
%6 = alloca i64
store i64* %0, i64** %3
store i64* %1, i64** %4
%7 = load i64*, i64** %3
%8 = call i64 @cannawcstrlen(i64* %7)
store i64 %8, i64* %5
%9 = load i64*, i64** %4
%10 = call i64 @cannawcstrlen(i64* %9)
store i64 %10, i64* %6
%11 = load i64*, i64** %3
%12 = load i64, i64* %5
%13 = getelementptr inbounds i64, i64* %11, i64 %12
%14 = load i64*, i64** %4
%15 = load i64, i64* %6
%16 = call i32 @memcpy(i64* %13, i64* %14, i64 %15)
%17 = load i64*, i64** %3
%18 = load i64, i64* %5
%19 = load i64, i64* %6
%20 = add i64 %18, %19
%21 = getelementptr inbounds i64, i64* %17, i64 %20
store i64 0, i64* %21
%22 = load i64*, i64** %3
ret i64* %22
}

LLVM IR (-O2):
define i64* @cannawcstrcat(i64* returned %0, i64* %1) {
%3 = tail call i64 @cannawcstrlen(i64* %0)
%4 = tail call i64 @cannawcstrlen(i64* %1)
%5 = getelementptr inbounds i64, i64* %0, i64 %3
%6 = tail call i32 @memcpy(i64* %5, i64* %1, i64 %4)
%7 = add i64 %4, %3
%8 = getelementptr inbounds i64, i64* %0, i64 %7
store i64 0, i64* %8
ret i64* %0
}
/* Variables and functions */
int /*<<< orphan*/ dump_error(char *);
scalar_t__ malloc(unsigned int);
unsigned char *ucvector(int nl, int nh) {
  unsigned char *v;
  v = (unsigned char *)malloc((unsigned)(nh - nl + 1) * sizeof(unsigned char));
  if (!v)
    dump_error("allocation failure in ucvector()");
  return v - nl;
}


x86 assembly (clang, -O0):
<ucvector>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
sub    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,%eax
shl    $0x0,%rax
mov    %eax,%edi
call   1040 <malloc@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    115f <ucvector+0x3f>
lea    0xea6(%rip),%rdi
call   1030 <dump_error@plt>
mov    -0x10(%rbp),%rax
movslq -0x4(%rbp),%rdx
xor    %ecx,%ecx
sub    %rdx,%rcx
add    %rcx,%rax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ucvector>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
sub    %edi,%esi
lea    0x1(%rsi),%edi
call   1040 <malloc@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1143 <ucvector+0x23>
lea    0xec2(%rip),%rdi
call   1030 <dump_error@plt>
movslq %ebp,%rax
sub    %rax,%rbx
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
@.str = [33 x i8] c"allocation failure in ucvector()\00"
define i8* @ucvector(i32 %0, i32 %1) {
%3 = sub i32 1, %0
%4 = add i32 %3, %1
%5 = tail call i64 @malloc(i32 %4)
%6 = icmp eq i64 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @dump_error(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str, i64 0, i64 0))
br label %9
9: ; preds = %7, %2
%10 = inttoptr i64 %5 to i8*
%11 = sext i32 %0 to i64
%12 = sub nsw i64 0, %11
%13 = getelementptr inbounds i8, i8* %10, i64 %12
ret i8* %13
}
/* Variables and functions */
int /*<<< orphan*/ AF_INET;
int ahosts_ex(int /*<<< orphan*/, int /*<<< orphan*/, int, char **);
int ahostsv4(int argc, char *argv[]) {
  return ahosts_ex(AF_INET, 0, argc, argv);
}


x86 assembly (clang, -O0):
<ahostsv4>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2ec2(%rip),%rax
mov    (%rax),%edi
mov    -0x4(%rbp),%edx
mov    -0x10(%rbp),%rcx
xor    %esi,%esi
call   1030 <ahosts_ex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ahostsv4>:
mov    %rsi,%rcx
mov    %edi,%edx
mov    0x2ecc(%rip),%rax
mov    (%rax),%edi
xor    %esi,%esi
jmp    1030 <ahosts_ex@plt>

LLVM IR (-O0):
@AF_INET = global i32 0
define i32 @ahostsv4(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i8**
store i32 %0, i32* %3
store i8** %1, i8*** %4
%5 = load i32, i32* @AF_INET
%6 = load i32, i32* %3
%7 = load i8**, i8*** %4
%8 = call i32 @ahosts_ex(i32 %5, i32 0, i32 %6, i8** %7)
ret i32 %8
}

LLVM IR (-O2):
@AF_INET = global i32 0
define i32 @ahostsv4(i32 %0, i8** %1) {
%3 = load i32, i32* @AF_INET
%4 = tail call i32 @ahosts_ex(i32 %3, i32 0, i32 %0, i8** %1)
ret i32 %4
}
void ff_hevc_put_hevc_uni_qpel_h24_12_sse4() {}


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

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

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

LLVM IR (-O2):
define void @ff_hevc_put_hevc_uni_qpel_h24_12_sse4() {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x18() {
  Assert_real((isupper(24) == 0),
              "/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/"
              "2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/"
              "dg/z88dk/test/suites/ctype/test_isupper.c",
              125, ("isupper should be 0 for 0x18"));
}


x86 assembly (clang, -O0):
<t_isupper_0x18>:
push   %rbp
mov    %rsp,%rbp
mov    $0x18,%edi
call   1030 <isupper@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
lea    0xebf(%rip),%rsi
mov    $0x7d,%edx
lea    0xf5b(%rip),%rcx
call   1040 <Assert_real@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<t_isupper_0x18>:
push   %rax
mov    $0x18,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x7d,%edx
pop    %rax
jmp    1040 <Assert_real@plt>

LLVM IR (-O0):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x18\00"
define void @t_isupper_0x18() {
%1 = call i64 @isupper(i32 24)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 125, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [168 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/bitfixer/bitfixer/refs/heads/master/dg/z88dk/test/suites/ctype/test_isupper.c\00"
@.str.1 = [29 x i8] c"isupper should be 0 for 0x18\00"
define void @t_isupper_0x18() {
%1 = tail call i64 @isupper(i32 24)
%2 = icmp eq i64 %1, 0
%3 = zext i1 %2 to i32
%4 = tail call i32 @Assert_real(i32 %3, i8* getelementptr inbounds ([168 x i8], [168 x i8]* @.str, i64 0, i64 0), i32 125, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void displayCalibrateCount(int count) {}


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

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

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

LLVM IR (-O2):
define void @displayCalibrateCount(i32 %0) {
ret void
}
/* Variables and functions */
scalar_t__ isgraph(int);
int isprint(int ch) {
  if (ch == 0x20 || isgraph(ch))
    return 1;
  return 0;
}


x86 assembly (clang, -O0):
<isprint>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x8(%rbp)
cmpl   $0x20,-0x8(%rbp)
je     1137 <isprint+0x27>
mov    -0x8(%rbp),%edi
call   1030 <isgraph@plt>
cmp    $0x0,%rax
je     1143 <isprint+0x33>
movl   $0x1,-0x4(%rbp)
jmp    114a <isprint+0x3a>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<isprint>:
mov    $0x1,%eax
cmp    $0x20,%edi
je     112f <isprint+0x1f>
push   %rax
call   1030 <isgraph@plt>
mov    %rax,%rcx
xor    %eax,%eax
test   %rcx,%rcx
setne  %al
add    $0x8,%rsp
ret

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

LLVM IR (-O2):
define i32 @isprint(i32 %0) {
%2 = icmp eq i32 %0, 32
br i1 %2, label %7, label %3
3: ; preds = %1
%4 = tail call i64 @isgraph(i32 %0)
%5 = icmp ne i64 %4, 0
%6 = zext i1 %5 to i32
br label %7
7: ; preds = %3, %1
%8 = phi i32 [ 1, %1 ], [ %6, %3 ]
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ bcm2835_i2c_read_register_rs(char *, char *, char);
int /*<<< orphan*/ bcm2835_i2c_setSlaveAddress(int);
int MAG3110_BULK_READ(char reg, char count, char *data) {
  bcm2835_i2c_setSlaveAddress(14);
  bcm2835_i2c_read_register_rs(&reg, data, count);
  return *data;
}


x86 assembly (clang, -O0):
<MAG3110_BULK_READ>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
mov    %rdx,-0x10(%rbp)
mov    $0xe,%edi
call   1030 <bcm2835_i2c_setSlaveAddress@plt>
mov    -0x10(%rbp),%rsi
lea    -0x1(%rbp),%rdi
movsbl -0x2(%rbp),%edx
call   1040 <bcm2835_i2c_read_register_rs@plt>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MAG3110_BULK_READ>:
push   %rbp
push   %rbx
push   %rax
mov    %rdx,%rbx
mov    %esi,%ebp
mov    %dil,0x7(%rsp)
mov    $0xe,%edi
call   1030 <bcm2835_i2c_setSlaveAddress@plt>
lea    0x7(%rsp),%rdi
mov    %rbx,%rsi
mov    %ebp,%edx
call   1040 <bcm2835_i2c_read_register_rs@plt>
movsbl (%rbx),%eax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
define i32 @MAG3110_BULK_READ(i8 signext %0, i8 signext %1, i8* %2) {
%4 = alloca i8
%5 = alloca i8
%6 = alloca i8*
store i8 %0, i8* %4
store i8 %1, i8* %5
store i8* %2, i8** %6
%7 = call i32 @bcm2835_i2c_setSlaveAddress(i32 14)
%8 = load i8*, i8** %6
%9 = load i8, i8* %5
%10 = call i32 @bcm2835_i2c_read_register_rs(i8* %4, i8* %8, i8 signext %9)
%11 = load i8*, i8** %6
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
ret i32 %13
}

LLVM IR (-O2):
define i32 @MAG3110_BULK_READ(i8 signext %0, i8 signext %1, i8* %2) {
%4 = alloca i8
store i8 %0, i8* %4
%5 = tail call i32 @bcm2835_i2c_setSlaveAddress(i32 14)
%6 = call i32 @bcm2835_i2c_read_register_rs(i8* %4, i8* %2, i8 signext %1)
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
ret i32 %8
}
/* Variables and functions */
int /*<<< orphan*/ safef(char *, int, char *, char *, char *);
char *pairDistanceName(char *a, char *b, char *outBuf, int outBufSize) {
  safef(outBuf, outBufSize, "%s\t%s", a, b);
  return outBuf;
}


x86 assembly (clang, -O0):
<pairDistanceName>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %ecx,-0x1c(%rbp)
mov    -0x18(%rbp),%rdi
mov    -0x1c(%rbp),%esi
mov    -0x8(%rbp),%rcx
mov    -0x10(%rbp),%r8
lea    0xec3(%rip),%rdx
call   1030 <safef@plt>
mov    -0x18(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pairDistanceName>:
push   %rbx
mov    %rdx,%rbx
mov    %rsi,%r8
mov    %rdi,%rax
lea    0xedf(%rip),%rdx
mov    %rbx,%rdi
mov    %ecx,%esi
mov    %rax,%rcx
call   1030 <safef@plt>
mov    %rbx,%rax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [6 x i8] c"%s\09%s\00"
define i8* @pairDistanceName(i8* %0, i8* %1, i8* returned %2, i32 %3) {
%5 = tail call i32 @safef(i8* %2, i32 %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %1)
ret i8* %2
}
int main() {
  int x[2];
#pragma omp target device(opencl) copy_deps ndrange(1, global, local)          \
    file(dummy.cl)
#pragma omp task in([global] x)
  void foo(int *x, int global, int local);
  foo(x, 2, 1);
#pragma omp taskwait
}


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

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca [2 x i32]
%2 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
ret i32 0
}

LLVM IR (-O2):
define i32 @main() {
%1 = alloca [2 x i32]
%2 = bitcast [2 x i32]* %1 to i8*
%3 = getelementptr inbounds [2 x i32], [2 x i32]* %1, i64 0, i64 0
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ smbhash(unsigned char *, unsigned char *, unsigned char *,
                           int);
void E_P16(unsigned char *p14, unsigned char *p16) {
  unsigned char sp8[8] = {0x4b, 0x47, 0x53, 0x21, 0x40, 0x23, 0x24, 0x25};
  smbhash(p16, sp8, p14, 1);
  smbhash(p16 + 8, sp8, p14 + 7, 1);
}


x86 assembly (clang, -O0):
<E_P16>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0xed9(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
mov    $0x1,%ecx
call   1030 <smbhash@plt>
mov    -0x10(%rbp),%rdi
add    $0x8,%rdi
lea    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rdx
add    $0x7,%rdx
mov    $0x1,%ecx
call   1030 <smbhash@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<E_P16>:
push   %r15
push   %r14
push   %rbx
sub    $0x10,%rsp
mov    %rsi,%rbx
mov    %rdi,%r14
movabs $0x252423402153474b,%rax
23 24 25
mov    %rax,0x8(%rsp)
lea    0x8(%rsp),%r15
mov    %rsi,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x1,%ecx
call   1030 <smbhash@plt>
add    $0x8,%rbx
add    $0x7,%r14
mov    %rbx,%rdi
mov    %r15,%rsi
mov    %r14,%rdx
mov    $0x1,%ecx
call   1030 <smbhash@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.E_P16.sp8 = [8 x i8] c"KGS!@#$%"
define void @E_P16(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca [8 x i8]
store i8* %0, i8** %3
store i8* %1, i8** %4
%6 = bitcast [8 x i8]* %5 to i8*
%7 = load i8*, i8** %4
%8 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%9 = load i8*, i8** %3
%10 = call i32 @smbhash(i8* %7, i8* %8, i8* %9, i32 1)
%11 = load i8*, i8** %4
%12 = getelementptr inbounds i8, i8* %11, i64 8
%13 = getelementptr inbounds [8 x i8], [8 x i8]* %5, i64 0, i64 0
%14 = load i8*, i8** %3
%15 = getelementptr inbounds i8, i8* %14, i64 7
%16 = call i32 @smbhash(i8* %12, i8* %13, i8* %15, i32 1)
ret void
}

LLVM IR (-O2):
define void @E_P16(i8* %0, i8* %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
store i64 2676302836908902219, i64* %3
%5 = call i32 @smbhash(i8* %1, i8* %4, i8* %0, i32 1)
%6 = getelementptr inbounds i8, i8* %1, i64 8
%7 = getelementptr inbounds i8, i8* %0, i64 7
%8 = call i32 @smbhash(i8* %6, i8* %4, i8* %7, i32 1)
ret void
}
void type_base_c_placeholder(void) {}


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

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

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

LLVM IR (-O2):
define void @type_base_c_placeholder() {
ret void
}
void pthread_mutex_destroy() {}


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

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

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

LLVM IR (-O2):
define void @pthread_mutex_destroy() {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  unsigned long window;
};
typedef TYPE_1__ XCrossingEvent;

/* Variables and functions */
void set_XCrossingEvent_window(void *_p, unsigned long _v) {
  ((XCrossingEvent *)_p)->window = (unsigned long)_v;
}


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

x86 assembly (clang, -O2):
<set_XCrossingEvent_window>:
mov    %rsi,(%rdi)
ret

LLVM IR (-O0):
%struct.TYPE_2__ = type { i64 }
define void @set_XCrossingEvent_window(i8* %0, i64 %1) {
%3 = alloca i8*
%4 = alloca i64
store i8* %0, i8** %3
store i64 %1, i64* %4
%5 = load i64, i64* %4
%6 = load i8*, i8** %3
%7 = bitcast i8* %6 to %struct.TYPE_2__*
%8 = getelementptr inbounds %struct.TYPE_2__, %struct.TYPE_2__* %7, i32 0, i32 0
store i64 %5, i64* %8
ret void
}

LLVM IR (-O2):
define void @set_XCrossingEvent_window(i8* nocapture writeonly %0, i64 %1) {
%3 = bitcast i8* %0 to i64*
store i64 %1, i64* %3
ret void
}
/* Type definitions */
typedef int int64_t;

/* Variables and functions */
int64_t bot_timestamp_seconds(int64_t v) { return v / 1000000; }


x86 assembly (clang, -O0):
<bot_timestamp_seconds>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
mov    $0xf4240,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<bot_timestamp_seconds>:
movslq %edi,%rax
imul   $0x431bde83,%rax,%rax
mov    %rax,%rcx
shr    $0x3f,%rcx
sar    $0x32,%rax
add    %ecx,%eax
ret

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

LLVM IR (-O2):
define i32 @bot_timestamp_seconds(i32 %0) {
%2 = sdiv i32 %0, 1000000
ret i32 %2
}
int round_num(float num) {
  float diff = num - (int)num;
  int round_off;
  if (diff <= 0.5) {
    round_off = (int)num;
  } else {
    round_off = ((int)num) + 1;
  }
  return round_off;
}


x86 assembly (clang, -O0):
<round_num>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
cvttss2si -0x4(%rbp),%eax
cvtsi2ss %eax,%xmm1
subss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xecf(%rip),%xmm0
ucomisd %xmm1,%xmm0
jb     1148 <round_num+0x48>
cvttss2si -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
jmp    1153 <round_num+0x53>
cvttss2si -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
mov    -0xc(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<round_num>:
cvttss2si %xmm0,%eax
cvttps2dq %xmm0,%xmm1
cvtdq2ps %xmm1,%xmm1
subss  %xmm1,%xmm0
movss  0xee9(%rip),%xmm1
ucomiss %xmm0,%xmm1
adc    $0x0,%eax
ret

LLVM IR (-O0):
define i32 @round_num(float %0) {
%2 = alloca float
%3 = alloca float
%4 = alloca i32
store float %0, float* %2
%5 = load float, float* %2
%6 = load float, float* %2
%7 = fptosi float %6 to i32
%8 = sitofp i32 %7 to float
%9 = fsub float %5, %8
store float %9, float* %3
%10 = load float, float* %3
%11 = fpext float %10 to double
%12 = fcmp ole double %11, 5.000000e-01
br i1 %12, label %13, label %16
13: ; preds = %1
%14 = load float, float* %2
%15 = fptosi float %14 to i32
store i32 %15, i32* %4
br label %20
16: ; preds = %1
%17 = load float, float* %2
%18 = fptosi float %17 to i32
%19 = add nsw i32 %18, 1
store i32 %19, i32* %4
br label %20
20: ; preds = %16, %13
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
define i32 @round_num(float %0) {
%2 = fptosi float %0 to i32
%3 = sitofp i32 %2 to float
%4 = fsub float %0, %3
%5 = fcmp ugt float %4, 5.000000e-01
%6 = zext i1 %5 to i32
%7 = add nsw i32 %6, %2
ret i32 %7
}
/* Variables and functions */
int /*<<< orphan*/ free(void *);
void def_sine_free(void *data) { free(data); }


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

x86 assembly (clang, -O2):
<def_sine_free>:
jmp    1030 <free@plt>

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

LLVM IR (-O2):
define void @def_sine_free(i8* nocapture %0) {
%2 = tail call i32 @free(i8* %0)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ delay(int);
void delay_second(void) { delay(806596); }


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

x86 assembly (clang, -O2):
<delay_second>:
mov    $0xc4ec4,%edi
jmp    1030 <delay@plt>

LLVM IR (-O0):
define void @delay_second() {
%1 = call i32 @delay(i32 806596)
ret void
}

LLVM IR (-O2):
define void @delay_second() {
%1 = tail call i32 @delay(i32 806596)
ret void
}
float gb_fast_exp(float x) {
  float e =
      1.0f +
      x * (1.0f + x * 0.5f *
                      (1.0f + x * 0.3333333333f *
                                  (1.0f + x * 0.25f * (1.0f + x * 0.2f))));
  return e;
}


x86 assembly (clang, -O0):
<gb_fast_exp>:
push   %rbp
mov    %rsp,%rbp
movss  %xmm0,-0x4(%rbp)
movss  -0x4(%rbp),%xmm0
movss  0xefa(%rip),%xmm1
mulss  -0x4(%rbp),%xmm1
movss  0xee9(%rip),%xmm2
mulss  -0x4(%rbp),%xmm2
movss  0xed8(%rip),%xmm3
mulss  -0x4(%rbp),%xmm3
movss  -0x4(%rbp),%xmm4
movss  0xec2(%rip),%xmm5
mulss  %xmm5,%xmm4
movss  0xeb2(%rip),%xmm5
addss  %xmm5,%xmm4
mulss  %xmm4,%xmm3
movss  0xea2(%rip),%xmm4
addss  %xmm4,%xmm3
mulss  %xmm3,%xmm2
movss  0xe92(%rip),%xmm3
addss  %xmm3,%xmm2
mulss  %xmm2,%xmm1
movss  0xe82(%rip),%xmm2
addss  %xmm2,%xmm1
mulss  %xmm1,%xmm0
movss  0xe72(%rip),%xmm1
addss  %xmm1,%xmm0
movss  %xmm0,-0x8(%rbp)
movss  -0x8(%rbp),%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<gb_fast_exp>:
movss  0xef8(%rip),%xmm1
mulss  %xmm0,%xmm1
movss  0xef0(%rip),%xmm2
mulss  %xmm0,%xmm2
movss  0xee8(%rip),%xmm3
mulss  %xmm0,%xmm3
movss  0xee0(%rip),%xmm4
mulss  %xmm0,%xmm4
movss  0xed8(%rip),%xmm5
addss  %xmm5,%xmm4
mulss  %xmm3,%xmm4
addss  %xmm5,%xmm4
mulss  %xmm2,%xmm4
addss  %xmm5,%xmm4
mulss  %xmm1,%xmm4
addss  %xmm5,%xmm4
mulss  %xmm4,%xmm0
addss  %xmm5,%xmm0
ret

LLVM IR (-O0):
define float @gb_fast_exp(float %0) {
%2 = alloca float
%3 = alloca float
store float %0, float* %2
%4 = load float, float* %2
%5 = load float, float* %2
%6 = fmul float %5, 5.000000e-01
%7 = load float, float* %2
%8 = fmul float %7, 0x3FD5555560000000
%9 = load float, float* %2
%10 = fmul float %9, 2.500000e-01
%11 = load float, float* %2
%12 = call float @llvm.fmuladd.f32(float %11, float 0x3FC99999A0000000, float 1.000000e+00)
%13 = call float @llvm.fmuladd.f32(float %10, float %12, float 1.000000e+00)
%14 = call float @llvm.fmuladd.f32(float %8, float %13, float 1.000000e+00)
%15 = call float @llvm.fmuladd.f32(float %6, float %14, float 1.000000e+00)
%16 = call float @llvm.fmuladd.f32(float %4, float %15, float 1.000000e+00)
store float %16, float* %3
%17 = load float, float* %3
ret float %17
}

LLVM IR (-O2):
define float @gb_fast_exp(float %0) {
%2 = fmul float %0, 5.000000e-01
%3 = fmul float %0, 0x3FD5555560000000
%4 = fmul float %0, 2.500000e-01
%5 = tail call float @llvm.fmuladd.f32(float %0, float 0x3FC99999A0000000, float 1.000000e+00)
%6 = tail call float @llvm.fmuladd.f32(float %4, float %5, float 1.000000e+00)
%7 = tail call float @llvm.fmuladd.f32(float %3, float %6, float 1.000000e+00)
%8 = tail call float @llvm.fmuladd.f32(float %2, float %7, float 1.000000e+00)
%9 = tail call float @llvm.fmuladd.f32(float %0, float %8, float 1.000000e+00)
ret float %9
}
/* Variables and functions */
int /*<<< orphan*/ invalid_phase(char *);
void secret_phase() { invalid_phase("7"); }


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

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

LLVM IR (-O0):
@.str = [2 x i8] c"7\00"
define void @secret_phase() {
%1 = call i32 @invalid_phase(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [2 x i8] c"7\00"
define void @secret_phase() {
%1 = tail call i32 @invalid_phase(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret void
}
void TextDemo(void) {}


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

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

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

LLVM IR (-O2):
define void @TextDemo() {
ret void
}
/* Variables and functions */
const char *db_error() { return NULL; }


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

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

LLVM IR (-O0):
define i8* @db_error() {
ret i8* null
}

LLVM IR (-O2):
define noalias i8* @db_error() {
ret i8* null
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
int pa_memblockq_get_maxrewind() {
  printf("NOT IMPLEMENTED:"
         "pa_memblockq_get_maxrewind"
         "\n");
}


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

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

LLVM IR (-O0):
@.str = [44 x i8] c"NOT IMPLEMENTED:pa_memblockq_get_maxrewind\0A\00"
define i32 @pa_memblockq_get_maxrewind() {
%1 = alloca i32
%2 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* %1
ret i32 %3
}

LLVM IR (-O2):
@str = [43 x i8] c"NOT IMPLEMENTED:pa_memblockq_get_maxrewind\00"
define i32 @pa_memblockq_get_maxrewind() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @str, i64 0, i64 0))
ret i32 undef
}
void init_Receive_Buffer(unsigned long MBADDRX, unsigned short MIDL,
                         unsigned short MIDH) {
  unsigned long sttp_MsgRegTypeBuf;
  sttp_MsgRegTypeBuf = (MBADDRX);
  *((unsigned char *)(sttp_MsgRegTypeBuf + 0x09)) = 0x09;
  *((unsigned short *)(sttp_MsgRegTypeBuf + 0x0a)) = MIDL;
  *((unsigned short *)(sttp_MsgRegTypeBuf + 0x0c)) = MIDH;
  *((unsigned short *)(sttp_MsgRegTypeBuf + 0x0e)) = 0x0816;
  *((unsigned short *)(sttp_MsgRegTypeBuf + 0x0e)) = 0x0100;
}


x86 assembly (clang, -O0):
<init_Receive_Buffer>:
push   %rbp
mov    %rsp,%rbp
mov    %dx,%ax
mov    %si,%cx
mov    %rdi,-0x8(%rbp)
mov    %cx,-0xa(%rbp)
mov    %ax,-0xc(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
movb   $0x9,0x9(%rax)
mov    -0xa(%rbp),%cx
mov    -0x18(%rbp),%rax
mov    %cx,0xa(%rax)
mov    -0xc(%rbp),%cx
mov    -0x18(%rbp),%rax
mov    %cx,0xc(%rax)
mov    -0x18(%rbp),%rax
movw   $0x816,0xe(%rax)
mov    -0x18(%rbp),%rax
movw   $0x100,0xe(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_Receive_Buffer>:
movb   $0x9,0x9(%rdi)
mov    %si,0xa(%rdi)
mov    %dx,0xc(%rdi)
movw   $0x100,0xe(%rdi)
ret

LLVM IR (-O0):
define void @init_Receive_Buffer(i64 %0, i16 zeroext %1, i16 zeroext %2) {
%4 = alloca i64
%5 = alloca i16
%6 = alloca i16
%7 = alloca i64
store i64 %0, i64* %4
store i16 %1, i16* %5
store i16 %2, i16* %6
%8 = load i64, i64* %4
store i64 %8, i64* %7
%9 = load i64, i64* %7
%10 = add i64 %9, 9
%11 = inttoptr i64 %10 to i8*
store i8 9, i8* %11
%12 = load i16, i16* %5
%13 = load i64, i64* %7
%14 = add i64 %13, 10
%15 = inttoptr i64 %14 to i16*
store i16 %12, i16* %15
%16 = load i16, i16* %6
%17 = load i64, i64* %7
%18 = add i64 %17, 12
%19 = inttoptr i64 %18 to i16*
store i16 %16, i16* %19
%20 = load i64, i64* %7
%21 = add i64 %20, 14
%22 = inttoptr i64 %21 to i16*
store i16 2070, i16* %22
%23 = load i64, i64* %7
%24 = add i64 %23, 14
%25 = inttoptr i64 %24 to i16*
store i16 256, i16* %25
ret void
}

LLVM IR (-O2):
define void @init_Receive_Buffer(i64 %0, i16 zeroext %1, i16 zeroext %2) {
%4 = add i64 %0, 9
%5 = inttoptr i64 %4 to i8*
store i8 9, i8* %5
%6 = add i64 %0, 10
%7 = inttoptr i64 %6 to i16*
store i16 %1, i16* %7
%8 = add i64 %0, 12
%9 = inttoptr i64 %8 to i16*
store i16 %2, i16* %9
%10 = add i64 %0, 14
%11 = inttoptr i64 %10 to i16*
store i16 256, i16* %11
ret void
}
unsigned long hash(const char *string) {
  unsigned long hash = 5381;
  int c;
  while ((c = *string++)) {
    hash = ((hash << 5) + hash) + c;
  }
  return hash;
}


x86 assembly (clang, -O0):
<hash>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
movq   $0x1505,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
cmp    $0x0,%eax
je     114a <hash+0x4a>
mov    -0x10(%rbp),%rax
shl    $0x5,%rax
add    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
jmp    1110 <hash+0x10>
mov    -0x10(%rbp),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hash>:
mov    (%rdi),%cl
test   %cl,%cl
je     112d <hash+0x2d>
add    $0x1,%rdi
mov    $0x1505,%eax
nop
mov    %rax,%rdx
shl    $0x5,%rdx
add    %rax,%rdx
movsbq %cl,%rax
add    %rdx,%rax
movzbl (%rdi),%ecx
add    $0x1,%rdi
test   %cl,%cl
jne    1110 <hash+0x10>
ret
mov    $0x1505,%eax
ret

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

LLVM IR (-O2):
define i64 @hash(i8* nocapture %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %14, label %4
4: ; preds = %1, %4
%5 = phi i8 [ %12, %4 ], [ %2, %1 ]
%6 = phi i8* [ %8, %4 ], [ %0, %1 ]
%7 = phi i64 [ %11, %4 ], [ 5381, %1 ]
%8 = getelementptr inbounds i8, i8* %6, i64 1
%9 = mul i64 %7, 33
%10 = sext i8 %5 to i64
%11 = add i64 %9, %10
%12 = load i8, i8* %8
%13 = icmp eq i8 %12, 0
br i1 %13, label %14, label %4
14: ; preds = %4, %1
%15 = phi i64 [ 5381, %1 ], [ %11, %4 ]
ret i64 %15
}
/* Type definitions */
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int __stdio_no_flush(FILE *f) { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @__stdio_no_flush(i32* nocapture readnone %0) {
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ op_write1(int);
void op_enc_add_hl_hl(void) { op_write1(0x29); }


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

x86 assembly (clang, -O2):
<op_enc_add_hl_hl>:
mov    $0x29,%edi
jmp    1030 <op_write1@plt>

LLVM IR (-O0):
define void @op_enc_add_hl_hl() {
%1 = call i32 @op_write1(i32 41)
ret void
}

LLVM IR (-O2):
define void @op_enc_add_hl_hl() {
%1 = tail call i32 @op_write1(i32 41)
ret void
}
int pen(int n) { return (n * ((3 * n) - 1)) / 2; }


x86 assembly (clang, -O0):
<pen>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%eax
imul   $0x3,-0x4(%rbp),%ecx
sub    $0x1,%ecx
imul   %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
pop    %rbp
ret

x86 assembly (clang, -O2):
<pen>:
lea    (%rdi,%rdi,2),%ecx
add    $0xffffffff,%ecx
imul   %edi,%ecx
mov    %ecx,%eax
shr    $0x1f,%eax
add    %ecx,%eax
sar    %eax
ret

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

LLVM IR (-O2):
define i32 @pen(i32 %0) {
%2 = mul nsw i32 %0, 3
%3 = add nsw i32 %2, -1
%4 = mul nsw i32 %3, %0
%5 = sdiv i32 %4, 2
ret i32 %5
}
void mat2_fromScaling(float *dst, float *v) {
  dst[0] = v[0];
  dst[1] = 0;
  dst[2] = 0;
  dst[3] = v[1];
}


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

x86 assembly (clang, -O2):
<mat2_fromScaling>:
movss  (%rsi),%xmm0
movss  %xmm0,(%rdi)
movq   $0x0,0x4(%rdi)
movss  0x4(%rsi),%xmm0
movss  %xmm0,0xc(%rdi)
ret

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

LLVM IR (-O2):
define void @mat2_fromScaling(float* nocapture writeonly %0, float* nocapture %1) {
%3 = load float, float* %1
store float %3, float* %0
%4 = getelementptr inbounds float, float* %0, i64 1
store float 0.000000e+00, float* %4
%5 = getelementptr inbounds float, float* %0, i64 2
store float 0.000000e+00, float* %5
%6 = getelementptr inbounds float, float* %1, i64 1
%7 = load float, float* %6
%8 = getelementptr inbounds float, float* %0, i64 3
store float %7, float* %8
ret void
}
/* Type definitions */
struct threadpool {
  int dummy;
};

/* Variables and functions */
int threadpool_init_prio(struct threadpool *, size_t, size_t, size_t,
                         int /*<<< orphan*/ *);
int threadpool_init(struct threadpool *tp, size_t nthreads, size_t stacksize,
                    size_t qmax) {
  return threadpool_init_prio(tp, nthreads, stacksize, qmax, NULL);
}


x86 assembly (clang, -O0):
<threadpool_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
xor    %eax,%eax
mov    %eax,%r8d
call   1030 <threadpool_init_prio@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<threadpool_init>:
xor    %r8d,%r8d
jmp    1030 <threadpool_init_prio@plt>

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

LLVM IR (-O2):
%struct.threadpool = type { i32 }
define i32 @threadpool_init(%struct.threadpool* %0, i64 %1, i64 %2, i64 %3) {
%5 = tail call i32 @threadpool_init_prio(%struct.threadpool* %0, i64 %1, i64 %2, i64 %3, i32* null)
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ glColor3ubv(unsigned char *);
void Color3ubv(unsigned char v[3]) { glColor3ubv(v); }


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

x86 assembly (clang, -O2):
<Color3ubv>:
jmp    1030 <glColor3ubv@plt>

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

LLVM IR (-O2):
define void @Color3ubv(i8* %0) {
%2 = tail call i32 @glColor3ubv(i8* %0)
ret void
}
/* Variables and functions */
scalar_t__ mCalloc(int, int);
int *initZeroArray(int l) {
  int *x;
  int i;
  x = (int *)mCalloc(l, sizeof(int));
  for (i = 0; i < l; i++)
    x[i] = 0;
  return (x);
}


x86 assembly (clang, -O0):
<initZeroArray>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x4,%esi
call   1030 <mCalloc@plt>
mov    %rax,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x4(%rbp),%eax
jge    115c <initZeroArray+0x4c>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movl   $0x0,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1133 <initZeroArray+0x23>
mov    -0x10(%rbp),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initZeroArray>:
push   %rbp
push   %rbx
push   %rax
mov    %edi,%ebp
mov    $0x4,%esi
call   1040 <mCalloc@plt>
mov    %rax,%rbx
test   %ebp,%ebp
jle    1146 <initZeroArray+0x26>
mov    %ebp,%edx
shl    $0x2,%rdx
mov    %rbx,%rdi
xor    %esi,%esi
call   1030 <memset@plt>
mov    %rbx,%rax
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

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

LLVM IR (-O2):
define i32* @initZeroArray(i32 %0) {
%2 = tail call i64 @mCalloc(i32 %0, i32 4)
%3 = icmp sgt i32 %0, 0
br i1 %3, label %4, label %8
4: ; preds = %1
%5 = inttoptr i64 %2 to i8*
%6 = zext i32 %0 to i64
%7 = shl nuw nsw i64 %6, 2
br label %8
8: ; preds = %4, %1
%9 = inttoptr i64 %2 to i32*
ret i32* %9
}
void dolby_dap_deinit(int port_id) { return; }


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

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

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

LLVM IR (-O2):
define void @dolby_dap_deinit(i32 %0) {
ret void
}
/* Variables and functions */
int /*<<< orphan*/ exec(char *, char *);
int second(char *path) {
  exec(path, "2");
  return (1);
}


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

x86 assembly (clang, -O2):
<second>:
push   %rax
lea    0xee8(%rip),%rsi
call   1030 <exec@plt>
mov    $0x1,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [2 x i8] c"2\00"
define i32 @second(i8* %0) {
%2 = tail call i32 @exec(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
ret i32 1
}
/* Variables and functions */
int wfile_remove_utf8(char *);
int wfile_strong_remove(char *filename) {
  int status;
  status = wfile_remove_utf8(filename);
  return (status);
}


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

x86 assembly (clang, -O2):
<wfile_strong_remove>:
jmp    1030 <wfile_remove_utf8@plt>

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

LLVM IR (-O2):
define i32 @wfile_strong_remove(i8* %0) {
%2 = tail call i32 @wfile_remove_utf8(i8* %0)
ret i32 %2
}
unsigned xrop3_94_1_0(unsigned char s, unsigned char t) {
  unsigned D = 0x00ff;
  unsigned S = ((unsigned)s << 8) | s;
  unsigned T = ((unsigned)t << 8) | t;
  unsigned stk1;
  unsigned stk2;
  unsigned stk3;
  unsigned stk4;
  stk4 = ~D;
  stk3 = S & stk4;
  stk2 = T | stk3;
  stk1 = D ^ stk2;
  return (stk1 & (~S)) | (D & S);
}


x86 assembly (clang, -O0):
<xrop3_94_1_0>:
push   %rbp
mov    %rsp,%rbp
mov    %sil,%al
mov    %dil,%cl
mov    %cl,-0x1(%rbp)
mov    %al,-0x2(%rbp)
movl   $0xff,-0x8(%rbp)
movzbl -0x1(%rbp),%eax
shl    $0x8,%eax
movzbl -0x1(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0xc(%rbp)
movzbl -0x2(%rbp),%eax
shl    $0x8,%eax
movzbl -0x2(%rbp),%ecx
or     %ecx,%eax
mov    %eax,-0x10(%rbp)
mov    -0x8(%rbp),%eax
xor    $0xffffffff,%eax
mov    %eax,-0x20(%rbp)
mov    -0xc(%rbp),%eax
and    -0x20(%rbp),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%eax
or     -0x1c(%rbp),%eax
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%eax
xor    -0x18(%rbp),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    -0xc(%rbp),%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
mov    -0x8(%rbp),%ecx
and    -0xc(%rbp),%ecx
or     %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<xrop3_94_1_0>:
mov    %edi,%eax
shl    $0x8,%eax
mov    %esi,%ecx
shl    $0x8,%ecx
or     %esi,%ecx
or     %eax,%ecx
or     %edi,%eax
xor    $0xff,%ecx
not    %eax
and    %ecx,%eax
or     %edi,%eax
ret

LLVM IR (-O0):
define i32 @xrop3_94_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = alloca i8
%4 = alloca i8
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
store i8 %0, i8* %3
store i8 %1, i8* %4
store i32 255, i32* %5
%12 = load i8, i8* %3
%13 = zext i8 %12 to i32
%14 = shl i32 %13, 8
%15 = load i8, i8* %3
%16 = zext i8 %15 to i32
%17 = or i32 %14, %16
store i32 %17, i32* %6
%18 = load i8, i8* %4
%19 = zext i8 %18 to i32
%20 = shl i32 %19, 8
%21 = load i8, i8* %4
%22 = zext i8 %21 to i32
%23 = or i32 %20, %22
store i32 %23, i32* %7
%24 = load i32, i32* %5
%25 = xor i32 %24, -1
store i32 %25, i32* %11
%26 = load i32, i32* %6
%27 = load i32, i32* %11
%28 = and i32 %26, %27
store i32 %28, i32* %10
%29 = load i32, i32* %7
%30 = load i32, i32* %10
%31 = or i32 %29, %30
store i32 %31, i32* %9
%32 = load i32, i32* %5
%33 = load i32, i32* %9
%34 = xor i32 %32, %33
store i32 %34, i32* %8
%35 = load i32, i32* %8
%36 = load i32, i32* %6
%37 = xor i32 %36, -1
%38 = and i32 %35, %37
%39 = load i32, i32* %5
%40 = load i32, i32* %6
%41 = and i32 %39, %40
%42 = or i32 %38, %41
ret i32 %42
}

LLVM IR (-O2):
define i32 @xrop3_94_1_0(i8 zeroext %0, i8 zeroext %1) {
%3 = zext i8 %0 to i32
%4 = shl nuw nsw i32 %3, 8
%5 = or i32 %4, %3
%6 = zext i8 %1 to i32
%7 = mul nuw nsw i32 %6, 257
%8 = or i32 %7, %4
%9 = xor i32 %8, 255
%10 = xor i32 %5, -1
%11 = and i32 %9, %10
%12 = or i32 %11, %3
ret i32 %12
}
void g_shell_unquote() {}


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

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

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

LLVM IR (-O2):
define void @g_shell_unquote() {
ret void
}
void wait_for_gps() {}


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

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

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

LLVM IR (-O2):
define void @wait_for_gps() {
ret void
}
void s1(long double a) {}


x86 assembly (clang, -O0):
<s1>:
push   %rbp
mov    %rsp,%rbp
fldt   0x10(%rbp)
fstpt  -0x10(%rbp)
pop    %rbp
ret

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

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

LLVM IR (-O2):
define void @s1(x86_fp80 %0) {
ret void
}