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

/* Variables and functions */
int /*<<< orphan*/ AddRoundRoundKeyAndRoundConstant(int /*<<< orphan*/ *,
                                                    int /*<<< orphan*/ *,
                                                    int /*<<< orphan*/ const *);
int /*<<< orphan*/ InverseSLayer(int /*<<< orphan*/ *);
int /*<<< orphan*/ InverseSR(int /*<<< orphan*/ *);
int /*<<< orphan*/ M0Multiplication(int /*<<< orphan*/ *);
int /*<<< orphan*/ M1Multiplication(int /*<<< orphan*/ *);
void InverseRound(uint8_t *block, uint8_t *roundKey,
                  const uint8_t *roundConstant) {
  AddRoundRoundKeyAndRoundConstant(block, roundKey, roundConstant);
  InverseSR(block);
  M0Multiplication(&block[6]);
  M1Multiplication(&block[4]);
  M1Multiplication(&block[2]);
  M0Multiplication(&block[0]);
  InverseSLayer(block);
}


x86 assembly (clang, -O0):
<InverseRound>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <AddRoundRoundKeyAndRoundConstant@plt>
mov    -0x8(%rbp),%rdi
call   1060 <InverseSR@plt>
mov    -0x8(%rbp),%rdi
add    $0x18,%rdi
call   1070 <M0Multiplication@plt>
mov    -0x8(%rbp),%rdi
add    $0x10,%rdi
call   1050 <M1Multiplication@plt>
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
call   1050 <M1Multiplication@plt>
mov    -0x8(%rbp),%rdi
call   1070 <M0Multiplication@plt>
mov    -0x8(%rbp),%rdi
call   1040 <InverseSLayer@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<InverseRound>:
push   %rbx
mov    %rdi,%rbx
call   1030 <AddRoundRoundKeyAndRoundConstant@plt>
mov    %rbx,%rdi
call   1060 <InverseSR@plt>
lea    0x18(%rbx),%rdi
call   1070 <M0Multiplication@plt>
lea    0x10(%rbx),%rdi
call   1050 <M1Multiplication@plt>
lea    0x8(%rbx),%rdi
call   1050 <M1Multiplication@plt>
mov    %rbx,%rdi
call   1070 <M0Multiplication@plt>
mov    %rbx,%rdi
pop    %rbx
jmp    1040 <InverseSLayer@plt>

LLVM IR (-O0):
define void @InverseRound(i32* %0, i32* %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32*
%6 = alloca i32*
store i32* %0, i32** %4
store i32* %1, i32** %5
store i32* %2, i32** %6
%7 = load i32*, i32** %4
%8 = load i32*, i32** %5
%9 = load i32*, i32** %6
%10 = call i32 @AddRoundRoundKeyAndRoundConstant(i32* %7, i32* %8, i32* %9)
%11 = load i32*, i32** %4
%12 = call i32 @InverseSR(i32* %11)
%13 = load i32*, i32** %4
%14 = getelementptr inbounds i32, i32* %13, i64 6
%15 = call i32 @M0Multiplication(i32* %14)
%16 = load i32*, i32** %4
%17 = getelementptr inbounds i32, i32* %16, i64 4
%18 = call i32 @M1Multiplication(i32* %17)
%19 = load i32*, i32** %4
%20 = getelementptr inbounds i32, i32* %19, i64 2
%21 = call i32 @M1Multiplication(i32* %20)
%22 = load i32*, i32** %4
%23 = getelementptr inbounds i32, i32* %22, i64 0
%24 = call i32 @M0Multiplication(i32* %23)
%25 = load i32*, i32** %4
%26 = call i32 @InverseSLayer(i32* %25)
ret void
}

LLVM IR (-O2):
define void @InverseRound(i32* %0, i32* %1, i32* %2) {
%4 = tail call i32 @AddRoundRoundKeyAndRoundConstant(i32* %0, i32* %1, i32* %2)
%5 = tail call i32 @InverseSR(i32* %0)
%6 = getelementptr inbounds i32, i32* %0, i64 6
%7 = tail call i32 @M0Multiplication(i32* %6)
%8 = getelementptr inbounds i32, i32* %0, i64 4
%9 = tail call i32 @M1Multiplication(i32* %8)
%10 = getelementptr inbounds i32, i32* %0, i64 2
%11 = tail call i32 @M1Multiplication(i32* %10)
%12 = tail call i32 @M0Multiplication(i32* %0)
%13 = tail call i32 @InverseSLayer(i32* %0)
ret void
}