xunge/DecIR huggingface dataset:
int(*XSynchronize()) {}


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

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

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

LLVM IR (-O2):
define noalias i32* @XSynchronize() {
ret i32* undef
}
void l3mdev_get_saddr(struct net *net, int ifindex, struct flowi4 *fl4) {}


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

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

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

LLVM IR (-O2):
%struct.net = type opaque
%struct.flowi4 = type opaque
define void @l3mdev_get_saddr(%struct.net* nocapture %0, i32 %1, %struct.flowi4* nocapture %2) {
ret void
}
void impl_exit_critical(int thread) {}


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

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

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

LLVM IR (-O2):
define void @impl_exit_critical(i32 %0) {
ret void
}
void swap(int *x, int *y) {
  int tmp;
  tmp = *x;
  *x = *y;
  *y = tmp;
  return;
}


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

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

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

LLVM IR (-O2):
define void @swap(i32* nocapture %0, i32* nocapture %1) {
%3 = load i32, i32* %0
%4 = load i32, i32* %1
store i32 %4, i32* %0
store i32 %3, i32* %1
ret void
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128i;

/* Variables and functions */
int /*<<< orphan*/ _mm_shuffle_epi32(int /*<<< orphan*/, int);
__m128i __mm_shuffle_epi32(__m128i A, int const I) {
  return _mm_shuffle_epi32(A, 1);
}


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

x86 assembly (clang, -O2):
<__mm_shuffle_epi32>:
mov    $0x1,%esi
jmp    1030 <_mm_shuffle_epi32@plt>

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

LLVM IR (-O2):
define i32 @__mm_shuffle_epi32(i32 %0, i32 %1) {
%3 = tail call i32 @_mm_shuffle_epi32(i32 %0, i32 1)
ret i32 %3
}
void _reverse(char *s, int *idx, int *p) {
  char c = s[(*idx)++];
  if (c != '\0') {
    _reverse(s, idx, p);
    s[(*p)++] = c;
  }
}


x86 assembly (clang, -O0):
<_reverse>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    -0x10(%rbp),%rdx
mov    (%rdx),%ecx
mov    %ecx,%esi
add    $0x1,%esi
mov    %esi,(%rdx)
movslq %ecx,%rcx
mov    (%rax,%rcx,1),%al
mov    %al,-0x19(%rbp)
movsbl -0x19(%rbp),%eax
cmp    $0x0,%eax
je     1176 <_reverse+0x66>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <_reverse@plt>
mov    -0x19(%rbp),%dl
mov    -0x8(%rbp),%rax
mov    -0x18(%rbp),%rsi
mov    (%rsi),%ecx
mov    %ecx,%edi
add    $0x1,%edi
mov    %edi,(%rsi)
movslq %ecx,%rcx
mov    %dl,(%rax,%rcx,1)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_reverse>:
push   %rbp
push   %r14
push   %rbx
movslq (%rsi),%rax
lea    0x1(%rax),%ecx
mov    %ecx,(%rsi)
mov    (%rdi,%rax,1),%bpl
test   %bpl,%bpl
je     113d <_reverse+0x2d>
mov    %rdx,%r14
mov    %rdi,%rbx
call   1030 <_reverse@plt>
movslq (%r14),%rax
lea    0x1(%rax),%ecx
mov    %ecx,(%r14)
mov    %bpl,(%rbx,%rax,1)
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
define void @_reverse(i8* %0, i32* %1, i32* %2) {
%4 = alloca i8*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i8
store i8* %0, i8** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%8 = load i8*, i8** %4
%9 = load i32*, i32** %5
%10 = load i32, i32* %9
%11 = add nsw i32 %10, 1
store i32 %11, i32* %9
%12 = sext i32 %10 to i64
%13 = getelementptr inbounds i8, i8* %8, i64 %12
%14 = load i8, i8* %13
store i8 %14, i8* %7
%15 = load i8, i8* %7
%16 = sext i8 %15 to i32
%17 = icmp ne i32 %16, 0
br i1 %17, label %18, label %29
18: ; preds = %3
%19 = load i8*, i8** %4
%20 = load i32*, i32** %5
%21 = load i32*, i32** %6
%22 = load i8, i8* %7
%23 = load i8*, i8** %4
%24 = load i32*, i32** %6
%25 = load i32, i32* %24
%26 = add nsw i32 %25, 1
store i32 %26, i32* %24
%27 = sext i32 %25 to i64
%28 = getelementptr inbounds i8, i8* %23, i64 %27
store i8 %22, i8* %28
br label %29
29: ; preds = %18, %3
ret void
}

LLVM IR (-O2):
define void @_reverse(i8* nocapture %0, i32* nocapture %1, i32* nocapture %2) {
%4 = load i32, i32* %1
%5 = add nsw i32 %4, 1
store i32 %5, i32* %1
%6 = sext i32 %4 to i64
%7 = getelementptr inbounds i8, i8* %0, i64 %6
%8 = load i8, i8* %7
%9 = icmp eq i8 %8, 0
br i1 %9, label %10, label %11
10: ; preds = %3, %11
ret void
11: ; preds = %3
tail call void @_reverse(i8* %0, i32* %1, i32* %2)
%12 = load i32, i32* %2
%13 = add nsw i32 %12, 1
store i32 %13, i32* %2
%14 = sext i32 %12 to i64
%15 = getelementptr inbounds i8, i8* %0, i64 %14
store i8 %8, i8* %15
br label %10
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *);
main() {
  printf("KABIR\n");
  return 0;
}


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

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

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

LLVM IR (-O2):
@str = [6 x i8] c"KABIR\00"
define i32 @main() {
%1 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @str, i64 0, i64 0))
ret i32 0
}
/* Type definitions */
struct sockaddr {
  int dummy;
};
typedef int /*<<< orphan*/ socklen_t;

