#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*/ sys_vgui(char *, void *, int, int, int, int, void *, char,
                            char *);
void rectangle(void *cv, void *o, char c, int x, int y, int w, int h,
               char *color) {
  sys_vgui(".x%x.c create rectangle                  %d %d %d %d -tags %x%c "
           "-fill %s\n",
           cv, x, y, x + w, y + h, o, c, color);
}


x86 assembly (clang, -O0):
<rectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %dl,%al
mov    0x18(%rbp),%rdx
mov    0x10(%rbp),%edx
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %al,-0x11(%rbp)
mov    %ecx,-0x18(%rbp)
mov    %r8d,-0x1c(%rbp)
mov    %r9d,-0x20(%rbp)
mov    -0x8(%rbp),%rsi
mov    -0x18(%rbp),%edx
mov    -0x1c(%rbp),%ecx
mov    -0x18(%rbp),%r8d
add    -0x20(%rbp),%r8d
mov    -0x1c(%rbp),%r9d
add    0x10(%rbp),%r9d
mov    -0x10(%rbp),%r11
mov    -0x11(%rbp),%r10b
mov    0x18(%rbp),%rax
lea    0xe9c(%rip),%rdi
mov    %r11,(%rsp)
movsbl %r10b,%r10d
mov    %r10d,0x8(%rsp)
mov    %rax,0x10(%rsp)
call   1030 <sys_vgui@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<rectangle>:
push   %rax
mov    %r8d,%eax
mov    %edx,%r11d
mov    %rsi,%r10
mov    %rdi,%rsi
lea    (%r9,%rcx,1),%r8d
mov    0x10(%rsp),%r9d
add    %eax,%r9d
sub    $0x8,%rsp
lea    0xecc(%rip),%rdi
mov    %ecx,%edx
mov    %eax,%ecx
push   0x20(%rsp)
push   %r11
push   %r10
call   1030 <sys_vgui@plt>
add    $0x20,%rsp
pop    %rax
ret

LLVM IR (-O0):
@.str = [74 x i8] c".x%x.c create rectangle %d %d %d %d -tags %x%c -fill %s\0A\00"
define void @rectangle(i8* %0, i8* %1, i8 signext %2, i32 %3, i32 %4, i32 %5, i32 %6, i8* %7) {
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8*
store i8* %0, i8** %9
store i8* %1, i8** %10
store i8 %2, i8* %11
store i32 %3, i32* %12
store i32 %4, i32* %13
store i32 %5, i32* %14
store i32 %6, i32* %15
store i8* %7, i8** %16
%17 = load i8*, i8** %9
%18 = load i32, i32* %12
%19 = load i32, i32* %13
%20 = load i32, i32* %12
%21 = load i32, i32* %14
%22 = add nsw i32 %20, %21
%23 = load i32, i32* %13
%24 = load i32, i32* %15
%25 = add nsw i32 %23, %24
%26 = load i8*, i8** %10
%27 = load i8, i8* %11
%28 = load i8*, i8** %16
%29 = call i32 @sys_vgui(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %17, i32 %18, i32 %19, i32 %22, i32 %25, i8* %26, i8 signext %27, i8* %28)
ret void
}

LLVM IR (-O2):
@.str = [74 x i8] c".x%x.c create rectangle %d %d %d %d -tags %x%c -fill %s\0A\00"
define void @rectangle(i8* %0, i8* %1, i8 signext %2, i32 %3, i32 %4, i32 %5, i32 %6, i8* %7) {
%9 = add nsw i32 %5, %3
%10 = add nsw i32 %6, %4
%11 = tail call i32 @sys_vgui(i8* getelementptr inbounds ([74 x i8], [74 x i8]* @.str, i64 0, i64 0), i8* %0, i32 %3, i32 %4, i32 %9, i32 %10, i8* %1, i8 signext %2, i8* %7)
ret void
}