#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 */
typedef struct TYPE_3__ TYPE_1__;

/* Type definitions */
struct TYPE_3__ {
  char *member_0;
  int member_1;
  int member_2;
  int /*<<< orphan*/ member_3;
};
typedef TYPE_1__ XTextItem;
typedef int /*<<< orphan*/ Window;
typedef int /*<<< orphan*/ GC;
typedef int /*<<< orphan*/ Display;

/* Variables and functions */
int /*<<< orphan*/ None;
int /*<<< orphan*/ XDrawArc(int /*<<< orphan*/ *, int /*<<< orphan*/,
                            int /*<<< orphan*/, int, int, int, int,
                            int /*<<< orphan*/, int);
int /*<<< orphan*/ XDrawLine(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/, int, int, int, int);
int /*<<< orphan*/ XDrawText(int /*<<< orphan*/ *, int /*<<< orphan*/,
                             int /*<<< orphan*/, int, int, TYPE_1__ *, int);
int /*<<< orphan*/ XSetForeground(int /*<<< orphan*/ *, int /*<<< orphan*/,
                                  int);
void DrawAim(Display *dpy, Window w, GC gc, int x, int y, char c, int color) {
  XTextItem text = {&c, 1, 5, None};
  XSetForeground(dpy, gc, color);
  XDrawArc(dpy, w, gc, x - 40 / 2, y - 40 / 2, 40, 40, 0, 23040);
  XDrawLine(dpy, w, gc, x - 40 / 2 - 10, y, x + 40 / 2 + 10, y);
  XDrawLine(dpy, w, gc, x, y - 40 / 2 - 10, x, y + 40 / 2 + 10);
  XDrawText(dpy, w, gc, x, y - 4, &text, 1);
}


