#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*/ id6;
typedef int /*<<< orphan*/ buffer;
typedef int /*<<< orphan*/ FILE;

/* Variables and functions */
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
char *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ memset(unsigned char *, int /*<<< orphan*/, int);
int /*<<< orphan*/ printf(char *, ...);
int sscanf(char *, char *, char *, int *, int *, int *, int *, char *);
long strtol(char *, int /*<<< orphan*/ *, int);
void getprefix(void) {
  FILE *ifs = fopen("/proc/net/if_inet6", "r");
  if (ifs) {
    char buffer[512];
    char ip6[40];
    int devnum;
    int preflen;
    int scope;
    int flags;
    char name[40];
    char *l = fgets(buffer, sizeof(buffer), ifs);
    while (l) {
      if (6 == sscanf(buffer, "%32[0-9a-f] %02x %02x %02x %02x %31s", ip6,
                      &devnum, &preflen, &scope, &flags, name)) {
        if (scope == 0x00) {
          unsigned char id6[33];
          int i, j;
          int bits;
          memset(id6, 0, sizeof(id6));
          for (bits = preflen, i = 0; bits > 0; bits -= 8, i++) {
            char buf[3];
            long val;
            int mask;
            int maskit[] = {0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfc, 0xfe, 0xff};
            buf[0] = ip6[i * 2];
            buf[1] = ip6[i * 2 + 1];
            buf[2] = 0;
            val = strtol(buf, NULL, 16);
            mask = (bits >= 8) ? 0xff : maskit[bits];
            id6[i] = (unsigned char)val & mask;
          }
          printf("id6: ");
          for (j = 0; j < i; j++)
            printf("%s%02x", j ? ":" : "", id6[j]);
          printf("\n");
        }
      }
      l = fgets(buffer, sizeof(buffer), ifs);
    }
    fclose(ifs);
  }
}


