#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*/ glVertex3f(float, int /*<<< orphan*/, float);
void drawXYPlane3D(float x, float z) {
  glBegin(GL_QUADS);
  glVertex3f(x, 0, 0);
  glVertex3f(-x, 0, 0);
  glVertex3f(-x, 0, z);
  glVertex3f(x, 0, z);
  glEnd();
}


x86 assembly (clang, -O0):
<drawXYPlane3D>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
mov    0x2e9f(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
movss  -0x4(%rbp),%xmm0
xor    %edi,%edi
xorps  %xmm1,%xmm1
call   1030 <glVertex3f@plt>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
xor    %edi,%edi
xorps  %xmm1,%xmm1
call   1030 <glVertex3f@plt>
movss  -0x4(%rbp),%xmm0
movd   %xmm0,%eax
xor    $0x80000000,%eax
movd   %eax,%xmm0
movss  -0x8(%rbp),%xmm1
xor    %edi,%edi
call   1030 <glVertex3f@plt>
movss  -0x4(%rbp),%xmm0
movss  -0x8(%rbp),%xmm1
xor    %edi,%edi
call   1030 <glVertex3f@plt>
mov    $0x0,%al
call   1040 <glEnd@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<drawXYPlane3D>:
sub    $0x38,%rsp
movss  %xmm1,0xc(%rsp)
movaps %xmm0,0x10(%rsp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
call   1050 <glBegin@plt>
xorps  %xmm1,%xmm1
movaps 0x10(%rsp),%xmm0
xor    %edi,%edi
call   1030 <glVertex3f@plt>
movaps 0xe9d(%rip),%xmm0
xorps  0x10(%rsp),%xmm0
movaps %xmm0,0x20(%rsp)
xorps  %xmm1,%xmm1
xor    %edi,%edi
call   1030 <glVertex3f@plt>
movaps 0x20(%rsp),%xmm0
xor    %edi,%edi
movss  0xc(%rsp),%xmm1
call   1030 <glVertex3f@plt>
movaps 0x10(%rsp),%xmm0
xor    %edi,%edi
movss  0xc(%rsp),%xmm1
call   1030 <glVertex3f@plt>
xor    %eax,%eax
add    $0x38,%rsp
jmp    1040 <glEnd@plt>

LLVM IR (-O0):
@GL_QUADS = global i32 0
define void @drawXYPlane3D(float %0, float %1) {
%3 = alloca float
%4 = alloca float
store float %0, float* %3
store float %1, float* %4
%5 = load i32, i32* @GL_QUADS
%6 = call i32 @glBegin(i32 %5)
%7 = load float, float* %3
%8 = call i32 @glVertex3f(float %7, i32 0, float 0.000000e+00)
%9 = load float, float* %3
%10 = fneg float %9
%11 = call i32 @glVertex3f(float %10, i32 0, float 0.000000e+00)
%12 = load float, float* %3
%13 = fneg float %12
%14 = load float, float* %4
%15 = call i32 @glVertex3f(float %13, i32 0, float %14)
%16 = load float, float* %3
%17 = load float, float* %4
%18 = call i32 @glVertex3f(float %16, i32 0, float %17)
%19 = call i32 (...) @glEnd()
ret void
}

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