#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*/ glutPostRedisplay();
int /*<<< orphan*/ printf(char *);
void MenuWin(int op) {
  printf("    Menu Windows:     ");
  switch (op) {
  case 0:
    printf("Opçao Triangulo");
    break;
  case 1:
    printf("Opçao Retangulo com Triangulos");
    break;
  }
  printf("\n");
  glutPostRedisplay();
}


x86 assembly (clang, -O0):
<MenuWin>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
lea    0xece(%rip),%rdi
call   1030 <printf@plt>
mov    -0x4(%rbp),%eax
mov    %eax,-0x8(%rbp)
test   %eax,%eax
je     115b <MenuWin+0x3b>
jmp    114a <MenuWin+0x2a>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
je     116c <MenuWin+0x4c>
jmp    1178 <MenuWin+0x58>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
jmp    1178 <MenuWin+0x58>
lea    0xeb5(%rip),%rdi
call   1030 <printf@plt>
lea    0xec9(%rip),%rdi
call   1030 <printf@plt>
mov    $0x0,%al
call   1040 <glutPostRedisplay@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MenuWin>:
push   %rbx
mov    %edi,%ebx
lea    0xec6(%rip),%rdi
call   1040 <printf@plt>
test   %ebx,%ebx
je     1151 <MenuWin+0x21>
cmp    $0x1,%ebx
jne    115d <MenuWin+0x2d>
lea    0xed9(%rip),%rdi
jmp    1158 <MenuWin+0x28>
lea    0xebf(%rip),%rdi
call   1040 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
jmp    1050 <glutPostRedisplay@plt>

LLVM IR (-O0):
@.str = [23 x i8] c" Menu Windows: \00"
@.str.1 = [17 x i8] c"Op\C3\A7ao Triangulo\00"
@.str.2 = [32 x i8] c"Op\C3\A7ao Retangulo com Triangulos\00"
@.str.3 = [2 x i8] c"\0A\00"
define void @MenuWin(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* %2
switch i32 %4, label %9 [
i32 0, label %5
i32 1, label %7
]
5: ; preds = %1
%6 = call i32 @printf(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
br label %9
7: ; preds = %1
%8 = call i32 @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0))
br label %9
9: ; preds = %1, %7, %5
%10 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%11 = call i32 (...) @glutPostRedisplay()
ret void
}

LLVM IR (-O2):
@.str = [23 x i8] c" Menu Windows: \00"
@.str.1 = [17 x i8] c"Op\C3\A7ao Triangulo\00"
@.str.2 = [32 x i8] c"Op\C3\A7ao Retangulo com Triangulos\00"
define void @MenuWin(i32 %0) {
%2 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0))
switch i32 %0, label %7 [
i32 0, label %4
i32 1, label %3
]
3: ; preds = %1
br label %4
4: ; preds = %1, %3
%5 = phi i8* [ getelementptr inbounds ([32 x i8], [32 x i8]* @.str.2, i64 0, i64 0), %3 ], [ getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), %1 ]
%6 = tail call i32 @printf(i8* dereferenceable(1) %5)
br label %7
7: ; preds = %4, %1
%8 = tail call i32 @putchar(i32 10)
%9 = tail call i32 (...) @glutPostRedisplay()
ret void
}