/* Variables and functions */
int accept(int, struct sockaddr *, int /*<<< orphan*/ *);
int accept_wrapper(int sockfd, struct sockaddr *addr, socklen_t *addrlen) {
  return accept(sockfd, addr, addrlen);
}


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

x86 assembly (clang, -O2):
<accept_wrapper>:
jmp    1030 <accept@plt>

LLVM IR (-O0):
%struct.sockaddr = type { i32 }
define i32 @accept_wrapper(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = alloca i32
%5 = alloca %struct.sockaddr*
%6 = alloca i32*
store i32 %0, i32* %4
store %struct.sockaddr* %1, %struct.sockaddr** %5
store i32* %2, i32** %6
%7 = load i32, i32* %4
%8 = load %struct.sockaddr*, %struct.sockaddr** %5
%9 = load i32*, i32** %6
%10 = call i32 @accept(i32 %7, %struct.sockaddr* %8, i32* %9)
ret i32 %10
}

LLVM IR (-O2):
%struct.sockaddr = type { i32 }
define i32 @accept_wrapper(i32 %0, %struct.sockaddr* %1, i32* %2) {
%4 = tail call i32 @accept(i32 %0, %struct.sockaddr* %1, i32* %2)
ret i32 %4
}
int ClearBit(int x, int n) { return x & ~(1 << n); }


x86 assembly (clang, -O0):
<ClearBit>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x8(%rbp),%ecx
mov    $0x1,%edx
shl    %cl,%edx
mov    %edx,%ecx
xor    $0xffffffff,%ecx
and    %ecx,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ClearBit>:
mov    %edi,%eax
btr    %esi,%eax
ret

LLVM IR (-O0):
define i32 @ClearBit(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%5 = load i32, i32* %3
%6 = load i32, i32* %4
%7 = shl i32 1, %6
%8 = xor i32 %7, -1
%9 = and i32 %5, %8
ret i32 %9
}

LLVM IR (-O2):
define i32 @ClearBit(i32 %0, i32 %1) {
%3 = shl nuw i32 1, %1
%4 = xor i32 %3, -1
%5 = and i32 %4, %0
ret i32 %5
}
/* Variables and functions */
int /*<<< orphan*/ sys_puts(char *);
int main(void) {
  char *buf = (char *)0x0;
  sys_puts("before write\n");
  buf[0] = 'x';
  sys_puts("after write");
  return 0;
}


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

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
call   1030 <sys_puts@plt>

