#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*/ FILE;

/* Variables and functions */
scalar_t__ EOF;
int errno;
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ *fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, char *, char *);
scalar_t__ fputs(char *, int /*<<< orphan*/ *);
int /*<<< orphan*/ printf(char *, ...);
scalar_t__ remove(char *);
scalar_t__ rename(char *, char *);
int /*<<< orphan*/ semPautounlock(int, int);
int /*<<< orphan*/ semV(int);
int /*<<< orphan*/ sprintf(char *, char *, char *, ...);
char *strerror(int);
scalar_t__ strlen(char *);
char *strstr(char *, char *);
scalar_t__ time(int /*<<< orphan*/ *);
int gwConfigEditOption(char *filename, char *section, char *option,
                       char *strval) {
  char tmpfilename[40];
  FILE *fp_in, *fp_out;
  char line[202];
  int ret = 0, found = 0, insection = 0;
  char *s;
  semPautounlock(151002, 10);
  printf("GW locked\n");
  printf("Finding option %s in section %s and replace value with %s\n", option,
         section, strval);
  sprintf(tmpfilename, "%s_tmp", filename);
  if ((fp_in = fopen(filename, "r")) != NULL) {
    if ((fp_out = fopen(tmpfilename, "w+")) != NULL) {
      ret = 1;
      while (ret && fgets(line, 200, fp_in) != NULL) {
        printf("Line: %s", line);
        if ((s = strstr(line, "config")) != NULL) {
          if (strstr(s, section) != NULL) {
            insection = 1;
            printf("In section %s\n", section);
          } else if (insection) {
            insection = 0;
            printf("Out of section again\n");
          }
        } else if ((s = strstr(line, "option")) != NULL) {
          if (insection) {
            if ((s = strstr(s, option)) != NULL) {
              printf("Option %s found: replace with %s\n", option, strval);
              found = 1;
              s += strlen(option);
              while (*s == ' ' || *s == '\t')
                s++;
              sprintf(s, "%s\n", strval);
            }
          }
        } else {
          s = line;
          while (*s == ' ' || *s == '\t' || *s == '\n')
            s++;
          if (strlen(s) == 0) {
            printf("Empty line (%d/%d)\n", insection, found);
            if (insection) {
              if (!found) {
                found = 1;
                printf("Adding option %s with value %s\n", option, strval);
                fprintf(fp_out, "\toption %s %s\n", option, strval);
              }
              insection = 0;
              printf("Out of section again\n");
            }
          }
        }
        if (fputs(line, fp_out) == EOF) {
          ret = 0;
        }
      }
      fclose(fp_out);
    } else {
      printf("Error %d opening temporary config file (%s): %s\n", errno,
             tmpfilename, strerror(errno));
    }
    fclose(fp_in);
    if (ret) {
      ret = 0;
      if (found) {
        sprintf(line, "%s_%d", filename, (int)time(NULL));
        if (rename(filename, line) == 0) {
          ret = (rename(tmpfilename, filename) == 0);
        }
      } else {
        if ((ret = (remove(tmpfilename) == 0)))
          ret = -1;
      }
    }
  } else {
    printf("Error %d opening config file (%s): %s\n", errno, filename,
           strerror(errno));
  }
  printf("GW unlocked\n");
  semV(151002);
  return (ret);
}


