#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*/ argLineSeg(double, double, double, double, int, int);
void argDrawSquare(double vertex[4][2], int xwin, int ywin) {
  argLineSeg(vertex[0][0], vertex[0][1], vertex[1][0], vertex[1][1], xwin,
             ywin);
  argLineSeg(vertex[1][0], vertex[1][1], vertex[2][0], vertex[2][1], xwin,
             ywin);
  argLineSeg(vertex[2][0], vertex[2][1], vertex[3][0], vertex[3][1], xwin,
             ywin);
  argLineSeg(vertex[3][0], vertex[3][1], vertex[0][0], vertex[0][1], xwin,
             ywin);
}


x86 assembly (clang, -O0):
<argDrawSquare>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    %edx,-0x10(%rbp)
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm3
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <argLineSeg@plt>
mov    -0x8(%rbp),%rax
movsd  0x10(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x18(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm3
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <argLineSeg@plt>
mov    -0x8(%rbp),%rax
movsd  0x20(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x28(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm3
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <argLineSeg@plt>
mov    -0x8(%rbp),%rax
movsd  0x30(%rax),%xmm0
mov    -0x8(%rbp),%rax
movsd  0x38(%rax),%xmm1
mov    -0x8(%rbp),%rax
movsd  (%rax),%xmm2
mov    -0x8(%rbp),%rax
movsd  0x8(%rax),%xmm3
mov    -0xc(%rbp),%edi
mov    -0x10(%rbp),%esi
call   1030 <argLineSeg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<argDrawSquare>:
push   %rbp
push   %r14
push   %rbx
mov    %edx,%r14d
mov    %esi,%ebp
mov    %rdi,%rbx
movsd  (%rdi),%xmm0
movsd  0x8(%rdi),%xmm1
movsd  0x10(%rdi),%xmm2
movsd  0x18(%rdi),%xmm3
mov    %esi,%edi
mov    %edx,%esi
call   1030 <argLineSeg@plt>
movsd  0x10(%rbx),%xmm0
movsd  0x18(%rbx),%xmm1
movsd  0x20(%rbx),%xmm2
movsd  0x28(%rbx),%xmm3
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <argLineSeg@plt>
movsd  0x20(%rbx),%xmm0
movsd  0x28(%rbx),%xmm1
movsd  0x30(%rbx),%xmm2
movsd  0x38(%rbx),%xmm3
mov    %ebp,%edi
mov    %r14d,%esi
call   1030 <argLineSeg@plt>
movsd  0x30(%rbx),%xmm0
movsd  0x38(%rbx),%xmm1
movsd  (%rbx),%xmm2
movsd  0x8(%rbx),%xmm3
mov    %ebp,%edi
mov    %r14d,%esi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1030 <argLineSeg@plt>

LLVM IR (-O0):
define void @argDrawSquare([2 x double]* %0, i32 %1, i32 %2) {
%4 = alloca [2 x double]*
%5 = alloca i32
%6 = alloca i32
store [2 x double]* %0, [2 x double]** %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load [2 x double]*, [2 x double]** %4
%8 = getelementptr inbounds [2 x double], [2 x double]* %7, i64 0
%9 = getelementptr inbounds [2 x double], [2 x double]* %8, i64 0, i64 0
%10 = load double, double* %9
%11 = load [2 x double]*, [2 x double]** %4
%12 = getelementptr inbounds [2 x double], [2 x double]* %11, i64 0
%13 = getelementptr inbounds [2 x double], [2 x double]* %12, i64 0, i64 1
%14 = load double, double* %13
%15 = load [2 x double]*, [2 x double]** %4
%16 = getelementptr inbounds [2 x double], [2 x double]* %15, i64 1
%17 = getelementptr inbounds [2 x double], [2 x double]* %16, i64 0, i64 0
%18 = load double, double* %17
%19 = load [2 x double]*, [2 x double]** %4
%20 = getelementptr inbounds [2 x double], [2 x double]* %19, i64 1
%21 = getelementptr inbounds [2 x double], [2 x double]* %20, i64 0, i64 1
%22 = load double, double* %21
%23 = load i32, i32* %5
%24 = load i32, i32* %6
%25 = call i32 @argLineSeg(double %10, double %14, double %18, double %22, i32 %23, i32 %24)
%26 = load [2 x double]*, [2 x double]** %4
%27 = getelementptr inbounds [2 x double], [2 x double]* %26, i64 1
%28 = getelementptr inbounds [2 x double], [2 x double]* %27, i64 0, i64 0
%29 = load double, double* %28
%30 = load [2 x double]*, [2 x double]** %4
%31 = getelementptr inbounds [2 x double], [2 x double]* %30, i64 1
%32 = getelementptr inbounds [2 x double], [2 x double]* %31, i64 0, i64 1
%33 = load double, double* %32
%34 = load [2 x double]*, [2 x double]** %4
%35 = getelementptr inbounds [2 x double], [2 x double]* %34, i64 2
%36 = getelementptr inbounds [2 x double], [2 x double]* %35, i64 0, i64 0
%37 = load double, double* %36
%38 = load [2 x double]*, [2 x double]** %4
%39 = getelementptr inbounds [2 x double], [2 x double]* %38, i64 2
%40 = getelementptr inbounds [2 x double], [2 x double]* %39, i64 0, i64 1
%41 = load double, double* %40
%42 = load i32, i32* %5
%43 = load i32, i32* %6
%44 = call i32 @argLineSeg(double %29, double %33, double %37, double %41, i32 %42, i32 %43)
%45 = load [2 x double]*, [2 x double]** %4
%46 = getelementptr inbounds [2 x double], [2 x double]* %45, i64 2
%47 = getelementptr inbounds [2 x double], [2 x double]* %46, i64 0, i64 0
%48 = load double, double* %47
%49 = load [2 x double]*, [2 x double]** %4
%50 = getelementptr inbounds [2 x double], [2 x double]* %49, i64 2
%51 = getelementptr inbounds [2 x double], [2 x double]* %50, i64 0, i64 1
%52 = load double, double* %51
%53 = load [2 x double]*, [2 x double]** %4
%54 = getelementptr inbounds [2 x double], [2 x double]* %53, i64 3
%55 = getelementptr inbounds [2 x double], [2 x double]* %54, i64 0, i64 0
%56 = load double, double* %55
%57 = load [2 x double]*, [2 x double]** %4
%58 = getelementptr inbounds [2 x double], [2 x double]* %57, i64 3
%59 = getelementptr inbounds [2 x double], [2 x double]* %58, i64 0, i64 1
%60 = load double, double* %59
%61 = load i32, i32* %5
%62 = load i32, i32* %6
%63 = call i32 @argLineSeg(double %48, double %52, double %56, double %60, i32 %61, i32 %62)
%64 = load [2 x double]*, [2 x double]** %4
%65 = getelementptr inbounds [2 x double], [2 x double]* %64, i64 3
%66 = getelementptr inbounds [2 x double], [2 x double]* %65, i64 0, i64 0
%67 = load double, double* %66
%68 = load [2 x double]*, [2 x double]** %4
%69 = getelementptr inbounds [2 x double], [2 x double]* %68, i64 3
%70 = getelementptr inbounds [2 x double], [2 x double]* %69, i64 0, i64 1
%71 = load double, double* %70
%72 = load [2 x double]*, [2 x double]** %4
%73 = getelementptr inbounds [2 x double], [2 x double]* %72, i64 0
%74 = getelementptr inbounds [2 x double], [2 x double]* %73, i64 0, i64 0
%75 = load double, double* %74
%76 = load [2 x double]*, [2 x double]** %4
%77 = getelementptr inbounds [2 x double], [2 x double]* %76, i64 0
%78 = getelementptr inbounds [2 x double], [2 x double]* %77, i64 0, i64 1
%79 = load double, double* %78
%80 = load i32, i32* %5
%81 = load i32, i32* %6
%82 = call i32 @argLineSeg(double %67, double %71, double %75, double %79, i32 %80, i32 %81)
ret void
}

LLVM IR (-O2):
define void @argDrawSquare([2 x double]* nocapture %0, i32 %1, i32 %2) {
%4 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 0, i64 0
%5 = load double, double* %4
%6 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 0, i64 1
%7 = load double, double* %6
%8 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 1, i64 0
%9 = load double, double* %8
%10 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 1, i64 1
%11 = load double, double* %10
%12 = tail call i32 @argLineSeg(double %5, double %7, double %9, double %11, i32 %1, i32 %2)
%13 = load double, double* %8
%14 = load double, double* %10
%15 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 2, i64 0
%16 = load double, double* %15
%17 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 2, i64 1
%18 = load double, double* %17
%19 = tail call i32 @argLineSeg(double %13, double %14, double %16, double %18, i32 %1, i32 %2)
%20 = load double, double* %15
%21 = load double, double* %17
%22 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 3, i64 0
%23 = load double, double* %22
%24 = getelementptr inbounds [2 x double], [2 x double]* %0, i64 3, i64 1
%25 = load double, double* %24
%26 = tail call i32 @argLineSeg(double %20, double %21, double %23, double %25, i32 %1, i32 %2)
%27 = load double, double* %22
%28 = load double, double* %24
%29 = load double, double* %4
%30 = load double, double* %6
%31 = tail call i32 @argLineSeg(double %27, double %28, double %29, double %30, i32 %1, i32 %2)
ret void
}