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

/* Variables and functions */
int /*<<< orphan*/ assert(int /*<<< orphan*/);
char *custom_cmd_substitute(char *);
int /*<<< orphan*/ error(char *, char const *);
int /*<<< orphan*/ free(char *);
scalar_t__ iface_in_dir_menu();
int /*<<< orphan*/ internal_logit(char *, int, char *, char *, ...);
int /*<<< orphan*/ options_get_str(char const *);
int /*<<< orphan*/ reread_dir();
int /*<<< orphan*/ run_external_cmd(char **, int);
int /*<<< orphan*/ strtok(char *, char *);
char *xstrdup(int /*<<< orphan*/);
void exec_custom_command(const char *option) {
  char *cmd;
  char *args[20];
  int arg_num = 1;
  assert(option != NULL);
  cmd = xstrdup(options_get_str(option));
  if (!cmd || !cmd[0]) {
    error("%s is not set", option);
    if (cmd)
      free(cmd);
    return;
  }
  if (!(args[0] = xstrdup(strtok(cmd, " \t")))) {
    error("Malformed %s option", option);
    free(cmd);
    return;
  }
  while (arg_num < (int)(sizeof(args) / sizeof(args[0])) - 1 &&
         (args[arg_num] = xstrdup(strtok(NULL, " \t")))) {
    args[arg_num] = custom_cmd_substitute(args[arg_num]);
    arg_num++;
  }
  if (arg_num == (int)sizeof(args) / sizeof(args[0]) - 1) {
    error("Too many arguments in %s", option);
    do {
      free(args[--arg_num]);
    } while (arg_num);
    free(cmd);
    return;
  }
  args[arg_num] = NULL;
  {
    int i;
    internal_logit("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                   "outputs/2022-01-22/02-19-57/repos/ecthiender/mocp-git/refs/"
                   "heads/master/interface.c",
                   3158, "UNKNOWN_FUNC", "Running command:");
    for (i = 0; i < arg_num; i++)
      internal_logit("/scratch/repos/new/home/jordi_armengol_estape/c-scraper/"
                     "outputs/2022-01-22/02-19-57/repos/ecthiender/mocp-git/"
                     "refs/heads/master/interface.c",
                     3161, "UNKNOWN_FUNC", "'%s'", args[i]);
  }
  run_external_cmd(args, arg_num);
  do {
    free(args[--arg_num]);
  } while (arg_num);
  free(cmd);
  if (iface_in_dir_menu())
    reread_dir();
}


