#define NULL ((void *)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t;
typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1

/* Forward declarations */

/* Type definitions */
typedef char wchar_t;

/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ wprintf(char *, ...);
int main(void) {
  setlocale(LC_ALL, "zh_CN.UTF-8");
  char ch = 'h', *string = "computer";
  wchar_t wch = L'位', *wstring = L"8位变长万国码格式";
  int count = -9234;
  double fp = 251.7366;
  wprintf(L"Integer formats:\n"
          L"   Decimal: %d  Justified: %.6d  "
          L"Unsigned: %u\n",
          count, count, count);
  wprintf(L"Decimal %d as:\n   Hex: %Xh  "
          L"C hex: 0x%x  Octal: %o\n",
          count, count, count, count);
  wprintf(L"Digits 10 equal:\n   Hex: %i  "
          L"Octal: %i  Decimal: %i\n",
          0x10, 010, 10);
  wprintf(L"Characters:\n"
          L"%10c%5hc%5C%5lc\n",
          ch, ch, wch, wch);
  wprintf(L"Strings:\n%25s\n"
          L"%25.4hs\n   %S%25.3ls\n",
          string, string, wstring, wstring);
  wprintf(L"Real numbers:\n   %f %.2f %e %E\n", fp, fp, fp, fp);
  wprintf(L"\nAddress as:   %p\n", &count);
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x30,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2eaa(%rip),%rax
mov    (%rax),%edi
lea    0xec9(%rip),%rsi
call   1040 <setlocale@plt>
movb   $0x68,-0x5(%rbp)
lea    0xec5(%rip),%rax
mov    %rax,-0x10(%rbp)
movb   $0x4d,-0x11(%rbp)
lea    0xec2(%rip),%rax
mov    %rax,-0x20(%rbp)
movl   $0xffffdbee,-0x24(%rbp)
movsd  0xe8f(%rip),%xmm0
movsd  %xmm0,-0x30(%rbp)
mov    -0x24(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x24(%rbp),%ecx
lea    0xec2(%rip),%rdi
mov    $0x0,%al
call   1030 <wprintf@plt>
mov    -0x24(%rbp),%esi
mov    -0x24(%rbp),%edx
mov    -0x24(%rbp),%ecx
mov    -0x24(%rbp),%r8d
lea    0xfa7(%rip),%rdi
mov    $0x0,%al
call   1030 <wprintf@plt>
lea    0x1069(%rip),%rdi
mov    $0x10,%esi
mov    $0x8,%edx
mov    $0xa,%ecx
mov    $0x0,%al
call   1030 <wprintf@plt>
movsbl -0x5(%rbp),%esi
movsbl -0x5(%rbp),%edx
movsbl -0x11(%rbp),%ecx
movsbl -0x11(%rbp),%r8d
lea    0x110f(%rip),%rdi
mov    $0x0,%al
call   1030 <wprintf@plt>
mov    -0x10(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
mov    -0x20(%rbp),%r8
lea    0x1165(%rip),%rdi
mov    $0x0,%al
call   1030 <wprintf@plt>
movsd  -0x30(%rbp),%xmm0
movsd  -0x30(%rbp),%xmm1
movsd  -0x30(%rbp),%xmm2
movsd  -0x30(%rbp),%xmm3
lea    0x11d3(%rip),%rdi
mov    $0x4,%al
call   1030 <wprintf@plt>
lea    0x1245(%rip),%rdi
lea    -0x24(%rbp),%rsi
mov    $0x0,%al
call   1030 <wprintf@plt>
xor    %eax,%eax
add    $0x30,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rax
mov    0x2eb8(%rip),%rax
mov    (%rax),%edi
lea    0xed7(%rip),%rsi
call   1040 <setlocale@plt>
movl   $0xffffdbee,0x4(%rsp)
ff
lea    0xf03(%rip),%rdi
mov    $0xffffdbee,%esi
mov    $0xffffdbee,%edx
mov    $0xffffdbee,%ecx
xor    %eax,%eax
call   1030 <wprintf@plt>
lea    0xfe6(%rip),%rdi
mov    $0xffffdbee,%esi
mov    $0xffffdbee,%edx
mov    $0xffffdbee,%ecx
mov    $0xffffdbee,%r8d
xor    %eax,%eax
call   1030 <wprintf@plt>
lea    0x1093(%rip),%rdi
mov    $0x10,%esi
mov    $0x8,%edx
mov    $0xa,%ecx
xor    %eax,%eax
call   1030 <wprintf@plt>
lea    0x114a(%rip),%rdi
mov    $0x68,%esi
mov    $0x68,%edx
mov    $0x4d,%ecx
mov    $0x4d,%r8d
xor    %eax,%eax
call   1030 <wprintf@plt>
lea    0x119b(%rip),%rdi
lea    0xe48(%rip),%rdx
lea    0xe4d(%rip),%rcx
mov    %rdx,%rsi
mov    %rcx,%r8
xor    %eax,%eax
call   1030 <wprintf@plt>
lea    0x1209(%rip),%rdi
movsd  0xe11(%rip),%xmm0
movaps %xmm0,%xmm1
movaps %xmm0,%xmm2
movaps %xmm0,%xmm3
mov    $0x4,%al
call   1030 <wprintf@plt>
lea    0x126a(%rip),%rdi
lea    0x4(%rsp),%rsi
xor    %eax,%eax
call   1030 <wprintf@plt>
xor    %eax,%eax
pop    %rcx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [12 x i8] c"zh_CN.UTF-8\00"
@.str.1 = [9 x i8] c"computer\00"
@.str.2 = [10 x i32] [i32 56, i32 20301, i32 21464, i32 38271, i32 19975, i32 22269, i32 30721, i32 26684, i32 24335, i32 0]
@.str.3 = [64 x i32] [i32 73, i32 110, i32 116, i32 101, i32 103, i32 101, i32 114, i32 32, i32 102, i32 111, i32 114, i32 109, i32 97, i32 116, i32 115, i32 58, i32 10, i32 32, i32 32, i32 32, i32 68, i32 101, i32 99, i32 105, i32 109, i32 97, i32 108, i32 58, i32 32, i32 37, i32 100, i32 32, i32 32, i32 74, i32 117, i32 115, i32 116, i32 105, i32 102, i32 105, i32 101, i32 100, i32 58, i32 32, i32 37, i32 46, i32 54, i32 100, i32 32, i32 32, i32 85, i32 110, i32 115, i32 105, i32 103, i32 110, i32 101, i32 100, i32 58, i32 32, i32 37, i32 117, i32 10, i32 0]
@.str.4 = [52 x i32] [i32 68, i32 101, i32 99, i32 105, i32 109, i32 97, i32 108, i32 32, i32 37, i32 100, i32 32, i32 97, i32 115, i32 58, i32 10, i32 32, i32 32, i32 32, i32 72, i32 101, i32 120, i32 58, i32 32, i32 37, i32 88, i32 104, i32 32, i32 32, i32 67, i32 32, i32 104, i32 101, i32 120, i32 58, i32 32, i32 48, i32 120, i32 37, i32 120, i32 32, i32 32, i32 79, i32 99, i32 116, i32 97, i32 108, i32 58, i32 32, i32 37, i32 111, i32 10, i32 0]
@.str.5 = [53 x i32] [i32 68, i32 105, i32 103, i32 105, i32 116, i32 115, i32 32, i32 49, i32 48, i32 32, i32 101, i32 113, i32 117, i32 97, i32 108, i32 58, i32 10, i32 32, i32 32, i32 32, i32 72, i32 101, i32 120, i32 58, i32 32, i32 37, i32 105, i32 32, i32 32, i32 79, i32 99, i32 116, i32 97, i32 108, i32 58, i32 32, i32 37, i32 105, i32 32, i32 32, i32 68, i32 101, i32 99, i32 105, i32 109, i32 97, i32 108, i32 58, i32 32, i32 37, i32 105, i32 10, i32 0]
@.str.6 = [29 x i32] [i32 67, i32 104, i32 97, i32 114, i32 97, i32 99, i32 116, i32 101, i32 114, i32 115, i32 58, i32 10, i32 37, i32 49, i32 48, i32 99, i32 37, i32 53, i32 104, i32 99, i32 37, i32 53, i32 67, i32 37, i32 53, i32 108, i32 99, i32 10, i32 0]
@.str.7 = [36 x i32] [i32 83, i32 116, i32 114, i32 105, i32 110, i32 103, i32 115, i32 58, i32 10, i32 37, i32 50, i32 53, i32 115, i32 10, i32 37, i32 50, i32 53, i32 46, i32 52, i32 104, i32 115, i32 10, i32 32, i32 32, i32 32, i32 37, i32 83, i32 37, i32 50, i32 53, i32 46, i32 51, i32 108, i32 115, i32 10, i32 0]
@.str.8 = [32 x i32] [i32 82, i32 101, i32 97, i32 108, i32 32, i32 110, i32 117, i32 109, i32 98, i32 101, i32 114, i32 115, i32 58, i32 10, i32 32, i32 32, i32 32, i32 37, i32 102, i32 32, i32 37, i32 46, i32 50, i32 102, i32 32, i32 37, i32 101, i32 32, i32 37, i32 69, i32 10, i32 0]
@.str.9 = [19 x i32] [i32 10, i32 65, i32 100, i32 100, i32 114, i32 101, i32 115, i32 115, i32 32, i32 97, i32 115, i32 58, i32 32, i32 32, i32 32, i32 37, i32 112, i32 10, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = alloca i8
%3 = alloca i8*
%4 = alloca i8
%5 = alloca i8*
%6 = alloca i32
%7 = alloca double
store i32 0, i32* %1
%8 = load i32, i32* @LC_ALL
%9 = call i32 @setlocale(i32 %8, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i8 104, i8* %2
store i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8** %3
store i8 77, i8* %4
store i8* bitcast ([10 x i32]* @.str.2 to i8*), i8** %5
store i32 -9234, i32* %6
store double 0x406F77923A29C77A, double* %7
%10 = load i32, i32* %6
%11 = load i32, i32* %6
%12 = load i32, i32* %6
%13 = call i32 (i8*, ...) @wprintf(i8* bitcast ([64 x i32]* @.str.3 to i8*), i32 %10, i32 %11, i32 %12)
%14 = load i32, i32* %6
%15 = load i32, i32* %6
%16 = load i32, i32* %6
%17 = load i32, i32* %6
%18 = call i32 (i8*, ...) @wprintf(i8* bitcast ([52 x i32]* @.str.4 to i8*), i32 %14, i32 %15, i32 %16, i32 %17)
%19 = call i32 (i8*, ...) @wprintf(i8* bitcast ([53 x i32]* @.str.5 to i8*), i32 16, i32 8, i32 10)
%20 = load i8, i8* %2
%21 = sext i8 %20 to i32
%22 = load i8, i8* %2
%23 = sext i8 %22 to i32
%24 = load i8, i8* %4
%25 = sext i8 %24 to i32
%26 = load i8, i8* %4
%27 = sext i8 %26 to i32
%28 = call i32 (i8*, ...) @wprintf(i8* bitcast ([29 x i32]* @.str.6 to i8*), i32 %21, i32 %23, i32 %25, i32 %27)
%29 = load i8*, i8** %3
%30 = load i8*, i8** %3
%31 = load i8*, i8** %5
%32 = load i8*, i8** %5
%33 = call i32 (i8*, ...) @wprintf(i8* bitcast ([36 x i32]* @.str.7 to i8*), i8* %29, i8* %30, i8* %31, i8* %32)
%34 = load double, double* %7
%35 = load double, double* %7
%36 = load double, double* %7
%37 = load double, double* %7
%38 = call i32 (i8*, ...) @wprintf(i8* bitcast ([32 x i32]* @.str.8 to i8*), double %34, double %35, double %36, double %37)
%39 = call i32 (i8*, ...) @wprintf(i8* bitcast ([19 x i32]* @.str.9 to i8*), i32* %6)
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [12 x i8] c"zh_CN.UTF-8\00"
@.str.1 = [9 x i8] c"computer\00"
@.str.2 = [10 x i32] [i32 56, i32 20301, i32 21464, i32 38271, i32 19975, i32 22269, i32 30721, i32 26684, i32 24335, i32 0]
@.str.3 = [64 x i32] [i32 73, i32 110, i32 116, i32 101, i32 103, i32 101, i32 114, i32 32, i32 102, i32 111, i32 114, i32 109, i32 97, i32 116, i32 115, i32 58, i32 10, i32 32, i32 32, i32 32, i32 68, i32 101, i32 99, i32 105, i32 109, i32 97, i32 108, i32 58, i32 32, i32 37, i32 100, i32 32, i32 32, i32 74, i32 117, i32 115, i32 116, i32 105, i32 102, i32 105, i32 101, i32 100, i32 58, i32 32, i32 37, i32 46, i32 54, i32 100, i32 32, i32 32, i32 85, i32 110, i32 115, i32 105, i32 103, i32 110, i32 101, i32 100, i32 58, i32 32, i32 37, i32 117, i32 10, i32 0]
@.str.4 = [52 x i32] [i32 68, i32 101, i32 99, i32 105, i32 109, i32 97, i32 108, i32 32, i32 37, i32 100, i32 32, i32 97, i32 115, i32 58, i32 10, i32 32, i32 32, i32 32, i32 72, i32 101, i32 120, i32 58, i32 32, i32 37, i32 88, i32 104, i32 32, i32 32, i32 67, i32 32, i32 104, i32 101, i32 120, i32 58, i32 32, i32 48, i32 120, i32 37, i32 120, i32 32, i32 32, i32 79, i32 99, i32 116, i32 97, i32 108, i32 58, i32 32, i32 37, i32 111, i32 10, i32 0]
@.str.5 = [53 x i32] [i32 68, i32 105, i32 103, i32 105, i32 116, i32 115, i32 32, i32 49, i32 48, i32 32, i32 101, i32 113, i32 117, i32 97, i32 108, i32 58, i32 10, i32 32, i32 32, i32 32, i32 72, i32 101, i32 120, i32 58, i32 32, i32 37, i32 105, i32 32, i32 32, i32 79, i32 99, i32 116, i32 97, i32 108, i32 58, i32 32, i32 37, i32 105, i32 32, i32 32, i32 68, i32 101, i32 99, i32 105, i32 109, i32 97, i32 108, i32 58, i32 32, i32 37, i32 105, i32 10, i32 0]
@.str.6 = [29 x i32] [i32 67, i32 104, i32 97, i32 114, i32 97, i32 99, i32 116, i32 101, i32 114, i32 115, i32 58, i32 10, i32 37, i32 49, i32 48, i32 99, i32 37, i32 53, i32 104, i32 99, i32 37, i32 53, i32 67, i32 37, i32 53, i32 108, i32 99, i32 10, i32 0]
@.str.7 = [36 x i32] [i32 83, i32 116, i32 114, i32 105, i32 110, i32 103, i32 115, i32 58, i32 10, i32 37, i32 50, i32 53, i32 115, i32 10, i32 37, i32 50, i32 53, i32 46, i32 52, i32 104, i32 115, i32 10, i32 32, i32 32, i32 32, i32 37, i32 83, i32 37, i32 50, i32 53, i32 46, i32 51, i32 108, i32 115, i32 10, i32 0]
@.str.8 = [32 x i32] [i32 82, i32 101, i32 97, i32 108, i32 32, i32 110, i32 117, i32 109, i32 98, i32 101, i32 114, i32 115, i32 58, i32 10, i32 32, i32 32, i32 32, i32 37, i32 102, i32 32, i32 37, i32 46, i32 50, i32 102, i32 32, i32 37, i32 101, i32 32, i32 37, i32 69, i32 10, i32 0]
@.str.9 = [19 x i32] [i32 10, i32 65, i32 100, i32 100, i32 114, i32 101, i32 115, i32 115, i32 32, i32 97, i32 115, i32 58, i32 32, i32 32, i32 32, i32 37, i32 112, i32 10, i32 0]
define i32 @main() {
%1 = alloca i32
%2 = load i32, i32* @LC_ALL
%3 = tail call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%4 = bitcast i32* %1 to i8*
store i32 -9234, i32* %1
%5 = tail call i32 (i8*, ...) @wprintf(i8* bitcast ([64 x i32]* @.str.3 to i8*), i32 -9234, i32 -9234, i32 -9234)
%6 = tail call i32 (i8*, ...) @wprintf(i8* bitcast ([52 x i32]* @.str.4 to i8*), i32 -9234, i32 -9234, i32 -9234, i32 -9234)
%7 = tail call i32 (i8*, ...) @wprintf(i8* bitcast ([53 x i32]* @.str.5 to i8*), i32 16, i32 8, i32 10)
%8 = tail call i32 (i8*, ...) @wprintf(i8* bitcast ([29 x i32]* @.str.6 to i8*), i32 104, i32 104, i32 77, i32 77)
%9 = tail call i32 (i8*, ...) @wprintf(i8* bitcast ([36 x i32]* @.str.7 to i8*), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.1, i64 0, i64 0), i8* bitcast ([10 x i32]* @.str.2 to i8*), i8* bitcast ([10 x i32]* @.str.2 to i8*))
%10 = tail call i32 (i8*, ...) @wprintf(i8* bitcast ([32 x i32]* @.str.8 to i8*), double 0x406F77923A29C77A, double 0x406F77923A29C77A, double 0x406F77923A29C77A, double 0x406F77923A29C77A)
%11 = call i32 (i8*, ...) @wprintf(i8* bitcast ([19 x i32]* @.str.9 to i8*), i32* %1)
ret i32 0
}