void p_test_summery(int total, int passed, int failed, int known_issues,
                    int disabled) {
  printf("\ntest summery\n------------\n");
  printf("%s"
         "%-14s%i\n"
         "%s",
         "\033[01m", "total", total, "\033[00;00;00m");
  printf("%-14s%i\n", "passed", passed);
  printf("%-14s%i\n", "failed", failed);
  printf("%-14s%i\n", "known issues", known_issues);
  printf("%-14s%i\n", "disabled", disabled);
}


x86 assembly (clang, -O0):
<p_test_summery>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %edi,-0x4(%rbp)
mov    %esi,-0x8(%rbp)
mov    %edx,-0xc(%rbp)
mov    %ecx,-0x10(%rbp)
mov    %r8d,-0x14(%rbp)
lea    0xed1(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%ecx
lea    0xedc(%rip),%rdi
lea    0xee2(%rip),%rsi
lea    0xee1(%rip),%rdx
lea    0xee0(%rip),%r8
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%edx
lea    0xedb(%rip),%rdi
lea    0xedd(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0xc(%rbp),%edx
lea    0xec3(%rip),%rdi
lea    0xecc(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%edx
lea    0xeab(%rip),%rdi
lea    0xebb(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edx
lea    0xe93(%rip),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<p_test_summery>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %r8d,%r14d
mov    %ecx,%r15d
mov    %edx,%r12d
mov    %esi,%ebp
mov    %edi,%ebx
lea    0xf16(%rip),%rdi
call   1030 <puts@plt>
lea    0xeb8(%rip),%rdi
lea    0xebe(%rip),%rsi
lea    0xebd(%rip),%rdx
lea    0xebc(%rip),%r8
mov    %ebx,%ecx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeb8(%rip),%rbx
lea    0xeba(%rip),%rsi
mov    %rbx,%rdi
mov    %ebp,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeae(%rip),%rsi
mov    %rbx,%rdi
mov    %r12d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xea1(%rip),%rsi
mov    %rbx,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xe9a(%rip),%rsi
mov    %rbx,%rdi
mov    %r14d,%edx
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [28 x i8] c"\0Atest summery\0A------------\0A\00"
@.str.1 = [13 x i8] c"%s%-14s%i\0A%s\00"
@.str.2 = [6 x i8] c"\1B[01m\00"
@.str.3 = [6 x i8] c"total\00"
@.str.4 = [12 x i8] c"\1B[00;00;00m\00"
@.str.5 = [9 x i8] c"%-14s%i\0A\00"
@.str.6 = [7 x i8] c"passed\00"
@.str.7 = [7 x i8] c"failed\00"
@.str.8 = [13 x i8] c"known issues\00"
@.str.9 = [9 x i8] c"disabled\00"
define void @p_test_summery(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = alloca i32
%7 = alloca i32
%8 = alloca i32
%9 = alloca i32
%10 = alloca i32
store i32 %0, i32* %6
store i32 %1, i32* %7
store i32 %2, i32* %8
store i32 %3, i32* %9
store i32 %4, i32* %10
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([28 x i8], [28 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* %6
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %12, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%14 = load i32, i32* %7
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %14)
%16 = load i32, i32* %8
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %16)
%18 = load i32, i32* %9
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %18)
%20 = load i32, i32* %10
%21 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %20)
ret void
}

LLVM IR (-O2):
@.str.1 = [13 x i8] c"%s%-14s%i\0A%s\00"
@.str.2 = [6 x i8] c"\1B[01m\00"
@.str.3 = [6 x i8] c"total\00"
@.str.4 = [12 x i8] c"\1B[00;00;00m\00"
@.str.5 = [9 x i8] c"%-14s%i\0A\00"
@.str.6 = [7 x i8] c"passed\00"
@.str.7 = [7 x i8] c"failed\00"
@.str.8 = [13 x i8] c"known issues\00"
@.str.9 = [9 x i8] c"disabled\00"
@str = [27 x i8] c"\0Atest summery\0A------------\00"
define void @p_test_summery(i32 %0, i32 %1, i32 %2, i32 %3, i32 %4) {
%6 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([27 x i8], [27 x i8]* @str, i64 0, i64 0))
%7 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0), i32 %0, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.4, i64 0, i64 0))
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0), i32 %1)
%9 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.7, i64 0, i64 0), i32 %2)
%10 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0), i32 %3)
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.9, i64 0, i64 0), i32 %4)
ret void
}