#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef int uint32_t;

/* Variables and functions */
int hashlittle(char *, int, int);
int /*<<< orphan*/ hashlittle2(char *, int, int *, int *);
int /*<<< orphan*/ printf(char *, int, ...);
void driver5() {
  uint32_t b, c;
  b = 0, c = 0, hashlittle2("", 0, &c, &b);
  printf("hash is %.8lx %.8lx\n", c, b);
  b = 0xdeadbeef, c = 0, hashlittle2("", 0, &c, &b);
  printf("hash is %.8lx %.8lx\n", c, b);
  b = 0xdeadbeef, c = 0xdeadbeef, hashlittle2("", 0, &c, &b);
  printf("hash is %.8lx %.8lx\n", c, b);
  b = 0, c = 0, hashlittle2("Four score and seven years ago", 30, &c, &b);
  printf("hash is %.8lx %.8lx\n", c, b);
  b = 1, c = 0, hashlittle2("Four score and seven years ago", 30, &c, &b);
  printf("hash is %.8lx %.8lx\n", c, b);
  b = 0, c = 1, hashlittle2("Four score and seven years ago", 30, &c, &b);
  printf("hash is %.8lx %.8lx\n", c, b);
  c = hashlittle("Four score and seven years ago", 30, 0);
  printf("hash is %.8lx\n", c);
  c = hashlittle("Four score and seven years ago", 30, 1);
  printf("hash is %.8lx\n", c);
}


