#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 uint;

/* Variables and functions */
int /*<<< orphan*/ isalnum(char);
scalar_t__ isalpha(char);
int /*<<< orphan*/ strcmp(char *, char *);
int strlen(char *);
char *strstr(char *, char *);
uint pasm_get_arg_type(char *arg) {
  if (!strcmp(arg, "ra") || !strcmp(arg, "rb") || !strcmp(arg, "rc") ||
      !strcmp(arg, "rd") || !strcmp(arg, "rip") || !strcmp(arg, "rbp") ||
      !strcmp(arg, "rsp")) {
    return 0;
  }
  if (arg[0] == '$' && strlen(arg) > 1) {
    for (int i = 1; i < strlen(arg); i++) {
      if (arg[i] < '0' || arg[i] > '9') {
        return 4;
      }
    }
    return 1;
  }
  if ((strstr(arg, "(0x") == arg || strstr(arg, "(d0x") == arg) &&
      arg[strlen(arg) - 1] == ')') {
    char *c = arg;
    while (*c != 'x')
      c++;
    c++;
    while (*c != ')') {
      if ((*c < '0' || *c > '9') && (*c < 'A' || *c > 'F') &&
          (*c < 'a' || *c > 'f')) {
        return 4;
      }
    }
    if (arg[1] == 'd') {
      return 3;
    } else {
      return 2;
    }
  }
  if (arg[0] == '%') {
    if (isalpha(arg[1])) {
      int label = 1;
      for (int i = 2; i < strlen(arg); i++) {
        if (!isalnum(arg[i])) {
          label = 0;
        }
      }
      if (label) {
        return 5;
      }
    }
  }
  return 4;
}


