#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*/ setSquare(struct rubikCube *, unsigned char, unsigned char,
                             unsigned char, unsigned char);
void initilizeCube(struct rubikCube *cube) {
  unsigned char face, row, col;
  for (face = 0; face < 6; face++) {
    for (row = 0; row < 3; row++) {
      for (col = 0; col < 3; col++) {
        setSquare(cube, face, row, col, face);
      }
    }
  }
}


x86 assembly (clang, -O0):
<initilizeCube>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movb   $0x0,-0x9(%rbp)
movzbl -0x9(%rbp),%eax
cmp    $0x6,%eax
jge    11a0 <initilizeCube+0x90>
movb   $0x0,-0xa(%rbp)
movzbl -0xa(%rbp),%eax
cmp    $0x3,%eax
jge    118e <initilizeCube+0x7e>
movb   $0x0,-0xb(%rbp)
movzbl -0xb(%rbp),%eax
cmp    $0x3,%eax
jge    117c <initilizeCube+0x6c>
mov    -0x8(%rbp),%rdi
mov    -0x9(%rbp),%dl
mov    -0xa(%rbp),%cl
mov    -0xb(%rbp),%al
movzbl %dl,%esi
movzbl %cl,%edx
movzbl %al,%ecx
movzbl -0x9(%rbp),%r8d
call   1030 <setSquare@plt>
mov    -0xb(%rbp),%al
add    $0x1,%al
mov    %al,-0xb(%rbp)
jmp    1142 <initilizeCube+0x32>
jmp    1181 <initilizeCube+0x71>
mov    -0xa(%rbp),%al
add    $0x1,%al
mov    %al,-0xa(%rbp)
jmp    1131 <initilizeCube+0x21>
jmp    1193 <initilizeCube+0x83>
mov    -0x9(%rbp),%al
add    $0x1,%al
mov    %al,-0x9(%rbp)
jmp    1120 <initilizeCube+0x10>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<initilizeCube>:
push   %rbp
push   %rbx
push   %rax
mov    %rdi,%rbx
xor    %ebp,%ebp
nopl   0x0(%rax,%rax,1)
movzbl %bpl,%ebp
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %edx,%edx
xor    %ecx,%ecx
mov    %ebp,%r8d
call   1030 <setSquare@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %edx,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
call   1030 <setSquare@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
xor    %edx,%edx
mov    $0x2,%ecx
mov    %ebp,%r8d
call   1030 <setSquare@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
xor    %ecx,%ecx
mov    %ebp,%r8d
call   1030 <setSquare@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
call   1030 <setSquare@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x1,%edx
mov    $0x2,%ecx
mov    %ebp,%r8d
call   1030 <setSquare@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x2,%edx
xor    %ecx,%ecx
mov    %ebp,%r8d
call   1030 <setSquare@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x2,%edx
mov    $0x1,%ecx
mov    %ebp,%r8d
call   1030 <setSquare@plt>
mov    %rbx,%rdi
mov    %ebp,%esi
mov    $0x2,%edx
mov    $0x2,%ecx
mov    %ebp,%r8d
call   1030 <setSquare@plt>
add    $0x1,%bpl
cmp    $0x6,%bpl
jne    1120 <initilizeCube+0x10>
add    $0x8,%rsp
pop    %rbx
pop    %rbp
ret

LLVM IR (-O0):
%struct.rubikCube = type { i32 }
define void @initilizeCube(%struct.rubikCube* %0) {
%2 = alloca %struct.rubikCube*
%3 = alloca i8
%4 = alloca i8
%5 = alloca i8
store %struct.rubikCube* %0, %struct.rubikCube** %2
store i8 0, i8* %3
br label %6
6: ; preds = %35, %1
%7 = load i8, i8* %3
%8 = zext i8 %7 to i32
%9 = icmp slt i32 %8, 6
br i1 %9, label %10, label %38
10: ; preds = %6
store i8 0, i8* %4
br label %11
11: ; preds = %31, %10
%12 = load i8, i8* %4
%13 = zext i8 %12 to i32
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %34
15: ; preds = %11
store i8 0, i8* %5
br label %16
16: ; preds = %27, %15
%17 = load i8, i8* %5
%18 = zext i8 %17 to i32
%19 = icmp slt i32 %18, 3
br i1 %19, label %20, label %30
20: ; preds = %16
%21 = load %struct.rubikCube*, %struct.rubikCube** %2
%22 = load i8, i8* %3
%23 = load i8, i8* %4
%24 = load i8, i8* %5
%25 = load i8, i8* %3
%26 = call i32 @setSquare(%struct.rubikCube* %21, i8 zeroext %22, i8 zeroext %23, i8 zeroext %24, i8 zeroext %25)
br label %27
27: ; preds = %20
%28 = load i8, i8* %5
%29 = add i8 %28, 1
store i8 %29, i8* %5
br label %16
30: ; preds = %16
br label %31
31: ; preds = %30
%32 = load i8, i8* %4
%33 = add i8 %32, 1
store i8 %33, i8* %4
br label %11
34: ; preds = %11
br label %35
35: ; preds = %34
%36 = load i8, i8* %3
%37 = add i8 %36, 1
store i8 %37, i8* %3
br label %6
38: ; preds = %6
ret void
}

LLVM IR (-O2):
%struct.rubikCube = type { i32 }
define void @initilizeCube(%struct.rubikCube* %0) {
br label %2
2: ; preds = %1, %2
%3 = phi i8 [ 0, %1 ], [ %13, %2 ]
%4 = tail call i32 @setSquare(%struct.rubikCube* %0, i8 zeroext %3, i8 zeroext 0, i8 zeroext 0, i8 zeroext %3)
%5 = tail call i32 @setSquare(%struct.rubikCube* %0, i8 zeroext %3, i8 zeroext 0, i8 zeroext 1, i8 zeroext %3)
%6 = tail call i32 @setSquare(%struct.rubikCube* %0, i8 zeroext %3, i8 zeroext 0, i8 zeroext 2, i8 zeroext %3)
%7 = tail call i32 @setSquare(%struct.rubikCube* %0, i8 zeroext %3, i8 zeroext 1, i8 zeroext 0, i8 zeroext %3)
%8 = tail call i32 @setSquare(%struct.rubikCube* %0, i8 zeroext %3, i8 zeroext 1, i8 zeroext 1, i8 zeroext %3)
%9 = tail call i32 @setSquare(%struct.rubikCube* %0, i8 zeroext %3, i8 zeroext 1, i8 zeroext 2, i8 zeroext %3)
%10 = tail call i32 @setSquare(%struct.rubikCube* %0, i8 zeroext %3, i8 zeroext 2, i8 zeroext 0, i8 zeroext %3)
%11 = tail call i32 @setSquare(%struct.rubikCube* %0, i8 zeroext %3, i8 zeroext 2, i8 zeroext 1, i8 zeroext %3)
%12 = tail call i32 @setSquare(%struct.rubikCube* %0, i8 zeroext %3, i8 zeroext 2, i8 zeroext 2, i8 zeroext %3)
%13 = add nuw nsw i8 %3, 1
%14 = icmp eq i8 %13, 6
br i1 %14, label %15, label %2
15: ; preds = %2
ret void
}