void eatsize(p) char **p;
{
  char *l = *p;
  if ((isupper((unsigned char)(*l)) ? tolower((unsigned char)(*l)) : (*l)) ==
      'u')
    l++;
  switch (
      (isupper((unsigned char)(*l)) ? tolower((unsigned char)(*l)) : (*l))) {
  case 'l':
  case 's':
  case 'h':
  case 'b':
  case 'c':
    l++;
  default:
    break;
  }
  *p = l;
}


x86 assembly (clang, -O0):
<eatsize>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
mov    (%rax),%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1040 <isupper@plt>
cmp    $0x0,%eax
je     1160 <eatsize+0x40>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <tolower@plt>
mov    %eax,-0x14(%rbp)
jmp    116a <eatsize+0x4a>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    $0x75,%eax
jne    1182 <eatsize+0x62>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1040 <isupper@plt>
cmp    $0x0,%eax
je     11ab <eatsize+0x8b>
mov    -0x10(%rbp),%rax
movzbl (%rax),%edi
call   1030 <tolower@plt>
mov    %eax,-0x18(%rbp)
jmp    11b5 <eatsize+0x95>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
mov    %eax,-0x18(%rbp)
mov    -0x18(%rbp),%eax
mov    %eax,-0x1c(%rbp)
add    $0xffffff9e,%eax
sub    $0x2,%eax
jb     11ff <eatsize+0xdf>
jmp    11cc <eatsize+0xac>
mov    -0x1c(%rbp),%eax
sub    $0x68,%eax
je     11ff <eatsize+0xdf>
jmp    11dd <eatsize+0xbd>
mov    -0x1c(%rbp),%eax
sub    $0x6c,%eax
je     11ff <eatsize+0xdf>
jmp    11ee <eatsize+0xce>
mov    -0x1c(%rbp),%eax
sub    $0x73,%eax
jne    120b <eatsize+0xeb>
jmp    11ff <eatsize+0xdf>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1210 <eatsize+0xf0>
mov    -0x10(%rbp),%rcx
mov    -0x8(%rbp),%rax
mov    %rcx,(%rax)
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<eatsize>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %rdi,%r14
mov    (%rdi),%r15
movzbl (%r15),%ebp
mov    %ebp,%edi
call   1040 <isupper@plt>
test   %eax,%eax
je     1145 <eatsize+0x25>
mov    %ebp,%edi
call   1030 <tolower@plt>
jmp    1149 <eatsize+0x29>
movsbl %bpl,%eax
xor    %ebx,%ebx
cmp    $0x75,%eax
sete   %bl
movzbl (%r15,%rbx,1),%ebp
mov    %ebp,%edi
call   1040 <isupper@plt>
test   %eax,%eax
je     116a <eatsize+0x4a>
mov    %ebp,%edi
call   1030 <tolower@plt>
jmp    116e <eatsize+0x4e>
movsbl %bpl,%eax
add    %rbx,%r15
add    $0xffffff9e,%eax
cmp    $0x11,%eax
ja     1187 <eatsize+0x67>
mov    $0x20443,%ecx
bt     %eax,%ecx
jae    1187 <eatsize+0x67>
add    $0x1,%r15
mov    %r15,(%r14)
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
define void @eatsize(i8** %0) {
%2 = alloca i8**
%3 = alloca i8*
store i8** %0, i8*** %2
%4 = load i8**, i8*** %2
%5 = load i8*, i8** %4
store i8* %5, i8** %3
%6 = load i8*, i8** %3
%7 = load i8, i8* %6
%8 = zext i8 %7 to i32
%9 = call i32 @isupper(i32 %8)
%10 = icmp ne i32 %9, 0
br i1 %10, label %11, label %16
11: ; preds = %1
%12 = load i8*, i8** %3
%13 = load i8, i8* %12
%14 = zext i8 %13 to i32
%15 = call i32 @tolower(i32 %14)
br label %20
16: ; preds = %1
%17 = load i8*, i8** %3
%18 = load i8, i8* %17
%19 = sext i8 %18 to i32
br label %20
20: ; preds = %16, %11
%21 = phi i32 [ %15, %11 ], [ %19, %16 ]
%22 = icmp eq i32 %21, 117
br i1 %22, label %23, label %26
23: ; preds = %20
%24 = load i8*, i8** %3
%25 = getelementptr inbounds i8, i8* %24, i32 1
store i8* %25, i8** %3
br label %26
26: ; preds = %23, %20
%27 = load i8*, i8** %3
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = call i32 @isupper(i32 %29)
%31 = icmp ne i32 %30, 0
br i1 %31, label %32, label %37
32: ; preds = %26
%33 = load i8*, i8** %3
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = call i32 @tolower(i32 %35)
br label %41
37: ; preds = %26
%38 = load i8*, i8** %3
%39 = load i8, i8* %38
%40 = sext i8 %39 to i32
br label %41
41: ; preds = %37, %32
%42 = phi i32 [ %36, %32 ], [ %40, %37 ]
switch i32 %42, label %46 [
i32 108, label %43
i32 115, label %43
i32 104, label %43
i32 98, label %43
i32 99, label %43
]
43: ; preds = %41, %41, %41, %41, %41
%44 = load i8*, i8** %3
%45 = getelementptr inbounds i8, i8* %44, i32 1
store i8* %45, i8** %3
br label %46
46: ; preds = %41, %43
br label %47
47: ; preds = %46
%48 = load i8*, i8** %3
%49 = load i8**, i8*** %2
store i8* %48, i8** %49
ret void
}

LLVM IR (-O2):
define void @eatsize(i8** nocapture %0) {
%2 = load i8*, i8** %0
%3 = load i8, i8* %2
%4 = zext i8 %3 to i32
%5 = tail call i32 @isupper(i32 %4)
%6 = icmp eq i32 %5, 0
br i1 %6, label %9, label %7
7: ; preds = %1
%8 = tail call i32 @tolower(i32 %4)
br label %11
9: ; preds = %1
%10 = sext i8 %3 to i32
br label %11
11: ; preds = %9, %7
%12 = phi i32 [ %8, %7 ], [ %10, %9 ]
%13 = icmp eq i32 %12, 117
%14 = zext i1 %13 to i64
%15 = getelementptr i8, i8* %2, i64 %14
%16 = load i8, i8* %15
%17 = zext i8 %16 to i32
%18 = tail call i32 @isupper(i32 %17)
%19 = icmp eq i32 %18, 0
br i1 %19, label %22, label %20
20: ; preds = %11
%21 = tail call i32 @tolower(i32 %17)
br label %24
22: ; preds = %11
%23 = sext i8 %16 to i32
br label %24
24: ; preds = %22, %20
%25 = phi i32 [ %21, %20 ], [ %23, %22 ]
switch i32 %25, label %28 [
i32 108, label %26
i32 115, label %26
i32 104, label %26
i32 98, label %26
i32 99, label %26
]
26: ; preds = %24, %24, %24, %24, %24
%27 = getelementptr inbounds i8, i8* %15, i64 1
br label %28
28: ; preds = %26, %24
%29 = phi i8* [ %15, %24 ], [ %27, %26 ]
store i8* %29, i8** %0
ret void
}