#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 scalar_t__ GLfloat;

/* Variables and functions */
int /*<<< orphan*/ glVertex3f(scalar_t__, scalar_t__, scalar_t__);
void draw_rectangle(GLfloat x1, GLfloat y_1, GLfloat z1, GLfloat x2,
                    GLfloat y_2, GLfloat z2) {
  if (y_1 == y_2) {
    glVertex3f(x1, y_1, z1);
    glVertex3f(x2, y_1, z1);
    glVertex3f(x2, y_2, z2);
    glVertex3f(x2, y_2, z2);
    glVertex3f(x1, y_2, z2);
    glVertex3f(x1, y_1, z1);
  } else {
    glVertex3f(x1, y_1, z1);
    glVertex3f(x2, y_1, z2);
    glVertex3f(x2, y_2, z2);
    glVertex3f(x2, y_2, z2);
    glVertex3f(x1, y_2, z1);
    glVertex3f(x1, y_1, z1);
  }
}


x86 assembly (clang, -O0):
<draw_rectangle>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
mov    -0x10(%rbp),%rax
cmp    -0x28(%rbp),%rax
jne    11a9 <draw_rectangle+0x99>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <glVertex3f@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <glVertex3f@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <glVertex3f@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <glVertex3f@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <glVertex3f@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <glVertex3f@plt>
jmp    120f <draw_rectangle+0xff>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <glVertex3f@plt>
mov    -0x20(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <glVertex3f@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <glVertex3f@plt>
mov    -0x20(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x30(%rbp),%rdx
call   1030 <glVertex3f@plt>
mov    -0x8(%rbp),%rdi
mov    -0x28(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <glVertex3f@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
call   1030 <glVertex3f@plt>
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_rectangle>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %r9,%r12
mov    %r8,%rbp
mov    %rcx,%r13
mov    %rdx,%r14
mov    %rsi,%rbx
mov    %rdi,%r15
call   1030 <glVertex3f@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
cmp    %rbp,%rbx
jne    116c <draw_rectangle+0x5c>
mov    %r14,%rdx
call   1030 <glVertex3f@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1030 <glVertex3f@plt>
mov    %r13,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   1030 <glVertex3f@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
jmp    1199 <draw_rectangle+0x89>
mov    %r12,%rdx
call   1030 <glVertex3f@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
call   1030 <glVertex3f@plt>
mov    %r13,%rdi
mov    %rbp,%rsi
mov    %r12,%rdx
call   1030 <glVertex3f@plt>
mov    %r15,%rdi
mov    %rbp,%rsi
mov    %r14,%rdx
call   1030 <glVertex3f@plt>
mov    %r15,%rdi
mov    %rbx,%rsi
mov    %r14,%rdx
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <glVertex3f@plt>

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

LLVM IR (-O2):
define void @draw_rectangle(i64 %0, i64 %1, i64 %2, i64 %3, i64 %4, i64 %5) {
%7 = icmp eq i64 %1, %4
%8 = tail call i32 @glVertex3f(i64 %0, i64 %1, i64 %2)
br i1 %7, label %9, label %14
9: ; preds = %6
%10 = tail call i32 @glVertex3f(i64 %3, i64 %1, i64 %2)
%11 = tail call i32 @glVertex3f(i64 %3, i64 %1, i64 %5)
%12 = tail call i32 @glVertex3f(i64 %3, i64 %1, i64 %5)
%13 = tail call i32 @glVertex3f(i64 %0, i64 %1, i64 %5)
br label %19
14: ; preds = %6
%15 = tail call i32 @glVertex3f(i64 %3, i64 %1, i64 %5)
%16 = tail call i32 @glVertex3f(i64 %3, i64 %4, i64 %5)
%17 = tail call i32 @glVertex3f(i64 %3, i64 %4, i64 %5)
%18 = tail call i32 @glVertex3f(i64 %0, i64 %4, i64 %2)
br label %19
19: ; preds = %14, %9
%20 = tail call i32 @glVertex3f(i64 %0, i64 %1, i64 %2)
ret void
}