#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 const);
int rot32l1(int);
int rot32l8(int);
void Decrypt(uint8_t *block, uint8_t *roundKeys) {
  uint32_t *block32 = (uint32_t *)block;
  const uint32_t *rk = (uint32_t *)roundKeys;
  uint32_t y = block32[0];
  uint32_t x = block32[1];
  int8_t i;
  uint32_t tmp;
  for (i = 44 - 1; i >= 0; i--) {
    tmp = y;
    y = x ^ (rot32l1(y) & rot32l8(y)) ^ (rot32l1(rot32l1(y))) ^
        READ_ROUND_KEY_DOUBLE_WORD(rk[i]);
    x = tmp;
  }
  block32[0] = y;
  block32[1] = x;
}


x86 assembly (clang, -O0):
<Decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x18(%rbp),%rax
mov    0x4(%rax),%eax
mov    %eax,-0x28(%rbp)
movq   $0x2b,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
jb     11ee <Decrypt+0xbe>
mov    -0x24(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x24(%rbp),%edi
call   1030 <rot32l1@plt>
mov    %eax,-0x44(%rbp)
mov    -0x24(%rbp),%edi
call   1040 <rot32l8@plt>
mov    -0x44(%rbp),%ecx
mov    %eax,%edx
mov    -0x40(%rbp),%eax
and    %edx,%ecx
xor    %ecx,%eax
mov    %eax,-0x3c(%rbp)
mov    -0x24(%rbp),%edi
call   1030 <rot32l1@plt>
mov    %eax,%edi
call   1030 <rot32l1@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x38(%rbp)
mov    -0x20(%rbp),%rax
mov    -0x30(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1050 <READ_ROUND_KEY_DOUBLE_WORD@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%eax
xor    %ecx,%eax
mov    %eax,-0x24(%rbp)
mov    -0x34(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x30(%rbp),%rax
add    $0xffffffffffffffff,%rax
mov    %rax,-0x30(%rbp)
jmp    116b <Decrypt+0x3b>
mov    -0x24(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%ecx
mov    -0x18(%rbp),%rax
mov    %ecx,0x4(%rax)
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Decrypt>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    (%rdi),%r12d
mov    0x4(%rdi),%r13d
add    $0xac,%r14
nopl   0x0(%rax)
mov    %r12d,%edi
call   1030 <rot32l1@plt>
mov    %eax,%r15d
mov    %r12d,%edi
call   1040 <rot32l8@plt>
mov    %eax,%ebx
and    %r15d,%ebx
xor    %r13d,%ebx
mov    %r12d,%edi
call   1030 <rot32l1@plt>
mov    %eax,%edi
call   1030 <rot32l1@plt>
mov    %eax,%ebp
xor    %ebx,%ebp
mov    (%r14),%edi
call   1050 <READ_ROUND_KEY_DOUBLE_WORD@plt>
mov    %r12d,%r13d
xor    %ebp,%eax
add    $0xfffffffffffffffc,%r14
mov    %eax,%r12d
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 i32
%9 = alloca i64
%10 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%11 = load i32*, i32** %3
store i32* %11, i32** %5
%12 = load i32*, i32** %4
store i32* %12, i32** %6
%13 = load i32*, i32** %5
%14 = getelementptr inbounds i32, i32* %13, i64 0
%15 = load i32, i32* %14
store i32 %15, i32* %7
%16 = load i32*, i32** %5
%17 = getelementptr inbounds i32, i32* %16, i64 1
%18 = load i32, i32* %17
store i32 %18, i32* %8
store i64 43, i64* %9
br label %19
19: ; preds = %42, %2
%20 = load i64, i64* %9
%21 = icmp uge i64 %20, 0
br i1 %21, label %22, label %45
22: ; preds = %19
%23 = load i32, i32* %7
store i32 %23, i32* %10
%24 = load i32, i32* %8
%25 = load i32, i32* %7
%26 = call i32 @rot32l1(i32 %25)
%27 = load i32, i32* %7
%28 = call i32 @rot32l8(i32 %27)
%29 = and i32 %26, %28
%30 = xor i32 %24, %29
%31 = load i32, i32* %7
%32 = call i32 @rot32l1(i32 %31)
%33 = call i32 @rot32l1(i32 %32)
%34 = xor i32 %30, %33
%35 = load i32*, i32** %6
%36 = load i64, i64* %9
%37 = getelementptr inbounds i32, i32* %35, i64 %36
%38 = load i32, i32* %37
%39 = call i32 @READ_ROUND_KEY_DOUBLE_WORD(i32 %38)
%40 = xor i32 %34, %39
store i32 %40, i32* %7
%41 = load i32, i32* %10
store i32 %41, i32* %8
br label %42
42: ; preds = %22
%43 = load i64, i64* %9
%44 = add i64 %43, -1
store i64 %44, i64* %9
br label %19
45: ; preds = %19
%46 = load i32, i32* %7
%47 = load i32*, i32** %5
%48 = getelementptr inbounds i32, i32* %47, i64 0
store i32 %46, i32* %48
%49 = load i32, i32* %8
%50 = load i32*, i32** %5
%51 = getelementptr inbounds i32, i32* %50, i64 1
store i32 %49, i32* %51
ret void
}

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