LLVM IR (-O0):
@.str = [14 x i8] c"before write\0A\00"
@.str.1 = [12 x i8] c"after write\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* null, i8** %2
%3 = call i32 @sys_puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%4 = load i8*, i8** %2
%5 = getelementptr inbounds i8, i8* %4, i64 0
store i8 120, i8* %5
%6 = call i32 @sys_puts(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.1, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"before write\0A\00"
define i32 @main() {
%1 = tail call i32 @sys_puts(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
unreachable
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ reverseWords(char *);
int main(int argc, char **argv) {
  reverseWords(argv[1]);
  printf("%s\n", argv[1]);
  return (0);
}


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

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   1040 <reverseWords@plt>
mov    0x8(%rbx),%rsi
lea    0xec8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @reverseWords(i8* %4)
%6 = load i8*, i8** %3
%7 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %6)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ putchar_hex(int);
void putint_hex(int a) {
  putchar_hex((a >> 24) & 0xFF);
  putchar_hex((a >> 16) & 0xFF);
  putchar_hex((a >> 8) & 0xFF);
  putchar_hex((a >> 0) & 0xFF);
}


x86 assembly (clang, -O0):
<putint_hex>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    -0x4(%rbp),%edi
sar    $0x18,%edi
and    $0xff,%edi
call   1030 <putchar_hex@plt>
mov    -0x4(%rbp),%edi
sar    $0x10,%edi
and    $0xff,%edi
call   1030 <putchar_hex@plt>
mov    -0x4(%rbp),%edi
sar    $0x8,%edi
and    $0xff,%edi
call   1030 <putchar_hex@plt>
mov    -0x4(%rbp),%edi
sar    $0x0,%edi
and    $0xff,%edi
call   1030 <putchar_hex@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<putint_hex>:
push   %rbx
mov    %edi,%ebx
mov    %edi,%eax
shr    $0x18,%eax
mov    %eax,%edi
call   1030 <putchar_hex@plt>
mov    %ebx,%eax
shr    $0x10,%eax
movzbl %al,%edi
call   1030 <putchar_hex@plt>
movzbl %bh,%edi
call   1030 <putchar_hex@plt>
movzbl %bl,%edi
pop    %rbx
jmp    1030 <putchar_hex@plt>

LLVM IR (-O0):
define void @putint_hex(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = ashr i32 %3, 24
%5 = and i32 %4, 255
%6 = call i32 @putchar_hex(i32 %5)
%7 = load i32, i32* %2
%8 = ashr i32 %7, 16
%9 = and i32 %8, 255
%10 = call i32 @putchar_hex(i32 %9)
%11 = load i32, i32* %2
%12 = ashr i32 %11, 8
%13 = and i32 %12, 255
%14 = call i32 @putchar_hex(i32 %13)
%15 = load i32, i32* %2
%16 = ashr i32 %15, 0
%17 = and i32 %16, 255
%18 = call i32 @putchar_hex(i32 %17)
ret void
}

LLVM IR (-O2):
define void @putint_hex(i32 %0) {
%2 = lshr i32 %0, 24
%3 = tail call i32 @putchar_hex(i32 %2)
%4 = lshr i32 %0, 16
%5 = and i32 %4, 255
%6 = tail call i32 @putchar_hex(i32 %5)
%7 = lshr i32 %0, 8
%8 = and i32 %7, 255
%9 = tail call i32 @putchar_hex(i32 %8)
%10 = and i32 %0, 255
%11 = tail call i32 @putchar_hex(i32 %10)
ret void
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int /*<<< orphan*/ scanf(char *, long *);
int main(int argc, char *argv[]) {
  long i;
  int h;
  scanf("%ld", &i);
  h = i;
  printf("%d\n", h);
  return 0;
}


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)
lea    0xec3(%rip),%rdi
lea    -0x18(%rbp),%rsi
call   1040 <scanf@plt>
mov    -0x18(%rbp),%rax
mov    %eax,-0x1c(%rbp)
mov    -0x1c(%rbp),%esi
lea    0xead(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xed8(%rip),%rdi
mov    %rsp,%rsi
call   1040 <scanf@plt>
mov    (%rsp),%esi
lea    0xeca(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

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

LLVM IR (-O2):
@.str = [4 x i8] c"%ld\00"
@.str.1 = [4 x i8] c"%d\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i64
%4 = bitcast i64* %3 to i8*
%5 = call i32 @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64* %3)
%6 = load i64, i64* %3
%7 = trunc i64 %6 to i32
%8 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32 %7)
ret i32 0
}
int hammingDistance(int x, int y) {
  int z = x ^ y;
  int dis = 0;
  while (z > 0) {
    if ((z & 1) == 1)
      dis++;
    z = z >> 1;
  }
  return dis;
}


x86 assembly (clang, -O0):
<hammingDistance>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%eax
xor    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
movl   $0x0,-0x10(%rbp)
cmpl   $0x0,-0xc(%rbp)
jle    114a <hammingDistance+0x4a>
mov    -0xc(%rbp),%eax
and    $0x1,%eax
cmp    $0x1,%eax
jne    113c <hammingDistance+0x3c>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
mov    -0xc(%rbp),%eax
sar    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    111a <hammingDistance+0x1a>
mov    -0x10(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<hammingDistance>:
xor    %eax,%eax
xor    %esi,%edi
jle    1120 <hammingDistance+0x20>
mov    %edi,%ecx
nopl   0x0(%rax,%rax,1)
mov    %edi,%edx
and    $0x1,%edx
add    %edx,%eax
shr    %ecx
cmp    $0x1,%edi
mov    %ecx,%edi
ja     1110 <hammingDistance+0x10>
ret

LLVM IR (-O0):
define i32 @hammingDistance(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
%7 = load i32, i32* %3
%8 = load i32, i32* %4
%9 = xor i32 %7, %8
store i32 %9, i32* %5
store i32 0, i32* %6
br label %10
10: ; preds = %20, %2
%11 = load i32, i32* %5
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %23
13: ; preds = %10
%14 = load i32, i32* %5
%15 = and i32 %14, 1
%16 = icmp eq i32 %15, 1
br i1 %16, label %17, label %20
17: ; preds = %13
%18 = load i32, i32* %6
%19 = add nsw i32 %18, 1
store i32 %19, i32* %6
br label %20
20: ; preds = %17, %13
%21 = load i32, i32* %5
%22 = ashr i32 %21, 1
store i32 %22, i32* %5
br label %10
23: ; preds = %10
%24 = load i32, i32* %6
ret i32 %24
}

LLVM IR (-O2):
define i32 @hammingDistance(i32 %0, i32 %1) {
%3 = xor i32 %1, %0
%4 = icmp sgt i32 %3, 0
br i1 %4, label %5, label %12
5: ; preds = %2, %5
%6 = phi i32 [ %9, %5 ], [ 0, %2 ]
%7 = phi i32 [ %10, %5 ], [ %3, %2 ]
%8 = and i32 %7, 1
%9 = add nuw nsw i32 %6, %8
%10 = lshr i32 %7, 1
%11 = icmp ult i32 %7, 2
br i1 %11, label %12, label %5
12: ; preds = %5, %2
%13 = phi i32 [ 0, %2 ], [ %9, %5 ]
ret i32 %13
}
void dec_zcache_objnode_count(void) {}


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

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

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

LLVM IR (-O2):
define void @dec_zcache_objnode_count() {
ret void
}
const char *Int_Brief(void) { return "Integer Object"; }


x86 assembly (clang, -O0):
<Int_Brief>:
push   %rbp
mov    %rsp,%rbp
lea    0xef5(%rip),%rax
pop    %rbp
ret

x86 assembly (clang, -O2):
<Int_Brief>:
lea    0xef9(%rip),%rax
ret

LLVM IR (-O0):
@.str = [15 x i8] c"Integer Object\00"
define i8* @Int_Brief() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}

LLVM IR (-O2):
@.str = [15 x i8] c"Integer Object\00"
define i8* @Int_Brief() {
ret i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str, i64 0, i64 0)
}
/* Variables and functions */
int /*<<< orphan*/ tap_write(unsigned char const *, int);
int process_data_response(void *dev, const unsigned char *buf, int len) {
  tap_write(buf + 6, len - 6);
  return 0;
}


