#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*/ draw_button(double, double, double);
int /*<<< orphan*/ glScalef(double, double, int /*<<< orphan*/);
int /*<<< orphan*/ glTranslatef(int /*<<< orphan*/, int /*<<< orphan*/, double);
void draw_pressed_button(float r, float g, float b) {
  draw_button(r, g, b);
  glScalef(15.0 / 16, 15.0 / 16, 0);
  glTranslatef(0, 0, -0.25);
  draw_button(0.5 * r, 0.5 * g, 0.5 * b);
  glScalef(16.0 / 15, 16.0 / 15, 0);
  glTranslatef(0, 0, 0.25);
}


x86 assembly (clang, -O0):
<draw_pressed_button>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movss  %xmm0,-0x4(%rbp)
movss  %xmm1,-0x8(%rbp)
movss  %xmm2,-0xc(%rbp)
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
call   1050 <draw_button@plt>
movsd  0xeb1(%rip),%xmm1
xor    %edi,%edi
movaps %xmm1,%xmm0
call   1030 <glScalef@plt>
xor    %esi,%esi
movsd  0xe95(%rip),%xmm0
mov    %esi,%edi
call   1040 <glTranslatef@plt>
movss  -0x4(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movsd  0xe75(%rip),%xmm0
mulsd  %xmm1,%xmm0
movss  -0x8(%rbp),%xmm1
cvtss2sd %xmm1,%xmm2
movsd  0xe60(%rip),%xmm1
mulsd  %xmm2,%xmm1
movss  -0xc(%rbp),%xmm2
cvtss2sd %xmm2,%xmm3
movsd  0xe4b(%rip),%xmm2
mulsd  %xmm3,%xmm2
call   1050 <draw_button@plt>
movsd  0xe32(%rip),%xmm1
xor    %edi,%edi
movaps %xmm1,%xmm0
call   1030 <glScalef@plt>
xor    %esi,%esi
movsd  0xe16(%rip),%xmm0
mov    %esi,%edi
call   1040 <glTranslatef@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<draw_pressed_button>:
sub    $0x18,%rsp
cvtss2sd %xmm0,%xmm0
movsd  %xmm0,(%rsp)
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x8(%rsp)
cvtss2sd %xmm2,%xmm2
movsd  %xmm2,0x10(%rsp)
call   1050 <draw_button@plt>
movsd  0xea2(%rip),%xmm0
movaps %xmm0,%xmm1
xor    %edi,%edi
call   1030 <glScalef@plt>
movsd  0xe98(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
call   1040 <glTranslatef@plt>
movsd  0xe8f(%rip),%xmm3
movsd  (%rsp),%xmm0
mulsd  %xmm3,%xmm0
movsd  0x8(%rsp),%xmm1
mulsd  %xmm3,%xmm1
movsd  0x10(%rsp),%xmm2
mulsd  %xmm3,%xmm2
call   1050 <draw_button@plt>
movsd  0xe6d(%rip),%xmm0
movaps %xmm0,%xmm1
xor    %edi,%edi
call   1030 <glScalef@plt>
movsd  0xe63(%rip),%xmm0
xor    %edi,%edi
xor    %esi,%esi
add    $0x18,%rsp
jmp    1040 <glTranslatef@plt>

LLVM IR (-O0):
define void @draw_pressed_button(float %0, float %1, float %2) {
%4 = alloca float
%5 = alloca float
%6 = alloca float
store float %0, float* %4
store float %1, float* %5
store float %2, float* %6
%7 = load float, float* %4
%8 = fpext float %7 to double
%9 = load float, float* %5
%10 = fpext float %9 to double
%11 = load float, float* %6
%12 = fpext float %11 to double
%13 = call i32 @draw_button(double %8, double %10, double %12)
%14 = call i32 @glScalef(double 9.375000e-01, double 9.375000e-01, i32 0)
%15 = call i32 @glTranslatef(i32 0, i32 0, double -2.500000e-01)
%16 = load float, float* %4
%17 = fpext float %16 to double
%18 = fmul double 5.000000e-01, %17
%19 = load float, float* %5
%20 = fpext float %19 to double
%21 = fmul double 5.000000e-01, %20
%22 = load float, float* %6
%23 = fpext float %22 to double
%24 = fmul double 5.000000e-01, %23
%25 = call i32 @draw_button(double %18, double %21, double %24)
%26 = call i32 @glScalef(double 0x3FF1111111111111, double 0x3FF1111111111111, i32 0)
%27 = call i32 @glTranslatef(i32 0, i32 0, double 2.500000e-01)
ret void
}

LLVM IR (-O2):
define void @draw_pressed_button(float %0, float %1, float %2) {
%4 = fpext float %0 to double
%5 = fpext float %1 to double
%6 = fpext float %2 to double
%7 = tail call i32 @draw_button(double %4, double %5, double %6)
%8 = tail call i32 @glScalef(double 9.375000e-01, double 9.375000e-01, i32 0)
%9 = tail call i32 @glTranslatef(i32 0, i32 0, double -2.500000e-01)
%10 = fmul double %4, 5.000000e-01
%11 = fmul double %5, 5.000000e-01
%12 = fmul double %6, 5.000000e-01
%13 = tail call i32 @draw_button(double %10, double %11, double %12)
%14 = tail call i32 @glScalef(double 0x3FF1111111111111, double 0x3FF1111111111111, i32 0)
%15 = tail call i32 @glTranslatef(i32 0, i32 0, double 2.500000e-01)
ret void
}