int main(int argc, char *argv[]) {
  int argc_fw;
  printf("%s\n", argv[0]);
  argc_fw = floor(log10(argc - 1) + 1);
  for (int i = 1; i < argc; i++) {
    printf("  Arg %*d: %s\n", argc_fw, i, argv[i]);
  }
  printf("5*8 = %d\n", sqarea_(5, 8));
  foo();
  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)
mov    -0x10(%rbp),%rax
mov    (%rax),%rsi
lea    0xe9f(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x8(%rbp),%eax
sub    $0x1,%eax
cvtsi2sd %eax,%xmm0
call   1060 <log10@plt>
movsd  0xe6e(%rip),%xmm1
addsd  %xmm1,%xmm0
call   1070 <floor@plt>
cvttsd2si %xmm0,%eax
mov    %eax,-0x14(%rbp)
movl   $0x1,-0x18(%rbp)
mov    -0x18(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    11e3 <main+0x93>
mov    -0x14(%rbp),%esi
mov    -0x18(%rbp),%edx
mov    -0x10(%rbp),%rax
movslq -0x18(%rbp),%rcx
mov    (%rax,%rcx,8),%rcx
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x18(%rbp)
jmp    11a9 <main+0x59>
mov    $0x5,%edi
mov    $0x8,%esi
mov    $0x0,%al
call   1040 <sqarea_@plt>
mov    %eax,%esi
lea    0xe1a(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    $0x0,%al
call   1050 <foo@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
mov    %rsi,%r15
mov    %edi,%r14d
mov    (%rsi),%rdi
call   1030 <puts@plt>
lea    -0x1(%r14),%eax
cvtsi2sd %eax,%xmm0
call   1070 <log10@plt>
addsd  0xe75(%rip),%xmm0
call   1080 <floor@plt>
cmp    $0x2,%r14d
jl     11cc <main+0x6c>
cvttsd2si %xmm0,%r12d
mov    %r14d,%ebp
mov    $0x1,%ebx
lea    0xe5e(%rip),%r14
nopw   0x0(%rax,%rax,1)
mov    (%r15,%rbx,8),%rcx
mov    %r14,%rdi
mov    %r12d,%esi
mov    %ebx,%edx
xor    %eax,%eax
call   1040 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%rbp
jne    11b0 <main+0x50>
mov    $0x5,%edi
mov    $0x8,%esi
xor    %eax,%eax
call   1050 <sqarea_@plt>
lea    0xe33(%rip),%rdi
mov    %eax,%esi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1060 <foo@plt>
xor    %eax,%eax
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [4 x i8] c"%s\0A\00"
@.str.1 = [15 x i8] c" Arg %*d: %s\0A\00"
@.str.2 = [10 x i8] c"5*8 = %d\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str, i64 0, i64 0), i8* %10)
%12 = load i32, i32* %4
%13 = sub nsw i32 %12, 1
%14 = sitofp i32 %13 to double
%15 = call double @log10(double %14)
%16 = fadd double %15, 1.000000e+00
%17 = call double @llvm.floor.f64(double %16)
%18 = fptosi double %17 to i32
store i32 %18, i32* %6
store i32 1, i32* %7
br label %19
19: ; preds = %32, %2
%20 = load i32, i32* %7
%21 = load i32, i32* %4
%22 = icmp slt i32 %20, %21
br i1 %22, label %23, label %35
23: ; preds = %19
%24 = load i32, i32* %6
%25 = load i32, i32* %7
%26 = load i8**, i8*** %5
%27 = load i32, i32* %7
%28 = sext i32 %27 to i64
%29 = getelementptr inbounds i8*, i8** %26, i64 %28
%30 = load i8*, i8** %29
%31 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %24, i32 %25, i8* %30)
br label %32
32: ; preds = %23
%33 = load i32, i32* %7
%34 = add nsw i32 %33, 1
store i32 %34, i32* %7
br label %19
35: ; preds = %19
%36 = call i32 (i32, i32, ...) bitcast (i32 (...)* @sqarea_ to i32 (i32, i32, ...)*)(i32 5, i32 8)
%37 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %36)
%38 = call i32 (...) @foo()
ret i32 0
}

LLVM IR (-O2):
@.str.1 = [15 x i8] c" Arg %*d: %s\0A\00"
@.str.2 = [10 x i8] c"5*8 = %d\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = load i8*, i8** %1
%4 = tail call i32 @puts(i8* dereferenceable(1) %3)
%5 = add nsw i32 %0, -1
%6 = sitofp i32 %5 to double
%7 = tail call double @log10(double %6)
%8 = fadd double %7, 1.000000e+00
%9 = tail call double @llvm.floor.f64(double %8)
%10 = fptosi double %9 to i32
%11 = icmp sgt i32 %0, 1
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = zext i32 %0 to i64
br label %18
14: ; preds = %18, %2
%15 = tail call i32 (i32, i32, ...) bitcast (i32 (...)* @sqarea_ to i32 (i32, i32, ...)*)(i32 5, i32 8)
%16 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.2, i64 0, i64 0), i32 %15)
%17 = tail call i32 (...) @foo()
ret i32 0
18: ; preds = %12, %18
%19 = phi i64 [ 1, %12 ], [ %24, %18 ]
%20 = getelementptr inbounds i8*, i8** %1, i64 %19
%21 = load i8*, i8** %20
%22 = trunc i64 %19 to i32
%23 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %22, i8* %21)
%24 = add nuw nsw i64 %19, 1
%25 = icmp eq i64 %24, %13
br i1 %25, label %14, label %18
}