#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*/ update_keys(unsigned int *, unsigned int const *, int);
void init_keys(const char *passwd, unsigned int *pkeys,
               const unsigned int *pcrc_32_tab) {
  *(pkeys + 0) = 305419896L;
  *(pkeys + 1) = 591751049L;
  *(pkeys + 2) = 878082192L;
  while (*passwd != 0) {
    update_keys(pkeys, pcrc_32_tab, (int)*passwd);
    passwd++;
  }
}


x86 assembly (clang, -O0):
<init_keys>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x10(%rbp),%rax
movl   $0x12345678,(%rax)
mov    -0x10(%rbp),%rax
movl   $0x23456789,0x4(%rax)
mov    -0x10(%rbp),%rax
movl   $0x34567890,0x8(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
je     1179 <init_keys+0x69>
mov    -0x10(%rbp),%rdi
mov    -0x18(%rbp),%rsi
mov    -0x8(%rbp),%rax
movsbl (%rax),%edx
call   1030 <update_keys@plt>
mov    -0x8(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x8(%rbp)
jmp    1144 <init_keys+0x34>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<init_keys>:
push   %r15
push   %r14
push   %rbx
movabs $0x2345678912345678,%rax
67 45 23
mov    %rax,(%rsi)
movl   $0x34567890,0x8(%rsi)
mov    (%rdi),%al
test   %al,%al
je     1159 <init_keys+0x49>
mov    %rdx,%r14
mov    %rsi,%r15
mov    %rdi,%rbx
add    $0x1,%rbx
nopl   0x0(%rax)
movsbl %al,%edx
mov    %r15,%rdi
mov    %r14,%rsi
call   1030 <update_keys@plt>
movzbl (%rbx),%eax
add    $0x1,%rbx
test   %al,%al
jne    1140 <init_keys+0x30>
pop    %rbx
pop    %r14
pop    %r15
ret

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

LLVM IR (-O2):
define void @init_keys(i8* nocapture %0, i32* %1, i32* %2) {
store i32 305419896, i32* %1
%4 = getelementptr inbounds i32, i32* %1, i64 1
store i32 591751049, i32* %4
%5 = getelementptr inbounds i32, i32* %1, i64 2
store i32 878082192, i32* %5
%6 = load i8, i8* %0
%7 = icmp eq i8 %6, 0
br i1 %7, label %16, label %8
8: ; preds = %3, %8
%9 = phi i8 [ %14, %8 ], [ %6, %3 ]
%10 = phi i8* [ %13, %8 ], [ %0, %3 ]
%11 = sext i8 %9 to i32
%12 = tail call i32 @update_keys(i32* %1, i32* %2, i32 %11)
%13 = getelementptr inbounds i8, i8* %10, i64 1
%14 = load i8, i8* %13
%15 = icmp eq i8 %14, 0
br i1 %15, label %16, label %8
16: ; preds = %8, %3
ret void
}