#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*/ fprintf(int /*<<< orphan*/, char *, ...);
int sscanf(char const *, char *, unsigned int *);
int /*<<< orphan*/ stderr;
char *strchr(char const *, char);
int strlen(char const *);
int strspn(char const *, char *);
int build_mask(const char *inp, unsigned char *mask_arr, int *mask_arr_len,
               int max_arr_len) {
  int in_len, k;
  unsigned int h;
  const char *lcp;
  char *cp;
  char *c2p;
  if ((NULL == inp) || (NULL == mask_arr) || (NULL == mask_arr_len))
    return 1;
  lcp = inp;
  in_len = strlen(inp);
  if (0 == in_len)
    *mask_arr_len = 0;
  if ('-' == inp[0]) {
    fprintf(stderr, "'--mask' does not accept input from stdin\n");
    return 1;
  } else {
    k = strspn(inp, "0123456789aAbBcCdDeEfF, ");
    if (in_len != k) {
      fprintf(stderr, "build_mode_page: error at pos %d\n", k + 1);
      return 1;
    }
    for (k = 0; k < max_arr_len; ++k) {
      if (1 == sscanf(lcp, "%x", &h)) {
        if (h > 0xff) {
          fprintf(stderr,
                  "build_mode_page: hex number larger "
                  "than 0xff at pos %d\n",
                  (int)(lcp - inp + 1));
          return 1;
        }
        mask_arr[k] = h;
        cp = strchr(lcp, ',');
        c2p = strchr(lcp, ' ');
        if (NULL == cp)
          cp = c2p;
        if (NULL == cp)
          break;
        if (c2p && (c2p < cp))
          cp = c2p;
        lcp = cp + 1;
      } else {
        fprintf(stderr, "build_mode_page: error at pos %d\n",
                (int)(lcp - inp + 1));
        return 1;
      }
    }
    *mask_arr_len = k + 1;
    if (k == max_arr_len) {
      fprintf(stderr, "build_mode_page: array length exceeded\n");
      return 1;
    }
  }
  return 0;
}