x86 assembly (clang, -O0):
<DrawAim>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %r9b,%al
mov    0x10(%rbp),%r9d
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    %ecx,-0x14(%rbp)
mov    %r8d,-0x18(%rbp)
mov    %al,-0x19(%rbp)
lea    -0x19(%rbp),%rax
mov    %rax,-0x38(%rbp)
movl   $0x1,-0x30(%rbp)
movl   $0x5,-0x2c(%rbp)
mov    0x2e68(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x28(%rbp)
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%esi
mov    0x10(%rbp),%edx
call   1050 <XSetForeground@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
sub    $0x14,%ecx
mov    -0x18(%rbp),%r8d
sub    $0x14,%r8d
mov    $0x28,%r9d
xor    %eax,%eax
movl   $0x28,(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x5a00,0x10(%rsp)
call   1030 <XDrawArc@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
sub    $0x14,%ecx
sub    $0xa,%ecx
mov    -0x18(%rbp),%r8d
mov    -0x14(%rbp),%r9d
add    $0x14,%r9d
add    $0xa,%r9d
mov    -0x18(%rbp),%eax
mov    %eax,(%rsp)
call   1060 <XDrawLine@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
sub    $0x14,%r8d
sub    $0xa,%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%eax
add    $0x14,%eax
add    $0xa,%eax
mov    %eax,(%rsp)
call   1060 <XDrawLine@plt>
mov    -0x8(%rbp),%rdi
mov    -0xc(%rbp),%esi
mov    -0x10(%rbp),%edx
mov    -0x14(%rbp),%ecx
mov    -0x18(%rbp),%r8d
sub    $0x4,%r8d
lea    -0x38(%rbp),%r9
movl   $0x1,(%rsp)
call   1040 <XDrawText@plt>
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<DrawAim>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x40,%rsp
mov    %r8d,%ebx
mov    %ecx,%r14d
mov    %edx,%r12d
mov    %esi,%r15d
mov    %rdi,%rbp
mov    0x70(%rsp),%edx
mov    %r9b,0x27(%rsp)
lea    0x27(%rsp),%rax
mov    %rax,0x28(%rsp)
movabs $0x500000001,%rax
mov    %rax,0x30(%rsp)
mov    0x2e64(%rip),%rax
mov    (%rax),%eax
mov    %eax,0x38(%rsp)
mov    %r12d,%esi
call   1050 <XSetForeground@plt>
lea    -0x14(%r14),%ecx
lea    -0x14(%rbx),%r8d
movl   $0x5a00,0x10(%rsp)
movl   $0x0,0x8(%rsp)
movl   $0x28,(%rsp)
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
mov    $0x28,%r9d
call   1030 <XDrawArc@plt>
lea    -0x1e(%r14),%ecx
lea    0x1e(%r14),%r9d
mov    %ebx,(%rsp)
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %ebx,%r8d
call   1060 <XDrawLine@plt>
lea    -0x1e(%rbx),%r8d
lea    0x1e(%rbx),%eax
mov    %eax,(%rsp)
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %r14d,%ecx
mov    %r14d,%r9d
call   1060 <XDrawLine@plt>
add    $0xfffffffc,%ebx
movl   $0x1,(%rsp)
lea    0x28(%rsp),%r9
mov    %rbp,%rdi
mov    %r15d,%esi
mov    %r12d,%edx
mov    %r14d,%ecx
mov    %ebx,%r8d
call   1040 <XDrawText@plt>
add    $0x40,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.TYPE_3__ = type { i8*, i32, i32, i32 }
@None = global i32 0
define void @DrawAim(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i8 signext %5, i32 %6) {
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8
%14 = alloca i32
%15 = alloca %struct.TYPE_3__
store i32* %0, i32** %8
store i32 %1, i32* %9
store i32 %2, i32* %10
store i32 %3, i32* %11
store i32 %4, i32* %12
store i8 %5, i8* %13
store i32 %6, i32* %14
%16 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %15, i32 0, i32 0
store i8* %13, i8** %16
%17 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %15, i32 0, i32 1
store i32 1, i32* %17
%18 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %15, i32 0, i32 2
store i32 5, i32* %18
%19 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %15, i32 0, i32 3
%20 = load i32, i32* @None
store i32 %20, i32* %19
%21 = load i32*, i32** %8
%22 = load i32, i32* %10
%23 = load i32, i32* %14
%24 = call i32 @XSetForeground(i32* %21, i32 %22, i32 %23)
%25 = load i32*, i32** %8
%26 = load i32, i32* %9
%27 = load i32, i32* %10
%28 = load i32, i32* %11
%29 = sub nsw i32 %28, 20
%30 = load i32, i32* %12
%31 = sub nsw i32 %30, 20
%32 = call i32 @XDrawArc(i32* %25, i32 %26, i32 %27, i32 %29, i32 %31, i32 40, i32 40, i32 0, i32 23040)
%33 = load i32*, i32** %8
%34 = load i32, i32* %9
%35 = load i32, i32* %10
%36 = load i32, i32* %11
%37 = sub nsw i32 %36, 20
%38 = sub nsw i32 %37, 10
%39 = load i32, i32* %12
%40 = load i32, i32* %11
%41 = add nsw i32 %40, 20
%42 = add nsw i32 %41, 10
%43 = load i32, i32* %12
%44 = call i32 @XDrawLine(i32* %33, i32 %34, i32 %35, i32 %38, i32 %39, i32 %42, i32 %43)
%45 = load i32*, i32** %8
%46 = load i32, i32* %9
%47 = load i32, i32* %10
%48 = load i32, i32* %11
%49 = load i32, i32* %12
%50 = sub nsw i32 %49, 20
%51 = sub nsw i32 %50, 10
%52 = load i32, i32* %11
%53 = load i32, i32* %12
%54 = add nsw i32 %53, 20
%55 = add nsw i32 %54, 10
%56 = call i32 @XDrawLine(i32* %45, i32 %46, i32 %47, i32 %48, i32 %51, i32 %52, i32 %55)
%57 = load i32*, i32** %8
%58 = load i32, i32* %9
%59 = load i32, i32* %10
%60 = load i32, i32* %11
%61 = load i32, i32* %12
%62 = sub nsw i32 %61, 4
%63 = call i32 @XDrawText(i32* %57, i32 %58, i32 %59, i32 %60, i32 %62, %struct.TYPE_3__* %15, i32 1)
ret void
}

LLVM IR (-O2):
%struct.TYPE_3__ = type { i8*, i32, i32, i32 }
@None = global i32 0
define void @DrawAim(i32* %0, i32 %1, i32 %2, i32 %3, i32 %4, i8 signext %5, i32 %6) {
%8 = alloca i8
%9 = alloca %struct.TYPE_3__
store i8 %5, i8* %8
%10 = bitcast %struct.TYPE_3__* %9 to i8*
%11 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i64 0, i32 0
store i8* %8, i8** %11
%12 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i64 0, i32 1
store i32 1, i32* %12
%13 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i64 0, i32 2
store i32 5, i32* %13
%14 = getelementptr inbounds %struct.TYPE_3__, %struct.TYPE_3__* %9, i64 0, i32 3
%15 = load i32, i32* @None
store i32 %15, i32* %14
%16 = call i32 @XSetForeground(i32* %0, i32 %2, i32 %6)
%17 = add nsw i32 %3, -20
%18 = add nsw i32 %4, -20
%19 = call i32 @XDrawArc(i32* %0, i32 %1, i32 %2, i32 %17, i32 %18, i32 40, i32 40, i32 0, i32 23040)
%20 = add nsw i32 %3, -30
%21 = add nsw i32 %3, 30
%22 = call i32 @XDrawLine(i32* %0, i32 %1, i32 %2, i32 %20, i32 %4, i32 %21, i32 %4)
%23 = add nsw i32 %4, -30
%24 = add nsw i32 %4, 30
%25 = call i32 @XDrawLine(i32* %0, i32 %1, i32 %2, i32 %3, i32 %23, i32 %3, i32 %24)
%26 = add nsw i32 %4, -4
%27 = call i32 @XDrawText(i32* %0, i32 %1, i32 %2, i32 %3, i32 %26, %struct.TYPE_3__* %9, i32 1)
ret void
}