x86 assembly (clang, -O0):
<driver5>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xef5(%rip),%rdi
xor    %esi,%esi
lea    -0x8(%rbp),%rdx
lea    -0x4(%rbp),%rcx
call   1050 <hashlittle2@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xe97(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xdeadbeef,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xebd(%rip),%rdi
xor    %esi,%esi
lea    -0x8(%rbp),%rdx
lea    -0x4(%rbp),%rcx
call   1050 <hashlittle2@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xe5f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0xdeadbeef,-0x4(%rbp)
movl   $0xdeadbeef,-0x8(%rbp)
lea    0xe85(%rip),%rdi
xor    %esi,%esi
lea    -0x8(%rbp),%rdx
lea    -0x4(%rbp),%rcx
call   1050 <hashlittle2@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xe27(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xe20(%rip),%rdi
mov    $0x1e,%esi
lea    -0x8(%rbp),%rdx
lea    -0x4(%rbp),%rcx
call   1050 <hashlittle2@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xdec(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x1,-0x4(%rbp)
movl   $0x0,-0x8(%rbp)
lea    0xde5(%rip),%rdi
mov    $0x1e,%esi
lea    -0x8(%rbp),%rdx
lea    -0x4(%rbp),%rcx
call   1050 <hashlittle2@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xdb1(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x4(%rbp)
movl   $0x1,-0x8(%rbp)
lea    0xdaa(%rip),%rdi
mov    $0x1e,%esi
lea    -0x8(%rbp),%rdx
lea    -0x4(%rbp),%rcx
call   1050 <hashlittle2@plt>
mov    -0x8(%rbp),%esi
mov    -0x4(%rbp),%edx
lea    0xd76(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd7d(%rip),%rdi
mov    $0x1e,%esi
xor    %edx,%edx
call   1030 <hashlittle@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd83(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xd56(%rip),%rdi
mov    $0x1e,%esi
mov    $0x1,%edx
call   1030 <hashlittle@plt>
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
lea    0xd59(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<driver5>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xeee(%rip),%rbx
lea    0x8(%rsp),%r15
lea    0xc(%rsp),%r14
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1050 <hashlittle2@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
lea    0xe83(%rip),%r12
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0xdeadbeef,0xc(%rsp)
de
movl   $0x0,0x8(%rsp)
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1050 <hashlittle2@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0xdeadbeef,0xc(%rsp)
de
movl   $0xdeadbeef,0x8(%rsp)
de
mov    %rbx,%rdi
xor    %esi,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1050 <hashlittle2@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x0,0xc(%rsp)
movl   $0x0,0x8(%rsp)
lea    0xe13(%rip),%r13
mov    %r13,%rdi
mov    $0x1e,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1050 <hashlittle2@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x1,0xc(%rsp)
movl   $0x0,0x8(%rsp)
mov    %r13,%rdi
mov    $0x1e,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1050 <hashlittle2@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
movl   $0x0,0xc(%rsp)
movl   $0x1,0x8(%rsp)
mov    %r13,%rdi
mov    $0x1e,%esi
mov    %r15,%rdx
mov    %r14,%rcx
call   1050 <hashlittle2@plt>
mov    0x8(%rsp),%esi
mov    0xc(%rsp),%edx
mov    %r12,%rdi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    $0x1e,%esi
xor    %edx,%edx
call   1030 <hashlittle@plt>
mov    %eax,0x8(%rsp)
lea    0xd89(%rip),%rbx
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %r13,%rdi
mov    $0x1e,%esi
mov    $0x1,%edx
call   1030 <hashlittle@plt>
mov    %eax,0x8(%rsp)
mov    %rbx,%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [21 x i8] c"hash is %.8lx %.8lx\0A\00"
@.str.2 = [31 x i8] c"Four score and seven years ago\00"
@.str.3 = [15 x i8] c"hash is %.8lx\0A\00"
define void @driver5() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
store i32 0, i32* %2
%3 = call i32 @hashlittle2(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i32* %2, i32* %1)
%4 = load i32, i32* %2
%5 = load i32, i32* %1
%6 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %4, i32 %5)
store i32 -559038737, i32* %1
store i32 0, i32* %2
%7 = call i32 @hashlittle2(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i32* %2, i32* %1)
%8 = load i32, i32* %2
%9 = load i32, i32* %1
%10 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %8, i32 %9)
store i32 -559038737, i32* %1
store i32 -559038737, i32* %2
%11 = call i32 @hashlittle2(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i32* %2, i32* %1)
%12 = load i32, i32* %2
%13 = load i32, i32* %1
%14 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %12, i32 %13)
store i32 0, i32* %1
store i32 0, i32* %2
%15 = call i32 @hashlittle2(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 30, i32* %2, i32* %1)
%16 = load i32, i32* %2
%17 = load i32, i32* %1
%18 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %16, i32 %17)
store i32 1, i32* %1
store i32 0, i32* %2
%19 = call i32 @hashlittle2(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 30, i32* %2, i32* %1)
%20 = load i32, i32* %2
%21 = load i32, i32* %1
%22 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %20, i32 %21)
store i32 0, i32* %1
store i32 1, i32* %2
%23 = call i32 @hashlittle2(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 30, i32* %2, i32* %1)
%24 = load i32, i32* %2
%25 = load i32, i32* %1
%26 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %24, i32 %25)
%27 = call i32 @hashlittle(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 30, i32 0)
store i32 %27, i32* %2
%28 = load i32, i32* %2
%29 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %28)
%30 = call i32 @hashlittle(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 30, i32 1)
store i32 %30, i32* %2
%31 = load i32, i32* %2
%32 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %31)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [21 x i8] c"hash is %.8lx %.8lx\0A\00"
@.str.2 = [31 x i8] c"Four score and seven years ago\00"
@.str.3 = [15 x i8] c"hash is %.8lx\0A\00"
define void @driver5() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
store i32 0, i32* %1
store i32 0, i32* %2
%5 = call i32 @hashlittle2(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i32* %2, i32* %1)
%6 = load i32, i32* %2
%7 = load i32, i32* %1
%8 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %6, i32 %7)
store i32 -559038737, i32* %1
store i32 0, i32* %2
%9 = call i32 @hashlittle2(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i32* %2, i32* %1)
%10 = load i32, i32* %2
%11 = load i32, i32* %1
%12 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %11)
store i32 -559038737, i32* %1
store i32 -559038737, i32* %2
%13 = call i32 @hashlittle2(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0), i32 0, i32* %2, i32* %1)
%14 = load i32, i32* %2
%15 = load i32, i32* %1
%16 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %14, i32 %15)
store i32 0, i32* %1
store i32 0, i32* %2
%17 = call i32 @hashlittle2(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 30, i32* %2, i32* %1)
%18 = load i32, i32* %2
%19 = load i32, i32* %1
%20 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %18, i32 %19)
store i32 1, i32* %1
store i32 0, i32* %2
%21 = call i32 @hashlittle2(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 30, i32* %2, i32* %1)
%22 = load i32, i32* %2
%23 = load i32, i32* %1
%24 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %22, i32 %23)
store i32 0, i32* %1
store i32 1, i32* %2
%25 = call i32 @hashlittle2(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 30, i32* %2, i32* %1)
%26 = load i32, i32* %2
%27 = load i32, i32* %1
%28 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i32 %26, i32 %27)
%29 = call i32 @hashlittle(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 30, i32 0)
store i32 %29, i32* %2
%30 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %29)
%31 = call i32 @hashlittle(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.2, i64 0, i64 0), i32 30, i32 1)
store i32 %31, i32* %2
%32 = call i32 (i8*, i32, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 %31)
ret void
}