#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*/ GL_QUADS;
int /*<<< orphan*/ glBegin(int /*<<< orphan*/);
int /*<<< orphan*/ glEnd();
int /*<<< orphan*/ glNormal3d(double, double, double);
int /*<<< orphan*/ glVertex3d(double, double, double);
void povrsina(double a) {
  glBegin(GL_QUADS);
  glNormal3d(0.0, 0.0, 1.0);
  glVertex3d(-a, -a, 0.0);
  glVertex3d(a, -a, 0.0);
  glVertex3d(a, a, 0.0);
  glVertex3d(-a, a, 0.0);
  glEnd();
}


x86 assembly (clang, -O0):
<povrsina>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movsd  %xmm0,-0x8(%rbp)
mov    0x2e94(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
xorps  %xmm1,%xmm1
movsd  0xe9a(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <glNormal3d@plt>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3d@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
movq   %xmm1,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3d@plt>
movsd  -0x8(%rbp),%xmm0
movsd  -0x8(%rbp),%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3d@plt>
movsd  -0x8(%rbp),%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  -0x8(%rbp),%xmm1
xorps  %xmm2,%xmm2
call   1040 <glVertex3d@plt>
mov    $0x0,%al
call   1050 <glEnd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<povrsina>:
sub    $0x28,%rsp
movaps %xmm0,(%rsp)
mov    0x2e99(%rip),%rax
mov    (%rax),%edi
call   1060 <glBegin@plt>
movsd  0xea2(%rip),%xmm2
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
call   1030 <glNormal3d@plt>
movaps 0xea0(%rip),%xmm0
xorps  (%rsp),%xmm0
movaps %xmm0,0x10(%rsp)
xorps  %xmm2,%xmm2
movaps %xmm0,%xmm1
call   1040 <glVertex3d@plt>
xorps  %xmm2,%xmm2
movaps (%rsp),%xmm0
movaps 0x10(%rsp),%xmm1
call   1040 <glVertex3d@plt>
xorps  %xmm2,%xmm2
movaps (%rsp),%xmm0
movaps %xmm0,%xmm1
call   1040 <glVertex3d@plt>
xorps  %xmm2,%xmm2
movaps 0x10(%rsp),%xmm0
movaps (%rsp),%xmm1
call   1040 <glVertex3d@plt>
xor    %eax,%eax
add    $0x28,%rsp
jmp    1050 <glEnd@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
define void @povrsina(double %0) {
%2 = alloca double
store double %0, double* %2
%3 = load i32, i32* @GL_QUADS
%4 = call i32 @glBegin(i32 %3)
%5 = call i32 @glNormal3d(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%6 = load double, double* %2
%7 = fneg double %6
%8 = load double, double* %2
%9 = fneg double %8
%10 = call i32 @glVertex3d(double %7, double %9, double 0.000000e+00)
%11 = load double, double* %2
%12 = load double, double* %2
%13 = fneg double %12
%14 = call i32 @glVertex3d(double %11, double %13, double 0.000000e+00)
%15 = load double, double* %2
%16 = load double, double* %2
%17 = call i32 @glVertex3d(double %15, double %16, double 0.000000e+00)
%18 = load double, double* %2
%19 = fneg double %18
%20 = load double, double* %2
%21 = call i32 @glVertex3d(double %19, double %20, double 0.000000e+00)
%22 = call i32 (...) @glEnd()
ret void
}

LLVM IR (-O2):
@GL_QUADS = global i32 0
define void @povrsina(double %0) {
%2 = load i32, i32* @GL_QUADS
%3 = tail call i32 @glBegin(i32 %2)
%4 = tail call i32 @glNormal3d(double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%5 = fneg double %0
%6 = tail call i32 @glVertex3d(double %5, double %5, double 0.000000e+00)
%7 = tail call i32 @glVertex3d(double %0, double %5, double 0.000000e+00)
%8 = tail call i32 @glVertex3d(double %0, double %0, double 0.000000e+00)
%9 = tail call i32 @glVertex3d(double %5, double %0, double 0.000000e+00)
%10 = tail call i32 (...) @glEnd()
ret void
}