#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*/ UINT64_C(int);
uint64_t prince_round_constant(const unsigned int round) {
  uint64_t rc[] = {UINT64_C(0x0000000000000000), UINT64_C(0x13198a2e03707344),
                   UINT64_C(0xa4093822299f31d0), UINT64_C(0x082efa98ec4e6c89),
                   UINT64_C(0x452821e638d01377), UINT64_C(0xbe5466cf34e90c6c),
                   UINT64_C(0x7ef84f78fd955cb1), UINT64_C(0x85840851f1ac43aa),
                   UINT64_C(0xc882d32f25323c54), UINT64_C(0x64a51195e0e3610d),
                   UINT64_C(0xd3b5a399ca0c2399), UINT64_C(0xc0ac29b7c97c50dd)};
  return rc[round];
}


x86 assembly (clang, -O0):
<prince_round_constant>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %edi,-0x4(%rbp)
xor    %edi,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x40(%rbp)
mov    $0x3707344,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x3c(%rbp)
mov    $0x299f31d0,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x38(%rbp)
mov    $0xec4e6c89,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x34(%rbp)
mov    $0x38d01377,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x30(%rbp)
mov    $0x34e90c6c,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x2c(%rbp)
mov    $0xfd955cb1,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x28(%rbp)
mov    $0xf1ac43aa,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x24(%rbp)
mov    $0x25323c54,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x20(%rbp)
mov    $0xe0e3610d,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x1c(%rbp)
mov    $0xca0c2399,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x18(%rbp)
mov    $0xc97c50dd,%edi
call   1030 <UINT64_C@plt>
mov    %eax,-0x14(%rbp)
mov    -0x4(%rbp),%eax
mov    -0x40(%rbp,%rax,4),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<prince_round_constant>:
push   %rbx
sub    $0x30,%rsp
mov    %edi,%ebx
xor    %edi,%edi
call   1030 <UINT64_C@plt>
mov    %eax,(%rsp)
mov    $0x3707344,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x4(%rsp)
mov    $0x299f31d0,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x8(%rsp)
mov    $0xec4e6c89,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0xc(%rsp)
mov    $0x38d01377,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x10(%rsp)
mov    $0x34e90c6c,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x14(%rsp)
mov    $0xfd955cb1,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x18(%rsp)
mov    $0xf1ac43aa,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x1c(%rsp)
mov    $0x25323c54,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x20(%rsp)
mov    $0xe0e3610d,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x24(%rsp)
mov    $0xca0c2399,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x28(%rsp)
mov    $0xc97c50dd,%edi
call   1030 <UINT64_C@plt>
mov    %eax,0x2c(%rsp)
mov    %ebx,%eax
mov    (%rsp,%rax,4),%eax
add    $0x30,%rsp
pop    %rbx
ret

LLVM IR (-O0):
define i32 @prince_round_constant(i32 %0) {
%2 = alloca i32
%3 = alloca [12 x i32]
store i32 %0, i32* %2
%4 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 0
%5 = call i32 @UINT64_C(i32 0)
store i32 %5, i32* %4
%6 = getelementptr inbounds i32, i32* %4, i64 1
%7 = call i32 @UINT64_C(i32 57701188)
store i32 %7, i32* %6
%8 = getelementptr inbounds i32, i32* %6, i64 1
%9 = call i32 @UINT64_C(i32 698298832)
store i32 %9, i32* %8
%10 = getelementptr inbounds i32, i32* %8, i64 1
%11 = call i32 @UINT64_C(i32 -330404727)
store i32 %11, i32* %10
%12 = getelementptr inbounds i32, i32* %10, i64 1
%13 = call i32 @UINT64_C(i32 953160567)
store i32 %13, i32* %12
%14 = getelementptr inbounds i32, i32* %12, i64 1
%15 = call i32 @UINT64_C(i32 887688300)
store i32 %15, i32* %14
%16 = getelementptr inbounds i32, i32* %14, i64 1
%17 = call i32 @UINT64_C(i32 -40543055)
store i32 %17, i32* %16
%18 = getelementptr inbounds i32, i32* %16, i64 1
%19 = call i32 @UINT64_C(i32 -240368726)
store i32 %19, i32* %18
%20 = getelementptr inbounds i32, i32* %18, i64 1
%21 = call i32 @UINT64_C(i32 624049236)
store i32 %21, i32* %20
%22 = getelementptr inbounds i32, i32* %20, i64 1
%23 = call i32 @UINT64_C(i32 -521969395)
store i32 %23, i32* %22
%24 = getelementptr inbounds i32, i32* %22, i64 1
%25 = call i32 @UINT64_C(i32 -905174119)
store i32 %25, i32* %24
%26 = getelementptr inbounds i32, i32* %24, i64 1
%27 = call i32 @UINT64_C(i32 -914599715)
store i32 %27, i32* %26
%28 = load i32, i32* %2
%29 = zext i32 %28 to i64
%30 = getelementptr inbounds [12 x i32], [12 x i32]* %3, i64 0, i64 %29
%31 = load i32, i32* %30
ret i32 %31
}

LLVM IR (-O2):
define i32 @prince_round_constant(i32 %0) {
%2 = alloca [12 x i32]
%3 = bitcast [12 x i32]* %2 to i8*
%4 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 0
%5 = tail call i32 @UINT64_C(i32 0)
store i32 %5, i32* %4
%6 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 1
%7 = tail call i32 @UINT64_C(i32 57701188)
store i32 %7, i32* %6
%8 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 2
%9 = tail call i32 @UINT64_C(i32 698298832)
store i32 %9, i32* %8
%10 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 3
%11 = tail call i32 @UINT64_C(i32 -330404727)
store i32 %11, i32* %10
%12 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 4
%13 = tail call i32 @UINT64_C(i32 953160567)
store i32 %13, i32* %12
%14 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 5
%15 = tail call i32 @UINT64_C(i32 887688300)
store i32 %15, i32* %14
%16 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 6
%17 = tail call i32 @UINT64_C(i32 -40543055)
store i32 %17, i32* %16
%18 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 7
%19 = tail call i32 @UINT64_C(i32 -240368726)
store i32 %19, i32* %18
%20 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 8
%21 = tail call i32 @UINT64_C(i32 624049236)
store i32 %21, i32* %20
%22 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 9
%23 = tail call i32 @UINT64_C(i32 -521969395)
store i32 %23, i32* %22
%24 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 10
%25 = tail call i32 @UINT64_C(i32 -905174119)
store i32 %25, i32* %24
%26 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 11
%27 = tail call i32 @UINT64_C(i32 -914599715)
store i32 %27, i32* %26
%28 = zext i32 %0 to i64
%29 = getelementptr inbounds [12 x i32], [12 x i32]* %2, i64 0, i64 %28
%30 = load i32, i32* %29
ret i32 %30
}