x86 assembly (clang, -O0):
<build_mask>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    %rdx,-0x20(%rbp)
mov    %ecx,-0x24(%rbp)
xor    %eax,%eax
cmp    -0x10(%rbp),%rax
je     118b <build_mask+0x3b>
xor    %eax,%eax
cmp    -0x18(%rbp),%rax
je     118b <build_mask+0x3b>
xor    %eax,%eax
cmp    -0x20(%rbp),%rax
jne    1197 <build_mask+0x47>
movl   $0x1,-0x4(%rbp)
jmp    13cf <build_mask+0x27f>
mov    -0x10(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rdi
call   1030 <strlen@plt>
mov    %eax,-0x28(%rbp)
xor    %eax,%eax
cmp    -0x28(%rbp),%eax
jne    11c0 <build_mask+0x70>
mov    -0x20(%rbp),%rax
movl   $0x0,(%rax)
mov    -0x10(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x2d,%eax
cmp    %ecx,%eax
jne    11f7 <build_mask+0xa7>
mov    0x2e05(%rip),%rax
mov    (%rax),%edi
lea    0xe1c(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13cf <build_mask+0x27f>
mov    -0x10(%rbp),%rdi
lea    0xe29(%rip),%rsi
call   1050 <strspn@plt>
mov    %eax,-0x2c(%rbp)
mov    -0x28(%rbp),%eax
cmp    -0x2c(%rbp),%eax
je     123f <build_mask+0xef>
mov    0x2dc3(%rip),%rax
mov    (%rax),%edi
mov    -0x2c(%rbp),%edx
add    $0x1,%edx
lea    0xe18(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13cf <build_mask+0x27f>
movl   $0x0,-0x2c(%rbp)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jge    1388 <build_mask+0x238>
mov    -0x38(%rbp),%rdi
lea    0xe09(%rip),%rsi
lea    -0x30(%rbp),%rdx
call   1070 <sscanf@plt>
mov    %eax,%ecx
mov    $0x1,%eax
cmp    %ecx,%eax
jne    1341 <build_mask+0x1f1>
cmpl   $0xff,-0x30(%rbp)
jbe    12b6 <build_mask+0x166>
mov    0x2d57(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    %eax,%edx
lea    0xdc6(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13cf <build_mask+0x27f>
mov    -0x30(%rbp),%eax
mov    %al,%dl
mov    -0x18(%rbp),%rax
movslq -0x2c(%rbp),%rcx
mov    %dl,(%rax,%rcx,1)
mov    -0x38(%rbp),%rdi
mov    $0x2c,%esi
call   1040 <strchr@plt>
mov    %rax,-0x40(%rbp)
mov    -0x38(%rbp),%rdi
mov    $0x20,%esi
call   1040 <strchr@plt>
mov    %rax,-0x48(%rbp)
xor    %eax,%eax
cmp    -0x40(%rbp),%rax
jne    12fe <build_mask+0x1ae>
mov    -0x48(%rbp),%rax
mov    %rax,-0x40(%rbp)
xor    %eax,%eax
cmp    -0x40(%rbp),%rax
jne    130f <build_mask+0x1bf>
jmp    1388 <build_mask+0x238>
cmpq   $0x0,-0x48(%rbp)
je     1330 <build_mask+0x1e0>
mov    -0x48(%rbp),%rax
cmp    -0x40(%rbp),%rax
jae    1330 <build_mask+0x1e0>
mov    -0x48(%rbp),%rax
mov    %rax,-0x40(%rbp)
mov    -0x40(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x38(%rbp)
jmp    1375 <build_mask+0x225>
mov    0x2c98(%rip),%rax
mov    (%rax),%edi
mov    -0x38(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    %eax,%edx
lea    0xce2(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13cf <build_mask+0x27f>
jmp    137a <build_mask+0x22a>
mov    -0x2c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2c(%rbp)
jmp    1246 <build_mask+0xf6>
mov    -0x2c(%rbp),%ecx
add    $0x1,%ecx
mov    -0x20(%rbp),%rax
mov    %ecx,(%rax)
mov    -0x2c(%rbp),%eax
cmp    -0x24(%rbp),%eax
jne    13c3 <build_mask+0x273>
mov    0x2c39(%rip),%rax
mov    (%rax),%edi
lea    0xcf1(%rip),%rsi
mov    $0x0,%al
call   1060 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    13cf <build_mask+0x27f>
jmp    13c8 <build_mask+0x278>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<build_mask>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x18,%rsp
mov    $0x1,%r13d
test   %rdi,%rdi
je     12f0 <build_mask+0x1a0>
mov    %rsi,%r12
test   %rsi,%rsi
je     12f0 <build_mask+0x1a0>
mov    %rdx,%rbp
test   %rdx,%rdx
je     12f0 <build_mask+0x1a0>
mov    %ecx,%r15d
mov    %rdi,%r14
call   1030 <strlen@plt>
mov    %eax,%ebx
test   %eax,%eax
je     11b8 <build_mask+0x68>
cmpb   $0x2d,(%r14)
jne    11c5 <build_mask+0x75>
mov    0x2e3d(%rip),%rax
mov    (%rax),%edi
lea    0xe54(%rip),%rsi
xor    %eax,%eax
call   1060 <fprintf@plt>
jmp    12ea <build_mask+0x19a>
movl   $0x0,0x0(%rbp)
cmpb   $0x2d,(%r14)
je     119c <build_mask+0x4c>
lea    0xe5f(%rip),%rsi
mov    %r14,%rdi
call   1050 <strspn@plt>
cmp    %eax,%ebx
jne    129c <build_mask+0x14c>
mov    %rbp,0x8(%rsp)
xor    %r13d,%r13d
mov    %r15d,%edx
mov    $0x0,%r15d
test   %edx,%edx
jle    1305 <build_mask+0x1b5>
mov    %edx,(%rsp)
mov    %edx,%eax
mov    %rax,0x10(%rsp)
xor    %r15d,%r15d
mov    %r14,%rbp
cs nopw 0x0(%rax,%rax,1)
nop
mov    %rbp,%rdi
lea    0xe4c(%rip),%rsi
lea    0x4(%rsp),%rdx
call   1070 <sscanf@plt>
cmp    $0x1,%eax
jne    12b3 <build_mask+0x163>
mov    0x4(%rsp),%eax
cmp    $0x100,%eax
jae    12cb <build_mask+0x17b>
mov    %al,(%r12,%r15,1)
mov    %rbp,%rdi
mov    $0x2c,%esi
call   1040 <strchr@plt>
mov    %rax,%rbx
mov    %rbp,%rdi
mov    $0x20,%esi
call   1040 <strchr@plt>
test   %rbx,%rbx
cmove  %rax,%rbx
test   %rbx,%rbx
je     1302 <build_mask+0x1b2>
cmp    %rbx,%rax
mov    %rbx,%rbp
cmovb  %rax,%rbp
test   %rax,%rax
cmove  %rbx,%rbp
add    $0x1,%rbp
add    $0x1,%r15
cmp    %r15,0x10(%rsp)
jne    1210 <build_mask+0xc0>
mov    (%rsp),%eax
add    $0x1,%eax
mov    0x8(%rsp),%rcx
mov    %eax,(%rcx)
jmp    1315 <build_mask+0x1c5>
mov    0x2d3d(%rip),%rcx
mov    (%rcx),%edi
add    $0x1,%eax
lea    0xd95(%rip),%rsi
mov    %eax,%edx
jmp    12e3 <build_mask+0x193>
mov    0x2d26(%rip),%rax
mov    (%rax),%edi
sub    %r14d,%ebp
add    $0x1,%ebp
lea    0xd7b(%rip),%rsi
jmp    12e1 <build_mask+0x191>
mov    0x2d0e(%rip),%rax
mov    (%rax),%edi
sub    %r14d,%ebp
add    $0x1,%ebp
lea    0xd88(%rip),%rsi
mov    %ebp,%edx
xor    %eax,%eax
call   1060 <fprintf@plt>
mov    $0x1,%r13d
mov    %r13d,%eax
add    $0x18,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    (%rsp),%edx
lea    0x1(%r15),%eax
mov    0x8(%rsp),%rcx
mov    %eax,(%rcx)
cmp    %edx,%r15d
jne    12f0 <build_mask+0x1a0>
mov    0x2cc4(%rip),%rax
mov    (%rax),%edi
lea    0xd7c(%rip),%rsi
jmp    11ac <build_mask+0x5c>

LLVM IR (-O0):
@stderr = global i32 0
@.str = [43 x i8] c"'--mask' does not accept input from stdin\0A\00"
@.str.1 = [25 x i8] c"0123456789aAbBcCdDeEfF, \00"
@.str.2 = [34 x i8] c"build_mode_page: error at pos %d\0A\00"
@.str.3 = [3 x i8] c"%x\00"
@.str.4 = [56 x i8] c"build_mode_page: hex number larger than 0xff at pos %d\0A\00"
@.str.5 = [40 x i8] c"build_mode_page: array length exceeded\0A\00"
define i32 @build_mask(i8* %0, i8* %1, i32* %2, i32 %3) {
%5 = alloca i32
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i32*
%9 = alloca i32
%10 = alloca i32
%11 = alloca i32
%12 = alloca i32
%13 = alloca i8*
%14 = alloca i8*
%15 = alloca i8*
store i8* %0, i8** %6
store i8* %1, i8** %7
store i32* %2, i32** %8
store i32 %3, i32* %9
%16 = load i8*, i8** %6
%17 = icmp eq i8* null, %16
br i1 %17, label %24, label %18
18: ; preds = %4
%19 = load i8*, i8** %7
%20 = icmp eq i8* null, %19
br i1 %20, label %24, label %21
21: ; preds = %18
%22 = load i32*, i32** %8
%23 = icmp eq i32* null, %22
br i1 %23, label %24, label %25
24: ; preds = %21, %18, %4
store i32 1, i32* %5
br label %132
25: ; preds = %21
%26 = load i8*, i8** %6
store i8* %26, i8** %13
%27 = load i8*, i8** %6
%28 = call i32 @strlen(i8* %27)
store i32 %28, i32* %10
%29 = load i32, i32* %10
%30 = icmp eq i32 0, %29
br i1 %30, label %31, label %33
31: ; preds = %25
%32 = load i32*, i32** %8
store i32 0, i32* %32
br label %33
33: ; preds = %31, %25
%34 = load i8*, i8** %6
%35 = getelementptr inbounds i8, i8* %34, i64 0
%36 = load i8, i8* %35
%37 = sext i8 %36 to i32
%38 = icmp eq i32 45, %37
br i1 %38, label %39, label %42
39: ; preds = %33
%40 = load i32, i32* @stderr
%41 = call i32 (i32, i8*, ...) @fprintf(i32 %40, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %5
br label %132
42: ; preds = %33
%43 = load i8*, i8** %6
%44 = call i32 @strspn(i8* %43, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
store i32 %44, i32* %11
%45 = load i32, i32* %10
%46 = load i32, i32* %11
%47 = icmp ne i32 %45, %46
br i1 %47, label %48, label %53
48: ; preds = %42
%49 = load i32, i32* @stderr
%50 = load i32, i32* %11
%51 = add nsw i32 %50, 1
%52 = call i32 (i32, i8*, ...) @fprintf(i32 %49, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %51)
store i32 1, i32* %5
br label %132
53: ; preds = %42
store i32 0, i32* %11
br label %54
54: ; preds = %117, %53
%55 = load i32, i32* %11
%56 = load i32, i32* %9
%57 = icmp slt i32 %55, %56
br i1 %57, label %58, label %120
58: ; preds = %54
%59 = load i8*, i8** %13
%60 = call i32 @sscanf(i8* %59, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %12)
%61 = icmp eq i32 1, %60
br i1 %61, label %62, label %106
62: ; preds = %58
%63 = load i32, i32* %12
%64 = icmp ugt i32 %63, 255
br i1 %64, label %65, label %75
65: ; preds = %62
%66 = load i32, i32* @stderr
%67 = load i8*, i8** %13
%68 = load i8*, i8** %6
%69 = ptrtoint i8* %67 to i64
%70 = ptrtoint i8* %68 to i64
%71 = sub i64 %69, %70
%72 = add nsw i64 %71, 1
%73 = trunc i64 %72 to i32
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %66, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0), i32 %73)
store i32 1, i32* %5
br label %132
75: ; preds = %62
%76 = load i32, i32* %12
%77 = trunc i32 %76 to i8
%78 = load i8*, i8** %7
%79 = load i32, i32* %11
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds i8, i8* %78, i64 %80
store i8 %77, i8* %81
%82 = load i8*, i8** %13
%83 = call i8* @strchr(i8* %82, i8 signext 44)
store i8* %83, i8** %14
%84 = load i8*, i8** %13
%85 = call i8* @strchr(i8* %84, i8 signext 32)
store i8* %85, i8** %15
%86 = load i8*, i8** %14
%87 = icmp eq i8* null, %86
br i1 %87, label %88, label %90
88: ; preds = %75
%89 = load i8*, i8** %15
store i8* %89, i8** %14
br label %90
90: ; preds = %88, %75
%91 = load i8*, i8** %14
%92 = icmp eq i8* null, %91
br i1 %92, label %93, label %94
93: ; preds = %90
br label %120
94: ; preds = %90
%95 = load i8*, i8** %15
%96 = icmp ne i8* %95, null
br i1 %96, label %97, label %103
97: ; preds = %94
%98 = load i8*, i8** %15
%99 = load i8*, i8** %14
%100 = icmp ult i8* %98, %99
br i1 %100, label %101, label %103
101: ; preds = %97
%102 = load i8*, i8** %15
store i8* %102, i8** %14
br label %103
103: ; preds = %101, %97, %94
%104 = load i8*, i8** %14
%105 = getelementptr inbounds i8, i8* %104, i64 1
store i8* %105, i8** %13
br label %116
106: ; preds = %58
%107 = load i32, i32* @stderr
%108 = load i8*, i8** %13
%109 = load i8*, i8** %6
%110 = ptrtoint i8* %108 to i64
%111 = ptrtoint i8* %109 to i64
%112 = sub i64 %110, %111
%113 = add nsw i64 %112, 1
%114 = trunc i64 %113 to i32
%115 = call i32 (i32, i8*, ...) @fprintf(i32 %107, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %114)
store i32 1, i32* %5
br label %132
116: ; preds = %103
br label %117
117: ; preds = %116
%118 = load i32, i32* %11
%119 = add nsw i32 %118, 1
store i32 %119, i32* %11
br label %54
120: ; preds = %93, %54
%121 = load i32, i32* %11
%122 = add nsw i32 %121, 1
%123 = load i32*, i32** %8
store i32 %122, i32* %123
%124 = load i32, i32* %11
%125 = load i32, i32* %9
%126 = icmp eq i32 %124, %125
br i1 %126, label %127, label %130
127: ; preds = %120
%128 = load i32, i32* @stderr
%129 = call i32 (i32, i8*, ...) @fprintf(i32 %128, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0))
store i32 1, i32* %5
br label %132
130: ; preds = %120
br label %131
131: ; preds = %130
store i32 0, i32* %5
br label %132
132: ; preds = %131, %127, %106, %65, %48, %39, %24
%133 = load i32, i32* %5
ret i32 %133
}

LLVM IR (-O2):
@stderr = global i32 0
@.str = [43 x i8] c"'--mask' does not accept input from stdin\0A\00"
@.str.1 = [25 x i8] c"0123456789aAbBcCdDeEfF, \00"
@.str.2 = [34 x i8] c"build_mode_page: error at pos %d\0A\00"
@.str.3 = [3 x i8] c"%x\00"
@.str.4 = [56 x i8] c"build_mode_page: hex number larger than 0xff at pos %d\0A\00"
@.str.5 = [40 x i8] c"build_mode_page: array length exceeded\0A\00"
define i32 @build_mask(i8* %0, i8* writeonly %1, i32* writeonly %2, i32 %3) {
%5 = alloca i32
%6 = bitcast i32* %5 to i8*
%7 = icmp eq i8* %0, null
%8 = icmp eq i8* %1, null
%9 = or i1 %7, %8
%10 = icmp eq i32* %2, null
%11 = or i1 %9, %10
br i1 %11, label %84, label %12
12: ; preds = %4
%13 = tail call i32 @strlen(i8* %0)
%14 = icmp eq i32 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %12
store i32 0, i32* %2
br label %16
16: ; preds = %15, %12
%17 = load i8, i8* %0
%18 = icmp eq i8 %17, 45
br i1 %18, label %19, label %22
19: ; preds = %16
%20 = load i32, i32* @stderr
%21 = tail call i32 (i32, i8*, ...) @fprintf(i32 %20, i8* getelementptr inbounds ([43 x i8], [43 x i8]* @.str, i64 0, i64 0))
br label %84
22: ; preds = %16
%23 = tail call i32 @strspn(i8* %0, i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.1, i64 0, i64 0))
%24 = icmp eq i32 %13, %23
br i1 %24, label %25, label %29
25: ; preds = %22
%26 = icmp sgt i32 %3, 0
br i1 %26, label %27, label %77
27: ; preds = %25
%28 = zext i32 %3 to i64
br label %33
29: ; preds = %22
%30 = load i32, i32* @stderr
%31 = add nsw i32 %23, 1
%32 = tail call i32 (i32, i8*, ...) @fprintf(i32 %30, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %31)
br label %84
33: ; preds = %27, %57
%34 = phi i64 [ 0, %27 ], [ %63, %57 ]
%35 = phi i8* [ %0, %27 ], [ %62, %57 ]
%36 = call i32 @sscanf(i8* %35, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.3, i64 0, i64 0), i32* %5)
%37 = icmp eq i32 %36, 1
br i1 %37, label %38, label %67
38: ; preds = %33
%39 = load i32, i32* %5
%40 = icmp ugt i32 %39, 255
br i1 %40, label %41, label %49
41: ; preds = %38
%42 = load i32, i32* @stderr
%43 = ptrtoint i8* %35 to i64
%44 = ptrtoint i8* %0 to i64
%45 = sub i64 %43, %44
%46 = trunc i64 %45 to i32
%47 = add i32 %46, 1
%48 = call i32 (i32, i8*, ...) @fprintf(i32 %42, i8* getelementptr inbounds ([56 x i8], [56 x i8]* @.str.4, i64 0, i64 0), i32 %47)
br label %84
49: ; preds = %38
%50 = trunc i32 %39 to i8
%51 = getelementptr inbounds i8, i8* %1, i64 %34
store i8 %50, i8* %51
%52 = call i8* @strchr(i8* %35, i8 signext 44)
%53 = call i8* @strchr(i8* %35, i8 signext 32)
%54 = icmp eq i8* %52, null
%55 = select i1 %54, i8* %53, i8* %52
%56 = icmp eq i8* %55, null
br i1 %56, label %75, label %57
57: ; preds = %49
%58 = icmp ne i8* %53, null
%59 = icmp ult i8* %53, %55
%60 = select i1 %58, i1 %59, i1 false
%61 = select i1 %60, i8* %53, i8* %55
%62 = getelementptr inbounds i8, i8* %61, i64 1
%63 = add nuw nsw i64 %34, 1
%64 = icmp eq i64 %63, %28
br i1 %64, label %65, label %33
65: ; preds = %57
%66 = add nuw nsw i32 %3, 1
store i32 %66, i32* %2
br label %81
67: ; preds = %33
%68 = load i32, i32* @stderr
%69 = ptrtoint i8* %35 to i64
%70 = ptrtoint i8* %0 to i64
%71 = sub i64 %69, %70
%72 = trunc i64 %71 to i32
%73 = add i32 %72, 1
%74 = call i32 (i32, i8*, ...) @fprintf(i32 %68, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.2, i64 0, i64 0), i32 %73)
br label %84
75: ; preds = %49
%76 = trunc i64 %34 to i32
br label %77
77: ; preds = %75, %25
%78 = phi i32 [ 0, %25 ], [ %76, %75 ]
%79 = add nuw nsw i32 %78, 1
store i32 %79, i32* %2
%80 = icmp eq i32 %78, %3
br i1 %80, label %81, label %84
81: ; preds = %65, %77
%82 = load i32, i32* @stderr
%83 = call i32 (i32, i8*, ...) @fprintf(i32 %82, i8* getelementptr inbounds ([40 x i8], [40 x i8]* @.str.5, i64 0, i64 0))
br label %84
84: ; preds = %77, %4, %81, %67, %41, %29, %19
%85 = phi i32 [ 1, %19 ], [ 1, %29 ], [ 1, %41 ], [ 1, %81 ], [ 1, %67 ], [ 1, %4 ], [ 0, %77 ]
ret i32 %85
}