#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*/ fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stdin;
scalar_t__ strcmp(char *, char *);
size_t strcspn(char *, char *);
int main() {
  char sld[19];
  printf("\t\t ========== Calculadora de Volume ==========");
  while (1) {
    printf("\nDigite o sólido: ");
    fgets(sld, 18, stdin);
    sld[strcspn(sld, "\n")] = 0;
    if (strcmp(sld, "cilindro") == 0)
      break;
    printf("\nObjeto inválido");
  }
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xeaa(%rip),%rdi
call   1030 <printf@plt>
lea    0xecd(%rip),%rdi
call   1030 <printf@plt>
lea    -0x20(%rbp),%rdi
mov    0x2e76(%rip),%rax
mov    (%rax),%edx
mov    $0x12,%esi
call   1050 <fgets@plt>
lea    -0x20(%rbp),%rdi
lea    0xeba(%rip),%rsi
call   1040 <strcspn@plt>
movb   $0x0,-0x20(%rbp,%rax,1)
lea    -0x20(%rbp),%rdi
lea    0xea7(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    11b2 <main+0x72>
jmp    11c3 <main+0x83>
lea    0xe95(%rip),%rdi
call   1030 <printf@plt>
jmp    115b <main+0x1b>
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
lea    0xeab(%rip),%rdi
call   1030 <printf@plt>
lea    0xece(%rip),%r14
mov    0x2e80(%rip),%rbp
mov    %rsp,%rbx
lea    0xed1(%rip),%r15
lea    0xecc(%rip),%r12
lea    0xece(%rip),%r13
mov    %r14,%rdi
call   1030 <printf@plt>
mov    0x0(%rbp),%edx
mov    %rbx,%rdi
mov    $0x12,%esi
call   1050 <fgets@plt>
mov    %rbx,%rdi
mov    %r15,%rsi
call   1040 <strcspn@plt>
movb   $0x0,(%rsp,%rax,1)
mov    %rbx,%rdi
mov    %r12,%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     11c1 <main+0x81>
mov    %r13,%rdi
call   1030 <printf@plt>
jmp    1180 <main+0x40>
xor    %eax,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [47 x i8] c"\09\09 ========== Calculadora de Volume ==========\00"
@.str.1 = [20 x i8] c"\0ADigite o s\C3\B3lido: \00"
@stdin = global i32 0
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [9 x i8] c"cilindro\00"
@.str.4 = [18 x i8] c"\0AObjeto inv\C3\A1lido\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca [19 x i8]
store i32 0, i32* %1
%3 = call i32 @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %0, %16
%5 = call i32 @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%6 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 0
%7 = load i32, i32* @stdin
%8 = call i32 @fgets(i8* %6, i32 18, i32 %7)
%9 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 0
%10 = call i64 @strcspn(i8* %9, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%11 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 %10
store i8 0, i8* %11
%12 = getelementptr inbounds [19 x i8], [19 x i8]* %2, i64 0, i64 0
%13 = call i64 @strcmp(i8* %12, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %4
br label %18
16: ; preds = %4
%17 = call i32 @printf(i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
br label %4
18: ; preds = %15
%19 = load i32, i32* %1
ret i32 %19
}

LLVM IR (-O2):
@.str = [47 x i8] c"\09\09 ========== Calculadora de Volume ==========\00"
@.str.1 = [20 x i8] c"\0ADigite o s\C3\B3lido: \00"
@stdin = global i32 0
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [9 x i8] c"cilindro\00"
@.str.4 = [18 x i8] c"\0AObjeto inv\C3\A1lido\00"
define i32 @main() {
%1 = alloca [19 x i8]
%2 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 0
%3 = tail call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([47 x i8], [47 x i8]* @.str, i64 0, i64 0))
br label %4
4: ; preds = %12, %0
%5 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.1, i64 0, i64 0))
%6 = load i32, i32* @stdin
%7 = call i32 @fgets(i8* %2, i32 18, i32 %6)
%8 = call i64 @strcspn(i8* %2, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
%9 = getelementptr inbounds [19 x i8], [19 x i8]* %1, i64 0, i64 %8
store i8 0, i8* %9
%10 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0))
%11 = icmp eq i64 %10, 0
br i1 %11, label %14, label %12
12: ; preds = %4
%13 = call i32 @printf(i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.4, i64 0, i64 0))
br label %4
14: ; preds = %4
ret i32 0
}