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

/* Variables and functions */
int /*<<< orphan*/ EXIT_FAILURE;
int /*<<< orphan*/ F_OK;
int access(char *, int /*<<< orphan*/);
int /*<<< orphan*/ err(int /*<<< orphan*/, char *);
int /*<<< orphan*/ errx(int /*<<< orphan*/, char *);
int /*<<< orphan*/ fclose(int /*<<< orphan*/ *);
int /*<<< orphan*/ feof(int /*<<< orphan*/ *);
scalar_t__ fgets(char *, int, int /*<<< orphan*/ *);
int /*<<< orphan*/ *fopen(char *, char *);
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ sprintf(char *, char *, char *);
int sscanf(char *, char *, char *, char *);
char *strstr(char *, char const *);
int system(char *);
char *unescape_string(char *);
int /*<<< orphan*/ warnx(char *, char *);
int mmc_umount_all(const char *mmc_device) {
  FILE *fp = fopen("/proc/mounts", "r");
  if (!fp)
    err(EXIT_FAILURE, "/proc/mounts");
  char *todo[64] = {0};
  int todo_ix = 0;
  int ultimate_rc = 0;
  char line[512] = {0};
  while (!feof(fp) && fgets(line, sizeof(line), fp)) {
    char devname[64];
    char mountpoint[256];
    if (sscanf(line, "%63s %255s", devname, mountpoint) != 2)
      continue;
    if (strstr(devname, mmc_device) == devname) {
      if (todo_ix == (sizeof(todo) / sizeof(todo[0])))
        errx(EXIT_FAILURE, "Device mounted too many times");
      todo[todo_ix++] = unescape_string(mountpoint);
    }
  }
  fclose(fp);
  int mtab_exists = (access("/etc/mtab", F_OK) != -1);
  for (int i = 0; i < todo_ix; i++) {
    if (mtab_exists) {
      char cmdline[384];
      sprintf(cmdline, "/bin/umount %s", todo[i]);
      int rc = system(cmdline);
      if (rc != 0) {
        warnx("%s", cmdline);
        ultimate_rc = -1;
      }
    } else {
      warnx("umount %s: not supported", todo[i]);
    }
  }
  for (int i = 0; i < todo_ix; i++)
    free(todo[i]);
  return ultimate_rc;
}