x86 assembly (clang, -O0):
<process_data_response>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %edx,-0x14(%rbp)
mov    -0x10(%rbp),%rdi
add    $0x6,%rdi
mov    -0x14(%rbp),%esi
sub    $0x6,%esi
call   1030 <tap_write@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<process_data_response>:
push   %rax
lea    0x6(%rsi),%rdi
lea    -0x6(%rdx),%esi
call   1030 <tap_write@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
define i32 @process_data_response(i8* %0, i8* %1, i32 %2) {
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
store i32 %2, i32* %6
%7 = load i8*, i8** %5
%8 = getelementptr inbounds i8, i8* %7, i64 6
%9 = load i32, i32* %6
%10 = sub nsw i32 %9, 6
%11 = call i32 @tap_write(i8* %8, i32 %10)
ret i32 0
}

LLVM IR (-O2):
define i32 @process_data_response(i8* nocapture readnone %0, i8* %1, i32 %2) {
%4 = getelementptr inbounds i8, i8* %1, i64 6
%5 = add nsw i32 %2, -6
%6 = tail call i32 @tap_write(i8* %4, i32 %5)
ret i32 0
}
AR0AR1(r0, r1, x0, x1, p0, p1) char r0, r1;
char *p0, *p1;
{ (p0[10000000]) = (p1[1111111 / 4]); }


x86 assembly (clang, -O0):
<AR0AR1>:
push   %rbp
mov    %rsp,%rbp
mov    %esi,%eax
mov    %dil,%sil
mov    %sil,-0x5(%rbp)
mov    %al,-0x6(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8,-0x18(%rbp)
mov    %r9,-0x20(%rbp)
mov    -0x20(%rbp),%rax
mov    0x43d11(%rax),%cl
mov    -0x18(%rbp),%rax
mov    %cl,0x989680(%rax)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<AR0AR1>:
mov    0x43d11(%r9),%al
mov    %al,0x989680(%r8)
ret

LLVM IR (-O0):
define i32 @AR0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i8* %4, i8* %5) {
%7 = alloca i32
%8 = alloca i8
%9 = alloca i8
%10 = alloca i32
%11 = alloca i32
%12 = alloca i8*
%13 = alloca i8*
%14 = trunc i32 %0 to i8
%15 = trunc i32 %1 to i8
store i8 %14, i8* %8
store i8 %15, i8* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i8* %4, i8** %12
store i8* %5, i8** %13
%16 = load i8*, i8** %13
%17 = getelementptr inbounds i8, i8* %16, i64 277777
%18 = load i8, i8* %17
%19 = load i8*, i8** %12
%20 = getelementptr inbounds i8, i8* %19, i64 10000000
store i8 %18, i8* %20
%21 = load i32, i32* %7
ret i32 %21
}

LLVM IR (-O2):
define i32 @AR0AR1(i32 %0, i32 %1, i32 %2, i32 %3, i8* nocapture writeonly %4, i8* nocapture %5) {
%7 = getelementptr inbounds i8, i8* %5, i64 277777
%8 = load i8, i8* %7
%9 = getelementptr inbounds i8, i8* %4, i64 10000000
store i8 %8, i8* %9
ret i32 undef
}
int delimiter_p_full(char ch) {
  return (ch == '.' || ch == '_' || ch == '/' || ch == '*' || ch == ' ' ||
          ch == '\'' || ch == '"');
}


