#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*/ printf(char *, int);
int main(int argc, const char *argv[]) {
  printf("\033[31m[ ERROR ] "
         "test1 line %d"
         "\033[0m\n",
         17);
  ;
  printf("\033[31m[ ERROR ] "
         "test2 line %d"
         "\033[0m\n",
         18);
  ;
  printf("\033[31m[ ERROR ] "
         "test3 line %d"
         "\033[0m\n",
         19);
  ;
  printf("\033[31m[ ERROR ] "
         "test4 line %d"
         "\033[0m\n",
         20);
  ;
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
lea    0xed3(%rip),%rdi
mov    $0x11,%esi
call   1030 <printf@plt>
lea    0xee4(%rip),%rdi
mov    $0x12,%esi
call   1030 <printf@plt>
lea    0xef5(%rip),%rdi
mov    $0x13,%esi
call   1030 <printf@plt>
lea    0xf06(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
lea    0xee8(%rip),%rdi
mov    $0x11,%esi
call   1030 <printf@plt>
lea    0xef9(%rip),%rdi
mov    $0x12,%esi
call   1030 <printf@plt>
lea    0xf0a(%rip),%rdi
mov    $0x13,%esi
call   1030 <printf@plt>
lea    0xf1b(%rip),%rdi
mov    $0x14,%esi
call   1030 <printf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@.str = [34 x i8] c"\1B[31m[ ERROR ] test1 line %d\1B[0m\0A\00"
@.str.1 = [34 x i8] c"\1B[31m[ ERROR ] test2 line %d\1B[0m\0A\00"
@.str.2 = [34 x i8] c"\1B[31m[ ERROR ] test3 line %d\1B[0m\0A\00"
@.str.3 = [34 x i8] c"\1B[31m[ ERROR ] test4 line %d\1B[0m\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%6 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 17)
%7 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 18)
%8 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 19)
%9 = call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32 20)
ret i32 0
}

LLVM IR (-O2):
@.str = [34 x i8] c"\1B[31m[ ERROR ] test1 line %d\1B[0m\0A\00"
@.str.1 = [34 x i8] c"\1B[31m[ ERROR ] test2 line %d\1B[0m\0A\00"
@.str.2 = [34 x i8] c"\1B[31m[ ERROR ] test3 line %d\1B[0m\0A\00"
@.str.3 = [34 x i8] c"\1B[31m[ ERROR ] test4 line %d\1B[0m\0A\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str, i64 0, i64 0), i32 17)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.1, i64 0, i64 0), i32 18)
%5 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 19)
%6 = tail call i32 @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32 20)
ret i32 0
}