#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 GLUT_KEY_F11;
int /*<<< orphan*/ glutFullScreen();
int /*<<< orphan*/ glutReshapeWindow(int, int);
void special(int key, int x, int y) {
  static int fullscreen = 0;
  if (key == GLUT_KEY_F11) {
    if (fullscreen)
      glutReshapeWindow(64, 64);
    else
      glutFullScreen();
    fullscreen = !fullscreen;
  }
}


x86 assembly (clang, -O0):
<special>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    -0x4(%rbp),%eax
mov    0x2e9d(%rip),%rcx
cmp    (%rcx),%eax
jne    117f <special+0x5f>
cmpl   $0x0,0x2eea(%rip)
je     1161 <special+0x41>
mov    $0x40,%esi
mov    %esi,%edi
call   1030 <glutReshapeWindow@plt>
jmp    1168 <special+0x48>
mov    $0x0,%al
call   1040 <glutFullScreen@plt>
cmpl   $0x0,0x2ec5(%rip)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,0x2eb5(%rip)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<special>:
push   %rax
mov    0x2eb0(%rip),%rax
cmp    %edi,(%rax)
jne    115f <special+0x3f>
cmpl   $0x0,0x2f01(%rip)
je     1146 <special+0x26>
mov    $0x40,%edi
mov    $0x40,%esi
call   1030 <glutReshapeWindow@plt>
jmp    114d <special+0x2d>
xor    %eax,%eax
call   1040 <glutFullScreen@plt>
xor    %eax,%eax
cmpl   $0x0,0x2ede(%rip)
sete   %al
mov    %eax,0x2ed5(%rip)
pop    %rax
ret

LLVM IR (-O0):
@special.fullscreen = internal global i32 0
@GLUT_KEY_F11 = global i32 0
define void @special(i32 %0, i32 %1, i32 %2) {
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
store i32 %0, i32* %4
store i32 %1, i32* %5
store i32 %2, i32* %6
%7 = load i32, i32* %4
%8 = load i32, i32* @GLUT_KEY_F11
%9 = icmp eq i32 %7, %8
br i1 %9, label %10, label %22
10: ; preds = %3
%11 = load i32, i32* @special.fullscreen
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %15
13: ; preds = %10
%14 = call i32 @glutReshapeWindow(i32 64, i32 64)
br label %17
15: ; preds = %10
%16 = call i32 (...) @glutFullScreen()
br label %17
17: ; preds = %15, %13
%18 = load i32, i32* @special.fullscreen
%19 = icmp ne i32 %18, 0
%20 = xor i1 %19, true
%21 = zext i1 %20 to i32
store i32 %21, i32* @special.fullscreen
br label %22
22: ; preds = %17, %3
ret void
}

LLVM IR (-O2):
@special.fullscreen = internal unnamed_addr global i32 0
@GLUT_KEY_F11 = global i32 0
define void @special(i32 %0, i32 %1, i32 %2) {
%4 = load i32, i32* @GLUT_KEY_F11
%5 = icmp eq i32 %4, %0
br i1 %5, label %6, label %17
6: ; preds = %3
%7 = load i32, i32* @special.fullscreen
%8 = icmp eq i32 %7, 0
br i1 %8, label %11, label %9
9: ; preds = %6
%10 = tail call i32 @glutReshapeWindow(i32 64, i32 64)
br label %13
11: ; preds = %6
%12 = tail call i32 (...) @glutFullScreen()
br label %13
13: ; preds = %11, %9
%14 = load i32, i32* @special.fullscreen
%15 = icmp eq i32 %14, 0
%16 = zext i1 %15 to i32
store i32 %16, i32* @special.fullscreen
br label %17
17: ; preds = %13, %3
ret void
}