x86 assembly (clang, -O0):
<delimiter_p_full>:
push   %rbp
mov    %rsp,%rbp
mov    %dil,%al
mov    %al,-0x1(%rbp)
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2e,%ecx
mov    %al,-0x2(%rbp)
je     1183 <delimiter_p_full+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x5f,%ecx
mov    %al,-0x2(%rbp)
je     1183 <delimiter_p_full+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2f,%ecx
mov    %al,-0x2(%rbp)
je     1183 <delimiter_p_full+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2a,%ecx
mov    %al,-0x2(%rbp)
je     1183 <delimiter_p_full+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x2(%rbp)
je     1183 <delimiter_p_full+0x83>
movsbl -0x1(%rbp),%ecx
mov    $0x1,%al
cmp    $0x27,%ecx
mov    %al,-0x2(%rbp)
je     1183 <delimiter_p_full+0x83>
movsbl -0x1(%rbp),%eax
cmp    $0x22,%eax
sete   %al
mov    %al,-0x2(%rbp)
mov    -0x2(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<delimiter_p_full>:
lea    -0x20(%rdi),%ecx
cmp    $0x3f,%cl
ja     1121 <delimiter_p_full+0x21>
mov    $0x1,%eax
movzbl %cl,%ecx
movabs $0x800000000000c481,%rdx
bt     %rcx,%rdx
jae    1121 <delimiter_p_full+0x21>
ret
xor    %eax,%eax
cmp    $0x22,%dil
sete   %al
ret

LLVM IR (-O0):
define i32 @delimiter_p_full(i8 signext %0) {
%2 = alloca i8
store i8 %0, i8* %2
%3 = load i8, i8* %2
%4 = sext i8 %3 to i32
%5 = icmp eq i32 %4, 46
br i1 %5, label %30, label %6
6: ; preds = %1
%7 = load i8, i8* %2
%8 = sext i8 %7 to i32
%9 = icmp eq i32 %8, 95
br i1 %9, label %30, label %10
10: ; preds = %6
%11 = load i8, i8* %2
%12 = sext i8 %11 to i32
%13 = icmp eq i32 %12, 47
br i1 %13, label %30, label %14
14: ; preds = %10
%15 = load i8, i8* %2
%16 = sext i8 %15 to i32
%17 = icmp eq i32 %16, 42
br i1 %17, label %30, label %18
18: ; preds = %14
%19 = load i8, i8* %2
%20 = sext i8 %19 to i32
%21 = icmp eq i32 %20, 32
br i1 %21, label %30, label %22
22: ; preds = %18
%23 = load i8, i8* %2
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 39
br i1 %25, label %30, label %26
26: ; preds = %22
%27 = load i8, i8* %2
%28 = sext i8 %27 to i32
%29 = icmp eq i32 %28, 34
br label %30
30: ; preds = %26, %22, %18, %14, %10, %6, %1
%31 = phi i1 [ true, %22 ], [ true, %18 ], [ true, %14 ], [ true, %10 ], [ true, %6 ], [ true, %1 ], [ %29, %26 ]
%32 = zext i1 %31 to i32
ret i32 %32
}

LLVM IR (-O2):
define i32 @delimiter_p_full(i8 signext %0) {
switch i8 %0, label %2 [
i8 95, label %5
i8 47, label %5
i8 46, label %5
i8 42, label %5
i8 39, label %5
i8 32, label %5
]
2: ; preds = %1
%3 = icmp eq i8 %0, 34
%4 = zext i1 %3 to i32
br label %5
5: ; preds = %1, %1, %1, %1, %1, %1, %2
%6 = phi i32 [ 1, %1 ], [ %4, %2 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ], [ 1, %1 ]
ret i32 %6
}
/* Type definitions */
typedef int /*<<< orphan*/ __m128;

/* Variables and functions */
int _mm_cvtss_si32(int /*<<< orphan*/);
int __attribute__((__always___, __nodebug__)) _mm_cvt_ss2si(__m128 a) {
  return _mm_cvtss_si32(a);
}


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

x86 assembly (clang, -O2):
<_mm_cvt_ss2si>:
jmp    1030 <_mm_cvtss_si32@plt>

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

LLVM IR (-O2):
define i32 @_mm_cvt_ss2si(i32 %0) {
%2 = tail call i32 @_mm_cvtss_si32(i32 %0)
ret i32 %2
}
/* Variables and functions */
int f102(int *);
int f103(int *p) { return f102(p); }


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

x86 assembly (clang, -O2):
<f103>:
jmp    1030 <f102@plt>

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

LLVM IR (-O2):
define i32 @f103(i32* %0) {
%2 = tail call i32 @f102(i32* %0)
ret i32 %2
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, int);
int main() {
  int i, sum = 0;
  for (i = 1; i <= 100; i++) {
    sum += i;
  }
  printf("1+2+3...+100=%d\n", sum);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0xc(%rbp)
movl   $0x1,-0x8(%rbp)
cmpl   $0x64,-0x8(%rbp)
jg     114e <main+0x3e>
mov    -0x8(%rbp),%eax
add    -0xc(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    112d <main+0x1d>
mov    -0xc(%rbp),%esi
lea    0xea8(%rip),%rdi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

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

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

LLVM IR (-O2):
@.str = [17 x i8] c"1+2+3...+100=%d\0A\00"
define i32 @main() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str, i64 0, i64 0), i32 5050)
ret i32 0
}
/* Variables and functions */
int /*<<< orphan*/ close(int);
void closeFB(int fh) { close(fh); }


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

x86 assembly (clang, -O2):
<closeFB>:
jmp    1030 <close@plt>

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

