#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*/ printf(char *);
int valid_description(char *);
int validate_description(char *description) {
  int retval = valid_description(description);
  switch (retval) {
  case -1: {
    printf("A description of the project should be "
           "given using the --desc option\n");
    return -1;
  }
  case -2: {
    printf("The description should not begin with an "
           "indefinite or definite article such as \"A\", "
           "\"An\", \"This\" or \"The\"\n");
    return -1;
  }
  case -3: {
    printf("The description should not begin with a "
           "space or tab character\n");
    return -1;
  }
  }
  return 0;
}


x86 assembly (clang, -O0):
<validate_description>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <valid_description@plt>
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
sub    $0xfffffffd,%eax
je     119e <validate_description+0x7e>
jmp    114c <validate_description+0x2c>
mov    -0x18(%rbp),%eax
sub    $0xfffffffe,%eax
je     1186 <validate_description+0x66>
jmp    115d <validate_description+0x3d>
mov    -0x18(%rbp),%eax
sub    $0xffffffff,%eax
jne    11b6 <validate_description+0x96>
jmp    116e <validate_description+0x4e>
lea    0xe8b(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11bd <validate_description+0x9d>
lea    0xeb9(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11bd <validate_description+0x9d>
lea    0xf0d(%rip),%rdi
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    11bd <validate_description+0x9d>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<validate_description>:
push   %rax
call   1040 <valid_description@plt>
xor    %ecx,%ecx
cmp    $0xfffffffd,%eax
jb     114a <validate_description+0x2a>
add    $0x3,%eax
cltq
lea    0xfb7(%rip),%rcx
movslq (%rcx,%rax,4),%rdi
add    %rcx,%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ecx
mov    %ecx,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [70 x i8] c"A description of the project should be given using the --desc option\0A\00"
@.str.1 = [108 x i8] c"The description should not begin with an indefinite or definite article such as \22A\22, \22An\22, \22This\22 or \22The\22\0A\00"
@.str.2 = [64 x i8] c"The description should not begin with a space or tab character\0A\00"
define i32 @validate_description(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
%5 = load i8*, i8** %3
%6 = call i32 @valid_description(i8* %5)
store i32 %6, i32* %4
%7 = load i32, i32* %4
switch i32 %7, label %14 [
i32 -1, label %8
i32 -2, label %10
i32 -3, label %12
]
8: ; preds = %1
%9 = call i32 @printf(i8* getelementptr inbounds ([70 x i8], [70 x i8]* @.str, i64 0, i64 0))
store i32 -1, i32* %2
br label %15
10: ; preds = %1
%11 = call i32 @printf(i8* getelementptr inbounds ([108 x i8], [108 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %2
br label %15
12: ; preds = %1
%13 = call i32 @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.2, i64 0, i64 0))
store i32 -1, i32* %2
br label %15
14: ; preds = %1
store i32 0, i32* %2
br label %15
15: ; preds = %14, %12, %10, %8
%16 = load i32, i32* %2
ret i32 %16
}

LLVM IR (-O2):
@str = [63 x i8] c"The description should not begin with a space or tab character\00"
@str.3 = [107 x i8] c"The description should not begin with an indefinite or definite article such as \22A\22, \22An\22, \22This\22 or \22The\22\00"
@str.4 = [69 x i8] c"A description of the project should be given using the --desc option\00"
@reltable.validate_description = [3 x i32] [i32 trunc (i64 sub (i64 ptrtoint ([63 x i8]* @str to i64), i64 ptrtoint ([3 x i32]* @reltable.validate_description to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([107 x i8]* @str.3 to i64), i64 ptrtoint ([3 x i32]* @reltable.validate_description to i64)) to i32), i32 trunc (i64 sub (i64 ptrtoint ([69 x i8]* @str.4 to i64), i64 ptrtoint ([3 x i32]* @reltable.validate_description to i64)) to i32)]
define i32 @validate_description(i8* %0) {
%2 = tail call i32 @valid_description(i8* %0)
%3 = icmp ugt i32 %2, -4
br i1 %3, label %4, label %10
4: ; preds = %1
%5 = add i32 %2, 3
%6 = sext i32 %5 to i64
%7 = shl i64 %6, 2
%8 = call i8* @llvm.load.relative.i64(i8* bitcast ([3 x i32]* @reltable.validate_description to i8*), i64 %7)
%9 = tail call i32 @puts(i8* dereferenceable(1) %8)
br label %10
10: ; preds = %1, %4
%11 = phi i32 [ 0, %1 ], [ -1, %4 ]
ret i32 %11
}