#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__ memcmp(char *, char *, int);
int /*<<< orphan*/ putchar(char);
char tolower(char);
void showname(char *name83) {
  int f, count = 0;
  for (f = 0; f < 11; f++) {
    if (f == 8)
      putchar((memcmp(name83 + 8, "   ", 3) == 0) ? ' ' : '.');
    if (name83[f] == ' ')
      count++;
    else
      putchar(tolower(name83[f]));
  }
  for (f = 0; f < count; f++)
    putchar(' ');
}


x86 assembly (clang, -O0):
<showname>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x0,-0x10(%rbp)
movl   $0x0,-0xc(%rbp)
cmpl   $0xb,-0xc(%rbp)
jge    11e2 <showname+0xb2>
cmpl   $0x8,-0xc(%rbp)
jne    1193 <showname+0x63>
mov    -0x8(%rbp),%rdi
add    $0x8,%rdi
lea    0xe93(%rip),%rsi
mov    $0x3,%edx
call   1040 <memcmp@plt>
mov    %rax,%rdx
mov    $0x2e,%eax
mov    $0x20,%ecx
cmp    $0x0,%rdx
cmove  %ecx,%eax
movsbl %al,%edi
call   1030 <putchar@plt>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x20,%eax
jne    11b6 <showname+0x86>
mov    -0x10(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x10(%rbp)
jmp    11cf <showname+0x9f>
mov    -0x8(%rbp),%rax
movslq -0xc(%rbp),%rcx
movsbl (%rax,%rcx,1),%edi
call   1050 <tolower@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
jmp    11d4 <showname+0xa4>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    114a <showname+0x1a>
movl   $0x0,-0xc(%rbp)
mov    -0xc(%rbp),%eax
cmp    -0x10(%rbp),%eax
jge    120d <showname+0xdd>
mov    $0x20,%edi
call   1030 <putchar@plt>
mov    -0xc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xc(%rbp)
jmp    11e9 <showname+0xb9>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<showname>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
mov    %rdi,%r12
lea    0x8(%rdi),%r14
xor    %ebp,%ebp
mov    $0xfffffffffffffff5,%rbx
lea    0xeae(%rip),%r15
mov    $0x20,%r13d
jmp    1175 <showname+0x45>
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1050 <tolower@plt>
movsbl %al,%edi
call   1030 <putchar@plt>
inc    %rbx
je     11ab <showname+0x7b>
cmp    $0xfffffffffffffffd,%rbx
jne    119c <showname+0x6c>
mov    %r14,%rdi
mov    %r15,%rsi
mov    $0x3,%edx
call   1040 <memcmp@plt>
test   %rax,%rax
mov    $0x2e,%edi
cmove  %r13d,%edi
call   1030 <putchar@plt>
movzbl 0xb(%r12,%rbx,1),%eax
cmp    $0x20,%al
jne    1160 <showname+0x30>
add    $0x1,%ebp
jmp    1170 <showname+0x40>
test   %ebp,%ebp
jle    11bf <showname+0x8f>
nop
mov    $0x20,%edi
call   1030 <putchar@plt>
add    $0xffffffff,%ebp
jne    11b0 <showname+0x80>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c" \00"
define void @showname(i8* %0) {
%2 = alloca i8*
%3 = alloca i32
%4 = alloca i32
store i8* %0, i8** %2
store i32 0, i32* %4
store i32 0, i32* %3
br label %5
5: ; preds = %40, %1
%6 = load i32, i32* %3
%7 = icmp slt i32 %6, 11
br i1 %7, label %8, label %43
8: ; preds = %5
%9 = load i32, i32* %3
%10 = icmp eq i32 %9, 8
br i1 %10, label %11, label %20
11: ; preds = %8
%12 = load i8*, i8** %2
%13 = getelementptr inbounds i8, i8* %12, i64 8
%14 = call i64 @memcmp(i8* %13, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%15 = icmp eq i64 %14, 0
%16 = zext i1 %15 to i64
%17 = select i1 %15, i32 32, i32 46
%18 = trunc i32 %17 to i8
%19 = call i32 @putchar(i8 signext %18)
br label %20
20: ; preds = %11, %8
%21 = load i8*, i8** %2
%22 = load i32, i32* %3
%23 = sext i32 %22 to i64
%24 = getelementptr inbounds i8, i8* %21, i64 %23
%25 = load i8, i8* %24
%26 = sext i8 %25 to i32
%27 = icmp eq i32 %26, 32
br i1 %27, label %28, label %31
28: ; preds = %20
%29 = load i32, i32* %4
%30 = add nsw i32 %29, 1
store i32 %30, i32* %4
br label %39
31: ; preds = %20
%32 = load i8*, i8** %2
%33 = load i32, i32* %3
%34 = sext i32 %33 to i64
%35 = getelementptr inbounds i8, i8* %32, i64 %34
%36 = load i8, i8* %35
%37 = call signext i8 @tolower(i8 signext %36)
%38 = call i32 @putchar(i8 signext %37)
br label %39
39: ; preds = %31, %28
br label %40
40: ; preds = %39
%41 = load i32, i32* %3
%42 = add nsw i32 %41, 1
store i32 %42, i32* %3
br label %5
43: ; preds = %5
store i32 0, i32* %3
br label %44
44: ; preds = %50, %43
%45 = load i32, i32* %3
%46 = load i32, i32* %4
%47 = icmp slt i32 %45, %46
br i1 %47, label %48, label %53
48: ; preds = %44
%49 = call i32 @putchar(i8 signext 32)
br label %50
50: ; preds = %48
%51 = load i32, i32* %3
%52 = add nsw i32 %51, 1
store i32 %52, i32* %3
br label %44
53: ; preds = %44
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c" \00"
define void @showname(i8* %0) {
%2 = getelementptr inbounds i8, i8* %0, i64 8
br label %5
3: ; preds = %23
%4 = icmp sgt i32 %24, 0
br i1 %4, label %27, label %32
5: ; preds = %1, %23
%6 = phi i64 [ 0, %1 ], [ %25, %23 ]
%7 = phi i32 [ 0, %1 ], [ %24, %23 ]
%8 = icmp eq i64 %6, 8
br i1 %8, label %9, label %14
9: ; preds = %5
%10 = tail call i64 @memcmp(i8* %2, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i32 3)
%11 = icmp eq i64 %10, 0
%12 = select i1 %11, i8 32, i8 46
%13 = tail call i32 @putchar(i8 signext %12)
br label %14
14: ; preds = %9, %5
%15 = getelementptr inbounds i8, i8* %0, i64 %6
%16 = load i8, i8* %15
%17 = icmp eq i8 %16, 32
br i1 %17, label %18, label %20
18: ; preds = %14
%19 = add nsw i32 %7, 1
br label %23
20: ; preds = %14
%21 = tail call signext i8 @tolower(i8 signext %16)
%22 = tail call i32 @putchar(i8 signext %21)
br label %23
23: ; preds = %18, %20
%24 = phi i32 [ %19, %18 ], [ %7, %20 ]
%25 = add nuw nsw i64 %6, 1
%26 = icmp eq i64 %25, 11
br i1 %26, label %3, label %5
27: ; preds = %3, %27
%28 = phi i32 [ %30, %27 ], [ 0, %3 ]
%29 = tail call i32 @putchar(i8 signext 32)
%30 = add nuw nsw i32 %28, 1
%31 = icmp eq i32 %30, %24
br i1 %31, label %32, label %27
32: ; preds = %27, %3
ret void
}