#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 */

/* Variables and functions */
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ psdes_hash_64(unsigned int *, unsigned int *);
void test_psdes_hash_64(void) {
  unsigned i, j;
  unsigned a, b;
  for (i = 0; i < 8; i++) {
    for (j = 0; j < 8; j++) {
      a = i;
      b = j;
      psdes_hash_64(&a, &b);
      printf("0x%08x 0x%08x => 0x%08x 0x%08x\n", i, j, a, b);
    }
    printf("\n");
  }
}


x86 assembly (clang, -O0):
<test_psdes_hash_64>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
cmpl   $0x8,-0x4(%rbp)
jae    11a8 <test_psdes_hash_64+0x88>
movl   $0x0,-0x8(%rbp)
cmpl   $0x8,-0x8(%rbp)
jae    118c <test_psdes_hash_64+0x6c>
mov    -0x4(%rbp),%eax
mov    %eax,-0xc(%rbp)
mov    -0x8(%rbp),%eax
mov    %eax,-0x10(%rbp)
lea    -0xc(%rbp),%rdi
lea    -0x10(%rbp),%rsi
call   1030 <psdes_hash_64@plt>
mov    -0x4(%rbp),%esi
mov    -0x8(%rbp),%edx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1140 <test_psdes_hash_64+0x20>
lea    0xe8b(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4(%rbp)
jmp    112f <test_psdes_hash_64+0xf>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_psdes_hash_64>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
lea    0x4(%rsp),%r14
mov    %rsp,%r15
lea    0xeba(%rip),%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
mov    %ebp,0x4(%rsp)
movl   $0x0,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <psdes_hash_64@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%r8d
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %edx,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,0x4(%rsp)
movl   $0x1,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <psdes_hash_64@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%r8d
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,0x4(%rsp)
movl   $0x2,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <psdes_hash_64@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%r8d
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x2,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,0x4(%rsp)
movl   $0x3,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <psdes_hash_64@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%r8d
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x3,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,0x4(%rsp)
movl   $0x4,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <psdes_hash_64@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%r8d
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x4,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,0x4(%rsp)
movl   $0x5,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <psdes_hash_64@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%r8d
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x5,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,0x4(%rsp)
movl   $0x6,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <psdes_hash_64@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%r8d
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x6,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %ebp,0x4(%rsp)
movl   $0x7,(%rsp)
mov    %r14,%rdi
mov    %r15,%rsi
call   1040 <psdes_hash_64@plt>
mov    0x4(%rsp),%ecx
mov    (%rsp),%r8d
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x7,%edx
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
add    $0x1,%ebp
cmp    $0x8,%ebp
jne    1150 <test_psdes_hash_64+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [32 x i8] c"0x%08x 0x%08x => 0x%08x 0x%08x\0A\00"
@.str.1 = [2 x i8] c"\0A\00"
define void @test_psdes_hash_64() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
store i32 0, i32* %1
br label %5
5: ; preds = %26, %0
%6 = load i32, i32* %1
%7 = icmp ult i32 %6, 8
br i1 %7, label %8, label %29
8: ; preds = %5
store i32 0, i32* %2
br label %9
9: ; preds = %21, %8
%10 = load i32, i32* %2
%11 = icmp ult i32 %10, 8
br i1 %11, label %12, label %24
12: ; preds = %9
%13 = load i32, i32* %1
store i32 %13, i32* %3
%14 = load i32, i32* %2
store i32 %14, i32* %4
%15 = call i32 @psdes_hash_64(i32* %3, i32* %4)
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = load i32, i32* %3
%19 = load i32, i32* %4
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %16, i32 %17, i32 %18, i32 %19)
br label %21
21: ; preds = %12
%22 = load i32, i32* %2
%23 = add i32 %22, 1
store i32 %23, i32* %2
br label %9
24: ; preds = %9
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
br label %26
26: ; preds = %24
%27 = load i32, i32* %1
%28 = add i32 %27, 1
store i32 %28, i32* %1
br label %5
29: ; preds = %5
ret void
}

LLVM IR (-O2):
@.str = [32 x i8] c"0x%08x 0x%08x => 0x%08x 0x%08x\0A\00"
define void @test_psdes_hash_64() {
%1 = alloca i32
%2 = alloca i32
%3 = bitcast i32* %1 to i8*
%4 = bitcast i32* %2 to i8*
br label %5
5: ; preds = %0, %5
%6 = phi i32 [ 0, %0 ], [ %40, %5 ]
store i32 %6, i32* %1
store i32 0, i32* %2
%7 = call i32 @psdes_hash_64(i32* %1, i32* %2)
%8 = load i32, i32* %1
%9 = load i32, i32* %2
%10 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i32 0, i32 %8, i32 %9)
store i32 %6, i32* %1
store i32 1, i32* %2
%11 = call i32 @psdes_hash_64(i32* %1, i32* %2)
%12 = load i32, i32* %1
%13 = load i32, i32* %2
%14 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i32 1, i32 %12, i32 %13)
store i32 %6, i32* %1
store i32 2, i32* %2
%15 = call i32 @psdes_hash_64(i32* %1, i32* %2)
%16 = load i32, i32* %1
%17 = load i32, i32* %2
%18 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i32 2, i32 %16, i32 %17)
store i32 %6, i32* %1
store i32 3, i32* %2
%19 = call i32 @psdes_hash_64(i32* %1, i32* %2)
%20 = load i32, i32* %1
%21 = load i32, i32* %2
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i32 3, i32 %20, i32 %21)
store i32 %6, i32* %1
store i32 4, i32* %2
%23 = call i32 @psdes_hash_64(i32* %1, i32* %2)
%24 = load i32, i32* %1
%25 = load i32, i32* %2
%26 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i32 4, i32 %24, i32 %25)
store i32 %6, i32* %1
store i32 5, i32* %2
%27 = call i32 @psdes_hash_64(i32* %1, i32* %2)
%28 = load i32, i32* %1
%29 = load i32, i32* %2
%30 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i32 5, i32 %28, i32 %29)
store i32 %6, i32* %1
store i32 6, i32* %2
%31 = call i32 @psdes_hash_64(i32* %1, i32* %2)
%32 = load i32, i32* %1
%33 = load i32, i32* %2
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i32 6, i32 %32, i32 %33)
store i32 %6, i32* %1
store i32 7, i32* %2
%35 = call i32 @psdes_hash_64(i32* %1, i32* %2)
%36 = load i32, i32* %1
%37 = load i32, i32* %2
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0), i32 %6, i32 7, i32 %36, i32 %37)
%39 = call i32 @putchar(i32 10)
%40 = add nuw nsw i32 %6, 1
%41 = icmp eq i32 %40, 8
br i1 %41, label %42, label %5
42: ; preds = %5
ret void
}