#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 */
unsigned int INT_MAX;
int /*<<< orphan*/ gdImageArc(int /*<<< orphan*/, unsigned int, unsigned int,
                              unsigned int, unsigned int, unsigned int,
                              unsigned int, int /*<<< orphan*/);
int /*<<< orphan*/ getGdoImg(struct ADrawTag *);
int /*<<< orphan*/ getGdoPen(struct ADrawTag *);
void gdoArc(struct ADrawTag *ctx, unsigned int cx, unsigned int cy,
            unsigned int w, unsigned int h, unsigned int s, unsigned int e) {
  if (cx <= INT_MAX && cy <= INT_MAX) {
    gdImageArc(getGdoImg(ctx), cx, cy, w, h, s, e, getGdoPen(ctx));
  }
}


x86 assembly (clang, -O0):
<gdoArc>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
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    -0xc(%rbp),%eax
mov    0x2e8e(%rip),%rcx
cmp    (%rcx),%eax
ja     11d2 <gdoArc+0xa2>
mov    -0x10(%rbp),%eax
mov    0x2e7c(%rip),%rcx
cmp    (%rcx),%eax
ja     11d2 <gdoArc+0xa2>
mov    -0x8(%rbp),%rdi
call   1050 <getGdoImg@plt>
mov    %eax,-0x38(%rbp)
mov    -0xc(%rbp),%eax
mov    %eax,-0x34(%rbp)
mov    -0x10(%rbp),%eax
mov    %eax,-0x30(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x28(%rbp)
mov    -0x1c(%rbp),%eax
mov    %eax,-0x24(%rbp)
mov    0x10(%rbp),%eax
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getGdoPen@plt>
mov    -0x38(%rbp),%edi
mov    -0x34(%rbp),%esi
mov    -0x30(%rbp),%edx
mov    -0x2c(%rbp),%ecx
mov    -0x28(%rbp),%r8d
mov    -0x24(%rbp),%r9d
mov    -0x20(%rbp),%r10d
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
call   1030 <gdImageArc@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gdoArc>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2ea6(%rip),%rax
mov    (%rax),%eax
cmp    %esi,%eax
jb     1193 <gdoArc+0x63>
mov    %edx,%r13d
cmp    %edx,%eax
jb     1193 <gdoArc+0x63>
mov    %r8d,%r15d
mov    %ecx,%r12d
mov    %esi,%ebx
mov    %rdi,%rbp
mov    %r9d,0x4(%rsp)
call   1050 <getGdoImg@plt>
mov    %eax,%r14d
mov    %rbp,%rdi
call   1040 <getGdoPen@plt>
mov    %r14d,%edi
mov    %ebx,%esi
mov    %r13d,%edx
mov    %r12d,%ecx
mov    %r15d,%r8d
mov    0x4(%rsp),%r9d
push   %rax
mov    0x48(%rsp),%eax
push   %rax
call   1030 <gdImageArc@plt>
add    $0x18,%rsp
jmp    1197 <gdoArc+0x67>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.ADrawTag = type { i32 }
@INT_MAX = global i32 0
define void @gdoArc(%struct.ADrawTag* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = alloca %struct.ADrawTag*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
store %struct.ADrawTag* %0, %struct.ADrawTag** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i32 %5, i32* %13
store i32 %6, i32* %14
%15 = load i32, i32* %9
%16 = load i32, i32* @INT_MAX
%17 = icmp ule i32 %15, %16
br i1 %17, label %18, label %34
18: ; preds = %7
%19 = load i32, i32* %10
%20 = load i32, i32* @INT_MAX
%21 = icmp ule i32 %19, %20
br i1 %21, label %22, label %34
22: ; preds = %18
%23 = load %struct.ADrawTag*, %struct.ADrawTag** %8
%24 = call i32 @getGdoImg(%struct.ADrawTag* %23)
%25 = load i32, i32* %9
%26 = load i32, i32* %10
%27 = load i32, i32* %11
%28 = load i32, i32* %12
%29 = load i32, i32* %13
%30 = load i32, i32* %14
%31 = load %struct.ADrawTag*, %struct.ADrawTag** %8
%32 = call i32 @getGdoPen(%struct.ADrawTag* %31)
%33 = call i32 @gdImageArc(i32 %24, i32 %25, i32 %26, i32 %27, i32 %28, i32 %29, i32 %30, i32 %32)
br label %34
34: ; preds = %22, %18, %7
ret void
}

LLVM IR (-O2):
%struct.ADrawTag = type { i32 }
@INT_MAX = global i32 0
define void @gdoArc(%struct.ADrawTag* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = load i32, i32* @INT_MAX
%9 = icmp ult i32 %8, %1
%10 = icmp ult i32 %8, %2
%11 = or i1 %9, %10
br i1 %11, label %16, label %12
12: ; preds = %7
%13 = tail call i32 @getGdoImg(%struct.ADrawTag* %0)
%14 = tail call i32 @getGdoPen(%struct.ADrawTag* %0)
%15 = tail call i32 @gdImageArc(i32 %13, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6, i32 %14)
br label %16
16: ; preds = %12, %7
ret void
}