#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*/ _perm(char const **);
void _permlist(char const **mode) {
  char c;
  _perm(mode);
  for (c = **mode;
       c == 'r' || c == 'w' || c == 'x' || c == 'X' || c == 's' || c == 't';
       c = **mode)
    _perm(mode);
}


x86 assembly (clang, -O0):
<_permlist>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rdi
call   1030 <_perm@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x72,%ecx
mov    %al,-0xa(%rbp)
je     1198 <_permlist+0x88>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x77,%ecx
mov    %al,-0xa(%rbp)
je     1198 <_permlist+0x88>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x78,%ecx
mov    %al,-0xa(%rbp)
je     1198 <_permlist+0x88>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x58,%ecx
mov    %al,-0xa(%rbp)
je     1198 <_permlist+0x88>
movsbl -0x9(%rbp),%ecx
mov    $0x1,%al
cmp    $0x73,%ecx
mov    %al,-0xa(%rbp)
je     1198 <_permlist+0x88>
movsbl -0x9(%rbp),%eax
cmp    $0x74,%eax
sete   %al
mov    %al,-0xa(%rbp)
mov    -0xa(%rbp),%al
test   $0x1,%al
jne    11a8 <_permlist+0x98>
jmp    11c2 <_permlist+0xb2>
mov    -0x8(%rbp),%rdi
call   1030 <_perm@plt>
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    (%rax),%al
mov    %al,-0x9(%rbp)
jmp    1131 <_permlist+0x21>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_permlist>:
push   %r14
push   %rbx
push   %rax
mov    %rdi,%rbx
call   1030 <_perm@plt>
movabs $0x19c000001,%r14
cs nopw 0x0(%rax,%rax,1)
mov    (%rbx),%rax
movzbl (%rax),%eax
add    $0xa8,%al
cmp    $0x20,%al
ja     114f <_permlist+0x3f>
movzbl %al,%eax
bt     %rax,%r14
jae    114f <_permlist+0x3f>
mov    %rbx,%rdi
call   1030 <_perm@plt>
jmp    1130 <_permlist+0x20>
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
define void @_permlist(i8** %0) {
%2 = alloca i8**
%3 = alloca i8
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = call i32 @_perm(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 = %38, %1
%10 = load i8, i8* %3
%11 = sext i8 %10 to i32
%12 = icmp eq i32 %11, 114
br i1 %12, label %33, label %13
13: ; preds = %9
%14 = load i8, i8* %3
%15 = sext i8 %14 to i32
%16 = icmp eq i32 %15, 119
br i1 %16, label %33, label %17
17: ; preds = %13
%18 = load i8, i8* %3
%19 = sext i8 %18 to i32
%20 = icmp eq i32 %19, 120
br i1 %20, label %33, label %21
21: ; preds = %17
%22 = load i8, i8* %3
%23 = sext i8 %22 to i32
%24 = icmp eq i32 %23, 88
br i1 %24, label %33, label %25
25: ; preds = %21
%26 = load i8, i8* %3
%27 = sext i8 %26 to i32
%28 = icmp eq i32 %27, 115
br i1 %28, label %33, label %29
29: ; preds = %25
%30 = load i8, i8* %3
%31 = sext i8 %30 to i32
%32 = icmp eq i32 %31, 116
br label %33
33: ; preds = %29, %25, %21, %17, %13, %9
%34 = phi i1 [ true, %25 ], [ true, %21 ], [ true, %17 ], [ true, %13 ], [ true, %9 ], [ %32, %29 ]
br i1 %34, label %35, label %42
35: ; preds = %33
%36 = load i8**, i8*** %2
%37 = call i32 @_perm(i8** %36)
br label %38
38: ; preds = %35
%39 = load i8**, i8*** %2
%40 = load i8*, i8** %39
%41 = load i8, i8* %40
store i8 %41, i8* %3
br label %9
42: ; preds = %33
ret void
}

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