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

/* Variables and functions */
int /*<<< orphan*/ Iround_function(int /*<<< orphan*/ *, int /*<<< orphan*/ *);
int READ_ROUND_KEY_BYTE(int);
void Decrypt(uint8_t *block, uint8_t *roundKeys) {
  uint8_t i;
  for (i = 25; i != 0; i--)
    Iround_function((uint16_t *)block, (uint16_t *)(roundKeys + 8 * i));
  for (i = 0; i < 8; i++)
    block[i] ^= READ_ROUND_KEY_BYTE(roundKeys[i]);
}


x86 assembly (clang, -O0):
<Decrypt>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x19,-0x14(%rbp)
cmpl   $0x0,-0x14(%rbp)
je     116b <Decrypt+0x4b>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x14(%rbp),%eax
shl    $0x3,%eax
cltq
shl    $0x2,%rax
add    %rax,%rsi
call   1040 <Iround_function@plt>
mov    -0x14(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0x14(%rbp)
jmp    1137 <Decrypt+0x17>
movl   $0x0,-0x14(%rbp)
cmpl   $0x8,-0x14(%rbp)
jge    11aa <Decrypt+0x8a>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
mov    %eax,%edx
mov    -0x8(%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    1172 <Decrypt+0x52>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Decrypt>:
push   %r14
push   %rbx
push   %rax
mov    %rsi,%rbx
mov    %rdi,%r14
add    $0x320,%rsi
call   1040 <Iround_function@plt>
lea    0x300(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x2e0(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x2c0(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x2a0(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x280(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x260(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x240(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x220(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x200(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x1e0(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x1c0(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x1a0(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x180(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x160(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x140(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x120(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x100(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0xe0(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0xc0(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0xa0(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x80(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x60(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x40(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
lea    0x20(%rbx),%rsi
mov    %r14,%rdi
call   1040 <Iround_function@plt>
mov    (%rbx),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
xor    %eax,(%r14)
mov    0x4(%rbx),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
xor    %eax,0x4(%r14)
mov    0x8(%rbx),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
xor    %eax,0x8(%r14)
mov    0xc(%rbx),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
xor    %eax,0xc(%r14)
mov    0x10(%rbx),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
xor    %eax,0x10(%r14)
mov    0x14(%rbx),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
xor    %eax,0x14(%r14)
mov    0x18(%rbx),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
xor    %eax,0x18(%r14)
mov    0x1c(%rbx),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
xor    %eax,0x1c(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

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

LLVM IR (-O2):
define void @Decrypt(i32* %0, i32* %1) {
%3 = getelementptr inbounds i32, i32* %1, i64 200
%4 = tail call i32 @Iround_function(i32* %0, i32* %3)
%5 = getelementptr inbounds i32, i32* %1, i64 192
%6 = tail call i32 @Iround_function(i32* %0, i32* %5)
%7 = getelementptr inbounds i32, i32* %1, i64 184
%8 = tail call i32 @Iround_function(i32* %0, i32* %7)
%9 = getelementptr inbounds i32, i32* %1, i64 176
%10 = tail call i32 @Iround_function(i32* %0, i32* %9)
%11 = getelementptr inbounds i32, i32* %1, i64 168
%12 = tail call i32 @Iround_function(i32* %0, i32* %11)
%13 = getelementptr inbounds i32, i32* %1, i64 160
%14 = tail call i32 @Iround_function(i32* %0, i32* %13)
%15 = getelementptr inbounds i32, i32* %1, i64 152
%16 = tail call i32 @Iround_function(i32* %0, i32* %15)
%17 = getelementptr inbounds i32, i32* %1, i64 144
%18 = tail call i32 @Iround_function(i32* %0, i32* %17)
%19 = getelementptr inbounds i32, i32* %1, i64 136
%20 = tail call i32 @Iround_function(i32* %0, i32* %19)
%21 = getelementptr inbounds i32, i32* %1, i64 128
%22 = tail call i32 @Iround_function(i32* %0, i32* %21)
%23 = getelementptr inbounds i32, i32* %1, i64 120
%24 = tail call i32 @Iround_function(i32* %0, i32* %23)
%25 = getelementptr inbounds i32, i32* %1, i64 112
%26 = tail call i32 @Iround_function(i32* %0, i32* %25)
%27 = getelementptr inbounds i32, i32* %1, i64 104
%28 = tail call i32 @Iround_function(i32* %0, i32* %27)
%29 = getelementptr inbounds i32, i32* %1, i64 96
%30 = tail call i32 @Iround_function(i32* %0, i32* %29)
%31 = getelementptr inbounds i32, i32* %1, i64 88
%32 = tail call i32 @Iround_function(i32* %0, i32* %31)
%33 = getelementptr inbounds i32, i32* %1, i64 80
%34 = tail call i32 @Iround_function(i32* %0, i32* %33)
%35 = getelementptr inbounds i32, i32* %1, i64 72
%36 = tail call i32 @Iround_function(i32* %0, i32* %35)
%37 = getelementptr inbounds i32, i32* %1, i64 64
%38 = tail call i32 @Iround_function(i32* %0, i32* %37)
%39 = getelementptr inbounds i32, i32* %1, i64 56
%40 = tail call i32 @Iround_function(i32* %0, i32* %39)
%41 = getelementptr inbounds i32, i32* %1, i64 48
%42 = tail call i32 @Iround_function(i32* %0, i32* %41)
%43 = getelementptr inbounds i32, i32* %1, i64 40
%44 = tail call i32 @Iround_function(i32* %0, i32* %43)
%45 = getelementptr inbounds i32, i32* %1, i64 32
%46 = tail call i32 @Iround_function(i32* %0, i32* %45)
%47 = getelementptr inbounds i32, i32* %1, i64 24
%48 = tail call i32 @Iround_function(i32* %0, i32* %47)
%49 = getelementptr inbounds i32, i32* %1, i64 16
%50 = tail call i32 @Iround_function(i32* %0, i32* %49)
%51 = getelementptr inbounds i32, i32* %1, i64 8
%52 = tail call i32 @Iround_function(i32* %0, i32* %51)
%53 = load i32, i32* %1
%54 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %53)
%55 = load i32, i32* %0
%56 = xor i32 %55, %54
store i32 %56, i32* %0
%57 = getelementptr inbounds i32, i32* %1, i64 1
%58 = load i32, i32* %57
%59 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %58)
%60 = getelementptr inbounds i32, i32* %0, i64 1
%61 = load i32, i32* %60
%62 = xor i32 %61, %59
store i32 %62, i32* %60
%63 = getelementptr inbounds i32, i32* %1, i64 2
%64 = load i32, i32* %63
%65 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %64)
%66 = getelementptr inbounds i32, i32* %0, i64 2
%67 = load i32, i32* %66
%68 = xor i32 %67, %65
store i32 %68, i32* %66
%69 = getelementptr inbounds i32, i32* %1, i64 3
%70 = load i32, i32* %69
%71 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %70)
%72 = getelementptr inbounds i32, i32* %0, i64 3
%73 = load i32, i32* %72
%74 = xor i32 %73, %71
store i32 %74, i32* %72
%75 = getelementptr inbounds i32, i32* %1, i64 4
%76 = load i32, i32* %75
%77 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %76)
%78 = getelementptr inbounds i32, i32* %0, i64 4
%79 = load i32, i32* %78
%80 = xor i32 %79, %77
store i32 %80, i32* %78
%81 = getelementptr inbounds i32, i32* %1, i64 5
%82 = load i32, i32* %81
%83 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %82)
%84 = getelementptr inbounds i32, i32* %0, i64 5
%85 = load i32, i32* %84
%86 = xor i32 %85, %83
store i32 %86, i32* %84
%87 = getelementptr inbounds i32, i32* %1, i64 6
%88 = load i32, i32* %87
%89 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %88)
%90 = getelementptr inbounds i32, i32* %0, i64 6
%91 = load i32, i32* %90
%92 = xor i32 %91, %89
store i32 %92, i32* %90
%93 = getelementptr inbounds i32, i32* %1, i64 7
%94 = load i32, i32* %93
%95 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %94)
%96 = getelementptr inbounds i32, i32* %0, i64 7
%97 = load i32, i32* %96
%98 = xor i32 %97, %95
store i32 %98, i32* %96
ret void
}