void hoge(const char *str) {
  if (*str == '\0') {
    _msg("Error", __FUNCTION__, 5, "string is empty!!");
  } else {
    _msg("message", __FUNCTION__, 7, "I am %s.", str);
  }
}


x86 assembly (clang, -O0):
<hoge>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %rdi,-0x8(%rbp)
mov    -0x8(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1152 <hoge+0x42>
lea    0xecd(%rip),%rdi
lea    0xecc(%rip),%rsi
mov    $0x5,%edx
lea    0xec5(%rip),%rcx
mov    $0x0,%al
call   1030 <_msg@plt>
jmp    1177 <hoge+0x67>
mov    -0x8(%rbp),%r8
lea    0xec0(%rip),%rdi
lea    0xea2(%rip),%rsi
mov    $0x7,%edx
lea    0xeb5(%rip),%rcx
mov    $0x0,%al
call   1030 <_msg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<hoge>:
cmpb   $0x0,(%rdi)
je     1139 <hoge+0x29>
mov    %rdi,%r8
lea    0xefe(%rip),%rdi
lea    0xee0(%rip),%rsi
lea    0xef8(%rip),%rcx
mov    $0x7,%edx
xor    %eax,%eax
jmp    1030 <_msg@plt>
lea    0xec0(%rip),%rdi
lea    0xebf(%rip),%rsi
lea    0xebd(%rip),%rcx
mov    $0x5,%edx
xor    %eax,%eax
jmp    1030 <_msg@plt>

LLVM IR (-O0):
@.str = [6 x i8] c"Error\00"
@__FUNCTION__.hoge = [5 x i8] c"hoge\00"
@.str.1 = [18 x i8] c"string is empty!!\00"
@.str.2 = [8 x i8] c"message\00"
@.str.3 = [9 x i8] c"I am %s.\00"
define void @hoge(i8* %0) {
%2 = alloca i8*
store i8* %0, i8** %2
%3 = load i8*, i8** %2
%4 = load i8, i8* %3
%5 = sext i8 %4 to i32
%6 = icmp eq i32 %5, 0
br i1 %6, label %7, label %9
7: ; preds = %1
%8 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.hoge, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %12
9: ; preds = %1
%10 = load i8*, i8** %2
%11 = call i32 (i8*, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.hoge, i64 0, i64 0), i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %10)
br label %12
12: ; preds = %9, %7
ret void
}

LLVM IR (-O2):
@.str = [6 x i8] c"Error\00"
@__FUNCTION__.hoge = [5 x i8] c"hoge\00"
@.str.1 = [18 x i8] c"string is empty!!\00"
@.str.2 = [8 x i8] c"message\00"
@.str.3 = [9 x i8] c"I am %s.\00"
define void @hoge(i8* %0) {
%2 = load i8, i8* %0
%3 = icmp eq i8 %2, 0
br i1 %3, label %4, label %6
4: ; preds = %1
%5 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.hoge, i64 0, i64 0), i32 5, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.1, i64 0, i64 0))
br label %8
6: ; preds = %1
%7 = tail call i32 (i8*, i8*, i32, i8*, i8*, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.hoge, i64 0, i64 0), i32 7, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.3, i64 0, i64 0), i8* %0)
br label %8
8: ; preds = %6, %4
ret void
}