#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 */
scalar_t__ cmpstr(char *, char *);
int /*<<< orphan*/ deleteMsgQueue(char *);
int /*<<< orphan*/ getMsgQueue(char *, char *);
int /*<<< orphan*/ print(char *);
int /*<<< orphan*/ printLn(char *);
void recibe_int() {
  char buff[100];
  printLn("Bienvenido!");
  printLn("Como te llamas?");
  print("- ");
  getMsgQueue(buff, "interactivconv");
  printLn("-----------------");
  print("Hola ");
  printLn(buff);
  printLn("Como estas?");
  print("- ");
  getMsgQueue(buff, "interactivconv");
  printLn("-----------------");
  print(buff);
  printLn("?");
  printLn("Hay que estar GENIAL");
  printLn("Asi que va devuelta, como estas?");
  print("- ");
  getMsgQueue(buff, "interactivconv");
  printLn("-----------------");
  if (cmpstr(buff, "GENIAL") || cmpstr(buff, "genial")) {
    printLn("AHORA SIII");
  } else {
    printLn("Booooo!!!");
  }
  deleteMsgQueue("interactivconv");
  printLn("");
  print("$ ");
}


x86 assembly (clang, -O0):
<recibe_int>:
push   %rbp
mov    %rsp,%rbp
sub    $0x70,%rsp
lea    0xea1(%rip),%rdi
call   1050 <printLn@plt>
lea    0xea1(%rip),%rdi
call   1050 <printLn@plt>
lea    0xea5(%rip),%rdi
call   1040 <print@plt>
lea    -0x70(%rbp),%rdi
lea    0xe98(%rip),%rsi
call   1030 <getMsgQueue@plt>
lea    0xe9b(%rip),%rdi
call   1050 <printLn@plt>
lea    0xea1(%rip),%rdi
call   1040 <print@plt>
lea    -0x70(%rbp),%rdi
call   1050 <printLn@plt>
lea    0xe92(%rip),%rdi
call   1050 <printLn@plt>
lea    0xe5c(%rip),%rdi
call   1040 <print@plt>
lea    -0x70(%rbp),%rdi
lea    0xe4f(%rip),%rsi
call   1030 <getMsgQueue@plt>
lea    0xe52(%rip),%rdi
call   1050 <printLn@plt>
lea    -0x70(%rbp),%rdi
call   1040 <print@plt>
lea    0xe29(%rip),%rdi
call   1050 <printLn@plt>
lea    0xe55(%rip),%rdi
call   1050 <printLn@plt>
lea    0xe5e(%rip),%rdi
call   1050 <printLn@plt>
lea    0xe07(%rip),%rdi
call   1040 <print@plt>
lea    -0x70(%rbp),%rdi
lea    0xdfa(%rip),%rsi
call   1030 <getMsgQueue@plt>
lea    0xdfd(%rip),%rdi
call   1050 <printLn@plt>
lea    -0x70(%rbp),%rdi
lea    0xe1f(%rip),%rsi
call   1070 <cmpstr@plt>
cmp    $0x0,%rax
jne    126a <recibe_int+0x11a>
lea    -0x70(%rbp),%rdi
lea    0xe2d(%rip),%rsi
call   1070 <cmpstr@plt>
cmp    $0x0,%rax
je     127b <recibe_int+0x12b>
lea    0xe1e(%rip),%rdi
call   1050 <printLn@plt>
jmp    1287 <recibe_int+0x137>
lea    0xe18(%rip),%rdi
call   1050 <printLn@plt>
lea    0xd91(%rip),%rdi
call   1060 <deleteMsgQueue@plt>
lea    0xe0c(%rip),%rdi
call   1050 <printLn@plt>
lea    0xdfe(%rip),%rdi
call   1040 <print@plt>
add    $0x70,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<recibe_int>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x68,%rsp
lea    0xe9e(%rip),%rdi
call   1050 <printLn@plt>
lea    0xe9e(%rip),%rdi
call   1050 <printLn@plt>
lea    0xea2(%rip),%r14
mov    %r14,%rdi
call   1040 <print@plt>
lea    0xe96(%rip),%r15
mov    %rsp,%rbx
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <getMsgQueue@plt>
lea    0xe90(%rip),%r12
mov    %r12,%rdi
call   1050 <printLn@plt>
lea    0xe93(%rip),%rdi
call   1040 <print@plt>
mov    %rbx,%rdi
call   1050 <printLn@plt>
lea    0xe85(%rip),%rdi
call   1050 <printLn@plt>
mov    %r14,%rdi
call   1040 <print@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <getMsgQueue@plt>
mov    %r12,%rdi
call   1050 <printLn@plt>
mov    %rbx,%rdi
call   1040 <print@plt>
lea    0xe2a(%rip),%rdi
call   1050 <printLn@plt>
lea    0xe56(%rip),%rdi
call   1050 <printLn@plt>
lea    0xe5f(%rip),%rdi
call   1050 <printLn@plt>
mov    %r14,%rdi
call   1040 <print@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1030 <getMsgQueue@plt>
mov    %r12,%rdi
call   1050 <printLn@plt>
lea    0xe31(%rip),%rsi
mov    %rbx,%rdi
call   1070 <cmpstr@plt>
test   %rax,%rax
je     1245 <recibe_int+0xf5>
lea    0xe4c(%rip),%rdi
jmp    1269 <recibe_int+0x119>
lea    0xe3c(%rip),%rsi
mov    %rsp,%rdi
call   1070 <cmpstr@plt>
test   %rax,%rax
lea    0xe3c(%rip),%rax
lea    0xe2a(%rip),%rdi
cmove  %rax,%rdi
call   1050 <printLn@plt>
lea    0xdaa(%rip),%rdi
call   1060 <deleteMsgQueue@plt>
lea    0xe25(%rip),%rdi
call   1050 <printLn@plt>
lea    0xe17(%rip),%rdi
call   1040 <print@plt>
add    $0x68,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [12 x i8] c"Bienvenido!\00"
@.str.1 = [16 x i8] c"Como te llamas?\00"
@.str.2 = [3 x i8] c"- \00"
@.str.3 = [15 x i8] c"interactivconv\00"
@.str.4 = [18 x i8] c"-----------------\00"
@.str.5 = [6 x i8] c"Hola \00"
@.str.6 = [12 x i8] c"Como estas?\00"
@.str.7 = [2 x i8] c"?\00"
@.str.8 = [21 x i8] c"Hay que estar GENIAL\00"
@.str.9 = [33 x i8] c"Asi que va devuelta, como estas?\00"
@.str.10 = [7 x i8] c"GENIAL\00"
@.str.11 = [7 x i8] c"genial\00"
@.str.12 = [11 x i8] c"AHORA SIII\00"
@.str.13 = [10 x i8] c"Booooo!!!\00"
@.str.14 = [1 x i8] zeroinitializer
@.str.15 = [3 x i8] c"$ \00"
define void @recibe_int() {
%1 = alloca [100 x i8]
%2 = call i32 @printLn(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%3 = call i32 @printLn(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%5 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%6 = call i32 @getMsgQueue(i8* %5, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printLn(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%9 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%10 = call i32 @printLn(i8* %9)
%11 = call i32 @printLn(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%12 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%13 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%14 = call i32 @getMsgQueue(i8* %13, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%15 = call i32 @printLn(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%16 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%17 = call i32 @print(i8* %16)
%18 = call i32 @printLn(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%19 = call i32 @printLn(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%20 = call i32 @printLn(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%21 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%22 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%23 = call i32 @getMsgQueue(i8* %22, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%24 = call i32 @printLn(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%25 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%26 = call i64 @cmpstr(i8* %25, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%27 = icmp ne i64 %26, 0
br i1 %27, label %32, label %28
28: ; preds = %0
%29 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%30 = call i64 @cmpstr(i8* %29, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%31 = icmp ne i64 %30, 0
br i1 %31, label %32, label %34
32: ; preds = %28, %0
%33 = call i32 @printLn(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0))
br label %36
34: ; preds = %28
%35 = call i32 @printLn(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0))
br label %36
36: ; preds = %34, %32
%37 = call i32 @deleteMsgQueue(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%38 = call i32 @printLn(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.14, i64 0, i64 0))
%39 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [12 x i8] c"Bienvenido!\00"
@.str.1 = [16 x i8] c"Como te llamas?\00"
@.str.2 = [3 x i8] c"- \00"
@.str.3 = [15 x i8] c"interactivconv\00"
@.str.4 = [18 x i8] c"-----------------\00"
@.str.5 = [6 x i8] c"Hola \00"
@.str.6 = [12 x i8] c"Como estas?\00"
@.str.7 = [2 x i8] c"?\00"
@.str.8 = [21 x i8] c"Hay que estar GENIAL\00"
@.str.9 = [33 x i8] c"Asi que va devuelta, como estas?\00"
@.str.10 = [7 x i8] c"GENIAL\00"
@.str.11 = [7 x i8] c"genial\00"
@.str.12 = [11 x i8] c"AHORA SIII\00"
@.str.13 = [10 x i8] c"Booooo!!!\00"
@.str.14 = [1 x i8] zeroinitializer
@.str.15 = [3 x i8] c"$ \00"
define void @recibe_int() {
%1 = alloca [100 x i8]
%2 = getelementptr inbounds [100 x i8], [100 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printLn(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @printLn(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%6 = call i32 @getMsgQueue(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%7 = call i32 @printLn(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%8 = call i32 @print(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0))
%9 = call i32 @printLn(i8* %2)
%10 = call i32 @printLn(i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.6, i64 0, i64 0))
%11 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @getMsgQueue(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%13 = call i32 @printLn(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%14 = call i32 @print(i8* %2)
%15 = call i32 @printLn(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
%16 = call i32 @printLn(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.8, i64 0, i64 0))
%17 = call i32 @printLn(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.9, i64 0, i64 0))
%18 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%19 = call i32 @getMsgQueue(i8* %2, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%20 = call i32 @printLn(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
%21 = call i64 @cmpstr(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.10, i64 0, i64 0))
%22 = icmp eq i64 %21, 0
br i1 %22, label %23, label %27
23: ; preds = %0
%24 = call i64 @cmpstr(i8* %2, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.11, i64 0, i64 0))
%25 = icmp eq i64 %24, 0
%26 = select i1 %25, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0)
br label %27
27: ; preds = %23, %0
%28 = phi i8* [ getelementptr inbounds ([11 x i8], [11 x i8]* @.str.12, i64 0, i64 0), %0 ], [ %26, %23 ]
%29 = call i32 @printLn(i8* %28)
%30 = call i32 @deleteMsgQueue(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0))
%31 = call i32 @printLn(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.14, i64 0, i64 0))
%32 = call i32 @print(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.15, i64 0, i64 0))
ret void
}