#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*/ printf(char *, char *);
char opcao_menu() {
  int i;
  char *banner[] = {
      "Boole logic table generator",
      "coded by Cooler_x86  visit http://botecounix.com.br",
      "(1)create table A B C D",
      "(2)create table A B C ",
      "(0)Sair",
      "-> ",
  };
  for (i = 0; i <= 5; i++)
    printf(" %s \x0a", banner[i]);
}


x86 assembly (clang, -O0):
<opcao_menu>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
lea    -0x40(%rbp),%rdi
xor    %esi,%esi
mov    $0x30,%edx
call   1040 <memset@plt>
lea    0xec1(%rip),%rax
mov    %rax,-0x40(%rbp)
lea    0xed2(%rip),%rax
mov    %rax,-0x38(%rbp)
lea    0xefb(%rip),%rax
mov    %rax,-0x30(%rbp)
lea    0xf08(%rip),%rax
mov    %rax,-0x28(%rbp)
lea    0xf14(%rip),%rax
mov    %rax,-0x20(%rbp)
lea    0xf11(%rip),%rax
mov    %rax,-0x18(%rbp)
movl   $0x0,-0x8(%rbp)
cmpl   $0x5,-0x8(%rbp)
jg     11ae <opcao_menu+0x8e>
movslq -0x8(%rbp),%rax
mov    -0x40(%rbp,%rax,8),%rsi
lea    0xef0(%rip),%rdi
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x8(%rbp)
jmp    1181 <opcao_menu+0x61>
movsbl -0x1(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<opcao_menu>:
push   %rbx
lea    0xf73(%rip),%rbx
lea    0xee1(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xeee(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf13(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf1c(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf24(%rip),%rsi
mov    %rbx,%rdi
call   1030 <printf@plt>
lea    0xf1d(%rip),%rsi
mov    %rbx,%rdi
pop    %rbx
jmp    1030 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"Boole logic table generator\00"
@.str.1 = [52 x i8] c"coded by Cooler_x86 visit http://botecounix.com.br\00"
@.str.2 = [24 x i8] c"(1)create table A B C D\00"
@.str.3 = [23 x i8] c"(2)create table A B C \00"
@.str.4 = [8 x i8] c"(0)Sair\00"
@.str.5 = [4 x i8] c"-> \00"
@.str.6 = [6 x i8] c" %s \0A\00"
define signext i8 @opcao_menu() {
%1 = alloca i8
%2 = alloca i32
%3 = alloca [6 x i8*]
%4 = bitcast [6 x i8*]* %3 to i8*
%5 = bitcast i8* %4 to [6 x i8*]*
%6 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i32 0, i32 0
store i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i32 0, i32 0), i8** %6
%7 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i32 0, i32 1
store i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i32 0, i32 0), i8** %7
%8 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i32 0, i32 2
store i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i32 0, i32 0), i8** %8
%9 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i32 0, i32 3
store i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i32 0, i32 0), i8** %9
%10 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i32 0, i32 4
store i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i32 0, i32 0), i8** %10
%11 = getelementptr inbounds [6 x i8*], [6 x i8*]* %5, i32 0, i32 5
store i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i32 0, i32 0), i8** %11
store i32 0, i32* %2
br label %12
12: ; preds = %21, %0
%13 = load i32, i32* %2
%14 = icmp sle i32 %13, 5
br i1 %14, label %15, label %24
15: ; preds = %12
%16 = load i32, i32* %2
%17 = sext i32 %16 to i64
%18 = getelementptr inbounds [6 x i8*], [6 x i8*]* %3, i64 0, i64 %17
%19 = load i8*, i8** %18
%20 = call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* %19)
br label %21
21: ; preds = %15
%22 = load i32, i32* %2
%23 = add nsw i32 %22, 1
store i32 %23, i32* %2
br label %12
24: ; preds = %12
%25 = load i8, i8* %1
ret i8 %25
}

LLVM IR (-O2):
@.str = [28 x i8] c"Boole logic table generator\00"
@.str.1 = [52 x i8] c"coded by Cooler_x86 visit http://botecounix.com.br\00"
@.str.2 = [24 x i8] c"(1)create table A B C D\00"
@.str.3 = [23 x i8] c"(2)create table A B C \00"
@.str.4 = [8 x i8] c"(0)Sair\00"
@.str.5 = [4 x i8] c"-> \00"
@.str.6 = [6 x i8] c" %s \0A\00"
define signext i8 @opcao_menu() {
%1 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%2 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([52 x i8], [52 x i8]* @.str.1, i64 0, i64 0))
%3 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.2, i64 0, i64 0))
%4 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.3, i64 0, i64 0))
%5 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%6 = tail call i32 @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
ret i8 undef
}