void foo(int arg) {
  if (arg < 0) {
    _msg("warning", __FUNCTION__, 25, "%d is under 0", arg);
  } else {
    _msg("warning", __FUNCTION__, 27, "%d is over(equal) 0", arg);
  }
}


x86 assembly (clang, -O0):
<foo>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
mov    %edi,-0x4(%rbp)
cmpl   $0x0,-0x4(%rbp)
jge    114f <foo+0x3f>
mov    -0x4(%rbp),%r8d
lea    0xed0(%rip),%rdi
lea    0xed1(%rip),%rsi
mov    $0x19,%edx
lea    0xec9(%rip),%rcx
mov    $0x0,%al
call   1030 <_msg@plt>
jmp    1174 <foo+0x64>
mov    -0x4(%rbp),%r8d
lea    0xea6(%rip),%rdi
lea    0xea7(%rip),%rsi
mov    $0x1b,%edx
lea    0xead(%rip),%rcx
mov    $0x0,%al
call   1030 <_msg@plt>
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<foo>:
mov    %edi,%r8d
test   %edi,%edi
js     1138 <foo+0x28>
lea    0xee2(%rip),%rdi
lea    0xee3(%rip),%rsi
lea    0xeee(%rip),%rcx
mov    $0x1b,%edx
xor    %eax,%eax
jmp    1030 <_msg@plt>
lea    0xec1(%rip),%rdi
lea    0xec2(%rip),%rsi
lea    0xebf(%rip),%rcx
mov    $0x19,%edx
xor    %eax,%eax
jmp    1030 <_msg@plt>

LLVM IR (-O0):
@.str = [8 x i8] c"warning\00"
@__FUNCTION__.foo = [4 x i8] c"foo\00"
@.str.1 = [14 x i8] c"%d is under 0\00"
@.str.2 = [20 x i8] c"%d is over(equal) 0\00"
define void @foo(i32 %0) {
%2 = alloca i32
store i32 %0, i32* %2
%3 = load i32, i32* %2
%4 = icmp slt i32 %3, 0
br i1 %4, label %5, label %8
5: ; preds = %1
%6 = load i32, i32* %2
%7 = call i32 (i8*, i8*, i32, i8*, i32, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__FUNCTION__.foo, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %6)
br label %11
8: ; preds = %1
%9 = load i32, i32* %2
%10 = call i32 (i8*, i8*, i32, i8*, i32, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__FUNCTION__.foo, i64 0, i64 0), i32 27, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %9)
br label %11
11: ; preds = %8, %5
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"warning\00"
@__FUNCTION__.foo = [4 x i8] c"foo\00"
@.str.1 = [14 x i8] c"%d is under 0\00"
@.str.2 = [20 x i8] c"%d is over(equal) 0\00"
define void @foo(i32 %0) {
%2 = icmp slt i32 %0, 0
br i1 %2, label %3, label %5
3: ; preds = %1
%4 = tail call i32 (i8*, i8*, i32, i8*, i32, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__FUNCTION__.foo, i64 0, i64 0), i32 25, i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.1, i64 0, i64 0), i32 %0)
br label %7
5: ; preds = %1
%6 = tail call i32 (i8*, i8*, i32, i8*, i32, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, i32, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @__FUNCTION__.foo, i64 0, i64 0), i32 27, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i32 %0)
br label %7
7: ; preds = %5, %3
ret void
}