int main(int argc, char *argv[]) {
  int val = 9;
  char str[] = {"knuj"};
  printf("Print numbers in reverse order using recursion  input %d(default)",
         val);
  p_reverse(val);
  printf("Reverse of : %s is : ", str);
  reverseString(str);
  printf("\n");
  return (0);
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x9,-0x14(%rbp)
mov    0xead(%rip),%eax
mov    %eax,-0x19(%rbp)
mov    0xea8(%rip),%al
mov    %al,-0x15(%rbp)
mov    -0x14(%rbp),%esi
lea    0xe9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x14(%rbp),%edi
mov    $0x0,%al
call   1040 <p_reverse@plt>
lea    -0x19(%rbp),%rsi
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
lea    -0x19(%rbp),%rdi
mov    $0x0,%al
call   1050 <reverseString@plt>
lea    0xebf(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
sub    $0x10,%rsp
movb   $0x0,0xc(%rsp)
movl   $0x6a756e6b,0x8(%rsp)
6a
lea    0xeac(%rip),%rdi
mov    $0x9,%esi
xor    %eax,%eax
call   1040 <printf@plt>
mov    $0x9,%edi
xor    %eax,%eax
call   1050 <p_reverse@plt>
lea    0xecf(%rip),%rdi
lea    0x8(%rsp),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
mov    %rbx,%rdi
xor    %eax,%eax
call   1060 <reverseString@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbx
ret

LLVM IR (-O0):
@__const.main.str = [5 x i8] c"knuj\00"
@.str = [66 x i8] c"Print numbers in reverse order using recursion input %d(default)\00"
@.str.1 = [22 x i8] c"Reverse of : %s is : \00"
@.str.2 = [2 x i8] c"\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [5 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 9, i32* %6
%8 = bitcast [5 x i8]* %7 to i8*
%9 = load i32, i32* %6
%10 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 %9)
%11 = load i32, i32* %6
%12 = call i32 (i32, ...) bitcast (i32 (...)* @p_reverse to i32 (i32, ...)*)(i32 %11)
%13 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %13)
%15 = getelementptr inbounds [5 x i8], [5 x i8]* %7, i64 0, i64 0
%16 = call i32 (i8*, ...) bitcast (i32 (...)* @reverseString to i32 (i8*, ...)*)(i8* %15)
%17 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@__const.main.str = [5 x i8] c"knuj\00"
@.str = [66 x i8] c"Print numbers in reverse order using recursion input %d(default)\00"
@.str.1 = [22 x i8] c"Reverse of : %s is : \00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [5 x i8]
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %3, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([66 x i8], [66 x i8]* @.str, i64 0, i64 0), i32 9)
%6 = tail call i32 (i32, ...) bitcast (i32 (...)* @p_reverse to i32 (i32, ...)*)(i32 9)
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.1, i64 0, i64 0), i8* %4)
%8 = call i32 (i8*, ...) bitcast (i32 (...)* @reverseString to i32 (i8*, ...)*)(i8* %4)
%9 = call i32 @putchar(i32 10)
ret i32 0
}