#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 */
struct rubikCube {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ getSquare(struct rubikCube *, unsigned char, unsigned char,
                             unsigned char);
int /*<<< orphan*/ setSquare(struct rubikCube *, unsigned char, unsigned char,
                             unsigned char, int /*<<< orphan*/);
void copySquare(struct rubikCube *cube, unsigned char rxFace,
                unsigned char rxRow, unsigned char rxCol, unsigned char txFace,
                unsigned char txRow, unsigned char txCol) {
  setSquare(cube, rxFace, rxRow, rxCol, getSquare(cube, txFace, txRow, txCol));
}


x86 assembly (clang, -O0):
<copySquare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %r8d,-0x28(%rbp)
mov    %ecx,%eax
mov    -0x28(%rbp),%ecx
mov    %eax,-0x24(%rbp)
mov    %edx,%eax
mov    -0x24(%rbp),%edx
mov    %eax,-0x20(%rbp)
mov    %esi,%eax
mov    -0x20(%rbp),%esi
mov    %eax,-0x1c(%rbp)
mov    %rdi,%r8
mov    -0x1c(%rbp),%edi
mov    %r9b,%al
mov    0x10(%rbp),%r9b
mov    %r8,-0x8(%rbp)
mov    %dil,-0x9(%rbp)
mov    %sil,-0xa(%rbp)
mov    %dl,-0xb(%rbp)
mov    %cl,-0xc(%rbp)
mov    %al,-0xd(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x18(%rbp)
mov    -0x9(%rbp),%al
mov    %al,-0x10(%rbp)
mov    -0xa(%rbp),%al
mov    %al,-0xf(%rbp)
mov    -0xb(%rbp),%al
mov    %al,-0xe(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%cl
mov    -0xd(%rbp),%al
movzbl %cl,%esi
movzbl %al,%edx
movzbl 0x10(%rbp),%ecx
call   1030 <getSquare@plt>
mov    -0x18(%rbp),%rdi
mov    -0x10(%rbp),%dl
mov    -0xf(%rbp),%cl
mov    %eax,%r8d
mov    -0xe(%rbp),%al
movzbl %dl,%esi
movzbl %cl,%edx
movzbl %al,%ecx
call   1040 <setSquare@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<copySquare>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %rdi,%rbp
movzbl 0x30(%rsp),%ecx
mov    %r8d,%esi
mov    %r9d,%edx
call   1030 <getSquare@plt>
mov    %rbp,%rdi
mov    %ebx,%esi
mov    %r15d,%edx
mov    %r14d,%ecx
mov    %eax,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <setSquare@plt>

LLVM IR (-O0):
%struct.rubikCube = type { i32 }
define void @copySquare(%struct.rubikCube* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3, i8 zeroext %4, i8 zeroext %5, i8 zeroext %6) {
%8 = alloca %struct.rubikCube*
%9 = alloca i8
%10 = alloca i8
%11 = alloca i8
%12 = alloca i8
%13 = alloca i8
%14 = alloca i8
store %struct.rubikCube* %0, %struct.rubikCube** %8
store i8 %1, i8* %9
store i8 %2, i8* %10
store i8 %3, i8* %11
store i8 %4, i8* %12
store i8 %5, i8* %13
store i8 %6, i8* %14
%15 = load %struct.rubikCube*, %struct.rubikCube** %8
%16 = load i8, i8* %9
%17 = load i8, i8* %10
%18 = load i8, i8* %11
%19 = load %struct.rubikCube*, %struct.rubikCube** %8
%20 = load i8, i8* %12
%21 = load i8, i8* %13
%22 = load i8, i8* %14
%23 = call i32 @getSquare(%struct.rubikCube* %19, i8 zeroext %20, i8 zeroext %21, i8 zeroext %22)
%24 = call i32 @setSquare(%struct.rubikCube* %15, i8 zeroext %16, i8 zeroext %17, i8 zeroext %18, i32 %23)
ret void
}

LLVM IR (-O2):
%struct.rubikCube = type { i32 }
define void @copySquare(%struct.rubikCube* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3, i8 zeroext %4, i8 zeroext %5, i8 zeroext %6) {
%8 = tail call i32 @getSquare(%struct.rubikCube* %0, i8 zeroext %4, i8 zeroext %5, i8 zeroext %6)
%9 = tail call i32 @setSquare(%struct.rubikCube* %0, i8 zeroext %1, i8 zeroext %2, i8 zeroext %3, i32 %8)
ret void
}