void test1(void) {
  int a = 111;
  char b[] = "sss\0";
  unsigned int c = 333;
  char d = 0x4;
  if (1) {
    printf("%s: exit\n", __FUNCTION__);
  }
  printf("%s: enter\n", __FUNCTION__);
  do {
    printf("%s: testName1 = %d,testName02=%s ,$testName03 =%p, $testName4= %u,"
           "lastName = %x\n",
           __FUNCTION__, a, b, &a, c, d);
  } while (0);
  printf("%s: exit\n", __FUNCTION__);
}


x86 assembly (clang, -O0):
<test1>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x6f,-0x4(%rbp)
mov    0xedb(%rip),%eax
mov    %eax,-0x9(%rbp)
mov    0xed6(%rip),%al
mov    %al,-0x5(%rbp)
movl   $0x14d,-0x10(%rbp)
movb   $0x4,-0x11(%rbp)
lea    0xec2(%rip),%rdi
lea    0xec5(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xebd(%rip),%rdi
lea    0xeb0(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x4(%rbp),%edx
lea    -0x9(%rbp),%rcx
mov    -0x10(%rbp),%r9d
movsbl -0x11(%rbp),%eax
lea    0xea4(%rip),%rdi
lea    0xe8c(%rip),%rsi
lea    -0x4(%rbp),%r8
mov    %eax,(%rsp)
mov    $0x0,%al
call   1030 <printf@plt>
lea    0xe6d(%rip),%rdi
lea    0xe70(%rip),%rsi
mov    $0x0,%al
call   1030 <printf@plt>
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test1>:
push   %r14
push   %rbx
sub    $0x18,%rsp
movl   $0x6f,0x14(%rsp)
movb   $0x0,0x10(%rsp)
movl   $0x737373,0xc(%rsp)
lea    0xed2(%rip),%r14
lea    0xed5(%rip),%rbx
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
lea    0xec7(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movl   $0x4,(%rsp)
lea    0xeba(%rip),%rdi
lea    0xc(%rsp),%rcx
lea    0x14(%rsp),%r8
mov    %rbx,%rsi
mov    $0x6f,%edx
mov    $0x14d,%r9d
xor    %eax,%eax
call   1030 <printf@plt>
mov    %r14,%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
add    $0x18,%rsp
pop    %rbx
pop    %r14
ret

LLVM IR (-O0):
@__const.test1.b = [5 x i8] c"sss\00\00"
@.str = [10 x i8] c"%s: exit\0A\00"
@__FUNCTION__.test1 = [6 x i8] c"test1\00"
@.str.1 = [11 x i8] c"%s: enter\0A\00"
@.str.2 = [81 x i8] c"%s: testName1 = %d,testName02=%s ,$testName03 =%p, $testName4= %u,lastName = %x\0A\00"
define void @test1() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = alloca i32
%4 = alloca i8
store i32 111, i32* %1
%5 = bitcast [5 x i8]* %2 to i8*
store i32 333, i32* %3
store i8 4, i8* %4
%6 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test1, i64 0, i64 0))
br label %8
8: ; preds = %0
%9 = load i32, i32* %1
%10 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%11 = load i32, i32* %3
%12 = load i8, i8* %4
%13 = sext i8 %12 to i32
%14 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test1, i64 0, i64 0), i32 %9, i8* %10, i32* %1, i32 %11, i32 %13)
br label %15
15: ; preds = %8
%16 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test1, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.test1.b = [5 x i8] c"sss\00\00"
@.str = [10 x i8] c"%s: exit\0A\00"
@__FUNCTION__.test1 = [6 x i8] c"test1\00"
@.str.1 = [11 x i8] c"%s: enter\0A\00"
@.str.2 = [81 x i8] c"%s: testName1 = %d,testName02=%s ,$testName03 =%p, $testName4= %u,lastName = %x\0A\00"
define void @test1() {
%1 = alloca i32
%2 = alloca [5 x i8]
%3 = bitcast i32* %1 to i8*
store i32 111, i32* %1
%4 = getelementptr inbounds [5 x i8], [5 x i8]* %2, i64 0, i64 0
%5 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test1, i64 0, i64 0))
%6 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([11 x i8], [11 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test1, i64 0, i64 0))
%7 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([81 x i8], [81 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test1, i64 0, i64 0), i32 111, i8* %4, i32* %1, i32 333, i32 4)
%8 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @__FUNCTION__.test1, i64 0, i64 0))
ret void
}