#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 strlen(char const *);
void tst_print_fail(const char *tstname) {
  printf("%s:", tstname);
  if (strlen(tstname) < 15) {
    printf("\t\t\t");
  } else if (strlen(tstname) < 23) {
    printf("\t\t");
  } else {
    printf("\t");
  }
  printf("%sFAIL%s\n", "\033[1;31m", "\033[0m");
}


x86 assembly (clang, -O0):
<tst_print_fail>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rsi
lea    0xec9(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0xf,%eax
jge    1163 <tst_print_fail+0x43>
lea    0xead(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    119b <tst_print_fail+0x7b>
mov    -0x8(%rbp),%rdi
call   1030 <strlen@plt>
cmp    $0x17,%eax
jge    1188 <tst_print_fail+0x68>
lea    0xe89(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1196 <tst_print_fail+0x76>
lea    0xe77(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    119b <tst_print_fail+0x7b>
lea    0xe66(%rip),%rdi
lea    0xe69(%rip),%rsi
lea    0xe6a(%rip),%rdx
mov    $0x0,%al
call   1040 <printf@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<tst_print_fail>:
push   %rbx
mov    %rdi,%rbx
lea    0xec5(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0xe,%eax
jg     115b <tst_print_fail+0x2b>
lea    0xeab(%rip),%rdi
jmp    116f <tst_print_fail+0x3f>
mov    %rbx,%rdi
call   1040 <strlen@plt>
cmp    $0x16,%eax
jg     1178 <tst_print_fail+0x48>
lea    0xe96(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1182 <tst_print_fail+0x52>
mov    $0x9,%edi
call   1030 <putchar@plt>
lea    0xe7f(%rip),%rdi
lea    0xe82(%rip),%rsi
lea    0xe83(%rip),%rdx
xor    %eax,%eax
pop    %rbx
jmp    1050 <printf@plt>

LLVM IR (-O0):
@.str = [4 x i8] c"%s:\00"
@.str.1 = [4 x i8] c"\09\09\09\00"
@.str.2 = [3 x i8] c"\09\09\00"
@.str.3 = [2 x i8] c"\09\00"
@.str.4 = [10 x i8] c"%sFAIL%s\0A\00"
@.str.5 = [8 x i8] c"\1B[1;31m\00"
@.str.6 = [5 x i8] c"\1B[0m\00"
define void @tst_print_fail(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %3)
%5 = load i8*, i8** %2
%6 = call i32 @strlen(i8* %5)
%7 = icmp slt i32 %6, 15
br i1 %7, label %8, label %10
8: ; preds = %1
%9 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %19
10: ; preds = %1
%11 = load i8*, i8** %2
%12 = call i32 @strlen(i8* %11)
%13 = icmp slt i32 %12, 23
br i1 %13, label %14, label %16
14: ; preds = %10
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %18
16: ; preds = %10
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
br label %18
18: ; preds = %16, %14
br label %19
19: ; preds = %18, %8
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s:\00"
@.str.1 = [4 x i8] c"\09\09\09\00"
@.str.2 = [3 x i8] c"\09\09\00"
@.str.4 = [10 x i8] c"%sFAIL%s\0A\00"
@.str.5 = [8 x i8] c"\1B[1;31m\00"
@.str.6 = [5 x i8] c"\1B[0m\00"
define void @tst_print_fail(i8* %0) {
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %0)
%3 = tail call i32 @strlen(i8* %0)
%4 = icmp slt i32 %3, 15
br i1 %4, label %5, label %7
5: ; preds = %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.1, i64 0, i64 0))
br label %14
7: ; preds = %1
%8 = tail call i32 @strlen(i8* %0)
%9 = icmp slt i32 %8, 23
br i1 %9, label %10, label %12
10: ; preds = %7
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
br label %14
12: ; preds = %7
%13 = tail call i32 @putchar(i32 9)
br label %14
14: ; preds = %10, %12, %5
%15 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.6, i64 0, i64 0))
ret void
}