x86 assembly (clang, -O0):
<pasm_get_arg_type>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x10(%rbp)
mov    -0x10(%rbp),%rdi
lea    0xe99(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     120b <pasm_get_arg_type+0xbb>
mov    -0x10(%rbp),%rdi
lea    0xe83(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     120b <pasm_get_arg_type+0xbb>
mov    -0x10(%rbp),%rdi
lea    0xe6d(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     120b <pasm_get_arg_type+0xbb>
mov    -0x10(%rbp),%rdi
lea    0xe57(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     120b <pasm_get_arg_type+0xbb>
mov    -0x10(%rbp),%rdi
lea    0xe41(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     120b <pasm_get_arg_type+0xbb>
mov    -0x10(%rbp),%rdi
lea    0xe2c(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
je     120b <pasm_get_arg_type+0xbb>
mov    -0x10(%rbp),%rdi
lea    0xe17(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%eax
jne    1217 <pasm_get_arg_type+0xc7>
movl   $0x0,-0x4(%rbp)
jmp    149a <pasm_get_arg_type+0x34a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x24,%eax
jne    12b1 <pasm_get_arg_type+0x161>
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x1,%eax
jle    12b1 <pasm_get_arg_type+0x161>
movl   $0x1,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x2c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x2c(%rbp),%eax
cmp    %ecx,%eax
jge    12a5 <pasm_get_arg_type+0x155>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x30,%eax
jl     1286 <pasm_get_arg_type+0x136>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x39,%eax
jle    1292 <pasm_get_arg_type+0x142>
movl   $0x4,-0x4(%rbp)
jmp    149a <pasm_get_arg_type+0x34a>
jmp    1297 <pasm_get_arg_type+0x147>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1240 <pasm_get_arg_type+0xf0>
movl   $0x1,-0x4(%rbp)
jmp    149a <pasm_get_arg_type+0x34a>
mov    -0x10(%rbp),%rdi
lea    0xd5c(%rip),%rsi
call   1070 <strstr@plt>
cmp    -0x10(%rbp),%rax
je     12e5 <pasm_get_arg_type+0x195>
mov    -0x10(%rbp),%rdi
lea    0xd46(%rip),%rsi
call   1070 <strstr@plt>
cmp    -0x10(%rbp),%rax
jne    13ee <pasm_get_arg_type+0x29e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x38(%rbp),%rax
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x29,%eax
jne    13ee <pasm_get_arg_type+0x29e>
mov    -0x10(%rbp),%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x78,%eax
je     1338 <pasm_get_arg_type+0x1e8>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
jmp    1317 <pasm_get_arg_type+0x1c7>
mov    -0x20(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x20(%rbp)
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x29,%eax
je     13c5 <pasm_get_arg_type+0x275>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x30,%eax
jl     1374 <pasm_get_arg_type+0x224>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x39,%eax
jle    13c0 <pasm_get_arg_type+0x270>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x41,%eax
jl     1394 <pasm_get_arg_type+0x244>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x46,%eax
jle    13c0 <pasm_get_arg_type+0x270>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x61,%eax
jl     13b4 <pasm_get_arg_type+0x264>
mov    -0x20(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x66,%eax
jle    13c0 <pasm_get_arg_type+0x270>
movl   $0x4,-0x4(%rbp)
jmp    149a <pasm_get_arg_type+0x34a>
jmp    1344 <pasm_get_arg_type+0x1f4>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x64,%eax
jne    13e2 <pasm_get_arg_type+0x292>
movl   $0x3,-0x4(%rbp)
jmp    149a <pasm_get_arg_type+0x34a>
movl   $0x2,-0x4(%rbp)
jmp    149a <pasm_get_arg_type+0x34a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x25,%eax
jne    1493 <pasm_get_arg_type+0x343>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%edi
call   1060 <isalpha@plt>
cmp    $0x0,%rax
je     148e <pasm_get_arg_type+0x33e>
movl   $0x1,-0x24(%rbp)
movl   $0x2,-0x28(%rbp)
mov    -0x28(%rbp),%eax
mov    %eax,-0x3c(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,%ecx
mov    -0x3c(%rbp),%eax
cmp    %ecx,%eax
jge    1473 <pasm_get_arg_type+0x323>
mov    -0x10(%rbp),%rax
movslq -0x28(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1040 <isalnum@plt>
cmp    $0x0,%eax
jne    1460 <pasm_get_arg_type+0x310>
movl   $0x0,-0x24(%rbp)
jmp    1465 <pasm_get_arg_type+0x315>
mov    -0x28(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x28(%rbp)
jmp    1423 <pasm_get_arg_type+0x2d3>
cmpl   $0x0,-0x24(%rbp)
je     1489 <pasm_get_arg_type+0x339>
movl   $0x5,-0x4(%rbp)
jmp    149a <pasm_get_arg_type+0x34a>
jmp    148e <pasm_get_arg_type+0x33e>
jmp    1493 <pasm_get_arg_type+0x343>
movl   $0x4,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<pasm_get_arg_type>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
lea    0xe9f(%rip),%rsi
call   1060 <strcmp@plt>
xor    %r14d,%r14d
test   %eax,%eax
je     1355 <pasm_get_arg_type+0x205>
lea    0xe8b(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1355 <pasm_get_arg_type+0x205>
lea    0xe77(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1355 <pasm_get_arg_type+0x205>
lea    0xe63(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1355 <pasm_get_arg_type+0x205>
lea    0xe4f(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1355 <pasm_get_arg_type+0x205>
lea    0xe3c(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1355 <pasm_get_arg_type+0x205>
lea    0xe29(%rip),%rsi
mov    %rbx,%rdi
call   1060 <strcmp@plt>
test   %eax,%eax
je     1355 <pasm_get_arg_type+0x205>
cmpb   $0x24,(%rbx)
jne    124f <pasm_get_arg_type+0xff>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0x2,%eax
jl     124f <pasm_get_arg_type+0xff>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x1,%r14d
cmp    $0x2,%eax
jl     1355 <pasm_get_arg_type+0x205>
mov    $0x1,%ebp
movzbl (%rbx,%rbp,1),%eax
add    $0xc6,%al
cmp    $0xf6,%al
jb     134f <pasm_get_arg_type+0x1ff>
add    $0x1,%rbp
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbp
jl     1229 <pasm_get_arg_type+0xd9>
jmp    1355 <pasm_get_arg_type+0x205>
lea    0xdc2(%rip),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
je     1291 <pasm_get_arg_type+0x141>
lea    0xda5(%rip),%rbp
mov    %rbp,%rdi
call   1040 <strlen@plt>
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    %rax,%rdx
call   1030 <strncmp@plt>
test   %eax,%eax
jne    12d3 <pasm_get_arg_type+0x183>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
cmpb   $0x29,-0x1(%rax,%rbx,1)
jne    12d3 <pasm_get_arg_type+0x183>
mov    %rbx,%rax
cs nopw 0x0(%rax,%rax,1)
nop
cmpb   $0x78,(%rax)
lea    0x1(%rax),%rax
jne    12b0 <pasm_get_arg_type+0x160>
mov    (%rax),%al
cmp    $0x29,%al
jne    132d <pasm_get_arg_type+0x1dd>
xor    %r14d,%r14d
cmpb   $0x64,0x1(%rbx)
sete   %r14b
or     $0x2,%r14d
jmp    1355 <pasm_get_arg_type+0x205>
cmpb   $0x25,(%rbx)
jne    134f <pasm_get_arg_type+0x1ff>
movsbl 0x1(%rbx),%edi
call   1070 <isalpha@plt>
test   %rax,%rax
je     134f <pasm_get_arg_type+0x1ff>
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x5,%r14d
cmp    $0x3,%eax
jl     1355 <pasm_get_arg_type+0x205>
mov    $0x1,%r15d
mov    $0x2,%ebp
movsbl (%rbx,%rbp,1),%edi
call   1050 <isalnum@plt>
test   %eax,%eax
cmove  %eax,%r15d
add    $0x1,%rbp
mov    %rbx,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbp
jl     1304 <pasm_get_arg_type+0x1b4>
test   %r15d,%r15d
jne    1355 <pasm_get_arg_type+0x205>
jmp    134f <pasm_get_arg_type+0x1ff>
lea    -0x3a(%rax),%ecx
add    $0xbf,%al
movzbl %al,%edx
movabs $0x3f0000003f,%rsi
nop
cmp    $0xf5,%cl
ja     1340 <pasm_get_arg_type+0x1f0>
cmp    $0x25,%al
ja     134f <pasm_get_arg_type+0x1ff>
bt     %rdx,%rsi
jb     1340 <pasm_get_arg_type+0x1f0>
mov    $0x4,%r14d
mov    %r14d,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [3 x i8] c"ra\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [3 x i8] c"rc\00"
@.str.3 = [3 x i8] c"rd\00"
@.str.4 = [4 x i8] c"rip\00"
@.str.5 = [4 x i8] c"rbp\00"
@.str.6 = [4 x i8] c"rsp\00"
@.str.7 = [4 x i8] c"(0x\00"
@.str.8 = [5 x i8] c"(d0x\00"
define i32 @pasm_get_arg_type(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i32
store i8* %0, i8** %3
%8 = load i8*, i8** %3
%9 = call i32 @strcmp(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %35
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = call i32 @strcmp(i8* %12, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp ne i32 %13, 0
br i1 %14, label %15, label %35
15: ; preds = %11
%16 = load i8*, i8** %3
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%18 = icmp ne i32 %17, 0
br i1 %18, label %19, label %35
19: ; preds = %15
%20 = load i8*, i8** %3
%21 = call i32 @strcmp(i8* %20, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%22 = icmp ne i32 %21, 0
br i1 %22, label %23, label %35
23: ; preds = %19
%24 = load i8*, i8** %3
%25 = call i32 @strcmp(i8* %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %35
27: ; preds = %23
%28 = load i8*, i8** %3
%29 = call i32 @strcmp(i8* %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%30 = icmp ne i32 %29, 0
br i1 %30, label %31, label %35
31: ; preds = %27
%32 = load i8*, i8** %3
%33 = call i32 @strcmp(i8* %32, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%34 = icmp ne i32 %33, 0
br i1 %34, label %36, label %35
35: ; preds = %31, %27, %23, %19, %15, %11, %1
store i32 0, i32* %2
br label %190
36: ; preds = %31
%37 = load i8*, i8** %3
%38 = getelementptr inbounds i8, i8* %37, i64 0
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
%41 = icmp eq i32 %40, 36
br i1 %41, label %42, label %74
42: ; preds = %36
%43 = load i8*, i8** %3
%44 = call i32 @strlen(i8* %43)
%45 = icmp sgt i32 %44, 1
br i1 %45, label %46, label %74
46: ; preds = %42
store i32 1, i32* %4
br label %47
47: ; preds = %70, %46
%48 = load i32, i32* %4
%49 = load i8*, i8** %3
%50 = call i32 @strlen(i8* %49)
%51 = icmp slt i32 %48, %50
br i1 %51, label %52, label %73
52: ; preds = %47
%53 = load i8*, i8** %3
%54 = load i32, i32* %4
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds i8, i8* %53, i64 %55
%57 = load i8, i8* %56
%58 = sext i8 %57 to i32
%59 = icmp slt i32 %58, 48
br i1 %59, label %68, label %60
60: ; preds = %52
%61 = load i8*, i8** %3
%62 = load i32, i32* %4
%63 = sext i32 %62 to i64
%64 = getelementptr inbounds i8, i8* %61, i64 %63
%65 = load i8, i8* %64
%66 = sext i8 %65 to i32
%67 = icmp sgt i32 %66, 57
br i1 %67, label %68, label %69
68: ; preds = %60, %52
store i32 4, i32* %2
br label %190
69: ; preds = %60
br label %70
70: ; preds = %69
%71 = load i32, i32* %4
%72 = add nsw i32 %71, 1
store i32 %72, i32* %4
br label %47
73: ; preds = %47
store i32 1, i32* %2
br label %190
74: ; preds = %42, %36
%75 = load i8*, i8** %3
%76 = call i8* @strstr(i8* %75, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%77 = load i8*, i8** %3
%78 = icmp eq i8* %76, %77
br i1 %78, label %84, label %79
79: ; preds = %74
%80 = load i8*, i8** %3
%81 = call i8* @strstr(i8* %80, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%82 = load i8*, i8** %3
%83 = icmp eq i8* %81, %82
br i1 %83, label %84, label %152
84: ; preds = %79, %74
%85 = load i8*, i8** %3
%86 = load i8*, i8** %3
%87 = call i32 @strlen(i8* %86)
%88 = sub nsw i32 %87, 1
%89 = sext i32 %88 to i64
%90 = getelementptr inbounds i8, i8* %85, i64 %89
%91 = load i8, i8* %90
%92 = sext i8 %91 to i32
%93 = icmp eq i32 %92, 41
br i1 %93, label %94, label %152
94: ; preds = %84
%95 = load i8*, i8** %3
store i8* %95, i8** %5
br label %96
96: ; preds = %101, %94
%97 = load i8*, i8** %5
%98 = load i8, i8* %97
%99 = sext i8 %98 to i32
%100 = icmp ne i32 %99, 120
br i1 %100, label %101, label %104
101: ; preds = %96
%102 = load i8*, i8** %5
%103 = getelementptr inbounds i8, i8* %102, i32 1
store i8* %103, i8** %5
br label %96
104: ; preds = %96
%105 = load i8*, i8** %5
%106 = getelementptr inbounds i8, i8* %105, i32 1
store i8* %106, i8** %5
br label %107
107: ; preds = %143, %104
%108 = load i8*, i8** %5
%109 = load i8, i8* %108
%110 = sext i8 %109 to i32
%111 = icmp ne i32 %110, 41
br i1 %111, label %112, label %144
112: ; preds = %107
%113 = load i8*, i8** %5
%114 = load i8, i8* %113
%115 = sext i8 %114 to i32
%116 = icmp slt i32 %115, 48
br i1 %116, label %122, label %117
117: ; preds = %112
%118 = load i8*, i8** %5
%119 = load i8, i8* %118
%120 = sext i8 %119 to i32
%121 = icmp sgt i32 %120, 57
br i1 %121, label %122, label %143
122: ; preds = %117, %112
%123 = load i8*, i8** %5
%124 = load i8, i8* %123
%125 = sext i8 %124 to i32
%126 = icmp slt i32 %125, 65
br i1 %126, label %132, label %127
127: ; preds = %122
%128 = load i8*, i8** %5
%129 = load i8, i8* %128
%130 = sext i8 %129 to i32
%131 = icmp sgt i32 %130, 70
br i1 %131, label %132, label %143
132: ; preds = %127, %122
%133 = load i8*, i8** %5
%134 = load i8, i8* %133
%135 = sext i8 %134 to i32
%136 = icmp slt i32 %135, 97
br i1 %136, label %142, label %137
137: ; preds = %132
%138 = load i8*, i8** %5
%139 = load i8, i8* %138
%140 = sext i8 %139 to i32
%141 = icmp sgt i32 %140, 102
br i1 %141, label %142, label %143
142: ; preds = %137, %132
store i32 4, i32* %2
br label %190
143: ; preds = %137, %127, %117
br label %107
144: ; preds = %107
%145 = load i8*, i8** %3
%146 = getelementptr inbounds i8, i8* %145, i64 1
%147 = load i8, i8* %146
%148 = sext i8 %147 to i32
%149 = icmp eq i32 %148, 100
br i1 %149, label %150, label %151
150: ; preds = %144
store i32 3, i32* %2
br label %190
151: ; preds = %144
store i32 2, i32* %2
br label %190
152: ; preds = %84, %79
%153 = load i8*, i8** %3
%154 = getelementptr inbounds i8, i8* %153, i64 0
%155 = load i8, i8* %154
%156 = sext i8 %155 to i32
%157 = icmp eq i32 %156, 37
br i1 %157, label %158, label %189
158: ; preds = %152
%159 = load i8*, i8** %3
%160 = getelementptr inbounds i8, i8* %159, i64 1
%161 = load i8, i8* %160
%162 = call i64 @isalpha(i8 signext %161)
%163 = icmp ne i64 %162, 0
br i1 %163, label %164, label %188
164: ; preds = %158
store i32 1, i32* %6
store i32 2, i32* %7
br label %165
165: ; preds = %180, %164
%166 = load i32, i32* %7
%167 = load i8*, i8** %3
%168 = call i32 @strlen(i8* %167)
%169 = icmp slt i32 %166, %168
br i1 %169, label %170, label %183
170: ; preds = %165
%171 = load i8*, i8** %3
%172 = load i32, i32* %7
%173 = sext i32 %172 to i64
%174 = getelementptr inbounds i8, i8* %171, i64 %173
%175 = load i8, i8* %174
%176 = call i32 @isalnum(i8 signext %175)
%177 = icmp ne i32 %176, 0
br i1 %177, label %179, label %178
178: ; preds = %170
store i32 0, i32* %6
br label %179
179: ; preds = %178, %170
br label %180
180: ; preds = %179
%181 = load i32, i32* %7
%182 = add nsw i32 %181, 1
store i32 %182, i32* %7
br label %165
183: ; preds = %165
%184 = load i32, i32* %6
%185 = icmp ne i32 %184, 0
br i1 %185, label %186, label %187
186: ; preds = %183
store i32 5, i32* %2
br label %190
187: ; preds = %183
br label %188
188: ; preds = %187, %158
br label %189
189: ; preds = %188, %152
store i32 4, i32* %2
br label %190
190: ; preds = %189, %186, %151, %150, %142, %73, %68, %35
%191 = load i32, i32* %2
ret i32 %191
}

LLVM IR (-O2):
@.str = [3 x i8] c"ra\00"
@.str.1 = [3 x i8] c"rb\00"
@.str.2 = [3 x i8] c"rc\00"
@.str.3 = [3 x i8] c"rd\00"
@.str.4 = [4 x i8] c"rip\00"
@.str.5 = [4 x i8] c"rbp\00"
@.str.6 = [4 x i8] c"rsp\00"
@.str.7 = [4 x i8] c"(0x\00"
@.str.8 = [5 x i8] c"(d0x\00"
define i32 @pasm_get_arg_type(i8* %0) {
%2 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%3 = icmp eq i32 %2, 0
br i1 %3, label %103, label %4
4: ; preds = %1
%5 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%6 = icmp eq i32 %5, 0
br i1 %6, label %103, label %7
7: ; preds = %4
%8 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
%9 = icmp eq i32 %8, 0
br i1 %9, label %103, label %10
10: ; preds = %7
%11 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0))
%12 = icmp eq i32 %11, 0
br i1 %12, label %103, label %13
13: ; preds = %10
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.4, i64 0, i64 0))
%15 = icmp eq i32 %14, 0
br i1 %15, label %103, label %16
16: ; preds = %13
%17 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.5, i64 0, i64 0))
%18 = icmp eq i32 %17, 0
br i1 %18, label %103, label %19
19: ; preds = %16
%20 = tail call i32 @strcmp(i8* dereferenceable(1) %0, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%21 = icmp eq i32 %20, 0
br i1 %21, label %103, label %22
22: ; preds = %19
%23 = load i8, i8* %0
%24 = icmp eq i8 %23, 36
br i1 %24, label %25, label %42
25: ; preds = %22
%26 = tail call i32 @strlen(i8* %0)
%27 = icmp sgt i32 %26, 1
br i1 %27, label %28, label %42
28: ; preds = %25
%29 = tail call i32 @strlen(i8* %0)
%30 = icmp sgt i32 %29, 1
br i1 %30, label %35, label %103
31: ; preds = %35
%32 = tail call i32 @strlen(i8* %0)
%33 = sext i32 %32 to i64
%34 = icmp slt i64 %41, %33
br i1 %34, label %35, label %103
35: ; preds = %28, %31
%36 = phi i64 [ %41, %31 ], [ 1, %28 ]
%37 = getelementptr inbounds i8, i8* %0, i64 %36
%38 = load i8, i8* %37
%39 = add i8 %38, -58
%40 = icmp ult i8 %39, -10
%41 = add nuw nsw i64 %36, 1
br i1 %40, label %103, label %31
42: ; preds = %25, %22
%43 = tail call i64 bitcast (i32 (i8*)* @strlen to i64 (i8*)*)(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%44 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i64 %43)
%45 = icmp eq i32 %44, 0
br i1 %45, label %50, label %46
46: ; preds = %42
%47 = tail call i64 bitcast (i32 (i8*)* @strlen to i64 (i8*)*)(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0))
%48 = tail call i32 @strncmp(i8* %0, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.8, i64 0, i64 0), i64 %47)
%49 = icmp eq i32 %48, 0
br i1 %49, label %50, label %77
50: ; preds = %46, %42
%51 = tail call i32 @strlen(i8* %0)
%52 = add nsw i32 %51, -1
%53 = sext i32 %52 to i64
%54 = getelementptr inbounds i8, i8* %0, i64 %53
%55 = load i8, i8* %54
%56 = icmp eq i8 %55, 41
br i1 %56, label %57, label %77
57: ; preds = %50, %57
%58 = phi i8* [ %61, %57 ], [ %0, %50 ]
%59 = load i8, i8* %58
%60 = icmp eq i8 %59, 120
%61 = getelementptr inbounds i8, i8* %58, i64 1
br i1 %60, label %62, label %57
62: ; preds = %57
%63 = load i8, i8* %61
%64 = icmp eq i8 %63, 41
br i1 %64, label %72, label %65
65: ; preds = %62
%66 = freeze i8 %63
%67 = add i8 %66, -58
%68 = icmp ult i8 %67, -10
br label %69
69: ; preds = %70, %65
br i1 %68, label %71, label %70
70: ; preds = %69, %71, %71, %71, %71, %71, %71, %71, %71, %71, %71, %71, %71
br label %69
71: ; preds = %69
switch i8 %66, label %103 [
i8 102, label %70
i8 101, label %70
i8 100, label %70
i8 99, label %70
i8 98, label %70
i8 97, label %70
i8 70, label %70
i8 69, label %70
i8 68, label %70
i8 67, label %70
i8 66, label %70
i8 65, label %70
]
72: ; preds = %62
%73 = getelementptr inbounds i8, i8* %0, i64 1
%74 = load i8, i8* %73
%75 = icmp eq i8 %74, 100
%76 = select i1 %75, i32 3, i32 2
br label %103
77: ; preds = %50, %46
%78 = load i8, i8* %0
%79 = icmp eq i8 %78, 37
br i1 %79, label %80, label %102
80: ; preds = %77
%81 = getelementptr inbounds i8, i8* %0, i64 1
%82 = load i8, i8* %81
%83 = tail call i64 @isalpha(i8 signext %82)
%84 = icmp eq i64 %83, 0
br i1 %84, label %102, label %85
85: ; preds = %80
%86 = tail call i32 @strlen(i8* %0)
%87 = icmp sgt i32 %86, 2
br i1 %87, label %90, label %103
88: ; preds = %90
%89 = icmp eq i32 %97, 0
br i1 %89, label %102, label %103
90: ; preds = %85, %90
%91 = phi i64 [ %98, %90 ], [ 2, %85 ]
%92 = phi i32 [ %97, %90 ], [ 1, %85 ]
%93 = getelementptr inbounds i8, i8* %0, i64 %91
%94 = load i8, i8* %93
%95 = tail call i32 @isalnum(i8 signext %94)
%96 = icmp eq i32 %95, 0
%97 = select i1 %96, i32 0, i32 %92
%98 = add nuw nsw i64 %91, 1
%99 = tail call i32 @strlen(i8* %0)
%100 = sext i32 %99 to i64
%101 = icmp slt i64 %98, %100
br i1 %101, label %90, label %88
102: ; preds = %88, %80, %77
br label %103
103: ; preds = %71, %35, %31, %85, %28, %88, %72, %1, %4, %7, %10, %13, %16, %19, %102
%104 = phi i32 [ 5, %88 ], [ 4, %102 ], [ 0, %19 ], [ 0, %16 ], [ 0, %13 ], [ 0, %10 ], [ 0, %7 ], [ 0, %4 ], [ 0, %1 ], [ %76, %72 ], [ 1, %28 ], [ 5, %85 ], [ 4, %35 ], [ 1, %31 ], [ 4, %71 ]
ret i32 %104
}