#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*/ EXIT_SUCCESS;
int /*<<< orphan*/ exit(int /*<<< orphan*/);
int /*<<< orphan*/ printf(char *, ...);
int main(void) {
  printf("\n");
  printf("%sHello, %sworld!%s\n", "\033[0;31m", "\033[9;34m", "\033[0m");
  printf("%sHello%s, %sworld!\n", "\033[4;32m", "\033[0m", "\033[1;36m");
  printf("%s", "\033[0m");
  printf("Vanilla hello\n");
  printf("\n");
  exit(EXIT_SUCCESS);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
lea    0xf07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebc(%rip),%rdi
lea    0xeca(%rip),%rsi
lea    0xecb(%rip),%rdx
lea    0xecc(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec3(%rip),%rdi
lea    0xed1(%rip),%rsi
lea    0xeb0(%rip),%rdx
lea    0xecb(%rip),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xec5(%rip),%rdi
lea    0xe94(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xeb3(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe90(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    0x2e25(%rip),%rax
mov    (%rax),%edi
call   1040 <exit@plt>

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0xeae(%rip),%rdi
lea    0xebc(%rip),%rsi
lea    0xebd(%rip),%rdx
lea    0xebe(%rip),%rbx
mov    %rbx,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb2(%rip),%rdi
lea    0xec0(%rip),%rsi
lea    0xec1(%rip),%rcx
mov    %rbx,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeb8(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xeaa(%rip),%rdi
call   1040 <puts@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    0x2e22(%rip),%rax
mov    (%rax),%edi
call   1060 <exit@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"\0A\00"
@.str.1 = [21 x i8] c"%sHello, %sworld!%s\0A\00"
@.str.2 = [8 x i8] c"\1B[0;31m\00"
@.str.3 = [8 x i8] c"\1B[9;34m\00"
@.str.4 = [5 x i8] c"\1B[0m\00"
@.str.5 = [21 x i8] c"%sHello%s, %sworld!\0A\00"
@.str.6 = [8 x i8] c"\1B[4;32m\00"
@.str.7 = [8 x i8] c"\1B[1;36m\00"
@.str.8 = [3 x i8] c"%s\00"
@.str.9 = [15 x i8] c"Vanilla hello\0A\00"
@EXIT_SUCCESS = global i32 0
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.9, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%8 = load i32, i32* @EXIT_SUCCESS
%9 = call i32 @exit(i32 %8)
unreachable
}

LLVM IR (-O2):
@.str.1 = [21 x i8] c"%sHello, %sworld!%s\0A\00"
@.str.2 = [8 x i8] c"\1B[0;31m\00"
@.str.3 = [8 x i8] c"\1B[9;34m\00"
@.str.4 = [5 x i8] c"\1B[0m\00"
@.str.5 = [21 x i8] c"%sHello%s, %sworld!\0A\00"
@.str.6 = [8 x i8] c"\1B[4;32m\00"
@.str.7 = [8 x i8] c"\1B[1;36m\00"
@.str.8 = [3 x i8] c"%s\00"
@EXIT_SUCCESS = global i32 0
@str = [14 x i8] c"Vanilla hello\00"
define i32 @main() {
%1 = tail call i32 @putchar(i32 10)
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.7, i64 0, i64 0))
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.4, i64 0, i64 0))
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([14 x i8], [14 x i8]* @str, i64 0, i64 0))
%6 = tail call i32 @putchar(i32 10)
%7 = load i32, i32* @EXIT_SUCCESS
%8 = tail call i32 @exit(i32 %7)
unreachable
}