int parse_name(name, colors, R, G, B, transparent)
char name[];
int *colors, *R, *G, *B, *transparent;
{
  int i, stringptr = 0, badstring = 0;
  char c, tempstr[80];
  strcpy(tempstr, name);
  for (i = 0, c = tempstr[0]; c != '\0'; c = tempstr[++i])
    tempstr[i] = tolower(tempstr[i]);
  c = tempstr[0];
  while ((c != '\0') && !badstring && !(*transparent)) {
    if (strncmp(tempstr + stringptr, "red", 3) == 0) {
      *colors = *colors | 0x01;
      *R += 255;
    } else if (strncmp(tempstr + stringptr, "green", 5) == 0) {
      *colors = *colors | 0x02;
      *G += 255;
    } else if (strncmp(tempstr + stringptr, "blue", 4) == 0) {
      *colors = *colors | 0x04;
      *B += 255;
    } else if (strncmp(tempstr + stringptr, "white", 5) == 0) {
      *colors = *colors | 0x08;
      *R += 255;
      *G += 255;
      *B += 255;
    } else if (strncmp(tempstr + stringptr, "magenta", 7) == 0) {
      *colors = *colors | 0x10;
      *R += 255;
      *B += 255;
    } else if (strncmp(tempstr + stringptr, "yellow", 6) == 0) {
      *colors = *colors | 0x20;
      *R += 255;
      *G += 255;
    } else if (strncmp(tempstr + stringptr, "cyan", 4) == 0) {
      *colors = *colors | 0x40;
      *B += 255;
      *G += 255;
    } else if (strncmp(tempstr + stringptr, "black", 5) == 0) {
      *colors = *colors | 0x80;
    } else if (strncmp(tempstr + stringptr, "transparent", 11)) {
      *transparent = 1;
    } else {
      badstring = 1;
    }
    if (!badstring && !(*transparent)) {
      for (c = tempstr[stringptr]; ((c != ',') && (c != ' ') && (c != '\0'));)
        c = tempstr[++stringptr];
      if (c != '\0') {
        for (c = tempstr[stringptr]; ((c == ',') || (c == ' '));)
          c = tempstr[++stringptr];
      }
    }
  }
  return (!badstring);
}