LLVM IR (-O2):
define void @closeFB(i32 %0) {
%2 = tail call i32 @close(i32 %0)
ret void
}
int main() {
  int x = 1;
  while (1) {
    x = 1;
    while (1) {
      x = 1;
      break;
    }
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
movl   $0x1,-0x8(%rbp)
jmp    1112 <main+0x12>

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

LLVM IR (-O0):
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 1, i32* %2
br label %3
3: ; preds = %0, %5
store i32 1, i32* %2
br label %4
4: ; preds = %3
store i32 1, i32* %2
br label %5
5: ; preds = %4
br label %3
}

LLVM IR (-O2):
define i32 @main() {
br label %1
1: ; preds = %1, %0
br label %1
}
/* Type definitions */
struct array {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ array_add(struct array *, int);
int /*<<< orphan*/ array_init(struct array *, int);
void pqmin_init(struct array *a) {
  array_init(a, 10);
  array_add(a, -1);
}


x86 assembly (clang, -O0):
<pqmin_init>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
mov    $0xa,%esi
call   1040 <array_init@plt>
mov    -0x8(%rbp),%rdi
mov    $0xffffffff,%esi
call   1030 <array_add@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pqmin_init>:
push   %rbx
mov    %rdi,%rbx
mov    $0xa,%esi
call   1040 <array_init@plt>
mov    %rbx,%rdi
mov    $0xffffffff,%esi
pop    %rbx
jmp    1030 <array_add@plt>

LLVM IR (-O0):
%struct.array = type { i32 }
define void @pqmin_init(%struct.array* %0) {
%2 = alloca %struct.array*
store %struct.array* %0, %struct.array** %2
%3 = load %struct.array*, %struct.array** %2
%4 = call i32 @array_init(%struct.array* %3, i32 10)
%5 = load %struct.array*, %struct.array** %2
%6 = call i32 @array_add(%struct.array* %5, i32 -1)
ret void
}

LLVM IR (-O2):
%struct.array = type { i32 }
define void @pqmin_init(%struct.array* %0) {
%2 = tail call i32 @array_init(%struct.array* %0, i32 10)
%3 = tail call i32 @array_add(%struct.array* %0, i32 -1)
ret void
}
__attribute__((no_sanitize("implicit-conversion"))) unsigned int
blacklist_2(signed int src) {
  return src;
}


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

x86 assembly (clang, -O2):
<blacklist_2>:
mov    %edi,%eax
ret

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

LLVM IR (-O2):
define i32 @blacklist_2(i32 returned %0) {
ret i32 %0
}
void handle_38(sig) int sig;
{}


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

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

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

LLVM IR (-O2):
define void @handle_38(i32 %0) {
ret void
}
unsigned short ip_fast_csum(unsigned char *iph, unsigned int ihl) {
  return ~do_csum(iph, ihl * 4);
}


x86 assembly (clang, -O0):
<ip_fast_csum>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
shl    $0x2,%esi
mov    $0x0,%al
call   1030 <do_csum@plt>
xor    $0xffffffff,%eax
movzwl %ax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<ip_fast_csum>:
push   %rax
shl    $0x2,%esi
xor    %eax,%eax
call   1030 <do_csum@plt>
not    %eax
pop    %rcx
ret

LLVM IR (-O0):
define zeroext i16 @ip_fast_csum(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
%5 = load i8*, i8** %3
%6 = load i32, i32* %4
%7 = mul i32 %6, 4
%8 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_csum to i32 (i8*, i32, ...)*)(i8* %5, i32 %7)
%9 = xor i32 %8, -1
%10 = trunc i32 %9 to i16
ret i16 %10
}

LLVM IR (-O2):
define zeroext i16 @ip_fast_csum(i8* %0, i32 %1) {
%3 = shl i32 %1, 2
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @do_csum to i32 (i8*, i32, ...)*)(i8* %0, i32 %3)
%5 = trunc i32 %4 to i16
%6 = xor i16 %5, -1
ret i16 %6
}
/* Variables and functions */
int /*<<< orphan*/ printf(char *, unsigned int, int);
int reverseBits(unsigned int);
int main() {
  unsigned int a = 67;
  unsigned int b = reverseBits(a);
  printf("%u %u\n", a, reverseBits(b));
  return 0;
}


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

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

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

LLVM IR (-O2):
@.str = [7 x i8] c"%u %u\0A\00"
define i32 @main() {
%1 = tail call i32 @reverseBits(i32 67)
%2 = tail call i32 @reverseBits(i32 %1)
%3 = tail call i32 @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str, i64 0, i64 0), i32 67, i32 %2)
ret i32 0
}
int FIPS_selftest_failed() { return 0; }


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

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

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

LLVM IR (-O2):
define i32 @FIPS_selftest_failed() {
ret i32 0
}
double test_or(int x, int y) {
  int z = x || y;
  return !z;
}


