#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*/ uint8_t;
typedef int uint32_t;
typedef size_t int8_t;

/* Variables and functions */
int READ_ROUND_KEY_DOUBLE_WORD(int);
int rol(int, int);
int ror(int, int);
void Decrypt(uint8_t *block, uint8_t *roundKeys) {
  uint32_t *rk = (uint32_t *)roundKeys;
  uint32_t *rightPtr = (uint32_t *)block;
  uint32_t *leftPtr = rightPtr + 1;
  int8_t i;
  for (i = 26 - 1; i >= 0; --i) {
    *rightPtr = ror((*rightPtr ^ *leftPtr), 3);
    *leftPtr =
        rol(((*leftPtr ^ READ_ROUND_KEY_DOUBLE_WORD(rk[i])) - *rightPtr), 8);
  }
}


x86 assembly (clang, -O0):
<Decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
add    $0x4,%rax
mov    %rax,-0x28(%rbp)
movq   $0x19,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jb     11d4 <Decrypt+0xa4>
mov    -0x20(%rbp),%rax
mov    (%rax),%edi
mov    -0x28(%rbp),%rax
xor    (%rax),%edi
mov    $0x3,%esi
call   1040 <ror@plt>
mov    %eax,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x34(%rbp)
mov    -0x18(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1050 <READ_ROUND_KEY_DOUBLE_WORD@plt>
mov    -0x34(%rbp),%edi
xor    %eax,%edi
mov    -0x20(%rbp),%rax
sub    (%rax),%edi
mov    $0x8,%esi
call   1030 <rol@plt>
mov    %eax,%ecx
mov    -0x28(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x30(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
jmp    1164 <Decrypt+0x34>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Decrypt>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x4(%rdi),%eax
add    $0x64,%r14
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
xor    (%rbx),%eax
mov    %eax,%edi
mov    $0x3,%esi
call   1040 <ror@plt>
mov    %eax,(%rbx)
mov    0x4(%rbx),%ebp
mov    (%r14),%edi
call   1050 <READ_ROUND_KEY_DOUBLE_WORD@plt>
xor    %eax,%ebp
sub    (%rbx),%ebp
mov    %ebp,%edi
mov    $0x8,%esi
call   1030 <rol@plt>
mov    %eax,0x4(%rbx)
add    $0xfffffffffffffffc,%r14
jmp    1150 <Decrypt+0x20>

LLVM IR (-O0):
define void @Decrypt(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
%7 = alloca i32*
%8 = alloca i64
store i32* %0, i32** %3
store i32* %1, i32** %4
%9 = load i32*, i32** %4
store i32* %9, i32** %5
%10 = load i32*, i32** %3
store i32* %10, i32** %6
%11 = load i32*, i32** %6
%12 = getelementptr inbounds i32, i32* %11, i64 1
store i32* %12, i32** %7
store i64 25, i64* %8
br label %13
13: ; preds = %37, %2
%14 = load i64, i64* %8
%15 = icmp uge i64 %14, 0
br i1 %15, label %16, label %40
16: ; preds = %13
%17 = load i32*, i32** %6
%18 = load i32, i32* %17
%19 = load i32*, i32** %7
%20 = load i32, i32* %19
%21 = xor i32 %18, %20
%22 = call i32 @ror(i32 %21, i32 3)
%23 = load i32*, i32** %6
store i32 %22, i32* %23
%24 = load i32*, i32** %7
%25 = load i32, i32* %24
%26 = load i32*, i32** %5
%27 = load i64, i64* %8
%28 = getelementptr inbounds i32, i32* %26, i64 %27
%29 = load i32, i32* %28
%30 = call i32 @READ_ROUND_KEY_DOUBLE_WORD(i32 %29)
%31 = xor i32 %25, %30
%32 = load i32*, i32** %6
%33 = load i32, i32* %32
%34 = sub nsw i32 %31, %33
%35 = call i32 @rol(i32 %34, i32 8)
%36 = load i32*, i32** %7
store i32 %35, i32* %36
br label %37
37: ; preds = %16
%38 = load i64, i64* %8
%39 = add i64 %38, -1
store i64 %39, i64* %8
br label %13
40: ; preds = %13
ret void
}

LLVM IR (-O2):
define void @Decrypt(i32* nocapture %0, i32* nocapture %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 1
%4 = load i32, i32* %3
br label %5
5: ; preds = %5, %2
%6 = phi i32 [ %4, %2 ], [ %18, %5 ]
%7 = phi i64 [ 25, %2 ], [ %19, %5 ]
%8 = load i32, i32* %0
%9 = xor i32 %6, %8
%10 = tail call i32 @ror(i32 %9, i32 3)
store i32 %10, i32* %0
%11 = load i32, i32* %3
%12 = getelementptr inbounds i32, i32* %1, i64 %7
%13 = load i32, i32* %12
%14 = tail call i32 @READ_ROUND_KEY_DOUBLE_WORD(i32 %13)
%15 = xor i32 %14, %11
%16 = load i32, i32* %0
%17 = sub nsw i32 %15, %16
%18 = tail call i32 @rol(i32 %17, i32 8)
store i32 %18, i32* %3
%19 = add i64 %7, -1
br label %5
}