#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*/ PacManEats(int, float, float, float *, float *);
int /*<<< orphan*/ scanf(char *, ...);
int main() {
  int index;
  int barrels;
  float position1;
  float position2;
  float cordinate1[999];
  float cordinate2[999];
  scanf(" %f", &position1);
  scanf(" %f", &position2);
  scanf(" %d", &barrels);
  for (index = 1; index <= barrels; index++) {
    scanf(" %f", &cordinate1[index]);
    scanf(" %f", &cordinate2[index]);
  }
  PacManEats(barrels, position1, position2, cordinate1, cordinate2);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1f50,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xec7(%rip),%rdi
lea    -0x10(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xeb5(%rip),%rdi
lea    -0x14(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
lea    0xea7(%rip),%rdi
lea    -0xc(%rbp),%rsi
mov    $0x0,%al
call   1040 <scanf@plt>
movl   $0x1,-0x8(%rbp)
mov    -0x8(%rbp),%eax
cmp    -0xc(%rbp),%eax
jg     11c9 <main+0xa9>
movslq -0x8(%rbp),%rax
lea    -0xfb0(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe6c(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
movslq -0x8(%rbp),%rax
lea    -0x1f50(%rbp),%rsi
shl    $0x2,%rax
add    %rax,%rsi
lea    0xe4c(%rip),%rdi
mov    $0x0,%al
call   1040 <scanf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    116f <main+0x4f>
mov    -0xc(%rbp),%edi
movss  -0x10(%rbp),%xmm0
movss  -0x14(%rbp),%xmm1
lea    -0xfb0(%rbp),%rsi
lea    -0x1f50(%rbp),%rdx
call   1030 <PacManEats@plt>
xor    %eax,%eax
add    $0x1f50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x1f58,%rsp
lea    0xecb(%rip),%rbx
lea    0xc(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0x8(%rsp),%rsi
mov    %rbx,%rdi
xor    %eax,%eax
call   1040 <scanf@plt>
lea    0xeaa(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    0x4(%rsp),%edi
test   %edi,%edi
jle    11c0 <main+0xa0>
lea    0x14(%rsp),%r14
lea    0xfb4(%rsp),%r12
lea    0xe7e(%rip),%r15
xor    %ebx,%ebx
cs nopw 0x0(%rax,%rax,1)
xchg   %ax,%ax
mov    %r15,%rdi
mov    %r12,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
mov    %r15,%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1040 <scanf@plt>
movslq 0x4(%rsp),%rdi
add    $0x1,%rbx
add    $0x4,%r14
add    $0x4,%r12
cmp    %rdi,%rbx
jl     1190 <main+0x70>
movss  0xc(%rsp),%xmm0
movss  0x8(%rsp),%xmm1
lea    0xfb0(%rsp),%rsi
lea    0x10(%rsp),%rdx
call   1030 <PacManEats@plt>
xor    %eax,%eax
add    $0x1f58,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [4 x i8] c" %f\00"
@.str.1 = [4 x i8] c" %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
%3 = alloca i32
%4 = alloca float
%5 = alloca float
%6 = alloca [999 x float]
%7 = alloca [999 x float]
store i32 0, i32* %1
%8 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %4)
%9 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %5)
%10 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %3)
store i32 1, i32* %2
br label %11
11: ; preds = %24, %0
%12 = load i32, i32* %2
%13 = load i32, i32* %3
%14 = icmp sle i32 %12, %13
br i1 %14, label %15, label %27
15: ; preds = %11
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [999 x float], [999 x float]* %6, i64 0, i64 %17
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %18)
%20 = load i32, i32* %2
%21 = sext i32 %20 to i64
%22 = getelementptr inbounds [999 x float], [999 x float]* %7, i64 0, i64 %21
%23 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %22)
br label %24
24: ; preds = %15
%25 = load i32, i32* %2
%26 = add nsw i32 %25, 1
store i32 %26, i32* %2
br label %11
27: ; preds = %11
%28 = load i32, i32* %3
%29 = load float, float* %4
%30 = load float, float* %5
%31 = getelementptr inbounds [999 x float], [999 x float]* %6, i64 0, i64 0
%32 = getelementptr inbounds [999 x float], [999 x float]* %7, i64 0, i64 0
%33 = call i32 @PacManEats(i32 %28, float %29, float %30, float* %31, float* %32)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c" %f\00"
@.str.1 = [4 x i8] c" %d\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca float
%3 = alloca float
%4 = alloca [999 x float]
%5 = alloca [999 x float]
%6 = bitcast i32* %1 to i8*
%7 = bitcast float* %2 to i8*
%8 = bitcast float* %3 to i8*
%9 = bitcast [999 x float]* %4 to i8*
%10 = bitcast [999 x float]* %5 to i8*
%11 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %2)
%12 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %3)
%13 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0), i32* %1)
%14 = load i32, i32* %1
%15 = icmp slt i32 %14, 1
br i1 %15, label %26, label %16
16: ; preds = %0, %16
%17 = phi i64 [ %22, %16 ], [ 1, %0 ]
%18 = getelementptr inbounds [999 x float], [999 x float]* %4, i64 0, i64 %17
%19 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %18)
%20 = getelementptr inbounds [999 x float], [999 x float]* %5, i64 0, i64 %17
%21 = call i32 (i8*, ...) @scanf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), float* %20)
%22 = add nuw nsw i64 %17, 1
%23 = load i32, i32* %1
%24 = sext i32 %23 to i64
%25 = icmp slt i64 %17, %24
br i1 %25, label %16, label %26
26: ; preds = %16, %0
%27 = phi i32 [ %14, %0 ], [ %23, %16 ]
%28 = load float, float* %2
%29 = load float, float* %3
%30 = getelementptr inbounds [999 x float], [999 x float]* %4, i64 0, i64 0
%31 = getelementptr inbounds [999 x float], [999 x float]* %5, i64 0, i64 0
%32 = call i32 @PacManEats(i32 %27, float %28, float %29, float* %30, float* %31)
ret i32 0
}