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

/* Variables and functions */
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, int, int, int, int,
                           char const, char const, ...);
int /*<<< orphan*/ isdigit(int);
int /*<<< orphan*/ isxdigit(int);
scalar_t__ memcmp(int *, char const *, int);
void testwlan(FILE *fhout, uint8_t essidlen, uint8_t *essid) {
  static int k1, k2, k3, k4, k5, k6, k7, k8, k9;
  static const char *wifirsu = "WLAN-";
  static const char hextable[] = "0123456789ABCDEF";
  if (essidlen != 11)
    return;
  if (memcmp(essid, wifirsu, 5) != 0)
    return;
  if ((!isxdigit(essid[5])) || (!isxdigit(essid[6])) || (!isxdigit(essid[7])) ||
      (!isxdigit(essid[8])) || (!isdigit(essid[9])) || (!isdigit(essid[10])))
    return;
  k1 = essid[9];
  k2 = 0;
  k3 = essid[10];
  k4 = essid[8];
  k5 = 0;
  k6 = 0;
  k7 = 0;
  k8 = essid[6];
  k9 = essid[7];
  for (k2 = 0; k2 < 10; k2++) {
    for (k5 = 0; k5 <= 0xffff; k5++) {
      fprintf(fhout, "SP-%c%d%c%c%04X%d\n", k1, k2, k3, k4, k5, k2);
      fprintf(fhout, "SP%c%d%c%c%04X%d\n", k1, k2, k3, k4, k5, k2);
    }
  }
  for (k2 = 0; k2 < 10; k2++) {
    for (k5 = 0; k5 <= 0x0f; k5++) {
      for (k6 = 0; k6 <= 0x0f; k6++) {
        for (k7 = 0; k7 < 100; k7++) {
          fprintf(fhout, "%c%d%c%02d%02d%02d%02d%d%02d%02d\n", k1, k2, k3, k4,
                  hextable[k5], hextable[k6], k7, k2, k8, k9);
        }
      }
    }
  }
  return;
}


