#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 get_sections(char ***);
scalar_t__ match_string(char *, char **, int);
int /*<<< orphan*/ printf(char *, ...);
int strlen(char *);
int debian_valid_section(char *section) {
  int i, j = -1, ctr = 0;
  char subsection[512];
  char **sections;
  int no_of_sections = get_sections(&sections);
  for (i = 0; i < strlen(section); i++) {
    if (((section[i] >= 'a') && (section[i] <= 'z')) || (section[i] == '-') ||
        (section[i] == '/')) {
      if (section[i] == '/') {
        ctr++;
        j = i;
      }
    } else {
      printf("%d %c %s\nSections should only contain lower "
             "case letters or hyphens, with no spaces\n",
             (int)section[i], section[i], section);
      return 0;
    }
  }
  if (ctr > 1)
    return 0;
  if (ctr == 1) {
    for (i = 0; i < j; i++) {
      subsection[i] = section[i];
    }
    subsection[i] = 0;
    if (match_string(subsection, sections, no_of_sections) == 0) {
      printf("%s is not a permissable subsection name\n", subsection);
      return 0;
    }
    for (i = j + 1; i < strlen(section); i++) {
      subsection[i - (j + 1)] = section[i];
    }
    subsection[i - (j + 1)] = 0;
    if (match_string(subsection, sections, no_of_sections) == 0) {
      printf("%s is not a permissable subsection name\n", subsection);
      return 0;
    }
  } else {
    if (match_string(section, sections, no_of_sections) == 0) {
      printf("%s is not a permissable subsection name\n", section);
      return 0;
    }
  }
  return 1;
}


