#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 */
typedef int /*<<< orphan*/ name;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ isstralnum(char *);
int /*<<< orphan*/ printf(char *, char *);
int /*<<< orphan*/ readstring(char *, int);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  char name[255];
  do {
    fprintf(stderr,
            "-- Type the name of your project (alpha numeric digits): ");
    readstring(name, sizeof(name));
    if (!isstralnum(name)) {
      fprintf(stderr,
              "-- Error: Use only alpha numerical digits!\n%s not accepted!\n",
              name);
      *name = '\0';
    }
  } while (*name == '\0');
  printf("%s", name);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x110,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    0x2e80(%rip),%rax
mov    (%rax),%edi
lea    0xe97(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
lea    -0x110(%rbp),%rdi
mov    $0xff,%esi
call   1060 <readstring@plt>
lea    -0x110(%rbp),%rdi
call   1030 <isstralnum@plt>
cmp    $0x0,%eax
jne    11bb <main+0x7b>
mov    0x2e43(%rip),%rax
mov    (%rax),%edi
lea    -0x110(%rbp),%rdx
lea    0xe8d(%rip),%rsi
mov    $0x0,%al
call   1050 <fprintf@plt>
movb   $0x0,-0x110(%rbp)
jmp    11c0 <main+0x80>
movsbl -0x110(%rbp),%eax
cmp    $0x0,%eax
je     1159 <main+0x19>
lea    -0x110(%rbp),%rsi
lea    0xe99(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x110,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x100,%rsp
mov    0x2e8a(%rip),%r12
lea    0xea3(%rip),%r14
mov    %rsp,%rbx
lea    0xed3(%rip),%r15
jmp    1179 <main+0x39>
nopl   0x0(%rax)
movzbl (%rsp),%ebp
test   %bpl,%bpl
jne    11bc <main+0x7c>
mov    (%r12),%edi
mov    %r14,%rsi
xor    %eax,%eax
call   1050 <fprintf@plt>
mov    %rbx,%rdi
mov    $0xff,%esi
call   1060 <readstring@plt>
mov    %rbx,%rdi
call   1030 <isstralnum@plt>
test   %eax,%eax
jne    1170 <main+0x30>
mov    (%r12),%edi
xor    %ebp,%ebp
mov    %r15,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <fprintf@plt>
movb   $0x0,(%rsp)
test   %bpl,%bpl
je     1179 <main+0x39>
lea    0xeb4(%rip),%rdi
mov    %rsp,%rsi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x100,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@stderr = global i32 0
@.str = [58 x i8] c"-- Type the name of your project (alpha numeric digits): \00"
@.str.1 = [61 x i8] c"-- Error: Use only alpha numerical digits!\0A%s not accepted!\0A\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [255 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %7
7: ; preds = %21, %2
%8 = load i32, i32* @stderr
%9 = call i32 (i32, i8*, ...) @fprintf(i32 %8, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%10 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%11 = call i32 @readstring(i8* %10, i32 255)
%12 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%13 = call i32 @isstralnum(i8* %12)
%14 = icmp ne i32 %13, 0
br i1 %14, label %20, label %15
15: ; preds = %7
%16 = load i32, i32* @stderr
%17 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%18 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0), i8* %17)
%19 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
store i8 0, i8* %19
br label %20
20: ; preds = %15, %7
br label %21
21: ; preds = %20
%22 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%23 = load i8, i8* %22
%24 = sext i8 %23 to i32
%25 = icmp eq i32 %24, 0
br i1 %25, label %7, label %26
26: ; preds = %21
%27 = getelementptr inbounds [255 x i8], [255 x i8]* %6, i64 0, i64 0
%28 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %27)
ret i32 0
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [58 x i8] c"-- Type the name of your project (alpha numeric digits): \00"
@.str.1 = [61 x i8] c"-- Error: Use only alpha numerical digits!\0A%s not accepted!\0A\00"
@.str.2 = [3 x i8] c"%s\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [255 x i8]
%4 = getelementptr inbounds [255 x i8], [255 x i8]* %3, i64 0, i64 0
br label %5
5: ; preds = %16, %2
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str, i64 0, i64 0))
%8 = call i32 @readstring(i8* %4, i32 255)
%9 = call i32 @isstralnum(i8* %4)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %14
11: ; preds = %5
%12 = load i32, i32* @stderr
%13 = call i32 (i32, i8*, ...) @fprintf(i32 %12, i8* getelementptr inbounds ([61 x i8], [61 x i8]* @.str.1, i64 0, i64 0), i8* %4)
store i8 0, i8* %4
br label %16
14: ; preds = %5
%15 = load i8, i8* %4
br label %16
16: ; preds = %14, %11
%17 = phi i8 [ %15, %14 ], [ 0, %11 ]
%18 = icmp eq i8 %17, 0
br i1 %18, label %5, label %19
19: ; preds = %16
%20 = call i32 @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0), i8* %4)
ret i32 0
}