#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*/ fprintf(int /*<<< orphan*/, char *, char *, unsigned int,
                           unsigned int, unsigned int, unsigned int,
                           unsigned int, unsigned int);
int /*<<< orphan*/ getSvgFile(struct ADrawTag *);
char *getSvgPen(struct ADrawTag *);
void SvgFilledTriangle(struct ADrawTag *ctx, unsigned int x1, unsigned int y1,
                       unsigned int x2, unsigned int y2, unsigned int x3,
                       unsigned int y3) {
  fprintf(getSvgFile(ctx),
          "<polygon fill=\"%s\" points=\"%u,%u %u,%u %u,%u\"/>\n",
          getSvgPen(ctx), x1, y1, x2, y2, x3, y3);
}


x86 assembly (clang, -O0):
<SvgFilledTriangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%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    -0x8(%rbp),%rdi
call   1030 <getSvgFile@plt>
mov    %eax,-0x20(%rbp)
mov    -0x8(%rbp),%rdi
call   1040 <getSvgPen@plt>
mov    -0x20(%rbp),%edi
mov    %rax,%rdx
mov    -0xc(%rbp),%ecx
mov    -0x10(%rbp),%r8d
mov    -0x14(%rbp),%r9d
mov    -0x18(%rbp),%r11d
mov    -0x1c(%rbp),%r10d
mov    0x10(%rbp),%eax
lea    0xe78(%rip),%rsi
mov    %r11d,(%rsp)
mov    %r10d,0x8(%rsp)
mov    %eax,0x10(%rsp)
call   1050 <fprintf@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<SvgFilledTriangle>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9d,%r15d
mov    %r8,(%rsp)
mov    %ecx,%r12d
mov    %edx,%r13d
mov    %esi,%ebp
mov    %rdi,%rbx
call   1030 <getSvgFile@plt>
mov    %eax,%r14d
mov    %rbx,%rdi
call   1040 <getSvgPen@plt>
sub    $0x8,%rsp
lea    0xe98(%rip),%rsi
mov    %r14d,%edi
mov    %rax,%rdx
mov    %ebp,%ecx
mov    %r13d,%r8d
mov    %r12d,%r9d
mov    0x48(%rsp),%eax
push   %rax
push   %r15
push   0x18(%rsp)
call   1050 <fprintf@plt>
add    $0x28,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
%struct.ADrawTag = type { i32 }
@.str = [49 x i8] c"<polygon fill=\22%s\22 points=\22%u,%u %u,%u %u,%u\22/>\0A\00"
define void @SvgFilledTriangle(%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 %struct.ADrawTag*, %struct.ADrawTag** %8
%16 = call i32 @getSvgFile(%struct.ADrawTag* %15)
%17 = load %struct.ADrawTag*, %struct.ADrawTag** %8
%18 = call i8* @getSvgPen(%struct.ADrawTag* %17)
%19 = load i32, i32* %9
%20 = load i32, i32* %10
%21 = load i32, i32* %11
%22 = load i32, i32* %12
%23 = load i32, i32* %13
%24 = load i32, i32* %14
%25 = call i32 @fprintf(i32 %16, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %18, i32 %19, i32 %20, i32 %21, i32 %22, i32 %23, i32 %24)
ret void
}

LLVM IR (-O2):
%struct.ADrawTag = type { i32 }
@.str = [49 x i8] c"<polygon fill=\22%s\22 points=\22%u,%u %u,%u %u,%u\22/>\0A\00"
define void @SvgFilledTriangle(%struct.ADrawTag* %0, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6) {
%8 = tail call i32 @getSvgFile(%struct.ADrawTag* %0)
%9 = tail call i8* @getSvgPen(%struct.ADrawTag* %0)
%10 = tail call i32 @fprintf(i32 %8, i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str, i64 0, i64 0), i8* %9, i32 %1, i32 %2, i32 %3, i32 %4, i32 %5, i32 %6)
ret void
}