x86 assembly (clang, -O0):
<debian_valid_section>:
push   %rbp
mov    %rsp,%rbp
sub    $0x240,%rsp
mov    %rdi,-0x10(%rbp)
movl   $0xffffffff,-0x18(%rbp)
movl   $0x0,-0x1c(%rbp)
lea    -0x228(%rbp),%rdi
call   1060 <get_sections@plt>
mov    %eax,-0x22c(%rbp)
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x230(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x230(%rbp),%eax
cmp    %ecx,%eax
jge    125e <debian_valid_section+0x11e>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x61,%eax
jl     11c2 <debian_valid_section+0x82>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x7a,%eax
jle    11ec <debian_valid_section+0xac>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2d,%eax
je     11ec <debian_valid_section+0xac>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    1215 <debian_valid_section+0xd5>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    1210 <debian_valid_section+0xd0>
mov    -0x1c(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x1c(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x18(%rbp)
jmp    124b <debian_valid_section+0x10b>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%esi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
movsbl (%rax,%rcx,1),%edx
mov    -0x10(%rbp),%rcx
lea    0xdc8(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1405 <debian_valid_section+0x2c5>
jmp    1250 <debian_valid_section+0x110>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1176 <debian_valid_section+0x36>
cmpl   $0x1,-0x1c(%rbp)
jle    1274 <debian_valid_section+0x134>
movl   $0x0,-0x4(%rbp)
jmp    1405 <debian_valid_section+0x2c5>
cmpl   $0x1,-0x1c(%rbp)
jne    13bb <debian_valid_section+0x27b>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x18(%rbp),%eax
jge    12b5 <debian_valid_section+0x175>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
movslq -0x14(%rbp),%rax
mov    %cl,-0x220(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1285 <debian_valid_section+0x145>
movslq -0x14(%rbp),%rax
movb   $0x0,-0x220(%rbp,%rax,1)
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rsi
mov    -0x22c(%rbp),%edx
call   1030 <match_string@plt>
cmp    $0x0,%rax
jne    1305 <debian_valid_section+0x1c5>
lea    -0x220(%rbp),%rsi
lea    0xd63(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1405 <debian_valid_section+0x2c5>
mov    -0x18(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
mov    -0x14(%rbp),%eax
mov    %eax,-0x234(%rbp)
mov    -0x10(%rbp),%rdi
call   1040 <strlen@plt>
mov    %eax,%ecx
mov    -0x234(%rbp),%eax
cmp    %ecx,%eax
jge    135d <debian_valid_section+0x21d>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,1),%cl
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%edx
add    $0x1,%edx
sub    %edx,%eax
cltq
mov    %cl,-0x220(%rbp,%rax,1)
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    130e <debian_valid_section+0x1ce>
mov    -0x14(%rbp),%eax
mov    -0x18(%rbp),%ecx
add    $0x1,%ecx
sub    %ecx,%eax
cltq
movb   $0x0,-0x220(%rbp,%rax,1)
lea    -0x220(%rbp),%rdi
mov    -0x228(%rbp),%rsi
mov    -0x22c(%rbp),%edx
call   1030 <match_string@plt>
cmp    $0x0,%rax
jne    13b6 <debian_valid_section+0x276>
lea    -0x220(%rbp),%rsi
lea    0xcb2(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1405 <debian_valid_section+0x2c5>
jmp    13fe <debian_valid_section+0x2be>
mov    -0x10(%rbp),%rdi
mov    -0x228(%rbp),%rsi
mov    -0x22c(%rbp),%edx
call   1030 <match_string@plt>
cmp    $0x0,%rax
jne    13f9 <debian_valid_section+0x2b9>
mov    -0x10(%rbp),%rsi
lea    0xc6f(%rip),%rdi
mov    $0x0,%al
call   1050 <printf@plt>
movl   $0x0,-0x4(%rbp)
jmp    1405 <debian_valid_section+0x2c5>
jmp    13fe <debian_valid_section+0x2be>
movl   $0x1,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x240,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<debian_valid_section>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x218,%rsp
mov    %rdi,%r12
lea    0x8(%rsp),%rdi
call   1060 <get_sections@plt>
mov    %eax,%r14d
mov    %r12,%rdi
call   1040 <strlen@plt>
test   %eax,%eax
jle    1208 <debian_valid_section+0xb8>
mov    $0xffffffff,%r13d
xor    %ebx,%ebx
xor    %ebp,%ebp
jmp    11b1 <debian_valid_section+0x61>
nopl   (%rax)
xor    %eax,%eax
cmp    $0x2f,%dl
sete   %al
cmove  %ebx,%r13d
add    %eax,%ebp
add    $0x1,%rbx
mov    %r12,%rdi
call   1040 <strlen@plt>
cltq
cmp    %rax,%rbx
jge    11e0 <debian_valid_section+0x90>
movsbl (%r12,%rbx,1),%edx
lea    -0x61(%rdx),%eax
cmp    $0x1a,%al
jb     1190 <debian_valid_section+0x40>
mov    %edx,%eax
or     $0x2,%al
cmp    $0x2f,%al
je     1190 <debian_valid_section+0x40>
lea    0xe34(%rip),%rdi
xor    %r15d,%r15d
mov    %edx,%esi
mov    %r12,%rcx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    12dd <debian_valid_section+0x18d>
xor    %r15d,%r15d
cmp    $0x1,%ebp
ja     12dd <debian_valid_section+0x18d>
jne    1208 <debian_valid_section+0xb8>
test   %r13d,%r13d
jle    1239 <debian_valid_section+0xe9>
mov    %r13d,%r15d
lea    0x10(%rsp),%rdi
mov    %r12,%rsi
mov    %r15,%rdx
call   1070 <memcpy@plt>
jmp    123c <debian_valid_section+0xec>
mov    0x8(%rsp),%rsi
mov    %r12,%rdi
mov    %r14d,%edx
call   1030 <match_string@plt>
mov    $0x1,%r15d
test   %rax,%rax
jne    12dd <debian_valid_section+0x18d>
lea    0xe27(%rip),%rdi
xor    %r15d,%r15d
mov    %r12,%rsi
jmp    12d6 <debian_valid_section+0x186>
xor    %r15d,%r15d
movb   $0x0,0x10(%rsp,%r15,1)
mov    0x8(%rsp),%rsi
lea    0x10(%rsp),%r15
mov    %r15,%rdi
mov    %r14d,%edx
call   1030 <match_string@plt>
test   %rax,%rax
je     12c7 <debian_valid_section+0x177>
add    $0x1,%r13d
mov    %r12,%rdi
call   1040 <strlen@plt>
mov    %r13d,%ebx
cmp    %eax,%r13d
jge    129f <debian_valid_section+0x14f>
movslq %r13d,%rbx
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
movzbl (%r12,%rbx,1),%eax
mov    %al,(%r15)
add    $0x1,%rbx
mov    %r12,%rdi
call   1040 <strlen@plt>
cltq
add    $0x1,%r15
cmp    %rax,%rbx
jl     1280 <debian_valid_section+0x130>
sub    %r13d,%ebx
movslq %ebx,%rax
movb   $0x0,0x10(%rsp,%rax,1)
mov    0x8(%rsp),%rsi
lea    0x10(%rsp),%rdi
mov    %r14d,%edx
call   1030 <match_string@plt>
mov    $0x1,%r15d
test   %rax,%rax
jne    12dd <debian_valid_section+0x18d>
lea    0xd87(%rip),%rdi
xor    %r15d,%r15d
lea    0x10(%rsp),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r15d,%eax
add    $0x218,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [85 x i8] c"%d %c %s\0ASections should only contain lower case letters or hyphens, with no spaces\0A\00"
@.str.1 = [41 x i8] c"%s is not a permissable subsection name\0A\00"
define i32 @debian_valid_section(i8* %0) {
%2 = alloca i32
%3 = alloca i8*
%4 = alloca i32
%5 = alloca i32
%6 = alloca i32
%7 = alloca [512 x i8]
%8 = alloca i8**
%9 = alloca i32
store i8* %0, i8** %3
store i32 -1, i32* %5
store i32 0, i32* %6
%10 = call i32 @get_sections(i8*** %8)
store i32 %10, i32* %9
store i32 0, i32* %4
br label %11
11: ; preds = %77, %1
%12 = load i32, i32* %4
%13 = load i8*, i8** %3
%14 = call i32 @strlen(i8* %13)
%15 = icmp slt i32 %12, %14
br i1 %15, label %16, label %80
16: ; preds = %11
%17 = load i8*, i8** %3
%18 = load i32, i32* %4
%19 = sext i32 %18 to i64
%20 = getelementptr inbounds i8, i8* %17, i64 %19
%21 = load i8, i8* %20
%22 = sext i8 %21 to i32
%23 = icmp sge i32 %22, 97
br i1 %23, label %24, label %32
24: ; preds = %16
%25 = load i8*, i8** %3
%26 = load i32, i32* %4
%27 = sext i32 %26 to i64
%28 = getelementptr inbounds i8, i8* %25, i64 %27
%29 = load i8, i8* %28
%30 = sext i8 %29 to i32
%31 = icmp sle i32 %30, 122
br i1 %31, label %48, label %32
32: ; preds = %24, %16
%33 = load i8*, i8** %3
%34 = load i32, i32* %4
%35 = sext i32 %34 to i64
%36 = getelementptr inbounds i8, i8* %33, i64 %35
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 45
br i1 %39, label %48, label %40
40: ; preds = %32
%41 = load i8*, i8** %3
%42 = load i32, i32* %4
%43 = sext i32 %42 to i64
%44 = getelementptr inbounds i8, i8* %41, i64 %43
%45 = load i8, i8* %44
%46 = sext i8 %45 to i32
%47 = icmp eq i32 %46, 47
br i1 %47, label %48, label %61
48: ; preds = %40, %32, %24
%49 = load i8*, i8** %3
%50 = load i32, i32* %4
%51 = sext i32 %50 to i64
%52 = getelementptr inbounds i8, i8* %49, i64 %51
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
%55 = icmp eq i32 %54, 47
br i1 %55, label %56, label %60
56: ; preds = %48
%57 = load i32, i32* %6
%58 = add nsw i32 %57, 1
store i32 %58, i32* %6
%59 = load i32, i32* %4
store i32 %59, i32* %5
br label %60
60: ; preds = %56, %48
br label %76
61: ; preds = %40
%62 = load i8*, i8** %3
%63 = load i32, i32* %4
%64 = sext i32 %63 to i64
%65 = getelementptr inbounds i8, i8* %62, i64 %64
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = load i8*, i8** %3
%69 = load i32, i32* %4
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds i8, i8* %68, i64 %70
%72 = load i8, i8* %71
%73 = sext i8 %72 to i32
%74 = load i8*, i8** %3
%75 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i32 %67, i32 %73, i8* %74)
store i32 0, i32* %2
br label %166
76: ; preds = %60
br label %77
77: ; preds = %76
%78 = load i32, i32* %4
%79 = add nsw i32 %78, 1
store i32 %79, i32* %4
br label %11
80: ; preds = %11
%81 = load i32, i32* %6
%82 = icmp sgt i32 %81, 1
br i1 %82, label %83, label %84
83: ; preds = %80
store i32 0, i32* %2
br label %166
84: ; preds = %80
%85 = load i32, i32* %6
%86 = icmp eq i32 %85, 1
br i1 %86, label %87, label %155
87: ; preds = %84
store i32 0, i32* %4
br label %88
88: ; preds = %101, %87
%89 = load i32, i32* %4
%90 = load i32, i32* %5
%91 = icmp slt i32 %89, %90
br i1 %91, label %92, label %104
92: ; preds = %88
%93 = load i8*, i8** %3
%94 = load i32, i32* %4
%95 = sext i32 %94 to i64
%96 = getelementptr inbounds i8, i8* %93, i64 %95
%97 = load i8, i8* %96
%98 = load i32, i32* %4
%99 = sext i32 %98 to i64
%100 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 %99
store i8 %97, i8* %100
br label %101
101: ; preds = %92
%102 = load i32, i32* %4
%103 = add nsw i32 %102, 1
store i32 %103, i32* %4
br label %88
104: ; preds = %88
%105 = load i32, i32* %4
%106 = sext i32 %105 to i64
%107 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 %106
store i8 0, i8* %107
%108 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%109 = load i8**, i8*** %8
%110 = load i32, i32* %9
%111 = call i64 @match_string(i8* %108, i8** %109, i32 %110)
%112 = icmp eq i64 %111, 0
br i1 %112, label %113, label %116
113: ; preds = %104
%114 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%115 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %114)
store i32 0, i32* %2
br label %166
116: ; preds = %104
%117 = load i32, i32* %5
%118 = add nsw i32 %117, 1
store i32 %118, i32* %4
br label %119
119: ; preds = %136, %116
%120 = load i32, i32* %4
%121 = load i8*, i8** %3
%122 = call i32 @strlen(i8* %121)
%123 = icmp slt i32 %120, %122
br i1 %123, label %124, label %139
124: ; preds = %119
%125 = load i8*, i8** %3
%126 = load i32, i32* %4
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds i8, i8* %125, i64 %127
%129 = load i8, i8* %128
%130 = load i32, i32* %4
%131 = load i32, i32* %5
%132 = add nsw i32 %131, 1
%133 = sub nsw i32 %130, %132
%134 = sext i32 %133 to i64
%135 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 %134
store i8 %129, i8* %135
br label %136
136: ; preds = %124
%137 = load i32, i32* %4
%138 = add nsw i32 %137, 1
store i32 %138, i32* %4
br label %119
139: ; preds = %119
%140 = load i32, i32* %4
%141 = load i32, i32* %5
%142 = add nsw i32 %141, 1
%143 = sub nsw i32 %140, %142
%144 = sext i32 %143 to i64
%145 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 %144
store i8 0, i8* %145
%146 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%147 = load i8**, i8*** %8
%148 = load i32, i32* %9
%149 = call i64 @match_string(i8* %146, i8** %147, i32 %148)
%150 = icmp eq i64 %149, 0
br i1 %150, label %151, label %154
151: ; preds = %139
%152 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%153 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %152)
store i32 0, i32* %2
br label %166
154: ; preds = %139
br label %165
155: ; preds = %84
%156 = load i8*, i8** %3
%157 = load i8**, i8*** %8
%158 = load i32, i32* %9
%159 = call i64 @match_string(i8* %156, i8** %157, i32 %158)
%160 = icmp eq i64 %159, 0
br i1 %160, label %161, label %164
161: ; preds = %155
%162 = load i8*, i8** %3
%163 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %162)
store i32 0, i32* %2
br label %166
164: ; preds = %155
br label %165
165: ; preds = %164, %154
store i32 1, i32* %2
br label %166
166: ; preds = %165, %161, %151, %113, %83, %61
%167 = load i32, i32* %2
ret i32 %167
}

LLVM IR (-O2):
@.str = [85 x i8] c"%d %c %s\0ASections should only contain lower case letters or hyphens, with no spaces\0A\00"
@.str.1 = [41 x i8] c"%s is not a permissable subsection name\0A\00"
define i32 @debian_valid_section(i8* %0) {
%2 = alloca [512 x i8]
%3 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%4 = alloca i8**
%5 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 0
%6 = bitcast i8*** %4 to i8*
%7 = call i32 @get_sections(i8*** %4)
%8 = call i32 @strlen(i8* %0)
%9 = icmp sgt i32 %8, 0
br i1 %9, label %10, label %77
10: ; preds = %1, %19
%11 = phi i64 [ %25, %19 ], [ 0, %1 ]
%12 = phi i32 [ %24, %19 ], [ 0, %1 ]
%13 = phi i32 [ %22, %19 ], [ -1, %1 ]
%14 = getelementptr inbounds i8, i8* %0, i64 %11
%15 = load i8, i8* %14
%16 = add i8 %15, -97
%17 = icmp ult i8 %16, 26
br i1 %17, label %19, label %18
18: ; preds = %10
switch i8 %15, label %29 [
i8 45, label %19
i8 47, label %19
]
19: ; preds = %18, %18, %10
%20 = icmp eq i8 %15, 47
%21 = trunc i64 %11 to i32
%22 = select i1 %20, i32 %21, i32 %13
%23 = zext i1 %20 to i32
%24 = add nuw nsw i32 %12, %23
%25 = add nuw nsw i64 %11, 1
%26 = call i32 @strlen(i8* %0)
%27 = sext i32 %26 to i64
%28 = icmp slt i64 %25, %27
br i1 %28, label %10, label %32
29: ; preds = %18
%30 = sext i8 %15 to i32
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([85 x i8], [85 x i8]* @.str, i64 0, i64 0), i32 %30, i32 %30, i8* %0)
br label %83
32: ; preds = %19
%33 = icmp ugt i32 %24, 1
br i1 %33, label %83, label %34
34: ; preds = %32
%35 = icmp eq i32 %24, 1
br i1 %35, label %36, label %77
36: ; preds = %34
%37 = icmp sgt i32 %22, 0
br i1 %37, label %38, label %41
38: ; preds = %36
%39 = zext i32 %22 to i64
%40 = zext i32 %22 to i64
br label %41
41: ; preds = %38, %36
%42 = phi i64 [ 0, %36 ], [ %40, %38 ]
%43 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 %42
store i8 0, i8* %43
%44 = load i8**, i8*** %4
%45 = call i64 @match_string(i8* %5, i8** %44, i32 %7)
%46 = icmp eq i64 %45, 0
br i1 %46, label %47, label %49
47: ; preds = %41
%48 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %5)
br label %83
49: ; preds = %41
%50 = add i32 %22, 1
%51 = call i32 @strlen(i8* %0)
%52 = icmp slt i32 %50, %51
br i1 %52, label %53, label %67
53: ; preds = %49
%54 = sext i32 %50 to i64
br label %55
55: ; preds = %53, %55
%56 = phi i64 [ %54, %53 ], [ %61, %55 ]
%57 = getelementptr inbounds i8, i8* %0, i64 %56
%58 = load i8, i8* %57
%59 = sub nsw i64 %56, %54
%60 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 %59
store i8 %58, i8* %60
%61 = add nsw i64 %56, 1
%62 = call i32 @strlen(i8* %0)
%63 = sext i32 %62 to i64
%64 = icmp slt i64 %61, %63
br i1 %64, label %55, label %65
65: ; preds = %55
%66 = trunc i64 %61 to i32
br label %67
67: ; preds = %65, %49
%68 = phi i32 [ %50, %49 ], [ %66, %65 ]
%69 = sub nsw i32 %68, %50
%70 = sext i32 %69 to i64
%71 = getelementptr inbounds [512 x i8], [512 x i8]* %2, i64 0, i64 %70
store i8 0, i8* %71
%72 = load i8**, i8*** %4
%73 = call i64 @match_string(i8* %5, i8** %72, i32 %7)
%74 = icmp eq i64 %73, 0
br i1 %74, label %75, label %83
75: ; preds = %67
%76 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %5)
br label %83
77: ; preds = %1, %34
%78 = load i8**, i8*** %4
%79 = call i64 @match_string(i8* %0, i8** %78, i32 %7)
%80 = icmp eq i64 %79, 0
br i1 %80, label %81, label %83
81: ; preds = %77
%82 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([41 x i8], [41 x i8]* @.str.1, i64 0, i64 0), i8* %0)
br label %83
83: ; preds = %67, %77, %32, %81, %75, %47, %29
%84 = phi i32 [ 0, %29 ], [ 0, %47 ], [ 0, %75 ], [ 0, %81 ], [ 0, %32 ], [ 1, %77 ], [ 1, %67 ]
ret i32 %84
}