#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*/ drawClosePacman(int, int, int);
int /*<<< orphan*/ drawPacman(int, int, int, int);
int /*<<< orphan*/ sleep(int);
void animatePacman(int x, int y, int radius) {
  while (1) {
    drawPacman(x, y, radius, 6);
    sleep(500);
    drawPacman(x, y, radius, 12);
    sleep(500);
    drawClosePacman(x, y, radius);
    sleep(500);
    drawPacman(x, y, radius, 12);
    sleep(500);
  }
}


x86 assembly (clang, -O0):
<animatePacman>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0x6,%ecx
call   1030 <drawPacman@plt>
mov    $0x1f4,%edi
call   1050 <sleep@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0xc,%ecx
call   1030 <drawPacman@plt>
mov    $0x1f4,%edi
call   1050 <sleep@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
call   1040 <drawClosePacman@plt>
mov    $0x1f4,%edi
call   1050 <sleep@plt>
mov    -0x4(%rbp),%edi
mov    -0x8(%rbp),%esi
mov    -0xc(%rbp),%edx
mov    $0xc,%ecx
call   1030 <drawPacman@plt>
mov    $0x1f4,%edi
call   1050 <sleep@plt>
jmp    1141 <animatePacman+0x11>

x86 assembly (clang, -O2):
<animatePacman>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %edi,%ebx
nopl   0x0(%rax,%rax,1)
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    $0x6,%ecx
call   1030 <drawPacman@plt>
mov    $0x1f4,%edi
call   1050 <sleep@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    $0xc,%ecx
call   1030 <drawPacman@plt>
mov    $0x1f4,%edi
call   1050 <sleep@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
call   1040 <drawClosePacman@plt>
mov    $0x1f4,%edi
call   1050 <sleep@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %r14d,%edx
mov    $0xc,%ecx
call   1030 <drawPacman@plt>
mov    $0x1f4,%edi
call   1050 <sleep@plt>
jmp    1140 <animatePacman+0x10>

LLVM IR (-O0):
define void @animatePacman(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
br label %7
7: ; preds = %3, %7
%8 = load i32, i32* %4
%9 = load i32, i32* %5
%10 = load i32, i32* %6
%11 = call i32 @drawPacman(i32 %8, i32 %9, i32 %10, i32 6)
%12 = call i32 @sleep(i32 500)
%13 = load i32, i32* %4
%14 = load i32, i32* %5
%15 = load i32, i32* %6
%16 = call i32 @drawPacman(i32 %13, i32 %14, i32 %15, i32 12)
%17 = call i32 @sleep(i32 500)
%18 = load i32, i32* %4
%19 = load i32, i32* %5
%20 = load i32, i32* %6
%21 = call i32 @drawClosePacman(i32 %18, i32 %19, i32 %20)
%22 = call i32 @sleep(i32 500)
%23 = load i32, i32* %4
%24 = load i32, i32* %5
%25 = load i32, i32* %6
%26 = call i32 @drawPacman(i32 %23, i32 %24, i32 %25, i32 12)
%27 = call i32 @sleep(i32 500)
br label %7
}

LLVM IR (-O2):
define void @animatePacman(i32 %0, i32 %1, i32 %2) {
br label %4
4: ; preds = %3, %4
%5 = tail call i32 @drawPacman(i32 %0, i32 %1, i32 %2, i32 6)
%6 = tail call i32 @sleep(i32 500)
%7 = tail call i32 @drawPacman(i32 %0, i32 %1, i32 %2, i32 12)
%8 = tail call i32 @sleep(i32 500)
%9 = tail call i32 @drawClosePacman(i32 %0, i32 %1, i32 %2)
%10 = tail call i32 @sleep(i32 500)
%11 = tail call i32 @drawPacman(i32 %0, i32 %1, i32 %2, i32 12)
%12 = tail call i32 @sleep(i32 500)
br label %4
}