#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*/ draw_pt(unsigned char *, int const, int const, int,
                           int const, int const);
void draw_mp_circle_lines(unsigned char *pixelbuf, const int image_width,
                          const int image_height, const int x0, const int y0,
                          const int x, const int y, const int fill) {
  int i;
  for (i = x0 - x; i <= x0 + x; i++) {
    draw_pt(pixelbuf, image_width, image_height, i, y0 + y, fill);
    draw_pt(pixelbuf, image_width, image_height, i, y0 - y, fill);
  }
  for (i = x0 - y; i <= x0 + y; i++) {
    draw_pt(pixelbuf, image_width, image_height, i, y0 + x, fill);
    draw_pt(pixelbuf, image_width, image_height, i, y0 - x, fill);
  }
}


x86 assembly (clang, -O0):
<draw_mp_circle_lines>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    0x18(%rbp),%eax
mov    0x10(%rbp),%eax
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %r9d,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
sub    -0x1c(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    -0x1c(%rbp),%ecx
cmp    %ecx,%eax
jg     1197 <draw_mp_circle_lines+0x87>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%r8d
add    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1030 <draw_pt@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%r8d
sub    0x10(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1030 <draw_pt@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    113c <draw_mp_circle_lines+0x2c>
mov    -0x14(%rbp),%eax
sub    0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x20(%rbp),%eax
mov    -0x14(%rbp),%ecx
add    0x10(%rbp),%ecx
cmp    %ecx,%eax
jg     11fb <draw_mp_circle_lines+0xeb>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%r8d
add    -0x1c(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1030 <draw_pt@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x20(%rbp),%ecx
mov    -0x18(%rbp),%r8d
sub    -0x1c(%rbp),%r8d
mov    0x18(%rbp),%r9d
call   1030 <draw_pt@plt>
mov    -0x20(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x20(%rbp)
jmp    11a0 <draw_mp_circle_lines+0x90>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_mp_circle_lines>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    %r8,0x10(%rsp)
mov    %ecx,%ebx
mov    %edx,(%rsp)
mov    %esi,%r15d
mov    %rdi,%r12
mov    %ecx,%r14d
sub    %r9d,%r14d
mov    %r9,%rax
mov    %r9,0x8(%rsp)
lea    (%r9,%rbx,1),%eax
cmp    %eax,%r14d
jg     11ae <draw_mp_circle_lines+0x9e>
mov    0x10(%rsp),%rax
mov    0x50(%rsp),%ecx
lea    (%rcx,%rax,1),%edx
mov    %edx,0x4(%rsp)
mov    %eax,%ebp
sub    %ecx,%ebp
mov    0x8(%rsp),%rax
lea    (%rax,%rax,1),%r13d
add    $0x1,%r13d
cs nopw 0x0(%rax,%rax,1)
mov    %r12,%rdi
mov    %r15d,%esi
mov    (%rsp),%edx
mov    %r14d,%ecx
mov    0x4(%rsp),%r8d
mov    0x58(%rsp),%r9d
call   1030 <draw_pt@plt>
mov    %r12,%rdi
mov    %r15d,%esi
mov    (%rsp),%edx
mov    %r14d,%ecx
mov    %ebp,%r8d
mov    0x58(%rsp),%r9d
call   1030 <draw_pt@plt>
add    $0x1,%r14d
add    $0xffffffff,%r13d
jne    1170 <draw_mp_circle_lines+0x60>
mov    0x50(%rsp),%ecx
lea    (%rcx,%rbx,1),%eax
sub    %ecx,%ebx
cmp    %eax,%ebx
mov    0x10(%rsp),%r13
jg     1218 <draw_mp_circle_lines+0x108>
mov    0x8(%rsp),%rax
lea    (%rax,%r13,1),%r14d
sub    %eax,%r13d
lea    (%rcx,%rcx,1),%ebp
add    $0x1,%ebp
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    %r12,%rdi
mov    %r15d,%esi
mov    (%rsp),%edx
mov    %ebx,%ecx
mov    %r14d,%r8d
mov    0x58(%rsp),%r9d
call   1030 <draw_pt@plt>
mov    %r12,%rdi
mov    %r15d,%esi
mov    (%rsp),%edx
mov    %ebx,%ecx
mov    %r13d,%r8d
mov    0x58(%rsp),%r9d
call   1030 <draw_pt@plt>
add    $0x1,%ebx
add    $0xffffffff,%ebp
jne    11e0 <draw_mp_circle_lines+0xd0>
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @draw_mp_circle_lines(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = alloca i8*
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i32
%17 = alloca i32
store i8* %0, i8** %9
store i32 %1, i32* %10
store i32 %2, i32* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i32 %7, i32* %16
%18 = load i32, i32* %12
%19 = load i32, i32* %14
%20 = sub nsw i32 %18, %19
store i32 %20, i32* %17
br label %21
21: ; preds = %46, %8
%22 = load i32, i32* %17
%23 = load i32, i32* %12
%24 = load i32, i32* %14
%25 = add nsw i32 %23, %24
%26 = icmp sle i32 %22, %25
br i1 %26, label %27, label %49
27: ; preds = %21
%28 = load i8*, i8** %9
%29 = load i32, i32* %10
%30 = load i32, i32* %11
%31 = load i32, i32* %17
%32 = load i32, i32* %13
%33 = load i32, i32* %15
%34 = add nsw i32 %32, %33
%35 = load i32, i32* %16
%36 = call i32 @draw_pt(i8* %28, i32 %29, i32 %30, i32 %31, i32 %34, i32 %35)
%37 = load i8*, i8** %9
%38 = load i32, i32* %10
%39 = load i32, i32* %11
%40 = load i32, i32* %17
%41 = load i32, i32* %13
%42 = load i32, i32* %15
%43 = sub nsw i32 %41, %42
%44 = load i32, i32* %16
%45 = call i32 @draw_pt(i8* %37, i32 %38, i32 %39, i32 %40, i32 %43, i32 %44)
br label %46
46: ; preds = %27
%47 = load i32, i32* %17
%48 = add nsw i32 %47, 1
store i32 %48, i32* %17
br label %21
49: ; preds = %21
%50 = load i32, i32* %12
%51 = load i32, i32* %15
%52 = sub nsw i32 %50, %51
store i32 %52, i32* %17
br label %53
53: ; preds = %78, %49
%54 = load i32, i32* %17
%55 = load i32, i32* %12
%56 = load i32, i32* %15
%57 = add nsw i32 %55, %56
%58 = icmp sle i32 %54, %57
br i1 %58, label %59, label %81
59: ; preds = %53
%60 = load i8*, i8** %9
%61 = load i32, i32* %10
%62 = load i32, i32* %11
%63 = load i32, i32* %17
%64 = load i32, i32* %13
%65 = load i32, i32* %14
%66 = add nsw i32 %64, %65
%67 = load i32, i32* %16
%68 = call i32 @draw_pt(i8* %60, i32 %61, i32 %62, i32 %63, i32 %66, i32 %67)
%69 = load i8*, i8** %9
%70 = load i32, i32* %10
%71 = load i32, i32* %11
%72 = load i32, i32* %17
%73 = load i32, i32* %13
%74 = load i32, i32* %14
%75 = sub nsw i32 %73, %74
%76 = load i32, i32* %16
%77 = call i32 @draw_pt(i8* %69, i32 %70, i32 %71, i32 %72, i32 %75, i32 %76)
br label %78
78: ; preds = %59
%79 = load i32, i32* %17
%80 = add nsw i32 %79, 1
store i32 %80, i32* %17
br label %53
81: ; preds = %53
ret void
}

LLVM IR (-O2):
define void @draw_mp_circle_lines(i8* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %7) {
%9 = sub nsw i32 %3, %5
%10 = add i32 %5, %3
%11 = icmp sgt i32 %9, %10
br i1 %11, label %21, label %12
12: ; preds = %8
%13 = add nsw i32 %6, %4
%14 = sub nsw i32 %4, %6
br label %15
15: ; preds = %12, %15
%16 = phi i32 [ %9, %12 ], [ %19, %15 ]
%17 = tail call i32 @draw_pt(i8* %0, i32 %1, i32 %2, i32 %16, i32 %13, i32 %7)
%18 = tail call i32 @draw_pt(i8* %0, i32 %1, i32 %2, i32 %16, i32 %14, i32 %7)
%19 = add i32 %16, 1
%20 = icmp eq i32 %16, %10
br i1 %20, label %21, label %15
21: ; preds = %15, %8
%22 = sub nsw i32 %3, %6
%23 = add i32 %6, %3
%24 = icmp sgt i32 %22, %23
br i1 %24, label %34, label %25
25: ; preds = %21
%26 = add nsw i32 %5, %4
%27 = sub nsw i32 %4, %5
br label %28
28: ; preds = %25, %28
%29 = phi i32 [ %22, %25 ], [ %32, %28 ]
%30 = tail call i32 @draw_pt(i8* %0, i32 %1, i32 %2, i32 %29, i32 %26, i32 %7)
%31 = tail call i32 @draw_pt(i8* %0, i32 %1, i32 %2, i32 %29, i32 %27, i32 %7)
%32 = add i32 %29, 1
%33 = icmp eq i32 %29, %23
br i1 %33, label %34, label %28
34: ; preds = %28, %21
ret void
}