x86 assembly (clang, -O0):
<testwlan>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %rbx
sub    $0x48,%rsp
mov    %rdi,-0x20(%rbp)
mov    %esi,-0x24(%rbp)
mov    %rdx,-0x30(%rbp)
cmpl   $0xb,-0x24(%rbp)
je     1167 <testwlan+0x27>
jmp    14b6 <testwlan+0x376>
mov    -0x30(%rbp),%rdi
mov    0x2ece(%rip),%rsi
mov    $0x5,%edx
call   1040 <memcmp@plt>
cmp    $0x0,%rax
je     118b <testwlan+0x4b>
jmp    14b6 <testwlan+0x376>
mov    -0x30(%rbp),%rax
mov    0x14(%rax),%edi
call   1060 <isxdigit@plt>
cmp    $0x0,%eax
je     1209 <testwlan+0xc9>
mov    -0x30(%rbp),%rax
mov    0x18(%rax),%edi
call   1060 <isxdigit@plt>
cmp    $0x0,%eax
je     1209 <testwlan+0xc9>
mov    -0x30(%rbp),%rax
mov    0x1c(%rax),%edi
call   1060 <isxdigit@plt>
cmp    $0x0,%eax
je     1209 <testwlan+0xc9>
mov    -0x30(%rbp),%rax
mov    0x20(%rax),%edi
call   1060 <isxdigit@plt>
cmp    $0x0,%eax
je     1209 <testwlan+0xc9>
mov    -0x30(%rbp),%rax
mov    0x24(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
je     1209 <testwlan+0xc9>
mov    -0x30(%rbp),%rax
mov    0x28(%rax),%edi
call   1030 <isdigit@plt>
cmp    $0x0,%eax
jne    120e <testwlan+0xce>
jmp    14b6 <testwlan+0x376>
mov    -0x30(%rbp),%rax
mov    0x24(%rax),%eax
mov    %eax,0x2e31(%rip)
movl   $0x0,0x2e2b(%rip)
mov    -0x30(%rbp),%rax
mov    0x28(%rax),%eax
mov    %eax,0x2e22(%rip)
mov    -0x30(%rbp),%rax
mov    0x20(%rax),%eax
mov    %eax,0x2e19(%rip)
movl   $0x0,0x2e13(%rip)
movl   $0x0,0x2e0d(%rip)
movl   $0x0,0x2e07(%rip)
mov    -0x30(%rbp),%rax
mov    0x18(%rax),%eax
mov    %eax,0x2dfe(%rip)
mov    -0x30(%rbp),%rax
mov    0x1c(%rax),%eax
mov    %eax,0x2df5(%rip)
movl   $0x0,0x2dcf(%rip)
cmpl   $0xa,0x2dc8(%rip)
jge    1369 <testwlan+0x229>
movl   $0x0,0x2dc4(%rip)
cmpl   $0xffff,0x2dba(%rip)
jg     1350 <testwlan+0x210>
mov    -0x20(%rbp),%rdi
mov    0x2d9a(%rip),%edx
mov    0x2d98(%rip),%ecx
mov    0x2d95(%rip),%r8d
mov    0x2d92(%rip),%r9d
mov    0x2d90(%rip),%eax
mov    %al,%r10b
mov    0x2d7b(%rip),%eax
lea    0xd2a(%rip),%rsi
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    -0x20(%rbp),%rdi
mov    0x2d50(%rip),%edx
mov    0x2d4e(%rip),%ecx
mov    0x2d4b(%rip),%r8d
mov    0x2d48(%rip),%r9d
mov    0x2d46(%rip),%eax
mov    %al,%r10b
mov    0x2d31(%rip),%eax
lea    0xcf3(%rip),%rsi
movsbl %r10b,%r10d
mov    %r10d,(%rsp)
movsbl %al,%eax
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2d1a(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2d11(%rip)
jmp    1298 <testwlan+0x158>
jmp    1355 <testwlan+0x215>
mov    0x2cf5(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2cec(%rip)
jmp    1281 <testwlan+0x141>
movl   $0x0,0x2cdd(%rip)
cmpl   $0xa,0x2cd6(%rip)
jge    14b1 <testwlan+0x371>
movl   $0x0,0x2cd2(%rip)
cmpl   $0xf,0x2ccb(%rip)
jg     1498 <testwlan+0x358>
movl   $0x0,0x2cbf(%rip)
cmpl   $0xf,0x2cb8(%rip)
jg     147f <testwlan+0x33f>
movl   $0x0,0x2cac(%rip)
cmpl   $0x64,0x2ca5(%rip)
jge    1466 <testwlan+0x326>
mov    -0x20(%rbp),%rdi
mov    0x2c7d(%rip),%edx
mov    0x2c7b(%rip),%ecx
mov    0x2c78(%rip),%r8d
mov    0x2c75(%rip),%r9d
movslq 0x2c72(%rip),%rsi
lea    0xc5f(%rip),%rax
mov    (%rax,%rsi,1),%r15b
movslq 0x2c64(%rip),%rsi
lea    0xc4d(%rip),%rax
mov    (%rax,%rsi,1),%r14b
mov    0x2c57(%rip),%ebx
mov    0x2c3c(%rip),%r11d
mov    0x2c4d(%rip),%r10d
mov    0x2c4b(%rip),%eax
lea    0xc03(%rip),%rsi
movsbl %r15b,%r15d
mov    %r15d,(%rsp)
movsbl %r14b,%r14d
mov    %r14d,0x8(%rsp)
mov    %ebx,0x10(%rsp)
mov    %r11d,0x18(%rsp)
mov    %r10d,0x20(%rsp)
mov    %eax,0x28(%rsp)
mov    $0x0,%al
call   1050 <fprintf@plt>
mov    0x2c0c(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2c03(%rip)
jmp    13b8 <testwlan+0x278>
jmp    146b <testwlan+0x32b>
mov    0x2bef(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2be6(%rip)
jmp    13a1 <testwlan+0x261>
jmp    1484 <testwlan+0x344>
mov    0x2bd2(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2bc9(%rip)
jmp    138a <testwlan+0x24a>
jmp    149d <testwlan+0x35d>
mov    0x2bad(%rip),%eax
add    $0x1,%eax
mov    %eax,0x2ba4(%rip)
jmp    1373 <testwlan+0x233>
jmp    14b6 <testwlan+0x376>
add    $0x48,%rsp
pop    %rbx
pop    %r14
pop    %r15
pop    %rbp
ret

x86 assembly (clang, -O2):
<testwlan>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
push   %rax
cmp    $0xb,%esi
jne    115f <testwlan+0x2f>
mov    %rdx,%rbx
mov    %rdi,%r14
lea    0xeb3(%rip),%rsi
mov    %rdx,%rdi
mov    $0x5,%edx
call   1030 <memcmp@plt>
test   %rax,%rax
je     116e <testwlan+0x3e>
add    $0x8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x14(%rbx),%edi
call   1050 <isxdigit@plt>
test   %eax,%eax
je     115f <testwlan+0x2f>
mov    0x18(%rbx),%ebp
mov    %ebp,%edi
call   1050 <isxdigit@plt>
test   %eax,%eax
je     115f <testwlan+0x2f>
mov    0x1c(%rbx),%r15d
mov    %r15d,%edi
call   1050 <isxdigit@plt>
test   %eax,%eax
je     115f <testwlan+0x2f>
mov    0x20(%rbx),%r12d
mov    %r12d,%edi
call   1050 <isxdigit@plt>
test   %eax,%eax
je     115f <testwlan+0x2f>
mov    0x24(%rbx),%eax
lea    -0x30(%rax),%ecx
cmp    $0x9,%ecx
ja     115f <testwlan+0x2f>
mov    0x28(%rbx),%ecx
lea    -0x30(%rcx),%edx
cmp    $0x9,%edx
ja     115f <testwlan+0x2f>
mov    %eax,0x2e78(%rip)
mov    %ecx,0x2e7a(%rip)
mov    %r12d,0x2e77(%rip)
movl   $0x0,0x2e75(%rip)
movl   $0x0,0x2e6f(%rip)
mov    %ebp,0x2e6d(%rip)
mov    %r15d,0x2e6a(%rip)
movl   $0x0,0x2e44(%rip)
lea    0xe03(%rip),%r15
lea    0xe0f(%rip),%r12
xor    %ecx,%ecx
nopl   0x0(%rax)
movl   $0x0,0x2e32(%rip)
xor    %eax,%eax
nopl   0x0(%rax)
mov    0x2e16(%rip),%edx
mov    0x2e17(%rip),%r8d
mov    0x2e14(%rip),%r9d
movsbl %cl,%ebp
movsbl %al,%ebx
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
push   %rbp
push   %rbx
call   1040 <fprintf@plt>
add    $0x10,%rsp
mov    0x2de9(%rip),%edx
mov    0x2de7(%rip),%ecx
mov    0x2de4(%rip),%r8d
mov    0x2de1(%rip),%r9d
movsbl 0x2dde(%rip),%ebp
movsbl %cl,%ebx
mov    %r14,%rdi
mov    %r12,%rsi
xor    %eax,%eax
push   %rbx
push   %rbp
call   1040 <fprintf@plt>
add    $0x10,%rsp
mov    0x2dc2(%rip),%edx
lea    0x1(%rdx),%eax
mov    %eax,0x2db9(%rip)
mov    0x2da7(%rip),%ecx
cmp    $0xffff,%edx
jl     1220 <testwlan+0xf0>
lea    0x1(%rcx),%eax
mov    %eax,0x2d92(%rip)
cmp    $0x9,%ecx
mov    %eax,%ecx
jl     1210 <testwlan+0xe0>
movl   $0x0,0x2d7d(%rip)
lea    0xd86(%rip),%r12
lea    0xd5a(%rip),%r15
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
movl   $0x0,0x2d62(%rip)
nopw   0x0(%rax,%rax,1)
movl   $0x0,0x2d56(%rip)
xor    %eax,%eax
nopl   0x0(%rax)
movl   $0x0,0x2d4a(%rip)
xor    %ebx,%ebx
nopl   0x0(%rax)
mov    0x2d26(%rip),%edx
mov    0x2d24(%rip),%ecx
mov    0x2d21(%rip),%r8d
mov    0x2d1e(%rip),%r9d
movslq 0x2d1b(%rip),%rsi
movsbl (%rsi,%r12,1),%r10d
cltq
movsbl (%rax,%r12,1),%r11d
mov    0x2d14(%rip),%r13d
mov    0x2d12(%rip),%ebp
mov    %r14,%rdi
mov    %r15,%rsi
xor    %eax,%eax
push   %rbp
push   %r13
push   %rcx
push   %rbx
push   %r11
push   %r10
call   1040 <fprintf@plt>
add    $0x30,%rsp
mov    0x2cea(%rip),%ecx
lea    0x1(%rcx),%ebx
mov    %ebx,0x2ce1(%rip)
mov    0x2cd7(%rip),%eax
cmp    $0x63,%ecx
jl     1310 <testwlan+0x1e0>
lea    0x1(%rax),%ecx
mov    %ecx,0x2cc9(%rip)
cmp    $0xf,%eax
mov    %ecx,%eax
jl     1300 <testwlan+0x1d0>
mov    0x2cb4(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2cab(%rip)
cmp    $0xf,%eax
jl     12f0 <testwlan+0x1c0>
mov    0x2c90(%rip),%eax
lea    0x1(%rax),%ecx
mov    %ecx,0x2c87(%rip)
cmp    $0x9,%eax
jl     12e0 <testwlan+0x1b0>
jmp    115f <testwlan+0x2f>

LLVM IR (-O0):
@testwlan.k1 = internal global i32 0
@testwlan.k2 = internal global i32 0
@testwlan.k3 = internal global i32 0
@testwlan.k4 = internal global i32 0
@testwlan.k5 = internal global i32 0
@testwlan.k6 = internal global i32 0
@testwlan.k7 = internal global i32 0
@testwlan.k8 = internal global i32 0
@testwlan.k9 = internal global i32 0
@testwlan.wifirsu = internal global i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i32 0, i32 0)
@.str = [6 x i8] c"WLAN-\00"
@testwlan.hextable = internal constant [17 x i8] c"0123456789ABCDEF\00"
@.str.1 = [19 x i8] c"SP-%c%d%c%c%04X%d\0A\00"
@.str.2 = [18 x i8] c"SP%c%d%c%c%04X%d\0A\00"
@.str.3 = [34 x i8] c"%c%d%c%02d%02d%02d%02d%d%02d%02d\0A\00"
define void @testwlan(i32* %0, i32 %1, i32* %2) {
%4 = alloca i32*
%5 = alloca i32
%6 = alloca i32*
store i32* %0, i32** %4
store i32 %1, i32* %5
store i32* %2, i32** %6
%7 = load i32, i32* %5
%8 = icmp ne i32 %7, 11
br i1 %8, label %9, label %10
9: ; preds = %3
br label %155
10: ; preds = %3
%11 = load i32*, i32** %6
%12 = load i8*, i8** @testwlan.wifirsu
%13 = call i64 @memcmp(i32* %11, i8* %12, i32 5)
%14 = icmp ne i64 %13, 0
br i1 %14, label %15, label %16
15: ; preds = %10
br label %155
16: ; preds = %10
%17 = load i32*, i32** %6
%18 = getelementptr inbounds i32, i32* %17, i64 5
%19 = load i32, i32* %18
%20 = call i32 @isxdigit(i32 %19)
%21 = icmp ne i32 %20, 0
br i1 %21, label %22, label %52
22: ; preds = %16
%23 = load i32*, i32** %6
%24 = getelementptr inbounds i32, i32* %23, i64 6
%25 = load i32, i32* %24
%26 = call i32 @isxdigit(i32 %25)
%27 = icmp ne i32 %26, 0
br i1 %27, label %28, label %52
28: ; preds = %22
%29 = load i32*, i32** %6
%30 = getelementptr inbounds i32, i32* %29, i64 7
%31 = load i32, i32* %30
%32 = call i32 @isxdigit(i32 %31)
%33 = icmp ne i32 %32, 0
br i1 %33, label %34, label %52
34: ; preds = %28
%35 = load i32*, i32** %6
%36 = getelementptr inbounds i32, i32* %35, i64 8
%37 = load i32, i32* %36
%38 = call i32 @isxdigit(i32 %37)
%39 = icmp ne i32 %38, 0
br i1 %39, label %40, label %52
40: ; preds = %34
%41 = load i32*, i32** %6
%42 = getelementptr inbounds i32, i32* %41, i64 9
%43 = load i32, i32* %42
%44 = call i32 @isdigit(i32 %43)
%45 = icmp ne i32 %44, 0
br i1 %45, label %46, label %52
46: ; preds = %40
%47 = load i32*, i32** %6
%48 = getelementptr inbounds i32, i32* %47, i64 10
%49 = load i32, i32* %48
%50 = call i32 @isdigit(i32 %49)
%51 = icmp ne i32 %50, 0
br i1 %51, label %53, label %52
52: ; preds = %46, %40, %34, %28, %22, %16
br label %155
53: ; preds = %46
%54 = load i32*, i32** %6
%55 = getelementptr inbounds i32, i32* %54, i64 9
%56 = load i32, i32* %55
store i32 %56, i32* @testwlan.k1
store i32 0, i32* @testwlan.k2
%57 = load i32*, i32** %6
%58 = getelementptr inbounds i32, i32* %57, i64 10
%59 = load i32, i32* %58
store i32 %59, i32* @testwlan.k3
%60 = load i32*, i32** %6
%61 = getelementptr inbounds i32, i32* %60, i64 8
%62 = load i32, i32* %61
store i32 %62, i32* @testwlan.k4
store i32 0, i32* @testwlan.k5
store i32 0, i32* @testwlan.k6
store i32 0, i32* @testwlan.k7
%63 = load i32*, i32** %6
%64 = getelementptr inbounds i32, i32* %63, i64 6
%65 = load i32, i32* %64
store i32 %65, i32* @testwlan.k8
%66 = load i32*, i32** %6
%67 = getelementptr inbounds i32, i32* %66, i64 7
%68 = load i32, i32* %67
store i32 %68, i32* @testwlan.k9
store i32 0, i32* @testwlan.k2
br label %69
69: ; preds = %101, %53
%70 = load i32, i32* @testwlan.k2
%71 = icmp slt i32 %70, 10
br i1 %71, label %72, label %104
72: ; preds = %69
store i32 0, i32* @testwlan.k5
br label %73
73: ; preds = %97, %72
%74 = load i32, i32* @testwlan.k5
%75 = icmp sle i32 %74, 65535
br i1 %75, label %76, label %100
76: ; preds = %73
%77 = load i32*, i32** %4
%78 = load i32, i32* @testwlan.k1
%79 = load i32, i32* @testwlan.k2
%80 = load i32, i32* @testwlan.k3
%81 = load i32, i32* @testwlan.k4
%82 = load i32, i32* @testwlan.k5
%83 = trunc i32 %82 to i8
%84 = load i32, i32* @testwlan.k2
%85 = trunc i32 %84 to i8
%86 = call i32 (i32*, i8*, i32, i32, i32, i32, i8, i8, ...) @fprintf(i32* %77, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %78, i32 %79, i32 %80, i32 %81, i8 signext %83, i8 signext %85)
%87 = load i32*, i32** %4
%88 = load i32, i32* @testwlan.k1
%89 = load i32, i32* @testwlan.k2
%90 = load i32, i32* @testwlan.k3
%91 = load i32, i32* @testwlan.k4
%92 = load i32, i32* @testwlan.k5
%93 = trunc i32 %92 to i8
%94 = load i32, i32* @testwlan.k2
%95 = trunc i32 %94 to i8
%96 = call i32 (i32*, i8*, i32, i32, i32, i32, i8, i8, ...) @fprintf(i32* %87, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %88, i32 %89, i32 %90, i32 %91, i8 signext %93, i8 signext %95)
br label %97
97: ; preds = %76
%98 = load i32, i32* @testwlan.k5
%99 = add nsw i32 %98, 1
store i32 %99, i32* @testwlan.k5
br label %73
100: ; preds = %73
br label %101
101: ; preds = %100
%102 = load i32, i32* @testwlan.k2
%103 = add nsw i32 %102, 1
store i32 %103, i32* @testwlan.k2
br label %69
104: ; preds = %69
store i32 0, i32* @testwlan.k2
br label %105
105: ; preds = %151, %104
%106 = load i32, i32* @testwlan.k2
%107 = icmp slt i32 %106, 10
br i1 %107, label %108, label %154
108: ; preds = %105
store i32 0, i32* @testwlan.k5
br label %109
109: ; preds = %147, %108
%110 = load i32, i32* @testwlan.k5
%111 = icmp sle i32 %110, 15
br i1 %111, label %112, label %150
112: ; preds = %109
store i32 0, i32* @testwlan.k6
br label %113
113: ; preds = %143, %112
%114 = load i32, i32* @testwlan.k6
%115 = icmp sle i32 %114, 15
br i1 %115, label %116, label %146
116: ; preds = %113
store i32 0, i32* @testwlan.k7
br label %117
117: ; preds = %139, %116
%118 = load i32, i32* @testwlan.k7
%119 = icmp slt i32 %118, 100
br i1 %119, label %120, label %142
120: ; preds = %117
%121 = load i32*, i32** %4
%122 = load i32, i32* @testwlan.k1
%123 = load i32, i32* @testwlan.k2
%124 = load i32, i32* @testwlan.k3
%125 = load i32, i32* @testwlan.k4
%126 = load i32, i32* @testwlan.k5
%127 = sext i32 %126 to i64
%128 = getelementptr inbounds [17 x i8], [17 x i8]* @testwlan.hextable, i64 0, i64 %127
%129 = load i8, i8* %128
%130 = load i32, i32* @testwlan.k6
%131 = sext i32 %130 to i64
%132 = getelementptr inbounds [17 x i8], [17 x i8]* @testwlan.hextable, i64 0, i64 %131
%133 = load i8, i8* %132
%134 = load i32, i32* @testwlan.k7
%135 = load i32, i32* @testwlan.k2
%136 = load i32, i32* @testwlan.k8
%137 = load i32, i32* @testwlan.k9
%138 = call i32 (i32*, i8*, i32, i32, i32, i32, i8, i8, ...) @fprintf(i32* %121, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32 %122, i32 %123, i32 %124, i32 %125, i8 signext %129, i8 signext %133, i32 %134, i32 %135, i32 %136, i32 %137)
br label %139
139: ; preds = %120
%140 = load i32, i32* @testwlan.k7
%141 = add nsw i32 %140, 1
store i32 %141, i32* @testwlan.k7
br label %117
142: ; preds = %117
br label %143
143: ; preds = %142
%144 = load i32, i32* @testwlan.k6
%145 = add nsw i32 %144, 1
store i32 %145, i32* @testwlan.k6
br label %113
146: ; preds = %113
br label %147
147: ; preds = %146
%148 = load i32, i32* @testwlan.k5
%149 = add nsw i32 %148, 1
store i32 %149, i32* @testwlan.k5
br label %109
150: ; preds = %109
br label %151
151: ; preds = %150
%152 = load i32, i32* @testwlan.k2
%153 = add nsw i32 %152, 1
store i32 %153, i32* @testwlan.k2
br label %105
154: ; preds = %105
br label %155
155: ; preds = %154, %52, %15, %9
ret void
}

LLVM IR (-O2):
@testwlan.k1 = internal unnamed_addr global i32 0
@testwlan.k2 = internal unnamed_addr global i32 0
@testwlan.k3 = internal unnamed_addr global i32 0
@testwlan.k4 = internal unnamed_addr global i32 0
@testwlan.k5 = internal unnamed_addr global i32 0
@testwlan.k6 = internal unnamed_addr global i32 0
@testwlan.k7 = internal unnamed_addr global i32 0
@testwlan.k8 = internal unnamed_addr global i32 0
@testwlan.k9 = internal unnamed_addr global i32 0
@.str = [6 x i8] c"WLAN-\00"
@testwlan.hextable = internal unnamed_addr constant [17 x i8] c"0123456789ABCDEF\00"
@.str.1 = [19 x i8] c"SP-%c%d%c%c%04X%d\0A\00"
@.str.2 = [18 x i8] c"SP%c%d%c%c%04X%d\0A\00"
@.str.3 = [34 x i8] c"%c%d%c%02d%02d%02d%02d%d%02d%02d\0A\00"
define void @testwlan(i32* nocapture %0, i32 %1, i32* %2) {
%4 = icmp eq i32 %1, 11
br i1 %4, label %5, label %102
5: ; preds = %3
%6 = tail call i64 @memcmp(i32* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str, i64 0, i64 0), i32 5)
%7 = icmp eq i64 %6, 0
br i1 %7, label %8, label %102
8: ; preds = %5
%9 = getelementptr inbounds i32, i32* %2, i64 5
%10 = load i32, i32* %9
%11 = tail call i32 @isxdigit(i32 %10)
%12 = icmp eq i32 %11, 0
br i1 %12, label %102, label %13
13: ; preds = %8
%14 = getelementptr inbounds i32, i32* %2, i64 6
%15 = load i32, i32* %14
%16 = tail call i32 @isxdigit(i32 %15)
%17 = icmp eq i32 %16, 0
br i1 %17, label %102, label %18
18: ; preds = %13
%19 = getelementptr inbounds i32, i32* %2, i64 7
%20 = load i32, i32* %19
%21 = tail call i32 @isxdigit(i32 %20)
%22 = icmp eq i32 %21, 0
br i1 %22, label %102, label %23
23: ; preds = %18
%24 = getelementptr inbounds i32, i32* %2, i64 8
%25 = load i32, i32* %24
%26 = tail call i32 @isxdigit(i32 %25)
%27 = icmp eq i32 %26, 0
br i1 %27, label %102, label %28
28: ; preds = %23
%29 = getelementptr inbounds i32, i32* %2, i64 9
%30 = load i32, i32* %29
%31 = add i32 %30, -48
%32 = icmp ult i32 %31, 10
br i1 %32, label %33, label %102
33: ; preds = %28
%34 = getelementptr inbounds i32, i32* %2, i64 10
%35 = load i32, i32* %34
%36 = add i32 %35, -48
%37 = icmp ult i32 %36, 10
br i1 %37, label %38, label %102
38: ; preds = %33
store i32 %30, i32* @testwlan.k1
store i32 %35, i32* @testwlan.k3
store i32 %25, i32* @testwlan.k4
store i32 0, i32* @testwlan.k6
store i32 0, i32* @testwlan.k7
store i32 %15, i32* @testwlan.k8
store i32 %20, i32* @testwlan.k9
store i32 0, i32* @testwlan.k2
br label %39
39: ; preds = %38, %63
%40 = phi i32 [ 0, %38 ], [ %64, %63 ]
store i32 0, i32* @testwlan.k5
br label %42
41: ; preds = %63
store i32 0, i32* @testwlan.k2
br label %66
42: ; preds = %42, %39
%43 = phi i32 [ %40, %39 ], [ %62, %42 ]
%44 = phi i32 [ 0, %39 ], [ %60, %42 ]
%45 = load i32, i32* @testwlan.k1
%46 = load i32, i32* @testwlan.k3
%47 = load i32, i32* @testwlan.k4
%48 = trunc i32 %44 to i8
%49 = trunc i32 %43 to i8
%50 = tail call i32 (i32*, i8*, i32, i32, i32, i32, i8, i8, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([19 x i8], [19 x i8]* @.str.1, i64 0, i64 0), i32 %45, i32 %43, i32 %46, i32 %47, i8 signext %48, i8 signext %49)
%51 = load i32, i32* @testwlan.k1
%52 = load i32, i32* @testwlan.k2
%53 = load i32, i32* @testwlan.k3
%54 = load i32, i32* @testwlan.k4
%55 = load i32, i32* @testwlan.k5
%56 = trunc i32 %55 to i8
%57 = trunc i32 %52 to i8
%58 = tail call i32 (i32*, i8*, i32, i32, i32, i32, i8, i8, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0), i32 %51, i32 %52, i32 %53, i32 %54, i8 signext %56, i8 signext %57)
%59 = load i32, i32* @testwlan.k5
%60 = add nsw i32 %59, 1
store i32 %60, i32* @testwlan.k5
%61 = icmp slt i32 %59, 65535
%62 = load i32, i32* @testwlan.k2
br i1 %61, label %42, label %63
63: ; preds = %42
%64 = add nsw i32 %62, 1
store i32 %64, i32* @testwlan.k2
%65 = icmp slt i32 %62, 9
br i1 %65, label %39, label %41
66: ; preds = %41, %98
store i32 0, i32* @testwlan.k5
br label %67
67: ; preds = %66, %94
store i32 0, i32* @testwlan.k6
br label %68
68: ; preds = %67, %91
%69 = phi i32 [ 0, %67 ], [ %92, %91 ]
store i32 0, i32* @testwlan.k7
br label %70
70: ; preds = %70, %68
%71 = phi i32 [ %69, %68 ], [ %90, %70 ]
%72 = phi i32 [ 0, %68 ], [ %88, %70 ]
%73 = load i32, i32* @testwlan.k1
%74 = load i32, i32* @testwlan.k2
%75 = load i32, i32* @testwlan.k3
%76 = load i32, i32* @testwlan.k4
%77 = load i32, i32* @testwlan.k5
%78 = sext i32 %77 to i64
%79 = getelementptr inbounds [17 x i8], [17 x i8]* @testwlan.hextable, i64 0, i64 %78
%80 = load i8, i8* %79
%81 = sext i32 %71 to i64
%82 = getelementptr inbounds [17 x i8], [17 x i8]* @testwlan.hextable, i64 0, i64 %81
%83 = load i8, i8* %82
%84 = load i32, i32* @testwlan.k8
%85 = load i32, i32* @testwlan.k9
%86 = tail call i32 (i32*, i8*, i32, i32, i32, i32, i8, i8, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([34 x i8], [34 x i8]* @.str.3, i64 0, i64 0), i32 %73, i32 %74, i32 %75, i32 %76, i8 signext %80, i8 signext %83, i32 %72, i32 %74, i32 %84, i32 %85)
%87 = load i32, i32* @testwlan.k7
%88 = add nsw i32 %87, 1
store i32 %88, i32* @testwlan.k7
%89 = icmp slt i32 %87, 99
%90 = load i32, i32* @testwlan.k6
br i1 %89, label %70, label %91
91: ; preds = %70
%92 = add nsw i32 %90, 1
store i32 %92, i32* @testwlan.k6
%93 = icmp slt i32 %90, 15
br i1 %93, label %68, label %94
94: ; preds = %91
%95 = load i32, i32* @testwlan.k5
%96 = add nsw i32 %95, 1
store i32 %96, i32* @testwlan.k5
%97 = icmp slt i32 %95, 15
br i1 %97, label %67, label %98
98: ; preds = %94
%99 = load i32, i32* @testwlan.k2
%100 = add nsw i32 %99, 1
store i32 %100, i32* @testwlan.k2
%101 = icmp slt i32 %99, 9
br i1 %101, label %66, label %102
102: ; preds = %98, %8, %13, %18, %23, %28, %33, %5, %3
ret void
}