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

/* Variables and functions */
int /*<<< orphan*/ LC_CTYPE;
size_t mbsrtowcs(int *, char const **, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ memset(int /*<<< orphan*/ *, char, int);
int /*<<< orphan*/ printf(char *, ...);
int /*<<< orphan*/ putc(char, int /*<<< orphan*/);
char *setlocale(int /*<<< orphan*/, char *);
int /*<<< orphan*/ stdout;
int strcmp(char const *, char *);
int main(void) {
  unsigned char buf[6] = {0x25, 0xe2, 0x82, 0xac, 0xce, 0xbb};
  mbstate_t state;
  const char *src;
  wchar_t wc = 42;
  size_t n;
  int result = 0;
  const char *used_locale;
  setlocale(LC_CTYPE, "de_DE.UTF-8");
  used_locale = setlocale(LC_CTYPE, NULL);
  printf("used locale: \"%s\"\n", used_locale);
  result = strcmp(used_locale, "de_DE.UTF-8");
  memset(&state, '\0', sizeof(state));
  src = (const char *)buf;
  n = mbsrtowcs(&wc, &src, 1, &state);
  printf("mbsrtowcs (&wc, &src, 1, &state)"
         " -> %Zd",
         n);
  printf(", wc = %lu, src = buf+%d", (unsigned long int)wc,
         src - (const char *)buf);
  if (n != (size_t)1 || wc != 37 || src != (const char *)(buf + 1)) {
    printf(", expected %Zd and %lu and buf+%d", 1, (unsigned long int)37,
           (buf + 1) - buf);
    result = 1;
  }
  putc('\n', stdout);
  n = mbsrtowcs(&wc, &src, 1, &state);
  printf("mbsrtowcs (&wc, &src, 1, &state)"
         " -> %Zd",
         n);
  printf(", wc = %lu, src = buf+%d", (unsigned long int)wc,
         src - (const char *)buf);
  if (n != (size_t)1 || wc != 8364 || src != (const char *)(buf + 4)) {
    printf(", expected %Zd and %lu and buf+%d", 1, (unsigned long int)8364,
           (buf + 4) - buf);
    result = 1;
  }
  putc('\n', stdout);
  n = mbsrtowcs(&wc, &src, 1, &state);
  printf("mbsrtowcs (&wc, &src, 1, &state)"
         " -> %Zd",
         n);
  printf(", wc = %lu, src = buf+%d", (unsigned long int)wc,
         src - (const char *)buf);
  if (n != (size_t)1 || wc != 955 || src != (const char *)(buf + 6)) {
    printf(", expected %Zd and %lu and buf+%d", 1, (unsigned long int)955,
           (buf + 6) - buf);
    result = 1;
  }
  putc('\n', stdout);
  return result;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    0xe8b(%rip),%eax
mov    %eax,-0xa(%rbp)
mov    0xe85(%rip),%ax
mov    %ax,-0x6(%rbp)
movl   $0x2a,-0x1c(%rbp)
movl   $0x0,-0x2c(%rbp)
mov    0x2e50(%rip),%rax
mov    (%rax),%edi
lea    0xe65(%rip),%rsi
call   1080 <setlocale@plt>
mov    0x2e3b(%rip),%rax
mov    (%rax),%edi
xor    %eax,%eax
mov    %eax,%esi
call   1080 <setlocale@plt>
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rsi
lea    0xe4b(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
mov    -0x38(%rbp),%rdi
lea    0xe2d(%rip),%rsi
call   1050 <strcmp@plt>
mov    %eax,-0x2c(%rbp)
lea    -0x10(%rbp),%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    -0xa(%rbp),%rax
mov    %rax,-0x18(%rbp)
lea    -0x1c(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
lea    -0x10(%rbp),%rcx
call   1070 <mbsrtowcs@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xe07(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x1c(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0xa(%rbp),%rax
sub    %rax,%rdx
lea    0xe12(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x1,-0x28(%rbp)
jne    126c <main+0x10c>
cmpl   $0x25,-0x1c(%rbp)
jne    126c <main+0x10c>
mov    -0x18(%rbp),%rax
lea    -0xa(%rbp),%rcx
add    $0x1,%rcx
cmp    %rcx,%rax
je     129a <main+0x13a>
lea    -0xa(%rbp),%rcx
add    $0x1,%rcx
lea    -0xa(%rbp),%rax
sub    %rax,%rcx
lea    0xde4(%rip),%rdi
mov    $0x1,%esi
mov    $0x25,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x2c(%rbp)
mov    0x2d37(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1060 <putc@plt>
lea    -0x1c(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
lea    -0x10(%rbp),%rcx
call   1070 <mbsrtowcs@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xd53(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x1c(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0xa(%rbp),%rax
sub    %rax,%rdx
lea    0xd5e(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x1,-0x28(%rbp)
jne    1323 <main+0x1c3>
cmpl   $0x20ac,-0x1c(%rbp)
jne    1323 <main+0x1c3>
mov    -0x18(%rbp),%rax
lea    -0xa(%rbp),%rcx
add    $0x4,%rcx
cmp    %rcx,%rax
je     1351 <main+0x1f1>
lea    -0xa(%rbp),%rcx
add    $0x4,%rcx
lea    -0xa(%rbp),%rax
sub    %rax,%rcx
lea    0xd2d(%rip),%rdi
mov    $0x1,%esi
mov    $0x20ac,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x2c(%rbp)
mov    0x2c80(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1060 <putc@plt>
lea    -0x1c(%rbp),%rdi
lea    -0x18(%rbp),%rsi
mov    $0x1,%edx
lea    -0x10(%rbp),%rcx
call   1070 <mbsrtowcs@plt>
mov    %rax,-0x28(%rbp)
mov    -0x28(%rbp),%rsi
lea    0xc9c(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
movslq -0x1c(%rbp),%rsi
mov    -0x18(%rbp),%rdx
lea    -0xa(%rbp),%rax
sub    %rax,%rdx
lea    0xca7(%rip),%rdi
mov    $0x0,%al
call   1030 <printf@plt>
cmpq   $0x1,-0x28(%rbp)
jne    13da <main+0x27a>
cmpl   $0x3bb,-0x1c(%rbp)
jne    13da <main+0x27a>
mov    -0x18(%rbp),%rax
lea    -0xa(%rbp),%rcx
add    $0x6,%rcx
cmp    %rcx,%rax
je     1408 <main+0x2a8>
lea    -0xa(%rbp),%rcx
add    $0x6,%rcx
lea    -0xa(%rbp),%rax
sub    %rax,%rcx
lea    0xc76(%rip),%rdi
mov    $0x1,%esi
mov    $0x3bb,%edx
mov    $0x0,%al
call   1030 <printf@plt>
movl   $0x1,-0x2c(%rbp)
mov    0x2bc9(%rip),%rax
mov    (%rax),%esi
mov    $0xa,%edi
call   1060 <putc@plt>
mov    -0x2c(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %rbx
sub    $0x28,%rsp
movw   $0xbbce,0x20(%rsp)
movl   $0xac82e225,0x1c(%rsp)
ac
movl   $0x2a,0xc(%rsp)
mov    0x2e60(%rip),%rbx
mov    (%rbx),%edi
lea    0xe75(%rip),%r14
mov    %r14,%rsi
call   1080 <setlocale@plt>
mov    (%rbx),%edi
xor    %esi,%esi
call   1080 <setlocale@plt>
mov    %rax,%rbx
lea    0xe66(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
mov    %rbx,%rdi
mov    %r14,%rsi
call   1050 <strcmp@plt>
mov    %eax,%ebp
lea    0x24(%rsp),%rbx
mov    %rbx,%rdi
xor    %esi,%esi
mov    $0x4,%edx
call   1040 <memset@plt>
lea    0x1c(%rsp),%r14
mov    %r14,0x10(%rsp)
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
mov    $0x1,%edx
mov    %rbx,%rcx
call   1070 <mbsrtowcs@plt>
mov    %rax,%rbx
lea    0xe23(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movslq 0xc(%rsp),%rsi
mov    0x10(%rsp),%rdx
sub    %r14,%rdx
lea    0xe2d(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x1,%rbx
jne    1240 <main+0xe0>
cmpl   $0x25,0xc(%rsp)
jne    1240 <main+0xe0>
lea    0x1d(%rsp),%rax
cmp    %rax,0x10(%rsp)
je     1262 <main+0x102>
lea    0xe1f(%rip),%rdi
mov    $0x25,%edx
mov    $0x1,%ecx
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%ebp
mov    0x2d6f(%rip),%r15
mov    (%r15),%esi
mov    $0xa,%edi
call   1060 <putc@plt>
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x24(%rsp),%rcx
mov    $0x1,%edx
call   1070 <mbsrtowcs@plt>
mov    %rax,%rbx
lea    0xd8c(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movslq 0xc(%rsp),%rsi
mov    0x10(%rsp),%rdx
sub    %r14,%rdx
lea    0xd96(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x1,%rbx
jne    12da <main+0x17a>
cmpl   $0x20ac,0xc(%rsp)
jne    12da <main+0x17a>
lea    0x20(%rsp),%rax
cmp    %rax,0x10(%rsp)
je     12fc <main+0x19c>
lea    0xd85(%rip),%rdi
mov    $0x20ac,%edx
mov    $0x4,%ecx
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%ebp
mov    (%r15),%esi
mov    $0xa,%edi
call   1060 <putc@plt>
lea    0xc(%rsp),%rdi
lea    0x10(%rsp),%rsi
lea    0x24(%rsp),%rcx
mov    $0x1,%edx
call   1070 <mbsrtowcs@plt>
mov    %rax,%rbx
lea    0xcf9(%rip),%rdi
mov    %rax,%rsi
xor    %eax,%eax
call   1030 <printf@plt>
movslq 0xc(%rsp),%rsi
mov    0x10(%rsp),%rdx
sub    %r14,%rdx
lea    0xd03(%rip),%rdi
xor    %eax,%eax
call   1030 <printf@plt>
cmp    $0x1,%rbx
jne    136d <main+0x20d>
cmpl   $0x3bb,0xc(%rsp)
jne    136d <main+0x20d>
lea    0x22(%rsp),%rax
cmp    %rax,0x10(%rsp)
je     138f <main+0x22f>
lea    0xcf2(%rip),%rdi
mov    $0x3bb,%edx
mov    $0x6,%ecx
mov    $0x1,%esi
xor    %eax,%eax
call   1030 <printf@plt>
mov    $0x1,%ebp
mov    (%r15),%esi
mov    $0xa,%edi
call   1060 <putc@plt>
mov    %ebp,%eax
add    $0x28,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@__const.main.buf = [6 x i8] c"%\E2\82\AC\CE\BB"
@LC_CTYPE = global i32 0
@.str = [12 x i8] c"de_DE.UTF-8\00"
@.str.1 = [19 x i8] c"used locale: \22%s\22\0A\00"
@.str.2 = [40 x i8] c"mbsrtowcs (&wc, &src, 1, &state) -> %Zd\00"
@.str.3 = [25 x i8] c", wc = %lu, src = buf+%d\00"
@.str.4 = [34 x i8] c", expected %Zd and %lu and buf+%d\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca i32
%2 = alloca [6 x i8]
%3 = alloca i32
%4 = alloca i8*
%5 = alloca i32
%6 = alloca i64
%7 = alloca i32
%8 = alloca i8*
store i32 0, i32* %1
%9 = bitcast [6 x i8]* %2 to i8*
store i32 42, i32* %5
store i32 0, i32* %7
%10 = load i32, i32* @LC_CTYPE
%11 = call i8* @setlocale(i32 %10, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%12 = load i32, i32* @LC_CTYPE
%13 = call i8* @setlocale(i32 %12, i8* null)
store i8* %13, i8** %8
%14 = load i8*, i8** %8
%15 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %14)
%16 = load i8*, i8** %8
%17 = call i32 @strcmp(i8* %16, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
store i32 %17, i32* %7
%18 = call i32 @memset(i32* %3, i8 signext 0, i32 4)
%19 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
store i8* %19, i8** %4
%20 = call i64 @mbsrtowcs(i32* %5, i8** %4, i32 1, i32* %3)
store i64 %20, i64* %6
%21 = load i64, i64* %6
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i64 %21)
%23 = load i32, i32* %5
%24 = sext i32 %23 to i64
%25 = load i8*, i8** %4
%26 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%27 = ptrtoint i8* %25 to i64
%28 = ptrtoint i8* %26 to i64
%29 = sub i64 %27, %28
%30 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i64 %24, i64 %29)
%31 = load i64, i64* %6
%32 = icmp ne i64 %31, 1
br i1 %32, label %41, label %33
33: ; preds = %0
%34 = load i32, i32* %5
%35 = icmp ne i32 %34, 37
br i1 %35, label %41, label %36
36: ; preds = %33
%37 = load i8*, i8** %4
%38 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%39 = getelementptr inbounds i8, i8* %38, i64 1
%40 = icmp ne i8* %37, %39
br i1 %40, label %41, label %49
41: ; preds = %36, %33, %0
%42 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%43 = getelementptr inbounds i8, i8* %42, i64 1
%44 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%45 = ptrtoint i8* %43 to i64
%46 = ptrtoint i8* %44 to i64
%47 = sub i64 %45, %46
%48 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 1, i64 37, i64 %47)
store i32 1, i32* %7
br label %49
49: ; preds = %41, %36
%50 = load i32, i32* @stdout
%51 = call i32 @putc(i8 signext 10, i32 %50)
%52 = call i64 @mbsrtowcs(i32* %5, i8** %4, i32 1, i32* %3)
store i64 %52, i64* %6
%53 = load i64, i64* %6
%54 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i64 %53)
%55 = load i32, i32* %5
%56 = sext i32 %55 to i64
%57 = load i8*, i8** %4
%58 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%59 = ptrtoint i8* %57 to i64
%60 = ptrtoint i8* %58 to i64
%61 = sub i64 %59, %60
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i64 %56, i64 %61)
%63 = load i64, i64* %6
%64 = icmp ne i64 %63, 1
br i1 %64, label %73, label %65
65: ; preds = %49
%66 = load i32, i32* %5
%67 = icmp ne i32 %66, 8364
br i1 %67, label %73, label %68
68: ; preds = %65
%69 = load i8*, i8** %4
%70 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%71 = getelementptr inbounds i8, i8* %70, i64 4
%72 = icmp ne i8* %69, %71
br i1 %72, label %73, label %81
73: ; preds = %68, %65, %49
%74 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%75 = getelementptr inbounds i8, i8* %74, i64 4
%76 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%77 = ptrtoint i8* %75 to i64
%78 = ptrtoint i8* %76 to i64
%79 = sub i64 %77, %78
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 1, i64 8364, i64 %79)
store i32 1, i32* %7
br label %81
81: ; preds = %73, %68
%82 = load i32, i32* @stdout
%83 = call i32 @putc(i8 signext 10, i32 %82)
%84 = call i64 @mbsrtowcs(i32* %5, i8** %4, i32 1, i32* %3)
store i64 %84, i64* %6
%85 = load i64, i64* %6
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i64 %85)
%87 = load i32, i32* %5
%88 = sext i32 %87 to i64
%89 = load i8*, i8** %4
%90 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%91 = ptrtoint i8* %89 to i64
%92 = ptrtoint i8* %90 to i64
%93 = sub i64 %91, %92
%94 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i64 %88, i64 %93)
%95 = load i64, i64* %6
%96 = icmp ne i64 %95, 1
br i1 %96, label %105, label %97
97: ; preds = %81
%98 = load i32, i32* %5
%99 = icmp ne i32 %98, 955
br i1 %99, label %105, label %100
100: ; preds = %97
%101 = load i8*, i8** %4
%102 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%103 = getelementptr inbounds i8, i8* %102, i64 6
%104 = icmp ne i8* %101, %103
br i1 %104, label %105, label %113
105: ; preds = %100, %97, %81
%106 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%107 = getelementptr inbounds i8, i8* %106, i64 6
%108 = getelementptr inbounds [6 x i8], [6 x i8]* %2, i64 0, i64 0
%109 = ptrtoint i8* %107 to i64
%110 = ptrtoint i8* %108 to i64
%111 = sub i64 %109, %110
%112 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 1, i64 955, i64 %111)
store i32 1, i32* %7
br label %113
113: ; preds = %105, %100
%114 = load i32, i32* @stdout
%115 = call i32 @putc(i8 signext 10, i32 %114)
%116 = load i32, i32* %7
ret i32 %116
}

LLVM IR (-O2):
@__const.main.buf = [6 x i8] c"%\E2\82\AC\CE\BB"
@LC_CTYPE = global i32 0
@.str = [12 x i8] c"de_DE.UTF-8\00"
@.str.1 = [19 x i8] c"used locale: \22%s\22\0A\00"
@.str.2 = [40 x i8] c"mbsrtowcs (&wc, &src, 1, &state) -> %Zd\00"
@.str.3 = [25 x i8] c", wc = %lu, src = buf+%d\00"
@.str.4 = [34 x i8] c", expected %Zd and %lu and buf+%d\00"
@stdout = global i32 0
define i32 @main() {
%1 = alloca [6 x i8]
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 0
%6 = bitcast i32* %2 to i8*
%7 = bitcast i8** %3 to i8*
%8 = bitcast i32* %4 to i8*
store i32 42, i32* %4
%9 = load i32, i32* @LC_CTYPE
%10 = tail call i8* @setlocale(i32 %9, i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%11 = load i32, i32* @LC_CTYPE
%12 = tail call i8* @setlocale(i32 %11, i8* null)
%13 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i8* %12)
%14 = tail call i32 @strcmp(i8* dereferenceable(1) %12, i8* dereferenceable(12) getelementptr inbounds ([12 x i8], [12 x i8]* @.str, i64 0, i64 0))
%15 = call i32 @memset(i32* %2, i8 signext 0, i32 4)
store i8* %5, i8** %3
%16 = call i64 @mbsrtowcs(i32* %4, i8** %3, i32 1, i32* %2)
%17 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i64 %16)
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = load i8*, i8** %3
%21 = ptrtoint i8* %20 to i64
%22 = ptrtoint [6 x i8]* %1 to i64
%23 = sub i64 %21, %22
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i64 %19, i64 %23)
%25 = icmp ne i64 %16, 1
%26 = load i32, i32* %4
%27 = icmp ne i32 %26, 37
%28 = select i1 %25, i1 true, i1 %27
%29 = load i8*, i8** %3
%30 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 1
%31 = icmp ne i8* %29, %30
%32 = select i1 %28, i1 true, i1 %31
br i1 %32, label %33, label %35
33: ; preds = %0
%34 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 1, i64 37, i64 1)
br label %35
35: ; preds = %0, %33
%36 = phi i32 [ 1, %33 ], [ %14, %0 ]
%37 = load i32, i32* @stdout
%38 = call i32 @putc(i8 signext 10, i32 %37)
%39 = call i64 @mbsrtowcs(i32* %4, i8** %3, i32 1, i32* %2)
%40 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i64 %39)
%41 = load i32, i32* %4
%42 = sext i32 %41 to i64
%43 = load i8*, i8** %3
%44 = ptrtoint i8* %43 to i64
%45 = sub i64 %44, %22
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i64 %42, i64 %45)
%47 = icmp ne i64 %39, 1
%48 = load i32, i32* %4
%49 = icmp ne i32 %48, 8364
%50 = select i1 %47, i1 true, i1 %49
%51 = load i8*, i8** %3
%52 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 4
%53 = icmp ne i8* %51, %52
%54 = select i1 %50, i1 true, i1 %53
br i1 %54, label %55, label %57
55: ; preds = %35
%56 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 1, i64 8364, i64 4)
br label %57
57: ; preds = %35, %55
%58 = phi i32 [ 1, %55 ], [ %36, %35 ]
%59 = load i32, i32* @stdout
%60 = call i32 @putc(i8 signext 10, i32 %59)
%61 = call i64 @mbsrtowcs(i32* %4, i8** %3, i32 1, i32* %2)
%62 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([40 x i8], [40 x i8]* @.str.2, i64 0, i64 0), i64 %61)
%63 = load i32, i32* %4
%64 = sext i32 %63 to i64
%65 = load i8*, i8** %3
%66 = ptrtoint i8* %65 to i64
%67 = sub i64 %66, %22
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i64 %64, i64 %67)
%69 = icmp ne i64 %61, 1
%70 = load i32, i32* %4
%71 = icmp ne i32 %70, 955
%72 = select i1 %69, i1 true, i1 %71
%73 = load i8*, i8** %3
%74 = getelementptr inbounds [6 x i8], [6 x i8]* %1, i64 0, i64 6
%75 = icmp ne i8* %73, %74
%76 = select i1 %72, i1 true, i1 %75
br i1 %76, label %77, label %79
77: ; preds = %57
%78 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.4, i64 0, i64 0), i32 1, i64 955, i64 6)
br label %79
79: ; preds = %57, %77
%80 = phi i32 [ 1, %77 ], [ %58, %57 ]
%81 = load i32, i32* @stdout
%82 = call i32 @putc(i8 signext 10, i32 %81)
ret i32 %80
}