#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*/ pfan_draw_point(int, int, unsigned short *);
void Test_square(unsigned short display[156]) {
  pfan_draw_point(0, 0, display);
  pfan_draw_point(1, 0, display);
  pfan_draw_point(2, 0, display);
  pfan_draw_point(3, 0, display);
  pfan_draw_point(4, 0, display);
  pfan_draw_point(0, 4, display);
  pfan_draw_point(1, 4, display);
  pfan_draw_point(2, 4, display);
  pfan_draw_point(3, 4, display);
  pfan_draw_point(4, 4, display);
  pfan_draw_point(0, 0, display);
  pfan_draw_point(0, 1, display);
  pfan_draw_point(0, 2, display);
  pfan_draw_point(0, 3, display);
  pfan_draw_point(0, 4, display);
  pfan_draw_point(4, 0, display);
  pfan_draw_point(4, 1, display);
  pfan_draw_point(4, 2, display);
  pfan_draw_point(4, 3, display);
  pfan_draw_point(4, 4, display);
}


x86 assembly (clang, -O0):
<Test_square>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
mov    %esi,%edi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
xor    %esi,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x2,%edi
xor    %esi,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x3,%edi
xor    %esi,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
mov    $0x4,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x1,%edi
mov    $0x4,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x2,%edi
mov    $0x4,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x3,%edi
mov    $0x4,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x4,%esi
mov    %esi,%edi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
xor    %esi,%esi
mov    %esi,%edi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
mov    $0x1,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
mov    $0x2,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
mov    $0x3,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
xor    %edi,%edi
mov    $0x4,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x4,%edi
xor    %esi,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x4,%edi
mov    $0x1,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x4,%edi
mov    $0x2,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x4,%edi
mov    $0x3,%esi
call   1030 <pfan_draw_point@plt>
mov    -0x8(%rbp),%rdx
mov    $0x4,%esi
mov    %esi,%edi
call   1030 <pfan_draw_point@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<Test_square>:
push   %rbx
mov    %rdi,%rbx
xor    %edi,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x1,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x2,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x3,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x4,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x1,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x2,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x3,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x4,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
xor    %edi,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
xor    %edi,%edi
mov    $0x1,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
xor    %edi,%edi
mov    $0x2,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
xor    %edi,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
xor    %edi,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x4,%edi
xor    %esi,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x4,%edi
mov    $0x1,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x4,%edi
mov    $0x2,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x4,%edi
mov    $0x3,%esi
mov    %rbx,%rdx
call   1030 <pfan_draw_point@plt>
mov    $0x4,%edi
mov    $0x4,%esi
mov    %rbx,%rdx
pop    %rbx
jmp    1030 <pfan_draw_point@plt>

LLVM IR (-O0):
define void @Test_square(i16* %0) {
%2 = alloca i16*
store i16* %0, i16** %2
%3 = load i16*, i16** %2
%4 = call i32 @pfan_draw_point(i32 0, i32 0, i16* %3)
%5 = load i16*, i16** %2
%6 = call i32 @pfan_draw_point(i32 1, i32 0, i16* %5)
%7 = load i16*, i16** %2
%8 = call i32 @pfan_draw_point(i32 2, i32 0, i16* %7)
%9 = load i16*, i16** %2
%10 = call i32 @pfan_draw_point(i32 3, i32 0, i16* %9)
%11 = load i16*, i16** %2
%12 = call i32 @pfan_draw_point(i32 4, i32 0, i16* %11)
%13 = load i16*, i16** %2
%14 = call i32 @pfan_draw_point(i32 0, i32 4, i16* %13)
%15 = load i16*, i16** %2
%16 = call i32 @pfan_draw_point(i32 1, i32 4, i16* %15)
%17 = load i16*, i16** %2
%18 = call i32 @pfan_draw_point(i32 2, i32 4, i16* %17)
%19 = load i16*, i16** %2
%20 = call i32 @pfan_draw_point(i32 3, i32 4, i16* %19)
%21 = load i16*, i16** %2
%22 = call i32 @pfan_draw_point(i32 4, i32 4, i16* %21)
%23 = load i16*, i16** %2
%24 = call i32 @pfan_draw_point(i32 0, i32 0, i16* %23)
%25 = load i16*, i16** %2
%26 = call i32 @pfan_draw_point(i32 0, i32 1, i16* %25)
%27 = load i16*, i16** %2
%28 = call i32 @pfan_draw_point(i32 0, i32 2, i16* %27)
%29 = load i16*, i16** %2
%30 = call i32 @pfan_draw_point(i32 0, i32 3, i16* %29)
%31 = load i16*, i16** %2
%32 = call i32 @pfan_draw_point(i32 0, i32 4, i16* %31)
%33 = load i16*, i16** %2
%34 = call i32 @pfan_draw_point(i32 4, i32 0, i16* %33)
%35 = load i16*, i16** %2
%36 = call i32 @pfan_draw_point(i32 4, i32 1, i16* %35)
%37 = load i16*, i16** %2
%38 = call i32 @pfan_draw_point(i32 4, i32 2, i16* %37)
%39 = load i16*, i16** %2
%40 = call i32 @pfan_draw_point(i32 4, i32 3, i16* %39)
%41 = load i16*, i16** %2
%42 = call i32 @pfan_draw_point(i32 4, i32 4, i16* %41)
ret void
}

LLVM IR (-O2):
define void @Test_square(i16* %0) {
%2 = tail call i32 @pfan_draw_point(i32 0, i32 0, i16* %0)
%3 = tail call i32 @pfan_draw_point(i32 1, i32 0, i16* %0)
%4 = tail call i32 @pfan_draw_point(i32 2, i32 0, i16* %0)
%5 = tail call i32 @pfan_draw_point(i32 3, i32 0, i16* %0)
%6 = tail call i32 @pfan_draw_point(i32 4, i32 0, i16* %0)
%7 = tail call i32 @pfan_draw_point(i32 0, i32 4, i16* %0)
%8 = tail call i32 @pfan_draw_point(i32 1, i32 4, i16* %0)
%9 = tail call i32 @pfan_draw_point(i32 2, i32 4, i16* %0)
%10 = tail call i32 @pfan_draw_point(i32 3, i32 4, i16* %0)
%11 = tail call i32 @pfan_draw_point(i32 4, i32 4, i16* %0)
%12 = tail call i32 @pfan_draw_point(i32 0, i32 0, i16* %0)
%13 = tail call i32 @pfan_draw_point(i32 0, i32 1, i16* %0)
%14 = tail call i32 @pfan_draw_point(i32 0, i32 2, i16* %0)
%15 = tail call i32 @pfan_draw_point(i32 0, i32 3, i16* %0)
%16 = tail call i32 @pfan_draw_point(i32 0, i32 4, i16* %0)
%17 = tail call i32 @pfan_draw_point(i32 4, i32 0, i16* %0)
%18 = tail call i32 @pfan_draw_point(i32 4, i32 1, i16* %0)
%19 = tail call i32 @pfan_draw_point(i32 4, i32 2, i16* %0)
%20 = tail call i32 @pfan_draw_point(i32 4, i32 3, i16* %0)
%21 = tail call i32 @pfan_draw_point(i32 4, i32 4, i16* %0)
ret void
}