#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;

/* Variables and functions */
int READ_ROUND_KEY_BYTE(int const);
void DecryptFinalTransfomation(uint8_t *x, const uint8_t *wk) {
  uint8_t temp = x[7];
  x[7] = x[6] ^ READ_ROUND_KEY_BYTE(wk[7]);
  x[6] = x[5];
  x[5] = (x[4] - READ_ROUND_KEY_BYTE(wk[6])) & 0xFF;
  x[4] = x[3];
  x[3] = x[2] ^ READ_ROUND_KEY_BYTE(wk[5]);
  x[2] = x[1];
  x[1] = (x[0] - READ_ROUND_KEY_BYTE(wk[4])) & 0xFF;
  x[0] = temp;
}


x86 assembly (clang, -O0):
<DecryptFinalTransfomation>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x8(%rbp),%rax
mov    0x1c(%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x8(%rbp),%rax
mov    0x18(%rax),%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
mov    0x1c(%rax),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
mov    -0x24(%rbp),%ecx
xor    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x1c(%rax)
mov    -0x8(%rbp),%rax
mov    0x14(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x18(%rax)
mov    -0x8(%rbp),%rax
mov    0x10(%rax),%eax
mov    %eax,-0x20(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
mov    -0x20(%rbp),%ecx
sub    %eax,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x14(%rax)
mov    -0x8(%rbp),%rax
mov    0xc(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x10(%rax)
mov    -0x8(%rbp),%rax
mov    0x8(%rax),%eax
mov    %eax,-0x1c(%rbp)
mov    -0x10(%rbp),%rax
mov    0x14(%rax),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
mov    -0x1c(%rbp),%ecx
xor    %eax,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0xc(%rax)
mov    -0x8(%rbp),%rax
mov    0x4(%rax),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x8(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
mov    -0x18(%rbp),%ecx
sub    %eax,%ecx
and    $0xff,%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,0x4(%rax)
mov    -0x14(%rbp),%ecx
mov    -0x8(%rbp),%rax
mov    %ecx,(%rax)
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DecryptFinalTransfomation>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    0x18(%rdi),%ebp
mov    0x1c(%rdi),%r15d
mov    0x1c(%rsi),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
xor    %ebp,%eax
mov    %eax,0x1c(%rbx)
mov    0x10(%rbx),%ebp
mov    0x14(%rbx),%eax
mov    %eax,0x18(%rbx)
mov    0x18(%r14),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
sub    %eax,%ebp
movzbl %bpl,%eax
mov    %eax,0x14(%rbx)
mov    0x8(%rbx),%ebp
mov    0xc(%rbx),%eax
mov    %eax,0x10(%rbx)
mov    0x14(%r14),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
xor    %ebp,%eax
mov    %eax,0xc(%rbx)
mov    (%rbx),%ebp
mov    0x4(%rbx),%eax
mov    %eax,0x8(%rbx)
mov    0x10(%r14),%edi
call   1030 <READ_ROUND_KEY_BYTE@plt>
sub    %eax,%ebp
movzbl %bpl,%eax
mov    %eax,0x4(%rbx)
mov    %r15d,(%rbx)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @DecryptFinalTransfomation(i32* %0, i32* %1) {
%3 = alloca i32*
%4 = alloca i32*
%5 = alloca i32
store i32* %0, i32** %3
store i32* %1, i32** %4
%6 = load i32*, i32** %3
%7 = getelementptr inbounds i32, i32* %6, i64 7
%8 = load i32, i32* %7
store i32 %8, i32* %5
%9 = load i32*, i32** %3
%10 = getelementptr inbounds i32, i32* %9, i64 6
%11 = load i32, i32* %10
%12 = load i32*, i32** %4
%13 = getelementptr inbounds i32, i32* %12, i64 7
%14 = load i32, i32* %13
%15 = call i32 @READ_ROUND_KEY_BYTE(i32 %14)
%16 = xor i32 %11, %15
%17 = load i32*, i32** %3
%18 = getelementptr inbounds i32, i32* %17, i64 7
store i32 %16, i32* %18
%19 = load i32*, i32** %3
%20 = getelementptr inbounds i32, i32* %19, i64 5
%21 = load i32, i32* %20
%22 = load i32*, i32** %3
%23 = getelementptr inbounds i32, i32* %22, i64 6
store i32 %21, i32* %23
%24 = load i32*, i32** %3
%25 = getelementptr inbounds i32, i32* %24, i64 4
%26 = load i32, i32* %25
%27 = load i32*, i32** %4
%28 = getelementptr inbounds i32, i32* %27, i64 6
%29 = load i32, i32* %28
%30 = call i32 @READ_ROUND_KEY_BYTE(i32 %29)
%31 = sub nsw i32 %26, %30
%32 = and i32 %31, 255
%33 = load i32*, i32** %3
%34 = getelementptr inbounds i32, i32* %33, i64 5
store i32 %32, i32* %34
%35 = load i32*, i32** %3
%36 = getelementptr inbounds i32, i32* %35, i64 3
%37 = load i32, i32* %36
%38 = load i32*, i32** %3
%39 = getelementptr inbounds i32, i32* %38, i64 4
store i32 %37, i32* %39
%40 = load i32*, i32** %3
%41 = getelementptr inbounds i32, i32* %40, i64 2
%42 = load i32, i32* %41
%43 = load i32*, i32** %4
%44 = getelementptr inbounds i32, i32* %43, i64 5
%45 = load i32, i32* %44
%46 = call i32 @READ_ROUND_KEY_BYTE(i32 %45)
%47 = xor i32 %42, %46
%48 = load i32*, i32** %3
%49 = getelementptr inbounds i32, i32* %48, i64 3
store i32 %47, i32* %49
%50 = load i32*, i32** %3
%51 = getelementptr inbounds i32, i32* %50, i64 1
%52 = load i32, i32* %51
%53 = load i32*, i32** %3
%54 = getelementptr inbounds i32, i32* %53, i64 2
store i32 %52, i32* %54
%55 = load i32*, i32** %3
%56 = getelementptr inbounds i32, i32* %55, i64 0
%57 = load i32, i32* %56
%58 = load i32*, i32** %4
%59 = getelementptr inbounds i32, i32* %58, i64 4
%60 = load i32, i32* %59
%61 = call i32 @READ_ROUND_KEY_BYTE(i32 %60)
%62 = sub nsw i32 %57, %61
%63 = and i32 %62, 255
%64 = load i32*, i32** %3
%65 = getelementptr inbounds i32, i32* %64, i64 1
store i32 %63, i32* %65
%66 = load i32, i32* %5
%67 = load i32*, i32** %3
%68 = getelementptr inbounds i32, i32* %67, i64 0
store i32 %66, i32* %68
ret void
}

LLVM IR (-O2):
define void @DecryptFinalTransfomation(i32* nocapture %0, i32* nocapture %1) {
%3 = getelementptr inbounds i32, i32* %0, i64 7
%4 = load i32, i32* %3
%5 = getelementptr inbounds i32, i32* %0, i64 6
%6 = load i32, i32* %5
%7 = getelementptr inbounds i32, i32* %1, i64 7
%8 = load i32, i32* %7
%9 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %8)
%10 = xor i32 %9, %6
store i32 %10, i32* %3
%11 = getelementptr inbounds i32, i32* %0, i64 5
%12 = load i32, i32* %11
store i32 %12, i32* %5
%13 = getelementptr inbounds i32, i32* %0, i64 4
%14 = load i32, i32* %13
%15 = getelementptr inbounds i32, i32* %1, i64 6
%16 = load i32, i32* %15
%17 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %16)
%18 = sub nsw i32 %14, %17
%19 = and i32 %18, 255
store i32 %19, i32* %11
%20 = getelementptr inbounds i32, i32* %0, i64 3
%21 = load i32, i32* %20
store i32 %21, i32* %13
%22 = getelementptr inbounds i32, i32* %0, i64 2
%23 = load i32, i32* %22
%24 = getelementptr inbounds i32, i32* %1, i64 5
%25 = load i32, i32* %24
%26 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %25)
%27 = xor i32 %26, %23
store i32 %27, i32* %20
%28 = getelementptr inbounds i32, i32* %0, i64 1
%29 = load i32, i32* %28
store i32 %29, i32* %22
%30 = load i32, i32* %0
%31 = getelementptr inbounds i32, i32* %1, i64 4
%32 = load i32, i32* %31
%33 = tail call i32 @READ_ROUND_KEY_BYTE(i32 %32)
%34 = sub nsw i32 %30, %33
%35 = and i32 %34, 255
store i32 %35, i32* %28
store i32 %4, i32* %0
ret void
}