#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*/ exit(int);
char findFirstSymbol(char *, int);
int /*<<< orphan*/ makeTriangle(char);
int /*<<< orphan*/ printf(char *);
char *readCli(int *);
int main(int argc, const char *argv[]) {
  int textLength = 0;
  char *text = readCli(&textLength);
  char symbol = findFirstSymbol(text, textLength);
  if (symbol == '0') {
    printf("No non-alphanumeric symbols have been found in provided text.\n");
    exit(2);
  } else {
    makeTriangle(symbol);
  }
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
lea    -0x14(%rbp),%rdi
call   1060 <readCli@plt>
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rdi
mov    -0x14(%rbp),%esi
call   1030 <findFirstSymbol@plt>
mov    %al,-0x21(%rbp)
movsbl -0x21(%rbp),%eax
cmp    $0x30,%eax
jne    11ac <main+0x5c>
lea    0xe63(%rip),%rdi
call   1040 <printf@plt>
mov    $0x2,%edi
call   1070 <exit@plt>
movsbl -0x21(%rbp),%edi
call   1050 <makeTriangle@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
movl   $0x0,0x4(%rsp)
lea    0x4(%rsp),%rdi
call   1060 <readCli@plt>
mov    0x4(%rsp),%esi
mov    %rax,%rdi
call   1030 <findFirstSymbol@plt>
cmp    $0x30,%al
je     117f <main+0x2f>
movsbl %al,%edi
call   1050 <makeTriangle@plt>
xor    %eax,%eax
pop    %rcx
ret
lea    0xe7a(%rip),%rdi
call   1040 <puts@plt>
mov    $0x2,%edi
call   1070 <exit@plt>

LLVM IR (-O0):
@.str = [63 x i8] c"No non-alphanumeric symbols have been found in provided text.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%9 = call i8* @readCli(i32* %6)
store i8* %9, i8** %7
%10 = load i8*, i8** %7
%11 = load i32, i32* %6
%12 = call signext i8 @findFirstSymbol(i8* %10, i32 %11)
store i8 %12, i8* %8
%13 = load i8, i8* %8
%14 = sext i8 %13 to i32
%15 = icmp eq i32 %14, 48
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = call i32 @printf(i8* getelementptr inbounds ([63 x i8], [63 x i8]* @.str, i64 0, i64 0))
%18 = call i32 @exit(i32 2)
unreachable
19: ; preds = %2
%20 = load i8, i8* %8
%21 = call i32 @makeTriangle(i8 signext %20)
br label %22
22: ; preds = %19
ret i32 0
}

LLVM IR (-O2):
@str = [62 x i8] c"No non-alphanumeric symbols have been found in provided text.\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca i32
%4 = bitcast i32* %3 to i8*
store i32 0, i32* %3
%5 = call i8* @readCli(i32* %3)
%6 = load i32, i32* %3
%7 = call signext i8 @findFirstSymbol(i8* %5, i32 %6)
%8 = icmp eq i8 %7, 48
br i1 %8, label %9, label %12
9: ; preds = %2
%10 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([62 x i8], [62 x i8]* @str, i64 0, i64 0))
%11 = call i32 @exit(i32 2)
unreachable
12: ; preds = %2
%13 = call i32 @makeTriangle(i8 signext %7)
ret i32 0
}