void transfer_RGBA_FLOAT_to_ARGB8888(unsigned char *(*output), float *input) {
  *(*output)++ = (unsigned char)(((input[3]) < (0)
                                      ? (0)
                                      : ((input[3]) > (1) ? (1) : (input[3]))) *
                                 0xff);
  *(*output)++ = (unsigned char)(((input[0]) < (0)
                                      ? (0)
                                      : ((input[0]) > (1) ? (1) : (input[0]))) *
                                 0xff);
  *(*output)++ = (unsigned char)(((input[1]) < (0)
                                      ? (0)
                                      : ((input[1]) > (1) ? (1) : (input[1]))) *
                                 0xff);
  *(*output)++ = (unsigned char)(((input[2]) < (0)
                                      ? (0)
                                      : ((input[2]) > (1) ? (1) : (input[2]))) *
                                 0xff);
}


x86 assembly (clang, -O0):
<transfer_RGBA_FLOAT_to_ARGB8888>:
push   %rbp
mov    %rsp,%rbp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomiss 0xc(%rax),%xmm0
jbe    112a <transfer_RGBA_FLOAT_to_ARGB8888+0x2a>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x14(%rbp)
jmp    116e <transfer_RGBA_FLOAT_to_ARGB8888+0x6e>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  0xec5(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    1156 <transfer_RGBA_FLOAT_to_ARGB8888+0x56>
movss  0xeb4(%rip),%xmm0
movss  %xmm0,-0x18(%rbp)
jmp    1164 <transfer_RGBA_FLOAT_to_ARGB8888+0x64>
mov    -0x10(%rbp),%rax
movss  0xc(%rax),%xmm0
movss  %xmm0,-0x18(%rbp)
movss  -0x18(%rbp),%xmm0
movss  %xmm0,-0x14(%rbp)
movss  -0x14(%rbp),%xmm0
movss  0xe89(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomiss (%rax),%xmm0
jbe    11b5 <transfer_RGBA_FLOAT_to_ARGB8888+0xb5>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x1c(%rbp)
jmp    11f7 <transfer_RGBA_FLOAT_to_ARGB8888+0xf7>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  0xe3b(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    11e0 <transfer_RGBA_FLOAT_to_ARGB8888+0xe0>
movss  0xe2a(%rip),%xmm0
movss  %xmm0,-0x20(%rbp)
jmp    11ed <transfer_RGBA_FLOAT_to_ARGB8888+0xed>
mov    -0x10(%rbp),%rax
movss  (%rax),%xmm0
movss  %xmm0,-0x20(%rbp)
movss  -0x20(%rbp),%xmm0
movss  %xmm0,-0x1c(%rbp)
movss  -0x1c(%rbp),%xmm0
movss  0xe00(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomiss 0x4(%rax),%xmm0
jbe    123f <transfer_RGBA_FLOAT_to_ARGB8888+0x13f>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x24(%rbp)
jmp    1283 <transfer_RGBA_FLOAT_to_ARGB8888+0x183>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  0xdb0(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    126b <transfer_RGBA_FLOAT_to_ARGB8888+0x16b>
movss  0xd9f(%rip),%xmm0
movss  %xmm0,-0x28(%rbp)
jmp    1279 <transfer_RGBA_FLOAT_to_ARGB8888+0x179>
mov    -0x10(%rbp),%rax
movss  0x4(%rax),%xmm0
movss  %xmm0,-0x28(%rbp)
movss  -0x28(%rbp),%xmm0
movss  %xmm0,-0x24(%rbp)
movss  -0x24(%rbp),%xmm0
movss  0xd74(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
mov    -0x10(%rbp),%rax
xorps  %xmm0,%xmm0
ucomiss 0x8(%rax),%xmm0
jbe    12cb <transfer_RGBA_FLOAT_to_ARGB8888+0x1cb>
xorps  %xmm0,%xmm0
movss  %xmm0,-0x2c(%rbp)
jmp    130f <transfer_RGBA_FLOAT_to_ARGB8888+0x20f>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  0xd24(%rip),%xmm1
ucomiss %xmm1,%xmm0
jbe    12f7 <transfer_RGBA_FLOAT_to_ARGB8888+0x1f7>
movss  0xd13(%rip),%xmm0
movss  %xmm0,-0x30(%rbp)
jmp    1305 <transfer_RGBA_FLOAT_to_ARGB8888+0x205>
mov    -0x10(%rbp),%rax
movss  0x8(%rax),%xmm0
movss  %xmm0,-0x30(%rbp)
movss  -0x30(%rbp),%xmm0
movss  %xmm0,-0x2c(%rbp)
movss  -0x2c(%rbp),%xmm0
movss  0xce8(%rip),%xmm1
mulss  %xmm1,%xmm0
cvttss2si %xmm0,%eax
mov    %al,%cl
mov    -0x8(%rbp),%rdx
mov    (%rdx),%rax
mov    %rax,%rsi
add    $0x1,%rsi
mov    %rsi,(%rdx)
mov    %cl,(%rax)
pop    %rbp
ret

x86 assembly (clang, -O2):
<transfer_RGBA_FLOAT_to_ARGB8888>:
movss  0xc(%rsi),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jbe    1111 <transfer_RGBA_FLOAT_to_ARGB8888+0x11>
xor    %eax,%eax
jmp    1128 <transfer_RGBA_FLOAT_to_ARGB8888+0x28>
mov    $0xff,%al
ucomiss 0xee6(%rip),%xmm1
ja     1128 <transfer_RGBA_FLOAT_to_ARGB8888+0x28>
mulss  0xee0(%rip),%xmm1
cvttss2si %xmm1,%eax
mov    (%rdi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rdi)
mov    %al,(%rcx)
movss  (%rsi),%xmm1
ucomiss %xmm1,%xmm0
jbe    1141 <transfer_RGBA_FLOAT_to_ARGB8888+0x41>
xor    %eax,%eax
jmp    1158 <transfer_RGBA_FLOAT_to_ARGB8888+0x58>
mov    $0xff,%al
ucomiss 0xeb6(%rip),%xmm1
ja     1158 <transfer_RGBA_FLOAT_to_ARGB8888+0x58>
mulss  0xeb0(%rip),%xmm1
cvttss2si %xmm1,%eax
mov    (%rdi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rdi)
mov    %al,(%rcx)
movss  0x4(%rsi),%xmm1
xorps  %xmm0,%xmm0
ucomiss %xmm1,%xmm0
jbe    1175 <transfer_RGBA_FLOAT_to_ARGB8888+0x75>
xor    %eax,%eax
jmp    118c <transfer_RGBA_FLOAT_to_ARGB8888+0x8c>
mov    $0xff,%al
ucomiss 0xe82(%rip),%xmm1
ja     118c <transfer_RGBA_FLOAT_to_ARGB8888+0x8c>
mulss  0xe7c(%rip),%xmm1
cvttss2si %xmm1,%eax
mov    (%rdi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rdi)
mov    %al,(%rcx)
movss  0x8(%rsi),%xmm1
ucomiss %xmm1,%xmm0
jbe    11a6 <transfer_RGBA_FLOAT_to_ARGB8888+0xa6>
xor    %eax,%eax
jmp    11bd <transfer_RGBA_FLOAT_to_ARGB8888+0xbd>
mov    $0xff,%al
ucomiss 0xe51(%rip),%xmm1
ja     11bd <transfer_RGBA_FLOAT_to_ARGB8888+0xbd>
mulss  0xe4b(%rip),%xmm1
cvttss2si %xmm1,%eax
mov    (%rdi),%rcx
lea    0x1(%rcx),%rdx
mov    %rdx,(%rdi)
mov    %al,(%rcx)
ret

LLVM IR (-O0):
define void @transfer_RGBA_FLOAT_to_ARGB8888(i8** %0, float* %1) {
%3 = alloca i8**
%4 = alloca float*
store i8** %0, i8*** %3
store float* %1, float** %4
%5 = load float*, float** %4
%6 = getelementptr inbounds float, float* %5, i64 3
%7 = load float, float* %6
%8 = fcmp olt float %7, 0.000000e+00
br i1 %8, label %9, label %10
9: ; preds = %2
br label %22
10: ; preds = %2
%11 = load float*, float** %4
%12 = getelementptr inbounds float, float* %11, i64 3
%13 = load float, float* %12
%14 = fcmp ogt float %13, 1.000000e+00
br i1 %14, label %15, label %16
15: ; preds = %10
br label %20
16: ; preds = %10
%17 = load float*, float** %4
%18 = getelementptr inbounds float, float* %17, i64 3
%19 = load float, float* %18
br label %20
20: ; preds = %16, %15
%21 = phi float [ 1.000000e+00, %15 ], [ %19, %16 ]
br label %22
22: ; preds = %20, %9
%23 = phi float [ 0.000000e+00, %9 ], [ %21, %20 ]
%24 = fmul float %23, 2.550000e+02
%25 = fptoui float %24 to i8
%26 = load i8**, i8*** %3
%27 = load i8*, i8** %26
%28 = getelementptr inbounds i8, i8* %27, i32 1
store i8* %28, i8** %26
store i8 %25, i8* %27
%29 = load float*, float** %4
%30 = getelementptr inbounds float, float* %29, i64 0
%31 = load float, float* %30
%32 = fcmp olt float %31, 0.000000e+00
br i1 %32, label %33, label %34
33: ; preds = %22
br label %46
34: ; preds = %22
%35 = load float*, float** %4
%36 = getelementptr inbounds float, float* %35, i64 0
%37 = load float, float* %36
%38 = fcmp ogt float %37, 1.000000e+00
br i1 %38, label %39, label %40
39: ; preds = %34
br label %44
40: ; preds = %34
%41 = load float*, float** %4
%42 = getelementptr inbounds float, float* %41, i64 0
%43 = load float, float* %42
br label %44
44: ; preds = %40, %39
%45 = phi float [ 1.000000e+00, %39 ], [ %43, %40 ]
br label %46
46: ; preds = %44, %33
%47 = phi float [ 0.000000e+00, %33 ], [ %45, %44 ]
%48 = fmul float %47, 2.550000e+02
%49 = fptoui float %48 to i8
%50 = load i8**, i8*** %3
%51 = load i8*, i8** %50
%52 = getelementptr inbounds i8, i8* %51, i32 1
store i8* %52, i8** %50
store i8 %49, i8* %51
%53 = load float*, float** %4
%54 = getelementptr inbounds float, float* %53, i64 1
%55 = load float, float* %54
%56 = fcmp olt float %55, 0.000000e+00
br i1 %56, label %57, label %58
57: ; preds = %46
br label %70
58: ; preds = %46
%59 = load float*, float** %4
%60 = getelementptr inbounds float, float* %59, i64 1
%61 = load float, float* %60
%62 = fcmp ogt float %61, 1.000000e+00
br i1 %62, label %63, label %64
63: ; preds = %58
br label %68
64: ; preds = %58
%65 = load float*, float** %4
%66 = getelementptr inbounds float, float* %65, i64 1
%67 = load float, float* %66
br label %68
68: ; preds = %64, %63
%69 = phi float [ 1.000000e+00, %63 ], [ %67, %64 ]
br label %70
70: ; preds = %68, %57
%71 = phi float [ 0.000000e+00, %57 ], [ %69, %68 ]
%72 = fmul float %71, 2.550000e+02
%73 = fptoui float %72 to i8
%74 = load i8**, i8*** %3
%75 = load i8*, i8** %74
%76 = getelementptr inbounds i8, i8* %75, i32 1
store i8* %76, i8** %74
store i8 %73, i8* %75
%77 = load float*, float** %4
%78 = getelementptr inbounds float, float* %77, i64 2
%79 = load float, float* %78
%80 = fcmp olt float %79, 0.000000e+00
br i1 %80, label %81, label %82
81: ; preds = %70
br label %94
82: ; preds = %70
%83 = load float*, float** %4
%84 = getelementptr inbounds float, float* %83, i64 2
%85 = load float, float* %84
%86 = fcmp ogt float %85, 1.000000e+00
br i1 %86, label %87, label %88
87: ; preds = %82
br label %92
88: ; preds = %82
%89 = load float*, float** %4
%90 = getelementptr inbounds float, float* %89, i64 2
%91 = load float, float* %90
br label %92
92: ; preds = %88, %87
%93 = phi float [ 1.000000e+00, %87 ], [ %91, %88 ]
br label %94
94: ; preds = %92, %81
%95 = phi float [ 0.000000e+00, %81 ], [ %93, %92 ]
%96 = fmul float %95, 2.550000e+02
%97 = fptoui float %96 to i8
%98 = load i8**, i8*** %3
%99 = load i8*, i8** %98
%100 = getelementptr inbounds i8, i8* %99, i32 1
store i8* %100, i8** %98
store i8 %97, i8* %99
ret void
}

LLVM IR (-O2):
define void @transfer_RGBA_FLOAT_to_ARGB8888(i8** nocapture %0, float* nocapture %1) {
%3 = getelementptr inbounds float, float* %1, i64 3
%4 = load float, float* %3
%5 = fcmp olt float %4, 0.000000e+00
br i1 %5, label %11, label %6
6: ; preds = %2
%7 = fcmp ogt float %4, 1.000000e+00
br i1 %7, label %11, label %8
8: ; preds = %6
%9 = fmul float %4, 2.550000e+02
%10 = fptoui float %9 to i8
br label %11
11: ; preds = %8, %6, %2
%12 = phi i8 [ 0, %2 ], [ %10, %8 ], [ -1, %6 ]
%13 = load i8*, i8** %0
%14 = getelementptr inbounds i8, i8* %13, i64 1
store i8* %14, i8** %0
store i8 %12, i8* %13
%15 = load float, float* %1
%16 = fcmp olt float %15, 0.000000e+00
br i1 %16, label %22, label %17
17: ; preds = %11
%18 = fcmp ogt float %15, 1.000000e+00
br i1 %18, label %22, label %19
19: ; preds = %17
%20 = fmul float %15, 2.550000e+02
%21 = fptoui float %20 to i8
br label %22
22: ; preds = %19, %17, %11
%23 = phi i8 [ 0, %11 ], [ %21, %19 ], [ -1, %17 ]
%24 = load i8*, i8** %0
%25 = getelementptr inbounds i8, i8* %24, i64 1
store i8* %25, i8** %0
store i8 %23, i8* %24
%26 = getelementptr inbounds float, float* %1, i64 1
%27 = load float, float* %26
%28 = fcmp olt float %27, 0.000000e+00
br i1 %28, label %34, label %29
29: ; preds = %22
%30 = fcmp ogt float %27, 1.000000e+00
br i1 %30, label %34, label %31
31: ; preds = %29
%32 = fmul float %27, 2.550000e+02
%33 = fptoui float %32 to i8
br label %34
34: ; preds = %31, %29, %22
%35 = phi i8 [ 0, %22 ], [ %33, %31 ], [ -1, %29 ]
%36 = load i8*, i8** %0
%37 = getelementptr inbounds i8, i8* %36, i64 1
store i8* %37, i8** %0
store i8 %35, i8* %36
%38 = getelementptr inbounds float, float* %1, i64 2
%39 = load float, float* %38
%40 = fcmp olt float %39, 0.000000e+00
br i1 %40, label %46, label %41
41: ; preds = %34
%42 = fcmp ogt float %39, 1.000000e+00
br i1 %42, label %46, label %43
43: ; preds = %41
%44 = fmul float %39, 2.550000e+02
%45 = fptoui float %44 to i8
br label %46
46: ; preds = %43, %41, %34
%47 = phi i8 [ 0, %34 ], [ %45, %43 ], [ -1, %41 ]
%48 = load i8*, i8** %0
%49 = getelementptr inbounds i8, i8* %48, i64 1
store i8* %49, i8** %0
store i8 %47, i8* %48
ret void
}