#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*/ assert(int);
int charset_convert(char *, char *, char const *, size_t, char **, size_t *);
int /*<<< orphan*/ memcmp(char *, char *, size_t);
int /*<<< orphan*/ strcmp(char const *, char *);
void test_convert() {
  const char *p;
  char *q, *r;
  char s[256];
  size_t n, n2;
  int i;
  p = "\000x\302\200\375\277\277\277\277\277";
  assert(charset_convert("UTF-8", "UTF-8", p, 10, &q, &n) == 0 && n == 10 &&
         !strcmp(p, q));
  assert(charset_convert("UTF-8", "UTF-8", "x\301\277y", 4, &q, &n) == 2 &&
         n == 4 && !strcmp(q, "x##y"));
  assert(charset_convert("UTF-8", "UTF-8", "x\301\277y", 4, 0, &n) == 2 &&
         n == 4);
  assert(charset_convert("UTF-8", "UTF-8", "x\301\277y", 4, &q, 0) == 2 &&
         !strcmp(q, "x##y"));
  assert(charset_convert("UTF-8", "iso-8859-1", "\302\200\304\200x", 5, &q,
                         &n) == 1 &&
         n == 3 && !strcmp(q, "\200?x"));
  assert(charset_convert("iso-8859-1", "UTF-8", "\000\200\377", 3, &q, &n) ==
             0 &&
         n == 5 && !memcmp(q, "\000\302\200\303\277", 5));
  assert(charset_convert("iso-8859-1", "iso-8859-1", "\000\200\377", 3, &q,
                         &n) == 0 &&
         n == 3 && !memcmp(q, "\000\200\377", 3));
  assert(charset_convert("iso-8859-2", "utf-8", "\300", 1, &q, &n) == 0 &&
         n == 2 && !strcmp(q, "\305\224"));
  assert(charset_convert("utf-8", "iso-8859-2", "\305\224", 2, &q, &n) == 0 &&
         n == 1 && !strcmp(q, "\300"));
  for (i = 0; i < 256; i++)
    s[i] = i;
  assert(charset_convert("iso-8859-2", "utf-8", s, 256, &q, &n) == 0);
  assert(charset_convert("utf-8", "iso-8859-2", q, n, &r, &n2) == 0);
  assert(n2 == 256 && !memcmp(r, s, n2));
}


