#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*/ greedy_align_paragraph(char *, int);
int /*<<< orphan*/ print_centered(char *, int, char);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putchar(char);
void show_banner(char *name, char *desc) {
  for (int i = 0; i < 80; i++)
    printf("*");
  putchar('\n');
  print_centered(name, 78, '*');
  printf("*%79c\n", '*');
  greedy_align_paragraph(desc, 78);
  printf("*%79c\n", '*');
  for (int i = 0; i < 80; i++)
    printf("*");
  putchar('\n');
}


x86 assembly (clang, -O0):
<show_banner>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
cmpl   $0x50,-0x14(%rbp)
jge    117d <show_banner+0x3d>
lea    0xe98(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1157 <show_banner+0x17>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    -0x8(%rbp),%rdi
mov    $0x4e,%esi
mov    $0x2a,%edx
call   1050 <print_centered@plt>
lea    0xe61(%rip),%rdi
mov    $0x2a,%esi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x10(%rbp),%rdi
mov    $0x4e,%esi
call   1030 <greedy_align_paragraph@plt>
lea    0xe40(%rip),%rdi
mov    $0x2a,%esi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x0,-0x18(%rbp)
cmpl   $0x50,-0x18(%rbp)
jge    11fb <show_banner+0xbb>
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11d5 <show_banner+0x95>
mov    $0xa,%edi
call   1040 <putchar@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<show_banner>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%r14
mov    %rdi,%rbx
mov    $0x50,%ebp
nop
mov    $0x2a,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebp
jne    1150 <show_banner+0x10>
mov    $0xa,%edi
call   1040 <putchar@plt>
mov    %rbx,%rdi
mov    $0x4e,%esi
mov    $0x2a,%edx
call   1050 <print_centered@plt>
lea    0xe7e(%rip),%rbx
mov    %rbx,%rdi
mov    $0x2a,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    %r14,%rdi
mov    $0x4e,%esi
call   1030 <greedy_align_paragraph@plt>
mov    %rbx,%rdi
mov    $0x2a,%esi
xor    %eax,%eax
call   1060 <printf@plt>
mov    $0x50,%ebx
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax)
mov    $0x2a,%edi
call   1040 <putchar@plt>
add    $0xffffffff,%ebx
jne    11c0 <show_banner+0x80>
mov    $0xa,%edi
pop    %rbx
pop    %r14
pop    %rbp
jmp    1040 <putchar@plt>

LLVM IR (-O0):
@.str = [2 x i8] c"*\00"
@.str.1 = [7 x i8] c"*%79c\0A\00"
define void @show_banner(i8* %0, i8* %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %3
store i8* %1, i8** %4
store i32 0, i32* %5
br label %7
7: ; preds = %12, %2
%8 = load i32, i32* %5
%9 = icmp slt i32 %8, 80
br i1 %9, label %10, label %15
10: ; preds = %7
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %10
%13 = load i32, i32* %5
%14 = add nsw i32 %13, 1
store i32 %14, i32* %5
br label %7
15: ; preds = %7
%16 = call i32 @putchar(i8 signext 10)
%17 = load i8*, i8** %3
%18 = call i32 @print_centered(i8* %17, i32 78, i8 signext 42)
%19 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 42)
%20 = load i8*, i8** %4
%21 = call i32 @greedy_align_paragraph(i8* %20, i32 78)
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 42)
store i32 0, i32* %6
br label %23
23: ; preds = %28, %15
%24 = load i32, i32* %6
%25 = icmp slt i32 %24, 80
br i1 %25, label %26, label %31
26: ; preds = %23
%27 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
br label %28
28: ; preds = %26
%29 = load i32, i32* %6
%30 = add nsw i32 %29, 1
store i32 %30, i32* %6
br label %23
31: ; preds = %23
%32 = call i32 @putchar(i8 signext 10)
ret void
}

LLVM IR (-O2):
@.str.1 = [7 x i8] c"*%79c\0A\00"
define void @show_banner(i8* %0, i8* %1) {
br label %9
3: ; preds = %9
%4 = tail call i32 @putchar(i8 signext 10)
%5 = tail call i32 @print_centered(i8* %0, i32 78, i8 signext 42)
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 42)
%7 = tail call i32 @greedy_align_paragraph(i8* %1, i32 78)
%8 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.1, i64 0, i64 0), i32 42)
br label %16
9: ; preds = %2, %9
%10 = phi i32 [ 0, %2 ], [ %12, %9 ]
%11 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 42)
%12 = add nuw nsw i32 %10, 1
%13 = icmp eq i32 %12, 80
br i1 %13, label %3, label %9
14: ; preds = %16
%15 = tail call i32 @putchar(i8 signext 10)
ret void
16: ; preds = %3, %16
%17 = phi i32 [ 0, %3 ], [ %19, %16 ]
%18 = tail call i32 bitcast (i32 (i8)* @putchar to i32 (i32)*)(i32 42)
%19 = add nuw nsw i32 %17, 1
%20 = icmp eq i32 %19, 80
br i1 %20, label %14, label %16
}