x86 assembly (clang, -O0):
<test_or>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    $0x1,%al
cmpl   $0x0,-0x4(%rbp)
mov    %al,-0xd(%rbp)
jne    1123 <test_or+0x23>
cmpl   $0x0,-0x8(%rbp)
setne  %al
mov    %al,-0xd(%rbp)
mov    -0xd(%rbp),%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0xc(%rbp)
cmpl   $0x0,-0xc(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
cvtsi2sd %eax,%xmm0
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_or>:
or     %esi,%edi
je     1108 <test_or+0x8>
xorps  %xmm0,%xmm0
ret
movsd  0xef0(%rip),%xmm0
ret

LLVM IR (-O0):
define double @test_or(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 = icmp ne i32 %6, 0
br i1 %7, label %11, label %8
8: ; preds = %2
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 0
br label %11
11: ; preds = %8, %2
%12 = phi i1 [ true, %2 ], [ %10, %8 ]
%13 = zext i1 %12 to i32
store i32 %13, i32* %5
%14 = load i32, i32* %5
%15 = icmp ne i32 %14, 0
%16 = xor i1 %15, true
%17 = zext i1 %16 to i32
%18 = sitofp i32 %17 to double
ret double %18
}

LLVM IR (-O2):
define double @test_or(i32 %0, i32 %1) {
%3 = or i32 %1, %0
%4 = icmp eq i32 %3, 0
%5 = uitofp i1 %4 to double
ret double %5
}
/* Type definitions */
typedef int uint8_t;

/* Variables and functions */
#define IPPROTO_ICMP 130
#define IPPROTO_TCP 129
#define IPPROTO_UDP 128
int is_protocol_portless(uint8_t proto) {
  switch (proto) {
  case IPPROTO_ICMP:
    return 1;
  case IPPROTO_TCP:
  case IPPROTO_UDP:
  default:
    return 0;
  }
}


x86 assembly (clang, -O0):
<is_protocol_portless>:
push   %rbp
mov    %rsp,%rbp
mov    %edi,-0x8(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0xc(%rbp)
add    $0xffffff80,%eax
sub    $0x2,%eax
jb     113d <is_protocol_portless+0x3d>
jmp    111e <is_protocol_portless+0x1e>
mov    -0xc(%rbp),%eax
sub    $0x82,%eax
jne    1142 <is_protocol_portless+0x42>
jmp    1131 <is_protocol_portless+0x31>
movl   $0x1,-0x4(%rbp)
jmp    1149 <is_protocol_portless+0x49>
jmp    1142 <is_protocol_portless+0x42>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<is_protocol_portless>:
xor    %eax,%eax
cmp    $0x82,%edi
sete   %al
ret

LLVM IR (-O0):
define i32 @is_protocol_portless(i32 %0) {
%2 = alloca i32
%3 = alloca i32
store i32 %0, i32* %3
%4 = load i32, i32* %3
switch i32 %4, label %7 [
i32 130, label %5
i32 129, label %6
i32 128, label %6
]
5: ; preds = %1
store i32 1, i32* %2
br label %8
6: ; preds = %1, %1
br label %7
7: ; preds = %1, %6
store i32 0, i32* %2
br label %8
8: ; preds = %7, %5
%9 = load i32, i32* %2
ret i32 %9
}

LLVM IR (-O2):
define i32 @is_protocol_portless(i32 %0) {
%2 = icmp eq i32 %0, 130
%3 = zext i1 %2 to i32
ret i32 %3
}
void foo247() {}


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

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

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

LLVM IR (-O2):
define void @foo247() {
ret void
}
long double ull2ld(u)
unsigned long long int u;
{ return u; }


x86 assembly (clang, -O0):
<ull2ld>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
test   %rax,%rax
sets   %al
movzbl %al,%eax
mov    %eax,%ecx
fildll -0x10(%rbp)
lea    0xedb(%rip),%rax
flds   (%rax,%rcx,4)
faddp  %st,%st(1)
pop    %rbp
ret

x86 assembly (clang, -O2):
<ull2ld>:
mov    %rdi,-0x8(%rsp)
xor    %eax,%eax
test   %rdi,%rdi
sets   %al
fildll -0x8(%rsp)
lea    0xee8(%rip),%rcx
fadds  (%rcx,%rax,4)
ret

LLVM IR (-O0):
define x86_fp80 @ull2ld(i64 %0) {
%2 = alloca i64
store i64 %0, i64* %2
%3 = load i64, i64* %2
%4 = uitofp i64 %3 to x86_fp80
ret x86_fp80 %4
}

LLVM IR (-O2):
define x86_fp80 @ull2ld(i64 %0) {
%2 = uitofp i64 %0 to x86_fp80
ret x86_fp80 %2
}
/* Variables and functions */
int /*<<< orphan*/ Assert_real(int, char *, int, char *);
scalar_t__ isupper(int);
void t_isupper_0x80() {
  Assert_real((isupper(128) == 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",
              645, ("isupper should be 0 for 0x80"));
}


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

x86 assembly (clang, -O2):
<t_isupper_0x80>:
push   %rax
mov    $0x80,%edi
call   1030 <isupper@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
lea    0xec5(%rip),%rsi
lea    0xf66(%rip),%rcx
mov    $0x285,%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 0x80\00"
define void @t_isupper_0x80() {
%1 = call i64 @isupper(i32 128)
%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 645, 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 0x80\00"
define void @t_isupper_0x80() {
%1 = tail call i64 @isupper(i32 128)
%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 645, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
ret void
}
void ath_dynack_sample_tx_ts(struct ath_hw *ah, struct sk_buff *skb,
                             struct ath_tx_status *ts,
                             struct ieee80211_sta *sta) {}


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

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

LLVM IR (-O0):
%struct.ath_hw = type opaque
%struct.sk_buff = type opaque
%struct.ath_tx_status = type opaque
%struct.ieee80211_sta = type opaque
define void @ath_dynack_sample_tx_ts(%struct.ath_hw* %0, %struct.sk_buff* %1, %struct.ath_tx_status* %2, %struct.ieee80211_sta* %3) {
%5 = alloca %struct.ath_hw*
%6 = alloca %struct.sk_buff*
%7 = alloca %struct.ath_tx_status*
%8 = alloca %struct.ieee80211_sta*
store %struct.ath_hw* %0, %struct.ath_hw** %5
store %struct.sk_buff* %1, %struct.sk_buff** %6
store %struct.ath_tx_status* %2, %struct.ath_tx_status** %7
store %struct.ieee80211_sta* %3, %struct.ieee80211_sta** %8
ret void
}

LLVM IR (-O2):
%struct.ath_hw = type opaque
%struct.sk_buff = type opaque
%struct.ath_tx_status = type opaque
%struct.ieee80211_sta = type opaque
define void @ath_dynack_sample_tx_ts(%struct.ath_hw* nocapture %0, %struct.sk_buff* nocapture %1, %struct.ath_tx_status* nocapture %2, %struct.ieee80211_sta* nocapture %3) {
ret void
}
/* Forward declarations */
typedef struct TYPE_2__ TYPE_1__;

/* Type definitions */
struct TYPE_2__ {
  scalar_t__ stipple;
};
typedef TYPE_1__ XGCValues;

/* Variables and functions */
unsigned long get_XGCValues_stipple(void *_p) {
  return (unsigned long)((XGCValues *)_p)->stipple;
}


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

x86 assembly (clang, -O2):
<get_XGCValues_stipple>:
mov    (%rdi),%rax
ret

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

LLVM IR (-O2):
define i64 @get_XGCValues_stipple(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
unsigned short ptr_high(void *p) {
  unsigned long x = (unsigned long)p;
  return x >> 16;
}


x86 assembly (clang, -O0):
<ptr_high>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
shr    $0x10,%rax
movzwl %ax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<ptr_high>:
mov    %rdi,%rax
shr    $0x10,%rax
ret

LLVM IR (-O0):
define zeroext i16 @ptr_high(i8* %0) {
%2 = alloca i8*
%3 = alloca i64
store i8* %0, i8** %2
%4 = load i8*, i8** %2
%5 = ptrtoint i8* %4 to i64
store i64 %5, i64* %3
%6 = load i64, i64* %3
%7 = lshr i64 %6, 16
%8 = trunc i64 %7 to i16
ret i16 %8
}

LLVM IR (-O2):
define zeroext i16 @ptr_high(i8* %0) {
%2 = ptrtoint i8* %0 to i64
%3 = lshr i64 %2, 16
%4 = trunc i64 %3 to i16
ret i16 %4
}
/* Variables and functions */
int /*<<< orphan*/ *StringList_get_definition(char const *);
bool StringList_has_definition(const char *name) {
  return StringList_get_definition(name) != NULL;
}


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

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

LLVM IR (-O0):
define i32 @StringList_has_definition(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32* @StringList_get_definition(i8* %3)
%5 = icmp ne i32* %4, null
%6 = zext i1 %5 to i32
ret i32 %6
}

LLVM IR (-O2):
define i32 @StringList_has_definition(i8* %0) {
%2 = tail call i32* @StringList_get_definition(i8* %0)
%3 = icmp ne i32* %2, null
%4 = zext i1 %3 to i32
ret i32 %4
}
/* Type definitions */
struct foo {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ foo_rele(struct foo *);
int /*<<< orphan*/ printf(char *, unsigned int);
scalar_t__ pthread_self();
void *thr_fn_rele(void *arg) {
  printf("thread id %u\n", (unsigned int)pthread_self());
  foo_rele((struct foo *)arg);
  return ((void *)0);
}


x86 assembly (clang, -O0):
<thr_fn_rele>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    $0x0,%al
call   1040 <pthread_self@plt>
mov    %eax,%esi
lea    0xeb4(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1050 <foo_rele@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<thr_fn_rele>:
push   %rbx
mov    %rdi,%rbx
xor    %eax,%eax
call   1040 <pthread_self@plt>
lea    0xebe(%rip),%rdi
mov    %eax,%esi
call   1030 <printf@plt>
mov    %rbx,%rdi
call   1050 <foo_rele@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
%struct.foo = type { i32 }
@.str = [14 x i8] c"thread id %u\0A\00"
define i8* @thr_fn_rele(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = call i64 (...) @pthread_self()
%4 = trunc i64 %3 to i32
%5 = call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %4)
%6 = load i8*, i8** %2
%7 = bitcast i8* %6 to %struct.foo*
%8 = call i32 @foo_rele(%struct.foo* %7)
ret i8* null
}

LLVM IR (-O2):
%struct.foo = type { i32 }
@.str = [14 x i8] c"thread id %u\0A\00"
define noalias i8* @thr_fn_rele(i8* %0) {
%2 = tail call i64 (...) @pthread_self()
%3 = trunc i64 %2 to i32
%4 = tail call i32 @printf(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i32 %3)
%5 = bitcast i8* %0 to %struct.foo*
%6 = tail call i32 @foo_rele(%struct.foo* %5)
ret i8* null
}
/* Forward declarations */
typedef struct TYPE_4__ TYPE_2__;
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  scalar_t__ serial;
};
struct TYPE_4__ {
  TYPE_1__ xgravity;
};
typedef TYPE_2__ XEvent;

/* Variables and functions */
unsigned long get_XEvent_xgravity_serial(void *_p) {
  return (unsigned long)((XEvent *)_p)->xgravity.serial;
}


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

x86 assembly (clang, -O2):
<get_XEvent_xgravity_serial>:
mov    (%rdi),%rax
ret

LLVM IR (-O0):
%struct.TYPE_4__ = type { %struct.TYPE_3__ }
%struct.TYPE_3__ = type { i64 }
define i64 @get_XEvent_xgravity_serial(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = bitcast i8* %3 to %struct.TYPE_4__*
%5 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %4, i32 0, i32 0
%6 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %5, i32 0, i32 0
%7 = load i64, i64* %6
ret i64 %7
}

LLVM IR (-O2):
define i64 @get_XEvent_xgravity_serial(i8* nocapture %0) {
%2 = bitcast i8* %0 to i64*
%3 = load i64, i64* %2
ret i64 %3
}
void buffer_clear(char **sbuff, char *start) { *sbuff = start; }


x86 assembly (clang, -O0):
<buffer_clear>:
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):
<buffer_clear>:
mov    %rsi,(%rdi)
ret

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

LLVM IR (-O2):
define void @buffer_clear(i8** nocapture writeonly %0, i8* %1) {
store i8* %1, i8** %0
ret void
}