x86 assembly (clang, -O0):
<getprefix>:
push   %rbp
mov    %rsp,%rbp
sub    $0x310,%rsp
lea    0xe7e(%rip),%rdi
lea    0xe8a(%rip),%rsi
call   1090 <fopen@plt>
mov    %rax,-0x8(%rbp)
cmpq   $0x0,-0x8(%rbp)
je     1420 <getprefix+0x2b0>
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x200,%esi
call   1060 <fgets@plt>
mov    %rax,-0x288(%rbp)
cmpq   $0x0,-0x288(%rbp)
je     1417 <getprefix+0x2a7>
lea    -0x210(%rbp),%rdi
lea    -0x240(%rbp),%rdx
lea    -0x280(%rbp),%rax
lea    0xe32(%rip),%rsi
lea    -0x244(%rbp),%rcx
lea    -0x248(%rbp),%r8
lea    -0x24c(%rbp),%r9
lea    -0x250(%rbp),%r10
mov    %r10,(%rsp)
mov    %rax,0x8(%rsp)
call   1080 <sscanf@plt>
mov    %eax,%ecx
mov    $0x6,%eax
cmp    %ecx,%eax
jne    13f6 <getprefix+0x286>
cmpl   $0x0,-0x24c(%rbp)
jne    13f1 <getprefix+0x281>
lea    -0x2b0(%rbp),%rdi
xor    %esi,%esi
mov    $0x21,%edx
call   1050 <memset@plt>
mov    -0x248(%rbp),%eax
mov    %eax,-0x2bc(%rbp)
movl   $0x0,-0x2b4(%rbp)
cmpl   $0x0,-0x2bc(%rbp)
jle    136d <getprefix+0x1fd>
mov    0xdea(%rip),%rax
mov    %rax,-0x2f0(%rbp)
mov    0xde4(%rip),%rax
mov    %rax,-0x2e8(%rbp)
mov    0xdde(%rip),%rax
mov    %rax,-0x2e0(%rbp)
mov    0xdd8(%rip),%rax
mov    %rax,-0x2d8(%rbp)
mov    -0x2b4(%rbp),%eax
shl    $0x1,%eax
cltq
mov    -0x240(%rbp,%rax,1),%al
mov    %al,-0x2bf(%rbp)
mov    -0x2b4(%rbp),%eax
shl    $0x1,%eax
add    $0x1,%eax
cltq
mov    -0x240(%rbp,%rax,1),%al
mov    %al,-0x2be(%rbp)
movb   $0x0,-0x2bd(%rbp)
lea    -0x2bf(%rbp),%rdi
xor    %eax,%eax
mov    %eax,%esi
mov    $0x10,%edx
call   1070 <strtol@plt>
mov    %rax,-0x2c8(%rbp)
cmpl   $0x8,-0x2bc(%rbp)
jl     130a <getprefix+0x19a>
mov    $0xff,%eax
mov    %eax,-0x2f4(%rbp)
jmp    131e <getprefix+0x1ae>
movslq -0x2bc(%rbp),%rax
mov    -0x2f0(%rbp,%rax,4),%eax
mov    %eax,-0x2f4(%rbp)
mov    -0x2f4(%rbp),%eax
mov    %eax,-0x2cc(%rbp)
mov    -0x2c8(%rbp),%rax
movzbl %al,%eax
and    -0x2cc(%rbp),%eax
mov    %al,%cl
movslq -0x2b4(%rbp),%rax
mov    %cl,-0x2b0(%rbp,%rax,1)
mov    -0x2bc(%rbp),%eax
sub    $0x8,%eax
mov    %eax,-0x2bc(%rbp)
mov    -0x2b4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2b4(%rbp)
jmp    1252 <getprefix+0xe2>
lea    0xcc6(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
movl   $0x0,-0x2b8(%rbp)
mov    -0x2b8(%rbp),%eax
cmp    -0x2b4(%rbp),%eax
jge    13e3 <getprefix+0x273>
mov    -0x2b8(%rbp),%ecx
lea    0xca6(%rip),%rsi
lea    0xc9c(%rip),%rax
cmp    $0x0,%ecx
cmovne %rax,%rsi
movslq -0x2b8(%rbp),%rax
movzbl -0x2b0(%rbp,%rax,1),%edx
ff
lea    0xc78(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x2b8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x2b8(%rbp)
jmp    1385 <getprefix+0x215>
lea    0xc5f(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    13f6 <getprefix+0x286>
lea    -0x210(%rbp),%rdi
mov    -0x8(%rbp),%rdx
mov    $0x200,%esi
call   1060 <fgets@plt>
mov    %rax,-0x288(%rbp)
jmp    11b9 <getprefix+0x49>
mov    -0x8(%rbp),%rdi
call   1030 <fclose@plt>
add    $0x310,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<getprefix>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x2b8,%rsp
lea    0xe68(%rip),%rdi
lea    0xe74(%rip),%rsi
call   10a0 <fopen@plt>
test   %rax,%rax
je     1351 <getprefix+0x1d1>
lea    0xb0(%rsp),%rdi
mov    $0x200,%esi
mov    %rax,0x10(%rsp)
mov    %rax,%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     1347 <getprefix+0x1c7>
lea    0x50(%rsp),%r15
lea    0x4(%rsp),%rbp
lea    0xe34(%rip),%rbx
lea    0xb0(%rsp),%r12
lea    0xe57(%rip),%r14
lea    0xe49(%rip),%r13
jmp    1245 <getprefix+0xc5>
lea    0xe3a(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
mov    $0xa,%edi
call   1030 <putchar@plt>
lea    0x50(%rsp),%r15
lea    0x4(%rsp),%rbp
lea    0xdf3(%rip),%rbx
lea    0xb0(%rsp),%r12
mov    %r12,%rdi
mov    $0x200,%esi
mov    0x10(%rsp),%rdx
call   1070 <fgets@plt>
test   %rax,%rax
je     1347 <getprefix+0x1c7>
mov    %r12,%rdi
mov    %rbx,%rsi
lea    0x80(%rsp),%rdx
lea    0x1c(%rsp),%rcx
lea    0xc(%rsp),%r8
lea    0x8(%rsp),%r9
push   %r15
push   %rbp
call   1090 <sscanf@plt>
add    $0x10,%rsp
cmp    $0x6,%eax
jne    1222 <getprefix+0xa2>
cmpl   $0x0,0x8(%rsp)
jne    1222 <getprefix+0xa2>
lea    0x20(%rsp),%rdi
xor    %esi,%esi
mov    $0x21,%edx
call   1060 <memset@plt>
mov    0xc(%rsp),%ebx
test   %ebx,%ebx
jle    11f9 <getprefix+0x79>
lea    0xdb2(%rip),%rax
lea    (%rax,%rbx,4),%r12
xor    %r15d,%r15d
lea    0x1(%rsp),%rbp
nopw   0x0(%rax,%rax,1)
movzwl 0x80(%rsp,%r15,2),%eax
mov    %ax,0x1(%rsp)
movb   $0x0,0x3(%rsp)
mov    %rbp,%rdi
xor    %esi,%esi
mov    $0x10,%edx
call   1080 <strtol@plt>
cmp    $0x7,%ebx
jbe    12eb <getprefix+0x16b>
mov    %al,0x20(%rsp,%r15,1)
add    $0x1,%r15
add    $0xffffffffffffffe0,%r12
add    $0xfffffff8,%ebx
jne    12b0 <getprefix+0x130>
jmp    12f8 <getprefix+0x178>
and    (%r12),%eax
mov    %al,0x20(%rsp,%r15,1)
add    $0x1,%r15
lea    0xd3b(%rip),%rdi
xor    %eax,%eax
call   1050 <printf@plt>
test   %r15d,%r15d
lea    0xd2f(%rip),%rbp
je     1207 <getprefix+0x87>
xor    %ebx,%ebx
nopl   0x0(%rax,%rax,1)
test   %rbx,%rbx
mov    %r14,%rsi
cmove  %rbp,%rsi
movzbl 0x20(%rsp,%rbx,1),%edx
mov    %r13,%rdi
xor    %eax,%eax
call   1050 <printf@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1320 <getprefix+0x1a0>
jmp    1207 <getprefix+0x87>
mov    0x10(%rsp),%rdi
call   1040 <fclose@plt>
add    $0x2b8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [19 x i8] c"/proc/net/if_inet6\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [37 x i8] c"%32[0-9a-f] %02x %02x %02x %02x %31s\00"
@__const.getprefix.maskit = [8 x i32] [i32 128, i32 192, i32 224, i32 240, i32 248, i32 252, i32 254, i32 255]
@.str.3 = [6 x i8] c"id6: \00"
@.str.4 = [7 x i8] c"%s%02x\00"
@.str.5 = [2 x i8] c":\00"
@.str.6 = [1 x i8] zeroinitializer
@.str.7 = [2 x i8] c"\0A\00"
define void @getprefix() {
%1 = alloca i32*
%2 = alloca [512 x i8]
%3 = alloca [40 x i8]
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca i32
%8 = alloca [40 x i8]
%9 = alloca i8*
%10 = alloca [33 x i8]
%11 = alloca i32
%12 = alloca i32
%13 = alloca i32
%14 = alloca [3 x i8]
%15 = alloca i64
%16 = alloca i32
%17 = alloca [8 x i32]
%18 = call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %18, i32** %1
%19 = load i32*, i32** %1
%20 = icmp ne i32* %19, null
br i1 %20, label %21, label %116
21: ; preds = %0
%22 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%23 = load i32*, i32** %1
%24 = call i8* @fgets(i8* %22, i32 512, i32* %23)
store i8* %24, i8** %9
br label %25
25: ; preds = %109, %21
%26 = load i8*, i8** %9
%27 = icmp ne i8* %26, null
br i1 %27, label %28, label %113
28: ; preds = %25
%29 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%30 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 0
%31 = getelementptr inbounds [40 x i8], [40 x i8]* %8, i64 0, i64 0
%32 = call i32 @sscanf(i8* %29, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %30, i32* %4, i32* %5, i32* %6, i32* %7, i8* %31)
%33 = icmp eq i32 6, %32
br i1 %33, label %34, label %109
34: ; preds = %28
%35 = load i32, i32* %6
%36 = icmp eq i32 %35, 0
br i1 %36, label %37, label %108
37: ; preds = %34
%38 = getelementptr inbounds [33 x i8], [33 x i8]* %10, i64 0, i64 0
%39 = call i32 @memset(i8* %38, i32 0, i32 33)
%40 = load i32, i32* %5
store i32 %40, i32* %13
store i32 0, i32* %11
br label %41
41: ; preds = %81, %37
%42 = load i32, i32* %13
%43 = icmp sgt i32 %42, 0
br i1 %43, label %44, label %86
44: ; preds = %41
%45 = bitcast [8 x i32]* %17 to i8*
%46 = load i32, i32* %11
%47 = mul nsw i32 %46, 2
%48 = sext i32 %47 to i64
%49 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 %48
%50 = load i8, i8* %49
%51 = getelementptr inbounds [3 x i8], [3 x i8]* %14, i64 0, i64 0
store i8 %50, i8* %51
%52 = load i32, i32* %11
%53 = mul nsw i32 %52, 2
%54 = add nsw i32 %53, 1
%55 = sext i32 %54 to i64
%56 = getelementptr inbounds [40 x i8], [40 x i8]* %3, i64 0, i64 %55
%57 = load i8, i8* %56
%58 = getelementptr inbounds [3 x i8], [3 x i8]* %14, i64 0, i64 1
store i8 %57, i8* %58
%59 = getelementptr inbounds [3 x i8], [3 x i8]* %14, i64 0, i64 2
store i8 0, i8* %59
%60 = getelementptr inbounds [3 x i8], [3 x i8]* %14, i64 0, i64 0
%61 = call i64 @strtol(i8* %60, i32* null, i32 16)
store i64 %61, i64* %15
%62 = load i32, i32* %13
%63 = icmp sge i32 %62, 8
br i1 %63, label %64, label %65
64: ; preds = %44
br label %70
65: ; preds = %44
%66 = load i32, i32* %13
%67 = sext i32 %66 to i64
%68 = getelementptr inbounds [8 x i32], [8 x i32]* %17, i64 0, i64 %67
%69 = load i32, i32* %68
br label %70
70: ; preds = %65, %64
%71 = phi i32 [ 255, %64 ], [ %69, %65 ]
store i32 %71, i32* %16
%72 = load i64, i64* %15
%73 = trunc i64 %72 to i8
%74 = zext i8 %73 to i32
%75 = load i32, i32* %16
%76 = and i32 %74, %75
%77 = trunc i32 %76 to i8
%78 = load i32, i32* %11
%79 = sext i32 %78 to i64
%80 = getelementptr inbounds [33 x i8], [33 x i8]* %10, i64 0, i64 %79
store i8 %77, i8* %80
br label %81
81: ; preds = %70
%82 = load i32, i32* %13
%83 = sub nsw i32 %82, 8
store i32 %83, i32* %13
%84 = load i32, i32* %11
%85 = add nsw i32 %84, 1
store i32 %85, i32* %11
br label %41
86: ; preds = %41
%87 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
store i32 0, i32* %12
br label %88
88: ; preds = %103, %86
%89 = load i32, i32* %12
%90 = load i32, i32* %11
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %106
92: ; preds = %88
%93 = load i32, i32* %12
%94 = icmp ne i32 %93, 0
%95 = zext i1 %94 to i64
%96 = select i1 %94, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0)
%97 = load i32, i32* %12
%98 = sext i32 %97 to i64
%99 = getelementptr inbounds [33 x i8], [33 x i8]* %10, i64 0, i64 %98
%100 = load i8, i8* %99
%101 = zext i8 %100 to i32
%102 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %96, i32 %101)
br label %103
103: ; preds = %92
%104 = load i32, i32* %12
%105 = add nsw i32 %104, 1
store i32 %105, i32* %12
br label %88
106: ; preds = %88
%107 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.7, i64 0, i64 0))
br label %108
108: ; preds = %106, %34
br label %109
109: ; preds = %108, %28
%110 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%111 = load i32*, i32** %1
%112 = call i8* @fgets(i8* %110, i32 512, i32* %111)
store i8* %112, i8** %9
br label %25
113: ; preds = %25
%114 = load i32*, i32** %1
%115 = call i32 @fclose(i32* %114)
br label %116
116: ; preds = %113, %0
ret void
}

