#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 /*<<< orphan*/ uint16_t;
typedef int int8_t;

/* Variables and functions */
int /*<<< orphan*/ READ_ROUND_KEY_WORD(int /*<<< orphan*/);
int /*<<< orphan*/ round_f_inverse(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
void Decrypt(uint8_t *block, uint8_t *roundKeys) {
  int8_t i;
  uint16_t *Block = (uint16_t *)block;
  uint16_t *RoundKeys = (uint16_t *)roundKeys;
  for (i = 0; i < 8; i++) {
    Block[i] ^= READ_ROUND_KEY_WORD(RoundKeys[32 * 8 + i]);
  }
  for (i = 8 - 1; i >= 0; i--) {
    round_f_inverse(Block, &RoundKeys[32 * i]);
  }
}


x86 assembly (clang, -O0):
<Decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    %rax,-0x28(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    1187 <Decrypt+0x67>
mov    -0x28(%rbp),%rax
mov    -0x14(%rbp),%ecx
add    $0x100,%ecx
movslq %ecx,%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <READ_ROUND_KEY_WORD@plt>
mov    %eax,%edx
mov    -0x20(%rbp),%rax
movslq -0x14(%rbp),%rcx
xor    (%rax,%rcx,4),%edx
mov    %edx,(%rax,%rcx,4)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1147 <Decrypt+0x27>
movl   $0x7,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
jl     11c2 <Decrypt+0xa2>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x5,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1040 <round_f_inverse@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    118e <Decrypt+0x6e>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Decrypt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x400(%rsi),%edi
call   1030 <READ_ROUND_KEY_WORD@plt>
xor    %eax,(%rbx)
mov    0x404(%r14),%edi
call   1030 <READ_ROUND_KEY_WORD@plt>
xor    %eax,0x4(%rbx)
mov    0x408(%r14),%edi
call   1030 <READ_ROUND_KEY_WORD@plt>
xor    %eax,0x8(%rbx)
mov    0x40c(%r14),%edi
call   1030 <READ_ROUND_KEY_WORD@plt>
xor    %eax,0xc(%rbx)
mov    0x410(%r14),%edi
call   1030 <READ_ROUND_KEY_WORD@plt>
xor    %eax,0x10(%rbx)
mov    0x414(%r14),%edi
call   1030 <READ_ROUND_KEY_WORD@plt>
xor    %eax,0x14(%rbx)
mov    0x418(%r14),%edi
call   1030 <READ_ROUND_KEY_WORD@plt>
xor    %eax,0x18(%rbx)
mov    0x41c(%r14),%edi
call   1030 <READ_ROUND_KEY_WORD@plt>
xor    %eax,0x1c(%rbx)
lea    0x380(%r14),%rsi
mov    %rbx,%rdi
call   1040 <round_f_inverse@plt>
lea    0x300(%r14),%rsi
mov    %rbx,%rdi
call   1040 <round_f_inverse@plt>
lea    0x280(%r14),%rsi
mov    %rbx,%rdi
call   1040 <round_f_inverse@plt>
lea    0x200(%r14),%rsi
mov    %rbx,%rdi
call   1040 <round_f_inverse@plt>
lea    0x180(%r14),%rsi
mov    %rbx,%rdi
call   1040 <round_f_inverse@plt>
lea    0x100(%r14),%rsi
mov    %rbx,%rdi
call   1040 <round_f_inverse@plt>
lea    0x80(%r14),%rsi
mov    %rbx,%rdi
call   1040 <round_f_inverse@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
add    $0x8,%rsp
pop    %rbx
pop    %r14
jmp    1040 <round_f_inverse@plt>

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*
store i32* %0, i32** %3
store i32* %1, i32** %4
%8 = load i32*, i32** %3
store i32* %8, i32** %6
%9 = load i32*, i32** %4
store i32* %9, i32** %7
store i32 0, i32* %5
br label %10
10: ; preds = %27, %2
%11 = load i32, i32* %5
%12 = icmp slt i32 %11, 8
br i1 %12, label %13, label %30
13: ; preds = %10
%14 = load i32*, i32** %7
%15 = load i32, i32* %5
%16 = add nsw i32 256, %15
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds i32, i32* %14, i64 %17
%19 = load i32, i32* %18
%20 = call i32 @READ_ROUND_KEY_WORD(i32 %19)
%21 = load i32*, i32** %6
%22 = load i32, i32* %5
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i32, i32* %21, i64 %23
%25 = load i32, i32* %24
%26 = xor i32 %25, %20
store i32 %26, i32* %24
br label %27
27: ; preds = %13
%28 = load i32, i32* %5
%29 = add nsw i32 %28, 1
store i32 %29, i32* %5
br label %10
30: ; preds = %10
store i32 7, i32* %5
br label %31
31: ; preds = %42, %30
%32 = load i32, i32* %5
%33 = icmp sge i32 %32, 0
br i1 %33, label %34, label %45
34: ; preds = %31
%35 = load i32*, i32** %6
%36 = load i32*, i32** %7
%37 = load i32, i32* %5
%38 = mul nsw i32 32, %37
%39 = sext i32 %38 to i64
%40 = getelementptr inbounds i32, i32* %36, i64 %39
%41 = call i32 @round_f_inverse(i32* %35, i32* %40)
br label %42
42: ; preds = %34
%43 = load i32, i32* %5
%44 = add nsw i32 %43, -1
store i32 %44, i32* %5
br label %31
45: ; preds = %31
ret void
}

LLVM IR (-O2):
define void @Decrypt(i32* %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 256
%4 = load i32, i32* %3
%5 = tail call i32 @READ_ROUND_KEY_WORD(i32 %4)
%6 = load i32, i32* %0
%7 = xor i32 %6, %5
store i32 %7, i32* %0
%8 = getelementptr inbounds i32, i32* %1, i64 257
%9 = load i32, i32* %8
%10 = tail call i32 @READ_ROUND_KEY_WORD(i32 %9)
%11 = getelementptr inbounds i32, i32* %0, i64 1
%12 = load i32, i32* %11
%13 = xor i32 %12, %10
store i32 %13, i32* %11
%14 = getelementptr inbounds i32, i32* %1, i64 258
%15 = load i32, i32* %14
%16 = tail call i32 @READ_ROUND_KEY_WORD(i32 %15)
%17 = getelementptr inbounds i32, i32* %0, i64 2
%18 = load i32, i32* %17
%19 = xor i32 %18, %16
store i32 %19, i32* %17
%20 = getelementptr inbounds i32, i32* %1, i64 259
%21 = load i32, i32* %20
%22 = tail call i32 @READ_ROUND_KEY_WORD(i32 %21)
%23 = getelementptr inbounds i32, i32* %0, i64 3
%24 = load i32, i32* %23
%25 = xor i32 %24, %22
store i32 %25, i32* %23
%26 = getelementptr inbounds i32, i32* %1, i64 260
%27 = load i32, i32* %26
%28 = tail call i32 @READ_ROUND_KEY_WORD(i32 %27)
%29 = getelementptr inbounds i32, i32* %0, i64 4
%30 = load i32, i32* %29
%31 = xor i32 %30, %28
store i32 %31, i32* %29
%32 = getelementptr inbounds i32, i32* %1, i64 261
%33 = load i32, i32* %32
%34 = tail call i32 @READ_ROUND_KEY_WORD(i32 %33)
%35 = getelementptr inbounds i32, i32* %0, i64 5
%36 = load i32, i32* %35
%37 = xor i32 %36, %34
store i32 %37, i32* %35
%38 = getelementptr inbounds i32, i32* %1, i64 262
%39 = load i32, i32* %38
%40 = tail call i32 @READ_ROUND_KEY_WORD(i32 %39)
%41 = getelementptr inbounds i32, i32* %0, i64 6
%42 = load i32, i32* %41
%43 = xor i32 %42, %40
store i32 %43, i32* %41
%44 = getelementptr inbounds i32, i32* %1, i64 263
%45 = load i32, i32* %44
%46 = tail call i32 @READ_ROUND_KEY_WORD(i32 %45)
%47 = getelementptr inbounds i32, i32* %0, i64 7
%48 = load i32, i32* %47
%49 = xor i32 %48, %46
store i32 %49, i32* %47
%50 = getelementptr inbounds i32, i32* %1, i64 224
%51 = tail call i32 @round_f_inverse(i32* %0, i32* %50)
%52 = getelementptr inbounds i32, i32* %1, i64 192
%53 = tail call i32 @round_f_inverse(i32* %0, i32* %52)
%54 = getelementptr inbounds i32, i32* %1, i64 160
%55 = tail call i32 @round_f_inverse(i32* %0, i32* %54)
%56 = getelementptr inbounds i32, i32* %1, i64 128
%57 = tail call i32 @round_f_inverse(i32* %0, i32* %56)
%58 = getelementptr inbounds i32, i32* %1, i64 96
%59 = tail call i32 @round_f_inverse(i32* %0, i32* %58)
%60 = getelementptr inbounds i32, i32* %1, i64 64
%61 = tail call i32 @round_f_inverse(i32* %0, i32* %60)
%62 = getelementptr inbounds i32, i32* %1, i64 32
%63 = tail call i32 @round_f_inverse(i32* %0, i32* %62)
%64 = tail call i32 @round_f_inverse(i32* %0, i32* %1)
ret void
}