#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 /*<<< orphan*/ FILE;

/* Variables and functions */
char EOF;
char fgetc(int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ *stdin;
scalar_t__ strcmp(char *, char *);
int main() {
  FILE *fp = stdin;
  char current;
  char prev = '\n';
  char equals[5];
  int equalsCount = 0;
  if (!fp) {
    return 0;
  }
  while ((current = fgetc(fp)) != EOF) {
    if ((int)current >= 65 && (int)current <= 90) {
      current += 32;
    }
    if (prev == '\n' && current == 'c') {
      current = '!';
    }
    if ((prev == ' ' && (int)current == 46) || equalsCount > 0) {
      equals[equalsCount] = current;
      equalsCount++;
    } else {
      printf("%c", current);
      prev = current;
    }
    if (equalsCount == 4) {
      equals[4] = '\0';
      if (strcmp(equals, ".eq.") == 0) {
        printf("==");
      } else if (strcmp(equals, ".ge.") == 0) {
        printf(">=");
      } else if (strcmp(equals, ".gt.") == 0) {
        printf(">");
      } else if (strcmp(equals, ".le.") == 0) {
        printf("<=");
      } else if (strcmp(equals, ".lt.") == 0) {
        printf("<");
      } else {
        printf("%s", equals);
      }
      equalsCount = 0;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
movb   $0xa,-0x12(%rbp)
movl   $0x0,-0x1c(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    116f <main+0x3f>
movl   $0x0,-0x4(%rbp)
jmp    1354 <main+0x224>
jmp    1174 <main+0x44>
mov    -0x10(%rbp),%rdi
call   1040 <fgetc@plt>
mov    %al,-0x11(%rbp)
movsbl %al,%eax
mov    0x2e56(%rip),%rcx
movsbl (%rcx),%ecx
cmp    %ecx,%eax
je     134d <main+0x21d>
movsbl -0x11(%rbp),%eax
cmp    $0x41,%eax
jl     11b9 <main+0x89>
movsbl -0x11(%rbp),%eax
cmp    $0x5a,%eax
jg     11b9 <main+0x89>
movsbl -0x11(%rbp),%eax
add    $0x20,%eax
mov    %al,-0x11(%rbp)
movsbl -0x12(%rbp),%eax
cmp    $0xa,%eax
jne    11d7 <main+0xa7>
movsbl -0x11(%rbp),%eax
cmp    $0x63,%eax
jne    11d7 <main+0xa7>
movb   $0x21,-0x11(%rbp)
movsbl -0x12(%rbp),%eax
cmp    $0x20,%eax
jne    11f1 <main+0xc1>
movsbl -0x11(%rbp),%eax
cmp    $0x2e,%eax
je     11fb <main+0xcb>
cmpl   $0x0,-0x1c(%rbp)
jle    1214 <main+0xe4>
mov    -0x11(%rbp),%cl
movslq -0x1c(%rbp),%rax
mov    %cl,-0x17(%rbp,%rax,1)
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
jmp    122c <main+0xfc>
movsbl -0x11(%rbp),%esi
lea    0xde1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x11(%rbp),%al
mov    %al,-0x12(%rbp)
cmpl   $0x4,-0x1c(%rbp)
jne    1348 <main+0x218>
movb   $0x0,-0x13(%rbp)
lea    -0x17(%rbp),%rdi
lea    0xdbe(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1267 <main+0x137>
lea    0xdad(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1341 <main+0x211>
lea    -0x17(%rbp),%rdi
lea    0xd99(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    1294 <main+0x164>
lea    0xd88(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    133c <main+0x20c>
lea    -0x17(%rbp),%rdi
lea    0xd74(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12c1 <main+0x191>
lea    0xd63(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1337 <main+0x207>
lea    -0x17(%rbp),%rdi
lea    0xd4e(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    12ee <main+0x1be>
lea    0xd3d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1332 <main+0x202>
lea    -0x17(%rbp),%rdi
lea    0xd29(%rip),%rsi
call   1050 <strcmp@plt>
cmp    $0x0,%rax
jne    131b <main+0x1eb>
lea    0xd18(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    132d <main+0x1fd>
lea    -0x17(%rbp),%rsi
lea    0xd03(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
jmp    1332 <main+0x202>
jmp    1337 <main+0x207>
jmp    133c <main+0x20c>
jmp    1341 <main+0x211>
movl   $0x0,-0x1c(%rbp)
jmp    1174 <main+0x44>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    0x2e96(%rip),%rax
mov    (%rax),%rbx
test   %rbx,%rbx
je     116f <main+0x2f>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    0x2e77(%rip),%r12
cmp    (%r12),%al
jne    1180 <main+0x40>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    $0xa,%r13b
xor    %r14d,%r14d
mov    $0x21,%ebp
jmp    11aa <main+0x6a>
nopl   (%rax)
movsbl %r15b,%edi
call   1030 <putchar@plt>
mov    %rbx,%rdi
call   1050 <fgetc@plt>
mov    %r15d,%r13d
cmp    (%r12),%al
je     116f <main+0x2f>
lea    -0x41(%rax),%ecx
lea    0x20(%rax),%edx
cmp    $0x1a,%cl
movzbl %al,%eax
movzbl %dl,%r15d
cmovae %eax,%r15d
mov    %r13d,%eax
xor    $0xa,%al
mov    %r15d,%ecx
xor    $0x63,%cl
or     %al,%cl
cmove  %ebp,%r15d
mov    %r13d,%eax
xor    $0x20,%al
mov    %r15d,%ecx
xor    $0x2e,%cl
or     %al,%cl
je     11e3 <main+0xa3>
test   %r14d,%r14d
jle    1190 <main+0x50>
movslq %r14d,%rax
mov    %r15b,0x3(%rsp,%rax,1)
add    $0x1,%r14d
cmp    $0x4,%r14d
jne    1280 <main+0x140>
movb   $0x0,0x7(%rsp)
lea    0x3(%rsp),%rbp
mov    %rbp,%rdi
lea    0xdf3(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1288 <main+0x148>
mov    %rbp,%rdi
lea    0xde7(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1294 <main+0x154>
mov    %rbp,%rdi
lea    0xddb(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     12a0 <main+0x160>
mov    %rbp,%rdi
lea    0xdcc(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     12a7 <main+0x167>
mov    %rbp,%rdi
lea    0xdc0(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     12ba <main+0x17a>
xor    %r14d,%r14d
lea    0xdb1(%rip),%rdi
mov    %rbp,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12c7 <main+0x187>
nopl   (%rax)
mov    %r13d,%r15d
jmp    1199 <main+0x59>
xor    %r14d,%r14d
lea    0xd73(%rip),%rdi
jmp    12b1 <main+0x171>
xor    %r14d,%r14d
lea    0xd6f(%rip),%rdi
jmp    12b1 <main+0x171>
mov    $0x3e,%edi
jmp    12bf <main+0x17f>
xor    %r14d,%r14d
lea    0xd69(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
jmp    12c7 <main+0x187>
mov    $0x3c,%edi
call   1030 <putchar@plt>
xor    %r14d,%r14d
mov    %r13d,%r15d
mov    $0x21,%ebp
jmp    1199 <main+0x59>

LLVM IR (-O0):
@stdin = global i32* null
@EOF = global i8 0
@.str = [3 x i8] c"%c\00"
@.str.1 = [5 x i8] c".eq.\00"
@.str.2 = [3 x i8] c"==\00"
@.str.3 = [5 x i8] c".ge.\00"
@.str.4 = [3 x i8] c">=\00"
@.str.5 = [5 x i8] c".gt.\00"
@.str.6 = [2 x i8] c">\00"
@.str.7 = [5 x i8] c".le.\00"
@.str.8 = [3 x i8] c"<=\00"
@.str.9 = [5 x i8] c".lt.\00"
@.str.10 = [2 x i8] c"<\00"
@.str.11 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32*
%3 = alloca i8
%4 = alloca i8
%5 = alloca [5 x i8]
%6 = alloca i32
store i32 0, i32* %1
%7 = load i32*, i32** @stdin
store i32* %7, i32** %2
store i8 10, i8* %4
store i32 0, i32* %6
%8 = load i32*, i32** %2
%9 = icmp ne i32* %8, null
br i1 %9, label %11, label %10
10: ; preds = %0
store i32 0, i32* %1
br label %108
11: ; preds = %0
br label %12
12: ; preds = %106, %11
%13 = load i32*, i32** %2
%14 = call signext i8 @fgetc(i32* %13)
store i8 %14, i8* %3
%15 = sext i8 %14 to i32
%16 = load i8, i8* @EOF
%17 = sext i8 %16 to i32
%18 = icmp ne i32 %15, %17
br i1 %18, label %19, label %107
19: ; preds = %12
%20 = load i8, i8* %3
%21 = sext i8 %20 to i32
%22 = icmp sge i32 %21, 65
br i1 %22, label %23, label %32
23: ; preds = %19
%24 = load i8, i8* %3
%25 = sext i8 %24 to i32
%26 = icmp sle i32 %25, 90
br i1 %26, label %27, label %32
27: ; preds = %23
%28 = load i8, i8* %3
%29 = sext i8 %28 to i32
%30 = add nsw i32 %29, 32
%31 = trunc i32 %30 to i8
store i8 %31, i8* %3
br label %32
32: ; preds = %27, %23, %19
%33 = load i8, i8* %4
%34 = sext i8 %33 to i32
%35 = icmp eq i32 %34, 10
br i1 %35, label %36, label %41
36: ; preds = %32
%37 = load i8, i8* %3
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 99
br i1 %39, label %40, label %41
40: ; preds = %36
store i8 33, i8* %3
br label %41
41: ; preds = %40, %36, %32
%42 = load i8, i8* %4
%43 = sext i8 %42 to i32
%44 = icmp eq i32 %43, 32
br i1 %44, label %45, label %49
45: ; preds = %41
%46 = load i8, i8* %3
%47 = sext i8 %46 to i32
%48 = icmp eq i32 %47, 46
br i1 %48, label %52, label %49
49: ; preds = %45, %41
%50 = load i32, i32* %6
%51 = icmp sgt i32 %50, 0
br i1 %51, label %52, label %59
52: ; preds = %49, %45
%53 = load i8, i8* %3
%54 = load i32, i32* %6
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 %55
store i8 %53, i8* %56
%57 = load i32, i32* %6
%58 = add nsw i32 %57, 1
store i32 %58, i32* %6
br label %64
59: ; preds = %49
%60 = load i8, i8* %3
%61 = sext i8 %60 to i32
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0), i32 %61)
%63 = load i8, i8* %3
store i8 %63, i8* %4
br label %64
64: ; preds = %59, %52
%65 = load i32, i32* %6
%66 = icmp eq i32 %65, 4
br i1 %66, label %67, label %106
67: ; preds = %64
%68 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 4
store i8 0, i8* %68
%69 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%70 = call i64 @strcmp(i8* %69, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%71 = icmp eq i64 %70, 0
br i1 %71, label %72, label %74
72: ; preds = %67
%73 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %105
74: ; preds = %67
%75 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%76 = call i64 @strcmp(i8* %75, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%77 = icmp eq i64 %76, 0
br i1 %77, label %78, label %80
78: ; preds = %74
%79 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %104
80: ; preds = %74
%81 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%82 = call i64 @strcmp(i8* %81, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%83 = icmp eq i64 %82, 0
br i1 %83, label %84, label %86
84: ; preds = %80
%85 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.6, i64 0, i64 0))
br label %103
86: ; preds = %80
%87 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%88 = call i64 @strcmp(i8* %87, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%89 = icmp eq i64 %88, 0
br i1 %89, label %90, label %92
90: ; preds = %86
%91 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
br label %102
92: ; preds = %86
%93 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%94 = call i64 @strcmp(i8* %93, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%95 = icmp eq i64 %94, 0
br i1 %95, label %96, label %98
96: ; preds = %92
%97 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.10, i64 0, i64 0))
br label %101
98: ; preds = %92
%99 = getelementptr inbounds [5 x i8], [5 x i8]* %5, i64 0, i64 0
%100 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %99)
br label %101
101: ; preds = %98, %96
br label %102
102: ; preds = %101, %90
br label %103
103: ; preds = %102, %84
br label %104
104: ; preds = %103, %78
br label %105
105: ; preds = %104, %72
store i32 0, i32* %6
br label %106
106: ; preds = %105, %64
br label %12
107: ; preds = %12
store i32 0, i32* %1
br label %108
108: ; preds = %107, %10
%109 = load i32, i32* %1
ret i32 %109
}

LLVM IR (-O2):
@stdin = global i32* null
@EOF = global i8 0
@.str.1 = [5 x i8] c".eq.\00"
@.str.2 = [3 x i8] c"==\00"
@.str.3 = [5 x i8] c".ge.\00"
@.str.4 = [3 x i8] c">=\00"
@.str.5 = [5 x i8] c".gt.\00"
@.str.7 = [5 x i8] c".le.\00"
@.str.8 = [3 x i8] c"<=\00"
@.str.9 = [5 x i8] c".lt.\00"
@.str.11 = [3 x i8] c"%s\00"
define i32 @main() {
%1 = alloca [5 x i8]
%2 = load i32*, i32** @stdin
%3 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 0
%4 = icmp eq i32* %2, null
br i1 %4, label %69, label %5
5: ; preds = %0
%6 = call signext i8 @fgetc(i32* %2)
%7 = load i8, i8* @EOF
%8 = icmp eq i8 %6, %7
br i1 %8, label %69, label %9
9: ; preds = %5
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 4
br label %11
11: ; preds = %9, %63
%12 = phi i8 [ %6, %9 ], [ %66, %63 ]
%13 = phi i32 [ 0, %9 ], [ %65, %63 ]
%14 = phi i8 [ 10, %9 ], [ %64, %63 ]
%15 = add i8 %12, -65
%16 = icmp ult i8 %15, 26
%17 = add i8 %12, 32
%18 = select i1 %16, i8 %17, i8 %12
%19 = icmp eq i8 %14, 10
%20 = icmp eq i8 %18, 99
%21 = and i1 %19, %20
%22 = select i1 %21, i8 33, i8 %18
%23 = icmp eq i8 %14, 32
%24 = icmp eq i8 %22, 46
%25 = select i1 %23, i1 %24, i1 false
%26 = icmp sgt i32 %13, 0
%27 = select i1 %25, i1 true, i1 %26
br i1 %27, label %31, label %28
28: ; preds = %11
%29 = sext i8 %22 to i32
%30 = call i32 @putchar(i32 %29)
br label %63
31: ; preds = %11
%32 = sext i32 %13 to i64
%33 = getelementptr inbounds [5 x i8], [5 x i8]* %1, i64 0, i64 %32
store i8 %22, i8* %33
%34 = add nsw i32 %13, 1
%35 = icmp eq i32 %34, 4
br i1 %35, label %36, label %63
36: ; preds = %31
store i8 0, i8* %10
%37 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%38 = icmp eq i64 %37, 0
br i1 %38, label %39, label %41
39: ; preds = %36
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %63
41: ; preds = %36
%42 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%43 = icmp eq i64 %42, 0
br i1 %43, label %44, label %46
44: ; preds = %41
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
br label %63
46: ; preds = %41
%47 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.5, i64 0, i64 0))
%48 = icmp eq i64 %47, 0
br i1 %48, label %49, label %51
49: ; preds = %46
%50 = call i32 @putchar(i32 62)
br label %63
51: ; preds = %46
%52 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %56
54: ; preds = %51
%55 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
br label %63
56: ; preds = %51
%57 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.9, i64 0, i64 0))
%58 = icmp eq i64 %57, 0
br i1 %58, label %59, label %61
59: ; preds = %56
%60 = call i32 @putchar(i32 60)
br label %63
61: ; preds = %56
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.11, i64 0, i64 0), i8* %3)
br label %63
63: ; preds = %28, %39, %49, %59, %61, %54, %44, %31
%64 = phi i8 [ %14, %31 ], [ %14, %44 ], [ %14, %54 ], [ %14, %61 ], [ %14, %59 ], [ %14, %49 ], [ %14, %39 ], [ %22, %28 ]
%65 = phi i32 [ %34, %31 ], [ 0, %44 ], [ 0, %54 ], [ 0, %61 ], [ 0, %59 ], [ 0, %49 ], [ 0, %39 ], [ %13, %28 ]
%66 = call signext i8 @fgetc(i32* %2)
%67 = load i8, i8* @EOF
%68 = icmp eq i8 %66, %67
br i1 %68, label %69, label %11
69: ; preds = %63, %5, %0
ret i32 0
}