#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 */
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ strtol(char *, int /*<<< orphan*/ *, int);
int main(int argc, char *argv[]) {
  float red, green, blue, alpha = 1.0;
  float y, pb, pr;
  if (argc < 4 || argc > 5) {
    printf("Usage: %s red green blue [alpha]\n", argv[0]);
    printf("Range is from 00 to FF (hexadecimal expected)\n");
    return -1;
  }
  red = (float)strtol(argv[1], NULL, 16) / 255.0;
  green = (float)strtol(argv[2], NULL, 16) / 255.0;
  blue = (float)strtol(argv[3], NULL, 16) / 255.0;
  if (argc == 5) {
    alpha = (float)strtol(argv[4], NULL, 16) / 255.0;
  }
  printf("Red: %1.5f\tGreen: %1.5f\tBlue:%1.5f\tAlpha:%1.5f\n", red, green,
         blue, alpha);
  y = 0.2126 * red + 0.7152 * green + 0.0722 * blue;
  pb = -0.1162 * red - 0.3838 * green + 0.5000 * blue;
  pr = 0.5000 * red - 0.4451 * green - 0.0549 * blue;
  printf("Y: %1.5f\tPb: %1.5f\tPr: %1.5f\tAlpha: %1.5f\n", y, pb, pr, alpha);
  pb += 0.5;
  pr += 0.5;
  if (y < 0.0) {
    y = 0.0;
  } else if (y > 1.0) {
    y = 1.0;
  }
  if (pb < 0.0) {
    pb = 0.0;
  } else if (pb > 1.0) {
    pb = 1.0;
  }
  if (pr < 0.0) {
    pr = 0.0;
  } else if (pr > 1.0) {
    pr = 1.0;
  }
  if (alpha < 0.0) {
    alpha = 0.0;
  } else if (alpha > 1.0) {
    alpha = 1.0;
  }
  printf("Hex value (AYPbPr): %02x%02x%02x%02x\n",
         (unsigned char)(alpha * 127.0), (unsigned char)(y * 255.0),
         (unsigned char)(pb * 255.0), (unsigned char)(pr * 255.0));
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movss  0xec2(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
cmpl   $0x4,-0x8(%rbp)
jl     1157 <main+0x37>
cmpl   $0x5,-0x8(%rbp)
jle    1186 <main+0x66>
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xefb(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xf0f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0xffffffff,-0x4(%rbp)
jmp    15d4 <main+0x4b4>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1040 <strtol@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe5b(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
mov    -0x10(%rbp),%rax
mov    0x10(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1040 <strtol@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xe27(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x18(%rbp)
mov    -0x10(%rbp),%rax
mov    0x18(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1040 <strtol@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdf3(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
cmpl   $0x5,-0x8(%rbp)
jne    1260 <main+0x140>
mov    -0x10(%rbp),%rax
mov    0x20(%rax),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1040 <strtol@plt>
cvtsi2ss %rax,%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xdb5(%rip),%xmm1
divsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x18(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x1c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x20(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xe26(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xd9c(%rip),%xmm0
mulsd  %xmm2,%xmm0
movsd  0xd88(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xd67(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xd34(%rip),%xmm0
mulsd  %xmm2,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xd09(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xcd8(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x14(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
movss  -0x18(%rbp),%xmm0
cvtss2sd %xmm0,%xmm2
movsd  0xcbd(%rip),%xmm0
mulsd  %xmm2,%xmm0
movq   %xmm0,%rax
movabs $0x8000000000000000,%rcx
xor    %rcx,%rax
movq   %rax,%xmm0
movsd  0xc8a(%rip),%xmm2
mulsd  %xmm2,%xmm1
addsd  %xmm0,%xmm1
movss  -0x1c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc79(%rip),%xmm2
mulsd  %xmm2,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movss  -0x28(%rbp),%xmm1
cvtss2sd %xmm1,%xmm1
movss  -0x2c(%rbp),%xmm2
cvtss2sd %xmm2,%xmm2
movss  -0x20(%rbp),%xmm3
cvtss2sd %xmm3,%xmm3
lea    0xd06(%rip),%rdi
mov    $0x4,%al
call   1030 <printf@plt>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xc1d(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xbff(%rip),%xmm1
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1441 <main+0x321>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    146e <main+0x34e>
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xbfe(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1469 <main+0x349>
movss  0xb9c(%rip),%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    146e <main+0x34e>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1491 <main+0x371>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x28(%rbp)
jmp    14be <main+0x39e>
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xbae(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    14b9 <main+0x399>
movss  0xb4c(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
jmp    14be <main+0x39e>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    14e1 <main+0x3c1>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
jmp    150e <main+0x3ee>
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xb5e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1509 <main+0x3e9>
movss  0xafc(%rip),%xmm0
movss  %xmm0,-0x2c(%rbp)
jmp    150e <main+0x3ee>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm1
xorps  %xmm0,%xmm0
ucomisd %xmm1,%xmm0
jbe    1531 <main+0x411>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    155e <main+0x43e>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xb0e(%rip),%xmm1
ucomisd %xmm1,%xmm0
jbe    1559 <main+0x439>
movss  0xaac(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    155e <main+0x43e>
movss  -0x20(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xae9(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%esi
movss  -0x24(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
movsd  0xa7d(%rip),%xmm1
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%edx
movss  -0x28(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%ecx
movss  -0x2c(%rbp),%xmm0
cvtss2sd %xmm0,%xmm0
mulsd  %xmm1,%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%r8d
lea    0xb46(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
sub    $0x38,%rsp
mov    %rsi,%rbx
mov    %edi,%r14d
lea    -0x6(%r14),%eax
cmp    $0xfffffffd,%eax
ja     116d <main+0x3d>
mov    (%rbx),%rsi
lea    0xf10(%rip),%rdi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xfa5(%rip),%rdi
call   1030 <puts@plt>
mov    $0xffffffff,%ebx
jmp    1428 <main+0x2f8>
mov    0x8(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <strtol@plt>
cvtsi2ss %rax,%xmm0
divss  0xe76(%rip),%xmm0
movss  %xmm0,0xc(%rsp)
mov    0x10(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <strtol@plt>
xorps  %xmm0,%xmm0
cvtsi2ss %rax,%xmm0
divss  0xe50(%rip),%xmm0
movss  %xmm0,0x10(%rsp)
mov    0x18(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1050 <strtol@plt>
cvtsi2ss %rax,%xmm2
divss  0xe2d(%rip),%xmm2
cmp    $0x5,%r14d
jne    1204 <main+0xd4>
mov    0x20(%rbx),%rdi
xor    %esi,%esi
mov    $0x10,%edx
movss  %xmm2,0x18(%rsp)
call   1050 <strtol@plt>
movss  0x18(%rsp),%xmm2
cvtsi2ss %rax,%xmm3
divss  0xdfe(%rip),%xmm3
jmp    120c <main+0xdc>
movss  0xdf8(%rip),%xmm3
movss  0xc(%rsp),%xmm1
xorps  %xmm0,%xmm0
cvtss2sd %xmm1,%xmm0
movsd  %xmm0,0x30(%rsp)
movss  0x10(%rsp),%xmm1
cvtss2sd %xmm1,%xmm1
movsd  %xmm1,0x28(%rsp)
cvtss2sd %xmm2,%xmm2
movsd  %xmm2,0x10(%rsp)
movss  %xmm3,0xc(%rsp)
cvtss2sd %xmm3,%xmm3
movsd  %xmm3,0x18(%rsp)
lea    0xe32(%rip),%rdi
mov    $0x4,%al
call   1040 <printf@plt>
movsd  0xdb1(%rip),%xmm0
movsd  0x28(%rsp),%xmm2
mulsd  %xmm2,%xmm0
movsd  0xda7(%rip),%xmm1
movsd  0x30(%rsp),%xmm5
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
movsd  0xd99(%rip),%xmm0
movsd  0x10(%rsp),%xmm4
mulsd  %xmm4,%xmm0
addsd  %xmm1,%xmm0
cvtsd2ss %xmm0,%xmm6
movss  %xmm6,0x24(%rsp)
movsd  0xd81(%rip),%xmm0
mulsd  %xmm2,%xmm0
movapd %xmm2,%xmm3
movsd  0xd79(%rip),%xmm1
mulsd  %xmm5,%xmm1
addsd  %xmm0,%xmm1
movsd  0xd71(%rip),%xmm0
movapd %xmm4,%xmm2
mulsd  %xmm0,%xmm2
addsd  %xmm1,%xmm2
cvtsd2ss %xmm2,%xmm7
movss  %xmm7,0x20(%rsp)
mulsd  0xd5b(%rip),%xmm3
movapd %xmm5,%xmm1
mulsd  %xmm0,%xmm1
movapd %xmm4,%xmm0
mulsd  0xd4f(%rip),%xmm0
addsd  %xmm3,%xmm1
addsd  %xmm1,%xmm0
xorps  %xmm2,%xmm2
cvtsd2ss %xmm0,%xmm2
xorps  %xmm0,%xmm0
cvtss2sd %xmm6,%xmm0
xorps  %xmm1,%xmm1
cvtss2sd %xmm7,%xmm1
movss  %xmm2,0x10(%rsp)
cvtss2sd %xmm2,%xmm2
lea    0xd8b(%rip),%rdi
movsd  0x18(%rsp),%xmm3
mov    $0x4,%al
call   1040 <printf@plt>
movss  0x24(%rsp),%xmm4
movss  0x20(%rsp),%xmm3
movss  0xcc0(%rip),%xmm2
addss  %xmm2,%xmm3
xorps  %xmm0,%xmm0
ucomiss %xmm4,%xmm0
xorps  %xmm1,%xmm1
ja     136b <main+0x23b>
ucomiss 0xca6(%rip),%xmm4
movaps %xmm4,%xmm1
jbe    136b <main+0x23b>
movss  0xc99(%rip),%xmm1
movss  0x10(%rsp),%xmm5
addss  %xmm2,%xmm5
ucomiss %xmm3,%xmm0
ja     138e <main+0x25e>
ucomiss 0xc83(%rip),%xmm3
movaps %xmm3,%xmm0
jbe    138e <main+0x25e>
movss  0xc76(%rip),%xmm0
xorps  %xmm3,%xmm3
ucomiss %xmm5,%xmm3
xorps  %xmm2,%xmm2
movss  0xc(%rsp),%xmm4
ja     13b3 <main+0x283>
ucomiss 0xc5e(%rip),%xmm5
movaps %xmm5,%xmm2
jbe    13b3 <main+0x283>
movss  0xc51(%rip),%xmm2
ucomiss %xmm4,%xmm3
ja     13cc <main+0x29c>
ucomiss 0xc45(%rip),%xmm4
movaps %xmm4,%xmm3
jbe    13cc <main+0x29c>
movss  0xc38(%rip),%xmm3
cvtss2sd %xmm3,%xmm3
mulsd  0xc78(%rip),%xmm3
cvttsd2si %xmm3,%eax
cvtss2sd %xmm1,%xmm1
movsd  0xc70(%rip),%xmm3
mulsd  %xmm3,%xmm1
cvttsd2si %xmm1,%ecx
movzbl %al,%esi
movzbl %cl,%edx
cvtss2sd %xmm0,%xmm0
mulsd  %xmm3,%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%ecx
xorps  %xmm0,%xmm0
cvtss2sd %xmm2,%xmm0
mulsd  %xmm3,%xmm0
cvttsd2si %xmm0,%eax
movzbl %al,%r8d
lea    0xcbe(%rip),%rdi
xor    %ebx,%ebx
xor    %eax,%eax
call   1040 <printf@plt>
mov    %ebx,%eax
add    $0x38,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [34 x i8] c"Usage: %s red green blue [alpha]\0A\00"
@.str.1 = [47 x i8] c"Range is from 00 to FF (hexadecimal expected)\0A\00"
@.str.2 = [48 x i8] c"Red: %1.5f\09Green: %1.5f\09Blue:%1.5f\09Alpha:%1.5f\0A\00"
@.str.3 = [43 x i8] c"Y: %1.5f\09Pb: %1.5f\09Pr: %1.5f\09Alpha: %1.5f\0A\00"
@.str.4 = [38 x i8] c"Hex value (AYPbPr): %02x%02x%02x%02x\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca float
%7 = alloca float
%8 = alloca float
%9 = alloca float
%10 = alloca float
%11 = alloca float
%12 = alloca float
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store float 1.000000e+00, float* %9
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 4
br i1 %14, label %18, label %15
15: ; preds = %2
%16 = load i32, i32* %4
%17 = icmp sgt i32 %16, 5
br i1 %17, label %18, label %24
18: ; preds = %15, %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 0
%21 = load i8*, i8** %20
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %21)
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([47 x i8], [47 x i8]* @.str.1, i64 0, i64 0))
store i32 -1, i32* %3
br label %184
24: ; preds = %15
%25 = load i8**, i8*** %5
%26 = getelementptr inbounds i8*, i8** %25, i64 1
%27 = load i8*, i8** %26
%28 = call i64 @strtol(i8* %27, i32* null, i32 16)
%29 = sitofp i64 %28 to float
%30 = fpext float %29 to double
%31 = fdiv double %30, 2.550000e+02
%32 = fptrunc double %31 to float
store float %32, float* %6
%33 = load i8**, i8*** %5
%34 = getelementptr inbounds i8*, i8** %33, i64 2
%35 = load i8*, i8** %34
%36 = call i64 @strtol(i8* %35, i32* null, i32 16)
%37 = sitofp i64 %36 to float
%38 = fpext float %37 to double
%39 = fdiv double %38, 2.550000e+02
%40 = fptrunc double %39 to float
store float %40, float* %7
%41 = load i8**, i8*** %5
%42 = getelementptr inbounds i8*, i8** %41, i64 3
%43 = load i8*, i8** %42
%44 = call i64 @strtol(i8* %43, i32* null, i32 16)
%45 = sitofp i64 %44 to float
%46 = fpext float %45 to double
%47 = fdiv double %46, 2.550000e+02
%48 = fptrunc double %47 to float
store float %48, float* %8
%49 = load i32, i32* %4
%50 = icmp eq i32 %49, 5
br i1 %50, label %51, label %60
51: ; preds = %24
%52 = load i8**, i8*** %5
%53 = getelementptr inbounds i8*, i8** %52, i64 4
%54 = load i8*, i8** %53
%55 = call i64 @strtol(i8* %54, i32* null, i32 16)
%56 = sitofp i64 %55 to float
%57 = fpext float %56 to double
%58 = fdiv double %57, 2.550000e+02
%59 = fptrunc double %58 to float
store float %59, float* %9
br label %60
60: ; preds = %51, %24
%61 = load float, float* %6
%62 = fpext float %61 to double
%63 = load float, float* %7
%64 = fpext float %63 to double
%65 = load float, float* %8
%66 = fpext float %65 to double
%67 = load float, float* %9
%68 = fpext float %67 to double
%69 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), double %62, double %64, double %66, double %68)
%70 = load float, float* %6
%71 = fpext float %70 to double
%72 = load float, float* %7
%73 = fpext float %72 to double
%74 = fmul double 7.152000e-01, %73
%75 = call double @llvm.fmuladd.f64(double 2.126000e-01, double %71, double %74)
%76 = load float, float* %8
%77 = fpext float %76 to double
%78 = call double @llvm.fmuladd.f64(double 7.220000e-02, double %77, double %75)
%79 = fptrunc double %78 to float
store float %79, float* %10
%80 = load float, float* %6
%81 = fpext float %80 to double
%82 = load float, float* %7
%83 = fpext float %82 to double
%84 = fmul double 3.838000e-01, %83
%85 = fneg double %84
%86 = call double @llvm.fmuladd.f64(double -1.162000e-01, double %81, double %85)
%87 = load float, float* %8
%88 = fpext float %87 to double
%89 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %88, double %86)
%90 = fptrunc double %89 to float
store float %90, float* %11
%91 = load float, float* %6
%92 = fpext float %91 to double
%93 = load float, float* %7
%94 = fpext float %93 to double
%95 = fmul double 4.451000e-01, %94
%96 = fneg double %95
%97 = call double @llvm.fmuladd.f64(double 5.000000e-01, double %92, double %96)
%98 = load float, float* %8
%99 = fpext float %98 to double
%100 = call double @llvm.fmuladd.f64(double -5.490000e-02, double %99, double %97)
%101 = fptrunc double %100 to float
store float %101, float* %12
%102 = load float, float* %10
%103 = fpext float %102 to double
%104 = load float, float* %11
%105 = fpext float %104 to double
%106 = load float, float* %12
%107 = fpext float %106 to double
%108 = load float, float* %9
%109 = fpext float %108 to double
%110 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), double %103, double %105, double %107, double %109)
%111 = load float, float* %11
%112 = fpext float %111 to double
%113 = fadd double %112, 5.000000e-01
%114 = fptrunc double %113 to float
store float %114, float* %11
%115 = load float, float* %12
%116 = fpext float %115 to double
%117 = fadd double %116, 5.000000e-01
%118 = fptrunc double %117 to float
store float %118, float* %12
%119 = load float, float* %10
%120 = fpext float %119 to double
%121 = fcmp olt double %120, 0.000000e+00
br i1 %121, label %122, label %123
122: ; preds = %60
store float 0.000000e+00, float* %10
br label %129
123: ; preds = %60
%124 = load float, float* %10
%125 = fpext float %124 to double
%126 = fcmp ogt double %125, 1.000000e+00
br i1 %126, label %127, label %128
127: ; preds = %123
store float 1.000000e+00, float* %10
br label %128
128: ; preds = %127, %123
br label %129
129: ; preds = %128, %122
%130 = load float, float* %11
%131 = fpext float %130 to double
%132 = fcmp olt double %131, 0.000000e+00
br i1 %132, label %133, label %134
133: ; preds = %129
store float 0.000000e+00, float* %11
br label %140
134: ; preds = %129
%135 = load float, float* %11
%136 = fpext float %135 to double
%137 = fcmp ogt double %136, 1.000000e+00
br i1 %137, label %138, label %139
138: ; preds = %134
store float 1.000000e+00, float* %11
br label %139
139: ; preds = %138, %134
br label %140
140: ; preds = %139, %133
%141 = load float, float* %12
%142 = fpext float %141 to double
%143 = fcmp olt double %142, 0.000000e+00
br i1 %143, label %144, label %145
144: ; preds = %140
store float 0.000000e+00, float* %12
br label %151
145: ; preds = %140
%146 = load float, float* %12
%147 = fpext float %146 to double
%148 = fcmp ogt double %147, 1.000000e+00
br i1 %148, label %149, label %150
149: ; preds = %145
store float 1.000000e+00, float* %12
br label %150
150: ; preds = %149, %145
br label %151
151: ; preds = %150, %144
%152 = load float, float* %9
%153 = fpext float %152 to double
%154 = fcmp olt double %153, 0.000000e+00
br i1 %154, label %155, label %156
155: ; preds = %151
store float 0.000000e+00, float* %9
br label %162
156: ; preds = %151
%157 = load float, float* %9
%158 = fpext float %157 to double
%159 = fcmp ogt double %158, 1.000000e+00
br i1 %159, label %160, label %161
160: ; preds = %156
store float 1.000000e+00, float* %9
br label %161
161: ; preds = %160, %156
br label %162
162: ; preds = %161, %155
%163 = load float, float* %9
%164 = fpext float %163 to double
%165 = fmul double %164, 1.270000e+02
%166 = fptoui double %165 to i8
%167 = zext i8 %166 to i32
%168 = load float, float* %10
%169 = fpext float %168 to double
%170 = fmul double %169, 2.550000e+02
%171 = fptoui double %170 to i8
%172 = zext i8 %171 to i32
%173 = load float, float* %11
%174 = fpext float %173 to double
%175 = fmul double %174, 2.550000e+02
%176 = fptoui double %175 to i8
%177 = zext i8 %176 to i32
%178 = load float, float* %12
%179 = fpext float %178 to double
%180 = fmul double %179, 2.550000e+02
%181 = fptoui double %180 to i8
%182 = zext i8 %181 to i32
%183 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %167, i32 %172, i32 %177, i32 %182)
store i32 0, i32* %3
br label %184
184: ; preds = %162, %18
%185 = load i32, i32* %3
ret i32 %185
}

LLVM IR (-O2):
@.str = [34 x i8] c"Usage: %s red green blue [alpha]\0A\00"
@.str.2 = [48 x i8] c"Red: %1.5f\09Green: %1.5f\09Blue:%1.5f\09Alpha:%1.5f\0A\00"
@.str.3 = [43 x i8] c"Y: %1.5f\09Pb: %1.5f\09Pr: %1.5f\09Alpha: %1.5f\0A\00"
@.str.4 = [38 x i8] c"Hex value (AYPbPr): %02x%02x%02x%02x\0A\00"
@str = [46 x i8] c"Range is from 00 to FF (hexadecimal expected)\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = add i32 %0, -6
%4 = icmp ult i32 %3, -2
br i1 %4, label %5, label %9
5: ; preds = %2
%6 = load i8*, i8** %1
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i8* %6)
%8 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([46 x i8], [46 x i8]* @str, i64 0, i64 0))
br label %98
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i64 @strtol(i8* nocapture %11, i32* null, i32 16)
%13 = sitofp i64 %12 to float
%14 = fdiv float %13, 2.550000e+02
%15 = getelementptr inbounds i8*, i8** %1, i64 2
%16 = load i8*, i8** %15
%17 = tail call i64 @strtol(i8* nocapture %16, i32* null, i32 16)
%18 = sitofp i64 %17 to float
%19 = fdiv float %18, 2.550000e+02
%20 = getelementptr inbounds i8*, i8** %1, i64 3
%21 = load i8*, i8** %20
%22 = tail call i64 @strtol(i8* nocapture %21, i32* null, i32 16)
%23 = sitofp i64 %22 to float
%24 = fdiv float %23, 2.550000e+02
%25 = icmp eq i32 %0, 5
br i1 %25, label %26, label %32
26: ; preds = %9
%27 = getelementptr inbounds i8*, i8** %1, i64 4
%28 = load i8*, i8** %27
%29 = tail call i64 @strtol(i8* nocapture %28, i32* null, i32 16)
%30 = sitofp i64 %29 to float
%31 = fdiv float %30, 2.550000e+02
br label %32
32: ; preds = %26, %9
%33 = phi float [ %31, %26 ], [ 1.000000e+00, %9 ]
%34 = fpext float %14 to double
%35 = fpext float %19 to double
%36 = fpext float %24 to double
%37 = fpext float %33 to double
%38 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([48 x i8], [48 x i8]* @.str.2, i64 0, i64 0), double %34, double %35, double %36, double %37)
%39 = fmul double %35, 7.152000e-01
%40 = tail call double @llvm.fmuladd.f64(double %34, double 2.126000e-01, double %39)
%41 = tail call double @llvm.fmuladd.f64(double %36, double 7.220000e-02, double %40)
%42 = fptrunc double %41 to float
%43 = fmul double %35, -3.838000e-01
%44 = tail call double @llvm.fmuladd.f64(double %34, double -1.162000e-01, double %43)
%45 = tail call double @llvm.fmuladd.f64(double %36, double 5.000000e-01, double %44)
%46 = fptrunc double %45 to float
%47 = fmul double %35, -4.451000e-01
%48 = tail call double @llvm.fmuladd.f64(double %34, double 5.000000e-01, double %47)
%49 = tail call double @llvm.fmuladd.f64(double %36, double -5.490000e-02, double %48)
%50 = fptrunc double %49 to float
%51 = fpext float %42 to double
%52 = fpext float %46 to double
%53 = fpext float %50 to double
%54 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([43 x i8], [43 x i8]* @.str.3, i64 0, i64 0), double %51, double %52, double %53, double %37)
%55 = fadd float %46, 5.000000e-01
%56 = fadd float %50, 5.000000e-01
%57 = fcmp olt float %42, 0.000000e+00
br i1 %57, label %61, label %58
58: ; preds = %32
%59 = fcmp ogt float %42, 1.000000e+00
br i1 %59, label %60, label %61
60: ; preds = %58
br label %61
61: ; preds = %32, %58, %60
%62 = phi float [ 1.000000e+00, %60 ], [ %42, %58 ], [ 0.000000e+00, %32 ]
%63 = fcmp olt float %55, 0.000000e+00
br i1 %63, label %67, label %64
64: ; preds = %61
%65 = fcmp ogt float %55, 1.000000e+00
br i1 %65, label %66, label %67
66: ; preds = %64
br label %67
67: ; preds = %61, %64, %66
%68 = phi float [ 1.000000e+00, %66 ], [ %55, %64 ], [ 0.000000e+00, %61 ]
%69 = fcmp olt float %56, 0.000000e+00
br i1 %69, label %73, label %70
70: ; preds = %67
%71 = fcmp ogt float %56, 1.000000e+00
br i1 %71, label %72, label %73
72: ; preds = %70
br label %73
73: ; preds = %67, %70, %72
%74 = phi float [ 1.000000e+00, %72 ], [ %56, %70 ], [ 0.000000e+00, %67 ]
%75 = fcmp olt float %33, 0.000000e+00
br i1 %75, label %79, label %76
76: ; preds = %73
%77 = fcmp ogt float %33, 1.000000e+00
br i1 %77, label %78, label %79
78: ; preds = %76
br label %79
79: ; preds = %73, %76, %78
%80 = phi float [ 1.000000e+00, %78 ], [ %33, %76 ], [ 0.000000e+00, %73 ]
%81 = fpext float %80 to double
%82 = fmul double %81, 1.270000e+02
%83 = fptoui double %82 to i8
%84 = zext i8 %83 to i32
%85 = fpext float %62 to double
%86 = fmul double %85, 2.550000e+02
%87 = fptoui double %86 to i8
%88 = zext i8 %87 to i32
%89 = fpext float %68 to double
%90 = fmul double %89, 2.550000e+02
%91 = fptoui double %90 to i8
%92 = zext i8 %91 to i32
%93 = fpext float %74 to double
%94 = fmul double %93, 2.550000e+02
%95 = fptoui double %94 to i8
%96 = zext i8 %95 to i32
%97 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([38 x i8], [38 x i8]* @.str.4, i64 0, i64 0), i32 %84, i32 %88, i32 %92, i32 %96)
br label %98
98: ; preds = %79, %5
%99 = phi i32 [ -1, %5 ], [ 0, %79 ]
ret i32 %99
}