#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 */
typedef struct TYPE_4__ TYPE_1__;

/* Type definitions */
struct iwinfo_ops {
  int dummy;
};
struct TYPE_4__ {
  int gl_pathc;
  int /*<<< orphan*/ *gl_pathv;
};
typedef TYPE_1__ glob_t;

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/, char *, ...);
int /*<<< orphan*/ glob(char *, int /*<<< orphan*/, int /*<<< orphan*/ *,
                        TYPE_1__ *);
int /*<<< orphan*/ globfree(TYPE_1__ *);
struct iwinfo_ops *iwinfo_backend(char *);
int /*<<< orphan*/ iwinfo_finish();
int /*<<< orphan*/ print_assoclist(struct iwinfo_ops const *, char *);
int /*<<< orphan*/ print_countrylist(struct iwinfo_ops const *, char *);
int /*<<< orphan*/ print_freqlist(struct iwinfo_ops const *, char *);
int /*<<< orphan*/ print_info(struct iwinfo_ops const *, char *);
int /*<<< orphan*/ print_scanlist(struct iwinfo_ops const *, char *);
int /*<<< orphan*/ print_txpwrlist(struct iwinfo_ops const *, char *);
int /*<<< orphan*/ printf(char *);
int /*<<< orphan*/ stderr;
char *strrchr(int /*<<< orphan*/, char);
int main(int argc, char **argv) {
  int i;
  char *p;
  const struct iwinfo_ops *iw;
  glob_t globbuf;
  if (argc > 1 && argc < 3) {
    fprintf(stderr, "Usage:\n"
                    "	iwinfo <device> info\n"
                    "	iwinfo <device> scan\n"
                    "	iwinfo <device> txpowerlist\n"
                    "	iwinfo <device> freqlist\n"
                    "	iwinfo <device> assoclist\n"
                    "	iwinfo <device> countrylist\n");
    return 1;
  }
  if (argc == 1) {
    glob("/sys/class/net/*", 0, NULL, &globbuf);
    for (i = 0; i < globbuf.gl_pathc; i++) {
      p = strrchr(globbuf.gl_pathv[i], '/');
      if (!p)
        continue;
      iw = iwinfo_backend(++p);
      if (!iw)
        continue;
      print_info(iw, p);
      printf("\n");
    }
    globfree(&globbuf);
    return 0;
  }
  iw = iwinfo_backend(argv[1]);
  if (!iw) {
    fprintf(stderr, "No such wireless device: %s\n", argv[1]);
    return 1;
  }
  for (i = 2; i < argc; i++) {
    switch (argv[i][0]) {
    case 'i':
      print_info(iw, argv[1]);
      break;
    case 's':
      print_scanlist(iw, argv[1]);
      break;
    case 't':
      print_txpwrlist(iw, argv[1]);
      break;
    case 'f':
      print_freqlist(iw, argv[1]);
      break;
    case 'a':
      print_assoclist(iw, argv[1]);
      break;
    case 'c':
      print_countrylist(iw, argv[1]);
      break;
    default:
      fprintf(stderr, "Unknown command: %s\n", argv[i]);
      return 1;
    }
  }
  iwinfo_finish();
  return 0;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x40,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
cmpl   $0x1,-0x8(%rbp)
jle    121d <main+0x4d>
cmpl   $0x3,-0x8(%rbp)
jge    121d <main+0x4d>
mov    0x2ddf(%rip),%rax
mov    (%rax),%edi
lea    0xe46(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    143d <main+0x26d>
cmpl   $0x1,-0x8(%rbp)
jne    12da <main+0x10a>
lea    0xec5(%rip),%rdi
xor    %esi,%esi
xor    %eax,%eax
mov    %eax,%edx
lea    -0x38(%rbp),%rcx
call   10e0 <glob@plt>
movl   $0x0,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x38(%rbp),%eax
jge    12c5 <main+0xf5>
mov    -0x30(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,4),%edi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
mov    %rax,-0x20(%rbp)
cmpq   $0x0,-0x20(%rbp)
jne    1279 <main+0xa9>
jmp    12b7 <main+0xe7>
mov    -0x20(%rbp),%rdi
add    $0x1,%rdi
mov    %rdi,-0x20(%rbp)
call   10c0 <iwinfo_backend@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    129e <main+0xce>
jmp    12b7 <main+0xe7>
mov    -0x28(%rbp),%rdi
mov    -0x20(%rbp),%rsi
call   10f0 <print_info@plt>
lea    0xe82(%rip),%rdi
call   1060 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1244 <main+0x74>
lea    -0x38(%rbp),%rdi
call   1030 <globfree@plt>
movl   $0x0,-0x4(%rbp)
jmp    143d <main+0x26d>
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdi
call   10c0 <iwinfo_backend@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
jne    1321 <main+0x151>
mov    0x2ce3(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rdx
lea    0xdf6(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    143d <main+0x26d>
movl   $0x2,-0x14(%rbp)
mov    -0x14(%rbp),%eax
cmp    -0x8(%rbp),%eax
jge    142f <main+0x25f>
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rax
movsbl (%rax),%eax
add    $0xffffff9f,%eax
mov    %eax,%ecx
mov    %rcx,-0x40(%rbp)
sub    $0x13,%eax
ja     13ed <main+0x21d>
mov    -0x40(%rbp),%rax
lea    0xca0(%rip),%rcx
movslq (%rcx,%rax,4),%rax
add    %rcx,%rax
jmp    *%rax
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   10f0 <print_info@plt>
jmp    141c <main+0x24c>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   10d0 <print_scanlist@plt>
jmp    141c <main+0x24c>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1050 <print_txpwrlist@plt>
jmp    141c <main+0x24c>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1040 <print_freqlist@plt>
jmp    141c <main+0x24c>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   1090 <print_assoclist@plt>
jmp    141c <main+0x24c>
mov    -0x28(%rbp),%rdi
mov    -0x10(%rbp),%rax
mov    0x8(%rax),%rsi
call   10b0 <print_countrylist@plt>
jmp    141c <main+0x24c>
mov    0x2bec(%rip),%rax
mov    (%rax),%edi
mov    -0x10(%rbp),%rax
movslq -0x14(%rbp),%rcx
mov    (%rax,%rcx,8),%rdx
lea    0xd18(%rip),%rsi
mov    $0x0,%al
call   10a0 <fprintf@plt>
movl   $0x1,-0x4(%rbp)
jmp    143d <main+0x26d>
jmp    1421 <main+0x251>
mov    -0x14(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x14(%rbp)
jmp    1328 <main+0x158>
mov    $0x0,%al
call   1080 <iwinfo_finish@plt>
movl   $0x0,-0x4(%rbp)
mov    -0x4(%rbp),%eax
add    $0x40,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %rbp
push   %r15
push   %r14
push   %r12
push   %rbx
sub    $0x10,%rsp
cmp    $0x1,%edi
je     1208 <main+0x38>
mov    %edi,%ebp
cmp    $0x2,%edi
jne    1283 <main+0xb3>
mov    0x2ded(%rip),%rax
mov    (%rax),%edi
lea    0xe54(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
jmp    136c <main+0x19c>
lea    0xee4(%rip),%rdi
xor    %r14d,%r14d
mov    %rsp,%rcx
xor    %esi,%esi
xor    %edx,%edx
call   10e0 <glob@plt>
cmpl   $0x0,(%rsp)
jle    133b <main+0x16b>
xor    %ebx,%ebx
jmp    1241 <main+0x71>
nopl   0x0(%rax)
add    $0x1,%rbx
movslq (%rsp),%rax
cmp    %rax,%rbx
jge    133b <main+0x16b>
mov    0x8(%rsp),%rax
mov    (%rax,%rbx,4),%edi
mov    $0x2f,%esi
call   1070 <strrchr@plt>
test   %rax,%rax
je     1230 <main+0x60>
mov    %rax,%rbp
add    $0x1,%rbp
mov    %rbp,%rdi
call   10c0 <iwinfo_backend@plt>
test   %rax,%rax
je     1230 <main+0x60>
mov    %rax,%rdi
mov    %rbp,%rsi
call   10f0 <print_info@plt>
mov    $0xa,%edi
call   1040 <putchar@plt>
jmp    1230 <main+0x60>
mov    %rsi,%rbx
mov    0x8(%rsi),%rdi
call   10c0 <iwinfo_backend@plt>
test   %rax,%rax
je     1351 <main+0x181>
cmp    $0x3,%ebp
jl     1345 <main+0x175>
mov    %rax,%r14
mov    %ebp,%r15d
mov    $0x2,%ebp
lea    0xd4d(%rip),%r12
jmp    12d9 <main+0x109>
mov    0x8(%rbx),%rsi
mov    %r14,%rdi
call   10f0 <print_info@plt>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbp
cmp    %rbp,%r15
je     1345 <main+0x175>
mov    (%rbx,%rbp,8),%rdx
movsbl (%rdx),%eax
add    $0xffffff9f,%eax
cmp    $0x13,%eax
ja     1382 <main+0x1b2>
movslq (%r12,%rax,4),%rax
add    %r12,%rax
jmp    *%rax
mov    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1090 <print_assoclist@plt>
jmp    12d0 <main+0x100>
mov    0x8(%rbx),%rsi
mov    %r14,%rdi
call   10b0 <print_countrylist@plt>
jmp    12d0 <main+0x100>
mov    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1050 <print_freqlist@plt>
jmp    12d0 <main+0x100>
mov    0x8(%rbx),%rsi
mov    %r14,%rdi
call   10d0 <print_scanlist@plt>
jmp    12d0 <main+0x100>
mov    0x8(%rbx),%rsi
mov    %r14,%rdi
call   1060 <print_txpwrlist@plt>
jmp    12d0 <main+0x100>
mov    %rsp,%rdi
call   1030 <globfree@plt>
jmp    1372 <main+0x1a2>
xor    %r14d,%r14d
xor    %eax,%eax
call   1080 <iwinfo_finish@plt>
jmp    1372 <main+0x1a2>
mov    0x2c88(%rip),%rax
mov    (%rax),%edi
mov    0x8(%rbx),%rdx
lea    0xd9f(%rip),%rsi
xor    %eax,%eax
call   10a0 <fprintf@plt>
mov    $0x1,%r14d
mov    %r14d,%eax
add    $0x10,%rsp
pop    %rbx
pop    %r12
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2c57(%rip),%rax
mov    (%rax),%edi
lea    0xd8f(%rip),%rsi
jmp    1365 <main+0x195>

LLVM IR (-O0):
%struct.iwinfo_ops = type { i32 }
%struct.TYPE_4__ = type { i32, i32* }
@stderr = global i32 0
@.str = [163 x i8] c"Usage:\0A\09iwinfo <device> info\0A\09iwinfo <device> scan\0A\09iwinfo <device> txpowerlist\0A\09iwinfo <device> freqlist\0A\09iwinfo <device> assoclist\0A\09iwinfo <device> countrylist\0A\00"
@.str.1 = [17 x i8] c"/sys/class/net/*\00"
@.str.2 = [2 x i8] c"\0A\00"
@.str.3 = [29 x i8] c"No such wireless device: %s\0A\00"
@.str.4 = [21 x i8] c"Unknown command: %s\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca i8*
%8 = alloca %struct.iwinfo_ops*
%9 = alloca %struct.TYPE_4__
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
%10 = load i32, i32* %4
%11 = icmp sgt i32 %10, 1
br i1 %11, label %12, label %18
12: ; preds = %2
%13 = load i32, i32* %4
%14 = icmp slt i32 %13, 3
br i1 %14, label %15, label %18
15: ; preds = %12
%16 = load i32, i32* @stderr
%17 = call i32 (i32, i8*, ...) @fprintf(i32 %16, i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0))
store i32 1, i32* %3
br label %133
18: ; preds = %12, %2
%19 = load i32, i32* %4
%20 = icmp eq i32 %19, 1
br i1 %20, label %21, label %56
21: ; preds = %18
%22 = call i32 @glob(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 0, i32* null, %struct.TYPE_4__* %9)
store i32 0, i32* %6
br label %23
23: ; preds = %51, %21
%24 = load i32, i32* %6
%25 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %9, i32 0, i32 0
%26 = load i32, i32* %25
%27 = icmp slt i32 %24, %26
br i1 %27, label %28, label %54
28: ; preds = %23
%29 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %9, i32 0, i32 1
%30 = load i32*, i32** %29
%31 = load i32, i32* %6
%32 = sext i32 %31 to i64
%33 = getelementptr inbounds i32, i32* %30, i64 %32
%34 = load i32, i32* %33
%35 = call i8* @strrchr(i32 %34, i8 signext 47)
store i8* %35, i8** %7
%36 = load i8*, i8** %7
%37 = icmp ne i8* %36, null
br i1 %37, label %39, label %38
38: ; preds = %28
br label %51
39: ; preds = %28
%40 = load i8*, i8** %7
%41 = getelementptr inbounds i8, i8* %40, i32 1
store i8* %41, i8** %7
%42 = call %struct.iwinfo_ops* @iwinfo_backend(i8* %41)
store %struct.iwinfo_ops* %42, %struct.iwinfo_ops** %8
%43 = load %struct.iwinfo_ops*, %struct.iwinfo_ops** %8
%44 = icmp ne %struct.iwinfo_ops* %43, null
br i1 %44, label %46, label %45
45: ; preds = %39
br label %51
46: ; preds = %39
%47 = load %struct.iwinfo_ops*, %struct.iwinfo_ops** %8
%48 = load i8*, i8** %7
%49 = call i32 @print_info(%struct.iwinfo_ops* %47, i8* %48)
%50 = call i32 @printf(i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.2, i64 0, i64 0))
br label %51
51: ; preds = %46, %45, %38
%52 = load i32, i32* %6
%53 = add nsw i32 %52, 1
store i32 %53, i32* %6
br label %23
54: ; preds = %23
%55 = call i32 @globfree(%struct.TYPE_4__* %9)
store i32 0, i32* %3
br label %133
56: ; preds = %18
%57 = load i8**, i8*** %5
%58 = getelementptr inbounds i8*, i8** %57, i64 1
%59 = load i8*, i8** %58
%60 = call %struct.iwinfo_ops* @iwinfo_backend(i8* %59)
store %struct.iwinfo_ops* %60, %struct.iwinfo_ops** %8
%61 = load %struct.iwinfo_ops*, %struct.iwinfo_ops** %8
%62 = icmp ne %struct.iwinfo_ops* %61, null
br i1 %62, label %69, label %63
63: ; preds = %56
%64 = load i32, i32* @stderr
%65 = load i8**, i8*** %5
%66 = getelementptr inbounds i8*, i8** %65, i64 1
%67 = load i8*, i8** %66
%68 = call i32 (i32, i8*, ...) @fprintf(i32 %64, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i8* %67)
store i32 1, i32* %3
br label %133
69: ; preds = %56
store i32 2, i32* %6
br label %70
70: ; preds = %128, %69
%71 = load i32, i32* %6
%72 = load i32, i32* %4
%73 = icmp slt i32 %71, %72
br i1 %73, label %74, label %131
74: ; preds = %70
%75 = load i8**, i8*** %5
%76 = load i32, i32* %6
%77 = sext i32 %76 to i64
%78 = getelementptr inbounds i8*, i8** %75, i64 %77
%79 = load i8*, i8** %78
%80 = getelementptr inbounds i8, i8* %79, i64 0
%81 = load i8, i8* %80
%82 = sext i8 %81 to i32
switch i32 %82, label %119 [
i32 105, label %83
i32 115, label %89
i32 116, label %95
i32 102, label %101
i32 97, label %107
i32 99, label %113
]
83: ; preds = %74
%84 = load %struct.iwinfo_ops*, %struct.iwinfo_ops** %8
%85 = load i8**, i8*** %5
%86 = getelementptr inbounds i8*, i8** %85, i64 1
%87 = load i8*, i8** %86
%88 = call i32 @print_info(%struct.iwinfo_ops* %84, i8* %87)
br label %127
89: ; preds = %74
%90 = load %struct.iwinfo_ops*, %struct.iwinfo_ops** %8
%91 = load i8**, i8*** %5
%92 = getelementptr inbounds i8*, i8** %91, i64 1
%93 = load i8*, i8** %92
%94 = call i32 @print_scanlist(%struct.iwinfo_ops* %90, i8* %93)
br label %127
95: ; preds = %74
%96 = load %struct.iwinfo_ops*, %struct.iwinfo_ops** %8
%97 = load i8**, i8*** %5
%98 = getelementptr inbounds i8*, i8** %97, i64 1
%99 = load i8*, i8** %98
%100 = call i32 @print_txpwrlist(%struct.iwinfo_ops* %96, i8* %99)
br label %127
101: ; preds = %74
%102 = load %struct.iwinfo_ops*, %struct.iwinfo_ops** %8
%103 = load i8**, i8*** %5
%104 = getelementptr inbounds i8*, i8** %103, i64 1
%105 = load i8*, i8** %104
%106 = call i32 @print_freqlist(%struct.iwinfo_ops* %102, i8* %105)
br label %127
107: ; preds = %74
%108 = load %struct.iwinfo_ops*, %struct.iwinfo_ops** %8
%109 = load i8**, i8*** %5
%110 = getelementptr inbounds i8*, i8** %109, i64 1
%111 = load i8*, i8** %110
%112 = call i32 @print_assoclist(%struct.iwinfo_ops* %108, i8* %111)
br label %127
113: ; preds = %74
%114 = load %struct.iwinfo_ops*, %struct.iwinfo_ops** %8
%115 = load i8**, i8*** %5
%116 = getelementptr inbounds i8*, i8** %115, i64 1
%117 = load i8*, i8** %116
%118 = call i32 @print_countrylist(%struct.iwinfo_ops* %114, i8* %117)
br label %127
119: ; preds = %74
%120 = load i32, i32* @stderr
%121 = load i8**, i8*** %5
%122 = load i32, i32* %6
%123 = sext i32 %122 to i64
%124 = getelementptr inbounds i8*, i8** %121, i64 %123
%125 = load i8*, i8** %124
%126 = call i32 (i32, i8*, ...) @fprintf(i32 %120, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* %125)
store i32 1, i32* %3
br label %133
127: ; preds = %113, %107, %101, %95, %89, %83
br label %128
128: ; preds = %127
%129 = load i32, i32* %6
%130 = add nsw i32 %129, 1
store i32 %130, i32* %6
br label %70
131: ; preds = %70
%132 = call i32 (...) @iwinfo_finish()
store i32 0, i32* %3
br label %133
133: ; preds = %131, %119, %63, %54, %15
%134 = load i32, i32* %3
ret i32 %134
}

LLVM IR (-O2):
%struct.TYPE_4__ = type { i32, i32* }
%struct.iwinfo_ops = type { i32 }
@stderr = global i32 0
@.str = [163 x i8] c"Usage:\0A\09iwinfo <device> info\0A\09iwinfo <device> scan\0A\09iwinfo <device> txpowerlist\0A\09iwinfo <device> freqlist\0A\09iwinfo <device> assoclist\0A\09iwinfo <device> countrylist\0A\00"
@.str.1 = [17 x i8] c"/sys/class/net/*\00"
@.str.3 = [29 x i8] c"No such wireless device: %s\0A\00"
@.str.4 = [21 x i8] c"Unknown command: %s\0A\00"
define i32 @main(i32 %0, i8** nocapture %1) {
%3 = alloca %struct.TYPE_4__
%4 = bitcast %struct.TYPE_4__* %3 to i8*
switch i32 %0, label %36 [
i32 2, label %5
i32 1, label %8
]
5: ; preds = %2
%6 = load i32, i32* @stderr
%7 = tail call i32 (i32, i8*, ...) @fprintf(i32 %6, i8* getelementptr inbounds ([163 x i8], [163 x i8]* @.str, i64 0, i64 0))
br label %81
8: ; preds = %2
%9 = call i32 @glob(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.1, i64 0, i64 0), i32 0, i32* null, %struct.TYPE_4__* %3)
%10 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i64 0, i32 0
%11 = load i32, i32* %10
%12 = icmp sgt i32 %11, 0
br i1 %12, label %13, label %34
13: ; preds = %8
%14 = getelementptr inbounds %struct.TYPE_4__, %struct.TYPE_4__* %3, i64 0, i32 1
br label %15
15: ; preds = %13, %29
%16 = phi i64 [ 0, %13 ], [ %30, %29 ]
%17 = load i32*, i32** %14
%18 = getelementptr inbounds i32, i32* %17, i64 %16
%19 = load i32, i32* %18
%20 = call i8* @strrchr(i32 %19, i8 signext 47)
%21 = icmp eq i8* %20, null
br i1 %21, label %29, label %22
22: ; preds = %15
%23 = getelementptr inbounds i8, i8* %20, i64 1
%24 = call %struct.iwinfo_ops* @iwinfo_backend(i8* %23)
%25 = icmp eq %struct.iwinfo_ops* %24, null
br i1 %25, label %29, label %26
26: ; preds = %22
%27 = call i32 @print_info(%struct.iwinfo_ops* %24, i8* %23)
%28 = call i32 @putchar(i32 10)
br label %29
29: ; preds = %22, %15, %26
%30 = add nuw nsw i64 %16, 1
%31 = load i32, i32* %10
%32 = sext i32 %31 to i64
%33 = icmp slt i64 %30, %32
br i1 %33, label %15, label %34
34: ; preds = %29, %8
%35 = call i32 @globfree(%struct.TYPE_4__* %3)
br label %81
36: ; preds = %2
%37 = getelementptr inbounds i8*, i8** %1, i64 1
%38 = load i8*, i8** %37
%39 = tail call %struct.iwinfo_ops* @iwinfo_backend(i8* %38)
%40 = icmp eq %struct.iwinfo_ops* %39, null
br i1 %40, label %45, label %41
41: ; preds = %36
%42 = icmp sgt i32 %0, 2
br i1 %42, label %43, label %79
43: ; preds = %41
%44 = zext i32 %0 to i64
br label %49
45: ; preds = %36
%46 = load i32, i32* @stderr
%47 = load i8*, i8** %37
%48 = tail call i32 (i32, i8*, ...) @fprintf(i32 %46, i8* getelementptr inbounds ([29 x i8], [29 x i8]* @.str.3, i64 0, i64 0), i8* %47)
br label %81
49: ; preds = %43, %76
%50 = phi i64 [ 2, %43 ], [ %77, %76 ]
%51 = getelementptr inbounds i8*, i8** %1, i64 %50
%52 = load i8*, i8** %51
%53 = load i8, i8* %52
%54 = sext i8 %53 to i32
switch i32 %54, label %73 [
i32 105, label %55
i32 115, label %58
i32 116, label %61
i32 102, label %64
i32 97, label %67
i32 99, label %70
]
55: ; preds = %49
%56 = load i8*, i8** %37
%57 = tail call i32 @print_info(%struct.iwinfo_ops* %39, i8* %56)
br label %76
58: ; preds = %49
%59 = load i8*, i8** %37
%60 = tail call i32 @print_scanlist(%struct.iwinfo_ops* %39, i8* %59)
br label %76
61: ; preds = %49
%62 = load i8*, i8** %37
%63 = tail call i32 @print_txpwrlist(%struct.iwinfo_ops* %39, i8* %62)
br label %76
64: ; preds = %49
%65 = load i8*, i8** %37
%66 = tail call i32 @print_freqlist(%struct.iwinfo_ops* %39, i8* %65)
br label %76
67: ; preds = %49
%68 = load i8*, i8** %37
%69 = tail call i32 @print_assoclist(%struct.iwinfo_ops* %39, i8* %68)
br label %76
70: ; preds = %49
%71 = load i8*, i8** %37
%72 = tail call i32 @print_countrylist(%struct.iwinfo_ops* %39, i8* %71)
br label %76
73: ; preds = %49
%74 = load i32, i32* @stderr
%75 = tail call i32 (i32, i8*, ...) @fprintf(i32 %74, i8* getelementptr inbounds ([21 x i8], [21 x i8]* @.str.4, i64 0, i64 0), i8* %52)
br label %81
76: ; preds = %55, %58, %61, %64, %67, %70
%77 = add nuw nsw i64 %50, 1
%78 = icmp eq i64 %77, %44
br i1 %78, label %79, label %49
79: ; preds = %76, %41
%80 = tail call i32 (...) @iwinfo_finish()
br label %81
81: ; preds = %79, %73, %45, %34, %5
%82 = phi i32 [ 1, %5 ], [ 0, %34 ], [ 1, %73 ], [ 0, %79 ], [ 1, %45 ]
ret i32 %82
}