#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 */

/* Variables and functions */
int /*<<< orphan*/ LC_ALL;
int /*<<< orphan*/ WriteWideFormatted(int /*<<< orphan*/, char *, int, ...);
int /*<<< orphan*/ setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stderr;
int main() {
  setlocale(LC_ALL, "");
  WriteWideFormatted(stderr, L"Call with %d variable argument.\n", 1);
  WriteWideFormatted(stderr, L"Call with %d variable %ls.\n", 2, L"arguments");
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x10,%rsp
movl   $0x0,-0x4(%rbp)
mov    0x2ea2(%rip),%rax
mov    (%rax),%edi
lea    0xec1(%rip),%rsi
call   1040 <setlocale@plt>
mov    0x2e95(%rip),%rax
mov    (%rax),%edi
lea    0xeb0(%rip),%rsi
mov    $0x1,%edx
mov    $0x0,%al
call   1030 <WriteWideFormatted@plt>
mov    0x2e79(%rip),%rax
mov    (%rax),%edi
lea    0xf18(%rip),%rsi
mov    $0x2,%edx
lea    0xf7c(%rip),%rcx
mov    $0x0,%al
call   1030 <WriteWideFormatted@plt>
xor    %eax,%eax
add    $0x10,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbx
mov    0x2eb0(%rip),%rax
mov    (%rax),%edi
lea    0xecf(%rip),%rsi
call   1040 <setlocale@plt>
mov    0x2ea3(%rip),%rbx
mov    (%rbx),%edi
lea    0xebe(%rip),%rsi
mov    $0x1,%edx
xor    %eax,%eax
call   1030 <WriteWideFormatted@plt>
mov    (%rbx),%edi
lea    0xf2d(%rip),%rsi
lea    0xf96(%rip),%rcx
mov    $0x2,%edx
xor    %eax,%eax
call   1030 <WriteWideFormatted@plt>
xor    %eax,%eax
pop    %rbx
ret

LLVM IR (-O0):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@stderr = global i32 0
@.str.1 = [33 x i32] [i32 67, i32 97, i32 108, i32 108, i32 32, i32 119, i32 105, i32 116, i32 104, i32 32, i32 37, i32 100, i32 32, i32 118, i32 97, i32 114, i32 105, i32 97, i32 98, i32 108, i32 101, i32 32, i32 97, i32 114, i32 103, i32 117, i32 109, i32 101, i32 110, i32 116, i32 46, i32 10, i32 0]
@.str.2 = [28 x i32] [i32 67, i32 97, i32 108, i32 108, i32 32, i32 119, i32 105, i32 116, i32 104, i32 32, i32 37, i32 100, i32 32, i32 118, i32 97, i32 114, i32 105, i32 97, i32 98, i32 108, i32 101, i32 32, i32 37, i32 108, i32 115, i32 46, i32 10, i32 0]
@.str.3 = [10 x i32] [i32 97, i32 114, i32 103, i32 117, i32 109, i32 101, i32 110, i32 116, i32 115, i32 0]
define i32 @main() {
%1 = alloca i32
store i32 0, i32* %1
%2 = load i32, i32* @LC_ALL
%3 = call i32 @setlocale(i32 %2, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%4 = load i32, i32* @stderr
%5 = call i32 (i32, i8*, i32, ...) @WriteWideFormatted(i32 %4, i8* bitcast ([33 x i32]* @.str.1 to i8*), i32 1)
%6 = load i32, i32* @stderr
%7 = call i32 (i32, i8*, i32, ...) @WriteWideFormatted(i32 %6, i8* bitcast ([28 x i32]* @.str.2 to i8*), i32 2, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @.str.3, i64 0, i64 0))
ret i32 0
}

LLVM IR (-O2):
@LC_ALL = global i32 0
@.str = [1 x i8] zeroinitializer
@stderr = global i32 0
@.str.1 = [33 x i32] [i32 67, i32 97, i32 108, i32 108, i32 32, i32 119, i32 105, i32 116, i32 104, i32 32, i32 37, i32 100, i32 32, i32 118, i32 97, i32 114, i32 105, i32 97, i32 98, i32 108, i32 101, i32 32, i32 97, i32 114, i32 103, i32 117, i32 109, i32 101, i32 110, i32 116, i32 46, i32 10, i32 0]
@.str.2 = [28 x i32] [i32 67, i32 97, i32 108, i32 108, i32 32, i32 119, i32 105, i32 116, i32 104, i32 32, i32 37, i32 100, i32 32, i32 118, i32 97, i32 114, i32 105, i32 97, i32 98, i32 108, i32 101, i32 32, i32 37, i32 108, i32 115, i32 46, i32 10, i32 0]
@.str.3 = [10 x i32] [i32 97, i32 114, i32 103, i32 117, i32 109, i32 101, i32 110, i32 116, i32 115, i32 0]
define i32 @main() {
%1 = load i32, i32* @LC_ALL
%2 = tail call i32 @setlocale(i32 %1, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str, i64 0, i64 0))
%3 = load i32, i32* @stderr
%4 = tail call i32 (i32, i8*, i32, ...) @WriteWideFormatted(i32 %3, i8* bitcast ([33 x i32]* @.str.1 to i8*), i32 1)
%5 = load i32, i32* @stderr
%6 = tail call i32 (i32, i8*, i32, ...) @WriteWideFormatted(i32 %5, i8* bitcast ([28 x i32]* @.str.2 to i8*), i32 2, i32* getelementptr inbounds ([10 x i32], [10 x i32]* @.str.3, i64 0, i64 0))
ret i32 0
}