x86 assembly (clang, -O0):
<gwConfigEditOption>:
push   %rbp
mov    %rsp,%rbp
sub    $0x180,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
movl   $0x0,-0x134(%rbp)
movl   $0x0,-0x138(%rbp)
movl   $0x0,-0x13c(%rbp)
mov    $0x24dda,%edi
mov    $0xa,%esi
call   1100 <semPautounlock@plt>
lea    0xdc1(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x18(%rbp),%rsi
mov    -0x10(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xdb2(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rdx
lea    0xdd7(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xdcc(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x58(%rbp)
cmp    $0x0,%rax
je     174f <gwConfigEditOption+0x55f>
lea    -0x50(%rbp),%rdi
lea    0xdb0(%rip),%rsi
call   10c0 <fopen@plt>
mov    %rax,-0x60(%rbp)
cmp    $0x0,%rax
je     161a <gwConfigEditOption+0x42a>
movl   $0x1,-0x134(%rbp)
xor    %eax,%eax
cmpl   $0x0,-0x134(%rbp)
mov    %al,-0x149(%rbp)
je     12f3 <gwConfigEditOption+0x103>
lea    -0x130(%rbp),%rdi
mov    -0x58(%rbp),%rdx
mov    $0xc8,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x149(%rbp)
mov    -0x149(%rbp),%al
test   $0x1,%al
jne    1306 <gwConfigEditOption+0x116>
jmp    160c <gwConfigEditOption+0x41c>
lea    -0x130(%rbp),%rsi
lea    0xd3e(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    -0x130(%rbp),%rdi
lea    0xd32(%rip),%rsi
call   1110 <strstr@plt>
mov    %rax,-0x148(%rbp)
cmp    $0x0,%rax
je     13a9 <gwConfigEditOption+0x1b9>
mov    -0x148(%rbp),%rdi
mov    -0x10(%rbp),%rsi
call   1110 <strstr@plt>
cmp    $0x0,%rax
je     137a <gwConfigEditOption+0x18a>
movl   $0x1,-0x13c(%rbp)
mov    -0x10(%rbp),%rsi
lea    0xcf4(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13a4 <gwConfigEditOption+0x1b4>
cmpl   $0x0,-0x13c(%rbp)
je     139f <gwConfigEditOption+0x1af>
movl   $0x0,-0x13c(%rbp)
lea    0xcd9(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    13a4 <gwConfigEditOption+0x1b4>
jmp    15dd <gwConfigEditOption+0x3ed>
lea    -0x130(%rbp),%rdi
lea    0xcd0(%rip),%rsi
call   1110 <strstr@plt>
mov    %rax,-0x148(%rbp)
cmp    $0x0,%rax
je     14b0 <gwConfigEditOption+0x2c0>
cmpl   $0x0,-0x13c(%rbp)
je     14ab <gwConfigEditOption+0x2bb>
mov    -0x148(%rbp),%rdi
mov    -0x18(%rbp),%rsi
call   1110 <strstr@plt>
mov    %rax,-0x148(%rbp)
cmp    $0x0,%rax
je     14a6 <gwConfigEditOption+0x2b6>
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xc84(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
movl   $0x1,-0x138(%rbp)
mov    -0x18(%rbp),%rdi
call   1050 <strlen@plt>
add    -0x148(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0x148(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x14a(%rbp)
je     1463 <gwConfigEditOption+0x273>
mov    -0x148(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x9,%eax
sete   %al
mov    %al,-0x14a(%rbp)
mov    -0x14a(%rbp),%al
test   $0x1,%al
jne    1476 <gwConfigEditOption+0x286>
jmp    148d <gwConfigEditOption+0x29d>
mov    -0x148(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x148(%rbp)
jmp    1432 <gwConfigEditOption+0x242>
mov    -0x148(%rbp),%rdi
mov    -0x20(%rbp),%rdx
lea    0xcae(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
jmp    14ab <gwConfigEditOption+0x2bb>
jmp    15d8 <gwConfigEditOption+0x3e8>
lea    -0x130(%rbp),%rax
mov    %rax,-0x148(%rbp)
mov    -0x148(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x20,%ecx
mov    %al,-0x14b(%rbp)
je     150a <gwConfigEditOption+0x31a>
mov    -0x148(%rbp),%rax
movsbl (%rax),%ecx
mov    $0x1,%al
cmp    $0x9,%ecx
mov    %al,-0x14b(%rbp)
je     150a <gwConfigEditOption+0x31a>
mov    -0x148(%rbp),%rax
movsbl (%rax),%eax
cmp    $0xa,%eax
sete   %al
mov    %al,-0x14b(%rbp)
mov    -0x14b(%rbp),%al
test   $0x1,%al
jne    151d <gwConfigEditOption+0x32d>
jmp    1534 <gwConfigEditOption+0x344>
mov    -0x148(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x148(%rbp)
jmp    14be <gwConfigEditOption+0x2ce>
mov    -0x148(%rbp),%rdi
call   1050 <strlen@plt>
cmp    $0x0,%rax
jne    15d3 <gwConfigEditOption+0x3e3>
mov    -0x13c(%rbp),%esi
mov    -0x138(%rbp),%edx
lea    0xb53(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
cmpl   $0x0,-0x13c(%rbp)
je     15ce <gwConfigEditOption+0x3de>
cmpl   $0x0,-0x138(%rbp)
jne    15b6 <gwConfigEditOption+0x3c6>
movl   $0x1,-0x138(%rbp)
mov    -0x18(%rbp),%rsi
mov    -0x20(%rbp),%rdx
lea    0xb2d(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x60(%rbp),%rdi
mov    -0x18(%rbp),%rdx
mov    -0x20(%rbp),%rcx
lea    0xb33(%rip),%rsi
call   10a0 <fprintf@plt>
movl   $0x0,-0x13c(%rbp)
lea    0xaaa(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
jmp    15d3 <gwConfigEditOption+0x3e3>
jmp    15d8 <gwConfigEditOption+0x3e8>
jmp    15dd <gwConfigEditOption+0x3ed>
lea    -0x130(%rbp),%rdi
mov    -0x60(%rbp),%rsi
call   1070 <fputs@plt>
mov    0x29f4(%rip),%rcx
cmp    (%rcx),%rax
jne    1607 <gwConfigEditOption+0x417>
movl   $0x0,-0x134(%rbp)
jmp    12bc <gwConfigEditOption+0xcc>
mov    -0x60(%rbp),%rdi
call   1040 <fclose@plt>
jmp    1660 <gwConfigEditOption+0x470>
mov    0x29b7(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x15c(%rbp)
lea    -0x50(%rbp),%rax
mov    %rax,-0x158(%rbp)
mov    0x299d(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x15c(%rbp),%esi
mov    -0x158(%rbp),%rdx
mov    %rax,%rcx
lea    0xa9a(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    -0x58(%rbp),%rdi
call   1040 <fclose@plt>
cmpl   $0x0,-0x134(%rbp)
je     174a <gwConfigEditOption+0x55a>
movl   $0x0,-0x134(%rbp)
cmpl   $0x0,-0x138(%rbp)
je     170b <gwConfigEditOption+0x51b>
lea    -0x130(%rbp),%rax
mov    %rax,-0x170(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x168(%rbp)
xor    %eax,%eax
mov    %eax,%edi
call   10b0 <time@plt>
mov    -0x170(%rbp),%rdi
mov    -0x168(%rbp),%rdx
mov    %eax,%ecx
lea    0xa5e(%rip),%rsi
mov    $0x0,%al
call   10e0 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x130(%rbp),%rsi
call   10d0 <rename@plt>
cmp    $0x0,%rax
jne    1706 <gwConfigEditOption+0x516>
lea    -0x50(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   10d0 <rename@plt>
cmp    $0x0,%rax
sete   %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x134(%rbp)
jmp    1745 <gwConfigEditOption+0x555>
lea    -0x50(%rbp),%rdi
call   1030 <remove@plt>
cmp    $0x0,%rax
sete   %al
mov    %al,%cl
and    $0x1,%cl
movzbl %cl,%ecx
mov    %ecx,-0x134(%rbp)
test   $0x1,%al
jne    1736 <gwConfigEditOption+0x546>
jmp    1740 <gwConfigEditOption+0x550>
movl   $0xffffffff,-0x134(%rbp)
ff ff ff
jmp    1745 <gwConfigEditOption+0x555>
jmp    174a <gwConfigEditOption+0x55a>
jmp    1795 <gwConfigEditOption+0x5a5>
mov    0x2882(%rip),%rax
mov    (%rax),%eax
mov    %eax,-0x17c(%rbp)
mov    -0x8(%rbp),%rax
mov    %rax,-0x178(%rbp)
mov    0x2868(%rip),%rax
mov    (%rax),%edi
call   10f0 <strerror@plt>
mov    -0x17c(%rbp),%esi
mov    -0x178(%rbp),%rdx
mov    %rax,%rcx
lea    0x99c(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
lea    0x9b5(%rip),%rdi
mov    $0x0,%al
call   1060 <printf@plt>
mov    $0x24dda,%edi
call   1080 <semV@plt>
mov    -0x134(%rbp),%eax
add    $0x180,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<gwConfigEditOption>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x138,%rsp
mov    %rcx,%r15
mov    %rdx,%rbp
mov    %rsi,%rbx
mov    %rdi,%r14
mov    $0x24dda,%edi
mov    $0xa,%esi
call   1110 <semPautounlock@plt>
lea    0xefd(%rip),%rdi
call   1040 <puts@plt>
lea    0xdc1(%rip),%rdi
xor    %r12d,%r12d
mov    %rbp,0x28(%rsp)
mov    %rbp,%rsi
mov    %rbx,0x8(%rsp)
mov    %rbx,%rdx
mov    %r15,0x10(%rsp)
mov    %r15,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
lea    0xdd3(%rip),%rsi
lea    0x30(%rsp),%rdi
mov    %r14,%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
lea    0xdc4(%rip),%rsi
mov    %r14,%rdi
call   10d0 <fopen@plt>
test   %rax,%rax
je     1563 <gwConfigEditOption+0x363>
mov    %rax,%r13
lea    0xdab(%rip),%rsi
lea    0x30(%rsp),%rdi
call   10d0 <fopen@plt>
mov    %rax,0x18(%rsp)
test   %rax,%rax
je     158b <gwConfigEditOption+0x38b>
mov    %r14,0x20(%rsp)
lea    0x60(%rsp),%r14
xor    %r12d,%r12d
movl   $0x0,0x4(%rsp)
mov    0x8(%rsp),%rbx
jmp    1306 <gwConfigEditOption+0x106>
nopl   (%rax)
lea    0xd80(%rip),%rdi
mov    %rbx,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    $0x1,%ebp
mov    %r14,%rdi
mov    0x18(%rsp),%rsi
call   1080 <fputs@plt>
mov    %ebp,%r12d
mov    0x2ceb(%rip),%rcx
cmp    (%rcx),%rax
je     14e5 <gwConfigEditOption+0x2e5>
mov    %r14,%rdi
mov    $0xc8,%esi
mov    %r13,%rdx
call   10a0 <fgets@plt>
mov    %rax,%r15
test   %rax,%rax
je     14e5 <gwConfigEditOption+0x2e5>
lea    0xd1e(%rip),%rdi
mov    %r14,%rsi
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r14,%rdi
lea    0xd13(%rip),%rsi
call   1120 <strstr@plt>
test   %rax,%rax
je     1380 <gwConfigEditOption+0x180>
mov    %rax,%rdi
mov    %rbx,%rsi
call   1120 <strstr@plt>
test   %rax,%rax
jne    12d0 <gwConfigEditOption+0xd0>
xor    %ebp,%ebp
test   %r12d,%r12d
je     12e6 <gwConfigEditOption+0xe6>
lea    0xddd(%rip),%rdi
call   1040 <puts@plt>
jmp    12e6 <gwConfigEditOption+0xe6>
cs nopw 0x0(%rax,%rax,1)
nopl   (%rax)
mov    %r14,%rdi
lea    0xcdc(%rip),%rsi
call   1120 <strstr@plt>
test   %rax,%rax
je     1423 <gwConfigEditOption+0x223>
test   %r12d,%r12d
je     14c7 <gwConfigEditOption+0x2c7>
mov    %rax,%rdi
mov    0x28(%rsp),%rbx
mov    %rbx,%rsi
call   1120 <strstr@plt>
test   %rax,%rax
je     14d6 <gwConfigEditOption+0x2d6>
mov    %rax,%rbp
lea    0xca9(%rip),%rdi
mov    %rbx,%rsi
mov    0x10(%rsp),%rdx
xor    %eax,%eax
call   1070 <printf@plt>
mov    %rbx,%rdi
call   1060 <strlen@plt>
add    %rax,%rbp
mov    0x8(%rsp),%rbx
jmp    13f4 <gwConfigEditOption+0x1f4>
cs nopw 0x0(%rax,%rax,1)
nop
add    $0x1,%rbp
movzbl 0x0(%rbp),%eax
cmp    $0x20,%al
je     13f0 <gwConfigEditOption+0x1f0>
cmp    $0x9,%al
je     13f0 <gwConfigEditOption+0x1f0>
mov    %rbp,%rdi
lea    0xd22(%rip),%rsi
mov    0x10(%rsp),%rdx
xor    %eax,%eax
call   10f0 <sprintf@plt>
movl   $0x1,0x4(%rsp)
jmp    12e1 <gwConfigEditOption+0xe1>
mov    %r14,%rax
mov    0x4(%rsp),%edx
jmp    1434 <gwConfigEditOption+0x234>
nopl   0x0(%rax)
add    $0x1,%rax
movzbl (%rax),%ecx
lea    -0x9(%rcx),%esi
cmp    $0x2,%sil
jb     1430 <gwConfigEditOption+0x230>
cmp    $0x20,%cl
je     1430 <gwConfigEditOption+0x230>
test   %cl,%cl
jne    14ce <gwConfigEditOption+0x2ce>
xor    %ebp,%ebp
lea    0xc39(%rip),%rdi
mov    %r12d,%esi
xor    %eax,%eax
mov    %edx,0x4(%rsp)
call   1070 <printf@plt>
test   %r12d,%r12d
je     12e6 <gwConfigEditOption+0xe6>
cmpl   $0x0,0x4(%rsp)
jne    14ae <gwConfigEditOption+0x2ae>
lea    0xc28(%rip),%rdi
mov    0x28(%rsp),%rbx
mov    %rbx,%rsi
mov    0x10(%rsp),%r12
mov    %r12,%rdx
xor    %eax,%eax
call   1070 <printf@plt>
mov    0x18(%rsp),%rdi
lea    0xc25(%rip),%rsi
mov    %rbx,%rdx
mov    0x8(%rsp),%rbx
mov    %r12,%rcx
call   10b0 <fprintf@plt>
lea    0xc91(%rip),%rdi
call   1040 <puts@plt>
movl   $0x1,0x4(%rsp)
jmp    12e6 <gwConfigEditOption+0xe6>
xor    %ebp,%ebp
jmp    12e6 <gwConfigEditOption+0xe6>
mov    %r12d,%ebp
jmp    12e6 <gwConfigEditOption+0xe6>
mov    $0x1,%ebp
mov    0x8(%rsp),%rbx
jmp    12e6 <gwConfigEditOption+0xe6>
mov    0x18(%rsp),%rdi
call   1050 <fclose@plt>
mov    %r13,%rdi
call   1050 <fclose@plt>
xor    %r12d,%r12d
test   %r15,%r15
jne    15c1 <gwConfigEditOption+0x3c1>
cmpl   $0x0,0x4(%rsp)
je     15ec <gwConfigEditOption+0x3ec>
xor    %r12d,%r12d
xor    %edi,%edi
call   10c0 <time@plt>
lea    0xbe4(%rip),%rsi
lea    0x60(%rsp),%rbx
mov    %rbx,%rdi
mov    0x20(%rsp),%rbp
mov    %rbp,%rdx
mov    %eax,%ecx
xor    %eax,%eax
call   10f0 <sprintf@plt>
mov    %rbp,%rdi
mov    %rbx,%rsi
call   10e0 <rename@plt>
test   %rax,%rax
jne    15c1 <gwConfigEditOption+0x3c1>
lea    0x30(%rsp),%rdi
mov    0x20(%rsp),%rsi
call   10e0 <rename@plt>
xor    %r12d,%r12d
test   %rax,%rax
sete   %r12b
jmp    15c1 <gwConfigEditOption+0x3c1>
mov    0x2a6e(%rip),%rax
mov    (%rax),%ebx
mov    %ebx,%edi
call   1100 <strerror@plt>
lea    0xb8f(%rip),%rdi
mov    %ebx,%esi
mov    %r14,%rdx
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
jmp    15c1 <gwConfigEditOption+0x3c1>
mov    0x2a46(%rip),%rax
mov    (%rax),%r14d
mov    %r14d,%edi
call   1100 <strerror@plt>
lea    0xb2e(%rip),%rdi
xor    %r12d,%r12d
lea    0x30(%rsp),%rdx
mov    %r14d,%esi
mov    %rax,%rcx
xor    %eax,%eax
call   1070 <printf@plt>
mov    %r13,%rdi
call   1050 <fclose@plt>
lea    0xb72(%rip),%rdi
call   1040 <puts@plt>
mov    $0x24dda,%edi
call   1090 <semV@plt>
mov    %r12d,%eax
add    $0x138,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
lea    0x30(%rsp),%rdi
call   1030 <remove@plt>
cmp    $0x1,%rax
sbb    %r12d,%r12d
jmp    15c1 <gwConfigEditOption+0x3c1>

LLVM IR (-O0):
@.str = [11 x i8] c"GW locked\0A\00"
@.str.1 = [59 x i8] c"Finding option %s in section %s and replace value with %s\0A\00"
@.str.2 = [7 x i8] c"%s_tmp\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [3 x i8] c"w+\00"
@.str.5 = [9 x i8] c"Line: %s\00"
@.str.6 = [7 x i8] c"config\00"
@.str.7 = [15 x i8] c"In section %s\0A\00"
@.str.8 = [22 x i8] c"Out of section again\0A\00"
@.str.9 = [7 x i8] c"option\00"
@.str.10 = [34 x i8] c"Option %s found: replace with %s\0A\00"
@.str.11 = [4 x i8] c"%s\0A\00"
@.str.12 = [20 x i8] c"Empty line (%d/%d)\0A\00"
@.str.13 = [32 x i8] c"Adding option %s with value %s\0A\00"
@.str.14 = [15 x i8] c"\09option %s %s\0A\00"
@EOF = global i64 0
@.str.15 = [49 x i8] c"Error %d opening temporary config file (%s): %s\0A\00"
@errno = global i32 0
@.str.16 = [6 x i8] c"%s_%d\00"
@.str.17 = [39 x i8] c"Error %d opening config file (%s): %s\0A\00"
@.str.18 = [13 x i8] c"GW unlocked\0A\00"
define i32 @gwConfigEditOption(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca i8*
%6 = alloca i8*
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca [40 x i8]
%10 = alloca i32*
%11 = alloca i32*
%12 = alloca [202 x i8]
%13 = alloca i32
%14 = alloca i32
%15 = alloca i32
%16 = alloca i8*
store i8* %0, i8** %5
store i8* %1, i8** %6
store i8* %2, i8** %7
store i8* %3, i8** %8
store i32 0, i32* %13
store i32 0, i32* %14
store i32 0, i32* %15
%17 = call i32 @semPautounlock(i32 151002, i32 10)
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str, i64 0, i64 0))
%19 = load i8*, i8** %7
%20 = load i8*, i8** %6
%21 = load i8*, i8** %8
%22 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i8* %19, i8* %20, i8* %21)
%23 = getelementptr inbounds [40 x i8], [40 x i8]* %9, i64 0, i64 0
%24 = load i8*, i8** %5
%25 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %23, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %24)
%26 = load i8*, i8** %5
%27 = call i32* @fopen(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
store i32* %27, i32** %10
%28 = icmp ne i32* %27, null
br i1 %28, label %29, label %205
29: ; preds = %4
%30 = getelementptr inbounds [40 x i8], [40 x i8]* %9, i64 0, i64 0
%31 = call i32* @fopen(i8* %30, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
store i32* %31, i32** %11
%32 = icmp ne i32* %31, null
br i1 %32, label %33, label %165
33: ; preds = %29
store i32 1, i32* %13
br label %34
34: ; preds = %161, %33
%35 = load i32, i32* %13
%36 = icmp ne i32 %35, 0
br i1 %36, label %37, label %42
37: ; preds = %34
%38 = getelementptr inbounds [202 x i8], [202 x i8]* %12, i64 0, i64 0
%39 = load i32*, i32** %10
%40 = call i32* @fgets(i8* %38, i32 200, i32* %39)
%41 = icmp ne i32* %40, null
br label %42
42: ; preds = %37, %34
%43 = phi i1 [ false, %34 ], [ %41, %37 ]
br i1 %43, label %44, label %162
44: ; preds = %42
%45 = getelementptr inbounds [202 x i8], [202 x i8]* %12, i64 0, i64 0
%46 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* %45)
%47 = getelementptr inbounds [202 x i8], [202 x i8]* %12, i64 0, i64 0
%48 = call i8* @strstr(i8* %47, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
store i8* %48, i8** %16
%49 = icmp ne i8* %48, null
br i1 %49, label %50, label %65
50: ; preds = %44
%51 = load i8*, i8** %16
%52 = load i8*, i8** %6
%53 = call i8* @strstr(i8* %51, i8* %52)
%54 = icmp ne i8* %53, null
br i1 %54, label %55, label %58
55: ; preds = %50
store i32 1, i32* %15
%56 = load i8*, i8** %6
%57 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %56)
br label %64
58: ; preds = %50
%59 = load i32, i32* %15
%60 = icmp ne i32 %59, 0
br i1 %60, label %61, label %63
61: ; preds = %58
store i32 0, i32* %15
%62 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0))
br label %63
63: ; preds = %61, %58
br label %64
64: ; preds = %63, %55
br label %154
65: ; preds = %44
%66 = getelementptr inbounds [202 x i8], [202 x i8]* %12, i64 0, i64 0
%67 = call i8* @strstr(i8* %66, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
store i8* %67, i8** %16
%68 = icmp ne i8* %67, null
br i1 %68, label %69, label %106
69: ; preds = %65
%70 = load i32, i32* %15
%71 = icmp ne i32 %70, 0
br i1 %71, label %72, label %105
72: ; preds = %69
%73 = load i8*, i8** %16
%74 = load i8*, i8** %7
%75 = call i8* @strstr(i8* %73, i8* %74)
store i8* %75, i8** %16
%76 = icmp ne i8* %75, null
br i1 %76, label %77, label %104
77: ; preds = %72
%78 = load i8*, i8** %7
%79 = load i8*, i8** %8
%80 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i8* %78, i8* %79)
store i32 1, i32* %14
%81 = load i8*, i8** %7
%82 = call i64 @strlen(i8* %81)
%83 = load i8*, i8** %16
%84 = getelementptr inbounds i8, i8* %83, i64 %82
store i8* %84, i8** %16
br label %85
85: ; preds = %97, %77
%86 = load i8*, i8** %16
%87 = load i8, i8* %86
%88 = sext i8 %87 to i32
%89 = icmp eq i32 %88, 32
br i1 %89, label %95, label %90
90: ; preds = %85
%91 = load i8*, i8** %16
%92 = load i8, i8* %91
%93 = sext i8 %92 to i32
%94 = icmp eq i32 %93, 9
br label %95
95: ; preds = %90, %85
%96 = phi i1 [ true, %85 ], [ %94, %90 ]
br i1 %96, label %97, label %100
97: ; preds = %95
%98 = load i8*, i8** %16
%99 = getelementptr inbounds i8, i8* %98, i32 1
store i8* %99, i8** %16
br label %85
100: ; preds = %95
%101 = load i8*, i8** %16
%102 = load i8*, i8** %8
%103 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %101, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* %102)
br label %104
104: ; preds = %100, %72
br label %105
105: ; preds = %104, %69
br label %153
106: ; preds = %65
%107 = getelementptr inbounds [202 x i8], [202 x i8]* %12, i64 0, i64 0
store i8* %107, i8** %16
br label %108
108: ; preds = %125, %106
%109 = load i8*, i8** %16
%110 = load i8, i8* %109
%111 = sext i8 %110 to i32
%112 = icmp eq i32 %111, 32
br i1 %112, label %123, label %113
113: ; preds = %108
%114 = load i8*, i8** %16
%115 = load i8, i8* %114
%116 = sext i8 %115 to i32
%117 = icmp eq i32 %116, 9
br i1 %117, label %123, label %118
118: ; preds = %113
%119 = load i8*, i8** %16
%120 = load i8, i8* %119
%121 = sext i8 %120 to i32
%122 = icmp eq i32 %121, 10
br label %123
123: ; preds = %118, %113, %108
%124 = phi i1 [ true, %113 ], [ true, %108 ], [ %122, %118 ]
br i1 %124, label %125, label %128
125: ; preds = %123
%126 = load i8*, i8** %16
%127 = getelementptr inbounds i8, i8* %126, i32 1
store i8* %127, i8** %16
br label %108
128: ; preds = %123
%129 = load i8*, i8** %16
%130 = call i64 @strlen(i8* %129)
%131 = icmp eq i64 %130, 0
br i1 %131, label %132, label %152
132: ; preds = %128
%133 = load i32, i32* %15
%134 = load i32, i32* %14
%135 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %133, i32 %134)
%136 = load i32, i32* %15
%137 = icmp ne i32 %136, 0
br i1 %137, label %138, label %151
138: ; preds = %132
%139 = load i32, i32* %14
%140 = icmp ne i32 %139, 0
br i1 %140, label %149, label %141
141: ; preds = %138
store i32 1, i32* %14
%142 = load i8*, i8** %7
%143 = load i8*, i8** %8
%144 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0), i8* %142, i8* %143)
%145 = load i32*, i32** %11
%146 = load i8*, i8** %7
%147 = load i8*, i8** %8
%148 = call i32 @fprintf(i32* %145, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i8* %146, i8* %147)
br label %149
149: ; preds = %141, %138
store i32 0, i32* %15
%150 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.8, i64 0, i64 0))
br label %151
151: ; preds = %149, %132
br label %152
152: ; preds = %151, %128
br label %153
153: ; preds = %152, %105
br label %154
154: ; preds = %153, %64
%155 = getelementptr inbounds [202 x i8], [202 x i8]* %12, i64 0, i64 0
%156 = load i32*, i32** %11
%157 = call i64 @fputs(i8* %155, i32* %156)
%158 = load i64, i64* @EOF
%159 = icmp eq i64 %157, %158
br i1 %159, label %160, label %161
160: ; preds = %154
store i32 0, i32* %13
br label %161
161: ; preds = %160, %154
br label %34
162: ; preds = %42
%163 = load i32*, i32** %11
%164 = call i32 @fclose(i32* %163)
br label %171
165: ; preds = %29
%166 = load i32, i32* @errno
%167 = getelementptr inbounds [40 x i8], [40 x i8]* %9, i64 0, i64 0
%168 = load i32, i32* @errno
%169 = call i8* @strerror(i32 %168)
%170 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.15, i64 0, i64 0), i32 %166, i8* %167, i8* %169)
br label %171
171: ; preds = %165, %162
%172 = load i32*, i32** %10
%173 = call i32 @fclose(i32* %172)
%174 = load i32, i32* %13
%175 = icmp ne i32 %174, 0
br i1 %175, label %176, label %204
176: ; preds = %171
store i32 0, i32* %13
%177 = load i32, i32* %14
%178 = icmp ne i32 %177, 0
br i1 %178, label %179, label %196
179: ; preds = %176
%180 = getelementptr inbounds [202 x i8], [202 x i8]* %12, i64 0, i64 0
%181 = load i8*, i8** %5
%182 = call i64 @time(i32* null)
%183 = trunc i64 %182 to i32
%184 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %180, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* %181, i32 %183)
%185 = load i8*, i8** %5
%186 = getelementptr inbounds [202 x i8], [202 x i8]* %12, i64 0, i64 0
%187 = call i64 @rename(i8* %185, i8* %186)
%188 = icmp eq i64 %187, 0
br i1 %188, label %189, label %195
189: ; preds = %179
%190 = getelementptr inbounds [40 x i8], [40 x i8]* %9, i64 0, i64 0
%191 = load i8*, i8** %5
%192 = call i64 @rename(i8* %190, i8* %191)
%193 = icmp eq i64 %192, 0
%194 = zext i1 %193 to i32
store i32 %194, i32* %13
br label %195
195: ; preds = %189, %179
br label %203
196: ; preds = %176
%197 = getelementptr inbounds [40 x i8], [40 x i8]* %9, i64 0, i64 0
%198 = call i64 @remove(i8* %197)
%199 = icmp eq i64 %198, 0
%200 = zext i1 %199 to i32
store i32 %200, i32* %13
br i1 %199, label %201, label %202
201: ; preds = %196
store i32 -1, i32* %13
br label %202
202: ; preds = %201, %196
br label %203
203: ; preds = %202, %195
br label %204
204: ; preds = %203, %171
br label %211
205: ; preds = %4
%206 = load i32, i32* @errno
%207 = load i8*, i8** %5
%208 = load i32, i32* @errno
%209 = call i8* @strerror(i32 %208)
%210 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([39 x i8], [39 x i8]* @.str.17, i64 0, i64 0), i32 %206, i8* %207, i8* %209)
br label %211
211: ; preds = %205, %204
%212 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.18, i64 0, i64 0))
%213 = call i32 @semV(i32 151002)
%214 = load i32, i32* %13
ret i32 %214
}

LLVM IR (-O2):
@.str.1 = [59 x i8] c"Finding option %s in section %s and replace value with %s\0A\00"
@.str.2 = [7 x i8] c"%s_tmp\00"
@.str.3 = [2 x i8] c"r\00"
@.str.4 = [3 x i8] c"w+\00"
@.str.5 = [9 x i8] c"Line: %s\00"
@.str.6 = [7 x i8] c"config\00"
@.str.7 = [15 x i8] c"In section %s\0A\00"
@.str.9 = [7 x i8] c"option\00"
@.str.10 = [34 x i8] c"Option %s found: replace with %s\0A\00"
@.str.11 = [4 x i8] c"%s\0A\00"
@.str.12 = [20 x i8] c"Empty line (%d/%d)\0A\00"
@.str.13 = [32 x i8] c"Adding option %s with value %s\0A\00"
@.str.14 = [15 x i8] c"\09option %s %s\0A\00"
@EOF = global i64 0
@.str.15 = [49 x i8] c"Error %d opening temporary config file (%s): %s\0A\00"
@errno = global i32 0
@.str.16 = [6 x i8] c"%s_%d\00"
@.str.17 = [39 x i8] c"Error %d opening config file (%s): %s\0A\00"
@str = [10 x i8] c"GW locked\00"
@str.19 = [12 x i8] c"GW unlocked\00"
@str.21 = [21 x i8] c"Out of section again\00"
define i32 @gwConfigEditOption(i8* %0, i8* %1, i8* %2, i8* %3) {
%5 = alloca [40 x i8]
%6 = alloca [202 x i8]
%7 = getelementptr inbounds [40 x i8], [40 x i8]* %5, i64 0, i64 0
%8 = getelementptr inbounds [202 x i8], [202 x i8]* %6, i64 0, i64 0
%9 = tail call i32 @semPautounlock(i32 151002, i32 10)
%10 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @str, i64 0, i64 0))
%11 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([59 x i8], [59 x i8]* @.str.1, i64 0, i64 0), i8* %2, i8* %1, i8* %3)
%12 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %7, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%13 = tail call i32* @fopen(i8* %0, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.3, i64 0, i64 0))
%14 = icmp eq i32* %13, null
br i1 %14, label %101, label %15
15: ; preds = %4
%16 = call i32* @fopen(i8* %7, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.4, i64 0, i64 0))
%17 = icmp eq i32* %16, null
br i1 %17, label %76, label %18
18: ; preds = %15, %70
%19 = phi i32 [ %72, %70 ], [ 0, %15 ]
%20 = phi i32 [ %71, %70 ], [ 0, %15 ]
%21 = call i32* @fgets(i8* %8, i32 200, i32* %13)
%22 = icmp eq i32* %21, null
br i1 %22, label %81, label %23
23: ; preds = %18
%24 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.5, i64 0, i64 0), i8* %8)
%25 = call i8* @strstr(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%26 = icmp eq i8* %25, null
br i1 %26, label %36, label %27
27: ; preds = %23
%28 = call i8* @strstr(i8* %25, i8* dereferenceable(1) %1)
%29 = icmp eq i8* %28, null
br i1 %29, label %32, label %30
30: ; preds = %27
%31 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.7, i64 0, i64 0), i8* %1)
br label %70
32: ; preds = %27
%33 = icmp eq i32 %19, 0
br i1 %33, label %70, label %34
34: ; preds = %32
%35 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.21, i64 0, i64 0))
br label %70
36: ; preds = %23
%37 = call i8* @strstr(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%38 = icmp eq i8* %37, null
br i1 %38, label %55, label %39
39: ; preds = %36
%40 = icmp eq i32 %19, 0
br i1 %40, label %70, label %41
41: ; preds = %39
%42 = call i8* @strstr(i8* %37, i8* dereferenceable(1) %2)
%43 = icmp eq i8* %42, null
br i1 %43, label %70, label %44
44: ; preds = %41
%45 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([34 x i8], [34 x i8]* @.str.10, i64 0, i64 0), i8* %2, i8* %3)
%46 = call i64 @strlen(i8* dereferenceable(1) %2)
%47 = getelementptr inbounds i8, i8* %42, i64 %46
br label %48
48: ; preds = %51, %44
%49 = phi i8* [ %47, %44 ], [ %52, %51 ]
%50 = load i8, i8* %49
switch i8 %50, label %53 [
i8 32, label %51
i8 9, label %51
]
51: ; preds = %48, %48
%52 = getelementptr inbounds i8, i8* %49, i64 1
br label %48
53: ; preds = %48
%54 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %49, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.11, i64 0, i64 0), i8* %3)
br label %70
55: ; preds = %36, %58
%56 = phi i8* [ %59, %58 ], [ %8, %36 ]
%57 = load i8, i8* %56
switch i8 %57, label %70 [
i8 32, label %58
i8 9, label %58
i8 10, label %58
i8 0, label %60
]
58: ; preds = %55, %55, %55
%59 = getelementptr inbounds i8, i8* %56, i64 1
br label %55
60: ; preds = %55
%61 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.12, i64 0, i64 0), i32 %19, i32 %20)
%62 = icmp eq i32 %19, 0
br i1 %62, label %70, label %63
63: ; preds = %60
%64 = icmp eq i32 %20, 0
br i1 %64, label %65, label %68
65: ; preds = %63
%66 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([32 x i8], [32 x i8]* @.str.13, i64 0, i64 0), i8* %2, i8* %3)
%67 = call i32 @fprintf(i32* %16, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.14, i64 0, i64 0), i8* %2, i8* %3)
br label %68
68: ; preds = %65, %63
%69 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([21 x i8], [21 x i8]* @str.21, i64 0, i64 0))
br label %70
70: ; preds = %55, %41, %53, %39, %60, %68, %30, %34, %32
%71 = phi i32 [ %20, %30 ], [ %20, %34 ], [ %20, %32 ], [ 1, %53 ], [ %20, %41 ], [ %20, %39 ], [ 1, %68 ], [ %20, %60 ], [ %20, %55 ]
%72 = phi i32 [ 1, %30 ], [ 0, %34 ], [ 0, %32 ], [ 1, %53 ], [ 1, %41 ], [ 0, %39 ], [ 0, %68 ], [ 0, %60 ], [ %19, %55 ]
%73 = call i64 @fputs(i8* %8, i32* %16)
%74 = load i64, i64* @EOF
%75 = icmp eq i64 %73, %74
br i1 %75, label %81, label %18
76: ; preds = %15
%77 = load i32, i32* @errno
%78 = tail call i8* @strerror(i32 %77)
%79 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.15, i64 0, i64 0), i32 %77, i8* %7, i8* %78)
%80 = call i32 @fclose(i32* %13)
br label %105
81: ; preds = %18, %70
%82 = phi i32 [ %20, %18 ], [ %71, %70 ]
%83 = call i32 @fclose(i32* %16)
%84 = call i32 @fclose(i32* %13)
br i1 %22, label %85, label %105
85: ; preds = %81
%86 = icmp eq i32 %82, 0
br i1 %86, label %97, label %87
87: ; preds = %85
%88 = call i64 @time(i32* null)
%89 = trunc i64 %88 to i32
%90 = call i32 (i8*, i8*, i8*, ...) @sprintf(i8* %8, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.16, i64 0, i64 0), i8* %0, i32 %89)
%91 = call i64 @rename(i8* %0, i8* %8)
%92 = icmp eq i64 %91, 0
br i1 %92, label %93, label %105
93: ; preds = %87
%94 = call i64 @rename(i8* %7, i8* %0)
%95 = icmp eq i64 %94, 0
%96 = zext i1 %95 to i32
br label %105
97: ; preds = %85
%98 = call i64 @remove(i8* %7)
%99 = icmp eq i64 %98, 0
%100 = sext i1 %99 to i32
br label %105
101: ; preds = %4
%102 = load i32, i32* @errno
%103 = tail call i8* @strerror(i32 %102)
%104 = tail call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([39 x i8], [39 x i8]* @.str.17, i64 0, i64 0), i32 %102, i8* %0, i8* %103)
br label %105
105: ; preds = %76, %81, %87, %93, %97, %101
%106 = phi i32 [ %96, %93 ], [ 0, %87 ], [ %100, %97 ], [ 0, %81 ], [ 0, %101 ], [ 0, %76 ]
%107 = call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([12 x i8], [12 x i8]* @str.19, i64 0, i64 0))
%108 = call i32 @semV(i32 151002)
ret i32 %106
}