x86 assembly (clang, -O0):
<parse_name>:
push   %rbp
mov    %rsp,%rbp
sub    $0xa0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9,-0x30(%rbp)
movl   $0x0,-0x38(%rbp)
movl   $0x0,-0x3c(%rbp)
lea    -0x90(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1040 <strcpy@plt>
movl   $0x0,-0x34(%rbp)
mov    -0x90(%rbp),%al
mov    %al,-0x3d(%rbp)
movsbl -0x3d(%rbp),%eax
cmp    $0x0,%eax
je     11c6 <parse_name+0x96>
movslq -0x34(%rbp),%rax
movsbl -0x90(%rbp,%rax,1),%edi
ff
call   1050 <tolower@plt>
mov    %al,%cl
movslq -0x34(%rbp),%rax
mov    %cl,-0x90(%rbp,%rax,1)
mov    -0x34(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x34(%rbp)
cltq
mov    -0x90(%rbp,%rax,1),%al
mov    %al,-0x3d(%rbp)
jmp    1181 <parse_name+0x51>
mov    -0x90(%rbp),%al
mov    %al,-0x3d(%rbp)
movsbl -0x3d(%rbp),%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x91(%rbp)
je     1208 <parse_name+0xd8>
xor    %eax,%eax
cmpl   $0x0,-0x3c(%rbp)
mov    %al,-0x91(%rbp)
jne    1208 <parse_name+0xd8>
mov    -0x30(%rbp),%rax
cmpl   $0x0,(%rax)
setne  %al
xor    $0xff,%al
mov    %al,-0x91(%rbp)
mov    -0x91(%rbp),%al
test   $0x1,%al
jne    121b <parse_name+0xeb>
jmp    1614 <parse_name+0x4e4>
lea    -0x90(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
lea    0xdd0(%rip),%rsi
mov    $0x3,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1265 <parse_name+0x135>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
or     $0x1,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
jmp    150c <parse_name+0x3dc>
lea    -0x90(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
lea    0xd8a(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12af <parse_name+0x17f>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
or     $0x2,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
jmp    1507 <parse_name+0x3d7>
lea    -0x90(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
lea    0xd46(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    12f9 <parse_name+0x1c9>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
or     $0x4,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
jmp    1502 <parse_name+0x3d2>
lea    -0x90(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
lea    0xd01(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    135f <parse_name+0x22f>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
or     $0x8,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
jmp    14fd <parse_name+0x3cd>
lea    -0x90(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
lea    0xca1(%rip),%rsi
mov    $0x7,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    13b7 <parse_name+0x287>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
or     $0x10,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
jmp    14f8 <parse_name+0x3c8>
lea    -0x90(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
lea    0xc51(%rip),%rsi
mov    $0x6,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    140f <parse_name+0x2df>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
or     $0x20,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x18(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
jmp    14f3 <parse_name+0x3c3>
lea    -0x90(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
lea    0xc00(%rip),%rsi
mov    $0x4,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    1467 <parse_name+0x337>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
or     $0x40,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x28(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
mov    -0x20(%rbp),%rax
mov    (%rax),%ecx
add    $0xff,%ecx
mov    %ecx,(%rax)
jmp    14ee <parse_name+0x3be>
lea    -0x90(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
lea    0xbad(%rip),%rsi
mov    $0x5,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
jne    14a6 <parse_name+0x376>
mov    -0x10(%rbp),%rax
mov    (%rax),%ecx
or     $0x80,%ecx
mov    -0x10(%rbp),%rax
mov    %ecx,(%rax)
jmp    14e9 <parse_name+0x3b9>
lea    -0x90(%rbp),%rdi
movslq -0x38(%rbp),%rax
add    %rax,%rdi
lea    0xb74(%rip),%rsi
mov    $0xb,%edx
call   1030 <strncmp@plt>
cmp    $0x0,%eax
je     14dd <parse_name+0x3ad>
mov    -0x30(%rbp),%rax
movl   $0x1,(%rax)
jmp    14e4 <parse_name+0x3b4>
movl   $0x1,-0x3c(%rbp)
jmp    14e9 <parse_name+0x3b9>
jmp    14ee <parse_name+0x3be>
jmp    14f3 <parse_name+0x3c3>
jmp    14f8 <parse_name+0x3c8>
jmp    14fd <parse_name+0x3cd>
jmp    1502 <parse_name+0x3d2>
jmp    1507 <parse_name+0x3d7>
jmp    150c <parse_name+0x3dc>
cmpl   $0x0,-0x3c(%rbp)
jne    160f <parse_name+0x4df>
mov    -0x30(%rbp),%rax
cmpl   $0x0,(%rax)
jne    160f <parse_name+0x4df>
movslq -0x38(%rbp),%rax
mov    -0x90(%rbp,%rax,1),%al
mov    %al,-0x3d(%rbp)
movsbl -0x3d(%rbp),%ecx
xor    %eax,%eax
cmp    $0x2c,%ecx
mov    %al,-0x92(%rbp)
je     156b <parse_name+0x43b>
movsbl -0x3d(%rbp),%ecx
xor    %eax,%eax
cmp    $0x20,%ecx
mov    %al,-0x92(%rbp)
je     156b <parse_name+0x43b>
movsbl -0x3d(%rbp),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x92(%rbp)
mov    -0x92(%rbp),%al
test   $0x1,%al
jne    157e <parse_name+0x44e>
jmp    1598 <parse_name+0x468>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
cltq
mov    -0x90(%rbp,%rax,1),%al
mov    %al,-0x3d(%rbp)
jmp    1531 <parse_name+0x401>
movsbl -0x3d(%rbp),%eax
cmp    $0x0,%eax
je     160a <parse_name+0x4da>
movslq -0x38(%rbp),%rax
mov    -0x90(%rbp,%rax,1),%al
mov    %al,-0x3d(%rbp)
movsbl -0x3d(%rbp),%ecx
mov    $0x1,%al
cmp    $0x2c,%ecx
mov    %al,-0x93(%rbp)
je     15d8 <parse_name+0x4a8>
movsbl -0x3d(%rbp),%eax
cmp    $0x20,%eax
sete   %al
mov    %al,-0x93(%rbp)
mov    -0x93(%rbp),%al
test   $0x1,%al
jne    15eb <parse_name+0x4bb>
jmp    1605 <parse_name+0x4d5>
mov    -0x38(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x38(%rbp)
cltq
mov    -0x90(%rbp,%rax,1),%al
mov    %al,-0x3d(%rbp)
jmp    15b3 <parse_name+0x483>
jmp    160a <parse_name+0x4da>
jmp    160f <parse_name+0x4df>
jmp    11cf <parse_name+0x9f>
cmpl   $0x0,-0x3c(%rbp)
setne  %al
xor    $0xff,%al
and    $0x1,%al
movzbl %al,%eax
add    $0xa0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<parse_name>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x78,%rsp
mov    %r9,%r14
mov    %r8,0x8(%rsp)
mov    %rcx,0x10(%rsp)
mov    %rdx,0x18(%rsp)
mov    %rsi,(%rsp)
mov    %rdi,%rsi
lea    0x20(%rsp),%rdi
call   1040 <strcpy@plt>
mov    0x20(%rsp),%al
mov    $0x1,%ebx
test   %al,%al
je     13e5 <parse_name+0x2b5>
lea    0x21(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
movsbl %al,%edi
call   1050 <tolower@plt>
mov    %al,-0x1(%rbp)
movzbl 0x0(%rbp),%eax
add    $0x1,%rbp
test   %al,%al
jne    1180 <parse_name+0x50>
mov    0x20(%rsp),%r13b
test   %r13b,%r13b
je     13e5 <parse_name+0x2b5>
mov    %r14,%rbx
mov    (%r14),%eax
xor    %r15d,%r15d
movabs $0x100000000,%r12
jmp    11c9 <parse_name+0x99>
nopw   0x0(%rax,%rax,1)
test   %r13b,%r13b
je     13e0 <parse_name+0x2b0>
test   %eax,%eax
jne    13e0 <parse_name+0x2b0>
movslq %r15d,%rbp
lea    (%rsp,%rbp,1),%r14
add    $0x20,%r14
mov    $0x3,%edx
mov    %r14,%rdi
lea    0xe15(%rip),%rsi
call   1030 <strncmp@plt>
test   %eax,%eax
je     12f0 <parse_name+0x1c0>
mov    $0x5,%edx
mov    %r14,%rdi
lea    0xdfd(%rip),%rsi
call   1030 <strncmp@plt>
test   %eax,%eax
je     1300 <parse_name+0x1d0>
mov    $0x4,%edx
mov    %r14,%rdi
lea    0xde7(%rip),%rsi
call   1030 <strncmp@plt>
test   %eax,%eax
je     130e <parse_name+0x1de>
mov    $0x5,%edx
mov    %r14,%rdi
lea    0xdd0(%rip),%rsi
call   1030 <strncmp@plt>
test   %eax,%eax
je     1317 <parse_name+0x1e7>
mov    $0x7,%edx
mov    %r14,%rdi
lea    0xdba(%rip),%rsi
call   1030 <strncmp@plt>
test   %eax,%eax
je     1330 <parse_name+0x200>
mov    $0x6,%edx
mov    %r14,%rdi
lea    0xda6(%rip),%rsi
call   1030 <strncmp@plt>
test   %eax,%eax
je     13af <parse_name+0x27f>
mov    $0x4,%edx
mov    %r14,%rdi
lea    0xd91(%rip),%rsi
call   1030 <strncmp@plt>
test   %eax,%eax
je     13bd <parse_name+0x28d>
mov    $0x5,%edx
mov    %r14,%rdi
lea    0xd7a(%rip),%rsi
call   1030 <strncmp@plt>
test   %eax,%eax
je     13d4 <parse_name+0x2a4>
mov    $0xb,%edx
mov    %r14,%rdi
lea    0xd64(%rip),%rsi
call   1030 <strncmp@plt>
test   %eax,%eax
je     13f6 <parse_name+0x2c6>
movl   $0x1,(%rbx)
mov    $0x1,%eax
jmp    11c0 <parse_name+0x90>
nopl   0x0(%rax,%rax,1)
mov    (%rsp),%rax
orb    $0x1,(%rax)
mov    0x18(%rsp),%rax
jmp    1347 <parse_name+0x217>
xchg   %ax,%ax
mov    (%rsp),%rax
orb    $0x2,(%rax)
mov    0x10(%rsp),%rax
jmp    1347 <parse_name+0x217>
mov    (%rsp),%rax
orb    $0x4,(%rax)
jmp    1342 <parse_name+0x212>
mov    (%rsp),%rax
orb    $0x8,(%rax)
mov    0x18(%rsp),%rax
addl   $0xff,(%rax)
mov    0x10(%rsp),%rax
jmp    133c <parse_name+0x20c>
mov    (%rsp),%rax
orb    $0x10,(%rax)
mov    0x18(%rsp),%rax
addl   $0xff,(%rax)
mov    0x8(%rsp),%rax
addl   $0xff,(%rax)
mov    (%rbx),%eax
test   %eax,%eax
jne    11c0 <parse_name+0x90>
shl    $0x20,%rbp
nopl   0x0(%rax,%rax,1)
movzbl (%r14),%eax
test   %al,%al
je     13e0 <parse_name+0x2b0>
cmp    $0x20,%al
je     1380 <parse_name+0x250>
cmp    $0x2c,%al
je     1380 <parse_name+0x250>
add    %r12,%rbp
add    $0x1,%r14
add    $0x1,%r15d
jmp    1360 <parse_name+0x230>
nopl   (%rax)
movslq %r15d,%rax
add    %rsp,%rax
add    $0x20,%rax
jmp    1398 <parse_name+0x268>
nopl   0x0(%rax)
add    $0x1,%r15d
add    $0x1,%rax
movzbl (%rax),%r13d
cmp    $0x2c,%r13b
je     1390 <parse_name+0x260>
cmp    $0x20,%r13b
je     1390 <parse_name+0x260>
xor    %eax,%eax
jmp    11c0 <parse_name+0x90>
mov    (%rsp),%rax
orb    $0x20,(%rax)
mov    0x18(%rsp),%rax
jmp    13c9 <parse_name+0x299>
mov    (%rsp),%rax
orb    $0x40,(%rax)
mov    0x8(%rsp),%rax
addl   $0xff,(%rax)
jmp    1307 <parse_name+0x1d7>
mov    (%rsp),%rax
orb    $0x80,(%rax)
jmp    134d <parse_name+0x21d>
mov    $0x1,%ebx
mov    %ebx,%eax
add    $0x78,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %ebx,%ebx
jmp    13e5 <parse_name+0x2b5>

LLVM IR (-O0):
@.str = [4 x i8] c"red\00"
@.str.1 = [6 x i8] c"green\00"
@.str.2 = [5 x i8] c"blue\00"
@.str.3 = [6 x i8] c"white\00"
@.str.4 = [8 x i8] c"magenta\00"
@.str.5 = [7 x i8] c"yellow\00"
@.str.6 = [5 x i8] c"cyan\00"
@.str.7 = [6 x i8] c"black\00"
@.str.8 = [12 x i8] c"transparent\00"
define i32 @parse_name(i8* %0, i32* %1, i32* %2, i32* %3, i32* %4, i32* %5) {
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca i32*
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8
%17 = alloca [80 x i8]
store i8* %0, i8** %7
store i32* %1, i32** %8
store i32* %2, i32** %9
store i32* %3, i32** %10
store i32* %4, i32** %11
store i32* %5, i32** %12
store i32 0, i32* %14
store i32 0, i32* %15
%18 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%19 = load i8*, i8** %7
%20 = call i8* @strcpy(i8* %18, i8* %19)
store i32 0, i32* %13
%21 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%22 = load i8, i8* %21
store i8 %22, i8* %16
br label %23
23: ; preds = %38, %6
%24 = load i8, i8* %16
%25 = sext i8 %24 to i32
%26 = icmp ne i32 %25, 0
br i1 %26, label %27, label %44
27: ; preds = %23
%28 = load i32, i32* %13
%29 = sext i32 %28 to i64
%30 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 %29
%31 = load i8, i8* %30
%32 = sext i8 %31 to i32
%33 = call i32 @tolower(i32 %32)
%34 = trunc i32 %33 to i8
%35 = load i32, i32* %13
%36 = sext i32 %35 to i64
%37 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 %36
store i8 %34, i8* %37
br label %38
38: ; preds = %27
%39 = load i32, i32* %13
%40 = add nsw i32 %39, 1
store i32 %40, i32* %13
%41 = sext i32 %40 to i64
%42 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 %41
%43 = load i8, i8* %42
store i8 %43, i8* %16
br label %23
44: ; preds = %23
%45 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%46 = load i8, i8* %45
store i8 %46, i8* %16
br label %47
47: ; preds = %270, %44
%48 = load i8, i8* %16
%49 = sext i8 %48 to i32
%50 = icmp ne i32 %49, 0
br i1 %50, label %51, label %59
51: ; preds = %47
%52 = load i32, i32* %15
%53 = icmp ne i32 %52, 0
br i1 %53, label %59, label %54
54: ; preds = %51
%55 = load i32*, i32** %12
%56 = load i32, i32* %55
%57 = icmp ne i32 %56, 0
%58 = xor i1 %57, true
br label %59
59: ; preds = %54, %51, %47
%60 = phi i1 [ false, %51 ], [ false, %47 ], [ %58, %54 ]
br i1 %60, label %61, label %271
61: ; preds = %59
%62 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%63 = load i32, i32* %14
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %62, i64 %64
%66 = call i32 @strncmp(i8* %65, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 3)
%67 = icmp eq i32 %66, 0
br i1 %67, label %68, label %76
68: ; preds = %61
%69 = load i32*, i32** %8
%70 = load i32, i32* %69
%71 = or i32 %70, 1
%72 = load i32*, i32** %8
store i32 %71, i32* %72
%73 = load i32*, i32** %9
%74 = load i32, i32* %73
%75 = add nsw i32 %74, 255
store i32 %75, i32* %73
br label %211
76: ; preds = %61
%77 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%78 = load i32, i32* %14
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds i8, i8* %77, i64 %79
%81 = call i32 @strncmp(i8* %80, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 5)
%82 = icmp eq i32 %81, 0
br i1 %82, label %83, label %91
83: ; preds = %76
%84 = load i32*, i32** %8
%85 = load i32, i32* %84
%86 = or i32 %85, 2
%87 = load i32*, i32** %8
store i32 %86, i32* %87
%88 = load i32*, i32** %10
%89 = load i32, i32* %88
%90 = add nsw i32 %89, 255
store i32 %90, i32* %88
br label %210
91: ; preds = %76
%92 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%93 = load i32, i32* %14
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds i8, i8* %92, i64 %94
%96 = call i32 @strncmp(i8* %95, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4)
%97 = icmp eq i32 %96, 0
br i1 %97, label %98, label %106
98: ; preds = %91
%99 = load i32*, i32** %8
%100 = load i32, i32* %99
%101 = or i32 %100, 4
%102 = load i32*, i32** %8
store i32 %101, i32* %102
%103 = load i32*, i32** %11
%104 = load i32, i32* %103
%105 = add nsw i32 %104, 255
store i32 %105, i32* %103
br label %209
106: ; preds = %91
%107 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%108 = load i32, i32* %14
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds i8, i8* %107, i64 %109
%111 = call i32 @strncmp(i8* %110, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 5)
%112 = icmp eq i32 %111, 0
br i1 %112, label %113, label %127
113: ; preds = %106
%114 = load i32*, i32** %8
%115 = load i32, i32* %114
%116 = or i32 %115, 8
%117 = load i32*, i32** %8
store i32 %116, i32* %117
%118 = load i32*, i32** %9
%119 = load i32, i32* %118
%120 = add nsw i32 %119, 255
store i32 %120, i32* %118
%121 = load i32*, i32** %10
%122 = load i32, i32* %121
%123 = add nsw i32 %122, 255
store i32 %123, i32* %121
%124 = load i32*, i32** %11
%125 = load i32, i32* %124
%126 = add nsw i32 %125, 255
store i32 %126, i32* %124
br label %208
127: ; preds = %106
%128 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%129 = load i32, i32* %14
%130 = sext i32 %129 to i64
%131 = getelementptr inbounds i8, i8* %128, i64 %130
%132 = call i32 @strncmp(i8* %131, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i64 7)
%133 = icmp eq i32 %132, 0
br i1 %133, label %134, label %145
134: ; preds = %127
%135 = load i32*, i32** %8
%136 = load i32, i32* %135
%137 = or i32 %136, 16
%138 = load i32*, i32** %8
store i32 %137, i32* %138
%139 = load i32*, i32** %9
%140 = load i32, i32* %139
%141 = add nsw i32 %140, 255
store i32 %141, i32* %139
%142 = load i32*, i32** %11
%143 = load i32, i32* %142
%144 = add nsw i32 %143, 255
store i32 %144, i32* %142
br label %207
145: ; preds = %127
%146 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%147 = load i32, i32* %14
%148 = sext i32 %147 to i64
%149 = getelementptr inbounds i8, i8* %146, i64 %148
%150 = call i32 @strncmp(i8* %149, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i64 6)
%151 = icmp eq i32 %150, 0
br i1 %151, label %152, label %163
152: ; preds = %145
%153 = load i32*, i32** %8
%154 = load i32, i32* %153
%155 = or i32 %154, 32
%156 = load i32*, i32** %8
store i32 %155, i32* %156
%157 = load i32*, i32** %9
%158 = load i32, i32* %157
%159 = add nsw i32 %158, 255
store i32 %159, i32* %157
%160 = load i32*, i32** %10
%161 = load i32, i32* %160
%162 = add nsw i32 %161, 255
store i32 %162, i32* %160
br label %206
163: ; preds = %145
%164 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%165 = load i32, i32* %14
%166 = sext i32 %165 to i64
%167 = getelementptr inbounds i8, i8* %164, i64 %166
%168 = call i32 @strncmp(i8* %167, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i64 4)
%169 = icmp eq i32 %168, 0
br i1 %169, label %170, label %181
170: ; preds = %163
%171 = load i32*, i32** %8
%172 = load i32, i32* %171
%173 = or i32 %172, 64
%174 = load i32*, i32** %8
store i32 %173, i32* %174
%175 = load i32*, i32** %11
%176 = load i32, i32* %175
%177 = add nsw i32 %176, 255
store i32 %177, i32* %175
%178 = load i32*, i32** %10
%179 = load i32, i32* %178
%180 = add nsw i32 %179, 255
store i32 %180, i32* %178
br label %205
181: ; preds = %163
%182 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%183 = load i32, i32* %14
%184 = sext i32 %183 to i64
%185 = getelementptr inbounds i8, i8* %182, i64 %184
%186 = call i32 @strncmp(i8* %185, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i64 5)
%187 = icmp eq i32 %186, 0
br i1 %187, label %188, label %193
188: ; preds = %181
%189 = load i32*, i32** %8
%190 = load i32, i32* %189
%191 = or i32 %190, 128
%192 = load i32*, i32** %8
store i32 %191, i32* %192
br label %204
193: ; preds = %181
%194 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 0
%195 = load i32, i32* %14
%196 = sext i32 %195 to i64
%197 = getelementptr inbounds i8, i8* %194, i64 %196
%198 = call i32 @strncmp(i8* %197, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i64 11)
%199 = icmp ne i32 %198, 0
br i1 %199, label %200, label %202
200: ; preds = %193
%201 = load i32*, i32** %12
store i32 1, i32* %201
br label %203
202: ; preds = %193
store i32 1, i32* %15
br label %203
203: ; preds = %202, %200
br label %204
204: ; preds = %203, %188
br label %205
205: ; preds = %204, %170
br label %206
206: ; preds = %205, %152
br label %207
207: ; preds = %206, %134
br label %208
208: ; preds = %207, %113
br label %209
209: ; preds = %208, %98
br label %210
210: ; preds = %209, %83
br label %211
211: ; preds = %210, %68
%212 = load i32, i32* %15
%213 = icmp ne i32 %212, 0
br i1 %213, label %270, label %214
214: ; preds = %211
%215 = load i32*, i32** %12
%216 = load i32, i32* %215
%217 = icmp ne i32 %216, 0
br i1 %217, label %270, label %218
218: ; preds = %214
%219 = load i32, i32* %14
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 %220
%222 = load i8, i8* %221
store i8 %222, i8* %16
br label %223
223: ; preds = %237, %218
%224 = load i8, i8* %16
%225 = sext i8 %224 to i32
%226 = icmp ne i32 %225, 44
br i1 %226, label %227, label %235
227: ; preds = %223
%228 = load i8, i8* %16
%229 = sext i8 %228 to i32
%230 = icmp ne i32 %229, 32
br i1 %230, label %231, label %235
231: ; preds = %227
%232 = load i8, i8* %16
%233 = sext i8 %232 to i32
%234 = icmp ne i32 %233, 0
br label %235
235: ; preds = %231, %227, %223
%236 = phi i1 [ false, %227 ], [ false, %223 ], [ %234, %231 ]
br i1 %236, label %237, label %243
237: ; preds = %235
%238 = load i32, i32* %14
%239 = add nsw i32 %238, 1
store i32 %239, i32* %14
%240 = sext i32 %239 to i64
%241 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 %240
%242 = load i8, i8* %241
store i8 %242, i8* %16
br label %223
243: ; preds = %235
%244 = load i8, i8* %16
%245 = sext i8 %244 to i32
%246 = icmp ne i32 %245, 0
br i1 %246, label %247, label %269
247: ; preds = %243
%248 = load i32, i32* %14
%249 = sext i32 %248 to i64
%250 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 %249
%251 = load i8, i8* %250
store i8 %251, i8* %16
br label %252
252: ; preds = %262, %247
%253 = load i8, i8* %16
%254 = sext i8 %253 to i32
%255 = icmp eq i32 %254, 44
br i1 %255, label %260, label %256
256: ; preds = %252
%257 = load i8, i8* %16
%258 = sext i8 %257 to i32
%259 = icmp eq i32 %258, 32
br label %260
260: ; preds = %256, %252
%261 = phi i1 [ true, %252 ], [ %259, %256 ]
br i1 %261, label %262, label %268
262: ; preds = %260
%263 = load i32, i32* %14
%264 = add nsw i32 %263, 1
store i32 %264, i32* %14
%265 = sext i32 %264 to i64
%266 = getelementptr inbounds [80 x i8], [80 x i8]* %17, i64 0, i64 %265
%267 = load i8, i8* %266
store i8 %267, i8* %16
br label %252
268: ; preds = %260
br label %269
269: ; preds = %268, %243
br label %270
270: ; preds = %269, %214, %211
br label %47
271: ; preds = %59
%272 = load i32, i32* %15
%273 = icmp ne i32 %272, 0
%274 = xor i1 %273, true
%275 = zext i1 %274 to i32
ret i32 %275
}

LLVM IR (-O2):
@.str = [4 x i8] c"red\00"
@.str.1 = [6 x i8] c"green\00"
@.str.2 = [5 x i8] c"blue\00"
@.str.3 = [6 x i8] c"white\00"
@.str.4 = [8 x i8] c"magenta\00"
@.str.5 = [7 x i8] c"yellow\00"
@.str.6 = [5 x i8] c"cyan\00"
@.str.7 = [6 x i8] c"black\00"
@.str.8 = [12 x i8] c"transparent\00"
define i32 @parse_name(i8* nocapture %0, i32* nocapture %1, i32* nocapture %2, i32* nocapture %3, i32* nocapture %4, i32* nocapture %5) {
%7 = alloca [80 x i8]
%8 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 0
%9 = call i8* @strcpy(i8* %8, i8* dereferenceable(1) %0)
%10 = load i8, i8* %8
%11 = icmp eq i8 %10, 0
br i1 %11, label %136, label %12
12: ; preds = %6, %12
%13 = phi i8 [ %21, %12 ], [ %10, %6 ]
%14 = phi i64 [ %19, %12 ], [ 0, %6 ]
%15 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 %14
%16 = sext i8 %13 to i32
%17 = call i32 @tolower(i32 %16)
%18 = trunc i32 %17 to i8
store i8 %18, i8* %15
%19 = add nuw nsw i64 %14, 1
%20 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 %19
%21 = load i8, i8* %20
%22 = icmp eq i8 %21, 0
br i1 %22, label %23, label %12
23: ; preds = %12
%24 = load i8, i8* %8
%25 = icmp eq i8 %24, 0
br i1 %25, label %136, label %26
26: ; preds = %23
%27 = load i32, i32* %5
br label %28
28: ; preds = %26, %131
%29 = phi i32 [ %132, %131 ], [ %27, %26 ]
%30 = phi i8 [ %134, %131 ], [ %24, %26 ]
%31 = phi i32 [ %133, %131 ], [ 0, %26 ]
%32 = icmp eq i32 %29, 0
br i1 %32, label %33, label %136
33: ; preds = %28
%34 = sext i32 %31 to i64
%35 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 %34
%36 = call i32 @strncmp(i8* %35, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i64 3)
%37 = icmp eq i32 %36, 0
br i1 %37, label %38, label %43
38: ; preds = %33
%39 = load i32, i32* %1
%40 = or i32 %39, 1
store i32 %40, i32* %1
%41 = load i32, i32* %2
%42 = add nsw i32 %41, 255
store i32 %42, i32* %2
br label %111
43: ; preds = %33
%44 = call i32 @strncmp(i8* %35, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i64 5)
%45 = icmp eq i32 %44, 0
br i1 %45, label %46, label %51
46: ; preds = %43
%47 = load i32, i32* %1
%48 = or i32 %47, 2
store i32 %48, i32* %1
%49 = load i32, i32* %3
%50 = add nsw i32 %49, 255
store i32 %50, i32* %3
br label %111
51: ; preds = %43
%52 = call i32 @strncmp(i8* %35, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4)
%53 = icmp eq i32 %52, 0
br i1 %53, label %54, label %59
54: ; preds = %51
%55 = load i32, i32* %1
%56 = or i32 %55, 4
store i32 %56, i32* %1
%57 = load i32, i32* %4
%58 = add nsw i32 %57, 255
store i32 %58, i32* %4
br label %111
59: ; preds = %51
%60 = call i32 @strncmp(i8* %35, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i64 5)
%61 = icmp eq i32 %60, 0
br i1 %61, label %62, label %71
62: ; preds = %59
%63 = load i32, i32* %1
%64 = or i32 %63, 8
store i32 %64, i32* %1
%65 = load i32, i32* %2
%66 = add nsw i32 %65, 255
store i32 %66, i32* %2
%67 = load i32, i32* %3
%68 = add nsw i32 %67, 255
store i32 %68, i32* %3
%69 = load i32, i32* %4
%70 = add nsw i32 %69, 255
store i32 %70, i32* %4
br label %111
71: ; preds = %59
%72 = call i32 @strncmp(i8* %35, i8* dereferenceable(8) getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i64 7)
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %81
74: ; preds = %71
%75 = load i32, i32* %1
%76 = or i32 %75, 16
store i32 %76, i32* %1
%77 = load i32, i32* %2
%78 = add nsw i32 %77, 255
store i32 %78, i32* %2
%79 = load i32, i32* %4
%80 = add nsw i32 %79, 255
store i32 %80, i32* %4
br label %111
81: ; preds = %71
%82 = call i32 @strncmp(i8* %35, i8* dereferenceable(7) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0), i64 6)
%83 = icmp eq i32 %82, 0
br i1 %83, label %84, label %91
84: ; preds = %81
%85 = load i32, i32* %1
%86 = or i32 %85, 32
store i32 %86, i32* %1
%87 = load i32, i32* %2
%88 = add nsw i32 %87, 255
store i32 %88, i32* %2
%89 = load i32, i32* %3
%90 = add nsw i32 %89, 255
store i32 %90, i32* %3
br label %111
91: ; preds = %81
%92 = call i32 @strncmp(i8* %35, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0), i64 4)
%93 = icmp eq i32 %92, 0
br i1 %93, label %94, label %101
94: ; preds = %91
%95 = load i32, i32* %1
%96 = or i32 %95, 64
store i32 %96, i32* %1
%97 = load i32, i32* %4
%98 = add nsw i32 %97, 255
store i32 %98, i32* %4
%99 = load i32, i32* %3
%100 = add nsw i32 %99, 255
store i32 %100, i32* %3
br label %111
101: ; preds = %91
%102 = call i32 @strncmp(i8* %35, i8* dereferenceable(6) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i64 5)
%103 = icmp eq i32 %102, 0
br i1 %103, label %104, label %107
104: ; preds = %101
%105 = load i32, i32* %1
%106 = or i32 %105, 128
store i32 %106, i32* %1
br label %111
107: ; preds = %101
%108 = call i32 @strncmp(i8* %35, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str.8, i64 0, i64 0), i64 11)
%109 = icmp eq i32 %108, 0
br i1 %109, label %136, label %110
110: ; preds = %107
store i32 1, i32* %5
br label %131
111: ; preds = %46, %62, %84, %104, %94, %74, %54, %38
%112 = load i32, i32* %5
%113 = icmp eq i32 %112, 0
br i1 %113, label %114, label %131
114: ; preds = %111, %118
%115 = phi i64 [ %119, %118 ], [ %34, %111 ]
%116 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 %115
%117 = load i8, i8* %116
switch i8 %117, label %118 [
i8 0, label %136
i8 32, label %120
i8 44, label %120
]
118: ; preds = %114
%119 = add i64 %115, 1
br label %114
120: ; preds = %114, %114
%121 = shl i64 %115, 32
%122 = ashr exact i64 %121, 32
br label %123
123: ; preds = %127, %120
%124 = phi i64 [ %128, %127 ], [ %122, %120 ]
%125 = getelementptr inbounds [80 x i8], [80 x i8]* %7, i64 0, i64 %124
%126 = load i8, i8* %125
switch i8 %126, label %129 [
i8 44, label %127
i8 32, label %127
]
127: ; preds = %123, %123
%128 = add i64 %124, 1
br label %123
129: ; preds = %123
%130 = trunc i64 %124 to i32
br label %131
131: ; preds = %129, %110, %111
%132 = phi i32 [ 1, %110 ], [ %112, %111 ], [ 0, %129 ]
%133 = phi i32 [ %31, %110 ], [ %31, %111 ], [ %130, %129 ]
%134 = phi i8 [ %30, %110 ], [ %30, %111 ], [ %126, %129 ]
%135 = icmp eq i8 %134, 0
br i1 %135, label %136, label %28
136: ; preds = %107, %28, %131, %114, %6, %23
%137 = phi i32 [ 1, %23 ], [ 1, %6 ], [ 1, %114 ], [ 0, %107 ], [ 1, %131 ], [ 1, %28 ]
ret i32 %137
}