#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 *, char *);
int /*<<< orphan*/ putchar(char);
int /*<<< orphan*/ show_n_char(char, int);
int strlen(char *);
int main() {
  int spaces;
  show_n_char('*', 40);
  putchar('\n');
  show_n_char(' ', 12);
  printf("%s\n", "Funny");
  spaces = (40 - strlen("east river road 601")) / 2;
  show_n_char(' ', spaces);
  printf("%s\n", "east river road 601");
  show_n_char('*', 40);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    $0x2a,%edi
mov    $0x28,%esi
call   1060 <show_n_char@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
mov    $0xc,%esi
call   1060 <show_n_char@plt>
lea    0xe89(%rip),%rdi
lea    0xe86(%rip),%rsi
call   1050 <printf@plt>
lea    0xe80(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    $0x28,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x4(%rbp)
mov    -0x4(%rbp),%esi
mov    $0x20,%edi
call   1060 <show_n_char@plt>
lea    0xe49(%rip),%rdi
lea    0xe4c(%rip),%rsi
call   1050 <printf@plt>
mov    $0x2a,%edi
mov    $0x28,%esi
call   1060 <show_n_char@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    $0x28,%ebp
mov    $0x2a,%edi
mov    $0x28,%esi
call   1060 <show_n_char@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
mov    $0x20,%edi
mov    $0xc,%esi
call   1060 <show_n_char@plt>
lea    0xe88(%rip),%r14
lea    0xe85(%rip),%rsi
mov    %r14,%rdi
call   1050 <printf@plt>
lea    0xe7c(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
sub    %eax,%ebp
mov    %ebp,%esi
shr    $0x1f,%esi
add    %ebp,%esi
sar    %esi
mov    $0x20,%edi
call   1060 <show_n_char@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
mov    $0x2a,%edi
mov    $0x28,%esi
call   1060 <show_n_char@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"Funny\00"
@.str.2 = [20 x i8] c"east river road 601\00"
define i32 @main() {
%1 = alloca i32
%2 = call i32 @show_n_char(i8 signext 42, i32 40)
%3 = call i32 @putchar(i8 signext 10)
%4 = call i32 @show_n_char(i8 signext 32, i32 12)
%5 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%6 = call i32 @strlen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%7 = sub nsw i32 40, %6
%8 = sdiv i32 %7, 2
store i32 %8, i32* %1
%9 = load i32, i32* %1
%10 = call i32 @show_n_char(i8 signext 32, i32 %9)
%11 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%12 = call i32 @show_n_char(i8 signext 42, i32 40)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [6 x i8] c"Funny\00"
@.str.2 = [20 x i8] c"east river road 601\00"
define i32 @main() {
%1 = tail call i32 @show_n_char(i8 signext 42, i32 40)
%2 = tail call i32 @putchar(i8 signext 10)
%3 = tail call i32 @show_n_char(i8 signext 32, i32 12)
%4 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @strlen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%6 = sub nsw i32 40, %5
%7 = sdiv i32 %6, 2
%8 = tail call i32 @show_n_char(i8 signext 32, i32 %7)
%9 = tail call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 @show_n_char(i8 signext 42, i32 40)
ret i32 0
}