#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 */
typedef int /*<<< orphan*/ uint8_t;

/* Variables and functions */
int /*<<< orphan*/ vt_write_str(char *);
int /*<<< orphan*/ vt_write_uint8(int /*<<< orphan*/);
void _color_set_24(uint8_t type, uint8_t color_red, uint8_t color_green,
                   uint8_t color_blue) {
  vt_write_str("\x1B"
               "[");
  vt_write_uint8(type);
  vt_write_str(";");
  vt_write_uint8(color_red);
  vt_write_str(";");
  vt_write_uint8(color_green);
  vt_write_str(";");
  vt_write_uint8(color_blue);
  vt_write_str("m");
}


x86 assembly (clang, -O0):
<_color_set_24>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
lea    0xec5(%rip),%rdi
call   1040 <vt_write_str@plt>
mov    -0x4(%rbp),%edi
call   1030 <vt_write_uint8@plt>
lea    0xeb4(%rip),%rdi
call   1040 <vt_write_str@plt>
mov    -0x8(%rbp),%edi
call   1030 <vt_write_uint8@plt>
lea    0xea0(%rip),%rdi
call   1040 <vt_write_str@plt>
mov    -0xc(%rbp),%edi
call   1030 <vt_write_uint8@plt>
lea    0xe8c(%rip),%rdi
call   1040 <vt_write_str@plt>
mov    -0x10(%rbp),%edi
call   1030 <vt_write_uint8@plt>
lea    0xe7a(%rip),%rdi
call   1040 <vt_write_str@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<_color_set_24>:
push   %rbp
push   %r15
push   %r14
push   %rbx
push   %rax
mov    %ecx,%r14d
mov    %edx,%r15d
mov    %esi,%ebx
mov    %edi,%ebp
lea    0xec8(%rip),%rdi
call   1040 <vt_write_str@plt>
mov    %ebp,%edi
call   1030 <vt_write_uint8@plt>
lea    0xeb8(%rip),%rbp
mov    %rbp,%rdi
call   1040 <vt_write_str@plt>
mov    %ebx,%edi
call   1030 <vt_write_uint8@plt>
mov    %rbp,%rdi
call   1040 <vt_write_str@plt>
mov    %r15d,%edi
call   1030 <vt_write_uint8@plt>
mov    %rbp,%rdi
call   1040 <vt_write_str@plt>
mov    %r14d,%edi
call   1030 <vt_write_uint8@plt>
lea    0xe84(%rip),%rdi
add    $0x8,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <vt_write_str@plt>

LLVM IR (-O0):
@.str = [3 x i8] c"\1B[\00"
@.str.1 = [2 x i8] c";\00"
@.str.2 = [2 x i8] c"m\00"
define void @_color_set_24(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
store i32 %0, i32* %5
store i32 %1, i32* %6
store i32 %2, i32* %7
store i32 %3, i32* %8
%9 = call i32 @vt_write_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%10 = load i32, i32* %5
%11 = call i32 @vt_write_uint8(i32 %10)
%12 = call i32 @vt_write_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%13 = load i32, i32* %6
%14 = call i32 @vt_write_uint8(i32 %13)
%15 = call i32 @vt_write_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%16 = load i32, i32* %7
%17 = call i32 @vt_write_uint8(i32 %16)
%18 = call i32 @vt_write_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%19 = load i32, i32* %8
%20 = call i32 @vt_write_uint8(i32 %19)
%21 = call i32 @vt_write_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [3 x i8] c"\1B[\00"
@.str.1 = [2 x i8] c";\00"
@.str.2 = [2 x i8] c"m\00"
define void @_color_set_24(i32 %0, i32 %1, i32 %2, i32 %3) {
%5 = tail call i32 @vt_write_str(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str, i64 0, i64 0))
%6 = tail call i32 @vt_write_uint8(i32 %0)
%7 = tail call i32 @vt_write_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = tail call i32 @vt_write_uint8(i32 %1)
%9 = tail call i32 @vt_write_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%10 = tail call i32 @vt_write_uint8(i32 %2)
%11 = tail call i32 @vt_write_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%12 = tail call i32 @vt_write_uint8(i32 %3)
%13 = tail call i32 @vt_write_str(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret void
}