#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 */
scalar_t__ isdigit(char);
char *MSG_extractSwitch(char *inSwitchString, char *outSwitchChar) {
  static char lBuffer[32];
  char *lBufferPtr = lBuffer;
  *lBufferPtr++ = *inSwitchString++;
  if (*inSwitchString == '-')
    *lBufferPtr++ = *inSwitchString++;
  while (isdigit(*inSwitchString))
    *lBufferPtr++ = *inSwitchString++;
  if (*inSwitchString == '.') {
    *lBufferPtr++ = *inSwitchString++;
    while (isdigit(*inSwitchString))
      *lBufferPtr++ = *inSwitchString++;
  }
  if (*inSwitchString == 'h' || *inSwitchString == 'l')
    *lBufferPtr++ = *inSwitchString++;
  *outSwitchChar = *lBufferPtr++ = *inSwitchString;
  *lBufferPtr = '\0';
  return lBuffer;
}


x86 assembly (clang, -O0):
<MSG_extractSwitch>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0x2f19(%rip),%rax
mov    %rax,-0x18(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2d,%eax
jne    117f <MSG_extractSwitch+0x6f>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1184 <MSG_extractSwitch+0x74>
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     11c1 <MSG_extractSwitch+0xb1>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    1184 <MSG_extractSwitch+0x74>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    1235 <MSG_extractSwitch+0x125>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
movsbl (%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%rax
je     1230 <MSG_extractSwitch+0x120>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
jmp    11f3 <MSG_extractSwitch+0xe3>
jmp    1235 <MSG_extractSwitch+0x125>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x68,%eax
je     1255 <MSG_extractSwitch+0x145>
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x6c,%eax
jne    1277 <MSG_extractSwitch+0x167>
mov    -0x8(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x8(%rbp)
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x8(%rbp),%rax
mov    (%rax),%cl
mov    -0x18(%rbp),%rax
mov    %rax,%rdx
add    $0x1,%rdx
mov    %rdx,-0x18(%rbp)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
mov    %cl,(%rax)
mov    -0x18(%rbp),%rax
movb   $0x0,(%rax)
lea    0x2d9e(%rip),%rax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<MSG_extractSwitch>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rsi,%r14
mov    %rdi,%rbx
mov    (%rdi),%al
mov    %al,0x2f1a(%rip)
mov    0x1(%rdi),%al
cmp    $0x2d,%al
jne    1144 <MSG_extractSwitch+0x34>
movb   $0x2d,0x2f0d(%rip)
mov    0x2(%rbx),%al
add    $0x2,%rbx
lea    0x2f00(%rip),%r15
jmp    114f <MSG_extractSwitch+0x3f>
add    $0x1,%rbx
lea    0x2ef2(%rip),%r15
movsbl %al,%edi
call   1030 <isdigit@plt>
test   %rax,%rax
je     1181 <MSG_extractSwitch+0x71>
nopl   0x0(%rax)
lea    0x1(%rbx),%r12
movzbl (%rbx),%eax
mov    %al,(%r15)
add    $0x1,%r15
movsbl 0x1(%rbx),%edi
call   1030 <isdigit@plt>
mov    %r12,%rbx
test   %rax,%rax
jne    1160 <MSG_extractSwitch+0x50>
jmp    1184 <MSG_extractSwitch+0x74>
mov    %rbx,%r12
mov    (%r12),%al
cmp    $0x2e,%al
jne    11b6 <MSG_extractSwitch+0xa6>
movb   $0x2e,(%r15)
add    $0x1,%r15
movsbl 0x1(%r12),%edi
add    $0x1,%r12
call   1030 <isdigit@plt>
test   %rax,%rax
je     11b2 <MSG_extractSwitch+0xa2>
movzbl (%r12),%eax
mov    %al,(%r15)
jmp    1190 <MSG_extractSwitch+0x80>
mov    (%r12),%al
mov    %eax,%ecx
or     $0x4,%cl
cmp    $0x6c,%cl
jne    11cc <MSG_extractSwitch+0xbc>
mov    %al,(%r15)
add    $0x1,%r15
mov    0x1(%r12),%al
mov    %al,(%r15)
mov    %al,(%r14)
movb   $0x0,0x1(%r15)
lea    0x2e62(%rip),%rax
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@MSG_extractSwitch.lBuffer = internal global [32 x i8] zeroinitializer
define i8* @MSG_extractSwitch(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
store i8* %0, i8** %3
store i8* %1, i8** %4
store i8* getelementptr inbounds ([32 x i8], [32 x i8]* @MSG_extractSwitch.lBuffer, i64 0, i64 0), i8** %5
%6 = load i8*, i8** %3
%7 = getelementptr inbounds i8, i8* %6, i32 1
store i8* %7, i8** %3
%8 = load i8, i8* %6
%9 = load i8*, i8** %5
%10 = getelementptr inbounds i8, i8* %9, i32 1
store i8* %10, i8** %5
store i8 %8, i8* %9
%11 = load i8*, i8** %3
%12 = load i8, i8* %11
%13 = sext i8 %12 to i32
%14 = icmp eq i32 %13, 45
br i1 %14, label %15, label %21
15: ; preds = %2
%16 = load i8*, i8** %3
%17 = getelementptr inbounds i8, i8* %16, i32 1
store i8* %17, i8** %3
%18 = load i8, i8* %16
%19 = load i8*, i8** %5
%20 = getelementptr inbounds i8, i8* %19, i32 1
store i8* %20, i8** %5
store i8 %18, i8* %19
br label %21
21: ; preds = %15, %2
br label %22
22: ; preds = %27, %21
%23 = load i8*, i8** %3
%24 = load i8, i8* %23
%25 = call i64 @isdigit(i8 signext %24)
%26 = icmp ne i64 %25, 0
br i1 %26, label %27, label %33
27: ; preds = %22
%28 = load i8*, i8** %3
%29 = getelementptr inbounds i8, i8* %28, i32 1
store i8* %29, i8** %3
%30 = load i8, i8* %28
%31 = load i8*, i8** %5
%32 = getelementptr inbounds i8, i8* %31, i32 1
store i8* %32, i8** %5
store i8 %30, i8* %31
br label %22
33: ; preds = %22
%34 = load i8*, i8** %3
%35 = load i8, i8* %34
%36 = sext i8 %35 to i32
%37 = icmp eq i32 %36, 46
br i1 %37, label %38, label %56
38: ; preds = %33
%39 = load i8*, i8** %3
%40 = getelementptr inbounds i8, i8* %39, i32 1
store i8* %40, i8** %3
%41 = load i8, i8* %39
%42 = load i8*, i8** %5
%43 = getelementptr inbounds i8, i8* %42, i32 1
store i8* %43, i8** %5
store i8 %41, i8* %42
br label %44
44: ; preds = %49, %38
%45 = load i8*, i8** %3
%46 = load i8, i8* %45
%47 = call i64 @isdigit(i8 signext %46)
%48 = icmp ne i64 %47, 0
br i1 %48, label %49, label %55
49: ; preds = %44
%50 = load i8*, i8** %3
%51 = getelementptr inbounds i8, i8* %50, i32 1
store i8* %51, i8** %3
%52 = load i8, i8* %50
%53 = load i8*, i8** %5
%54 = getelementptr inbounds i8, i8* %53, i32 1
store i8* %54, i8** %5
store i8 %52, i8* %53
br label %44
55: ; preds = %44
br label %56
56: ; preds = %55, %33
%57 = load i8*, i8** %3
%58 = load i8, i8* %57
%59 = sext i8 %58 to i32
%60 = icmp eq i32 %59, 104
br i1 %60, label %66, label %61
61: ; preds = %56
%62 = load i8*, i8** %3
%63 = load i8, i8* %62
%64 = sext i8 %63 to i32
%65 = icmp eq i32 %64, 108
br i1 %65, label %66, label %72
66: ; preds = %61, %56
%67 = load i8*, i8** %3
%68 = getelementptr inbounds i8, i8* %67, i32 1
store i8* %68, i8** %3
%69 = load i8, i8* %67
%70 = load i8*, i8** %5
%71 = getelementptr inbounds i8, i8* %70, i32 1
store i8* %71, i8** %5
store i8 %69, i8* %70
br label %72
72: ; preds = %66, %61
%73 = load i8*, i8** %3
%74 = load i8, i8* %73
%75 = load i8*, i8** %5
%76 = getelementptr inbounds i8, i8* %75, i32 1
store i8* %76, i8** %5
store i8 %74, i8* %75
%77 = load i8*, i8** %4
store i8 %74, i8* %77
%78 = load i8*, i8** %5
store i8 0, i8* %78
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @MSG_extractSwitch.lBuffer, i64 0, i64 0)
}

LLVM IR (-O2):
@MSG_extractSwitch.lBuffer = internal global [32 x i8] zeroinitializer
define i8* @MSG_extractSwitch(i8* nocapture %0, i8* nocapture writeonly %1) {
%3 = getelementptr inbounds i8, i8* %0, i64 1
%4 = load i8, i8* %0
store i8 %4, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @MSG_extractSwitch.lBuffer, i64 0, i64 0)
%5 = load i8, i8* %3
%6 = icmp eq i8 %5, 45
br i1 %6, label %7, label %10
7: ; preds = %2
%8 = getelementptr inbounds i8, i8* %0, i64 2
store i8 45, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @MSG_extractSwitch.lBuffer, i64 0, i64 1)
%9 = load i8, i8* %8
br label %10
10: ; preds = %7, %2
%11 = phi i8 [ %9, %7 ], [ %5, %2 ]
%12 = phi i8* [ %8, %7 ], [ %3, %2 ]
%13 = phi i8* [ getelementptr inbounds ([32 x i8], [32 x i8]* @MSG_extractSwitch.lBuffer, i64 0, i64 2), %7 ], [ getelementptr inbounds ([32 x i8], [32 x i8]* @MSG_extractSwitch.lBuffer, i64 0, i64 1), %2 ]
%14 = tail call i64 @isdigit(i8 signext %11)
%15 = icmp eq i64 %14, 0
br i1 %15, label %25, label %16
16: ; preds = %10, %16
%17 = phi i8* [ %21, %16 ], [ %13, %10 ]
%18 = phi i8* [ %19, %16 ], [ %12, %10 ]
%19 = getelementptr inbounds i8, i8* %18, i64 1
%20 = load i8, i8* %18
%21 = getelementptr inbounds i8, i8* %17, i64 1
store i8 %20, i8* %17
%22 = load i8, i8* %19
%23 = tail call i64 @isdigit(i8 signext %22)
%24 = icmp eq i64 %23, 0
br i1 %24, label %25, label %16
25: ; preds = %16, %10
%26 = phi i8* [ %12, %10 ], [ %19, %16 ]
%27 = phi i8* [ %13, %10 ], [ %21, %16 ]
%28 = load i8, i8* %26
%29 = icmp eq i8 %28, 46
br i1 %29, label %30, label %49
30: ; preds = %25
store i8 46, i8* %27
%31 = getelementptr inbounds i8, i8* %27, i64 1
%32 = getelementptr inbounds i8, i8* %26, i64 1
%33 = load i8, i8* %32
%34 = tail call i64 @isdigit(i8 signext %33)
%35 = icmp eq i64 %34, 0
br i1 %35, label %45, label %36
36: ; preds = %30, %36
%37 = phi i8* [ %41, %36 ], [ %32, %30 ]
%38 = phi i8* [ %40, %36 ], [ %31, %30 ]
%39 = load i8, i8* %37
store i8 %39, i8* %38
%40 = getelementptr inbounds i8, i8* %38, i64 1
%41 = getelementptr inbounds i8, i8* %37, i64 1
%42 = load i8, i8* %41
%43 = tail call i64 @isdigit(i8 signext %42)
%44 = icmp eq i64 %43, 0
br i1 %44, label %45, label %36
45: ; preds = %36, %30
%46 = phi i8* [ %31, %30 ], [ %40, %36 ]
%47 = phi i8* [ %32, %30 ], [ %41, %36 ]
%48 = load i8, i8* %47
br label %49
49: ; preds = %45, %25
%50 = phi i8 [ %48, %45 ], [ %28, %25 ]
%51 = phi i8* [ %47, %45 ], [ %26, %25 ]
%52 = phi i8* [ %46, %45 ], [ %27, %25 ]
switch i8 %50, label %57 [
i8 104, label %53
i8 108, label %53
]
53: ; preds = %49, %49
%54 = getelementptr inbounds i8, i8* %51, i64 1
%55 = getelementptr inbounds i8, i8* %52, i64 1
store i8 %50, i8* %52
%56 = load i8, i8* %54
br label %57
57: ; preds = %49, %53
%58 = phi i8 [ %56, %53 ], [ %50, %49 ]
%59 = phi i8* [ %55, %53 ], [ %52, %49 ]
%60 = getelementptr inbounds i8, i8* %59, i64 1
store i8 %58, i8* %59
store i8 %58, i8* %1
store i8 0, i8* %60
ret i8* getelementptr inbounds ([32 x i8], [32 x i8]* @MSG_extractSwitch.lBuffer, i64 0, i64 0)
}