#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 scalar_t__ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ threefish_subkey(int, int, scalar_t__ *, scalar_t__ *,
                                    scalar_t__ *);
int /*<<< orphan*/ threefish_unmix(int, int, int const **, scalar_t__ *,
                                   scalar_t__ *);
void threefish_decrypt_internal(int rounds, int words, const int **rot,
                                const int *permutations, uint64_t *key,
                                uint64_t *tweak, uint64_t *ciphertext) {
  uint64_t subkey[words];
  uint64_t cipheralt[words];
  threefish_subkey(rounds / 4, words, key, tweak, subkey);
  for (int nw = 0; nw < words; nw++)
    ciphertext[nw] -= subkey[nw];
  for (int nr = rounds - 1; nr >= 0; nr--) {
    for (int nw = 0; nw < words; nw++)
      cipheralt[permutations[nw]] = ciphertext[nw];
    for (int nw = 0; nw < words; nw += 2)
      threefish_unmix(nr, nw / 2, rot, &cipheralt[nw], &ciphertext[nw]);
    if (nr % 4 == 0) {
      threefish_subkey(nr / 4, words, key, tweak, subkey);
      for (int nw = 0; nw < words; nw++)
        ciphertext[nw] -= subkey[nw];
    }
  }
}


x86 assembly (clang, -O0):
<threefish_decrypt_internal>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
mov    0x10(%rbp),%rax
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %rdx,-0x10(%rbp)
mov    %rcx,-0x18(%rbp)
mov    %r8,-0x20(%rbp)
mov    %r9,-0x28(%rbp)
mov    -0x8(%rbp),%eax
mov    %rsp,%rcx
mov    %rcx,-0x30(%rbp)
lea    0xf(,%rax,8),%rcx
and    $0xfffffffffffffff0,%rcx
mov    %rsp,%r8
sub    %rcx,%r8
mov    %r8,-0x68(%rbp)
mov    %r8,%rsp
mov    %rax,-0x38(%rbp)
mov    -0x8(%rbp),%eax
lea    0xf(,%rax,8),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x60(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x40(%rbp)
mov    -0x4(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x8(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1040 <threefish_subkey@plt>
movl   $0x0,-0x44(%rbp)
mov    -0x44(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e6 <threefish_decrypt_internal+0xc6>
mov    -0x68(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    0x10(%rbp),%rax
movslq -0x44(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
sub    %rsi,%rdx
mov    %rdx,(%rax,%rcx,8)
mov    -0x44(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x44(%rbp)
jmp    11ad <threefish_decrypt_internal+0x8d>
mov    -0x4(%rbp),%eax
sub    $0x1,%eax
mov    %eax,-0x48(%rbp)
cmpl   $0x0,-0x48(%rbp)
jl     131f <threefish_decrypt_internal+0x1ff>
movl   $0x0,-0x4c(%rbp)
mov    -0x4c(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    123a <threefish_decrypt_internal+0x11a>
mov    -0x60(%rbp),%rax
mov    0x10(%rbp),%rcx
movslq -0x4c(%rbp),%rdx
mov    (%rcx,%rdx,8),%rdx
mov    -0x18(%rbp),%rcx
movslq -0x4c(%rbp),%rsi
movslq (%rcx,%rsi,4),%rcx
mov    %rdx,(%rax,%rcx,8)
mov    -0x4c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x4c(%rbp)
jmp    1200 <threefish_decrypt_internal+0xe0>
movl   $0x0,-0x50(%rbp)
mov    -0x50(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1292 <threefish_decrypt_internal+0x172>
mov    -0x60(%rbp),%rcx
mov    -0x48(%rbp),%edi
mov    -0x50(%rbp),%eax
mov    $0x2,%esi
cltd
idiv   %esi
mov    %eax,%esi
mov    -0x10(%rbp),%rdx
movslq -0x50(%rbp),%rax
shl    $0x3,%rax
add    %rax,%rcx
mov    0x10(%rbp),%r8
movslq -0x50(%rbp),%rax
shl    $0x3,%rax
add    %rax,%r8
call   1030 <threefish_unmix@plt>
mov    -0x50(%rbp),%eax
add    $0x2,%eax
mov    %eax,-0x50(%rbp)
jmp    1241 <threefish_decrypt_internal+0x121>
mov    -0x48(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
cmp    $0x0,%edx
jne    130c <threefish_decrypt_internal+0x1ec>
mov    -0x68(%rbp),%r8
mov    -0x48(%rbp),%eax
mov    $0x4,%ecx
cltd
idiv   %ecx
mov    %eax,%edi
mov    -0x8(%rbp),%esi
mov    -0x20(%rbp),%rdx
mov    -0x28(%rbp),%rcx
call   1040 <threefish_subkey@plt>
movl   $0x0,-0x54(%rbp)
mov    -0x54(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    1307 <threefish_decrypt_internal+0x1e7>
mov    -0x68(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rsi
mov    0x10(%rbp),%rax
movslq -0x54(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
sub    %rsi,%rdx
mov    %rdx,(%rax,%rcx,8)
mov    -0x54(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x54(%rbp)
jmp    12ce <threefish_decrypt_internal+0x1ae>
jmp    130c <threefish_decrypt_internal+0x1ec>
jmp    1311 <threefish_decrypt_internal+0x1f1>
mov    -0x48(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x48(%rbp)
jmp    11ef <threefish_decrypt_internal+0xcf>
mov    -0x30(%rbp),%rax
mov    %rax,%rsp
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<threefish_decrypt_internal>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %rcx,-0x58(%rbp)
mov    %rdx,%r15
mov    %esi,%r14d
mov    %edi,%ecx
mov    0x10(%rbp),%rbx
mov    %esi,%r12d
mov    %rsp,%r13
lea    0xf(,%r12,8),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    %rsp,%rdx
sub    %rax,%rdx
mov    %rdx,-0x40(%rbp)
mov    %rdx,%rsp
lea    0x3(%rcx),%edi
test   %ecx,%ecx
mov    %rcx,-0x48(%rbp)
cmovns %ecx,%edi
sar    $0x2,%edi
mov    %r8,-0x80(%rbp)
mov    %r8,%rdx
mov    %r9,-0x88(%rbp)
mov    %r9,%rcx
mov    %r13,%r8
call   1040 <threefish_subkey@plt>
mov    %r13,%r8
mov    %r14d,%esi
test   %r14d,%r14d
jle    1261 <threefish_decrypt_internal+0x141>
cmp    $0x4,%esi
jae    11a9 <threefish_decrypt_internal+0x89>
xor    %eax,%eax
jmp    1250 <threefish_decrypt_internal+0x130>
mov    %r12d,%eax
and    $0xfffffffc,%eax
lea    -0x4(%rax),%rcx
mov    %rcx,%rdx
shr    $0x2,%rdx
add    $0x1,%rdx
test   %rcx,%rcx
je     1513 <threefish_decrypt_internal+0x3f3>
mov    %rdx,%rdi
and    $0xfffffffffffffffe,%rdi
xor    %ecx,%ecx
movdqu (%rbx,%rcx,8),%xmm0
movdqu 0x10(%rbx,%rcx,8),%xmm1
movdqu 0x20(%rbx,%rcx,8),%xmm2
movdqu 0x30(%rbx,%rcx,8),%xmm3
psubq  (%r8,%rcx,8),%xmm0
psubq  0x10(%r8,%rcx,8),%xmm1
movdqu %xmm0,(%rbx,%rcx,8)
movdqu %xmm1,0x10(%rbx,%rcx,8)
psubq  0x20(%r8,%rcx,8),%xmm2
psubq  0x30(%r8,%rcx,8),%xmm3
movdqu %xmm2,0x20(%rbx,%rcx,8)
movdqu %xmm3,0x30(%rbx,%rcx,8)
add    $0x8,%rcx
add    $0xfffffffffffffffe,%rdi
jne    11d0 <threefish_decrypt_internal+0xb0>
test   $0x1,%dl
je     124b <threefish_decrypt_internal+0x12b>
movdqu (%rbx,%rcx,8),%xmm0
movdqu 0x10(%rbx,%rcx,8),%xmm1
psubq  (%r8,%rcx,8),%xmm0
psubq  0x10(%r8,%rcx,8),%xmm1
movdqu %xmm0,(%rbx,%rcx,8)
movdqu %xmm1,0x10(%rbx,%rcx,8)
cmp    %r12,%rax
je     1261 <threefish_decrypt_internal+0x141>
mov    (%r8,%rax,8),%rcx
sub    %rcx,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    1250 <threefish_decrypt_internal+0x130>
mov    -0x48(%rbp),%r9
test   %r9d,%r9d
jle    1504 <threefish_decrypt_internal+0x3e4>
lea    -0x1(%r12),%rax
mov    %rax,-0x90(%rbp)
mov    %r12d,%eax
and    $0xfffffffc,%eax
mov    %rax,-0x38(%rbp)
add    $0xfffffffffffffffc,%rax
mov    %rax,-0x78(%rbp)
mov    %rax,%rcx
shr    $0x2,%rcx
add    $0x1,%rcx
mov    %r12d,%eax
and    $0x3,%eax
mov    %rax,-0x50(%rbp)
mov    %rcx,%rax
mov    %rcx,-0x70(%rbp)
and    $0xfffffffffffffffe,%rcx
mov    %rcx,-0x68(%rbp)
mov    %esi,-0x2c(%rbp)
mov    %r12,-0x98(%rbp)
mov    %r8,-0x60(%rbp)
jmp    12cd <threefish_decrypt_internal+0x1ad>
cmpl   $0x1,-0xa0(%rbp)
jle    1504 <threefish_decrypt_internal+0x3e4>
mov    %r9,%rax
mov    %r9,-0xa0(%rbp)
add    $0xffffffff,%r9d
test   %esi,%esi
jle    13de <threefish_decrypt_internal+0x2be>
cmpq   $0x3,-0x90(%rbp)
03
jae    1310 <threefish_decrypt_internal+0x1f0>
xor    %eax,%eax
mov    -0x58(%rbp),%rdi
mov    0x10(%rbp),%rbx
mov    -0x40(%rbp),%rcx
mov    -0x50(%rbp),%r11
jmp    136f <threefish_decrypt_internal+0x24f>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    %eax,%eax
mov    -0x58(%rbp),%rdi
mov    0x10(%rbp),%rbx
mov    -0x40(%rbp),%rcx
mov    -0x38(%rbp),%r10
mov    -0x50(%rbp),%r11
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx,%rax,8),%r8
movslq (%rdi,%rax,4),%rdx
mov    %r8,(%rcx,%rdx,8)
mov    0x8(%rbx,%rax,8),%r8
movslq 0x4(%rdi,%rax,4),%rdx
mov    %r8,(%rcx,%rdx,8)
mov    0x10(%rbx,%rax,8),%r8
movslq 0x8(%rdi,%rax,4),%rdx
mov    %r8,(%rcx,%rdx,8)
mov    0x18(%rbx,%rax,8),%r8
movslq 0xc(%rdi,%rax,4),%rdx
mov    %r8,(%rcx,%rdx,8)
add    $0x4,%rax
cmp    %rax,%r10
jne    1330 <threefish_decrypt_internal+0x210>
test   %r11,%r11
je     1395 <threefish_decrypt_internal+0x275>
lea    (%rdi,%rax,4),%r8
lea    (%rbx,%rax,8),%rax
xor    %edx,%edx
xchg   %ax,%ax
mov    (%rax,%rdx,8),%rbx
movslq (%r8,%rdx,4),%rdi
mov    %rbx,(%rcx,%rdi,8)
add    $0x1,%rdx
cmp    %rdx,%r11
jne    1380 <threefish_decrypt_internal+0x260>
test   %esi,%esi
jle    13de <threefish_decrypt_internal+0x2be>
xor    %ebx,%ebx
mov    -0x40(%rbp),%r12
mov    0x10(%rbp),%r13
xor    %r14d,%r14d
mov    %r9,-0x48(%rbp)
nopw   0x0(%rax,%rax,1)
mov    %r9d,%edi
mov    %r14d,%esi
mov    %r15,%rdx
mov    %r12,%rcx
mov    %r13,%r8
call   1030 <threefish_unmix@plt>
mov    -0x48(%rbp),%r9
mov    -0x2c(%rbp),%esi
add    $0x1,%r14d
add    $0x10,%r13
add    $0x10,%r12
add    $0x2,%ebx
cmp    %esi,%ebx
jl     13b0 <threefish_decrypt_internal+0x290>
test   $0x3,%r9b
mov    0x10(%rbp),%rbx
mov    -0x98(%rbp),%r12
mov    -0x60(%rbp),%r8
jne    12c0 <threefish_decrypt_internal+0x1a0>
lea    0x3(%r9),%edi
test   %r9d,%r9d
cmovns %r9d,%edi
sar    $0x2,%edi
mov    -0x80(%rbp),%rdx
mov    -0x88(%rbp),%rcx
mov    %r9,%r14
call   1040 <threefish_subkey@plt>
mov    -0x60(%rbp),%r8
mov    %r14,%r9
mov    -0x2c(%rbp),%esi
test   %esi,%esi
jle    12c0 <threefish_decrypt_internal+0x1a0>
cmp    $0x4,%esi
jae    1436 <threefish_decrypt_internal+0x316>
xor    %eax,%eax
jmp    14e0 <threefish_decrypt_internal+0x3c0>
cmpq   $0x0,-0x78(%rbp)
je     14f6 <threefish_decrypt_internal+0x3d6>
mov    -0x68(%rbp),%rcx
xor    %eax,%eax
mov    -0x38(%rbp),%rdx
nopl   0x0(%rax,%rax,1)
movdqu (%rbx,%rax,8),%xmm0
movdqu 0x10(%rbx,%rax,8),%xmm1
movdqu 0x20(%rbx,%rax,8),%xmm2
movdqu 0x30(%rbx,%rax,8),%xmm3
psubq  (%r8,%rax,8),%xmm0
psubq  0x10(%r8,%rax,8),%xmm1
movdqu %xmm0,(%rbx,%rax,8)
movdqu %xmm1,0x10(%rbx,%rax,8)
psubq  0x20(%r8,%rax,8),%xmm2
psubq  0x30(%r8,%rax,8),%xmm3
movdqu %xmm2,0x20(%rbx,%rax,8)
movdqu %xmm3,0x30(%rbx,%rax,8)
add    $0x8,%rax
add    $0xfffffffffffffffe,%rcx
jne    1450 <threefish_decrypt_internal+0x330>
testb  $0x1,-0x70(%rbp)
je     14cc <threefish_decrypt_internal+0x3ac>
movdqu (%rbx,%rax,8),%xmm0
movdqu 0x10(%rbx,%rax,8),%xmm1
psubq  (%r8,%rax,8),%xmm0
psubq  0x10(%r8,%rax,8),%xmm1
movdqu %xmm0,(%rbx,%rax,8)
movdqu %xmm1,0x10(%rbx,%rax,8)
mov    %rdx,%rax
cmp    %r12,%rdx
je     12c0 <threefish_decrypt_internal+0x1a0>
nopl   0x0(%rax,%rax,1)
mov    (%r8,%rax,8),%rcx
sub    %rcx,(%rbx,%rax,8)
add    $0x1,%rax
cmp    %rax,%r12
jne    14e0 <threefish_decrypt_internal+0x3c0>
jmp    12c0 <threefish_decrypt_internal+0x1a0>
xor    %eax,%eax
mov    -0x38(%rbp),%rdx
testb  $0x1,-0x70(%rbp)
jne    14a9 <threefish_decrypt_internal+0x389>
jmp    14cc <threefish_decrypt_internal+0x3ac>
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ecx,%ecx
test   $0x1,%dl
jne    1228 <threefish_decrypt_internal+0x108>
jmp    124b <threefish_decrypt_internal+0x12b>

LLVM IR (-O0):
define void @threefish_decrypt_internal(i32 %0, i32 %1, i32** %2, i32* %3, i64* %4, i64* %5, i64* %6) {
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32**
%11 = alloca i32*
%12 = alloca i64*
%13 = alloca i64*
%14 = alloca i64*
%15 = alloca i8*
%16 = alloca i64
%17 = alloca i64
%18 = alloca i32
%19 = alloca i32
%20 = alloca i32
%21 = alloca i32
%22 = alloca i32
store i32 %0, i32* %8
store i32 %1, i32* %9
store i32** %2, i32*** %10
store i32* %3, i32** %11
store i64* %4, i64** %12
store i64* %5, i64** %13
store i64* %6, i64** %14
%23 = load i32, i32* %9
%24 = zext i32 %23 to i64
%25 = call i8* @llvm.stacksave()
store i8* %25, i8** %15
%26 = alloca i64, i64 %24
store i64 %24, i64* %16
%27 = load i32, i32* %9
%28 = zext i32 %27 to i64
%29 = alloca i64, i64 %28
store i64 %28, i64* %17
%30 = load i32, i32* %8
%31 = sdiv i32 %30, 4
%32 = load i32, i32* %9
%33 = load i64*, i64** %12
%34 = load i64*, i64** %13
%35 = call i32 @threefish_subkey(i32 %31, i32 %32, i64* %33, i64* %34, i64* %26)
store i32 0, i32* %18
br label %36
36: ; preds = %51, %7
%37 = load i32, i32* %18
%38 = load i32, i32* %9
%39 = icmp slt i32 %37, %38
br i1 %39, label %40, label %54
40: ; preds = %36
%41 = load i32, i32* %18
%42 = sext i32 %41 to i64
%43 = getelementptr inbounds i64, i64* %26, i64 %42
%44 = load i64, i64* %43
%45 = load i64*, i64** %14
%46 = load i32, i32* %18
%47 = sext i32 %46 to i64
%48 = getelementptr inbounds i64, i64* %45, i64 %47
%49 = load i64, i64* %48
%50 = sub nsw i64 %49, %44
store i64 %50, i64* %48
br label %51
51: ; preds = %40
%52 = load i32, i32* %18
%53 = add nsw i32 %52, 1
store i32 %53, i32* %18
br label %36
54: ; preds = %36
%55 = load i32, i32* %8
%56 = sub nsw i32 %55, 1
store i32 %56, i32* %19
br label %57
57: ; preds = %133, %54
%58 = load i32, i32* %19
%59 = icmp sge i32 %58, 0
br i1 %59, label %60, label %136
60: ; preds = %57
store i32 0, i32* %20
br label %61
61: ; preds = %78, %60
%62 = load i32, i32* %20
%63 = load i32, i32* %9
%64 = icmp slt i32 %62, %63
br i1 %64, label %65, label %81
65: ; preds = %61
%66 = load i64*, i64** %14
%67 = load i32, i32* %20
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds i64, i64* %66, i64 %68
%70 = load i64, i64* %69
%71 = load i32*, i32** %11
%72 = load i32, i32* %20
%73 = sext i32 %72 to i64
%74 = getelementptr inbounds i32, i32* %71, i64 %73
%75 = load i32, i32* %74
%76 = sext i32 %75 to i64
%77 = getelementptr inbounds i64, i64* %29, i64 %76
store i64 %70, i64* %77
br label %78
78: ; preds = %65
%79 = load i32, i32* %20
%80 = add nsw i32 %79, 1
store i32 %80, i32* %20
br label %61
81: ; preds = %61
store i32 0, i32* %21
br label %82
82: ; preds = %99, %81
%83 = load i32, i32* %21
%84 = load i32, i32* %9
%85 = icmp slt i32 %83, %84
br i1 %85, label %86, label %102
86: ; preds = %82
%87 = load i32, i32* %19
%88 = load i32, i32* %21
%89 = sdiv i32 %88, 2
%90 = load i32**, i32*** %10
%91 = load i32, i32* %21
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds i64, i64* %29, i64 %92
%94 = load i64*, i64** %14
%95 = load i32, i32* %21
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds i64, i64* %94, i64 %96
%98 = call i32 @threefish_unmix(i32 %87, i32 %89, i32** %90, i64* %93, i64* %97)
br label %99
99: ; preds = %86
%100 = load i32, i32* %21
%101 = add nsw i32 %100, 2
store i32 %101, i32* %21
br label %82
102: ; preds = %82
%103 = load i32, i32* %19
%104 = srem i32 %103, 4
%105 = icmp eq i32 %104, 0
br i1 %105, label %106, label %132
106: ; preds = %102
%107 = load i32, i32* %19
%108 = sdiv i32 %107, 4
%109 = load i32, i32* %9
%110 = load i64*, i64** %12
%111 = load i64*, i64** %13
%112 = call i32 @threefish_subkey(i32 %108, i32 %109, i64* %110, i64* %111, i64* %26)
store i32 0, i32* %22
br label %113
113: ; preds = %128, %106
%114 = load i32, i32* %22
%115 = load i32, i32* %9
%116 = icmp slt i32 %114, %115
br i1 %116, label %117, label %131
117: ; preds = %113
%118 = load i32, i32* %22
%119 = sext i32 %118 to i64
%120 = getelementptr inbounds i64, i64* %26, i64 %119
%121 = load i64, i64* %120
%122 = load i64*, i64** %14
%123 = load i32, i32* %22
%124 = sext i32 %123 to i64
%125 = getelementptr inbounds i64, i64* %122, i64 %124
%126 = load i64, i64* %125
%127 = sub nsw i64 %126, %121
store i64 %127, i64* %125
br label %128
128: ; preds = %117
%129 = load i32, i32* %22
%130 = add nsw i32 %129, 1
store i32 %130, i32* %22
br label %113
131: ; preds = %113
br label %132
132: ; preds = %131, %102
br label %133
133: ; preds = %132
%134 = load i32, i32* %19
%135 = add nsw i32 %134, -1
store i32 %135, i32* %19
br label %57
136: ; preds = %57
%137 = load i8*, i8** %15
ret void
}

LLVM IR (-O2):
define void @threefish_decrypt_internal(i32 %0, i32 %1, i32** %2, i32* nocapture %3, i64* %4, i64* %5, i64* %6) {
%8 = zext i32 %1 to i64
%9 = alloca i64, i64 %8
%10 = alloca i64, i64 %8
%11 = sdiv i32 %0, 4
%12 = call i32 @threefish_subkey(i32 %11, i32 %1, i64* %4, i64* %5, i64* %9)
%13 = icmp sgt i32 %1, 0
br i1 %13, label %14, label %88
14: ; preds = %7
%15 = icmp ult i32 %1, 4
br i1 %15, label %86, label %16
16: ; preds = %14
%17 = and i64 %8, 4294967292
%18 = add nsw i64 %17, -4
%19 = lshr exact i64 %18, 2
%20 = add nuw nsw i64 %19, 1
%21 = and i64 %20, 1
%22 = icmp eq i64 %18, 0
br i1 %22, label %64, label %23
23: ; preds = %16
%24 = and i64 %20, 9223372036854775806
br label %25
25: ; preds = %25, %23
%26 = phi i64 [ 0, %23 ], [ %61, %25 ]
%27 = phi i64 [ 0, %23 ], [ %62, %25 ]
%28 = getelementptr inbounds i64, i64* %9, i64 %26
%29 = bitcast i64* %28 to <2 x i64>*
%30 = load <2 x i64>, <2 x i64>* %29
%31 = getelementptr inbounds i64, i64* %28, i64 2
%32 = bitcast i64* %31 to <2 x i64>*
%33 = load <2 x i64>, <2 x i64>* %32
%34 = getelementptr inbounds i64, i64* %6, i64 %26
%35 = bitcast i64* %34 to <2 x i64>*
%36 = load <2 x i64>, <2 x i64>* %35
%37 = getelementptr inbounds i64, i64* %34, i64 2
%38 = bitcast i64* %37 to <2 x i64>*
%39 = load <2 x i64>, <2 x i64>* %38
%40 = sub nsw <2 x i64> %36, %30
%41 = sub nsw <2 x i64> %39, %33
%42 = bitcast i64* %34 to <2 x i64>*
store <2 x i64> %40, <2 x i64>* %42
%43 = bitcast i64* %37 to <2 x i64>*
store <2 x i64> %41, <2 x i64>* %43
%44 = or i64 %26, 4
%45 = getelementptr inbounds i64, i64* %9, i64 %44
%46 = bitcast i64* %45 to <2 x i64>*
%47 = load <2 x i64>, <2 x i64>* %46
%48 = getelementptr inbounds i64, i64* %45, i64 2
%49 = bitcast i64* %48 to <2 x i64>*
%50 = load <2 x i64>, <2 x i64>* %49
%51 = getelementptr inbounds i64, i64* %6, i64 %44
%52 = bitcast i64* %51 to <2 x i64>*
%53 = load <2 x i64>, <2 x i64>* %52
%54 = getelementptr inbounds i64, i64* %51, i64 2
%55 = bitcast i64* %54 to <2 x i64>*
%56 = load <2 x i64>, <2 x i64>* %55
%57 = sub nsw <2 x i64> %53, %47
%58 = sub nsw <2 x i64> %56, %50
%59 = bitcast i64* %51 to <2 x i64>*
store <2 x i64> %57, <2 x i64>* %59
%60 = bitcast i64* %54 to <2 x i64>*
store <2 x i64> %58, <2 x i64>* %60
%61 = add nuw i64 %26, 8
%62 = add i64 %27, 2
%63 = icmp eq i64 %62, %24
br i1 %63, label %64, label %25
64: ; preds = %25, %16
%65 = phi i64 [ 0, %16 ], [ %61, %25 ]
%66 = icmp eq i64 %21, 0
br i1 %66, label %84, label %67
67: ; preds = %64
%68 = getelementptr inbounds i64, i64* %9, i64 %65
%69 = bitcast i64* %68 to <2 x i64>*
%70 = load <2 x i64>, <2 x i64>* %69
%71 = getelementptr inbounds i64, i64* %68, i64 2
%72 = bitcast i64* %71 to <2 x i64>*
%73 = load <2 x i64>, <2 x i64>* %72
%74 = getelementptr inbounds i64, i64* %6, i64 %65
%75 = bitcast i64* %74 to <2 x i64>*
%76 = load <2 x i64>, <2 x i64>* %75
%77 = getelementptr inbounds i64, i64* %74, i64 2
%78 = bitcast i64* %77 to <2 x i64>*
%79 = load <2 x i64>, <2 x i64>* %78
%80 = sub nsw <2 x i64> %76, %70
%81 = sub nsw <2 x i64> %79, %73
%82 = bitcast i64* %74 to <2 x i64>*
store <2 x i64> %80, <2 x i64>* %82
%83 = bitcast i64* %77 to <2 x i64>*
store <2 x i64> %81, <2 x i64>* %83
br label %84
84: ; preds = %64, %67
%85 = icmp eq i64 %17, %8
br i1 %85, label %88, label %86
86: ; preds = %14, %84
%87 = phi i64 [ 0, %14 ], [ %17, %84 ]
br label %107
88: ; preds = %107, %84, %7
%89 = icmp sgt i32 %0, 0
br i1 %89, label %90, label %120
90: ; preds = %88
%91 = add nsw i64 %8, -1
%92 = and i64 %8, 4294967292
%93 = add nsw i64 %92, -4
%94 = lshr exact i64 %93, 2
%95 = add nuw nsw i64 %94, 1
%96 = and i64 %8, 3
%97 = icmp ult i64 %91, 3
%98 = and i64 %8, 4294967292
%99 = icmp eq i64 %96, 0
%100 = icmp ult i32 %1, 4
%101 = and i64 %8, 4294967292
%102 = and i64 %95, 1
%103 = icmp eq i64 %93, 0
%104 = and i64 %95, 9223372036854775806
%105 = icmp eq i64 %102, 0
%106 = icmp eq i64 %101, %8
br label %116
107: ; preds = %86, %107
%108 = phi i64 [ %114, %107 ], [ %87, %86 ]
%109 = getelementptr inbounds i64, i64* %9, i64 %108
%110 = load i64, i64* %109
%111 = getelementptr inbounds i64, i64* %6, i64 %108
%112 = load i64, i64* %111
%113 = sub nsw i64 %112, %110
store i64 %113, i64* %111
%114 = add nuw nsw i64 %108, 1
%115 = icmp eq i64 %114, %8
br i1 %115, label %88, label %107
116: ; preds = %90, %257
%117 = phi i32 [ %118, %257 ], [ %0, %90 ]
%118 = add nsw i32 %117, -1
br i1 %13, label %119, label %169
119: ; preds = %116
br i1 %97, label %121, label %136
120: ; preds = %257, %88
ret void
121: ; preds = %136, %119
%122 = phi i64 [ 0, %119 ], [ %166, %136 ]
br i1 %99, label %135, label %123
123: ; preds = %121, %123
%124 = phi i64 [ %132, %123 ], [ %122, %121 ]
%125 = phi i64 [ %133, %123 ], [ 0, %121 ]
%126 = getelementptr inbounds i64, i64* %6, i64 %124
%127 = load i64, i64* %126
%128 = getelementptr inbounds i32, i32* %3, i64 %124
%129 = load i32, i32* %128
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i64, i64* %10, i64 %130
store i64 %127, i64* %131
%132 = add nuw nsw i64 %124, 1
%133 = add i64 %125, 1
%134 = icmp eq i64 %133, %96
br i1 %134, label %135, label %123
135: ; preds = %123, %121
br i1 %13, label %172, label %169
136: ; preds = %119, %136
%137 = phi i64 [ %166, %136 ], [ 0, %119 ]
%138 = phi i64 [ %167, %136 ], [ 0, %119 ]
%139 = getelementptr inbounds i64, i64* %6, i64 %137
%140 = load i64, i64* %139
%141 = getelementptr inbounds i32, i32* %3, i64 %137
%142 = load i32, i32* %141
%143 = sext i32 %142 to i64
%144 = getelementptr inbounds i64, i64* %10, i64 %143
store i64 %140, i64* %144
%145 = or i64 %137, 1
%146 = getelementptr inbounds i64, i64* %6, i64 %145
%147 = load i64, i64* %146
%148 = getelementptr inbounds i32, i32* %3, i64 %145
%149 = load i32, i32* %148
%150 = sext i32 %149 to i64
%151 = getelementptr inbounds i64, i64* %10, i64 %150
store i64 %147, i64* %151
%152 = or i64 %137, 2
%153 = getelementptr inbounds i64, i64* %6, i64 %152
%154 = load i64, i64* %153
%155 = getelementptr inbounds i32, i32* %3, i64 %152
%156 = load i32, i32* %155
%157 = sext i32 %156 to i64
%158 = getelementptr inbounds i64, i64* %10, i64 %157
store i64 %154, i64* %158
%159 = or i64 %137, 3
%160 = getelementptr inbounds i64, i64* %6, i64 %159
%161 = load i64, i64* %160
%162 = getelementptr inbounds i32, i32* %3, i64 %159
%163 = load i32, i32* %162
%164 = sext i32 %163 to i64
%165 = getelementptr inbounds i64, i64* %10, i64 %164
store i64 %161, i64* %165
%166 = add nuw nsw i64 %137, 4
%167 = add i64 %138, 4
%168 = icmp eq i64 %167, %98
br i1 %168, label %121, label %136
169: ; preds = %172, %116, %135
%170 = and i32 %118, 3
%171 = icmp eq i32 %170, 0
br i1 %171, label %182, label %257
172: ; preds = %135, %172
%173 = phi i64 [ %179, %172 ], [ 0, %135 ]
%174 = lshr exact i64 %173, 1
%175 = getelementptr inbounds i64, i64* %10, i64 %173
%176 = getelementptr inbounds i64, i64* %6, i64 %173
%177 = trunc i64 %174 to i32
%178 = call i32 @threefish_unmix(i32 %118, i32 %177, i32** %2, i64* %175, i64* %176)
%179 = add nuw i64 %173, 2
%180 = trunc i64 %179 to i32
%181 = icmp slt i32 %180, %1
br i1 %181, label %172, label %169
182: ; preds = %169
%183 = sdiv i32 %118, 4
%184 = call i32 @threefish_subkey(i32 %183, i32 %1, i64* %4, i64* %5, i64* %9)
br i1 %13, label %185, label %257
185: ; preds = %182
br i1 %100, label %246, label %186
186: ; preds = %185
br i1 %103, label %226, label %187
187: ; preds = %186, %187
%188 = phi i64 [ %223, %187 ], [ 0, %186 ]
%189 = phi i64 [ %224, %187 ], [ 0, %186 ]
%190 = getelementptr inbounds i64, i64* %9, i64 %188
%191 = bitcast i64* %190 to <2 x i64>*
%192 = load <2 x i64>, <2 x i64>* %191
%193 = getelementptr inbounds i64, i64* %190, i64 2
%194 = bitcast i64* %193 to <2 x i64>*
%195 = load <2 x i64>, <2 x i64>* %194
%196 = getelementptr inbounds i64, i64* %6, i64 %188
%197 = bitcast i64* %196 to <2 x i64>*
%198 = load <2 x i64>, <2 x i64>* %197
%199 = getelementptr inbounds i64, i64* %196, i64 2
%200 = bitcast i64* %199 to <2 x i64>*
%201 = load <2 x i64>, <2 x i64>* %200
%202 = sub nsw <2 x i64> %198, %192
%203 = sub nsw <2 x i64> %201, %195
%204 = bitcast i64* %196 to <2 x i64>*
store <2 x i64> %202, <2 x i64>* %204
%205 = bitcast i64* %199 to <2 x i64>*
store <2 x i64> %203, <2 x i64>* %205
%206 = or i64 %188, 4
%207 = getelementptr inbounds i64, i64* %9, i64 %206
%208 = bitcast i64* %207 to <2 x i64>*
%209 = load <2 x i64>, <2 x i64>* %208
%210 = getelementptr inbounds i64, i64* %207, i64 2
%211 = bitcast i64* %210 to <2 x i64>*
%212 = load <2 x i64>, <2 x i64>* %211
%213 = getelementptr inbounds i64, i64* %6, i64 %206
%214 = bitcast i64* %213 to <2 x i64>*
%215 = load <2 x i64>, <2 x i64>* %214
%216 = getelementptr inbounds i64, i64* %213, i64 2
%217 = bitcast i64* %216 to <2 x i64>*
%218 = load <2 x i64>, <2 x i64>* %217
%219 = sub nsw <2 x i64> %215, %209
%220 = sub nsw <2 x i64> %218, %212
%221 = bitcast i64* %213 to <2 x i64>*
store <2 x i64> %219, <2 x i64>* %221
%222 = bitcast i64* %216 to <2 x i64>*
store <2 x i64> %220, <2 x i64>* %222
%223 = add nuw i64 %188, 8
%224 = add i64 %189, 2
%225 = icmp eq i64 %224, %104
br i1 %225, label %226, label %187
226: ; preds = %187, %186
%227 = phi i64 [ 0, %186 ], [ %223, %187 ]
br i1 %105, label %245, label %228
228: ; preds = %226
%229 = getelementptr inbounds i64, i64* %9, i64 %227
%230 = bitcast i64* %229 to <2 x i64>*
%231 = load <2 x i64>, <2 x i64>* %230
%232 = getelementptr inbounds i64, i64* %229, i64 2
%233 = bitcast i64* %232 to <2 x i64>*
%234 = load <2 x i64>, <2 x i64>* %233
%235 = getelementptr inbounds i64, i64* %6, i64 %227
%236 = bitcast i64* %235 to <2 x i64>*
%237 = load <2 x i64>, <2 x i64>* %236
%238 = getelementptr inbounds i64, i64* %235, i64 2
%239 = bitcast i64* %238 to <2 x i64>*
%240 = load <2 x i64>, <2 x i64>* %239
%241 = sub nsw <2 x i64> %237, %231
%242 = sub nsw <2 x i64> %240, %234
%243 = bitcast i64* %235 to <2 x i64>*
store <2 x i64> %241, <2 x i64>* %243
%244 = bitcast i64* %238 to <2 x i64>*
store <2 x i64> %242, <2 x i64>* %244
br label %245
245: ; preds = %226, %228
br i1 %106, label %257, label %246
246: ; preds = %185, %245
%247 = phi i64 [ 0, %185 ], [ %101, %245 ]
br label %248
248: ; preds = %246, %248
%249 = phi i64 [ %255, %248 ], [ %247, %246 ]
%250 = getelementptr inbounds i64, i64* %9, i64 %249
%251 = load i64, i64* %250
%252 = getelementptr inbounds i64, i64* %6, i64 %249
%253 = load i64, i64* %252
%254 = sub nsw i64 %253, %251
store i64 %254, i64* %252
%255 = add nuw nsw i64 %249, 1
%256 = icmp eq i64 %255, %8
br i1 %256, label %257, label %248
257: ; preds = %248, %245, %182, %169
%258 = icmp sgt i32 %117, 1
br i1 %258, label %116, label %120
}