#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 color_str_convert(char const *);
int /*<<< orphan*/ error_exit(int /*<<< orphan*/, char *, char const *,
                              char const *, int);
int config_color_str_convert(const char *in, int linenr, const char *subj) {
  int nr = color_str_convert(in);
  if (nr >= -1)
    return nr;
  error_exit(0, "Color %s for %s at line %d not recognized", in, subj, linenr);
  return -2;
}


x86 assembly (clang, -O0):
<config_color_str_convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
mov    %rdi,-0x10(%rbp)
mov    %esi,-0x14(%rbp)
mov    %rdx,-0x20(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <color_str_convert@plt>
mov    %eax,-0x24(%rbp)
cmpl   $0xffffffff,-0x24(%rbp)
jl     1154 <config_color_str_convert+0x34>
mov    -0x24(%rbp),%eax
mov    %eax,-0x4(%rbp)
jmp    1175 <config_color_str_convert+0x55>
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x14(%rbp),%r8d
xor    %edi,%edi
lea    0xe97(%rip),%rsi
call   1030 <error_exit@plt>
movl   $0xfffffffe,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<config_color_str_convert>:
push   %rbp
push   %r14
push   %rbx
mov    %rdx,%r14
mov    %esi,%ebp
mov    %rdi,%rbx
call   1040 <color_str_convert@plt>
cmp    $0xfffffffe,%eax
jg     1152 <config_color_str_convert+0x32>
lea    0xec3(%rip),%rsi
xor    %edi,%edi
mov    %rbx,%rdx
mov    %r14,%rcx
mov    %ebp,%r8d
call   1030 <error_exit@plt>
mov    $0xfffffffe,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [42 x i8] c"Color %s for %s at line %d not recognized\00"
define i32 @config_color_str_convert(i8* %0, i32 %1, i8* %2) {
%4 = alloca i32
%5 = alloca i8*
%6 = alloca i32
%7 = alloca i8*
%8 = alloca i32
store i8* %0, i8** %5
store i32 %1, i32* %6
store i8* %2, i8** %7
%9 = load i8*, i8** %5
%10 = call i32 @color_str_convert(i8* %9)
store i32 %10, i32* %8
%11 = load i32, i32* %8
%12 = icmp sge i32 %11, -1
br i1 %12, label %13, label %15
13: ; preds = %3
%14 = load i32, i32* %8
store i32 %14, i32* %4
br label %20
15: ; preds = %3
%16 = load i8*, i8** %5
%17 = load i8*, i8** %7
%18 = load i32, i32* %6
%19 = call i32 @error_exit(i32 0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %16, i8* %17, i32 %18)
store i32 -2, i32* %4
br label %20
20: ; preds = %15, %13
%21 = load i32, i32* %4
ret i32 %21
}

LLVM IR (-O2):
@.str = [42 x i8] c"Color %s for %s at line %d not recognized\00"
define i32 @config_color_str_convert(i8* %0, i32 %1, i8* %2) {
%4 = tail call i32 @color_str_convert(i8* %0)
%5 = icmp sgt i32 %4, -2
br i1 %5, label %8, label %6
6: ; preds = %3
%7 = tail call i32 @error_exit(i32 0, i8* getelementptr inbounds ([42 x i8], [42 x i8]* @.str, i64 0, i64 0), i8* %0, i8* %2, i32 %1)
br label %8
8: ; preds = %3, %6
%9 = phi i32 [ -2, %6 ], [ %4, %3 ]
ret i32 %9
}