#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 */
char *fgets(char *, int, int /*<<< orphan*/);
int /*<<< orphan*/ parse_client(char *);
int /*<<< orphan*/ parse_global(char *);
int /*<<< orphan*/ parse_pool(char *);
int /*<<< orphan*/ parse_shared_pool(char *);
int /*<<< orphan*/ parse_time_stats(char *);
int /*<<< orphan*/ stdin;
int main(int ac, char **av) {
  char *p, c;
  char buf[4096];
  while ((p = fgets(buf, 4096, stdin)) != NULL) {
    c = *p++;
    if (*p++ != '=')
      continue;
    switch (c) {
    case 'G':
      parse_global(p);
      break;
    case 'T':
      parse_time_stats(p);
      break;
    case 'C':
      parse_client(p);
      break;
    case 'P':
      parse_pool(p);
      break;
    case 'S':
      parse_shared_pool(p);
      break;
    default:
      continue;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x1030,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    -0x1020(%rbp),%rdi
mov    0x2e61(%rip),%rax
mov    (%rax),%edx
mov    $0x1000,%esi
call   1030 <fgets@plt>
mov    %rax,-0x18(%rbp)
cmp    $0x0,%rax
je     1255 <main+0xf5>
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
mov    (%rax),%al
mov    %al,-0x19(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x18(%rbp)
movsbl (%rax),%eax
cmp    $0x3d,%eax
je     11d5 <main+0x75>
jmp    1179 <main+0x19>
movsbl -0x19(%rbp),%eax
add    $0xffffffbd,%eax
mov    %eax,%ecx
mov    %rcx,-0x1028(%rbp)
sub    $0x11,%eax
ja     124b <main+0xeb>
mov    -0x1028(%rbp),%rax
lea    0xe04(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x18(%rbp),%rdi
call   1050 <parse_global@plt>
jmp    1250 <main+0xf0>
mov    -0x18(%rbp),%rdi
call   1070 <parse_time_stats@plt>
jmp    1250 <main+0xf0>
mov    -0x18(%rbp),%rdi
call   1080 <parse_client@plt>
jmp    1250 <main+0xf0>
mov    -0x18(%rbp),%rdi
call   1060 <parse_pool@plt>
jmp    1250 <main+0xf0>
mov    -0x18(%rbp),%rdi
call   1040 <parse_shared_pool@plt>
jmp    1250 <main+0xf0>
jmp    1179 <main+0x19>
jmp    1179 <main+0x19>
xor    %eax,%eax
add    $0x1030,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %rbx
sub    $0x1000,%rsp
mov    0x2e75(%rip),%r14
mov    (%r14),%edx
mov    %rsp,%rdi
mov    $0x1000,%esi
call   1030 <fgets@plt>
test   %rax,%rax
je     11fb <main+0x9b>
lea    0xe71(%rip),%r15
mov    %rsp,%rbx
jmp    11b5 <main+0x55>
mov    %rax,%rdi
call   1040 <parse_shared_pool@plt>
nopl   0x0(%rax)
mov    (%r14),%edx
mov    %rbx,%rdi
mov    $0x1000,%esi
call   1030 <fgets@plt>
test   %rax,%rax
je     11fb <main+0x9b>
cmpb   $0x3d,0x1(%rax)
jne    11a0 <main+0x40>
movsbl (%rax),%ecx
add    $0xffffffbd,%ecx
cmp    $0x11,%ecx
ja     11a0 <main+0x40>
add    $0x2,%rax
movslq (%r15,%rcx,4),%rcx
add    %r15,%rcx
jmp    *%rcx
mov    %rax,%rdi
call   1080 <parse_client@plt>
jmp    11a0 <main+0x40>
mov    %rax,%rdi
call   1050 <parse_global@plt>
jmp    11a0 <main+0x40>
mov    %rax,%rdi
call   1060 <parse_pool@plt>
jmp    11a0 <main+0x40>
mov    %rax,%rdi
call   1070 <parse_time_stats@plt>
jmp    11a0 <main+0x40>
xor    %eax,%eax
add    $0x1000,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@stdin = global i32 0
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i8
%8 = alloca [4096 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
br label %9
9: ; preds = %43, %42, %23, %2
%10 = getelementptr inbounds [4096 x i8], [4096 x i8]* %8, i64 0, i64 0
%11 = load i32, i32* @stdin
%12 = call i8* @fgets(i8* %10, i32 4096, i32 %11)
store i8* %12, i8** %6
%13 = icmp ne i8* %12, null
br i1 %13, label %14, label %44
14: ; preds = %9
%15 = load i8*, i8** %6
%16 = getelementptr inbounds i8, i8* %15, i32 1
store i8* %16, i8** %6
%17 = load i8, i8* %15
store i8 %17, i8* %7
%18 = load i8*, i8** %6
%19 = getelementptr inbounds i8, i8* %18, i32 1
store i8* %19, i8** %6
%20 = load i8, i8* %18
%21 = sext i8 %20 to i32
%22 = icmp ne i32 %21, 61
br i1 %22, label %23, label %24
23: ; preds = %14
br label %9
24: ; preds = %14
%25 = load i8, i8* %7
%26 = sext i8 %25 to i32
switch i32 %26, label %42 [
i32 71, label %27
i32 84, label %30
i32 67, label %33
i32 80, label %36
i32 83, label %39
]
27: ; preds = %24
%28 = load i8*, i8** %6
%29 = call i32 @parse_global(i8* %28)
br label %43
30: ; preds = %24
%31 = load i8*, i8** %6
%32 = call i32 @parse_time_stats(i8* %31)
br label %43
33: ; preds = %24
%34 = load i8*, i8** %6
%35 = call i32 @parse_client(i8* %34)
br label %43
36: ; preds = %24
%37 = load i8*, i8** %6
%38 = call i32 @parse_pool(i8* %37)
br label %43
39: ; preds = %24
%40 = load i8*, i8** %6
%41 = call i32 @parse_shared_pool(i8* %40)
br label %43
42: ; preds = %24
br label %9
43: ; preds = %39, %36, %33, %30, %27
br label %9
44: ; preds = %9
ret i32 0
}

LLVM IR (-O2):
@stdin = global i32 0
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [4096 x i8]
%4 = getelementptr inbounds [4096 x i8], [4096 x i8]* %3, i64 0, i64 0
%5 = load i32, i32* @stdin
%6 = call i8* @fgets(i8* %4, i32 4096, i32 %5)
%7 = icmp eq i8* %6, null
br i1 %7, label %31, label %8
8: ; preds = %2, %27
%9 = phi i8* [ %29, %27 ], [ %6, %2 ]
%10 = getelementptr inbounds i8, i8* %9, i64 1
%11 = getelementptr inbounds i8, i8* %9, i64 2
%12 = load i8, i8* %10
%13 = icmp eq i8 %12, 61
br i1 %13, label %14, label %27
14: ; preds = %8
%15 = load i8, i8* %9
%16 = sext i8 %15 to i32
switch i32 %16, label %27 [
i32 71, label %17
i32 84, label %19
i32 67, label %21
i32 80, label %23
i32 83, label %25
]
17: ; preds = %14
%18 = call i32 @parse_global(i8* %11)
br label %27
19: ; preds = %14
%20 = call i32 @parse_time_stats(i8* %11)
br label %27
21: ; preds = %14
%22 = call i32 @parse_client(i8* %11)
br label %27
23: ; preds = %14
%24 = call i32 @parse_pool(i8* %11)
br label %27
25: ; preds = %14
%26 = call i32 @parse_shared_pool(i8* %11)
br label %27
27: ; preds = %17, %19, %21, %23, %25, %8, %14
%28 = load i32, i32* @stdin
%29 = call i8* @fgets(i8* %4, i32 4096, i32 %28)
%30 = icmp eq i8* %29, null
br i1 %30, label %31, label %8
31: ; preds = %27, %2
ret i32 0
}