#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 int /*<<< orphan*/ wchar_t;
typedef int /*<<< orphan*/ mbstate_t;

/* Variables and functions */
int /*<<< orphan*/ mbsrtowcs(int /*<<< orphan*/ *, char const **, size_t,
                             int /*<<< orphan*/ *);
void uninitvar_mbsrtowcs(wchar_t *d, const char **s, size_t m, mbstate_t *p) {
  wchar_t *dest;
  const char *src;
  size_t max;
  mbstate_t *ps;
  (void)mbsrtowcs(dest, s, m, p);
  (void)mbsrtowcs(d, &src, m, p);
  (void)mbsrtowcs(d, s, max, p);
  (void)mbsrtowcs(d, s, m, ps);
  (void)mbsrtowcs(d, s, m, p);
}


x86 assembly (clang, -O0):
<uninitvar_mbsrtowcs>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <mbsrtowcs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    -0x30(%rbp),%rsi
call   1030 <mbsrtowcs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x38(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <mbsrtowcs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x40(%rbp),%rcx
call   1030 <mbsrtowcs@plt>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
call   1030 <mbsrtowcs@plt>
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<uninitvar_mbsrtowcs>:
push   %r15
push   %r14
push   %r12
push   %rbx
push   %rax
mov    %rcx,%r14
mov    %rdx,%r15
mov    %rsi,%r12
mov    %rdi,%rbx
call   1030 <mbsrtowcs@plt>
mov    %rsp,%rsi
mov    %rbx,%rdi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <mbsrtowcs@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r14,%rcx
call   1030 <mbsrtowcs@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1030 <mbsrtowcs@plt>
mov    %rbx,%rdi
mov    %r12,%rsi
mov    %r15,%rdx
mov    %r14,%rcx
call   1030 <mbsrtowcs@plt>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
define void @uninitvar_mbsrtowcs(i32* %0, i8** %1, i64 %2, i32* %3) {
%5 = alloca i32*
%6 = alloca i8**
%7 = alloca i64
%8 = alloca i32*
%9 = alloca i32*
%10 = alloca i8*
%11 = alloca i64
%12 = alloca i32*
store i32* %0, i32** %5
store i8** %1, i8*** %6
store i64 %2, i64* %7
store i32* %3, i32** %8
%13 = load i32*, i32** %9
%14 = load i8**, i8*** %6
%15 = load i64, i64* %7
%16 = load i32*, i32** %8
%17 = call i32 @mbsrtowcs(i32* %13, i8** %14, i64 %15, i32* %16)
%18 = load i32*, i32** %5
%19 = load i64, i64* %7
%20 = load i32*, i32** %8
%21 = call i32 @mbsrtowcs(i32* %18, i8** %10, i64 %19, i32* %20)
%22 = load i32*, i32** %5
%23 = load i8**, i8*** %6
%24 = load i64, i64* %11
%25 = load i32*, i32** %8
%26 = call i32 @mbsrtowcs(i32* %22, i8** %23, i64 %24, i32* %25)
%27 = load i32*, i32** %5
%28 = load i8**, i8*** %6
%29 = load i64, i64* %7
%30 = load i32*, i32** %12
%31 = call i32 @mbsrtowcs(i32* %27, i8** %28, i64 %29, i32* %30)
%32 = load i32*, i32** %5
%33 = load i8**, i8*** %6
%34 = load i64, i64* %7
%35 = load i32*, i32** %8
%36 = call i32 @mbsrtowcs(i32* %32, i8** %33, i64 %34, i32* %35)
ret void
}

LLVM IR (-O2):
define void @uninitvar_mbsrtowcs(i32* %0, i8** %1, i64 %2, i32* %3) {
%5 = alloca i8*
%6 = bitcast i8** %5 to i8*
%7 = tail call i32 @mbsrtowcs(i32* undef, i8** %1, i64 %2, i32* %3)
%8 = call i32 @mbsrtowcs(i32* %0, i8** %5, i64 %2, i32* %3)
%9 = call i32 @mbsrtowcs(i32* %0, i8** %1, i64 undef, i32* %3)
%10 = call i32 @mbsrtowcs(i32* %0, i8** %1, i64 %2, i32* undef)
%11 = call i32 @mbsrtowcs(i32* %0, i8** %1, i64 %2, i32* %3)
ret void
}