#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);
scalar_t__ binn_is_valid_ex(char *, void *, void *, int *);
int /*<<< orphan*/ printf(char *, int, int);
int /*<<< orphan*/ puts(char *);
int strlen(char *);
void test_invalid_binn() {
  char buffers[][20] = {
      {0xE0},
      {0xE0, 0x7E},
      {0xE0, 0x7E, 0x7F},
      {0xE0, 0x7E, 0x7F, 0x12},
      {0xE0, 0x7E, 0x7F, 0x12, 0x34},
      {0xE0, 0x7E, 0x7F, 0x12, 0x34, 0x01},
      {0xE0, 0x7E, 0x7F, 0x12, 0x34, 0x7F},
      {0xE0, 0x7E, 0x7F, 0x12, 0x34, 0xFF},
      {0xE0, 0x7E, 0x7F, 0x12, 0x34, 0xFF, 0xFF},
      {0xE0, 0x7E, 0x7F, 0x12, 0x34, 0xFF, 0xFF, 0xFF},
      {0xE0, 0x7E, 0x7F, 0x12, 0x34, 0xFF, 0xFF, 0xFF, 0xFF},
      {0xE0, 0x7E, 0x7F, 0x12, 0x34, 0xFF, 0xFF, 0xFF, 0xFF, 0x01},
      {0xE0, 0x7E, 0x7F, 0x12, 0x34, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
      {0xE0, 0x7E, 0xFF},
      {0xE0, 0x7E, 0xFF, 0x12},
      {0xE0, 0x7E, 0xFF, 0x12, 0x34},
      {0xE0, 0x7E, 0xFF, 0x12, 0x34, 0x01},
      {0xE0, 0x7E, 0xFF, 0x12, 0x34, 0x7F},
      {0xE0, 0x7E, 0xFF, 0x12, 0x34, 0xFF},
      {0xE0, 0x7E, 0xFF, 0x12, 0x34, 0xFF, 0xFF},
      {0xE0, 0x7E, 0xFF, 0x12, 0x34, 0xFF, 0xFF, 0xFF},
      {0xE0, 0x7E, 0xFF, 0x12, 0x34, 0xFF, 0xFF, 0xFF, 0xFF},
      {0xE0, 0x7E, 0xFF, 0x12, 0x34, 0xFF, 0xFF, 0xFF, 0xFF, 0x01},
      {0xE0, 0x7E, 0xFF, 0x12, 0x34, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF},
      {0xE0, 0x8E},
      {0xE0, 0x8E, 0xFF},
      {0xE0, 0x8E, 0xFF, 0x12},
      {0xE0, 0x8E, 0xFF, 0x12, 0x34},
      {0xE0, 0x8E, 0xFF, 0x12, 0x34, 0x01},
      {0xE0, 0x8E, 0xFF, 0x12, 0x34, 0x7F},
      {0xE0, 0x8E, 0xFF, 0x12, 0x34, 0xFF},
      {0xE0, 0x8E, 0xFF, 0x12, 0x34, 0xFF, 0xFF},
      {0xE0, 0x8E, 0xFF, 0x12, 0x34, 0xFF, 0xFF, 0xFF},
      {0xE0, 0x8E, 0xFF, 0x12, 0x34, 0xFF, 0xFF, 0xFF, 0xFF},
      {0xE0, 0x8E, 0xFF, 0x12, 0x34, 0xFF, 0xFF, 0xFF, 0xFF, 0x01},
      {0xE0, 0x8E, 0xFF, 0x12, 0x34, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF}};
  int count, size, i;
  char *ptr;
  puts("testing invalid binn buffers...");
  count = sizeof buffers / sizeof buffers[0];
  for (i = 0; i < count; i++) {
    ptr = buffers[i];
    size = strlen(ptr);
    printf("checking invalid binn #%d   size: %d bytes\n", i, size);
    assert(binn_is_valid_ex(ptr, ((void *)0), ((void *)0), &size) == 0);
  }
  puts("OK");
}


x86 assembly (clang, -O0):
<test_invalid_binn>:
push   %rbp
mov    %rsp,%rbp
sub    $0x2f0,%rsp
lea    -0x2d0(%rbp),%rdi
lea    0xe87(%rip),%rsi
mov    $0x2d0,%edx
call   1080 <memcpy@plt>
lea    0x1146(%rip),%rdi
call   1030 <puts@plt>
movl   $0x24,-0x2d4(%rbp)
movl   $0x0,-0x2dc(%rbp)
mov    -0x2dc(%rbp),%eax
cmp    -0x2d4(%rbp),%eax
jge    123a <test_invalid_binn+0xda>
movslq -0x2dc(%rbp),%rcx
lea    -0x2d0(%rbp),%rax
imul   $0x14,%rcx,%rcx
add    %rcx,%rax
mov    %rax,-0x2e8(%rbp)
mov    -0x2e8(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,-0x2d8(%rbp)
mov    -0x2dc(%rbp),%esi
mov    -0x2d8(%rbp),%edx
lea    0x10fa(%rip),%rdi
call   1060 <printf@plt>
mov    -0x2e8(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%edx
lea    -0x2d8(%rbp),%rcx
mov    %rdx,%rsi
call   1040 <binn_is_valid_ex@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%edi
call   1070 <assert@plt>
mov    -0x2dc(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2dc(%rbp)
jmp    11a3 <test_invalid_binn+0x43>
lea    0x10db(%rip),%rdi
call   1030 <puts@plt>
add    $0x2f0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<test_invalid_binn>:
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x2e8,%rsp
lea    0xe8b(%rip),%rsi
lea    0x10(%rsp),%r14
mov    $0x2d0,%edx
mov    %r14,%rdi
call   1080 <memcpy@plt>
lea    0x1142(%rip),%rdi
call   1030 <puts@plt>
xor    %ebx,%ebx
lea    0x1154(%rip),%r15
lea    0xc(%rsp),%r12
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
mov    %r14,%rdi
call   1050 <strlen@plt>
mov    %eax,0xc(%rsp)
mov    %r15,%rdi
mov    %ebx,%esi
mov    %eax,%edx
call   1060 <printf@plt>
mov    %r14,%rdi
xor    %esi,%esi
xor    %edx,%edx
mov    %r12,%rcx
call   1040 <binn_is_valid_ex@plt>
xor    %edi,%edi
test   %rax,%rax
sete   %dil
call   1070 <assert@plt>
add    $0x1,%rbx
add    $0x14,%r14
cmp    $0x24,%rbx
jne    11b0 <test_invalid_binn+0x50>
lea    0x1122(%rip),%rdi
call   1030 <puts@plt>
add    $0x2e8,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.test_invalid_binn.buffers = <{ <{ i8, [19 x i8] }>, <{ i8, i8, [18 x i8] }>, <{ i8, i8, i8, [17 x i8] }>, <{ i8, i8, i8, i8, [16 x i8] }>, <{ i8, i8, i8, i8, i8, [15 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }>, <{ [8 x i8], [12 x i8] }>, <{ [9 x i8], [11 x i8] }>, <{ [10 x i8], [10 x i8] }>, <{ [10 x i8], [10 x i8] }>, <{ i8, i8, i8, [17 x i8] }>, <{ i8, i8, i8, i8, [16 x i8] }>, <{ i8, i8, i8, i8, i8, [15 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }>, <{ [8 x i8], [12 x i8] }>, <{ [9 x i8], [11 x i8] }>, <{ [10 x i8], [10 x i8] }>, <{ [10 x i8], [10 x i8] }>, <{ i8, i8, [18 x i8] }>, <{ i8, i8, i8, [17 x i8] }>, <{ i8, i8, i8, i8, [16 x i8] }>, <{ i8, i8, i8, i8, i8, [15 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }>, <{ [8 x i8], [12 x i8] }>, <{ [9 x i8], [11 x i8] }>, <{ [10 x i8], [10 x i8] }>, <{ [10 x i8], [10 x i8] }> }> <{ <{ i8, [19 x i8] }> <{ i8 -32, [19 x i8] zeroinitializer }>, <{ i8, i8, [18 x i8] }> <{ i8 -32, i8 126, [18 x i8] zeroinitializer }>, <{ i8, i8, i8, [17 x i8] }> <{ i8 -32, i8 126, i8 127, [17 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, [16 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, [16 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, [15 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, i8 52, [15 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, i8 52, i8 1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, i8 52, i8 127, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, i8 52, i8 -1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, i8 52, i8 -1, i8 -1, [13 x i8] zeroinitializer }>, <{ [8 x i8], [12 x i8] }> <{ [8 x i8] c"\E0~\7F\124\FF\FF\FF", [12 x i8] zeroinitializer }>, <{ [9 x i8], [11 x i8] }> <{ [9 x i8] c"\E0~\7F\124\FF\FF\FF\FF", [11 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0~\7F\124\FF\FF\FF\FF\01", [10 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0~\7F\124\FF\FF\FF\FF\FF", [10 x i8] zeroinitializer }>, <{ i8, i8, i8, [17 x i8] }> <{ i8 -32, i8 126, i8 -1, [17 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, [16 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, [16 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, [15 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, i8 52, [15 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, i8 52, i8 1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, i8 52, i8 127, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, i8 52, i8 -1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, i8 52, i8 -1, i8 -1, [13 x i8] zeroinitializer }>, <{ [8 x i8], [12 x i8] }> <{ [8 x i8] c"\E0~\FF\124\FF\FF\FF", [12 x i8] zeroinitializer }>, <{ [9 x i8], [11 x i8] }> <{ [9 x i8] c"\E0~\FF\124\FF\FF\FF\FF", [11 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0~\FF\124\FF\FF\FF\FF\01", [10 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0~\FF\124\FF\FF\FF\FF\FF", [10 x i8] zeroinitializer }>, <{ i8, i8, [18 x i8] }> <{ i8 -32, i8 -114, [18 x i8] zeroinitializer }>, <{ i8, i8, i8, [17 x i8] }> <{ i8 -32, i8 -114, i8 -1, [17 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, [16 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, [16 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, [15 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, i8 52, [15 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, i8 52, i8 1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, i8 52, i8 127, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, i8 52, i8 -1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, i8 52, i8 -1, i8 -1, [13 x i8] zeroinitializer }>, <{ [8 x i8], [12 x i8] }> <{ [8 x i8] c"\E0\8E\FF\124\FF\FF\FF", [12 x i8] zeroinitializer }>, <{ [9 x i8], [11 x i8] }> <{ [9 x i8] c"\E0\8E\FF\124\FF\FF\FF\FF", [11 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0\8E\FF\124\FF\FF\FF\FF\01", [10 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0\8E\FF\124\FF\FF\FF\FF\FF", [10 x i8] zeroinitializer }> }>
@.str = [32 x i8] c"testing invalid binn buffers...\00"
@.str.1 = [44 x i8] c"checking invalid binn #%d size: %d bytes\0A\00"
@.str.2 = [3 x i8] c"OK\00"
define void @test_invalid_binn() {
%1 = alloca [36 x [20 x i8]]
%2 = alloca i32
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8*
%6 = bitcast [36 x [20 x i8]]* %1 to i8*
%7 = call i32 @puts(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
store i32 36, i32* %2
store i32 0, i32* %4
br label %8
8: ; preds = %27, %0
%9 = load i32, i32* %4
%10 = load i32, i32* %2
%11 = icmp slt i32 %9, %10
br i1 %11, label %12, label %30
12: ; preds = %8
%13 = load i32, i32* %4
%14 = sext i32 %13 to i64
%15 = getelementptr inbounds [36 x [20 x i8]], [36 x [20 x i8]]* %1, i64 0, i64 %14
%16 = getelementptr inbounds [20 x i8], [20 x i8]* %15, i64 0, i64 0
store i8* %16, i8** %5
%17 = load i8*, i8** %5
%18 = call i32 @strlen(i8* %17)
store i32 %18, i32* %3
%19 = load i32, i32* %4
%20 = load i32, i32* %3
%21 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i32 %19, i32 %20)
%22 = load i8*, i8** %5
%23 = call i64 @binn_is_valid_ex(i8* %22, i8* null, i8* null, i32* %3)
%24 = icmp eq i64 %23, 0
%25 = zext i1 %24 to i32
%26 = call i32 @assert(i32 %25)
br label %27
27: ; preds = %12
%28 = load i32, i32* %4
%29 = add nsw i32 %28, 1
store i32 %29, i32* %4
br label %8
30: ; preds = %8
%31 = call i32 @puts(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}

LLVM IR (-O2):
@__const.test_invalid_binn.buffers = <{ <{ i8, [19 x i8] }>, <{ i8, i8, [18 x i8] }>, <{ i8, i8, i8, [17 x i8] }>, <{ i8, i8, i8, i8, [16 x i8] }>, <{ i8, i8, i8, i8, i8, [15 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }>, <{ [8 x i8], [12 x i8] }>, <{ [9 x i8], [11 x i8] }>, <{ [10 x i8], [10 x i8] }>, <{ [10 x i8], [10 x i8] }>, <{ i8, i8, i8, [17 x i8] }>, <{ i8, i8, i8, i8, [16 x i8] }>, <{ i8, i8, i8, i8, i8, [15 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }>, <{ [8 x i8], [12 x i8] }>, <{ [9 x i8], [11 x i8] }>, <{ [10 x i8], [10 x i8] }>, <{ [10 x i8], [10 x i8] }>, <{ i8, i8, [18 x i8] }>, <{ i8, i8, i8, [17 x i8] }>, <{ i8, i8, i8, i8, [16 x i8] }>, <{ i8, i8, i8, i8, i8, [15 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }>, <{ [8 x i8], [12 x i8] }>, <{ [9 x i8], [11 x i8] }>, <{ [10 x i8], [10 x i8] }>, <{ [10 x i8], [10 x i8] }> }> <{ <{ i8, [19 x i8] }> <{ i8 -32, [19 x i8] zeroinitializer }>, <{ i8, i8, [18 x i8] }> <{ i8 -32, i8 126, [18 x i8] zeroinitializer }>, <{ i8, i8, i8, [17 x i8] }> <{ i8 -32, i8 126, i8 127, [17 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, [16 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, [16 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, [15 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, i8 52, [15 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, i8 52, i8 1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, i8 52, i8 127, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, i8 52, i8 -1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }> <{ i8 -32, i8 126, i8 127, i8 18, i8 52, i8 -1, i8 -1, [13 x i8] zeroinitializer }>, <{ [8 x i8], [12 x i8] }> <{ [8 x i8] c"\E0~\7F\124\FF\FF\FF", [12 x i8] zeroinitializer }>, <{ [9 x i8], [11 x i8] }> <{ [9 x i8] c"\E0~\7F\124\FF\FF\FF\FF", [11 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0~\7F\124\FF\FF\FF\FF\01", [10 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0~\7F\124\FF\FF\FF\FF\FF", [10 x i8] zeroinitializer }>, <{ i8, i8, i8, [17 x i8] }> <{ i8 -32, i8 126, i8 -1, [17 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, [16 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, [16 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, [15 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, i8 52, [15 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, i8 52, i8 1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, i8 52, i8 127, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, i8 52, i8 -1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }> <{ i8 -32, i8 126, i8 -1, i8 18, i8 52, i8 -1, i8 -1, [13 x i8] zeroinitializer }>, <{ [8 x i8], [12 x i8] }> <{ [8 x i8] c"\E0~\FF\124\FF\FF\FF", [12 x i8] zeroinitializer }>, <{ [9 x i8], [11 x i8] }> <{ [9 x i8] c"\E0~\FF\124\FF\FF\FF\FF", [11 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0~\FF\124\FF\FF\FF\FF\01", [10 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0~\FF\124\FF\FF\FF\FF\FF", [10 x i8] zeroinitializer }>, <{ i8, i8, [18 x i8] }> <{ i8 -32, i8 -114, [18 x i8] zeroinitializer }>, <{ i8, i8, i8, [17 x i8] }> <{ i8 -32, i8 -114, i8 -1, [17 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, [16 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, [16 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, [15 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, i8 52, [15 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, i8 52, i8 1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, i8 52, i8 127, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, [14 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, i8 52, i8 -1, [14 x i8] zeroinitializer }>, <{ i8, i8, i8, i8, i8, i8, i8, [13 x i8] }> <{ i8 -32, i8 -114, i8 -1, i8 18, i8 52, i8 -1, i8 -1, [13 x i8] zeroinitializer }>, <{ [8 x i8], [12 x i8] }> <{ [8 x i8] c"\E0\8E\FF\124\FF\FF\FF", [12 x i8] zeroinitializer }>, <{ [9 x i8], [11 x i8] }> <{ [9 x i8] c"\E0\8E\FF\124\FF\FF\FF\FF", [11 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0\8E\FF\124\FF\FF\FF\FF\01", [10 x i8] zeroinitializer }>, <{ [10 x i8], [10 x i8] }> <{ [10 x i8] c"\E0\8E\FF\124\FF\FF\FF\FF\FF", [10 x i8] zeroinitializer }> }>
@.str = [32 x i8] c"testing invalid binn buffers...\00"
@.str.1 = [44 x i8] c"checking invalid binn #%d size: %d bytes\0A\00"
@.str.2 = [3 x i8] c"OK\00"
define void @test_invalid_binn() {
%1 = alloca [36 x [20 x i8]]
%2 = alloca i32
%3 = getelementptr inbounds [36 x [20 x i8]], [36 x [20 x i8]]* %1, i64 0, i64 0, i64 0
%4 = bitcast i32* %2 to i8*
%5 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str, i64 0, i64 0))
br label %6
6: ; preds = %0, %6
%7 = phi i64 [ 0, %0 ], [ %16, %6 ]
%8 = getelementptr inbounds [36 x [20 x i8]], [36 x [20 x i8]]* %1, i64 0, i64 %7, i64 0
%9 = call i32 @strlen(i8* %8)
store i32 %9, i32* %2
%10 = trunc i64 %7 to i32
%11 = call i32 @printf(i8* getelementptr inbounds ([44 x i8], [44 x i8]* @.str.1, i64 0, i64 0), i32 %10, i32 %9)
%12 = call i64 @binn_is_valid_ex(i8* %8, i8* null, i8* null, i32* %2)
%13 = icmp eq i64 %12, 0
%14 = zext i1 %13 to i32
%15 = call i32 @assert(i32 %14)
%16 = add nuw nsw i64 %7, 1
%17 = icmp eq i64 %16, 36
br i1 %17, label %18, label %6
18: ; preds = %6
%19 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([3 x i8], [3 x i8]* @.str.2, i64 0, i64 0))
ret void
}