LLVM IR (-O2):
@.str = [19 x i8] c"/proc/net/if_inet6\00"
@.str.1 = [2 x i8] c"r\00"
@.str.2 = [37 x i8] c"%32[0-9a-f] %02x %02x %02x %02x %31s\00"
@__const.getprefix.maskit = [8 x i32] [i32 128, i32 192, i32 224, i32 240, i32 248, i32 252, i32 254, i32 255]
@.str.3 = [6 x i8] c"id6: \00"
@.str.4 = [7 x i8] c"%s%02x\00"
@.str.5 = [2 x i8] c":\00"
@.str.6 = [1 x i8] zeroinitializer
define void @getprefix() {
%1 = alloca [512 x i8]
%2 = alloca [40 x i8]
%3 = alloca i32
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [40 x i8]
%8 = alloca [33 x i8]
%9 = alloca [3 x i8]
%10 = tail call i32* @fopen(i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%11 = icmp eq i32* %10, null
br i1 %11, label %89, label %12
12: ; preds = %0
%13 = getelementptr inbounds [512 x i8], [512 x i8]* %1, i64 0, i64 0
%14 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 0
%15 = bitcast i32* %3 to i8*
%16 = bitcast i32* %4 to i8*
%17 = bitcast i32* %5 to i8*
%18 = bitcast i32* %6 to i8*
%19 = getelementptr inbounds [40 x i8], [40 x i8]* %7, i64 0, i64 0
%20 = call i8* @fgets(i8* %13, i32 512, i32* %10)
%21 = icmp eq i8* %20, null
br i1 %21, label %87, label %22
22: ; preds = %12
%23 = getelementptr inbounds [33 x i8], [33 x i8]* %8, i64 0, i64 0
%24 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 0
%25 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 1
%26 = getelementptr inbounds [3 x i8], [3 x i8]* %9, i64 0, i64 2
br label %27
27: ; preds = %22, %84
%28 = call i32 @sscanf(i8* %13, i8* getelementptr inbounds ([37 x i8], [37 x i8]* @.str.2, i64 0, i64 0), i8* %14, i32* %3, i32* %4, i32* %5, i32* %6, i8* %19)
%29 = icmp eq i32 %28, 6
%30 = load i32, i32* %5
%31 = icmp eq i32 %30, 0
%32 = select i1 %29, i1 %31, i1 false
br i1 %32, label %33, label %84
33: ; preds = %27
%34 = call i32 @memset(i8* %23, i32 0, i32 33)
%35 = load i32, i32* %4
%36 = icmp sgt i32 %35, 0
br i1 %36, label %39, label %37
37: ; preds = %33
%38 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
br label %82
39: ; preds = %33, %59
%40 = phi i64 [ %63, %59 ], [ 0, %33 ]
%41 = phi i32 [ %62, %59 ], [ %35, %33 ]
%42 = shl nuw nsw i64 %40, 1
%43 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 %42
%44 = load i8, i8* %43
store i8 %44, i8* %24
%45 = or i64 %42, 1
%46 = getelementptr inbounds [40 x i8], [40 x i8]* %2, i64 0, i64 %45
%47 = load i8, i8* %46
store i8 %47, i8* %25
store i8 0, i8* %26
%48 = call i64 @strtol(i8* nocapture %24, i32* null, i32 16)
%49 = icmp ugt i32 %41, 7
br i1 %49, label %59, label %50
50: ; preds = %39
%51 = zext i32 %41 to i64
%52 = getelementptr inbounds [8 x i32], [8 x i32]* @__const.getprefix.maskit, i64 0, i64 %51
%53 = load i32, i32* %52
%54 = trunc i64 %48 to i32
%55 = and i32 %53, %54
%56 = trunc i32 %55 to i8
%57 = getelementptr inbounds [33 x i8], [33 x i8]* %8, i64 0, i64 %40
store i8 %56, i8* %57
%58 = add nuw nsw i64 %40, 1
br label %65
59: ; preds = %39
%60 = trunc i64 %48 to i8
%61 = getelementptr inbounds [33 x i8], [33 x i8]* %8, i64 0, i64 %40
store i8 %60, i8* %61
%62 = add nsw i32 %41, -8
%63 = add nuw nsw i64 %40, 1
%64 = icmp eq i32 %41, 8
br i1 %64, label %65, label %39
65: ; preds = %59, %50
%66 = phi i64 [ %58, %50 ], [ %63, %59 ]
%67 = trunc i64 %66 to i32
%68 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.3, i64 0, i64 0))
%69 = icmp eq i32 %67, 0
br i1 %69, label %82, label %70
70: ; preds = %65
%71 = and i64 %66, 4294967295
br label %72
72: ; preds = %70, %72
%73 = phi i64 [ 0, %70 ], [ %80, %72 ]
%74 = icmp eq i64 %73, 0
%75 = select i1 %74, i8* getelementptr inbounds ([1 x i8], [1 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.5, i64 0, i64 0)
%76 = getelementptr inbounds [33 x i8], [33 x i8]* %8, i64 0, i64 %73
%77 = load i8, i8* %76
%78 = zext i8 %77 to i32
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.4, i64 0, i64 0), i8* %75, i32 %78)
%80 = add nuw nsw i64 %73, 1
%81 = icmp eq i64 %80, %71
br i1 %81, label %82, label %72
82: ; preds = %72, %37, %65
%83 = call i32 @putchar(i32 10)
br label %84
84: ; preds = %82, %27
%85 = call i8* @fgets(i8* %13, i32 512, i32* %10)
%86 = icmp eq i8* %85, null
br i1 %86, label %87, label %27
87: ; preds = %84, %12
%88 = call i32 @fclose(i32* %10)
br label %89
89: ; preds = %87, %0
ret void
}