#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 /*<<< orphan*/ free(char *);
int nbd_add_mapping(char *, int, char **);
int nbd_list_mappings(char *, int, char **);
int nbd_remove_mapping(char *, int, char **);
int nbd_resize_bdev(char *, int, char **);
int nbd_start_daemon(char *, int, char **);
int nbd_stop_daemon(char *, int, char **);
scalar_t__ strcmp(char *, char *);
char *strdup(char *);
int /*<<< orphan*/ strerr_init();
int /*<<< orphan*/ usage(char *);
int main(int argc, char *argv[]) {
  char *appname;
  int res;
  appname = strdup(argv[0]);
  strerr_init();
  if (argc < 2) {
    usage(appname);
    res = 1;
  } else if (strcmp(argv[1], "start") == 0) {
    res = nbd_start_daemon(appname, argc, argv);
  } else if (strcmp(argv[1], "stop") == 0) {
    res = nbd_stop_daemon(appname, argc - 1, argv + 1);
  } else if (strcmp(argv[1], "map") == 0 || strcmp(argv[1], "add") == 0) {
    res = nbd_add_mapping(appname, argc - 1, argv + 1);
  } else if (strcmp(argv[1], "unmap") == 0 || strcmp(argv[1], "remove") == 0 ||
             strcmp(argv[1], "delete") == 0 || strcmp(argv[1], "del") == 0 ||
             strcmp(argv[1], "rm") == 0) {
    res = nbd_remove_mapping(appname, argc - 1, argv + 1);
  } else if (strcmp(argv[1], "resize") == 0) {
    res = nbd_resize_bdev(appname, argc - 1, argv + 1);
  } else if (strcmp(argv[1], "list") == 0) {
    res = nbd_list_mappings(appname, argc - 1, argv + 1);
  } else {
    usage(appname);
    res = 1;
  }
  free(appname);
  return res;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x20,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    -0x10(%rbp),%rax
mov    (%rax),%rdi
call   10a0 <strdup@plt>
mov    %rax,-0x18(%rbp)
mov    $0x0,%al
call   1090 <strerr_init@plt>
cmpl   $0x2,-0x8(%rbp)
jge    11fc <main+0x4c>
mov    -0x18(%rbp),%rdi
call   1080 <usage@plt>
movl   $0x1,-0x1c(%rbp)
jmp    1427 <main+0x277>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdf5(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    1232 <main+0x82>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
mov    -0x10(%rbp),%rdx
call   10c0 <nbd_start_daemon@plt>
mov    %eax,-0x1c(%rbp)
jmp    1422 <main+0x272>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xdc5(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    126f <main+0xbf>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
call   10b0 <nbd_stop_daemon@plt>
mov    %eax,-0x1c(%rbp)
jmp    141d <main+0x26d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd93(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     12ab <main+0xfb>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd6f(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    12ca <main+0x11a>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
call   1040 <nbd_add_mapping@plt>
mov    %eax,-0x1c(%rbp)
jmp    1418 <main+0x268>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd36(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1360 <main+0x1b0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd1e(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1360 <main+0x1b0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xd07(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1360 <main+0x1b0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcf0(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
je     1360 <main+0x1b0>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xcd6(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    137f <main+0x1cf>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
call   10d0 <nbd_remove_mapping@plt>
mov    %eax,-0x1c(%rbp)
jmp    1413 <main+0x263>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc9c(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    13bc <main+0x20c>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
call   1070 <nbd_resize_bdev@plt>
mov    %eax,-0x1c(%rbp)
jmp    140e <main+0x25e>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
lea    0xc66(%rip),%rsi
call   1060 <strcmp@plt>
cmp    $0x0,%rax
jne    13f9 <main+0x249>
mov    -0x18(%rbp),%rdi
mov    -0x8(%rbp),%esi
sub    $0x1,%esi
mov    -0x10(%rbp),%rdx
add    $0x8,%rdx
call   1050 <nbd_list_mappings@plt>
mov    %eax,-0x1c(%rbp)
jmp    1409 <main+0x259>
mov    -0x18(%rbp),%rdi
call   1080 <usage@plt>
movl   $0x1,-0x1c(%rbp)
jmp    140e <main+0x25e>
jmp    1413 <main+0x263>
jmp    1418 <main+0x268>
jmp    141d <main+0x26d>
jmp    1422 <main+0x272>
jmp    1427 <main+0x277>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    -0x1c(%rbp),%eax
add    $0x20,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r14
push   %rbx
mov    %rsi,%rbx
mov    %edi,%ebp
mov    (%rsi),%rdi
call   10a0 <strdup@plt>
mov    %rax,%r14
xor    %eax,%eax
call   1090 <strerr_init@plt>
cmp    $0x1,%ebp
jg     11e2 <main+0x32>
mov    %r14,%rdi
call   1080 <usage@plt>
mov    $0x1,%ebx
jmp    133e <main+0x18e>
mov    0x8(%rbx),%rdi
lea    0xe13(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     12f9 <main+0x149>
add    $0x8,%rbx
mov    (%rbx),%rdi
lea    0xdfd(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     131a <main+0x16a>
mov    (%rbx),%rdi
lea    0xdf0(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1308 <main+0x158>
mov    (%rbx),%rdi
lea    0xdd2(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     1308 <main+0x158>
mov    (%rbx),%rdi
lea    0xdbe(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     132c <main+0x17c>
mov    (%rbx),%rdi
lea    0xdac(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     132c <main+0x17c>
mov    (%rbx),%rdi
lea    0xd9b(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     132c <main+0x17c>
mov    (%rbx),%rdi
lea    0xd8a(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     132c <main+0x17c>
mov    (%rbx),%rdi
lea    0xd76(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     132c <main+0x17c>
mov    (%rbx),%rdi
lea    0xd65(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
je     134d <main+0x19d>
mov    (%rbx),%rdi
lea    0xd58(%rip),%rsi
call   1060 <strcmp@plt>
test   %rax,%rax
jne    11d0 <main+0x20>
add    $0xffffffff,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1050 <nbd_list_mappings@plt>
jmp    133c <main+0x18c>
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   10c0 <nbd_start_daemon@plt>
jmp    133c <main+0x18c>
add    $0xffffffff,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1040 <nbd_add_mapping@plt>
jmp    133c <main+0x18c>
add    $0xffffffff,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   10b0 <nbd_stop_daemon@plt>
jmp    133c <main+0x18c>
add    $0xffffffff,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   10d0 <nbd_remove_mapping@plt>
mov    %eax,%ebx
mov    %r14,%rdi
call   1030 <free@plt>
mov    %ebx,%eax
pop    %rbx
pop    %r14
pop    %rbp
ret
add    $0xffffffff,%ebp
mov    %r14,%rdi
mov    %ebp,%esi
mov    %rbx,%rdx
call   1070 <nbd_resize_bdev@plt>
jmp    133c <main+0x18c>

LLVM IR (-O0):
@.str = [6 x i8] c"start\00"
@.str.1 = [5 x i8] c"stop\00"
@.str.2 = [4 x i8] c"map\00"
@.str.3 = [4 x i8] c"add\00"
@.str.4 = [6 x i8] c"unmap\00"
@.str.5 = [7 x i8] c"remove\00"
@.str.6 = [7 x i8] c"delete\00"
@.str.7 = [4 x i8] c"del\00"
@.str.8 = [3 x i8] c"rm\00"
@.str.9 = [7 x i8] c"resize\00"
@.str.10 = [5 x i8] c"list\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i8*
%7 = alloca i32
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%8 = load i8**, i8*** %5
%9 = getelementptr inbounds i8*, i8** %8, i64 0
%10 = load i8*, i8** %9
%11 = call i8* @strdup(i8* %10)
store i8* %11, i8** %6
%12 = call i32 (...) @strerr_init()
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 2
br i1 %14, label %15, label %18
15: ; preds = %2
%16 = load i8*, i8** %6
%17 = call i32 @usage(i8* %16)
store i32 1, i32* %7
br label %133
18: ; preds = %2
%19 = load i8**, i8*** %5
%20 = getelementptr inbounds i8*, i8** %19, i64 1
%21 = load i8*, i8** %20
%22 = call i64 @strcmp(i8* %21, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%23 = icmp eq i64 %22, 0
br i1 %23, label %24, label %29
24: ; preds = %18
%25 = load i8*, i8** %6
%26 = load i32, i32* %4
%27 = load i8**, i8*** %5
%28 = call i32 @nbd_start_daemon(i8* %25, i32 %26, i8** %27)
store i32 %28, i32* %7
br label %132
29: ; preds = %18
%30 = load i8**, i8*** %5
%31 = getelementptr inbounds i8*, i8** %30, i64 1
%32 = load i8*, i8** %31
%33 = call i64 @strcmp(i8* %32, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%34 = icmp eq i64 %33, 0
br i1 %34, label %35, label %42
35: ; preds = %29
%36 = load i8*, i8** %6
%37 = load i32, i32* %4
%38 = sub nsw i32 %37, 1
%39 = load i8**, i8*** %5
%40 = getelementptr inbounds i8*, i8** %39, i64 1
%41 = call i32 @nbd_stop_daemon(i8* %36, i32 %38, i8** %40)
store i32 %41, i32* %7
br label %131
42: ; preds = %29
%43 = load i8**, i8*** %5
%44 = getelementptr inbounds i8*, i8** %43, i64 1
%45 = load i8*, i8** %44
%46 = call i64 @strcmp(i8* %45, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%47 = icmp eq i64 %46, 0
br i1 %47, label %54, label %48
48: ; preds = %42
%49 = load i8**, i8*** %5
%50 = getelementptr inbounds i8*, i8** %49, i64 1
%51 = load i8*, i8** %50
%52 = call i64 @strcmp(i8* %51, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %61
54: ; preds = %48, %42
%55 = load i8*, i8** %6
%56 = load i32, i32* %4
%57 = sub nsw i32 %56, 1
%58 = load i8**, i8*** %5
%59 = getelementptr inbounds i8*, i8** %58, i64 1
%60 = call i32 @nbd_add_mapping(i8* %55, i32 %57, i8** %59)
store i32 %60, i32* %7
br label %130
61: ; preds = %48
%62 = load i8**, i8*** %5
%63 = getelementptr inbounds i8*, i8** %62, i64 1
%64 = load i8*, i8** %63
%65 = call i64 @strcmp(i8* %64, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%66 = icmp eq i64 %65, 0
br i1 %66, label %91, label %67
67: ; preds = %61
%68 = load i8**, i8*** %5
%69 = getelementptr inbounds i8*, i8** %68, i64 1
%70 = load i8*, i8** %69
%71 = call i64 @strcmp(i8* %70, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%72 = icmp eq i64 %71, 0
br i1 %72, label %91, label %73
73: ; preds = %67
%74 = load i8**, i8*** %5
%75 = getelementptr inbounds i8*, i8** %74, i64 1
%76 = load i8*, i8** %75
%77 = call i64 @strcmp(i8* %76, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%78 = icmp eq i64 %77, 0
br i1 %78, label %91, label %79
79: ; preds = %73
%80 = load i8**, i8*** %5
%81 = getelementptr inbounds i8*, i8** %80, i64 1
%82 = load i8*, i8** %81
%83 = call i64 @strcmp(i8* %82, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%84 = icmp eq i64 %83, 0
br i1 %84, label %91, label %85
85: ; preds = %79
%86 = load i8**, i8*** %5
%87 = getelementptr inbounds i8*, i8** %86, i64 1
%88 = load i8*, i8** %87
%89 = call i64 @strcmp(i8* %88, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%90 = icmp eq i64 %89, 0
br i1 %90, label %91, label %98
91: ; preds = %85, %79, %73, %67, %61
%92 = load i8*, i8** %6
%93 = load i32, i32* %4
%94 = sub nsw i32 %93, 1
%95 = load i8**, i8*** %5
%96 = getelementptr inbounds i8*, i8** %95, i64 1
%97 = call i32 @nbd_remove_mapping(i8* %92, i32 %94, i8** %96)
store i32 %97, i32* %7
br label %129
98: ; preds = %85
%99 = load i8**, i8*** %5
%100 = getelementptr inbounds i8*, i8** %99, i64 1
%101 = load i8*, i8** %100
%102 = call i64 @strcmp(i8* %101, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%103 = icmp eq i64 %102, 0
br i1 %103, label %104, label %111
104: ; preds = %98
%105 = load i8*, i8** %6
%106 = load i32, i32* %4
%107 = sub nsw i32 %106, 1
%108 = load i8**, i8*** %5
%109 = getelementptr inbounds i8*, i8** %108, i64 1
%110 = call i32 @nbd_resize_bdev(i8* %105, i32 %107, i8** %109)
store i32 %110, i32* %7
br label %128
111: ; preds = %98
%112 = load i8**, i8*** %5
%113 = getelementptr inbounds i8*, i8** %112, i64 1
%114 = load i8*, i8** %113
%115 = call i64 @strcmp(i8* %114, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%116 = icmp eq i64 %115, 0
br i1 %116, label %117, label %124
117: ; preds = %111
%118 = load i8*, i8** %6
%119 = load i32, i32* %4
%120 = sub nsw i32 %119, 1
%121 = load i8**, i8*** %5
%122 = getelementptr inbounds i8*, i8** %121, i64 1
%123 = call i32 @nbd_list_mappings(i8* %118, i32 %120, i8** %122)
store i32 %123, i32* %7
br label %127
124: ; preds = %111
%125 = load i8*, i8** %6
%126 = call i32 @usage(i8* %125)
store i32 1, i32* %7
br label %127
127: ; preds = %124, %117
br label %128
128: ; preds = %127, %104
br label %129
129: ; preds = %128, %91
br label %130
130: ; preds = %129, %54
br label %131
131: ; preds = %130, %35
br label %132
132: ; preds = %131, %24
br label %133
133: ; preds = %132, %15
%134 = load i8*, i8** %6
%135 = call i32 @free(i8* %134)
%136 = load i32, i32* %7
ret i32 %136
}

LLVM IR (-O2):
@.str = [6 x i8] c"start\00"
@.str.1 = [5 x i8] c"stop\00"
@.str.2 = [4 x i8] c"map\00"
@.str.3 = [4 x i8] c"add\00"
@.str.4 = [6 x i8] c"unmap\00"
@.str.5 = [7 x i8] c"remove\00"
@.str.6 = [7 x i8] c"delete\00"
@.str.7 = [4 x i8] c"del\00"
@.str.8 = [3 x i8] c"rm\00"
@.str.9 = [7 x i8] c"resize\00"
@.str.10 = [5 x i8] c"list\00"
define i32 @main(i32 %0, i8** %1) {
%3 = load i8*, i8** %1
%4 = tail call i8* @strdup(i8* %3)
%5 = tail call i32 (...) @strerr_init()
%6 = icmp slt i32 %0, 2
br i1 %6, label %7, label %9
7: ; preds = %2
%8 = tail call i32 @usage(i8* %4)
br label %73
9: ; preds = %2
%10 = getelementptr inbounds i8*, i8** %1, i64 1
%11 = load i8*, i8** %10
%12 = tail call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0))
%13 = icmp eq i64 %12, 0
br i1 %13, label %14, label %16
14: ; preds = %9
%15 = tail call i32 @nbd_start_daemon(i8* %4, i32 %0, i8** %1)
br label %73
16: ; preds = %9
%17 = load i8*, i8** %10
%18 = tail call i64 @strcmp(i8* %17, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.1, i64 0, i64 0))
%19 = icmp eq i64 %18, 0
br i1 %19, label %20, label %23
20: ; preds = %16
%21 = add nsw i32 %0, -1
%22 = tail call i32 @nbd_stop_daemon(i8* %4, i32 %21, i8** %10)
br label %73
23: ; preds = %16
%24 = load i8*, i8** %10
%25 = tail call i64 @strcmp(i8* %24, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0))
%26 = icmp eq i64 %25, 0
br i1 %26, label %31, label %27
27: ; preds = %23
%28 = load i8*, i8** %10
%29 = tail call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.3, i64 0, i64 0))
%30 = icmp eq i64 %29, 0
br i1 %30, label %31, label %34
31: ; preds = %27, %23
%32 = add nsw i32 %0, -1
%33 = tail call i32 @nbd_add_mapping(i8* %4, i32 %32, i8** %10)
br label %73
34: ; preds = %27
%35 = load i8*, i8** %10
%36 = tail call i64 @strcmp(i8* %35, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.4, i64 0, i64 0))
%37 = icmp eq i64 %36, 0
br i1 %37, label %54, label %38
38: ; preds = %34
%39 = load i8*, i8** %10
%40 = tail call i64 @strcmp(i8* %39, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.5, i64 0, i64 0))
%41 = icmp eq i64 %40, 0
br i1 %41, label %54, label %42
42: ; preds = %38
%43 = load i8*, i8** %10
%44 = tail call i64 @strcmp(i8* %43, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.6, i64 0, i64 0))
%45 = icmp eq i64 %44, 0
br i1 %45, label %54, label %46
46: ; preds = %42
%47 = load i8*, i8** %10
%48 = tail call i64 @strcmp(i8* %47, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.7, i64 0, i64 0))
%49 = icmp eq i64 %48, 0
br i1 %49, label %54, label %50
50: ; preds = %46
%51 = load i8*, i8** %10
%52 = tail call i64 @strcmp(i8* %51, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.8, i64 0, i64 0))
%53 = icmp eq i64 %52, 0
br i1 %53, label %54, label %57
54: ; preds = %50, %46, %42, %38, %34
%55 = add nsw i32 %0, -1
%56 = tail call i32 @nbd_remove_mapping(i8* %4, i32 %55, i8** %10)
br label %73
57: ; preds = %50
%58 = load i8*, i8** %10
%59 = tail call i64 @strcmp(i8* %58, i8* getelementptr inbounds ([7 x i8], [7 x i8]* @.str.9, i64 0, i64 0))
%60 = icmp eq i64 %59, 0
br i1 %60, label %61, label %64
61: ; preds = %57
%62 = add nsw i32 %0, -1
%63 = tail call i32 @nbd_resize_bdev(i8* %4, i32 %62, i8** %10)
br label %73
64: ; preds = %57
%65 = load i8*, i8** %10
%66 = tail call i64 @strcmp(i8* %65, i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.10, i64 0, i64 0))
%67 = icmp eq i64 %66, 0
br i1 %67, label %68, label %71
68: ; preds = %64
%69 = add nsw i32 %0, -1
%70 = tail call i32 @nbd_list_mappings(i8* %4, i32 %69, i8** %10)
br label %73
71: ; preds = %64
%72 = tail call i32 @usage(i8* %4)
br label %73
73: ; preds = %14, %31, %61, %71, %68, %54, %20, %7
%74 = phi i32 [ 1, %7 ], [ %15, %14 ], [ %22, %20 ], [ %33, %31 ], [ %56, %54 ], [ %63, %61 ], [ %70, %68 ], [ 1, %71 ]
%75 = tail call i32 @free(i8* %4)
ret i32 %74
}