#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 */
struct ADrawTag {
  int dummy;
};

/* Variables and functions */
int /*<<< orphan*/ gdImageFilledEllipse(int /*<<< orphan*/, unsigned int,
                                        unsigned int, unsigned int,
                                        unsigned int, int);
int /*<<< orphan*/ gdImageSetAntiAliased(int /*<<< orphan*/,
                                         int /*<<< orphan*/);
int /*<<< orphan*/ getGdoImg(struct ADrawTag *);
int /*<<< orphan*/ getGdoPen(struct ADrawTag *);
void gdoFilledCircle(struct ADrawTag *ctx, unsigned int x, unsigned int y,
                     unsigned int r) {
  gdImageSetAntiAliased(getGdoImg(ctx), getGdoPen(ctx));
  gdImageFilledEllipse(getGdoImg(ctx), x, y, r * 2, r * 2, (-7));
}


x86 assembly (clang, -O0):
<gdoFilledCircle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    -0x8(%rbp),%rdi
call   1060 <getGdoImg@plt>
mov    %eax,-0x18(%rbp)
mov    -0x8(%rbp),%rdi
call   1050 <getGdoPen@plt>
mov    -0x18(%rbp),%edi
mov    %eax,%esi
call   1030 <gdImageSetAntiAliased@plt>
mov    -0x8(%rbp),%rdi
call   1060 <getGdoImg@plt>
mov    %eax,%edi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
shl    $0x1,%ecx
mov    -0x14(%rbp),%r8d
shl    $0x1,%r8d
mov    $0xfffffff9,%r9d
call   1040 <gdImageFilledEllipse@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdoFilledCircle>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %ecx,%ebx
mov    %edx,%r14d
mov    %esi,%r15d
mov    %rdi,%rbp
call   1060 <getGdoImg@plt>
mov    %eax,%r12d
mov    %rbp,%rdi
call   1050 <getGdoPen@plt>
mov    %r12d,%edi
mov    %eax,%esi
call   1030 <gdImageSetAntiAliased@plt>
mov    %rbp,%rdi
call   1060 <getGdoImg@plt>
add    %ebx,%ebx
mov    %eax,%edi
mov    %r15d,%esi
mov    %r14d,%edx
mov    %ebx,%ecx
mov    %ebx,%r8d
mov    $0xfffffff9,%r9d
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <gdImageFilledEllipse@plt>

LLVM IR (-O0):
%struct.ADrawTag = type { i32 }
define void @gdoFilledCircle(%struct.ADrawTag* %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca %struct.ADrawTag*
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store %struct.ADrawTag* %0, %struct.ADrawTag** %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = load %struct.ADrawTag*, %struct.ADrawTag** %5
%10 = call i32 @getGdoImg(%struct.ADrawTag* %9)
%11 = load %struct.ADrawTag*, %struct.ADrawTag** %5
%12 = call i32 @getGdoPen(%struct.ADrawTag* %11)
%13 = call i32 @gdImageSetAntiAliased(i32 %10, i32 %12)
%14 = load %struct.ADrawTag*, %struct.ADrawTag** %5
%15 = call i32 @getGdoImg(%struct.ADrawTag* %14)
%16 = load i32, i32* %6
%17 = load i32, i32* %7
%18 = load i32, i32* %8
%19 = mul i32 %18, 2
%20 = load i32, i32* %8
%21 = mul i32 %20, 2
%22 = call i32 @gdImageFilledEllipse(i32 %15, i32 %16, i32 %17, i32 %19, i32 %21, i32 -7)
ret void
}

LLVM IR (-O2):
%struct.ADrawTag = type { i32 }
define void @gdoFilledCircle(%struct.ADrawTag* %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @getGdoImg(%struct.ADrawTag* %0)
%6 = tail call i32 @getGdoPen(%struct.ADrawTag* %0)
%7 = tail call i32 @gdImageSetAntiAliased(i32 %5, i32 %6)
%8 = tail call i32 @getGdoImg(%struct.ADrawTag* %0)
%9 = shl i32 %3, 1
%10 = tail call i32 @gdImageFilledEllipse(i32 %8, i32 %1, i32 %2, i32 %9, i32 %9, i32 -7)
ret void
}