int main(void) {
  flush();
  MW_printf("HelloWorld!!\n");
  MW_printf("This is demo of my printf!!\n");
  MW_printf("%%dformat :%d\n", 114514);
  MW_printf("%%bformat :%b\n", 1919810);
  _msg("message", __FUNCTION__, 13, "in function main");
  foo(5);
  foo(-6);
  hoge("foo!!");
  hoge("");
  flush();
  _msg("message", __FUNCTION__, 19, "helloWorld%d%s", 114514, "1919810");
  flush();
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
mov    $0x0,%al
call   1030 <flush@plt>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1040 <MW_printf@plt>
lea    0xe9e(%rip),%rdi
mov    $0x0,%al
call   1040 <MW_printf@plt>
lea    0xead(%rip),%rdi
mov    $0x1bf52,%esi
mov    $0x0,%al
call   1040 <MW_printf@plt>
lea    0xea9(%rip),%rdi
mov    $0x1d4b42,%esi
mov    $0x0,%al
call   1040 <MW_printf@plt>
lea    0xea5(%rip),%rdi
lea    0xeb2(%rip),%rsi
mov    $0xd,%edx
lea    0xe9a(%rip),%rcx
mov    $0x0,%al
call   1050 <_msg@plt>
mov    $0x5,%edi
mov    $0x0,%al
call   1060 <foo@plt>
mov    $0xfffffffa,%edi
mov    $0x0,%al
call   1060 <foo@plt>
lea    0xe85(%rip),%rdi
mov    $0x0,%al
call   1070 <hoge@plt>
lea    0xe22(%rip),%rdi
mov    $0x0,%al
call   1070 <hoge@plt>
mov    $0x0,%al
call   1030 <flush@plt>
lea    0xe49(%rip),%rdi
lea    0xe56(%rip),%rsi
mov    $0x13,%edx
lea    0xe55(%rip),%rcx
mov    $0x1bf52,%r8d
lea    0xe57(%rip),%r9
mov    $0x0,%al
call   1050 <_msg@plt>
mov    $0x0,%al
call   1030 <flush@plt>
xor    %eax,%eax
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r14
push   %rbx
push   %rax
xor    %eax,%eax
call   1030 <flush@plt>
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
call   1040 <MW_printf@plt>
lea    0xe9e(%rip),%rdi
xor    %eax,%eax
call   1040 <MW_printf@plt>
lea    0xead(%rip),%rdi
mov    $0x1bf52,%esi
xor    %eax,%eax
call   1040 <MW_printf@plt>
lea    0xea9(%rip),%rdi
mov    $0x1d4b42,%esi
xor    %eax,%eax
call   1040 <MW_printf@plt>
lea    0xea5(%rip),%rbx
lea    0xeb2(%rip),%r14
lea    0xe9f(%rip),%rcx
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0xd,%edx
xor    %eax,%eax
call   1050 <_msg@plt>
mov    $0x5,%edi
xor    %eax,%eax
call   1060 <foo@plt>
mov    $0xfffffffa,%edi
xor    %eax,%eax
call   1060 <foo@plt>
lea    0xe7f(%rip),%rdi
xor    %eax,%eax
call   1070 <hoge@plt>
lea    0xe1c(%rip),%rdi
xor    %eax,%eax
call   1070 <hoge@plt>
xor    %eax,%eax
call   1030 <flush@plt>
lea    0xe62(%rip),%rcx
lea    0xe6a(%rip),%r9
mov    %rbx,%rdi
mov    %r14,%rsi
mov    $0x13,%edx
mov    $0x1bf52,%r8d
xor    %eax,%eax
call   1050 <_msg@plt>
xor    %eax,%eax
call   1030 <flush@plt>
xor    %eax,%eax
add    $0x8,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@.str = [14 x i8] c"HelloWorld!!\0A\00"
@.str.1 = [29 x i8] c"This is demo of my printf!!\0A\00"
@.str.2 = [15 x i8] c"%%dformat :%d\0A\00"
@.str.3 = [15 x i8] c"%%bformat :%b\0A\00"
@.str.4 = [8 x i8] c"message\00"
@__FUNCTION__.main = [5 x i8] c"main\00"
@.str.5 = [17 x i8] c"in function main\00"
@.str.6 = [6 x i8] c"foo!!\00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [15 x i8] c"helloWorld%d%s\00"
@.str.9 = [8 x i8] c"1919810\00"
define i32 @main() {
%1 = call i32 (...) @flush()
%2 = call i32 (i8*, ...) bitcast (i32 (...)* @MW_printf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = call i32 (i8*, ...) bitcast (i32 (...)* @MW_printf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%4 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @MW_printf to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 114514)
%5 = call i32 (i8*, i32, ...) bitcast (i32 (...)* @MW_printf to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 1919810)
%6 = call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.main, i64 0, i64 0), i32 13, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%7 = call i32 (i32, ...) bitcast (i32 (...)* @foo to i32 (i32, ...)*)(i32 5)
%8 = call i32 (i32, ...) bitcast (i32 (...)* @foo to i32 (i32, ...)*)(i32 -6)
%9 = call i32 (i8*, ...) bitcast (i32 (...)* @hoge to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%10 = call i32 (i8*, ...) bitcast (i32 (...)* @hoge to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0))
%11 = call i32 (...) @flush()
%12 = call i32 (i8*, i8*, i32, i8*, i32, i8*, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.main, i64 0, i64 0), i32 19, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 114514, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%13 = call i32 (...) @flush()
ret i32 0
}

LLVM IR (-O2):
@.str = [14 x i8] c"HelloWorld!!\0A\00"
@.str.1 = [29 x i8] c"This is demo of my printf!!\0A\00"
@.str.2 = [15 x i8] c"%%dformat :%d\0A\00"
@.str.3 = [15 x i8] c"%%bformat :%b\0A\00"
@.str.4 = [8 x i8] c"message\00"
@__FUNCTION__.main = [5 x i8] c"main\00"
@.str.5 = [17 x i8] c"in function main\00"
@.str.6 = [6 x i8] c"foo!!\00"
@.str.7 = [1 x i8] zeroinitializer
@.str.8 = [15 x i8] c"helloWorld%d%s\00"
@.str.9 = [8 x i8] c"1919810\00"
define i32 @main() {
%1 = tail call i32 (...) @flush()
%2 = tail call i32 (i8*, ...) bitcast (i32 (...)* @MW_printf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0))
%3 = tail call i32 (i8*, ...) bitcast (i32 (...)* @MW_printf to i32 (i8*, ...)*)(i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.1, i64 0, i64 0))
%4 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @MW_printf to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.2, i64 0, i64 0), i32 114514)
%5 = tail call i32 (i8*, i32, ...) bitcast (i32 (...)* @MW_printf to i32 (i8*, i32, ...)*)(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.3, i64 0, i64 0), i32 1919810)
%6 = tail call i32 (i8*, i8*, i32, i8*, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.main, i64 0, i64 0), i32 13, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.5, i64 0, i64 0))
%7 = tail call i32 (i32, ...) bitcast (i32 (...)* @foo to i32 (i32, ...)*)(i32 5)
%8 = tail call i32 (i32, ...) bitcast (i32 (...)* @foo to i32 (i32, ...)*)(i32 -6)
%9 = tail call i32 (i8*, ...) bitcast (i32 (...)* @hoge to i32 (i8*, ...)*)(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.6, i64 0, i64 0))
%10 = tail call i32 (i8*, ...) bitcast (i32 (...)* @hoge to i32 (i8*, ...)*)(i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.7, i64 0, i64 0))
%11 = tail call i32 (...) @flush()
%12 = tail call i32 (i8*, i8*, i32, i8*, i32, i8*, ...) bitcast (i32 (...)* @_msg to i32 (i8*, i8*, i32, i8*, i32, i8*, ...)*)(i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @__FUNCTION__.main, i64 0, i64 0), i32 19, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.8, i64 0, i64 0), i32 114514, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str.9, i64 0, i64 0))
%13 = tail call i32 (...) @flush()
ret i32 0
}