void c(void) {
  printf("[%s]:Begin!\n", __FUNCTION__);
  printf("[%s]:Call d()!\n", __FUNCTION__);
  d();
  printf("[%s]:d() returned!\n", __FUNCTION__);
  printf("[%s]:End!\n", __FUNCTION__);
}


x86 assembly (clang, -O0):
<c>:
push   %rbp
mov    %rsp,%rbp
lea    0xed5(%rip),%rdi
lea    0xedb(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xecf(%rip),%rdi
lea    0xec6(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    $0x0,%al
call   1030 <d@plt>
lea    0xec3(%rip),%rdi
lea    0xeaa(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xec2(%rip),%rdi
lea    0xe95(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
pop    %rbp
ret

x86 assembly (clang, -O2):
<c>:
push   %rbx
lea    0xed8(%rip),%rdi
lea    0xede(%rip),%rbx
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xecf(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
xor    %eax,%eax
call   1030 <d@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1040 <printf@plt>
lea    0xeca(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
pop    %rbx
jmp    1040 <printf@plt>

LLVM IR (-O0):
@.str = [13 x i8] c"[%s]:Begin!\0A\00"
@__FUNCTION__.c = [2 x i8] c"c\00"
@.str.1 = [16 x i8] c"[%s]:Call d()!\0A\00"
@.str.2 = [20 x i8] c"[%s]:d() returned!\0A\00"
@.str.3 = [11 x i8] c"[%s]:End!\0A\00"
define void @c() {
%1 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.c, i64 0, i64 0))
%2 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.c, i64 0, i64 0))
%3 = call i32 (...) @d()
%4 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.c, i64 0, i64 0))
%5 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.c, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@.str = [13 x i8] c"[%s]:Begin!\0A\00"
@__FUNCTION__.c = [2 x i8] c"c\00"
@.str.1 = [16 x i8] c"[%s]:Call d()!\0A\00"
@.str.2 = [20 x i8] c"[%s]:d() returned!\0A\00"
@.str.3 = [11 x i8] c"[%s]:End!\0A\00"
define void @c() {
%1 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.c, i64 0, i64 0))
%2 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([16 x i8], [16 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.c, i64 0, i64 0))
%3 = tail call i32 (...) @d()
%4 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.c, i64 0, i64 0))
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @__FUNCTION__.c, i64 0, i64 0))
ret void
}