#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*/ _op(char const **);
int /*<<< orphan*/ _permcopy(char const **);
int /*<<< orphan*/ _permlist(char const **);
void _action(char const **mode) {
  char c;
  _op(mode);
  for (c = **mode; c != '\0'; c = **mode) {
    if (c == 'u' || c == 'g' || c == 'o')
      _permcopy(mode);
    else if (c == 'r' || c == 'w' || c == 'x' || c == 'X' || c == 's' ||
             c == 't')
      _permlist(mode);
    else
      break;
  }
}


x86 assembly (clang, -O0):
<_action>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_op@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%eax
cmp    $0x0,%eax
je     120f <_action+0xdf>
movsbl -0x9(%rbp),%eax
cmp    $0x75,%eax
je     1185 <_action+0x55>
movsbl -0x9(%rbp),%eax
cmp    $0x67,%eax
je     1185 <_action+0x55>
movsbl -0x9(%rbp),%eax
cmp    $0x6f,%eax
jne    1193 <_action+0x63>
mov    -0x8(%rbp),%rdi
call   1050 <_permcopy@plt>
jmp    11f9 <_action+0xc9>
movsbl -0x9(%rbp),%eax
cmp    $0x72,%eax
je     11e1 <_action+0xb1>
movsbl -0x9(%rbp),%eax
cmp    $0x77,%eax
je     11e1 <_action+0xb1>
movsbl -0x9(%rbp),%eax
cmp    $0x78,%eax
je     11e1 <_action+0xb1>
movsbl -0x9(%rbp),%eax
cmp    $0x58,%eax
je     11e1 <_action+0xb1>
movsbl -0x9(%rbp),%eax
cmp    $0x73,%eax
je     11e1 <_action+0xb1>
movsbl -0x9(%rbp),%eax
cmp    $0x74,%eax
jne    11ef <_action+0xbf>
mov    -0x8(%rbp),%rdi
call   1040 <_permlist@plt>
jmp    11f4 <_action+0xc4>
jmp    120f <_action+0xdf>
jmp    11f9 <_action+0xc9>
jmp    11fe <_action+0xce>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
jmp    1151 <_action+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_action>:
push   %r15
push   %r14
push   %rbx
mov    %rdi,%rbx
call   1030 <_op@plt>
movabs $0x19c000001,%r14
mov    $0x20808000,%r15d
jmp    1158 <_action+0x28>
nop
mov    %rbx,%rdi
call   1040 <_permlist@plt>
mov    (%rbx),%rax
movzbl (%rax),%eax
add    $0xa8,%al
cmp    $0x20,%al
ja     117d <_action+0x4d>
movzbl %al,%eax
bt     %rax,%r14
jb     1150 <_action+0x20>
bt     %rax,%r15
jae    117d <_action+0x4d>
mov    %rbx,%rdi
call   1050 <_permcopy@plt>
jmp    1158 <_action+0x28>
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @_action(i8** %0) {
%2 = alloca i8**
%3 = alloca i8
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = call i32 @_op(i8** %4)
%6 = load i8**, i8*** %2
%7 = load i8*, i8** %6
%8 = load i8, i8* %7
store i8 %8, i8* %3
br label %9
9: ; preds = %58, %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp ne i32 %11, 0
br i1 %12, label %13, label %62
13: ; preds = %9
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 117
br i1 %16, label %25, label %17
17: ; preds = %13
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 103
br i1 %20, label %25, label %21
21: ; preds = %17
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 111
br i1 %24, label %25, label %28
25: ; preds = %21, %17, %13
%26 = load i8**, i8*** %2
%27 = call i32 @_permcopy(i8** %26)
br label %57
28: ; preds = %21
%29 = load i8, i8* %3
%30 = sext i8 %29 to i32
%31 = icmp eq i32 %30, 114
br i1 %31, label %52, label %32
32: ; preds = %28
%33 = load i8, i8* %3
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 119
br i1 %35, label %52, label %36
36: ; preds = %32
%37 = load i8, i8* %3
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 120
br i1 %39, label %52, label %40
40: ; preds = %36
%41 = load i8, i8* %3
%42 = sext i8 %41 to i32
%43 = icmp eq i32 %42, 88
br i1 %43, label %52, label %44
44: ; preds = %40
%45 = load i8, i8* %3
%46 = sext i8 %45 to i32
%47 = icmp eq i32 %46, 115
br i1 %47, label %52, label %48
48: ; preds = %44
%49 = load i8, i8* %3
%50 = sext i8 %49 to i32
%51 = icmp eq i32 %50, 116
br i1 %51, label %52, label %55
52: ; preds = %48, %44, %40, %36, %32, %28
%53 = load i8**, i8*** %2
%54 = call i32 @_permlist(i8** %53)
br label %56
55: ; preds = %48
br label %62
56: ; preds = %52
br label %57
57: ; preds = %56, %25
br label %58
58: ; preds = %57
%59 = load i8**, i8*** %2
%60 = load i8*, i8** %59
%61 = load i8, i8* %60
store i8 %61, i8* %3
br label %9
62: ; preds = %55, %9
ret void
}

LLVM IR (-O2):
define void @_action(i8** %0) {
%2 = tail call i32 @_op(i8** %0)
br label %3
3: ; preds = %8, %1
%4 = load i8*, i8** %0
%5 = load i8, i8* %4
switch i8 %5, label %11 [
i8 88, label %9
i8 117, label %6
i8 111, label %6
i8 103, label %6
i8 120, label %9
i8 119, label %9
i8 116, label %9
i8 115, label %9
i8 114, label %9
]
6: ; preds = %3, %3, %3
%7 = tail call i32 @_permcopy(i8** %0)
br label %8
8: ; preds = %6, %9
br label %3
9: ; preds = %3, %3, %3, %3, %3, %3
%10 = tail call i32 @_permlist(i8** %0)
br label %8
11: ; preds = %3
ret void
}