x86 assembly (clang, -O0):
<test_convert>:
push   %rbp
mov    %rsp,%rbp
sub    $0x140,%rsp
lea    0xeae(%rip),%rax
mov    %rax,-0x8(%rbp)
mov    -0x8(%rbp),%rdx
lea    0xeb0(%rip),%rsi
mov    $0xa,%ecx
lea    -0x10(%rbp),%r8
lea    -0x128(%rbp),%r9
mov    %rsi,%rdi
call   1060 <charset_convert@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x135(%rbp)
jne    11bd <test_convert+0x7d>
xor    %eax,%eax
cmpq   $0xa,-0x128(%rbp)
0a
mov    %al,-0x135(%rbp)
jne    11bd <test_convert+0x7d>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x135(%rbp)
mov    -0x135(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xe3d(%rip),%rsi
lea    0xe3c(%rip),%rdx
mov    $0x4,%ecx
lea    -0x10(%rbp),%r8
lea    -0x128(%rbp),%r9
mov    %rsi,%rdi
call   1060 <charset_convert@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
mov    %al,-0x136(%rbp)
jne    123a <test_convert+0xfa>
xor    %eax,%eax
cmpq   $0x4,-0x128(%rbp)
04
mov    %al,-0x136(%rbp)
jne    123a <test_convert+0xfa>
mov    -0x10(%rbp),%rdi
lea    0xdf5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x136(%rbp)
mov    -0x136(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xdc0(%rip),%rsi
lea    0xdbf(%rip),%rdx
mov    $0x4,%ecx
xor    %eax,%eax
mov    %eax,%r8d
lea    -0x128(%rbp),%r9
mov    %rsi,%rdi
call   1060 <charset_convert@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
mov    %al,-0x137(%rbp)
jne    1295 <test_convert+0x155>
cmpq   $0x4,-0x128(%rbp)
04
sete   %al
mov    %al,-0x137(%rbp)
mov    -0x137(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xd65(%rip),%rsi
lea    0xd64(%rip),%rdx
mov    $0x4,%ecx
lea    -0x10(%rbp),%r8
xor    %eax,%eax
mov    %eax,%r9d
mov    %rsi,%rdi
call   1060 <charset_convert@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x2,%ecx
mov    %al,-0x138(%rbp)
jne    12fa <test_convert+0x1ba>
mov    -0x10(%rbp),%rdi
lea    0xd35(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x138(%rbp)
mov    -0x138(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xd00(%rip),%rdi
lea    0xd09(%rip),%rsi
lea    0xd0d(%rip),%rdx
mov    $0x5,%ecx
lea    -0x10(%rbp),%r8
lea    -0x128(%rbp),%r9
call   1060 <charset_convert@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x1,%ecx
mov    %al,-0x139(%rbp)
jne    137b <test_convert+0x23b>
xor    %eax,%eax
cmpq   $0x3,-0x128(%rbp)
03
mov    %al,-0x139(%rbp)
jne    137b <test_convert+0x23b>
mov    -0x10(%rbp),%rdi
lea    0xcca(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x139(%rbp)
mov    -0x139(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xc8f(%rip),%rdi
lea    0xc78(%rip),%rsi
lea    0xcac(%rip),%rdx
mov    $0x3,%ecx
lea    -0x10(%rbp),%r8
lea    -0x128(%rbp),%r9
call   1060 <charset_convert@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x13a(%rbp)
jne    1401 <test_convert+0x2c1>
xor    %eax,%eax
cmpq   $0x5,-0x128(%rbp)
05
mov    %al,-0x13a(%rbp)
jne    1401 <test_convert+0x2c1>
mov    -0x10(%rbp),%rdi
lea    0xc22(%rip),%rsi
mov    $0x5,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x13a(%rbp)
mov    -0x13a(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xc09(%rip),%rsi
lea    0xc2d(%rip),%rdx
mov    $0x3,%ecx
lea    -0x10(%rbp),%r8
lea    -0x128(%rbp),%r9
mov    %rsi,%rdi
call   1060 <charset_convert@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x13b(%rbp)
jne    1483 <test_convert+0x343>
xor    %eax,%eax
cmpq   $0x3,-0x128(%rbp)
03
mov    %al,-0x13b(%rbp)
jne    1483 <test_convert+0x343>
mov    -0x10(%rbp),%rdi
lea    0xbe1(%rip),%rsi
mov    $0x3,%edx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x13b(%rbp)
mov    -0x13b(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xb9c(%rip),%rdi
lea    0xba0(%rip),%rsi
lea    0xb9f(%rip),%rdx
mov    $0x1,%ecx
lea    -0x10(%rbp),%r8
lea    -0x128(%rbp),%r9
call   1060 <charset_convert@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x13c(%rbp)
jne    1504 <test_convert+0x3c4>
xor    %eax,%eax
cmpq   $0x2,-0x128(%rbp)
02
mov    %al,-0x13c(%rbp)
jne    1504 <test_convert+0x3c4>
mov    -0x10(%rbp),%rdi
lea    0xb58(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x13c(%rbp)
mov    -0x13c(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
lea    0xb26(%rip),%rdi
lea    0xb14(%rip),%rsi
lea    0xb20(%rip),%rdx
mov    $0x2,%ecx
lea    -0x10(%rbp),%r8
lea    -0x128(%rbp),%r9
call   1060 <charset_convert@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x13d(%rbp)
jne    1585 <test_convert+0x445>
xor    %eax,%eax
cmpq   $0x1,-0x128(%rbp)
01
mov    %al,-0x13d(%rbp)
jne    1585 <test_convert+0x445>
mov    -0x10(%rbp),%rdi
lea    0xad5(%rip),%rsi
call   1040 <strcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x13d(%rbp)
mov    -0x13d(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
movl   $0x0,-0x134(%rbp)
cmpl   $0x100,-0x134(%rbp)
jge    15d9 <test_convert+0x499>
mov    -0x134(%rbp),%eax
mov    %al,%cl
movslq -0x134(%rbp),%rax
mov    %cl,-0x120(%rbp,%rax,1)
mov    -0x134(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x134(%rbp)
jmp    159f <test_convert+0x45f>
lea    -0x120(%rbp),%rdx
lea    0xa4f(%rip),%rdi
lea    0xa53(%rip),%rsi
mov    $0x100,%ecx
lea    -0x10(%rbp),%r8
lea    -0x128(%rbp),%r9
call   1060 <charset_convert@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
mov    -0x10(%rbp),%rdx
mov    -0x128(%rbp),%rcx
lea    0xa1c(%rip),%rdi
lea    0xa0a(%rip),%rsi
lea    -0x18(%rbp),%r8
lea    -0x130(%rbp),%r9
call   1060 <charset_convert@plt>
cmp    $0x0,%eax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
xor    %eax,%eax
cmpq   $0x100,-0x130(%rbp)
mov    %al,-0x13e(%rbp)
jne    168a <test_convert+0x54a>
mov    -0x18(%rbp),%rdi
lea    -0x120(%rbp),%rsi
mov    -0x130(%rbp),%rdx
call   1030 <memcmp@plt>
cmp    $0x0,%eax
setne  %al
xor    $0xff,%al
mov    %al,-0x13e(%rbp)
mov    -0x13e(%rbp),%al
and    $0x1,%al
movzbl %al,%edi
call   1050 <assert@plt>
add    $0x140,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_convert>:
push   %r15
push   %r14
push   %rbx
sub    $0x120,%rsp
lea    0xfbe(%rip),%rdi
lea    0xfa6(%rip),%rdx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
mov    $0xa,%ecx
mov    %rdi,%rsi
call   1060 <charset_convert@plt>
xor    %ebx,%ebx
mov    $0x0,%edi
test   %eax,%eax
jne    1194 <test_convert+0x54>
cmpq   $0xa,(%rsp)
mov    $0x0,%edi
jne    1194 <test_convert+0x54>
mov    0x8(%rsp),%rax
xor    %edi,%edi
cmpb   $0x0,(%rax)
sete   %dil
call   1040 <assert@plt>
lea    0xf71(%rip),%rdi
lea    0xf70(%rip),%rdx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
mov    $0x4,%ecx
mov    %rdi,%rsi
call   1060 <charset_convert@plt>
cmp    $0x2,%eax
jne    11e0 <test_convert+0xa0>
cmpq   $0x4,(%rsp)
jne    11e0 <test_convert+0xa0>
mov    0x8(%rsp),%rdi
lea    0xf48(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%edi
call   1040 <assert@plt>
lea    0xf23(%rip),%rbx
lea    0xf22(%rip),%r15
xor    %r14d,%r14d
mov    %rsp,%r9
mov    $0x4,%ecx
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
xor    %r8d,%r8d
call   1060 <charset_convert@plt>
cmp    $0x2,%eax
sete   %al
cmpq   $0x4,(%rsp)
sete   %cl
and    %al,%cl
movzbl %cl,%edi
call   1040 <assert@plt>
lea    0x8(%rsp),%r8
mov    $0x4,%ecx
mov    %rbx,%rdi
mov    %rbx,%rsi
mov    %r15,%rdx
xor    %r9d,%r9d
call   1060 <charset_convert@plt>
mov    $0x0,%edi
cmp    $0x2,%eax
jne    1267 <test_convert+0x127>
mov    0x8(%rsp),%rdi
lea    0xec2(%rip),%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xe9e(%rip),%rdi
lea    0xea7(%rip),%rsi
lea    0xeab(%rip),%rdx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
mov    $0x5,%ecx
call   1060 <charset_convert@plt>
cmp    $0x1,%eax
jne    12b9 <test_convert+0x179>
cmpq   $0x3,(%rsp)
jne    12b9 <test_convert+0x179>
mov    0x8(%rsp),%rdi
lea    0xe87(%rip),%rsi
call   1030 <strcmp@plt>
xor    %r14d,%r14d
test   %eax,%eax
sete   %r14b
mov    %r14d,%edi
call   1040 <assert@plt>
lea    0xe59(%rip),%rdi
lea    0xe42(%rip),%rsi
lea    0xe76(%rip),%rdx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
mov    $0x3,%ecx
call   1060 <charset_convert@plt>
xor    %ebx,%ebx
mov    $0x0,%edi
test   %eax,%eax
jne    131c <test_convert+0x1dc>
cmpq   $0x5,(%rsp)
mov    $0x0,%edi
jne    131c <test_convert+0x1dc>
mov    0x8(%rsp),%rax
mov    $0xc380c200,%ecx
xor    (%rax),%ecx
movzbl 0x4(%rax),%eax
xor    $0xbf,%eax
xor    %edi,%edi
or     %ecx,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xdf9(%rip),%rdi
lea    0xe1d(%rip),%rdx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
mov    $0x3,%ecx
mov    %rdi,%rsi
call   1060 <charset_convert@plt>
test   %eax,%eax
jne    136e <test_convert+0x22e>
cmpq   $0x3,(%rsp)
jne    136e <test_convert+0x22e>
mov    0x8(%rsp),%rax
movzwl (%rax),%ecx
xor    $0x8000,%ecx
movzbl 0x2(%rax),%eax
xor    $0xff,%eax
xor    %ebx,%ebx
or     %cx,%ax
sete   %bl
mov    %ebx,%edi
call   1040 <assert@plt>
lea    0xdba(%rip),%rdi
lea    0xdbe(%rip),%rsi
lea    0xdbd(%rip),%rdx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
mov    $0x1,%ecx
call   1060 <charset_convert@plt>
xor    %ebx,%ebx
mov    $0x0,%edi
test   %eax,%eax
jne    13cc <test_convert+0x28c>
cmpq   $0x2,(%rsp)
mov    $0x0,%edi
jne    13cc <test_convert+0x28c>
mov    0x8(%rsp),%rdi
lea    0xd8a(%rip),%rsi
call   1030 <strcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
lea    0xd69(%rip),%rdi
lea    0xd57(%rip),%rsi
lea    0xd63(%rip),%rdx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
mov    $0x2,%ecx
call   1060 <charset_convert@plt>
test   %eax,%eax
jne    141b <test_convert+0x2db>
cmpq   $0x1,(%rsp)
jne    141b <test_convert+0x2db>
mov    0x8(%rsp),%rdi
lea    0xd38(%rip),%rsi
call   1030 <strcmp@plt>
xor    %ebx,%ebx
test   %eax,%eax
sete   %bl
mov    %ebx,%edi
call   1040 <assert@plt>
movaps 0xbd7(%rip),%xmm0
movaps %xmm0,0x20(%rsp)
movaps 0xbdb(%rip),%xmm0
movaps %xmm0,0x30(%rsp)
movaps 0xbdf(%rip),%xmm0
movaps %xmm0,0x40(%rsp)
movaps 0xbe3(%rip),%xmm0
movaps %xmm0,0x50(%rsp)
movaps 0xbe7(%rip),%xmm0
movaps %xmm0,0x60(%rsp)
movaps 0xbeb(%rip),%xmm0
movaps %xmm0,0x70(%rsp)
movaps 0xbef(%rip),%xmm0
movaps %xmm0,0x80(%rsp)
movaps 0xbf0(%rip),%xmm0
movaps %xmm0,0x90(%rsp)
movaps 0xbf1(%rip),%xmm0
movaps %xmm0,0xa0(%rsp)
movaps 0xbf2(%rip),%xmm0
movaps %xmm0,0xb0(%rsp)
movaps 0xbf3(%rip),%xmm0
movaps %xmm0,0xc0(%rsp)
movaps 0xbf4(%rip),%xmm0
movaps %xmm0,0xd0(%rsp)
movaps 0xbf5(%rip),%xmm0
movaps %xmm0,0xe0(%rsp)
movaps 0xbf6(%rip),%xmm0
movaps %xmm0,0xf0(%rsp)
movaps 0xbf7(%rip),%xmm0
movaps %xmm0,0x100(%rsp)
movaps 0xbf8(%rip),%xmm0
movaps %xmm0,0x110(%rsp)
lea    0xc2f(%rip),%r14
lea    0xc33(%rip),%rbx
lea    0x20(%rsp),%rdx
lea    0x8(%rsp),%r8
mov    %rsp,%r9
mov    $0x100,%ecx
mov    %r14,%rdi
mov    %rbx,%rsi
call   1060 <charset_convert@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
mov    0x8(%rsp),%rdx
mov    (%rsp),%rcx
lea    0x18(%rsp),%r8
lea    0x10(%rsp),%r9
mov    %rbx,%rdi
mov    %r14,%rsi
call   1060 <charset_convert@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
xor    %edi,%edi
cmpq   $0x100,0x10(%rsp)
jne    158c <test_convert+0x44c>
mov    0x18(%rsp),%rdi
lea    0x20(%rsp),%rsi
mov    $0x100,%edx
call   1050 <bcmp@plt>
xor    %edi,%edi
test   %eax,%eax
sete   %dil
call   1040 <assert@plt>
add    $0x120,%rsp
pop    %rbx
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@.str = [11 x i8] c"\00x\C2\80\FD\BF\BF\BF\BF\BF\00"
@.str.1 = [6 x i8] c"UTF-8\00"
@.str.2 = [5 x i8] c"x\C1\BFy\00"
@.str.3 = [5 x i8] c"x##y\00"
@.str.4 = [11 x i8] c"iso-8859-1\00"
@.str.5 = [6 x i8] c"\C2\80\C4\80x\00"
@.str.6 = [4 x i8] c"\80?x\00"
@.str.7 = [4 x i8] c"\00\80\FF\00"
@.str.8 = [6 x i8] c"\00\C2\80\C3\BF\00"
@.str.9 = [11 x i8] c"iso-8859-2\00"
@.str.10 = [6 x i8] c"utf-8\00"
@.str.11 = [2 x i8] c"\C0\00"
@.str.12 = [3 x i8] c"\C5\94\00"
define void @test_convert() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [256 x i8]
%5 = alloca i64
%6 = alloca i64
%7 = alloca i32
store i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i8** %1
%8 = load i8*, i8** %1
%9 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* %8, i64 10, i8** %2, i64* %5)
%10 = icmp eq i32 %9, 0
br i1 %10, label %11, label %20
11: ; preds = %0
%12 = load i64, i64* %5
%13 = icmp eq i64 %12, 10
br i1 %13, label %14, label %20
14: ; preds = %11
%15 = load i8*, i8** %1
%16 = load i8*, i8** %2
%17 = call i32 @strcmp(i8* %15, i8* %16)
%18 = icmp ne i32 %17, 0
%19 = xor i1 %18, true
br label %20
20: ; preds = %14, %11, %0
%21 = phi i1 [ false, %11 ], [ false, %0 ], [ %19, %14 ]
%22 = zext i1 %21 to i32
%23 = call i32 @assert(i32 %22)
%24 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4, i8** %2, i64* %5)
%25 = icmp eq i32 %24, 2
br i1 %25, label %26, label %34
26: ; preds = %20
%27 = load i64, i64* %5
%28 = icmp eq i64 %27, 4
br i1 %28, label %29, label %34
29: ; preds = %26
%30 = load i8*, i8** %2
%31 = call i32 @strcmp(i8* %30, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%32 = icmp ne i32 %31, 0
%33 = xor i1 %32, true
br label %34
34: ; preds = %29, %26, %20
%35 = phi i1 [ false, %26 ], [ false, %20 ], [ %33, %29 ]
%36 = zext i1 %35 to i32
%37 = call i32 @assert(i32 %36)
%38 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4, i8** null, i64* %5)
%39 = icmp eq i32 %38, 2
br i1 %39, label %40, label %43
40: ; preds = %34
%41 = load i64, i64* %5
%42 = icmp eq i64 %41, 4
br label %43
43: ; preds = %40, %34
%44 = phi i1 [ false, %34 ], [ %42, %40 ]
%45 = zext i1 %44 to i32
%46 = call i32 @assert(i32 %45)
%47 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4, i8** %2, i64* null)
%48 = icmp eq i32 %47, 2
br i1 %48, label %49, label %54
49: ; preds = %43
%50 = load i8*, i8** %2
%51 = call i32 @strcmp(i8* %50, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%52 = icmp ne i32 %51, 0
%53 = xor i1 %52, true
br label %54
54: ; preds = %49, %43
%55 = phi i1 [ false, %43 ], [ %53, %49 ]
%56 = zext i1 %55 to i32
%57 = call i32 @assert(i32 %56)
%58 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i64 5, i8** %2, i64* %5)
%59 = icmp eq i32 %58, 1
br i1 %59, label %60, label %68
60: ; preds = %54
%61 = load i64, i64* %5
%62 = icmp eq i64 %61, 3
br i1 %62, label %63, label %68
63: ; preds = %60
%64 = load i8*, i8** %2
%65 = call i32 @strcmp(i8* %64, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%66 = icmp ne i32 %65, 0
%67 = xor i1 %66, true
br label %68
68: ; preds = %63, %60, %54
%69 = phi i1 [ false, %60 ], [ false, %54 ], [ %67, %63 ]
%70 = zext i1 %69 to i32
%71 = call i32 @assert(i32 %70)
%72 = call i32 @charset_convert(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i64 3, i8** %2, i64* %5)
%73 = icmp eq i32 %72, 0
br i1 %73, label %74, label %82
74: ; preds = %68
%75 = load i64, i64* %5
%76 = icmp eq i64 %75, 5
br i1 %76, label %77, label %82
77: ; preds = %74
%78 = load i8*, i8** %2
%79 = call i32 @memcmp(i8* %78, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i64 5)
%80 = icmp ne i32 %79, 0
%81 = xor i1 %80, true
br label %82
82: ; preds = %77, %74, %68
%83 = phi i1 [ false, %74 ], [ false, %68 ], [ %81, %77 ]
%84 = zext i1 %83 to i32
%85 = call i32 @assert(i32 %84)
%86 = call i32 @charset_convert(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i64 3, i8** %2, i64* %5)
%87 = icmp eq i32 %86, 0
br i1 %87, label %88, label %96
88: ; preds = %82
%89 = load i64, i64* %5
%90 = icmp eq i64 %89, 3
br i1 %90, label %91, label %96
91: ; preds = %88
%92 = load i8*, i8** %2
%93 = call i32 @memcmp(i8* %92, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i64 3)
%94 = icmp ne i32 %93, 0
%95 = xor i1 %94, true
br label %96
96: ; preds = %91, %88, %82
%97 = phi i1 [ false, %88 ], [ false, %82 ], [ %95, %91 ]
%98 = zext i1 %97 to i32
%99 = call i32 @assert(i32 %98)
%100 = call i32 @charset_convert(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i64 1, i8** %2, i64* %5)
%101 = icmp eq i32 %100, 0
br i1 %101, label %102, label %110
102: ; preds = %96
%103 = load i64, i64* %5
%104 = icmp eq i64 %103, 2
br i1 %104, label %105, label %110
105: ; preds = %102
%106 = load i8*, i8** %2
%107 = call i32 @strcmp(i8* %106, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%108 = icmp ne i32 %107, 0
%109 = xor i1 %108, true
br label %110
110: ; preds = %105, %102, %96
%111 = phi i1 [ false, %102 ], [ false, %96 ], [ %109, %105 ]
%112 = zext i1 %111 to i32
%113 = call i32 @assert(i32 %112)
%114 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i64 2, i8** %2, i64* %5)
%115 = icmp eq i32 %114, 0
br i1 %115, label %116, label %124
116: ; preds = %110
%117 = load i64, i64* %5
%118 = icmp eq i64 %117, 1
br i1 %118, label %119, label %124
119: ; preds = %116
%120 = load i8*, i8** %2
%121 = call i32 @strcmp(i8* %120, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%122 = icmp ne i32 %121, 0
%123 = xor i1 %122, true
br label %124
124: ; preds = %119, %116, %110
%125 = phi i1 [ false, %116 ], [ false, %110 ], [ %123, %119 ]
%126 = zext i1 %125 to i32
%127 = call i32 @assert(i32 %126)
store i32 0, i32* %7
br label %128
128: ; preds = %137, %124
%129 = load i32, i32* %7
%130 = icmp slt i32 %129, 256
br i1 %130, label %131, label %140
131: ; preds = %128
%132 = load i32, i32* %7
%133 = trunc i32 %132 to i8
%134 = load i32, i32* %7
%135 = sext i32 %134 to i64
%136 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 %135
store i8 %133, i8* %136
br label %137
137: ; preds = %131
%138 = load i32, i32* %7
%139 = add nsw i32 %138, 1
store i32 %139, i32* %7
br label %128
140: ; preds = %128
%141 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%142 = call i32 @charset_convert(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* %141, i64 256, i8** %2, i64* %5)
%143 = icmp eq i32 %142, 0
%144 = zext i1 %143 to i32
%145 = call i32 @assert(i32 %144)
%146 = load i8*, i8** %2
%147 = load i64, i64* %5
%148 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i8* %146, i64 %147, i8** %3, i64* %6)
%149 = icmp eq i32 %148, 0
%150 = zext i1 %149 to i32
%151 = call i32 @assert(i32 %150)
%152 = load i64, i64* %6
%153 = icmp eq i64 %152, 256
br i1 %153, label %154, label %161
154: ; preds = %140
%155 = load i8*, i8** %3
%156 = getelementptr inbounds [256 x i8], [256 x i8]* %4, i64 0, i64 0
%157 = load i64, i64* %6
%158 = call i32 @memcmp(i8* %155, i8* %156, i64 %157)
%159 = icmp ne i32 %158, 0
%160 = xor i1 %159, true
br label %161
161: ; preds = %154, %140
%162 = phi i1 [ false, %140 ], [ %160, %154 ]
%163 = zext i1 %162 to i32
%164 = call i32 @assert(i32 %163)
ret void
}

LLVM IR (-O2):
@.str = [11 x i8] c"\00x\C2\80\FD\BF\BF\BF\BF\BF\00"
@.str.1 = [6 x i8] c"UTF-8\00"
@.str.2 = [5 x i8] c"x\C1\BFy\00"
@.str.3 = [5 x i8] c"x##y\00"
@.str.4 = [11 x i8] c"iso-8859-1\00"
@.str.5 = [6 x i8] c"\C2\80\C4\80x\00"
@.str.6 = [4 x i8] c"\80?x\00"
@.str.7 = [4 x i8] c"\00\80\FF\00"
@.str.8 = [6 x i8] c"\00\C2\80\C3\BF\00"
@.str.9 = [11 x i8] c"iso-8859-2\00"
@.str.10 = [6 x i8] c"utf-8\00"
@.str.11 = [2 x i8] c"\C0\00"
@.str.12 = [3 x i8] c"\C5\94\00"
define void @test_convert() {
%1 = alloca i8*
%2 = alloca i8*
%3 = alloca [256 x i8]
%4 = alloca i64
%5 = alloca i64
%6 = bitcast i8** %1 to i8*
%7 = bitcast i8** %2 to i8*
%8 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 0
%9 = bitcast i64* %4 to i8*
%10 = bitcast i64* %5 to i8*
%11 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0), i64 10, i8** %1, i64* %4)
%12 = icmp eq i32 %11, 0
%13 = load i64, i64* %4
%14 = icmp eq i64 %13, 10
%15 = select i1 %12, i1 %14, i1 false
br i1 %15, label %16, label %21
16: ; preds = %0
%17 = load i8*, i8** %1
%18 = load i8, i8* %17
%19 = icmp eq i8 %18, 0
%20 = zext i1 %19 to i32
br label %21
21: ; preds = %16, %0
%22 = phi i32 [ 0, %0 ], [ %20, %16 ]
%23 = call i32 @assert(i32 %22)
%24 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4, i8** %1, i64* %4)
%25 = icmp eq i32 %24, 2
%26 = load i64, i64* %4
%27 = icmp eq i64 %26, 4
%28 = select i1 %25, i1 %27, i1 false
br i1 %28, label %29, label %34
29: ; preds = %21
%30 = load i8*, i8** %1
%31 = call i32 @strcmp(i8* dereferenceable(1) %30, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%32 = icmp eq i32 %31, 0
%33 = zext i1 %32 to i32
br label %34
34: ; preds = %29, %21
%35 = phi i32 [ 0, %21 ], [ %33, %29 ]
%36 = call i32 @assert(i32 %35)
%37 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4, i8** null, i64* %4)
%38 = icmp eq i32 %37, 2
%39 = load i64, i64* %4
%40 = icmp eq i64 %39, 4
%41 = select i1 %38, i1 %40, i1 false
%42 = zext i1 %41 to i32
%43 = call i32 @assert(i32 %42)
%44 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.2, i64 0, i64 0), i64 4, i8** %1, i64* null)
%45 = icmp eq i32 %44, 2
br i1 %45, label %46, label %51
46: ; preds = %34
%47 = load i8*, i8** %1
%48 = call i32 @strcmp(i8* dereferenceable(1) %47, i8* dereferenceable(5) getelementptr inbounds ([5 x i8], [5 x i8]* @.str.3, i64 0, i64 0))
%49 = icmp eq i32 %48, 0
%50 = zext i1 %49 to i32
br label %51
51: ; preds = %46, %34
%52 = phi i32 [ 0, %34 ], [ %50, %46 ]
%53 = call i32 @assert(i32 %52)
%54 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.5, i64 0, i64 0), i64 5, i8** %1, i64* %4)
%55 = icmp eq i32 %54, 1
%56 = load i64, i64* %4
%57 = icmp eq i64 %56, 3
%58 = select i1 %55, i1 %57, i1 false
br i1 %58, label %59, label %64
59: ; preds = %51
%60 = load i8*, i8** %1
%61 = call i32 @strcmp(i8* dereferenceable(1) %60, i8* dereferenceable(4) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0))
%62 = icmp eq i32 %61, 0
%63 = zext i1 %62 to i32
br label %64
64: ; preds = %59, %51
%65 = phi i32 [ 0, %51 ], [ %63, %59 ]
%66 = call i32 @assert(i32 %65)
%67 = call i32 @charset_convert(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i64 3, i8** %1, i64* %4)
%68 = icmp eq i32 %67, 0
%69 = load i64, i64* %4
%70 = icmp eq i64 %69, 5
%71 = select i1 %68, i1 %70, i1 false
br i1 %71, label %72, label %77
72: ; preds = %64
%73 = load i8*, i8** %1
%74 = call i32 @bcmp(i8* dereferenceable(5) %73, i8* dereferenceable(5) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.8, i64 0, i64 0), i64 5)
%75 = icmp eq i32 %74, 0
%76 = zext i1 %75 to i32
br label %77
77: ; preds = %72, %64
%78 = phi i32 [ 0, %64 ], [ %76, %72 ]
%79 = call i32 @assert(i32 %78)
%80 = call i32 @charset_convert(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i64 3, i8** %1, i64* %4)
%81 = icmp eq i32 %80, 0
%82 = load i64, i64* %4
%83 = icmp eq i64 %82, 3
%84 = select i1 %81, i1 %83, i1 false
br i1 %84, label %85, label %90
85: ; preds = %77
%86 = load i8*, i8** %1
%87 = call i32 @bcmp(i8* dereferenceable(3) %86, i8* dereferenceable(3) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0), i64 3)
%88 = icmp eq i32 %87, 0
%89 = zext i1 %88 to i32
br label %90
90: ; preds = %85, %77
%91 = phi i32 [ 0, %77 ], [ %89, %85 ]
%92 = call i32 @assert(i32 %91)
%93 = call i32 @charset_convert(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0), i64 1, i8** %1, i64* %4)
%94 = icmp eq i32 %93, 0
%95 = load i64, i64* %4
%96 = icmp eq i64 %95, 2
%97 = select i1 %94, i1 %96, i1 false
br i1 %97, label %98, label %103
98: ; preds = %90
%99 = load i8*, i8** %1
%100 = call i32 @strcmp(i8* dereferenceable(1) %99, i8* dereferenceable(3) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0))
%101 = icmp eq i32 %100, 0
%102 = zext i1 %101 to i32
br label %103
103: ; preds = %98, %90
%104 = phi i32 [ 0, %90 ], [ %102, %98 ]
%105 = call i32 @assert(i32 %104)
%106 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.12, i64 0, i64 0), i64 2, i8** %1, i64* %4)
%107 = icmp eq i32 %106, 0
%108 = load i64, i64* %4
%109 = icmp eq i64 %108, 1
%110 = select i1 %107, i1 %109, i1 false
br i1 %110, label %111, label %116
111: ; preds = %103
%112 = load i8*, i8** %1
%113 = call i32 @strcmp(i8* dereferenceable(1) %112, i8* dereferenceable(2) getelementptr inbounds ([2 x i8], [2 x i8]* @.str.11, i64 0, i64 0))
%114 = icmp eq i32 %113, 0
%115 = zext i1 %114 to i32
br label %116
116: ; preds = %111, %103
%117 = phi i32 [ 0, %103 ], [ %115, %111 ]
%118 = call i32 @assert(i32 %117)
%119 = bitcast [256 x i8]* %3 to <16 x i8>*
store <16 x i8> <i8 0, i8 1, i8 2, i8 3, i8 4, i8 5, i8 6, i8 7, i8 8, i8 9, i8 10, i8 11, i8 12, i8 13, i8 14, i8 15>, <16 x i8>* %119
%120 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 16
%121 = bitcast i8* %120 to <16 x i8>*
store <16 x i8> <i8 16, i8 17, i8 18, i8 19, i8 20, i8 21, i8 22, i8 23, i8 24, i8 25, i8 26, i8 27, i8 28, i8 29, i8 30, i8 31>, <16 x i8>* %121
%122 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 32
%123 = bitcast i8* %122 to <16 x i8>*
store <16 x i8> <i8 32, i8 33, i8 34, i8 35, i8 36, i8 37, i8 38, i8 39, i8 40, i8 41, i8 42, i8 43, i8 44, i8 45, i8 46, i8 47>, <16 x i8>* %123
%124 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 48
%125 = bitcast i8* %124 to <16 x i8>*
store <16 x i8> <i8 48, i8 49, i8 50, i8 51, i8 52, i8 53, i8 54, i8 55, i8 56, i8 57, i8 58, i8 59, i8 60, i8 61, i8 62, i8 63>, <16 x i8>* %125
%126 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 64
%127 = bitcast i8* %126 to <16 x i8>*
store <16 x i8> <i8 64, i8 65, i8 66, i8 67, i8 68, i8 69, i8 70, i8 71, i8 72, i8 73, i8 74, i8 75, i8 76, i8 77, i8 78, i8 79>, <16 x i8>* %127
%128 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 80
%129 = bitcast i8* %128 to <16 x i8>*
store <16 x i8> <i8 80, i8 81, i8 82, i8 83, i8 84, i8 85, i8 86, i8 87, i8 88, i8 89, i8 90, i8 91, i8 92, i8 93, i8 94, i8 95>, <16 x i8>* %129
%130 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 96
%131 = bitcast i8* %130 to <16 x i8>*
store <16 x i8> <i8 96, i8 97, i8 98, i8 99, i8 100, i8 101, i8 102, i8 103, i8 104, i8 105, i8 106, i8 107, i8 108, i8 109, i8 110, i8 111>, <16 x i8>* %131
%132 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 112
%133 = bitcast i8* %132 to <16 x i8>*
store <16 x i8> <i8 112, i8 113, i8 114, i8 115, i8 116, i8 117, i8 118, i8 119, i8 120, i8 121, i8 122, i8 123, i8 124, i8 125, i8 126, i8 127>, <16 x i8>* %133
%134 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 128
%135 = bitcast i8* %134 to <16 x i8>*
store <16 x i8> <i8 -128, i8 -127, i8 -126, i8 -125, i8 -124, i8 -123, i8 -122, i8 -121, i8 -120, i8 -119, i8 -118, i8 -117, i8 -116, i8 -115, i8 -114, i8 -113>, <16 x i8>* %135
%136 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 144
%137 = bitcast i8* %136 to <16 x i8>*
store <16 x i8> <i8 -112, i8 -111, i8 -110, i8 -109, i8 -108, i8 -107, i8 -106, i8 -105, i8 -104, i8 -103, i8 -102, i8 -101, i8 -100, i8 -99, i8 -98, i8 -97>, <16 x i8>* %137
%138 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 160
%139 = bitcast i8* %138 to <16 x i8>*
store <16 x i8> <i8 -96, i8 -95, i8 -94, i8 -93, i8 -92, i8 -91, i8 -90, i8 -89, i8 -88, i8 -87, i8 -86, i8 -85, i8 -84, i8 -83, i8 -82, i8 -81>, <16 x i8>* %139
%140 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 176
%141 = bitcast i8* %140 to <16 x i8>*
store <16 x i8> <i8 -80, i8 -79, i8 -78, i8 -77, i8 -76, i8 -75, i8 -74, i8 -73, i8 -72, i8 -71, i8 -70, i8 -69, i8 -68, i8 -67, i8 -66, i8 -65>, <16 x i8>* %141
%142 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 192
%143 = bitcast i8* %142 to <16 x i8>*
store <16 x i8> <i8 -64, i8 -63, i8 -62, i8 -61, i8 -60, i8 -59, i8 -58, i8 -57, i8 -56, i8 -55, i8 -54, i8 -53, i8 -52, i8 -51, i8 -50, i8 -49>, <16 x i8>* %143
%144 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 208
%145 = bitcast i8* %144 to <16 x i8>*
store <16 x i8> <i8 -48, i8 -47, i8 -46, i8 -45, i8 -44, i8 -43, i8 -42, i8 -41, i8 -40, i8 -39, i8 -38, i8 -37, i8 -36, i8 -35, i8 -34, i8 -33>, <16 x i8>* %145
%146 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 224
%147 = bitcast i8* %146 to <16 x i8>*
store <16 x i8> <i8 -32, i8 -31, i8 -30, i8 -29, i8 -28, i8 -27, i8 -26, i8 -25, i8 -24, i8 -23, i8 -22, i8 -21, i8 -20, i8 -19, i8 -18, i8 -17>, <16 x i8>* %147
%148 = getelementptr inbounds [256 x i8], [256 x i8]* %3, i64 0, i64 240
%149 = bitcast i8* %148 to <16 x i8>*
store <16 x i8> <i8 -16, i8 -15, i8 -14, i8 -13, i8 -12, i8 -11, i8 -10, i8 -9, i8 -8, i8 -7, i8 -6, i8 -5, i8 -4, i8 -3, i8 -2, i8 -1>, <16 x i8>* %149
%150 = call i32 @charset_convert(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* %8, i64 256, i8** %1, i64* %4)
%151 = icmp eq i32 %150, 0
%152 = zext i1 %151 to i32
%153 = call i32 @assert(i32 %152)
%154 = load i8*, i8** %1
%155 = load i64, i64* %4
%156 = call i32 @charset_convert(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.10, i64 0, i64 0), i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.9, i64 0, i64 0), i8* %154, i64 %155, i8** %2, i64* %5)
%157 = icmp eq i32 %156, 0
%158 = zext i1 %157 to i32
%159 = call i32 @assert(i32 %158)
%160 = load i64, i64* %5
%161 = icmp eq i64 %160, 256
br i1 %161, label %162, label %167
162: ; preds = %116
%163 = load i8*, i8** %2
%164 = call i32 @bcmp(i8* dereferenceable(256) %163, i8* dereferenceable(256) %8, i64 256)
%165 = icmp eq i32 %164, 0
%166 = zext i1 %165 to i32
br label %167
167: ; preds = %162, %116
%168 = phi i32 [ 0, %116 ], [ %166, %162 ]
%169 = call i32 @assert(i32 %168)
ret void
}