#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 */

/* Variables and functions */
int /*<<< orphan*/ evolveUniv(int, int, int **);
int /*<<< orphan*/ initUniv(int, int, int **);
int /*<<< orphan*/ showUniv(int, int, int **);
int /*<<< orphan*/ usleep(int);
void playGame(int rows, int cols, int time) {
  int univ[rows][cols];
  initUniv(rows, cols, univ);
  while (1) {
    showUniv(rows, cols, univ);
    evolveUniv(rows, cols, univ);
    usleep(time);
  }
}


x86 assembly (clang, -O0):
<playGame>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    %eax,%ecx
mov    -0x8(%rbp),%eax
mov    %rsp,%rdx
mov    %rdx,-0x18(%rbp)
mov    %rcx,%rdx
imul   %rax,%rdx
lea    0xf(,%rdx,4),%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x30(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x20(%rbp)
mov    %rax,-0x28(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1030 <initUniv@plt>
jmp    1198 <playGame+0x58>
mov    -0x30(%rbp),%rdx
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1050 <showUniv@plt>
mov    -0x30(%rbp),%rdx
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
call   1040 <evolveUniv@plt>
mov    -0xc(%rbp),%edi
call   1060 <usleep@plt>
jmp    1193 <playGame+0x53>

x86 assembly (clang, -O2):
<playGame>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %edx,%r14d
mov    %esi,%r15d
mov    %edi,%r12d
mov    %edi,%eax
mov    %esi,%ecx
imul   %rax,%rcx
lea    0xf(,%rcx,4),%rax
and    $0xfffffffffffffff0,%rax
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
mov    %rbx,%rdx
call   1030 <initUniv@plt>
nopl   0x0(%rax)
mov    %r12d,%edi
mov    %r15d,%esi
mov    %rbx,%rdx
call   1050 <showUniv@plt>
mov    %r12d,%edi
mov    %r15d,%esi
mov    %rbx,%rdx
call   1040 <evolveUniv@plt>
mov    %r14d,%edi
call   1060 <usleep@plt>
jmp    1180 <playGame+0x40>

LLVM IR (-O0):
define void @playGame(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i64
%9 = alloca i64
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%10 = load i32, i32* %4
%11 = zext i32 %10 to i64
%12 = load i32, i32* %5
%13 = zext i32 %12 to i64
%14 = call i8* @llvm.stacksave()
store i8* %14, i8** %7
%15 = mul nuw i64 %11, %13
%16 = alloca i32, i64 %15
store i64 %11, i64* %8
store i64 %13, i64* %9
%17 = load i32, i32* %4
%18 = load i32, i32* %5
%19 = bitcast i32* %16 to i32**
%20 = call i32 @initUniv(i32 %17, i32 %18, i32** %19)
br label %21
21: ; preds = %22, %3
br label %22
22: ; preds = %21
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = bitcast i32* %16 to i32**
%26 = call i32 @showUniv(i32 %23, i32 %24, i32** %25)
%27 = load i32, i32* %4
%28 = load i32, i32* %5
%29 = bitcast i32* %16 to i32**
%30 = call i32 @evolveUniv(i32 %27, i32 %28, i32** %29)
%31 = load i32, i32* %6
%32 = call i32 @usleep(i32 %31)
br label %21
}

LLVM IR (-O2):
define void @playGame(i32 %0, i32 %1, i32 %2) {
%4 = zext i32 %0 to i64
%5 = zext i32 %1 to i64
%6 = mul nuw i64 %5, %4
%7 = alloca i32, i64 %6
%8 = bitcast i32* %7 to i32**
%9 = call i32 @initUniv(i32 %0, i32 %1, i32** %8)
br label %10
10: ; preds = %10, %3
%11 = call i32 @showUniv(i32 %0, i32 %1, i32** %8)
%12 = call i32 @evolveUniv(i32 %0, i32 %1, i32** %8)
%13 = call i32 @usleep(i32 %2)
br label %10
}