#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 */
typedef int /*<<< orphan*/ int32_t;

/* Variables and functions */
int /*<<< orphan*/ drawPoly3TGD(short, short, short, short, short, short, short,
                                short, short, short, short, short,
                                int /*<<< orphan*/, int /*<<< orphan*/,
                                int /*<<< orphan*/);
void drawPoly4TGD_TRI(short x1, short y1, short x2, short y2, short x3,
                      short y3, short x4, short y4, short tx1, short ty1,
                      short tx2, short ty2, short tx3, short ty3, short tx4,
                      short ty4, int32_t col1, int32_t col2, int32_t col3,
                      int32_t col4) {
  drawPoly3TGD(x2, y2, x3, y3, x4, y4, tx2, ty2, tx3, ty3, tx4, ty4, col2, col4,
               col3);
  drawPoly3TGD(x1, y1, x2, y2, x4, y4, tx1, ty1, tx2, ty2, tx4, ty4, col1, col2,
               col3);
}


x86 assembly (clang, -O0):
<drawPoly4TGD_TRI>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r8d,-0x54(%rbp)
mov    %ecx,%eax
mov    -0x54(%rbp),%ecx
mov    %eax,-0x50(%rbp)
mov    %edx,%eax
mov    -0x50(%rbp),%edx
mov    %eax,-0x4c(%rbp)
mov    %esi,%eax
mov    -0x4c(%rbp),%esi
mov    %eax,-0x48(%rbp)
mov    %edi,%r8d
mov    -0x48(%rbp),%edi
mov    %r9w,%ax
mov    0x78(%rbp),%r9d
mov    0x70(%rbp),%r9d
mov    0x68(%rbp),%r9d
mov    0x60(%rbp),%r9d
mov    0x58(%rbp),%r9w
mov    0x50(%rbp),%r9w
mov    0x48(%rbp),%r9w
mov    0x40(%rbp),%r9w
mov    0x38(%rbp),%r9w
mov    0x30(%rbp),%r9w
mov    0x28(%rbp),%r9w
mov    0x20(%rbp),%r9w
mov    0x18(%rbp),%r9w
mov    0x10(%rbp),%r9w
mov    %r8w,-0x2a(%rbp)
mov    %di,-0x2c(%rbp)
mov    %si,-0x2e(%rbp)
mov    %dx,-0x30(%rbp)
mov    %cx,-0x32(%rbp)
mov    %ax,-0x34(%rbp)
mov    -0x2e(%rbp),%di
mov    -0x30(%rbp),%si
mov    -0x32(%rbp),%dx
mov    -0x34(%rbp),%cx
mov    0x10(%rbp),%r8w
mov    0x18(%rbp),%r9w
mov    0x30(%rbp),%ax
mov    %ax,-0x42(%rbp)
mov    0x38(%rbp),%r13w
mov    0x40(%rbp),%r12w
mov    0x48(%rbp),%r15w
mov    0x50(%rbp),%r14w
mov    0x58(%rbp),%bx
mov    0x68(%rbp),%r11d
mov    0x78(%rbp),%r10d
mov    0x70(%rbp),%eax
mov    %eax,-0x40(%rbp)
mov    -0x42(%rbp),%ax
movswl %di,%edi
movswl %si,%esi
movswl %dx,%edx
movswl %cx,%ecx
movswl %r8w,%r8d
movswl %r9w,%r9d
cwtl
mov    %eax,(%rsp)
mov    -0x40(%rbp),%eax
movswl %r13w,%r13d
mov    %r13d,0x8(%rsp)
movswl %r12w,%r12d
mov    %r12d,0x10(%rsp)
movswl %r15w,%r15d
mov    %r15d,0x18(%rsp)
movswl %r14w,%r14d
mov    %r14d,0x20(%rsp)
movswl %bx,%ebx
mov    %ebx,0x28(%rsp)
mov    %r11d,0x30(%rsp)
mov    %r10d,0x38(%rsp)
mov    %eax,0x40(%rsp)
call   1030 <drawPoly3TGD@plt>
mov    -0x2a(%rbp),%di
mov    -0x2c(%rbp),%si
mov    -0x2e(%rbp),%dx
mov    -0x30(%rbp),%cx
mov    0x10(%rbp),%r8w
mov    0x18(%rbp),%r9w
mov    0x20(%rbp),%ax
mov    %ax,-0x3a(%rbp)
mov    0x28(%rbp),%r13w
mov    0x30(%rbp),%r12w
mov    0x38(%rbp),%r15w
mov    0x50(%rbp),%r14w
mov    0x58(%rbp),%bx
mov    0x60(%rbp),%r11d
mov    0x68(%rbp),%r10d
mov    0x70(%rbp),%eax
mov    %eax,-0x38(%rbp)
mov    -0x3a(%rbp),%ax
movswl %di,%edi
movswl %si,%esi
movswl %dx,%edx
movswl %cx,%ecx
movswl %r8w,%r8d
movswl %r9w,%r9d
cwtl
mov    %eax,(%rsp)
mov    -0x38(%rbp),%eax
movswl %r13w,%r13d
mov    %r13d,0x8(%rsp)
movswl %r12w,%r12d
mov    %r12d,0x10(%rsp)
movswl %r15w,%r15d
mov    %r15d,0x18(%rsp)
movswl %r14w,%r14d
mov    %r14d,0x20(%rsp)
movswl %bx,%ebx
mov    %ebx,0x28(%rsp)
mov    %r11d,0x30(%rsp)
mov    %r10d,0x38(%rsp)
mov    %eax,0x40(%rsp)
call   1030 <drawPoly3TGD@plt>
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawPoly4TGD_TRI>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x38,%rsp
mov    %ecx,0xc(%rsp)
mov    %edx,%r13d
mov    %esi,0x14(%rsp)
mov    %edi,0x10(%rsp)
movswl 0x80(%rsp),%eax
mov    %rax,0x30(%rsp)
movswl 0x88(%rsp),%eax
mov    %rax,0x28(%rsp)
movswl 0x70(%rsp),%r15d
movswl 0x78(%rsp),%r14d
movswl 0x90(%rsp),%r11d
movswl 0x98(%rsp),%r12d
movswl 0xa0(%rsp),%r10d
movswl 0xa8(%rsp),%eax
mov    %rax,0x18(%rsp)
movswl 0xb0(%rsp),%ebx
movswl 0xb8(%rsp),%ebp
mov    %rbp,0x20(%rsp)
mov    0xd0(%rsp),%eax
sub    $0x8,%rsp
mov    %edx,%edi
mov    %ecx,%esi
mov    %r8d,%edx
mov    %r9d,%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
push   %rax
mov    0xe8(%rsp),%eax
push   %rax
mov    0xe0(%rsp),%eax
push   %rax
push   %rbp
push   %rbx
mov    %rbx,%rbp
push   0x48(%rsp)
push   %r10
push   %r12
push   %r11
mov    %r11,%rbx
call   1030 <drawPoly3TGD@plt>
add    $0x48,%rsp
mov    0x18(%rsp),%edi
mov    0x1c(%rsp),%esi
mov    %r13d,%edx
mov    0x14(%rsp),%ecx
mov    %r15d,%r8d
mov    %r14d,%r9d
mov    0xd8(%rsp),%eax
push   %rax
mov    0xd8(%rsp),%eax
push   %rax
mov    0xd8(%rsp),%eax
push   %rax
push   0x40(%rsp)
push   %rbp
push   %r12
push   %rbx
push   0x68(%rsp)
push   0x78(%rsp)
call   1030 <drawPoly3TGD@plt>
add    $0x88,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @drawPoly4TGD_TRI(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3, i16 signext %4, i16 signext %5, i16 signext %6, i16 signext %7, i16 signext %8, i16 signext %9, i16 signext %10, i16 signext %11, i16 signext %12, i16 signext %13, i16 signext %14, i16 signext %15, i32 %16, i32 %17, i32 %18, i32 %19) {
%21 = alloca i16
%22 = alloca i16
%23 = alloca i16
%24 = alloca i16
%25 = alloca i16
%26 = alloca i16
%27 = alloca i16
%28 = alloca i16
%29 = alloca i16
%30 = alloca i16
%31 = alloca i16
%32 = alloca i16
%33 = alloca i16
%34 = alloca i16
%35 = alloca i16
%36 = alloca i16
%37 = alloca i32
%38 = alloca i32
%39 = alloca i32
%40 = alloca i32
store i16 %0, i16* %21
store i16 %1, i16* %22
store i16 %2, i16* %23
store i16 %3, i16* %24
store i16 %4, i16* %25
store i16 %5, i16* %26
store i16 %6, i16* %27
store i16 %7, i16* %28
store i16 %8, i16* %29
store i16 %9, i16* %30
store i16 %10, i16* %31
store i16 %11, i16* %32
store i16 %12, i16* %33
store i16 %13, i16* %34
store i16 %14, i16* %35
store i16 %15, i16* %36
store i32 %16, i32* %37
store i32 %17, i32* %38
store i32 %18, i32* %39
store i32 %19, i32* %40
%41 = load i16, i16* %23
%42 = load i16, i16* %24
%43 = load i16, i16* %25
%44 = load i16, i16* %26
%45 = load i16, i16* %27
%46 = load i16, i16* %28
%47 = load i16, i16* %31
%48 = load i16, i16* %32
%49 = load i16, i16* %33
%50 = load i16, i16* %34
%51 = load i16, i16* %35
%52 = load i16, i16* %36
%53 = load i32, i32* %38
%54 = load i32, i32* %40
%55 = load i32, i32* %39
%56 = call i32 @drawPoly3TGD(i16 signext %41, i16 signext %42, i16 signext %43, i16 signext %44, i16 signext %45, i16 signext %46, i16 signext %47, i16 signext %48, i16 signext %49, i16 signext %50, i16 signext %51, i16 signext %52, i32 %53, i32 %54, i32 %55)
%57 = load i16, i16* %21
%58 = load i16, i16* %22
%59 = load i16, i16* %23
%60 = load i16, i16* %24
%61 = load i16, i16* %27
%62 = load i16, i16* %28
%63 = load i16, i16* %29
%64 = load i16, i16* %30
%65 = load i16, i16* %31
%66 = load i16, i16* %32
%67 = load i16, i16* %35
%68 = load i16, i16* %36
%69 = load i32, i32* %37
%70 = load i32, i32* %38
%71 = load i32, i32* %39
%72 = call i32 @drawPoly3TGD(i16 signext %57, i16 signext %58, i16 signext %59, i16 signext %60, i16 signext %61, i16 signext %62, i16 signext %63, i16 signext %64, i16 signext %65, i16 signext %66, i16 signext %67, i16 signext %68, i32 %69, i32 %70, i32 %71)
ret void
}

LLVM IR (-O2):
define void @drawPoly4TGD_TRI(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3, i16 signext %4, i16 signext %5, i16 signext %6, i16 signext %7, i16 signext %8, i16 signext %9, i16 signext %10, i16 signext %11, i16 signext %12, i16 signext %13, i16 signext %14, i16 signext %15, i32 %16, i32 %17, i32 %18, i32 %19) {
%21 = tail call i32 @drawPoly3TGD(i16 signext %2, i16 signext %3, i16 signext %4, i16 signext %5, i16 signext %6, i16 signext %7, i16 signext %10, i16 signext %11, i16 signext %12, i16 signext %13, i16 signext %14, i16 signext %15, i32 %17, i32 %19, i32 %18)
%22 = tail call i32 @drawPoly3TGD(i16 signext %0, i16 signext %1, i16 signext %2, i16 signext %3, i16 signext %6, i16 signext %7, i16 signext %8, i16 signext %9, i16 signext %10, i16 signext %11, i16 signext %14, i16 signext %15, i32 %16, i32 %17, i32 %18)
ret void
}