int main() {
  int i = 0;
  char *n = 0;
  i = 5;
  n = month_name(i);
  printf("\nmonth name = %s;\n\n", n);
  printf("first symbol of %d-th month_name = %c; and it's address ( & n ) = "
         "%p;\n\n",
         i, *n, &n);
  printf("'n' as char ( %%c )'%c'; and '* n' as char ( %%c )'%c';\n\n", n, *n);
  printf("'n' as digital ( %%d )'%d'; and '* n' as digital ( %%d )'%d';\n\n", n,
         *n);
  printf("'n' as string = ( %%s )'%s';\n\n", n);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
movq   $0x0,-0x10(%rbp)
movl   $0x5,-0x4(%rbp)
mov    -0x4(%rbp),%edi
mov    $0x0,%al
call   1040 <month_name@plt>
cltq
mov    %rax,-0x10(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xea7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%esi
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
lea    0xea3(%rip),%rdi
lea    -0x10(%rbp),%rcx
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
lea    0xece(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rax
movsbl (%rax),%edx
lea    0xeef(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x10(%rbp),%rsi
lea    0xf1d(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
mov    $0x5,%edi
xor    %eax,%eax
call   1040 <month_name@plt>
movslq %eax,%rbx
mov    %rbx,0x8(%rsp)
lea    0xec0(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movsbl (%rbx),%edx
lea    0xec0(%rip),%rdi
lea    0x8(%rsp),%rcx
mov    $0x5,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%rsi
movsbl (%rsi),%edx
lea    0xee8(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%rsi
movsbl (%rsi),%edx
lea    0xf0c(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
mov    0x8(%rsp),%rsi
lea    0xf39(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@.str = [20 x i8] c"\0Amonth name = %s;\0A\0A\00"
@.str.1 = [72 x i8] c"first symbol of %d-th month_name = %c; and it's address ( & n ) = %p;\0A\0A\00"
@.str.2 = [58 x i8] c"'n' as char ( %%c )'%c'; and '* n' as char ( %%c )'%c';\0A\0A\00"
@.str.3 = [64 x i8] c"'n' as digital ( %%d )'%d'; and '* n' as digital ( %%d )'%d';\0A\0A\00"
@.str.4 = [31 x i8] c"'n' as string = ( %%s )'%s';\0A\0A\00"
define i32 @main() {
%1 = alloca i32
%2 = alloca i8*
store i32 0, i32* %1
store i8* null, i8** %2
store i32 5, i32* %1
%3 = load i32, i32* %1
%4 = call i32 (i32, ...) bitcast (i32 (...)* @month_name to i32 (i32, ...)*)(i32 %3)
%5 = sext i32 %4 to i64
%6 = inttoptr i64 %5 to i8*
store i8* %6, i8** %2
%7 = load i8*, i8** %2
%8 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %7)
%9 = load i32, i32* %1
%10 = load i8*, i8** %2
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0), i32 %9, i32 %12, i8** %2)
%14 = load i8*, i8** %2
%15 = load i8*, i8** %2
%16 = load i8, i8* %15
%17 = sext i8 %16 to i32
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0), i8* %14, i32 %17)
%19 = load i8*, i8** %2
%20 = load i8*, i8** %2
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0), i8* %19, i32 %22)
%24 = load i8*, i8** %2
%25 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %24)
ret i32 0
}

LLVM IR (-O2):
@.str = [20 x i8] c"\0Amonth name = %s;\0A\0A\00"
@.str.1 = [72 x i8] c"first symbol of %d-th month_name = %c; and it's address ( & n ) = %p;\0A\0A\00"
@.str.2 = [58 x i8] c"'n' as char ( %%c )'%c'; and '* n' as char ( %%c )'%c';\0A\0A\00"
@.str.3 = [64 x i8] c"'n' as digital ( %%d )'%d'; and '* n' as digital ( %%d )'%d';\0A\0A\00"
@.str.4 = [31 x i8] c"'n' as string = ( %%s )'%s';\0A\0A\00"
define i32 @main() {
%1 = alloca i8*
%2 = bitcast i8** %1 to i8*
%3 = tail call i32 (i32, ...) bitcast (i32 (...)* @month_name to i32 (i32, ...)*)(i32 5)
%4 = sext i32 %3 to i64
%5 = inttoptr i64 %4 to i8*
store i8* %5, i8** %1
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str, i64 0, i64 0), i8* %5)
%7 = load i8, i8* %5
%8 = sext i8 %7 to i32
%9 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([72 x i8], [72 x i8]* @.str.1, i64 0, i64 0), i32 5, i32 %8, i8** %1)
%10 = load i8*, i8** %1
%11 = load i8, i8* %10
%12 = sext i8 %11 to i32
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([58 x i8], [58 x i8]* @.str.2, i64 0, i64 0), i8* %10, i32 %12)
%14 = load i8*, i8** %1
%15 = load i8, i8* %14
%16 = sext i8 %15 to i32
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([64 x i8], [64 x i8]* @.str.3, i64 0, i64 0), i8* %14, i32 %16)
%18 = load i8*, i8** %1
%19 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([31 x i8], [31 x i8]* @.str.4, i64 0, i64 0), i8* %18)
ret i32 0
}