#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_DEPTH_TEST;
int /*<<< orphan*/ draw_button_at(int, double, double, double);
int /*<<< orphan*/ glDisable(int /*<<< orphan*/);
int /*<<< orphan*/ glEnable(int /*<<< orphan*/);
int /*<<< orphan*/ glScalef(double, double, double);
int /*<<< orphan*/ glTranslatef(double, double, int /*<<< orphan*/);
void draw_buttons() {
  glDisable(GL_DEPTH_TEST);
  glScalef(1.0 / 16, 1.0 / 16, 1.0 / 16);
  glTranslatef(1.0 / 2, 1.0 / 2, 0);
  draw_button_at(0, 1, 1, 1);
  draw_button_at(1, 0, 1, 1);
  draw_button_at(2, 1, 0, 1);
  draw_button_at(3, 1, 1, 0);
  draw_button_at(16, 1, 0, 0);
  draw_button_at(17, 0, 1, 0);
  draw_button_at(18, 0, 0, 1);
  draw_button_at(32, 0.5, 0.5, 0.5);
  draw_button_at(33, 0.5, 0.0, 0.5);
  draw_button_at(48, 0.0, 0.5, 0.5);
  glEnable(GL_DEPTH_TEST);
}


x86 assembly (clang, -O0):
<draw_buttons>:
push   %rbp
mov    %rsp,%rbp
mov    0x2e85(%rip),%rax
mov    (%rax),%edi
call   1070 <glDisable@plt>
movsd  0xea6(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1050 <glScalef@plt>
movsd  0xe83(%rip),%xmm1
xor    %edi,%edi
movaps %xmm1,%xmm0
call   1060 <glTranslatef@plt>
xor    %edi,%edi
movsd  0xe77(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <draw_button_at@plt>
mov    $0x1,%edi
xorps  %xmm0,%xmm0
movsd  0xe5c(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <draw_button_at@plt>
mov    $0x2,%edi
movsd  0xe47(%rip),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm2,%xmm0
call   1030 <draw_button_at@plt>
mov    $0x3,%edi
movsd  0xe2f(%rip),%xmm1
xorps  %xmm2,%xmm2
movaps %xmm1,%xmm0
call   1030 <draw_button_at@plt>
mov    $0x10,%edi
movsd  0xe17(%rip),%xmm0
xorps  %xmm2,%xmm2
movaps %xmm2,%xmm1
call   1030 <draw_button_at@plt>
mov    $0x11,%edi
xorps  %xmm2,%xmm2
movsd  0xdfc(%rip),%xmm1
movaps %xmm2,%xmm0
call   1030 <draw_button_at@plt>
mov    $0x12,%edi
xorps  %xmm1,%xmm1
movsd  0xde4(%rip),%xmm2
movaps %xmm1,%xmm0
call   1030 <draw_button_at@plt>
mov    $0x20,%edi
movsd  0xdc7(%rip),%xmm2
movaps %xmm2,%xmm0
movaps %xmm2,%xmm1
call   1030 <draw_button_at@plt>
mov    $0x21,%edi
movsd  0xdaf(%rip),%xmm2
xorps  %xmm1,%xmm1
movaps %xmm2,%xmm0
call   1030 <draw_button_at@plt>
mov    $0x30,%edi
xorps  %xmm0,%xmm0
movsd  0xd94(%rip),%xmm2
movaps %xmm2,%xmm1
call   1030 <draw_button_at@plt>
mov    0x2d65(%rip),%rax
mov    (%rax),%edi
call   1040 <glEnable@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_buttons>:
push   %rbx
mov    0x2e88(%rip),%rbx
mov    (%rbx),%edi
call   1070 <glDisable@plt>
movsd  0xe99(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1050 <glScalef@plt>
movsd  0xe8e(%rip),%xmm0
movaps %xmm0,%xmm1
xor    %edi,%edi
call   1060 <glTranslatef@plt>
movsd  0xe84(%rip),%xmm0
xor    %edi,%edi
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <draw_button_at@plt>
xorps  %xmm0,%xmm0
mov    $0x1,%edi
movsd  0xe67(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <draw_button_at@plt>
xorps  %xmm1,%xmm1
mov    $0x2,%edi
movsd  0xe4f(%rip),%xmm0
movaps %xmm0,%xmm2
call   1030 <draw_button_at@plt>
xorps  %xmm2,%xmm2
mov    $0x3,%edi
movsd  0xe37(%rip),%xmm0
movaps %xmm0,%xmm1
call   1030 <draw_button_at@plt>
xorps  %xmm1,%xmm1
xorps  %xmm2,%xmm2
mov    $0x10,%edi
movsd  0xe1c(%rip),%xmm0
call   1030 <draw_button_at@plt>
xorps  %xmm0,%xmm0
xorps  %xmm2,%xmm2
mov    $0x11,%edi
movsd  0xe04(%rip),%xmm1
call   1030 <draw_button_at@plt>
xorps  %xmm0,%xmm0
xorps  %xmm1,%xmm1
mov    $0x12,%edi
movsd  0xdec(%rip),%xmm2
call   1030 <draw_button_at@plt>
mov    $0x20,%edi
movsd  0xdd2(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
call   1030 <draw_button_at@plt>
xorps  %xmm1,%xmm1
mov    $0x21,%edi
movsd  0xdb7(%rip),%xmm0
movaps %xmm0,%xmm2
call   1030 <draw_button_at@plt>
xorps  %xmm0,%xmm0
mov    $0x30,%edi
movsd  0xd9f(%rip),%xmm1
movaps %xmm1,%xmm2
call   1030 <draw_button_at@plt>
mov    (%rbx),%edi
pop    %rbx
jmp    1040 <glEnable@plt>

LLVM IR (-O0):
@GL_DEPTH_TEST = global i32 0
define void @draw_buttons() {
%1 = load i32, i32* @GL_DEPTH_TEST
%2 = call i32 @glDisable(i32 %1)
%3 = call i32 @glScalef(double 6.250000e-02, double 6.250000e-02, double 6.250000e-02)
%4 = call i32 @glTranslatef(double 5.000000e-01, double 5.000000e-01, i32 0)
%5 = call i32 @draw_button_at(i32 0, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%6 = call i32 @draw_button_at(i32 1, double 0.000000e+00, double 1.000000e+00, double 1.000000e+00)
%7 = call i32 @draw_button_at(i32 2, double 1.000000e+00, double 0.000000e+00, double 1.000000e+00)
%8 = call i32 @draw_button_at(i32 3, double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%9 = call i32 @draw_button_at(i32 16, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%10 = call i32 @draw_button_at(i32 17, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%11 = call i32 @draw_button_at(i32 18, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%12 = call i32 @draw_button_at(i32 32, double 5.000000e-01, double 5.000000e-01, double 5.000000e-01)
%13 = call i32 @draw_button_at(i32 33, double 5.000000e-01, double 0.000000e+00, double 5.000000e-01)
%14 = call i32 @draw_button_at(i32 48, double 0.000000e+00, double 5.000000e-01, double 5.000000e-01)
%15 = load i32, i32* @GL_DEPTH_TEST
%16 = call i32 @glEnable(i32 %15)
ret void
}

LLVM IR (-O2):
@GL_DEPTH_TEST = global i32 0
define void @draw_buttons() {
%1 = load i32, i32* @GL_DEPTH_TEST
%2 = tail call i32 @glDisable(i32 %1)
%3 = tail call i32 @glScalef(double 6.250000e-02, double 6.250000e-02, double 6.250000e-02)
%4 = tail call i32 @glTranslatef(double 5.000000e-01, double 5.000000e-01, i32 0)
%5 = tail call i32 @draw_button_at(i32 0, double 1.000000e+00, double 1.000000e+00, double 1.000000e+00)
%6 = tail call i32 @draw_button_at(i32 1, double 0.000000e+00, double 1.000000e+00, double 1.000000e+00)
%7 = tail call i32 @draw_button_at(i32 2, double 1.000000e+00, double 0.000000e+00, double 1.000000e+00)
%8 = tail call i32 @draw_button_at(i32 3, double 1.000000e+00, double 1.000000e+00, double 0.000000e+00)
%9 = tail call i32 @draw_button_at(i32 16, double 1.000000e+00, double 0.000000e+00, double 0.000000e+00)
%10 = tail call i32 @draw_button_at(i32 17, double 0.000000e+00, double 1.000000e+00, double 0.000000e+00)
%11 = tail call i32 @draw_button_at(i32 18, double 0.000000e+00, double 0.000000e+00, double 1.000000e+00)
%12 = tail call i32 @draw_button_at(i32 32, double 5.000000e-01, double 5.000000e-01, double 5.000000e-01)
%13 = tail call i32 @draw_button_at(i32 33, double 5.000000e-01, double 0.000000e+00, double 5.000000e-01)
%14 = tail call i32 @draw_button_at(i32 48, double 0.000000e+00, double 5.000000e-01, double 5.000000e-01)
%15 = load i32, i32* @GL_DEPTH_TEST
%16 = tail call i32 @glEnable(i32 %15)
ret void
}