#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 EOF;
int ncss_Getchar();
int /*<<< orphan*/ ncss_Ungetc(int);
int skipws();
void operatorident(char *s, int c) {
  while (c != EOF) {
    if (((c) == (256 + 1) || (c) == '\n' || (c) == '\t' || (c) == ' ')) {
      ncss_Ungetc(skipws());
      *s++ = '_';
    } else if (c == '(' || c == ';') {
      ncss_Ungetc(c);
      break;
    } else {
      *s++ = c;
    }
    c = ncss_Getchar();
  }
  if (s[-1] == '_')
    s[-1] = '\0';
  else
    s[0] = '\0';
}


x86 assembly (clang, -O0):
<operatorident>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    %esi,-0xc(%rbp)
mov    -0xc(%rbp),%eax
mov    0x2e9f(%rip),%rcx
cmp    (%rcx),%eax
je     11ec <operatorident+0xbc>
cmpl   $0x101,-0xc(%rbp)
je     117c <operatorident+0x4c>
cmpl   $0xa,-0xc(%rbp)
je     117c <operatorident+0x4c>
cmpl   $0x9,-0xc(%rbp)
je     117c <operatorident+0x4c>
cmpl   $0x20,-0xc(%rbp)
jne    11a1 <operatorident+0x71>
mov    $0x0,%al
call   1050 <skipws@plt>
mov    %eax,%edi
call   1040 <ncss_Ungetc@plt>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
movb   $0x5f,(%rax)
jmp    11dd <operatorident+0xad>
cmpl   $0x28,-0xc(%rbp)
je     11b5 <operatorident+0x85>
cmpl   $0x3b,-0xc(%rbp)
jne    11c2 <operatorident+0x92>
mov    -0xc(%rbp),%edi
call   1040 <ncss_Ungetc@plt>
jmp    11ec <operatorident+0xbc>
mov    -0xc(%rbp),%eax
mov    %al,%cl
mov    -0x8(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x8(%rbp)
mov    %cl,(%rax)
jmp    11dd <operatorident+0xad>
mov    $0x0,%al
call   1030 <ncss_Getchar@plt>
mov    %eax,-0xc(%rbp)
jmp    113f <operatorident+0xf>
mov    -0x8(%rbp),%rax
movsbl -0x1(%rax),%eax
cmp    $0x5f,%eax
jne    120a <operatorident+0xda>
mov    -0x8(%rbp),%rax
movb   $0x0,-0x1(%rax)
jmp    1211 <operatorident+0xe1>
mov    -0x8(%rbp),%rax
movb   $0x0,(%rax)
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<operatorident>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rdi,%rbx
mov    0x2ea6(%rip),%r14
cmp    %esi,(%r14)
je     11a7 <operatorident+0x77>
mov    %esi,%eax
movabs $0x100000600,%r15
movabs $0x800010000000000,%r12
jmp    118a <operatorident+0x5a>
nop
mov    %eax,%ecx
bt     %rcx,%r15
jae    1191 <operatorident+0x61>
xor    %eax,%eax
call   1050 <skipws@plt>
mov    %eax,%edi
call   1040 <ncss_Ungetc@plt>
mov    $0x5f,%al
mov    %al,(%rbx)
add    $0x1,%rbx
xor    %eax,%eax
call   1030 <ncss_Getchar@plt>
cmp    (%r14),%eax
je     11a7 <operatorident+0x77>
cmp    $0x3b,%eax
jbe    1160 <operatorident+0x30>
jmp    1197 <operatorident+0x67>
bt     %rcx,%r12
jb     11a0 <operatorident+0x70>
cmp    $0x101,%eax
je     1168 <operatorident+0x38>
jmp    1178 <operatorident+0x48>
mov    %eax,%edi
call   1040 <ncss_Ungetc@plt>
cmpb   $0x5f,-0x1(%rbx)
lea    -0x1(%rbx),%rax
cmovne %rbx,%rax
movb   $0x0,(%rax)
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@EOF = global i32 0
define void @operatorident(i8* %0, i32 %1) {
%3 = alloca i8*
%4 = alloca i32
store i8* %0, i8** %3
store i32 %1, i32* %4
br label %5
5: ; preds = %41, %2
%6 = load i32, i32* %4
%7 = load i32, i32* @EOF
%8 = icmp ne i32 %6, %7
br i1 %8, label %9, label %43
9: ; preds = %5
%10 = load i32, i32* %4
%11 = icmp eq i32 %10, 257
br i1 %11, label %21, label %12
12: ; preds = %9
%13 = load i32, i32* %4
%14 = icmp eq i32 %13, 10
br i1 %14, label %21, label %15
15: ; preds = %12
%16 = load i32, i32* %4
%17 = icmp eq i32 %16, 9
br i1 %17, label %21, label %18
18: ; preds = %15
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 32
br i1 %20, label %21, label %26
21: ; preds = %18, %15, %12, %9
%22 = call i32 (...) @skipws()
%23 = call i32 @ncss_Ungetc(i32 %22)
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %3
store i8 95, i8* %24
br label %41
26: ; preds = %18
%27 = load i32, i32* %4
%28 = icmp eq i32 %27, 40
br i1 %28, label %32, label %29
29: ; preds = %26
%30 = load i32, i32* %4
%31 = icmp eq i32 %30, 59
br i1 %31, label %32, label %35
32: ; preds = %29, %26
%33 = load i32, i32* %4
%34 = call i32 @ncss_Ungetc(i32 %33)
br label %43
35: ; preds = %29
%36 = load i32, i32* %4
%37 = trunc i32 %36 to i8
%38 = load i8*, i8** %3
%39 = getelementptr inbounds i8, i8* %38, i32 1
store i8* %39, i8** %3
store i8 %37, i8* %38
br label %40
40: ; preds = %35
br label %41
41: ; preds = %40, %21
%42 = call i32 (...) @ncss_Getchar()
store i32 %42, i32* %4
br label %5
43: ; preds = %32, %5
%44 = load i8*, i8** %3
%45 = getelementptr inbounds i8, i8* %44, i64 -1
%46 = load i8, i8* %45
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 95
br i1 %48, label %49, label %52
49: ; preds = %43
%50 = load i8*, i8** %3
%51 = getelementptr inbounds i8, i8* %50, i64 -1
store i8 0, i8* %51
br label %55
52: ; preds = %43
%53 = load i8*, i8** %3
%54 = getelementptr inbounds i8, i8* %53, i64 0
store i8 0, i8* %54
br label %55
55: ; preds = %52, %49
ret void
}

LLVM IR (-O2):
@EOF = global i32 0
define void @operatorident(i8* nocapture %0, i32 %1) {
%3 = load i32, i32* @EOF
%4 = icmp eq i32 %3, %1
br i1 %4, label %21, label %5
5: ; preds = %2, %15
%6 = phi i32 [ %18, %15 ], [ %1, %2 ]
%7 = phi i8* [ %17, %15 ], [ %0, %2 ]
switch i32 %6, label %13 [
i32 257, label %8
i32 32, label %8
i32 10, label %8
i32 9, label %8
i32 59, label %11
i32 40, label %11
]
8: ; preds = %5, %5, %5, %5
%9 = tail call i32 (...) @skipws()
%10 = tail call i32 @ncss_Ungetc(i32 %9)
br label %15
11: ; preds = %5, %5
%12 = tail call i32 @ncss_Ungetc(i32 %6)
br label %21
13: ; preds = %5
%14 = trunc i32 %6 to i8
br label %15
15: ; preds = %13, %8
%16 = phi i8 [ %14, %13 ], [ 95, %8 ]
%17 = getelementptr inbounds i8, i8* %7, i64 1
store i8 %16, i8* %7
%18 = tail call i32 (...) @ncss_Getchar()
%19 = load i32, i32* @EOF
%20 = icmp eq i32 %18, %19
br i1 %20, label %21, label %5
21: ; preds = %15, %2, %11
%22 = phi i8* [ %7, %11 ], [ %0, %2 ], [ %17, %15 ]
%23 = getelementptr inbounds i8, i8* %22, i64 -1
%24 = load i8, i8* %23
%25 = icmp eq i8 %24, 95
%26 = select i1 %25, i8* %23, i8* %22
store i8 0, i8* %26
ret void
}