x86 assembly (clang, -O0):
<mmc_umount_all>:
push   %rbp
mov    %rsp,%rbp
sub    $0x700,%rsp
mov    %rdi,-0x8(%rbp)
lea    0xdfa(%rip),%rdi
lea    0xe00(%rip),%rsi
call   10f0 <fopen@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1236 <mmc_umount_all+0x46>
mov    0x2db8(%rip),%rax
mov    (%rax),%edi
lea    0xdcf(%rip),%rsi
call   10b0 <err@plt>
lea    -0x210(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1080 <memset@plt>
movl   $0x0,-0x214(%rbp)
movl   $0x0,-0x218(%rbp)
lea    -0x420(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1080 <memset@plt>
mov    -0x10(%rbp),%rdi
call   10a0 <feof@plt>
mov    %eax,%ecx
xor    %eax,%eax
cmp    $0x0,%ecx
mov    %al,-0x6f9(%rbp)
jne    12ae <mmc_umount_all+0xbe>
lea    -0x420(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    $0x200,%esi
call   1090 <fgets@plt>
cmp    $0x0,%rax
setne  %al
mov    %al,-0x6f9(%rbp)
mov    -0x6f9(%rbp),%al
test   $0x1,%al
jne    12c1 <mmc_umount_all+0xd1>
jmp    1365 <mmc_umount_all+0x175>
lea    -0x420(%rbp),%rdi
lea    -0x460(%rbp),%rdx
lea    -0x560(%rbp),%rcx
lea    0xd32(%rip),%rsi
call   10c0 <sscanf@plt>
cmp    $0x2,%eax
je     12f0 <mmc_umount_all+0x100>
jmp    1270 <mmc_umount_all+0x80>
lea    -0x460(%rbp),%rdi
mov    -0x8(%rbp),%rsi
call   1110 <strstr@plt>
lea    -0x460(%rbp),%rcx
cmp    %rcx,%rax
jne    1360 <mmc_umount_all+0x170>
movslq -0x214(%rbp),%rax
cmp    $0x40,%rax
jne    1336 <mmc_umount_all+0x146>
mov    0x2cb8(%rip),%rax
mov    (%rax),%edi
lea    0xce9(%rip),%rsi
call   1050 <errx@plt>
lea    -0x560(%rbp),%rdi
call   10d0 <unescape_string@plt>
mov    %rax,%rcx
mov    -0x214(%rbp),%eax
mov    %eax,%edx
add    $0x1,%edx
mov    %edx,-0x214(%rbp)
cltq
mov    %rcx,-0x210(%rbp,%rax,8)
ff
jmp    1270 <mmc_umount_all+0x80>
mov    -0x10(%rbp),%rdi
call   1040 <fclose@plt>
mov    0x2c5b(%rip),%rax
mov    (%rax),%esi
lea    0xcba(%rip),%rdi
call   10e0 <access@plt>
cmp    $0xffffffff,%eax
setne  %al
and    $0x1,%al
movzbl %al,%eax
mov    %eax,-0x564(%rbp)
movl   $0x0,-0x568(%rbp)
mov    -0x568(%rbp),%eax
cmp    -0x214(%rbp),%eax
jge    1454 <mmc_umount_all+0x264>
cmpl   $0x0,-0x564(%rbp)
je     1420 <mmc_umount_all+0x230>
lea    -0x6f0(%rbp),%rdi
movslq -0x568(%rbp),%rax
mov    -0x210(%rbp,%rax,8),%rdx
ff
lea    0xc68(%rip),%rsi
call   1100 <sprintf@plt>
lea    -0x6f0(%rbp),%rdi
call   1060 <system@plt>
mov    %eax,-0x6f4(%rbp)
cmpl   $0x0,-0x6f4(%rbp)
je     141b <mmc_umount_all+0x22b>
lea    -0x6f0(%rbp),%rsi
lea    0xc42(%rip),%rdi
call   1070 <warnx@plt>
movl   $0xffffffff,-0x218(%rbp)
ff ff ff
jmp    143b <mmc_umount_all+0x24b>
movslq -0x568(%rbp),%rax
mov    -0x210(%rbp,%rax,8),%rsi
ff
lea    0xc1b(%rip),%rdi
call   1070 <warnx@plt>
jmp    1440 <mmc_umount_all+0x250>
mov    -0x568(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x568(%rbp)
jmp    139e <mmc_umount_all+0x1ae>
movl   $0x0,-0x6f8(%rbp)
mov    -0x6f8(%rbp),%eax
cmp    -0x214(%rbp),%eax
jge    1498 <mmc_umount_all+0x2a8>
movslq -0x6f8(%rbp),%rax
mov    -0x210(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
mov    -0x6f8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x6f8(%rbp)
jmp    145e <mmc_umount_all+0x26e>
mov    -0x218(%rbp),%eax
add    $0x700,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<mmc_umount_all>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x5d8,%rsp
mov    %rdi,%r14
lea    0xde5(%rip),%rdi
lea    0xdeb(%rip),%rsi
call   1110 <fopen@plt>
mov    %rax,%rbx
test   %rax,%rax
jne    1244 <mmc_umount_all+0x44>
mov    0x2daa(%rip),%rax
mov    (%rax),%edi
lea    0xdc1(%rip),%rsi
call   10d0 <err@plt>
lea    0x50(%rsp),%rdi
movl   $0x0,0x4(%rsp)
mov    $0x200,%edx
xor    %esi,%esi
call   10a0 <memset@plt>
lea    0x3d0(%rsp),%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   10a0 <memset@plt>
mov    %rbx,%rdi
call   10c0 <feof@plt>
mov    $0x0,%r15d
test   %eax,%eax
je     1369 <mmc_umount_all+0x169>
mov    %rbx,%rdi
call   1050 <fclose@plt>
mov    0x2d3a(%rip),%rax
mov    (%rax),%esi
lea    0xd99(%rip),%rdi
call   1100 <access@plt>
test   %r15d,%r15d
jle    1353 <mmc_umount_all+0x153>
mov    %eax,%ebx
mov    %r15d,0x8(%rsp)
mov    %r15d,%r15d
xor    %r14d,%r14d
lea    0xd81(%rip),%r12
lea    0x250(%rsp),%rbp
lea    0xd7e(%rip),%r13
movl   $0x0,0x4(%rsp)
jmp    12fa <mmc_umount_all+0xfa>
nopw   0x0(%rax,%rax,1)
mov    0x50(%rsp,%r14,8),%rsi
lea    0xd65(%rip),%rdi
call   1090 <warnx@plt>
add    $0x1,%r14
cmp    %r14,%r15
je     1330 <mmc_umount_all+0x130>
cmp    $0xffffffff,%ebx
je     12e0 <mmc_umount_all+0xe0>
mov    0x50(%rsp,%r14,8),%rdx
mov    %rbp,%rdi
mov    %r12,%rsi
call   1120 <sprintf@plt>
mov    %rbp,%rdi
call   1080 <system@plt>
test   %eax,%eax
je     12f1 <mmc_umount_all+0xf1>
mov    %r13,%rdi
mov    %rbp,%rsi
call   1090 <warnx@plt>
movl   $0xffffffff,0x4(%rsp)
ff
jmp    12f1 <mmc_umount_all+0xf1>
cmpl   $0x0,0x8(%rsp)
jle    1353 <mmc_umount_all+0x153>
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    0x50(%rsp,%rbx,8),%rdi
call   1030 <free@plt>
add    $0x1,%rbx
cmp    %rbx,%r15
jne    1340 <mmc_umount_all+0x140>
mov    0x4(%rsp),%eax
add    $0x5d8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
xor    %r15d,%r15d
lea    0x3d0(%rsp),%r13
lea    0xc94(%rip),%r12
lea    0x10(%rsp),%rbp
mov    %r14,0x8(%rsp)
jmp    13c0 <mmc_umount_all+0x1c0>
movslq %r15d,%r12
lea    0x250(%rsp),%rdi
call   10f0 <unescape_string@plt>
add    $0x1,%r15d
mov    %rax,0x50(%rsp,%r12,8)
mov    %rbp,%r12
mov    %r14,%rbp
mov    0x8(%rsp),%r14
nopl   0x0(%rax,%rax,1)
mov    %rbx,%rdi
call   10c0 <feof@plt>
test   %eax,%eax
jne    1287 <mmc_umount_all+0x87>
mov    %r13,%rdi
mov    $0x200,%esi
mov    %rbx,%rdx
call   10b0 <fgets@plt>
test   %rax,%rax
je     1287 <mmc_umount_all+0x87>
mov    %r13,%rdi
mov    %r12,%rsi
mov    %rbp,%rdx
lea    0x250(%rsp),%rcx
call   10e0 <sscanf@plt>
cmp    $0x2,%eax
jne    13b0 <mmc_umount_all+0x1b0>
mov    %r14,%rdi
call   1060 <strlen@plt>
mov    %rbp,%rdi
mov    %r14,%rsi
mov    %rax,%rdx
call   1040 <strncmp@plt>
test   %eax,%eax
jne    13b0 <mmc_umount_all+0x1b0>
mov    %rbp,%r14
mov    %r12,%rbp
cmp    $0x40,%r15d
jne    1387 <mmc_umount_all+0x187>
mov    0x2bbb(%rip),%rax
mov    (%rax),%edi
lea    0xbec(%rip),%rsi
call   1070 <errx@plt>
jmp    1387 <mmc_umount_all+0x187>

LLVM IR (-O0):
@.str = [13 x i8] c"/proc/mounts\00"
@.str.1 = [2 x i8] c"r\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [11 x i8] c"%63s %255s\00"
@.str.3 = [30 x i8] c"Device mounted too many times\00"
@.str.4 = [10 x i8] c"/etc/mtab\00"
@F_OK = global i32 0
@.str.5 = [15 x i8] c"/bin/umount %s\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.7 = [25 x i8] c"umount %s: not supported\00"
define i32 @mmc_umount_all(i8* %0) {
%2 = alloca i8*
%3 = alloca i32*
%4 = alloca [64 x i8*]
%5 = alloca i32
%6 = alloca i32
%7 = alloca [512 x i8]
%8 = alloca [64 x i8]
%9 = alloca [256 x i8]
%10 = alloca i32
%11 = alloca i32
%12 = alloca [384 x i8]
%13 = alloca i32
%14 = alloca i32
store i8* %0, i8** %2
%15 = call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
store i32* %15, i32** %3
%16 = load i32*, i32** %3
%17 = icmp ne i32* %16, null
br i1 %17, label %21, label %18
18: ; preds = %1
%19 = load i32, i32* @EXIT_FAILURE
%20 = call i32 @err(i32 %19, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %21
21: ; preds = %18, %1
%22 = bitcast [64 x i8*]* %4 to i8*
store i32 0, i32* %5
store i32 0, i32* %6
%23 = bitcast [512 x i8]* %7 to i8*
br label %24
24: ; preds = %62, %41, %21
%25 = load i32*, i32** %3
%26 = call i32 @feof(i32* %25)
%27 = icmp ne i32 %26, 0
br i1 %27, label %33, label %28
28: ; preds = %24
%29 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%30 = load i32*, i32** %3
%31 = call i64 @fgets(i8* %29, i32 512, i32* %30)
%32 = icmp ne i64 %31, 0
br label %33
33: ; preds = %28, %24
%34 = phi i1 [ false, %24 ], [ %32, %28 ]
br i1 %34, label %35, label %63
35: ; preds = %33
%36 = getelementptr inbounds [512 x i8], [512 x i8]* %7, i64 0, i64 0
%37 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%38 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%39 = call i32 @sscanf(i8* %36, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %37, i8* %38)
%40 = icmp ne i32 %39, 2
br i1 %40, label %41, label %42
41: ; preds = %35
br label %24
42: ; preds = %35
%43 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%44 = load i8*, i8** %2
%45 = call i8* @strstr(i8* %43, i8* %44)
%46 = getelementptr inbounds [64 x i8], [64 x i8]* %8, i64 0, i64 0
%47 = icmp eq i8* %45, %46
br i1 %47, label %48, label %62
48: ; preds = %42
%49 = load i32, i32* %5
%50 = sext i32 %49 to i64
%51 = icmp eq i64 %50, 64
br i1 %51, label %52, label %55
52: ; preds = %48
%53 = load i32, i32* @EXIT_FAILURE
%54 = call i32 @errx(i32 %53, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %55
55: ; preds = %52, %48
%56 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%57 = call i8* @unescape_string(i8* %56)
%58 = load i32, i32* %5
%59 = add nsw i32 %58, 1
store i32 %59, i32* %5
%60 = sext i32 %58 to i64
%61 = getelementptr inbounds [64 x i8*], [64 x i8*]* %4, i64 0, i64 %60
store i8* %57, i8** %61
br label %62
62: ; preds = %55, %42
br label %24
63: ; preds = %33
%64 = load i32*, i32** %3
%65 = call i32 @fclose(i32* %64)
%66 = load i32, i32* @F_OK
%67 = call i32 @access(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %66)
%68 = icmp ne i32 %67, -1
%69 = zext i1 %68 to i32
store i32 %69, i32* %10
store i32 0, i32* %11
br label %70
70: ; preds = %99, %63
%71 = load i32, i32* %11
%72 = load i32, i32* %5
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %102
74: ; preds = %70
%75 = load i32, i32* %10
%76 = icmp ne i32 %75, 0
br i1 %76, label %77, label %92
77: ; preds = %74
%78 = getelementptr inbounds [384 x i8], [384 x i8]* %12, i64 0, i64 0
%79 = load i32, i32* %11
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [64 x i8*], [64 x i8*]* %4, i64 0, i64 %80
%82 = load i8*, i8** %81
%83 = call i32 @sprintf(i8* %78, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8* %82)
%84 = getelementptr inbounds [384 x i8], [384 x i8]* %12, i64 0, i64 0
%85 = call i32 @system(i8* %84)
store i32 %85, i32* %13
%86 = load i32, i32* %13
%87 = icmp ne i32 %86, 0
br i1 %87, label %88, label %91
88: ; preds = %77
%89 = getelementptr inbounds [384 x i8], [384 x i8]* %12, i64 0, i64 0
%90 = call i32 @warnx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %89)
store i32 -1, i32* %6
br label %91
91: ; preds = %88, %77
br label %98
92: ; preds = %74
%93 = load i32, i32* %11
%94 = sext i32 %93 to i64
%95 = getelementptr inbounds [64 x i8*], [64 x i8*]* %4, i64 0, i64 %94
%96 = load i8*, i8** %95
%97 = call i32 @warnx(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %96)
br label %98
98: ; preds = %92, %91
br label %99
99: ; preds = %98
%100 = load i32, i32* %11
%101 = add nsw i32 %100, 1
store i32 %101, i32* %11
br label %70
102: ; preds = %70
store i32 0, i32* %14
br label %103
103: ; preds = %113, %102
%104 = load i32, i32* %14
%105 = load i32, i32* %5
%106 = icmp slt i32 %104, %105
br i1 %106, label %107, label %116
107: ; preds = %103
%108 = load i32, i32* %14
%109 = sext i32 %108 to i64
%110 = getelementptr inbounds [64 x i8*], [64 x i8*]* %4, i64 0, i64 %109
%111 = load i8*, i8** %110
%112 = call i32 @free(i8* %111)
br label %113
113: ; preds = %107
%114 = load i32, i32* %14
%115 = add nsw i32 %114, 1
store i32 %115, i32* %14
br label %103
116: ; preds = %103
%117 = load i32, i32* %6
ret i32 %117
}

LLVM IR (-O2):
@.str = [13 x i8] c"/proc/mounts\00"
@.str.1 = [2 x i8] c"r\00"
@EXIT_FAILURE = global i32 0
@.str.2 = [11 x i8] c"%63s %255s\00"
@.str.3 = [30 x i8] c"Device mounted too many times\00"
@.str.4 = [10 x i8] c"/etc/mtab\00"
@F_OK = global i32 0
@.str.5 = [15 x i8] c"/bin/umount %s\00"
@.str.6 = [3 x i8] c"%s\00"
@.str.7 = [25 x i8] c"umount %s: not supported\00"
define i32 @mmc_umount_all(i8* nocapture %0) {
%2 = alloca [64 x i8*]
%3 = alloca [512 x i8]
%4 = alloca [64 x i8]
%5 = alloca [256 x i8]
%6 = alloca [384 x i8]
%7 = tail call i32* @fopen(i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.1, i64 0, i64 0))
%8 = icmp eq i32* %7, null
br i1 %8, label %9, label %12
9: ; preds = %1
%10 = load i32, i32* @EXIT_FAILURE
%11 = tail call i32 @err(i32 %10, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str, i64 0, i64 0))
br label %12
12: ; preds = %9, %1
%13 = bitcast [64 x i8*]* %2 to i8*
%14 = getelementptr inbounds [512 x i8], [512 x i8]* %3, i64 0, i64 0
%15 = call i32 @feof(i32* %7)
%16 = icmp eq i32 %15, 0
br i1 %16, label %17, label %45
17: ; preds = %12
%18 = getelementptr inbounds [64 x i8], [64 x i8]* %4, i64 0, i64 0
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %5, i64 0, i64 0
br label %20
20: ; preds = %17, %41
%21 = phi i32 [ 0, %17 ], [ %42, %41 ]
%22 = call i64 @fgets(i8* %14, i32 512, i32* %7)
%23 = icmp eq i64 %22, 0
br i1 %23, label %45, label %24
24: ; preds = %20
%25 = call i32 @sscanf(i8* %14, i8* getelementptr inbounds ([11 x i8], [11 x i8]* @.str.2, i64 0, i64 0), i8* %18, i8* %19)
%26 = icmp eq i32 %25, 2
br i1 %26, label %27, label %41
27: ; preds = %24
%28 = call i64 @strlen(i8* dereferenceable(1) %0)
%29 = call i32 @strncmp(i8* %18, i8* %0, i64 %28)
%30 = icmp eq i32 %29, 0
br i1 %30, label %31, label %41
31: ; preds = %27
%32 = sext i32 %21 to i64
%33 = icmp eq i32 %21, 64
br i1 %33, label %34, label %37
34: ; preds = %31
%35 = load i32, i32* @EXIT_FAILURE
%36 = call i32 @errx(i32 %35, i8* getelementptr inbounds ([30 x i8], [30 x i8]* @.str.3, i64 0, i64 0))
br label %37
37: ; preds = %34, %31
%38 = call i8* @unescape_string(i8* %19)
%39 = add nsw i32 %21, 1
%40 = getelementptr inbounds [64 x i8*], [64 x i8*]* %2, i64 0, i64 %32
store i8* %38, i8** %40
br label %41
41: ; preds = %27, %37, %24
%42 = phi i32 [ %21, %24 ], [ %39, %37 ], [ %21, %27 ]
%43 = call i32 @feof(i32* %7)
%44 = icmp eq i32 %43, 0
br i1 %44, label %20, label %45
45: ; preds = %20, %41, %12
%46 = phi i32 [ 0, %12 ], [ %42, %41 ], [ %21, %20 ]
%47 = call i32 @fclose(i32* %7)
%48 = load i32, i32* @F_OK
%49 = call i32 @access(i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.4, i64 0, i64 0), i32 %48)
%50 = icmp eq i32 %49, -1
%51 = icmp sgt i32 %46, 0
br i1 %51, label %52, label %79
52: ; preds = %45
%53 = getelementptr inbounds [384 x i8], [384 x i8]* %6, i64 0, i64 0
%54 = zext i32 %46 to i64
br label %58
55: ; preds = %75
br i1 %51, label %56, label %79
56: ; preds = %55
%57 = zext i32 %46 to i64
br label %81
58: ; preds = %52, %75
%59 = phi i64 [ 0, %52 ], [ %77, %75 ]
%60 = phi i32 [ 0, %52 ], [ %76, %75 ]
br i1 %50, label %71, label %61
61: ; preds = %58
%62 = getelementptr inbounds [64 x i8*], [64 x i8*]* %2, i64 0, i64 %59
%63 = load i8*, i8** %62
%64 = call i32 @sprintf(i8* %53, i8* dereferenceable(1) getelementptr inbounds ([15 x i8], [15 x i8]* @.str.5, i64 0, i64 0), i8* %63)
%65 = call i32 @system(i8* %53)
%66 = icmp eq i32 %65, 0
br i1 %66, label %69, label %67
67: ; preds = %61
%68 = call i32 @warnx(i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.6, i64 0, i64 0), i8* %53)
br label %69
69: ; preds = %67, %61
%70 = phi i32 [ -1, %67 ], [ %60, %61 ]
br label %75
71: ; preds = %58
%72 = getelementptr inbounds [64 x i8*], [64 x i8*]* %2, i64 0, i64 %59
%73 = load i8*, i8** %72
%74 = call i32 @warnx(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.7, i64 0, i64 0), i8* %73)
br label %75
75: ; preds = %69, %71
%76 = phi i32 [ %70, %69 ], [ %60, %71 ]
%77 = add nuw nsw i64 %59, 1
%78 = icmp eq i64 %77, %54
br i1 %78, label %55, label %58
79: ; preds = %81, %45, %55
%80 = phi i32 [ %76, %55 ], [ 0, %45 ], [ %76, %81 ]
ret i32 %80
81: ; preds = %56, %81
%82 = phi i64 [ 0, %56 ], [ %86, %81 ]
%83 = getelementptr inbounds [64 x i8*], [64 x i8*]* %2, i64 0, i64 %82
%84 = load i8*, i8** %83
%85 = call i32 @free(i8* %84)
%86 = add nuw nsw i64 %82, 1
%87 = icmp eq i64 %86, %57
br i1 %87, label %79, label %81
}