#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 uint8_t;
typedef int /*<<< orphan*/ uint16_t;

/* Variables and functions */
int /*<<< orphan*/ skipjack_a(int /*<<< orphan*/ *, int, void *);
int /*<<< orphan*/ skipjack_b(int /*<<< orphan*/ *, int, void *);
void skipjack_enc(void *block, void *key) {
  uint8_t k;
  for (k = 0; k < 32; ++k) {
    if (k & 0x08) {
      skipjack_b((uint16_t *)block, k, key);
    } else {
      skipjack_a((uint16_t *)block, k, key);
    }
  }
}


x86 assembly (clang, -O0):
<skipjack_enc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x20,-0x14(%rbp)
jge    1188 <skipjack_enc+0x68>
mov    -0x14(%rbp),%eax
and    $0x8,%eax
cmp    $0x0,%eax
je     1165 <skipjack_enc+0x45>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1030 <skipjack_b@plt>
jmp    1175 <skipjack_enc+0x55>
mov    -0x8(%rbp),%rdi
mov    -0x14(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   1040 <skipjack_a@plt>
jmp    117a <skipjack_enc+0x5a>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <skipjack_enc+0x17>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<skipjack_enc>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
xor    %ebp,%ebp
jmp    113d <skipjack_enc+0x1d>
xchg   %ax,%ax
call   1040 <skipjack_a@plt>
add    $0x1,%ebp
cmp    $0x20,%ebp
je     1152 <skipjack_enc+0x32>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    %r14,%rdx
test   $0x8,%bpl
je     1130 <skipjack_enc+0x10>
call   1030 <skipjack_b@plt>
jmp    1135 <skipjack_enc+0x15>
pop    %rbx
pop    %r14
pop    %rbp
ret

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

LLVM IR (-O2):
define void @skipjack_enc(i8* %0, i8* %1) {
%3 = bitcast i8* %0 to i32*
br label %4
4: ; preds = %2, %12
%5 = phi i32 [ 0, %2 ], [ %13, %12 ]
%6 = and i32 %5, 8
%7 = icmp eq i32 %6, 0
br i1 %7, label %10, label %8
8: ; preds = %4
%9 = tail call i32 @skipjack_b(i32* %3, i32 %5, i8* %1)
br label %12
10: ; preds = %4
%11 = tail call i32 @skipjack_a(i32* %3, i32 %5, i8* %1)
br label %12
12: ; preds = %8, %10
%13 = add nuw nsw i32 %5, 1
%14 = icmp eq i32 %13, 32
br i1 %14, label %15, label %4
15: ; preds = %12
ret void
}