#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*/ md_draw_line_red(int, int, int, int, int);
void plot_active_point(int x, int y) {
  md_draw_line_red(x - 4, y - 4, x - 4, y + 4, 1);
  md_draw_line_red(x - 4, y + 4, x + 4, y + 4, 1);
  md_draw_line_red(x + 4, y + 4, x + 4, y - 4, 1);
  md_draw_line_red(x + 4, y - 4, x - 4, y - 4, 1);
}


x86 assembly (clang, -O0):
<plot_active_point>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    -0x4(%rbp),%edi
sub    $0x4,%edi
mov    -0x8(%rbp),%esi
sub    $0x4,%esi
mov    -0x4(%rbp),%edx
sub    $0x4,%edx
mov    -0x8(%rbp),%ecx
add    $0x4,%ecx
mov    $0x1,%r8d
call   1030 <md_draw_line_red@plt>
mov    -0x4(%rbp),%edi
sub    $0x4,%edi
mov    -0x8(%rbp),%esi
add    $0x4,%esi
mov    -0x4(%rbp),%edx
add    $0x4,%edx
mov    -0x8(%rbp),%ecx
add    $0x4,%ecx
mov    $0x1,%r8d
call   1030 <md_draw_line_red@plt>
mov    -0x4(%rbp),%edi
add    $0x4,%edi
mov    -0x8(%rbp),%esi
add    $0x4,%esi
mov    -0x4(%rbp),%edx
add    $0x4,%edx
mov    -0x8(%rbp),%ecx
sub    $0x4,%ecx
mov    $0x1,%r8d
call   1030 <md_draw_line_red@plt>
mov    -0x4(%rbp),%edi
add    $0x4,%edi
mov    -0x8(%rbp),%esi
sub    $0x4,%esi
mov    -0x4(%rbp),%edx
sub    $0x4,%edx
mov    -0x8(%rbp),%ecx
sub    $0x4,%ecx
mov    $0x1,%r8d
call   1030 <md_draw_line_red@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<plot_active_point>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %esi,%ebp
mov    %edi,%ebx
lea    -0x4(%rbx),%r14d
lea    -0x4(%rbp),%r15d
add    $0x4,%ebp
mov    %r14d,%edi
mov    %r15d,%esi
mov    %r14d,%edx
mov    %ebp,%ecx
mov    $0x1,%r8d
call   1030 <md_draw_line_red@plt>
add    $0x4,%ebx
mov    %r14d,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %ebp,%ecx
mov    $0x1,%r8d
call   1030 <md_draw_line_red@plt>
mov    %ebx,%edi
mov    %ebp,%esi
mov    %ebx,%edx
mov    %r15d,%ecx
mov    $0x1,%r8d
call   1030 <md_draw_line_red@plt>
mov    %ebx,%edi
mov    %r15d,%esi
mov    %r14d,%edx
mov    %r15d,%ecx
mov    $0x1,%r8d
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <md_draw_line_red@plt>

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

LLVM IR (-O2):
define void @plot_active_point(i32 %0, i32 %1) {
%3 = add nsw i32 %0, -4
%4 = add nsw i32 %1, -4
%5 = add nsw i32 %1, 4
%6 = tail call i32 @md_draw_line_red(i32 %3, i32 %4, i32 %3, i32 %5, i32 1)
%7 = add nsw i32 %0, 4
%8 = tail call i32 @md_draw_line_red(i32 %3, i32 %5, i32 %7, i32 %5, i32 1)
%9 = tail call i32 @md_draw_line_red(i32 %7, i32 %5, i32 %7, i32 %4, i32 1)
%10 = tail call i32 @md_draw_line_red(i32 %7, i32 %4, i32 %3, i32 %4, i32 1)
ret void
}