#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__ isAlphanumeric(char const *);
int /*<<< orphan*/ printf(char *, char const *);
int main(int argc, char **argv) {
  if (argc != 2)
    return 1;
  const char *str = argv[1];
  if (isAlphanumeric(str)) {
    printf("`%s` is alphanumeric.\n", str);
  } else {
    printf("`%s` is not alphanumeric.\n", str);
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     114c <main+0x2c>
movl   $0x1,-0x4(%rbp)
jmp    1197 <main+0x77>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rdi
call   1040 <isAlphanumeric@plt>
cmp    $0x0,%rax
je     1180 <main+0x60>
mov    -0x18(%rbp),%rsi
lea    0xe8a(%rip),%rdi
call   1030 <printf@plt>
jmp    1190 <main+0x70>
mov    -0x18(%rbp),%rsi
lea    0xe8c(%rip),%rdi
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
mov    $0x1,%eax
cmp    $0x2,%edi
jne    1157 <main+0x37>
push   %rbx
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1040 <isAlphanumeric@plt>
test   %rax,%rax
lea    0xed6(%rip),%rax
lea    0xeb8(%rip),%rdi
cmove  %rax,%rdi
mov    %rbx,%rsi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [23 x i8] c"`%s` is alphanumeric.\0A\00"
@.str.1 = [27 x i8] c"`%s` is not alphanumeric.\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%7 = load i32, i32* %4
%8 = icmp ne i32 %7, 2
br i1 %8, label %9, label %10
9: ; preds = %2
store i32 1, i32* %3
br label %24
10: ; preds = %2
%11 = load i8**, i8*** %5
%12 = getelementptr inbounds i8*, i8** %11, i64 1
%13 = load i8*, i8** %12
store i8* %13, i8** %6
%14 = load i8*, i8** %6
%15 = call i64 @isAlphanumeric(i8* %14)
%16 = icmp ne i64 %15, 0
br i1 %16, label %17, label %20
17: ; preds = %10
%18 = load i8*, i8** %6
%19 = call i32 @printf(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0), i8* %18)
br label %23
20: ; preds = %10
%21 = load i8*, i8** %6
%22 = call i32 @printf(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* %21)
br label %23
23: ; preds = %20, %17
store i32 0, i32* %3
br label %24
24: ; preds = %23, %9
%25 = load i32, i32* %3
ret i32 %25
}

LLVM IR (-O2):
@.str = [23 x i8] c"`%s` is alphanumeric.\0A\00"
@.str.1 = [27 x i8] c"`%s` is not alphanumeric.\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = icmp eq i32 %0, 2
br i1 %3, label %4, label %11
4: ; preds = %2
%5 = getelementptr inbounds i8*, i8** %1, i64 1
%6 = load i8*, i8** %5
%7 = tail call i64 @isAlphanumeric(i8* %6)
%8 = icmp eq i64 %7, 0
%9 = select i1 %8, i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str, i64 0, i64 0)
%10 = tail call i32 @printf(i8* %9, i8* %6)
br label %11
11: ; preds = %4, %2
%12 = phi i32 [ 1, %2 ], [ 0, %4 ]
ret i32 %12
}