x86 assembly (clang, -O0):
<exec_custom_command>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x8(%rbp)
movl   $0x1,-0xb4(%rbp)
cmpq   $0x0,-0x8(%rbp)
setne  %al
and    $0x1,%al
movzbl %al,%edi
call   1060 <assert@plt>
mov    -0x8(%rbp),%rdi
call   10d0 <options_get_str@plt>
mov    %eax,%edi
call   1050 <xstrdup@plt>
mov    %rax,-0x10(%rbp)
cmpq   $0x0,-0x10(%rbp)
je     1207 <exec_custom_command+0x57>
mov    -0x10(%rbp),%rax
cmpb   $0x0,(%rax)
jne    1230 <exec_custom_command+0x80>
mov    -0x8(%rbp),%rsi
lea    0xdee(%rip),%rdi
call   1090 <error@plt>
cmpq   $0x0,-0x10(%rbp)
je     122b <exec_custom_command+0x7b>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    145c <exec_custom_command+0x2ac>
mov    -0x10(%rbp),%rdi
lea    0xdd3(%rip),%rsi
call   10a0 <strtok@plt>
mov    %eax,%edi
call   1050 <xstrdup@plt>
mov    %rax,-0xb0(%rbp)
cmp    $0x0,%rax
jne    1276 <exec_custom_command+0xc6>
mov    -0x8(%rbp),%rsi
lea    0xdae(%rip),%rdi
call   1090 <error@plt>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    145c <exec_custom_command+0x2ac>
jmp    127b <exec_custom_command+0xcb>
xor    %eax,%eax
cmpl   $0x13,-0xb4(%rbp)
mov    %al,-0xb9(%rbp)
jge    12c3 <exec_custom_command+0x113>
xor    %eax,%eax
mov    %eax,%edi
lea    0xd73(%rip),%rsi
call   10a0 <strtok@plt>
mov    %eax,%edi
call   1050 <xstrdup@plt>
movslq -0xb4(%rbp),%rcx
mov    %rax,-0xb0(%rbp,%rcx,8)
ff
cmp    $0x0,%rax
setne  %al
mov    %al,-0xb9(%rbp)
mov    -0xb9(%rbp),%al
test   $0x1,%al
jne    12d6 <exec_custom_command+0x126>
jmp    1310 <exec_custom_command+0x160>
movslq -0xb4(%rbp),%rax
mov    -0xb0(%rbp,%rax,8),%rdi
ff
call   1040 <custom_cmd_substitute@plt>
mov    %rax,%rcx
movslq -0xb4(%rbp),%rax
mov    %rcx,-0xb0(%rbp,%rax,8)
ff
mov    -0xb4(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb4(%rbp)
jmp    127b <exec_custom_command+0xcb>
movslq -0xb4(%rbp),%rax
cmp    $0x13,%rax
jne    136a <exec_custom_command+0x1ba>
mov    -0x8(%rbp),%rsi
lea    0xcf9(%rip),%rdi
call   1090 <error@plt>
mov    -0xb4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xb4(%rbp)
cltq
mov    -0xb0(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
cmpl   $0x0,-0xb4(%rbp)
jne    1331 <exec_custom_command+0x181>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
jmp    145c <exec_custom_command+0x2ac>
movslq -0xb4(%rbp),%rax
movq   $0x0,-0xb0(%rbp,%rax,8)
lea    0xcba(%rip),%rdi
mov    $0xc56,%esi
lea    0xd3a(%rip),%rdx
lea    0xd40(%rip),%rcx
mov    $0x0,%al
call   10c0 <internal_logit@plt>
movl   $0x0,-0xb8(%rbp)
mov    -0xb8(%rbp),%eax
cmp    -0xb4(%rbp),%eax
jge    13fe <exec_custom_command+0x24e>
movslq -0xb8(%rbp),%rax
mov    -0xb0(%rbp,%rax,8),%r8
ff
lea    0xc6e(%rip),%rdi
mov    $0xc59,%esi
lea    0xcee(%rip),%rdx
lea    0xd05(%rip),%rcx
mov    $0x0,%al
call   10c0 <internal_logit@plt>
mov    -0xb8(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0xb8(%rbp)
jmp    13a8 <exec_custom_command+0x1f8>
lea    -0xb0(%rbp),%rdi
mov    -0xb4(%rbp),%esi
call   1070 <run_external_cmd@plt>
mov    -0xb4(%rbp),%eax
add    $0xffffffff,%eax
mov    %eax,-0xb4(%rbp)
cltq
mov    -0xb0(%rbp,%rax,8),%rdi
ff
call   1030 <free@plt>
cmpl   $0x0,-0xb4(%rbp)
jne    1410 <exec_custom_command+0x260>
mov    -0x10(%rbp),%rdi
call   1030 <free@plt>
mov    $0x0,%al
call   10b0 <iface_in_dir_menu@plt>
cmp    $0x0,%rax
je     145c <exec_custom_command+0x2ac>
mov    $0x0,%al
call   1080 <reread_dir@plt>
add    $0xc0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<exec_custom_command>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0xb8,%rsp
mov    %rdi,%r12
xor    %edi,%edi
test   %r12,%r12
setne  %dil
call   1060 <assert@plt>
mov    %r12,%rdi
call   10d0 <options_get_str@plt>
mov    %eax,%edi
call   1050 <xstrdup@plt>
test   %rax,%rax
je     1342 <exec_custom_command+0x192>
mov    %rax,%rbp
cmpb   $0x0,(%rax)
je     1362 <exec_custom_command+0x1b2>
lea    0xe11(%rip),%rsi
mov    %rbp,%rdi
call   10a0 <strtok@plt>
mov    %eax,%edi
call   1050 <xstrdup@plt>
mov    %rax,0x10(%rsp)
test   %rax,%rax
je     136b <exec_custom_command+0x1bb>
mov    %rax,%r14
mov    $0x1,%ebx
lea    0xde5(%rip),%r13
nopl   0x0(%rax)
xor    %edi,%edi
mov    %r13,%rsi
call   10a0 <strtok@plt>
mov    %eax,%edi
call   1050 <xstrdup@plt>
mov    %rax,0x10(%rsp,%rbx,8)
test   %rax,%rax
je     1393 <exec_custom_command+0x1e3>
mov    %rax,%rdi
call   1040 <custom_cmd_substitute@plt>
mov    %rax,0x10(%rsp,%rbx,8)
add    $0x1,%rbx
cmp    $0x13,%rbx
jne    1230 <exec_custom_command+0x80>
lea    0xdb8(%rip),%rdi
mov    %r12,%rsi
call   1090 <error@plt>
mov    0xa0(%rsp),%rdi
call   1030 <free@plt>
mov    0x98(%rsp),%rdi
call   1030 <free@plt>
mov    0x90(%rsp),%rdi
call   1030 <free@plt>
mov    0x88(%rsp),%rdi
call   1030 <free@plt>
mov    0x80(%rsp),%rdi
call   1030 <free@plt>
mov    0x78(%rsp),%rdi
call   1030 <free@plt>
mov    0x70(%rsp),%rdi
call   1030 <free@plt>
mov    0x68(%rsp),%rdi
call   1030 <free@plt>
mov    0x60(%rsp),%rdi
call   1030 <free@plt>
mov    0x58(%rsp),%rdi
call   1030 <free@plt>
mov    0x50(%rsp),%rdi
call   1030 <free@plt>
mov    0x48(%rsp),%rdi
call   1030 <free@plt>
mov    0x40(%rsp),%rdi
call   1030 <free@plt>
mov    0x38(%rsp),%rdi
call   1030 <free@plt>
mov    0x30(%rsp),%rdi
call   1030 <free@plt>
mov    0x28(%rsp),%rdi
call   1030 <free@plt>
mov    0x20(%rsp),%rdi
call   1030 <free@plt>
mov    0x18(%rsp),%rdi
call   1030 <free@plt>
mov    %r14,%rdi
call   1030 <free@plt>
jmp    137a <exec_custom_command+0x1ca>
lea    0xcb7(%rip),%rdi
mov    %r12,%rsi
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1090 <error@plt>
lea    0xc97(%rip),%rdi
jmp    1372 <exec_custom_command+0x1c2>
lea    0xc9f(%rip),%rdi
mov    %r12,%rsi
call   1090 <error@plt>
mov    %rbp,%rdi
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
jmp    1030 <free@plt>
mov    %rbp,0x8(%rsp)
movq   $0x0,0x10(%rsp,%rbx,8)
lea    0xc96(%rip),%r14
lea    0xd1b(%rip),%r12
lea    0xd21(%rip),%rcx
mov    %r14,%rdi
mov    $0xc56,%esi
mov    %r12,%rdx
xor    %eax,%eax
call   10c0 <internal_logit@plt>
lea    -0x1(%rbx),%rbp
lea    0xd15(%rip),%r13
xor    %r15d,%r15d
cs nopw 0x0(%rax,%rax,1)
mov    0x10(%rsp,%r15,8),%r8
mov    %r14,%rdi
mov    $0xc59,%esi
mov    %r12,%rdx
mov    %r13,%rcx
xor    %eax,%eax
call   10c0 <internal_logit@plt>
add    $0x1,%r15
cmp    %r15,%rbx
jne    13e0 <exec_custom_command+0x230>
lea    0x10(%rsp),%rdi
mov    %ebx,%esi
call   1070 <run_external_cmd@plt>
nop
mov    0x10(%rsp,%rbp,8),%rdi
call   1030 <free@plt>
add    $0xffffffffffffffff,%rbp
jb     1410 <exec_custom_command+0x260>
mov    0x8(%rsp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
call   10b0 <iface_in_dir_menu@plt>
test   %rax,%rax
je     143d <exec_custom_command+0x28d>
xor    %eax,%eax
call   1080 <reread_dir@plt>
add    $0xb8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [14 x i8] c"%s is not set\00"
@.str.1 = [3 x i8] c" \09\00"
@.str.2 = [20 x i8] c"Malformed %s option\00"
@.str.3 = [25 x i8] c"Too many arguments in %s\00"
@.str.4 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ecthiender/mocp-git/refs/heads/master/interface.c\00"
@.str.5 = [13 x i8] c"UNKNOWN_FUNC\00"
@.str.6 = [17 x i8] c"Running command:\00"
@.str.7 = [5 x i8] c"'%s'\00"
define void @exec_custom_command(i8* %0) {
%2 = alloca i8*
%3 = alloca i8*
%4 = alloca [20 x i8*]
%5 = alloca i32
%6 = alloca i32
store i8* %0, i8** %2
store i32 1, i32* %5
%7 = load i8*, i8** %2
%8 = icmp ne i8* %7, null
%9 = zext i1 %8 to i32
%10 = call i32 @assert(i32 %9)
%11 = load i8*, i8** %2
%12 = call i32 @options_get_str(i8* %11)
%13 = call i8* @xstrdup(i32 %12)
store i8* %13, i8** %3
%14 = load i8*, i8** %3
%15 = icmp ne i8* %14, null
br i1 %15, label %16, label %21
16: ; preds = %1
%17 = load i8*, i8** %3
%18 = getelementptr inbounds i8, i8* %17, i64 0
%19 = load i8, i8* %18
%20 = icmp ne i8 %19, 0
br i1 %20, label %30, label %21
21: ; preds = %16, %1
%22 = load i8*, i8** %2
%23 = call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %22)
%24 = load i8*, i8** %3
%25 = icmp ne i8* %24, null
br i1 %25, label %26, label %29
26: ; preds = %21
%27 = load i8*, i8** %3
%28 = call i32 @free(i8* %27)
br label %29
29: ; preds = %26, %21
br label %124
30: ; preds = %16
%31 = load i8*, i8** %3
%32 = call i32 @strtok(i8* %31, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%33 = call i8* @xstrdup(i32 %32)
%34 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 0
store i8* %33, i8** %34
%35 = icmp ne i8* %33, null
br i1 %35, label %41, label %36
36: ; preds = %30
%37 = load i8*, i8** %2
%38 = call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %37)
%39 = load i8*, i8** %3
%40 = call i32 @free(i8* %39)
br label %124
41: ; preds = %30
br label %42
42: ; preds = %54, %41
%43 = load i32, i32* %5
%44 = icmp slt i32 %43, 19
br i1 %44, label %45, label %52
45: ; preds = %42
%46 = call i32 @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%47 = call i8* @xstrdup(i32 %46)
%48 = load i32, i32* %5
%49 = sext i32 %48 to i64
%50 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 %49
store i8* %47, i8** %50
%51 = icmp ne i8* %47, null
br label %52
52: ; preds = %45, %42
%53 = phi i1 [ false, %42 ], [ %51, %45 ]
br i1 %53, label %54, label %65
54: ; preds = %52
%55 = load i32, i32* %5
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 %56
%58 = load i8*, i8** %57
%59 = call i8* @custom_cmd_substitute(i8* %58)
%60 = load i32, i32* %5
%61 = sext i32 %60 to i64
%62 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 %61
store i8* %59, i8** %62
%63 = load i32, i32* %5
%64 = add nsw i32 %63, 1
store i32 %64, i32* %5
br label %42
65: ; preds = %52
%66 = load i32, i32* %5
%67 = sext i32 %66 to i64
%68 = icmp eq i64 %67, 19
br i1 %68, label %69, label %85
69: ; preds = %65
%70 = load i8*, i8** %2
%71 = call i32 @error(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %70)
br label %72
72: ; preds = %79, %69
%73 = load i32, i32* %5
%74 = add nsw i32 %73, -1
store i32 %74, i32* %5
%75 = sext i32 %74 to i64
%76 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 %75
%77 = load i8*, i8** %76
%78 = call i32 @free(i8* %77)
br label %79
79: ; preds = %72
%80 = load i32, i32* %5
%81 = icmp ne i32 %80, 0
br i1 %81, label %72, label %82
82: ; preds = %79
%83 = load i8*, i8** %3
%84 = call i32 @free(i8* %83)
br label %124
85: ; preds = %65
%86 = load i32, i32* %5
%87 = sext i32 %86 to i64
%88 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 %87
store i8* null, i8** %88
%89 = call i32 (i8*, i32, i8*, i8*, ...) @internal_logit(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.4, i64 0, i64 0), i32 3158, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
store i32 0, i32* %6
br label %90
90: ; preds = %100, %85
%91 = load i32, i32* %6
%92 = load i32, i32* %5
%93 = icmp slt i32 %91, %92
br i1 %93, label %94, label %103
94: ; preds = %90
%95 = load i32, i32* %6
%96 = sext i32 %95 to i64
%97 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 %96
%98 = load i8*, i8** %97
%99 = call i32 (i8*, i32, i8*, i8*, ...) @internal_logit(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.4, i64 0, i64 0), i32 3161, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %98)
br label %100
100: ; preds = %94
%101 = load i32, i32* %6
%102 = add nsw i32 %101, 1
store i32 %102, i32* %6
br label %90
103: ; preds = %90
%104 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 0
%105 = load i32, i32* %5
%106 = call i32 @run_external_cmd(i8** %104, i32 %105)
br label %107
107: ; preds = %114, %103
%108 = load i32, i32* %5
%109 = add nsw i32 %108, -1
store i32 %109, i32* %5
%110 = sext i32 %109 to i64
%111 = getelementptr inbounds [20 x i8*], [20 x i8*]* %4, i64 0, i64 %110
%112 = load i8*, i8** %111
%113 = call i32 @free(i8* %112)
br label %114
114: ; preds = %107
%115 = load i32, i32* %5
%116 = icmp ne i32 %115, 0
br i1 %116, label %107, label %117
117: ; preds = %114
%118 = load i8*, i8** %3
%119 = call i32 @free(i8* %118)
%120 = call i64 (...) @iface_in_dir_menu()
%121 = icmp ne i64 %120, 0
br i1 %121, label %122, label %124
122: ; preds = %117
%123 = call i32 (...) @reread_dir()
br label %124
124: ; preds = %29, %36, %82, %122, %117
ret void
}

LLVM IR (-O2):
@.str = [14 x i8] c"%s is not set\00"
@.str.1 = [3 x i8] c" \09\00"
@.str.2 = [20 x i8] c"Malformed %s option\00"
@.str.3 = [25 x i8] c"Too many arguments in %s\00"
@.str.4 = [140 x i8] c"/scratch/repos/new/home/jordi_armengol_estape/c-scraper/outputs/2022-01-22/02-19-57/repos/ecthiender/mocp-git/refs/heads/master/interface.c\00"
@.str.5 = [13 x i8] c"UNKNOWN_FUNC\00"
@.str.6 = [17 x i8] c"Running command:\00"
@.str.7 = [5 x i8] c"'%s'\00"
define void @exec_custom_command(i8* %0) {
%2 = alloca [20 x i8*]
%3 = bitcast [20 x i8*]* %2 to i8*
%4 = icmp ne i8* %0, null
%5 = zext i1 %4 to i32
%6 = tail call i32 @assert(i32 %5)
%7 = tail call i32 @options_get_str(i8* %0)
%8 = tail call i8* @xstrdup(i32 %7)
%9 = icmp eq i8* %8, null
br i1 %9, label %16, label %10
10: ; preds = %1
%11 = load i8, i8* %8
%12 = icmp eq i8 %11, 0
br i1 %12, label %13, label %18
13: ; preds = %10
%14 = tail call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
%15 = tail call i32 @free(i8* %8)
br label %121
16: ; preds = %1
%17 = tail call i32 @error(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str, i64 0, i64 0), i8* %0)
br label %121
18: ; preds = %10
%19 = tail call i32 @strtok(i8* %8, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%20 = tail call i8* @xstrdup(i32 %19)
%21 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 0
store i8* %20, i8** %21
%22 = icmp eq i8* %20, null
br i1 %22, label %23, label %26
23: ; preds = %18
%24 = tail call i32 @error(i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.2, i64 0, i64 0), i8* %0)
%25 = tail call i32 @free(i8* %8)
br label %121
26: ; preds = %18, %32
%27 = phi i64 [ %34, %32 ], [ 1, %18 ]
%28 = tail call i32 @strtok(i8* null, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%29 = tail call i8* @xstrdup(i32 %28)
%30 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 %27
store i8* %29, i8** %30
%31 = icmp eq i8* %29, null
br i1 %31, label %94, label %32
32: ; preds = %26
%33 = tail call i8* @custom_cmd_substitute(i8* %29)
store i8* %33, i8** %30
%34 = add nuw nsw i64 %27, 1
%35 = icmp eq i64 %34, 19
br i1 %35, label %36, label %26
36: ; preds = %32
%37 = tail call i32 @error(i8* getelementptr inbounds ([25 x i8], [25 x i8]* @.str.3, i64 0, i64 0), i8* %0)
%38 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 18
%39 = load i8*, i8** %38
%40 = tail call i32 @free(i8* %39)
%41 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 17
%42 = load i8*, i8** %41
%43 = tail call i32 @free(i8* %42)
%44 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 16
%45 = load i8*, i8** %44
%46 = tail call i32 @free(i8* %45)
%47 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 15
%48 = load i8*, i8** %47
%49 = tail call i32 @free(i8* %48)
%50 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 14
%51 = load i8*, i8** %50
%52 = tail call i32 @free(i8* %51)
%53 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 13
%54 = load i8*, i8** %53
%55 = tail call i32 @free(i8* %54)
%56 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 12
%57 = load i8*, i8** %56
%58 = tail call i32 @free(i8* %57)
%59 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 11
%60 = load i8*, i8** %59
%61 = tail call i32 @free(i8* %60)
%62 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 10
%63 = load i8*, i8** %62
%64 = tail call i32 @free(i8* %63)
%65 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 9
%66 = load i8*, i8** %65
%67 = tail call i32 @free(i8* %66)
%68 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 8
%69 = load i8*, i8** %68
%70 = tail call i32 @free(i8* %69)
%71 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 7
%72 = load i8*, i8** %71
%73 = tail call i32 @free(i8* %72)
%74 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 6
%75 = load i8*, i8** %74
%76 = tail call i32 @free(i8* %75)
%77 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 5
%78 = load i8*, i8** %77
%79 = tail call i32 @free(i8* %78)
%80 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 4
%81 = load i8*, i8** %80
%82 = tail call i32 @free(i8* %81)
%83 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 3
%84 = load i8*, i8** %83
%85 = tail call i32 @free(i8* %84)
%86 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 2
%87 = load i8*, i8** %86
%88 = tail call i32 @free(i8* %87)
%89 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 1
%90 = load i8*, i8** %89
%91 = tail call i32 @free(i8* %90)
%92 = tail call i32 @free(i8* %20)
%93 = tail call i32 @free(i8* %8)
br label %121
94: ; preds = %26
%95 = trunc i64 %27 to i32
%96 = and i64 %27, 4294967295
%97 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 %96
store i8* null, i8** %97
%98 = tail call i32 (i8*, i32, i8*, i8*, ...) @internal_logit(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.4, i64 0, i64 0), i32 3158, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.6, i64 0, i64 0))
br label %99
99: ; preds = %94, %99
%100 = phi i64 [ 0, %94 ], [ %104, %99 ]
%101 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 %100
%102 = load i8*, i8** %101
%103 = tail call i32 (i8*, i32, i8*, i8*, ...) @internal_logit(i8* getelementptr inbounds ([140 x i8], [140 x i8]* @.str.4, i64 0, i64 0), i32 3161, i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.7, i64 0, i64 0), i8* %102)
%104 = add nuw nsw i64 %100, 1
%105 = icmp eq i64 %104, %96
br i1 %105, label %106, label %99
106: ; preds = %99
%107 = call i32 @run_external_cmd(i8** %21, i32 %95)
br label %108
108: ; preds = %108, %106
%109 = phi i64 [ %110, %108 ], [ %96, %106 ]
%110 = add nsw i64 %109, -1
%111 = getelementptr inbounds [20 x i8*], [20 x i8*]* %2, i64 0, i64 %110
%112 = load i8*, i8** %111
%113 = call i32 @free(i8* %112)
%114 = icmp eq i64 %110, 0
br i1 %114, label %115, label %108
115: ; preds = %108
%116 = call i32 @free(i8* %8)
%117 = call i64 (...) @iface_in_dir_menu()
%118 = icmp eq i64 %117, 0
br i1 %118, label %121, label %119
119: ; preds = %115
%120 = call i32 (...) @reread_dir()
br label %121
121: ; preds = %115, %119, %13, %16, %36, %23
ret void
}