#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 strlen(char *);
int main(int argc, char **argv) {
  char *YYCURSOR = argv[1];
  char *YYLIMIT = YYCURSOR + strlen(YYCURSOR);
  {
    unsigned char yych;
    {}
  }
  {
    unsigned char yych;
    goto yy3;
  yy4:
    ++YYCURSOR;
  yy3:
    if (YYLIMIT <= YYCURSOR)
      do {
      } while (0);
    yych = *YYCURSOR;
    switch (yych) {
    case 'a':
      goto yy7;
    case 'b':
    case 'c':
      goto yy6;
    default:
      goto yy4;
    }
  yy6 : {
    printf("exit 0\n");
    return 0;
  }
  yy7:
    ++YYCURSOR;
    yych = *YYCURSOR;
    goto yy6;
  }
  printf("exit 1\n");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x18(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x30(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0x20(%rbp)
jmp    1174 <main+0x54>
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x20(%rbp),%rax
cmp    -0x18(%rbp),%rax
ja     1191 <main+0x71>
jmp    1187 <main+0x67>
jmp    118c <main+0x6c>
jmp    1191 <main+0x71>
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x22(%rbp)
movzbl -0x22(%rbp),%eax
mov    %eax,-0x34(%rbp)
sub    $0x61,%eax
je     11c3 <main+0xa3>
jmp    11af <main+0x8f>
mov    -0x34(%rbp),%eax
add    $0xffffff9e,%eax
sub    $0x2,%eax
jb     11c8 <main+0xa8>
jmp    11cd <main+0xad>
jmp    11e6 <main+0xc6>
jmp    11d2 <main+0xb2>
jmp    1168 <main+0x48>
lea    0xe27(%rip),%rdi
call   1040 <printf@plt>
xor    %eax,%eax
add    $0x40,%rsp
pop    %rbp
ret
mov    -0x18(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x18(%rbp)
mov    -0x18(%rbp),%rax
mov    (%rax),%al
mov    %al,-0x22(%rbp)
jmp    11d2 <main+0xb2>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x8(%rsi),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
nopl   (%rax)
movzbl (%rbx),%eax
add    $0x9f,%al
add    $0x1,%rbx
cmp    $0x2,%al
ja     1130 <main+0x10>
lea    0xebc(%rip),%rdi
call   1030 <puts@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@.str = [8 x i8] c"exit 0\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8
%9 = alloca i8
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i8**, i8*** %5
%11 = getelementptr inbounds i8*, i8** %10, i64 1
%12 = load i8*, i8** %11
store i8* %12, i8** %6
%13 = load i8*, i8** %6
%14 = load i8*, i8** %6
%15 = call i32 @strlen(i8* %14)
%16 = sext i32 %15 to i64
%17 = getelementptr inbounds i8, i8* %13, i64 %16
store i8* %17, i8** %7
br label %21
18: ; preds = %35
%19 = load i8*, i8** %6
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %6
br label %21
21: ; preds = %18, %2
%22 = load i8*, i8** %7
%23 = load i8*, i8** %6
%24 = icmp ule i8* %22, %23
br i1 %24, label %25, label %28
25: ; preds = %21
br label %26
26: ; preds = %25
br label %27
27: ; preds = %26
br label %28
28: ; preds = %27, %21
%29 = load i8*, i8** %6
%30 = load i8, i8* %29
store i8 %30, i8* %9
%31 = load i8, i8* %9
%32 = zext i8 %31 to i32
switch i32 %32, label %35 [
i32 97, label %33
i32 98, label %34
i32 99, label %34
]
33: ; preds = %28
br label %38
34: ; preds = %28, %28
br label %36
35: ; preds = %28
br label %18
36: ; preds = %38, %34
%37 = call i32 @printf(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0))
ret i32 0
38: ; preds = %33
%39 = load i8*, i8** %6
%40 = getelementptr inbounds i8, i8* %39, i32 1
store i8* %40, i8** %6
%41 = load i8*, i8** %6
%42 = load i8, i8* %41
store i8 %42, i8* %9
br label %36
}

LLVM IR (-O2):
@str = [7 x i8] c"exit 0\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = getelementptr inbounds i8*, i8** %1, i64 1
%4 = load i8*, i8** %3
%5 = tail call i32 @strlen(i8* %4)
br label %6
6: ; preds = %6, %2
%7 = phi i8* [ %4, %2 ], [ %11, %6 ]
%8 = load i8, i8* %7
%9 = add i8 %8, -97
%10 = icmp ult i8 %9, 3
%11 = getelementptr inbounds i8, i8* %7, i64 1
br i1 %10, label %12, label %6
12: ; preds = %6
%13 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @str, i64 0, i64 0))
ret i32 0
}