#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ sprintf(char *, char *, int);
int /*<<< orphan*/ stderr;
int main(int argc, char **argv) {
  if (argc != 2)
    return -1;
  {
    char __buf__[7];
    sprintf(__buf__, "\033[%dm", 46);
    fprintf(stderr, __buf__);
  };
  {
    char __buf__[7];
    sprintf(__buf__, "\033[%dm", 30);
    fprintf(stderr, __buf__);
  };
  fprintf(stderr, "Welcome %s, nice to see you ;)\n", argv[1]);
  {
    char __buf__[7];
    sprintf(__buf__, "\033[%dm", 0);
    fprintf(stderr, __buf__);
  };
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x2,-0x8(%rbp)
je     114c <main+0x2c>
movl   $0xffffffff,-0x4(%rbp)
jmp    11e3 <main+0xc3>
lea    -0x17(%rbp),%rdi
lea    0xea9(%rip),%rsi
mov    $0x2e,%edx
call   1040 <sprintf@plt>
mov    0x2e78(%rip),%rax
mov    (%rax),%edi
lea    -0x17(%rbp),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
lea    -0x1e(%rbp),%rdi
lea    0xe80(%rip),%rsi
mov    $0x1e,%edx
call   1040 <sprintf@plt>
mov    0x2e4f(%rip),%rax
mov    (%rax),%edi
lea    -0x1e(%rbp),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xe50(%rip),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
lea    -0x25(%rbp),%rdi
lea    0xe38(%rip),%rsi
xor    %edx,%edx
call   1040 <sprintf@plt>
mov    0x2e0a(%rip),%rax
mov    (%rax),%edi
lea    -0x25(%rbp),%rsi
mov    $0x0,%al
call   1030 <fprintf@plt>
mov    -0x4(%rbp),%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x10,%rsp
mov    $0xffffffff,%ebx
cmp    $0x2,%edi
jne    11ca <main+0xaa>
mov    %rsi,%r15
lea    0xebb(%rip),%r14
lea    0x9(%rsp),%r12
mov    %r12,%rdi
mov    %r14,%rsi
mov    $0x2e,%edx
call   1040 <sprintf@plt>
mov    0x2e7f(%rip),%r13
mov    0x0(%r13),%edi
xor    %ebx,%ebx
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0x9(%rsp),%r12
mov    %r12,%rdi
mov    %r14,%rsi
mov    $0x1e,%edx
call   1040 <sprintf@plt>
mov    0x0(%r13),%edi
mov    %r12,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    0x0(%r13),%edi
mov    0x8(%r15),%rdx
lea    0xe63(%rip),%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
lea    0x9(%rsp),%r15
mov    %r15,%rdi
mov    %r14,%rsi
xor    %edx,%edx
call   1040 <sprintf@plt>
mov    0x0(%r13),%edi
mov    %r15,%rsi
xor    %eax,%eax
call   1030 <fprintf@plt>
mov    %ebx,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [6 x i8] c"\1B[%dm\00"
@stderr = global i32 0
@.str.1 = [32 x i8] c"Welcome %s, nice to see you ;)\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca [7 x i8]
%7 = alloca [7 x i8]
%8 = alloca [7 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%9 = load i32, i32* %4
%10 = icmp ne i32 %9, 2
br i1 %10, label %11, label %12
11: ; preds = %2
store i32 -1, i32* %3
br label %33
12: ; preds = %2
%13 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 0
%14 = call i32 @sprintf(i8* %13, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 46)
%15 = load i32, i32* @stderr
%16 = getelementptr inbounds [7 x i8], [7 x i8]* %6, i64 0, i64 0
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %15, i8* %16)
%18 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
%19 = call i32 @sprintf(i8* %18, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 30)
%20 = load i32, i32* @stderr
%21 = getelementptr inbounds [7 x i8], [7 x i8]* %7, i64 0, i64 0
%22 = call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* %21)
%23 = load i32, i32* @stderr
%24 = load i8**, i8*** %5
%25 = getelementptr inbounds i8*, i8** %24, i64 1
%26 = load i8*, i8** %25
%27 = call i32 (i32, i8*, ...) @fprintf(i32 %23, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %26)
%28 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 0
%29 = call i32 @sprintf(i8* %28, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
%30 = load i32, i32* @stderr
%31 = getelementptr inbounds [7 x i8], [7 x i8]* %8, i64 0, i64 0
%32 = call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* %31)
br label %33
33: ; preds = %12, %11
%34 = load i32, i32* %3
ret i32 %34
}

LLVM IR (-O2):
@.str = [6 x i8] c"\1B[%dm\00"
@stderr = global i32 0
@.str.1 = [32 x i8] c"Welcome %s, nice to see you ;)\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca [7 x i8]
%4 = alloca [7 x i8]
%5 = alloca [7 x i8]
%6 = icmp eq i32 %0, 2
br i1 %6, label %7, label %24
7: ; preds = %2
%8 = getelementptr inbounds [7 x i8], [7 x i8]* %3, i64 0, i64 0
%9 = call i32 @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 46)
%10 = load i32, i32* @stderr
%11 = call i32 (i32, i8*, ...) @fprintf(i32 %10, i8* %8)
%12 = getelementptr inbounds [7 x i8], [7 x i8]* %4, i64 0, i64 0
%13 = call i32 @sprintf(i8* %12, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 30)
%14 = load i32, i32* @stderr
%15 = call i32 (i32, i8*, ...) @fprintf(i32 %14, i8* %12)
%16 = load i32, i32* @stderr
%17 = getelementptr inbounds i8*, i8** %1, i64 1
%18 = load i8*, i8** %17
%19 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %18)
%20 = getelementptr inbounds [7 x i8], [7 x i8]* %5, i64 0, i64 0
%21 = call i32 @sprintf(i8* %20, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 0)
%22 = load i32, i32* @stderr
%23 = call i32 (i32, i8*, ...) @fprintf(i32 %22, i8* %20)
br label %24
24: ; preds = %2, %7
%25 = phi i32 [ 0, %7 ], [ -1, %2 ]
ret i32 %25
}