#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(void) {
  int spaces;
  show_n_char('*', 40);
  putchar('\n');
  show_n_char(' ', 12);
  printf("%s\n", "GIGATHINK, INC. ");
  spaces = (40 - strlen("101 Megabuck Plaza")) / 2;
  show_n_char(' ', spaces);
  printf("%s\n", "101 Megabuck Plaza");
  show_n_char(' ', (40 - strlen("Megapolis, CA 94904")) / 2);
  printf("%s\n", "Megapolis, CA 94904");
  show_n_char('*', 40);
  putchar('\n');
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
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    0xe82(%rip),%rdi
lea    0xe7f(%rip),%rsi
call   1050 <printf@plt>
lea    0xe84(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    $0x28,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,-0x8(%rbp)
mov    -0x8(%rbp),%esi
mov    $0x20,%edi
call   1060 <show_n_char@plt>
lea    0xe42(%rip),%rdi
lea    0xe50(%rip),%rsi
call   1050 <printf@plt>
lea    0xe57(%rip),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    $0x28,%eax
sub    %ecx,%eax
mov    $0x2,%ecx
cltd
idiv   %ecx
mov    %eax,%esi
mov    $0x20,%edi
call   1060 <show_n_char@plt>
lea    0xe06(%rip),%rdi
lea    0xe27(%rip),%rsi
call   1050 <printf@plt>
mov    $0x2a,%edi
mov    $0x28,%esi
call   1060 <show_n_char@plt>
mov    $0xa,%edi
call   1030 <putchar@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    0xe87(%rip),%rbx
mov    %rbx,%rdi
call   1040 <strlen@plt>
mov    $0x28,%ecx
sub    %eax,%ecx
mov    %ecx,%esi
shr    $0x1f,%esi
add    %ecx,%esi
sar    %esi
mov    $0x20,%edi
call   1060 <show_n_char@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
call   1050 <printf@plt>
lea    0xe66(%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>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [17 x i8] c"GIGATHINK, INC. \00"
@.str.2 = [19 x i8] c"101 Megabuck Plaza\00"
@.str.3 = [20 x i8] c"Megapolis, CA 94904\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i32
store i32 0, i32* %1
%3 = call i32 @show_n_char(i8 signext 42, i32 40)
%4 = call i32 @putchar(i8 signext 10)
%5 = call i32 @show_n_char(i8 signext 32, i32 12)
%6 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%7 = call i32 @strlen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%8 = sub nsw i32 40, %7
%9 = sdiv i32 %8, 2
store i32 %9, i32* %2
%10 = load i32, i32* %2
%11 = call i32 @show_n_char(i8 signext 32, i32 %10)
%12 = call i32 @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%13 = call i32 @strlen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%14 = sub nsw i32 40, %13
%15 = sdiv i32 %14, 2
%16 = call i32 @show_n_char(i8 signext 32, i32 %15)
%17 = 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.3, i64 0, i64 0))
%18 = call i32 @show_n_char(i8 signext 42, i32 40)
%19 = call i32 @putchar(i8 signext 10)
ret i32 0
}

LLVM IR (-O2):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [17 x i8] c"GIGATHINK, INC. \00"
@.str.2 = [19 x i8] c"101 Megabuck Plaza\00"
@.str.3 = [20 x i8] c"Megapolis, CA 94904\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 ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0))
%5 = tail call i32 @strlen(i8* getelementptr inbounds ([19 x i8], [19 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 ([19 x i8], [19 x i8]* @.str.2, i64 0, i64 0))
%10 = tail call i32 @strlen(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0))
%11 = sub nsw i32 40, %10
%12 = sdiv i32 %11, 2
%13 = tail call i32 @show_n_char(i8 signext 32, i32 %12)
%14 = 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.3, i64 0, i64 0))
%15 = tail call i32 @show_n_char(i8 signext 42, i32 40)
%16 = tail call i32 @putchar(i8 signext 10)
ret i32 0
}