#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 /*<<< orphan*/ uint64_t;

/* Variables and functions */
int /*<<< orphan*/ Round(int /*<<< orphan*/ **, int /*<<< orphan*/ **, size_t);
void KeccakF1600(uint64_t A[5][5]) {
  uint64_t T[5][5];
  size_t i;
  for (i = 0; i < 24; i += 2) {
    Round(T, A, i);
    Round(A, T, i + 1);
  }
}


x86 assembly (clang, -O0):
push   %rbp
mov    %rsp,%rbp
sub    $0x80,%rsp
mov    %rdi,-0x8(%rbp)
movq   $0x0,-0x78(%rbp)
cmpq   $0x18,-0x78(%rbp)
jae    1169 <KeccakF1600+0x59>
lea    -0x70(%rbp),%rdi
mov    -0x8(%rbp),%rsi
mov    -0x78(%rbp),%rdx
call   1030 <Round@plt>
mov    -0x8(%rbp),%rdi
lea    -0x70(%rbp),%rsi
mov    -0x78(%rbp),%rdx
add    $0x1,%rdx
call   1030 <Round@plt>
mov    -0x78(%rbp),%rax
add    $0x2,%rax
mov    %rax,-0x78(%rbp)
jmp    1127 <KeccakF1600+0x17>
add    $0x80,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
push   %r14
push   %rbx
sub    $0x68,%rsp
mov    %rdi,%rbx
mov    %rsp,%r14
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %edx,%edx
call   1030 <Round@plt>
mov    $0x1,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0x2,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0x3,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0x4,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0x5,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0x6,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0x7,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0x8,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0x9,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0xa,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0xb,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0xc,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0xd,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0xe,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0xf,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0x10,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0x11,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0x12,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0x13,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0x14,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0x15,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
mov    $0x16,%edx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1030 <Round@plt>
mov    $0x17,%edx
mov    %rbx,%rdi
mov    %r14,%rsi
call   1030 <Round@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @KeccakF1600([5 x i32]* %0) {
%2 = alloca [5 x i32]*
%3 = alloca [5 x [5 x i32]]
%4 = alloca i64
store [5 x i32]* %0, [5 x i32]** %2
store i64 0, i64* %4
br label %5
5: ; preds = %22, %1
%6 = load i64, i64* %4
%7 = icmp ult i64 %6, 24
br i1 %7, label %8, label %25
8: ; preds = %5
%9 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %3, i64 0, i64 0
%10 = bitcast [5 x i32]* %9 to i32**
%11 = load [5 x i32]*, [5 x i32]** %2
%12 = bitcast [5 x i32]* %11 to i32**
%13 = load i64, i64* %4
%14 = call i32 @Round(i32** %10, i32** %12, i64 %13)
%15 = load [5 x i32]*, [5 x i32]** %2
%16 = bitcast [5 x i32]* %15 to i32**
%17 = getelementptr inbounds [5 x [5 x i32]], [5 x [5 x i32]]* %3, i64 0, i64 0
%18 = bitcast [5 x i32]* %17 to i32**
%19 = load i64, i64* %4
%20 = add i64 %19, 1
%21 = call i32 @Round(i32** %16, i32** %18, i64 %20)
br label %22
22: ; preds = %8
%23 = load i64, i64* %4
%24 = add i64 %23, 2
store i64 %24, i64* %4
br label %5
25: ; preds = %5
ret void
}

LLVM IR (-O2):
define void @KeccakF1600([5 x i32]* %0) {
%2 = alloca [5 x [5 x i32]]
%3 = bitcast [5 x [5 x i32]]* %2 to i8*
%4 = bitcast [5 x [5 x i32]]* %2 to i32**
%5 = bitcast [5 x i32]* %0 to i32**
%6 = call i32 @Round(i32** %4, i32** %5, i64 0)
%7 = call i32 @Round(i32** %5, i32** %4, i64 1)
%8 = call i32 @Round(i32** %4, i32** %5, i64 2)
%9 = call i32 @Round(i32** %5, i32** %4, i64 3)
%10 = call i32 @Round(i32** %4, i32** %5, i64 4)
%11 = call i32 @Round(i32** %5, i32** %4, i64 5)
%12 = call i32 @Round(i32** %4, i32** %5, i64 6)
%13 = call i32 @Round(i32** %5, i32** %4, i64 7)
%14 = call i32 @Round(i32** %4, i32** %5, i64 8)
%15 = call i32 @Round(i32** %5, i32** %4, i64 9)
%16 = call i32 @Round(i32** %4, i32** %5, i64 10)
%17 = call i32 @Round(i32** %5, i32** %4, i64 11)
%18 = call i32 @Round(i32** %4, i32** %5, i64 12)
%19 = call i32 @Round(i32** %5, i32** %4, i64 13)
%20 = call i32 @Round(i32** %4, i32** %5, i64 14)
%21 = call i32 @Round(i32** %5, i32** %4, i64 15)
%22 = call i32 @Round(i32** %4, i32** %5, i64 16)
%23 = call i32 @Round(i32** %5, i32** %4, i64 17)
%24 = call i32 @Round(i32** %4, i32** %5, i64 18)
%25 = call i32 @Round(i32** %5, i32** %4, i64 19)
%26 = call i32 @Round(i32** %4, i32** %5, i64 20)
%27 = call i32 @Round(i32** %5, i32** %4, i64 21)
%28 = call i32 @Round(i32** %4, i32** %5, i64 22)
%29 = call i32 @Round(i32** %5, i32** %4, i64 23)
ret void
}