#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 */
long find_1st_atom(char *, char **, long, long, char *);
char identify_uncommon(long ry, char **AtomName, long ib, long ie) {
  char c;
  long N2, C5M, N4, O4, O2p;
  if (ry == 1) {
    N2 = find_1st_atom(" N2 ", AtomName, ib, ie, "");
    if (N2)
      c = 'g';
    else
      c = 'a';
  }
  if (ry == 0) {
    C5M = find_1st_atom(" C5M", AtomName, ib, ie, "");
    N4 = find_1st_atom(" N4 ", AtomName, ib, ie, "");
    O4 = find_1st_atom(" O4 ", AtomName, ib, ie, "");
    O2p = find_1st_atom(" O2'", AtomName, ib, ie, "");
    if (!O2p && (C5M || (C5M && O4)))
      c = 't';
    else {
      if (N4)
        c = 'c';
      else
        c = 'u';
    }
  }
  return c;
}


x86 assembly (clang, -O0):
<identify_uncommon>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
cmpq   $0x1,-0x8(%rbp)
jne    1173 <identify_uncommon+0x63>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xeba(%rip),%rdi
lea    0xeb7(%rip),%r8
call   1030 <find_1st_atom@plt>
mov    %rax,-0x30(%rbp)
cmpq   $0x0,-0x30(%rbp)
je     116a <identify_uncommon+0x5a>
movb   $0x67,-0x21(%rbp)
jmp    116e <identify_uncommon+0x5e>
movb   $0x61,-0x21(%rbp)
jmp    1173 <identify_uncommon+0x63>
cmpq   $0x0,-0x8(%rbp)
jne    1261 <identify_uncommon+0x151>
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe74(%rip),%rdi
lea    0xe6c(%rip),%r8
call   1030 <find_1st_atom@plt>
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe56(%rip),%rdi
lea    0xe49(%rip),%r8
call   1030 <find_1st_atom@plt>
mov    %rax,-0x40(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe38(%rip),%rdi
lea    0xe26(%rip),%r8
call   1030 <find_1st_atom@plt>
mov    %rax,-0x48(%rbp)
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xe1a(%rip),%rdi
lea    0xe03(%rip),%r8
call   1030 <find_1st_atom@plt>
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x50(%rbp)
jne    123f <identify_uncommon+0x12f>
cmpq   $0x0,-0x38(%rbp)
jne    1236 <identify_uncommon+0x126>
cmpq   $0x0,-0x38(%rbp)
je     123f <identify_uncommon+0x12f>
cmpq   $0x0,-0x48(%rbp)
je     123f <identify_uncommon+0x12f>
movb   $0x74,-0x21(%rbp)
jmp    125c <identify_uncommon+0x14c>
cmpq   $0x0,-0x40(%rbp)
je     1253 <identify_uncommon+0x143>
movb   $0x63,-0x21(%rbp)
jmp    1257 <identify_uncommon+0x147>
movb   $0x75,-0x21(%rbp)
jmp    125c <identify_uncommon+0x14c>
jmp    1261 <identify_uncommon+0x151>
movsbl -0x21(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<identify_uncommon>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%rbx
test   %rdi,%rdi
je     1161 <identify_uncommon+0x51>
cmp    $0x1,%rdi
jne    11ea <identify_uncommon+0xda>
lea    0xec6(%rip),%rdi
lea    0xec3(%rip),%r8
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <find_1st_atom@plt>
test   %rax,%rax
mov    $0x61,%ecx
mov    $0x67,%eax
jmp    11e7 <identify_uncommon+0xd7>
lea    0xe9d(%rip),%rdi
lea    0xe95(%rip),%r13
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r13,%r8
call   1030 <find_1st_atom@plt>
mov    %rax,%r12
lea    0xe80(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r13,%r8
call   1030 <find_1st_atom@plt>
mov    %rax,%rbp
lea    0xe6a(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r13,%r8
call   1030 <find_1st_atom@plt>
lea    0xe57(%rip),%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
mov    %r13,%r8
call   1030 <find_1st_atom@plt>
test   %rax,%rax
jne    11da <identify_uncommon+0xca>
mov    $0x74,%al
test   %r12,%r12
jne    11ea <identify_uncommon+0xda>
test   %rbp,%rbp
mov    $0x75,%ecx
mov    $0x63,%eax
cmove  %ecx,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [5 x i8] c" N2 \00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c" C5M\00"
@.str.3 = [5 x i8] c" N4 \00"
@.str.4 = [5 x i8] c" O4 \00"
@.str.5 = [5 x i8] c" O2'\00"
define signext i8 @identify_uncommon(i64 %0, i8** %1, i64 %2, i64 %3) {
%5 = alloca i64
%6 = alloca i8**
%7 = alloca i64
%8 = alloca i64
%9 = alloca i8
%10 = alloca i64
%11 = alloca i64
%12 = alloca i64
%13 = alloca i64
%14 = alloca i64
store i64 %0, i64* %5
store i8** %1, i8*** %6
store i64 %2, i64* %7
store i64 %3, i64* %8
%15 = load i64, i64* %5
%16 = icmp eq i64 %15, 1
br i1 %16, label %17, label %27
17: ; preds = %4
%18 = load i8**, i8*** %6
%19 = load i64, i64* %7
%20 = load i64, i64* %8
%21 = call i64 @find_1st_atom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %18, i64 %19, i64 %20, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
store i64 %21, i64* %10
%22 = load i64, i64* %10
%23 = icmp ne i64 %22, 0
br i1 %23, label %24, label %25
24: ; preds = %17
store i8 103, i8* %9
br label %26
25: ; preds = %17
store i8 97, i8* %9
br label %26
26: ; preds = %25, %24
br label %27
27: ; preds = %26, %4
%28 = load i64, i64* %5
%29 = icmp eq i64 %28, 0
br i1 %29, label %30, label %66
30: ; preds = %27
%31 = load i8**, i8*** %6
%32 = load i64, i64* %7
%33 = load i64, i64* %8
%34 = call i64 @find_1st_atom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %31, i64 %32, i64 %33, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
store i64 %34, i64* %11
%35 = load i8**, i8*** %6
%36 = load i64, i64* %7
%37 = load i64, i64* %8
%38 = call i64 @find_1st_atom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %35, i64 %36, i64 %37, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
store i64 %38, i64* %12
%39 = load i8**, i8*** %6
%40 = load i64, i64* %7
%41 = load i64, i64* %8
%42 = call i64 @find_1st_atom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %39, i64 %40, i64 %41, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
store i64 %42, i64* %13
%43 = load i8**, i8*** %6
%44 = load i64, i64* %7
%45 = load i64, i64* %8
%46 = call i64 @find_1st_atom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %43, i64 %44, i64 %45, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
store i64 %46, i64* %14
%47 = load i64, i64* %14
%48 = icmp ne i64 %47, 0
br i1 %48, label %59, label %49
49: ; preds = %30
%50 = load i64, i64* %11
%51 = icmp ne i64 %50, 0
br i1 %51, label %58, label %52
52: ; preds = %49
%53 = load i64, i64* %11
%54 = icmp ne i64 %53, 0
br i1 %54, label %55, label %59
55: ; preds = %52
%56 = load i64, i64* %13
%57 = icmp ne i64 %56, 0
br i1 %57, label %58, label %59
58: ; preds = %55, %49
store i8 116, i8* %9
br label %65
59: ; preds = %55, %52, %30
%60 = load i64, i64* %12
%61 = icmp ne i64 %60, 0
br i1 %61, label %62, label %63
62: ; preds = %59
store i8 99, i8* %9
br label %64
63: ; preds = %59
store i8 117, i8* %9
br label %64
64: ; preds = %63, %62
br label %65
65: ; preds = %64, %58
br label %66
66: ; preds = %65, %27
%67 = load i8, i8* %9
ret i8 %67
}

LLVM IR (-O2):
@.str = [5 x i8] c" N2 \00"
@.str.1 = [1 x i8] zeroinitializer
@.str.2 = [5 x i8] c" C5M\00"
@.str.3 = [5 x i8] c" N4 \00"
@.str.4 = [5 x i8] c" O4 \00"
@.str.5 = [5 x i8] c" O2'\00"
define signext i8 @identify_uncommon(i64 %0, i8** %1, i64 %2, i64 %3) {
switch i64 %0, label %20 [
i64 1, label %5
i64 0, label %9
]
5: ; preds = %4
%6 = tail call i64 @find_1st_atom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str, i64 0, i64 0), i8** %1, i64 %2, i64 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%7 = icmp eq i64 %6, 0
%8 = select i1 %7, i8 97, i8 103
br label %20
9: ; preds = %4
%10 = tail call i64 @find_1st_atom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i8** %1, i64 %2, i64 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%11 = tail call i64 @find_1st_atom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0), i8** %1, i64 %2, i64 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i64 @find_1st_atom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8** %1, i64 %2, i64 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%13 = tail call i64 @find_1st_atom(i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0), i8** %1, i64 %2, i64 %3, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.1, i64 0, i64 0))
%14 = icmp ne i64 %13, 0
%15 = icmp eq i64 %10, 0
%16 = select i1 %14, i1 true, i1 %15
br i1 %16, label %17, label %20
17: ; preds = %9
%18 = icmp eq i64 %11, 0
%19 = select i1 %18, i8 117, i8 99
br label %20
20: ; preds = %4, %5, %9, %17
%21 = phi i8 [ %19, %17 ], [ 116, %9 ], [ %8, %5 ], [ undef, %4 ]
ret i8 %21
}