#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*/ ol_color_from_string(char *);
int /*<<< orphan*/ print_color(int /*<<< orphan*/);
void test_from_str() {
  print_color(ol_color_from_string(NULL));
  print_color(ol_color_from_string(""));
  print_color(ol_color_from_string("AABBCC"));
  print_color(ol_color_from_string("#AAEEGG"));
  print_color(ol_color_from_string("#000000"));
  print_color(ol_color_from_string("#FFFFFF"));
  print_color(ol_color_from_string("#ffffff"));
  print_color(ol_color_from_string("#3377aA"));
  print_color(ol_color_from_string("#abcdef"));
  print_color(ol_color_from_string("#ABCDEF"));
  print_color(ol_color_from_string("#123456"));
  print_color(ol_color_from_string("#789aBc"));
  print_color(ol_color_from_string("#0a0B0c"));
}


x86 assembly (clang, -O0):
<test_from_str>:
push   %rbp
mov    %rsp,%rbp
xor    %eax,%eax
mov    %eax,%edi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xedb(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xeb2(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xea6(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe9b(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe90(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe85(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe7a(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe6f(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe64(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe59(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe4e(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe43(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_from_str>:
push   %rax
xor    %edi,%edi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xee0(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xeb7(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xeab(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xea0(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe95(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe8a(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe7f(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe74(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe69(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe5e(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe53(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
call   1040 <print_color@plt>
lea    0xe48(%rip),%rdi
call   1030 <ol_color_from_string@plt>
mov    %eax,%edi
pop    %rax
jmp    1040 <print_color@plt>

LLVM IR (-O0):
@.str = [1 x i8] zeroinitializer
@.str.1 = [7 x i8] c"AABBCC\00"
@.str.2 = [8 x i8] c"#AAEEGG\00"
@.str.3 = [8 x i8] c"\00"
@.str.4 = [8 x i8] c"#FFFFFF\00"
@.str.5 = [8 x i8] c"#ffffff\00"
@.str.6 = [8 x i8] c"aA\00"
@.str.7 = [8 x i8] c"#abcdef\00"
@.str.8 = [8 x i8] c"#ABCDEF\00"
@.str.9 = [8 x i8] c"\00"
@.str.10 = [8 x i8] c"aBc\00"
@.str.11 = [8 x i8] c"a0B0c\00"
define void @test_from_str() {
%1 = call i32 @ol_color_from_string(i8* null)
%2 = call i32 @print_color(i32 %1)
%3 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = call i32 @print_color(i32 %3)
%5 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @print_color(i32 %5)
%7 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%8 = call i32 @print_color(i32 %7)
%9 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%10 = call i32 @print_color(i32 %9)
%11 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%12 = call i32 @print_color(i32 %11)
%13 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%14 = call i32 @print_color(i32 %13)
%15 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%16 = call i32 @print_color(i32 %15)
%17 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%18 = call i32 @print_color(i32 %17)
%19 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%20 = call i32 @print_color(i32 %19)
%21 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%22 = call i32 @print_color(i32 %21)
%23 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%24 = call i32 @print_color(i32 %23)
%25 = call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%26 = call i32 @print_color(i32 %25)
ret void
}

LLVM IR (-O2):
@.str = [1 x i8] zeroinitializer
@.str.1 = [7 x i8] c"AABBCC\00"
@.str.2 = [8 x i8] c"#AAEEGG\00"
@.str.3 = [8 x i8] c"\00"
@.str.4 = [8 x i8] c"#FFFFFF\00"
@.str.5 = [8 x i8] c"#ffffff\00"
@.str.6 = [8 x i8] c"aA\00"
@.str.7 = [8 x i8] c"#abcdef\00"
@.str.8 = [8 x i8] c"#ABCDEF\00"
@.str.9 = [8 x i8] c"\00"
@.str.10 = [8 x i8] c"aBc\00"
@.str.11 = [8 x i8] c"a0B0c\00"
define void @test_from_str() {
%1 = tail call i32 @ol_color_from_string(i8* null)
%2 = tail call i32 @print_color(i32 %1)
%3 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = tail call i32 @print_color(i32 %3)
%5 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0))
%6 = tail call i32 @print_color(i32 %5)
%7 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0))
%8 = tail call i32 @print_color(i32 %7)
%9 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0))
%10 = tail call i32 @print_color(i32 %9)
%11 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0))
%12 = tail call i32 @print_color(i32 %11)
%13 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0))
%14 = tail call i32 @print_color(i32 %13)
%15 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0))
%16 = tail call i32 @print_color(i32 %15)
%17 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%18 = tail call i32 @print_color(i32 %17)
%19 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.8, i64 0, i64 0))
%20 = tail call i32 @print_color(i32 %19)
%21 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%22 = tail call i32 @print_color(i32 %21)
%23 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.10, i64 0, i64 0))
%24 = tail call i32 @print_color(i32 %23)
%25 = tail call i32 @ol_color_from_string(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.11, i64 0, i64 0))
%26 = tail call i32 @print_color(i32 %25)
ret void
}