#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*/ pixelInt(int, int);
void paintSurroundingPixels(int xCenter, int yCenter) {
  int j;
  int k;
  for (j = -1; j < 2; j++) {
    for (k = -1; k < 2; k++) {
      pixelInt(xCenter + j, yCenter + k);
    }
  }
}


x86 assembly (clang, -O0):
<paintSurroundingPixels>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
movl   $0xffffffff,-0xc(%rbp)
cmpl   $0x2,-0xc(%rbp)
jge    1172 <paintSurroundingPixels+0x62>
movl   $0xffffffff,-0x10(%rbp)
cmpl   $0x2,-0x10(%rbp)
jge    115f <paintSurroundingPixels+0x4f>
mov    -0x4(%rbp),%edi
add    -0xc(%rbp),%edi
mov    -0x8(%rbp),%esi
add    -0x10(%rbp),%esi
call   1030 <pixelInt@plt>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    1136 <paintSurroundingPixels+0x26>
jmp    1164 <paintSurroundingPixels+0x54>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    1125 <paintSurroundingPixels+0x15>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<paintSurroundingPixels>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %esi,%r14d
mov    %edi,%ebx
lea    -0x1(%r14),%r15d
lea    -0x1(%rbx),%ebp
mov    %ebp,%edi
mov    %r15d,%esi
call   1030 <pixelInt@plt>
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <pixelInt@plt>
lea    0x1(%r14),%r12d
mov    %ebp,%edi
mov    %r12d,%esi
call   1030 <pixelInt@plt>
mov    %ebx,%edi
mov    %r15d,%esi
call   1030 <pixelInt@plt>
mov    %ebx,%edi
mov    %r14d,%esi
call   1030 <pixelInt@plt>
mov    %ebx,%edi
mov    %r12d,%esi
call   1030 <pixelInt@plt>
add    $0x1,%ebx
mov    %ebx,%edi
mov    %r15d,%esi
call   1030 <pixelInt@plt>
mov    %ebx,%edi
mov    %r14d,%esi
call   1030 <pixelInt@plt>
mov    %ebx,%edi
mov    %r12d,%esi
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <pixelInt@plt>

LLVM IR (-O0):
define void @paintSurroundingPixels(i32 %0, i32 %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %3
store i32 %1, i32* %4
store i32 -1, i32* %5
br label %7
7: ; preds = %26, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 2
br i1 %9, label %10, label %29
10: ; preds = %7
store i32 -1, i32* %6
br label %11
11: ; preds = %22, %10
%12 = load i32, i32* %6
%13 = icmp slt i32 %12, 2
br i1 %13, label %14, label %25
14: ; preds = %11
%15 = load i32, i32* %3
%16 = load i32, i32* %5
%17 = add nsw i32 %15, %16
%18 = load i32, i32* %4
%19 = load i32, i32* %6
%20 = add nsw i32 %18, %19
%21 = call i32 @pixelInt(i32 %17, i32 %20)
br label %22
22: ; preds = %14
%23 = load i32, i32* %6
%24 = add nsw i32 %23, 1
store i32 %24, i32* %6
br label %11
25: ; preds = %11
br label %26
26: ; preds = %25
%27 = load i32, i32* %5
%28 = add nsw i32 %27, 1
store i32 %28, i32* %5
br label %7
29: ; preds = %7
ret void
}

LLVM IR (-O2):
define void @paintSurroundingPixels(i32 %0, i32 %1) {
%3 = add nsw i32 %1, -1
%4 = add nsw i32 %0, -1
%5 = tail call i32 @pixelInt(i32 %4, i32 %3)
%6 = tail call i32 @pixelInt(i32 %4, i32 %1)
%7 = add nsw i32 %1, 1
%8 = tail call i32 @pixelInt(i32 %4, i32 %7)
%9 = tail call i32 @pixelInt(i32 %0, i32 %3)
%10 = tail call i32 @pixelInt(i32 %0, i32 %1)
%11 = tail call i32 @pixelInt(i32 %0, i32 %7)
%12 = add nsw i32 %0, 1
%13 = tail call i32 @pixelInt(i32 %12, i32 %3)
%14 = tail call i32 @pixelInt(i32 %12, i32 %1)
%15 = tail call i32 @pixelInt(i32 %12, i32 %7)
ret void
}