#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*/ printf(char *, ...);
int /*<<< orphan*/ strlen(char *);
int /*<<< orphan*/ wfc_util_atoh(char *, int /*<<< orphan*/, unsigned char *,
                                 int);
scalar_t__ wfc_util_fget_buffer(char *, int, int, unsigned char *, int);
scalar_t__ wfc_util_fget_string(char *, char *, char *, char *, char *, int);
int /*<<< orphan*/ wfc_util_fset_buffer(char *, int, unsigned char *, int);
int /*<<< orphan*/ wfc_util_fset_string(char *, char *, char *, char *, char *);
int /*<<< orphan*/ wfc_util_htoa(unsigned char *, int, char *, int);
int main(int argc, char **argv) {
  int ret = 0;
  char mac_add_buff[((6) * 2) + 1];
  unsigned char mac_add_buff_2[(6)] = {0x88, 0xcd, 0xba, 0x0c, 0x90, 0x00};
  unsigned char mac_add_buff_3[(6)] = {0x00, 0x90, 0x0c, 0xba, 0xcd, 0x88};
  printf("wfc_util_main is started\n");
  if (0 < wfc_util_fget_string("./WCN1314_qcom_cfg.ini", "END",
                               "NetworkAddress=", "\n", mac_add_buff,
                               ((6) * 2) + 1)) {
    printf("wfc_util_main : %s%s\n", "NetworkAddress=", mac_add_buff);
  } else {
    printf("wfc_util_main : %s is not found\n", "NetworkAddress=");
  }
  wfc_util_fset_string("./WCN1314_qcom_cfg.ini", "END", "gAPMacAddr=", "\n",
                       "00900cbacd88");
  wfc_util_fset_string("./WCN1314_qcom_cfg.ini", "END", "NetworkAddress=", "\n",
                       "00900cbacd88");
  if (0 < wfc_util_fget_string("./WCN1314_qcom_cfg.ini", "END",
                               "NetworkAddress=", "\n", mac_add_buff,
                               ((6) * 2) + 1)) {
    printf("wfc_util_main : %s%s\n", "NetworkAddress=", mac_add_buff);
    wfc_util_atoh(mac_add_buff, strlen(mac_add_buff), mac_add_buff_2, (6));
    printf("wfc_util_main : %s%02x:%02x:%02x:%02x:%02x:%02x\n",
           "NetworkAddress=", mac_add_buff_2[0], mac_add_buff_2[1],
           mac_add_buff_2[2], mac_add_buff_2[3], mac_add_buff_2[4],
           mac_add_buff_2[5]);
    wfc_util_htoa(mac_add_buff_2, (6), mac_add_buff, ((6) * 2));
    printf("wfc_util_main : %s%s\n", "NetworkAddress=", mac_add_buff);
  } else {
    printf("wfc_util_main : %s is not found\n", "NetworkAddress=");
  }
  wfc_util_fset_buffer("./WCN1314_qcom_wlan_nv.bin", ((4) + 6), mac_add_buff_3,
                       (6));
  if (0 < wfc_util_fget_buffer("./WCN1314_qcom_wlan_nv.bin", ((4) + 6), 6,
                               mac_add_buff_2, (6))) {
    printf(
        "wfc_util_main : wfc_util_fget_buffer[%02x:%02x:%02x:%02x:%02x:%02x]\n",
        mac_add_buff_2[0], mac_add_buff_2[1], mac_add_buff_2[2],
        mac_add_buff_2[3], mac_add_buff_2[4], mac_add_buff_2[5]);
  } else {
    printf("wfc_util_main : %s is not found\n", "NetworkAddress=");
  }
  return ret;
}


x86 assembly (clang, -O0):
<main>:
push   %rbp
mov    %rsp,%rbp
sub    $0x50,%rsp
movl   $0x0,-0x4(%rbp)
mov    %edi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
movl   $0x0,-0x14(%rbp)
mov    0xe5d(%rip),%eax
mov    %eax,-0x27(%rbp)
mov    0xe57(%rip),%ax
mov    %ax,-0x23(%rbp)
mov    0xf75(%rip),%eax
mov    %eax,-0x2d(%rbp)
mov    0xf6f(%rip),%ax
mov    %ax,-0x29(%rbp)
lea    0xe3a(%rip),%rdi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x21(%rbp),%r8
lea    0xe42(%rip),%rdi
lea    0xe52(%rip),%rsi
lea    0xe4f(%rip),%rdx
lea    0xf37(%rip),%rcx
mov    $0xd,%r9d
call   1090 <wfc_util_fget_string@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jge    122a <main+0xaa>
lea    -0x21(%rbp),%rdx
lea    0xe34(%rip),%rdi
lea    0xe1d(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    123f <main+0xbf>
lea    0xe30(%rip),%rdi
lea    0xe03(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    0xdda(%rip),%rdi
lea    0xdea(%rip),%rsi
lea    0xe2e(%rip),%rdx
lea    0xecf(%rip),%rcx
lea    0xe2c(%rip),%r8
call   10a0 <wfc_util_fset_string@plt>
lea    0xdb2(%rip),%rdi
lea    0xdc2(%rip),%rsi
lea    0xdbf(%rip),%rdx
lea    0xea7(%rip),%rcx
lea    0xe04(%rip),%r8
call   10a0 <wfc_util_fset_string@plt>
lea    -0x21(%rbp),%r8
lea    0xd86(%rip),%rdi
lea    0xd96(%rip),%rsi
lea    0xd93(%rip),%rdx
lea    0xe7b(%rip),%rcx
mov    $0xd,%r9d
call   1090 <wfc_util_fget_string@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jge    1373 <main+0x1f3>
lea    -0x21(%rbp),%rdx
lea    0xd78(%rip),%rdi
lea    0xd61(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x21(%rbp),%rax
mov    %rax,-0x38(%rbp)
lea    -0x21(%rbp),%rdi
call   1030 <strlen@plt>
mov    -0x38(%rbp),%rdi
mov    %eax,%esi
lea    -0x27(%rbp),%rdx
mov    $0x6,%ecx
call   1060 <wfc_util_atoh@plt>
movzbl -0x27(%rbp),%edx
movzbl -0x26(%rbp),%ecx
movzbl -0x25(%rbp),%r8d
movzbl -0x24(%rbp),%r9d
movzbl -0x23(%rbp),%r10d
movzbl -0x22(%rbp),%eax
lea    0xd73(%rip),%rdi
lea    0xd0c(%rip),%rsi
mov    %r10d,(%rsp)
mov    %eax,0x8(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x27(%rbp),%rdi
lea    -0x21(%rbp),%rdx
mov    $0x6,%esi
mov    $0xc,%ecx
call   1070 <wfc_util_htoa@plt>
lea    -0x21(%rbp),%rdx
lea    0xceb(%rip),%rdi
lea    0xcd4(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1388 <main+0x208>
lea    0xce7(%rip),%rdi
lea    0xcba(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
lea    -0x2d(%rbp),%rdx
lea    0xd39(%rip),%rdi
mov    $0xa,%esi
mov    $0x6,%ecx
call   1080 <wfc_util_fset_buffer@plt>
lea    -0x27(%rbp),%rcx
lea    0xd1f(%rip),%rdi
mov    $0xa,%esi
mov    $0x6,%r8d
mov    %r8d,%edx
call   1050 <wfc_util_fget_buffer@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
jge    13fe <main+0x27e>
movzbl -0x27(%rbp),%esi
movzbl -0x26(%rbp),%edx
movzbl -0x25(%rbp),%ecx
movzbl -0x24(%rbp),%r8d
movzbl -0x23(%rbp),%r9d
movzbl -0x22(%rbp),%eax
lea    0xcf8(%rip),%rdi
mov    %eax,(%rsp)
mov    $0x0,%al
call   1040 <printf@plt>
jmp    1413 <main+0x293>
lea    0xc5c(%rip),%rdi
lea    0xc2f(%rip),%rsi
mov    $0x0,%al
call   1040 <printf@plt>
mov    -0x14(%rbp),%eax
add    $0x50,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<main>:
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x20,%rsp
movw   $0x90,0x8(%rsp)
movl   $0xcbacd88,0x4(%rsp)
0c
movw   $0x88cd,0x10(%rsp)
movl   $0xba0c9000,0xc(%rsp)
ba
lea    0xf50(%rip),%rdi
call   1030 <puts@plt>
lea    0xe38(%rip),%rdi
lea    0xe48(%rip),%rsi
lea    0xe45(%rip),%rdx
lea    0xf2d(%rip),%rcx
lea    0x13(%rsp),%r8
mov    $0xd,%r9d
call   10a0 <wfc_util_fget_string@plt>
test   %rax,%rax
jle    1214 <main+0x84>
lea    0xe32(%rip),%rdi
lea    0xe1b(%rip),%rsi
lea    0x13(%rsp),%rdx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1229 <main+0x99>
lea    0xe2c(%rip),%rdi
lea    0xdff(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xdd6(%rip),%rbx
lea    0xde6(%rip),%r14
lea    0xe2a(%rip),%rdx
lea    0xecb(%rip),%r15
lea    0xe28(%rip),%r12
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r15,%rcx
mov    %r12,%r8
call   10b0 <wfc_util_fset_string@plt>
lea    0xdbd(%rip),%r13
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
mov    %r12,%r8
call   10b0 <wfc_util_fset_string@plt>
lea    0x13(%rsp),%r8
mov    %rbx,%rdi
mov    %r14,%rsi
mov    %r13,%rdx
mov    %r15,%rcx
mov    $0xd,%r9d
call   10a0 <wfc_util_fget_string@plt>
test   %rax,%rax
jle    133f <main+0x1af>
lea    0xd8d(%rip),%r14
lea    0xd76(%rip),%r15
lea    0x13(%rsp),%r13
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
mov    %r13,%rdi
call   1040 <strlen@plt>
lea    0x4(%rsp),%r12
mov    %r13,%rdi
mov    %eax,%esi
mov    %r12,%rdx
mov    $0x6,%ecx
call   1070 <wfc_util_atoh@plt>
movzbl 0x4(%rsp),%edx
movzbl 0x5(%rsp),%ecx
movzbl 0x6(%rsp),%r8d
movzbl 0x7(%rsp),%r9d
movzbl 0x8(%rsp),%r10d
movzbl 0x9(%rsp),%ebx
lea    0xd7a(%rip),%rdi
mov    %r15,%rsi
xor    %eax,%eax
push   %rbx
push   %r10
call   1050 <printf@plt>
add    $0x10,%rsp
mov    %r12,%rdi
mov    $0x6,%esi
mov    %r13,%rdx
mov    $0xc,%ecx
call   1080 <wfc_util_htoa@plt>
mov    %r14,%rdi
mov    %r15,%rsi
mov    %r13,%rdx
xor    %eax,%eax
call   1050 <printf@plt>
jmp    1354 <main+0x1c4>
lea    0xd01(%rip),%rdi
lea    0xcd4(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
lea    0xd57(%rip),%rbx
lea    0xc(%rsp),%rdx
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x6,%ecx
call   1090 <wfc_util_fset_buffer@plt>
lea    0x4(%rsp),%rcx
mov    %rbx,%rdi
mov    $0xa,%esi
mov    $0x6,%edx
mov    $0x6,%r8d
call   1060 <wfc_util_fget_buffer@plt>
test   %rax,%rax
jle    13cd <main+0x23d>
movzbl 0x4(%rsp),%esi
movzbl 0x5(%rsp),%edx
movzbl 0x6(%rsp),%ecx
movzbl 0x7(%rsp),%r8d
movzbl 0x8(%rsp),%r9d
movzbl 0x9(%rsp),%ebx
sub    $0x8,%rsp
lea    0xd0e(%rip),%rdi
xor    %eax,%eax
push   %rbx
call   1050 <printf@plt>
add    $0x10,%rsp
jmp    13e2 <main+0x252>
lea    0xc73(%rip),%rdi
lea    0xc46(%rip),%rsi
xor    %eax,%eax
call   1050 <printf@plt>
xor    %eax,%eax
add    $0x20,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
ret

LLVM IR (-O0):
@__const.main.mac_add_buff_2 = [6 x i8] c"\88\CD\BA\0C\90\00"
@__const.main.mac_add_buff_3 = [6 x i8] c"\00\90\0C\BA\CD\88"
@.str = [26 x i8] c"wfc_util_main is started\0A\00"
@.str.1 = [23 x i8] c"./WCN1314_qcom_cfg.ini\00"
@.str.2 = [4 x i8] c"END\00"
@.str.3 = [16 x i8] c"NetworkAddress=\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [22 x i8] c"wfc_util_main : %s%s\0A\00"
@.str.6 = [33 x i8] c"wfc_util_main : %s is not found\0A\00"
@.str.7 = [12 x i8] c"gAPMacAddr=\00"
@.str.8 = [13 x i8] c"00900cbacd88\00"
@.str.9 = [49 x i8] c"wfc_util_main : %s%02x:%02x:%02x:%02x:%02x:%02x\0A\00"
@.str.10 = [27 x i8] c"./WCN1314_qcom_wlan_nv.bin\00"
@.str.11 = [69 x i8] c"wfc_util_main : wfc_util_fget_buffer[%02x:%02x:%02x:%02x:%02x:%02x]\0A\00"
define i32 @main(i32 %0, i8** %1) {
%3 = alloca i32
%4 = alloca i32
%5 = alloca i8**
%6 = alloca i32
%7 = alloca [13 x i8]
%8 = alloca [6 x i8]
%9 = alloca [6 x i8]
store i32 0, i32* %3
store i32 %0, i32* %4
store i8** %1, i8*** %5
store i32 0, i32* %6
%10 = bitcast [6 x i8]* %8 to i8*
%11 = bitcast [6 x i8]* %9 to i8*
%12 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str, i64 0, i64 0))
%13 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%14 = call i64 @wfc_util_fget_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* %13, i32 13)
%15 = icmp slt i64 0, %14
br i1 %15, label %16, label %19
16: ; preds = %2
%17 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%18 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %17)
br label %21
19: ; preds = %2
%20 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %21
21: ; preds = %19, %16
%22 = call i32 @wfc_util_fset_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%23 = call i32 @wfc_util_fset_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%24 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%25 = call i64 @wfc_util_fget_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* %24, i32 13)
%26 = icmp slt i64 0, %25
br i1 %26, label %27, label %59
27: ; preds = %21
%28 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%29 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %28)
%30 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%31 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%32 = call i32 @strlen(i8* %31)
%33 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%34 = call i32 @wfc_util_atoh(i8* %30, i32 %32, i8* %33, i32 6)
%35 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%36 = load i8, i8* %35
%37 = zext i8 %36 to i32
%38 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 1
%39 = load i8, i8* %38
%40 = zext i8 %39 to i32
%41 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 2
%42 = load i8, i8* %41
%43 = zext i8 %42 to i32
%44 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 3
%45 = load i8, i8* %44
%46 = zext i8 %45 to i32
%47 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 4
%48 = load i8, i8* %47
%49 = zext i8 %48 to i32
%50 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 5
%51 = load i8, i8* %50
%52 = zext i8 %51 to i32
%53 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %37, i32 %40, i32 %43, i32 %46, i32 %49, i32 %52)
%54 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%55 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%56 = call i32 @wfc_util_htoa(i8* %54, i32 6, i8* %55, i32 12)
%57 = getelementptr inbounds [13 x i8], [13 x i8]* %7, i64 0, i64 0
%58 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %57)
br label %61
59: ; preds = %21
%60 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %61
61: ; preds = %59, %27
%62 = getelementptr inbounds [6 x i8], [6 x i8]* %9, i64 0, i64 0
%63 = call i32 @wfc_util_fset_buffer(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0), i32 10, i8* %62, i32 6)
%64 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%65 = call i64 @wfc_util_fget_buffer(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0), i32 10, i32 6, i8* %64, i32 6)
%66 = icmp slt i64 0, %65
br i1 %66, label %67, label %87
67: ; preds = %61
%68 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 0
%69 = load i8, i8* %68
%70 = zext i8 %69 to i32
%71 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 1
%72 = load i8, i8* %71
%73 = zext i8 %72 to i32
%74 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 2
%75 = load i8, i8* %74
%76 = zext i8 %75 to i32
%77 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 3
%78 = load i8, i8* %77
%79 = zext i8 %78 to i32
%80 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 4
%81 = load i8, i8* %80
%82 = zext i8 %81 to i32
%83 = getelementptr inbounds [6 x i8], [6 x i8]* %8, i64 0, i64 5
%84 = load i8, i8* %83
%85 = zext i8 %84 to i32
%86 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([69 x i8], [69 x i8]* @.str.11, i64 0, i64 0), i32 %70, i32 %73, i32 %76, i32 %79, i32 %82, i32 %85)
br label %89
87: ; preds = %61
%88 = call i32 (i8*, ...) @printf(i8* getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %89
89: ; preds = %87, %67
%90 = load i32, i32* %6
ret i32 %90
}

LLVM IR (-O2):
@__const.main.mac_add_buff_2 = [6 x i8] c"\88\CD\BA\0C\90\00"
@__const.main.mac_add_buff_3 = [6 x i8] c"\00\90\0C\BA\CD\88"
@.str.1 = [23 x i8] c"./WCN1314_qcom_cfg.ini\00"
@.str.2 = [4 x i8] c"END\00"
@.str.3 = [16 x i8] c"NetworkAddress=\00"
@.str.4 = [2 x i8] c"\0A\00"
@.str.5 = [22 x i8] c"wfc_util_main : %s%s\0A\00"
@.str.6 = [33 x i8] c"wfc_util_main : %s is not found\0A\00"
@.str.7 = [12 x i8] c"gAPMacAddr=\00"
@.str.8 = [13 x i8] c"00900cbacd88\00"
@.str.9 = [49 x i8] c"wfc_util_main : %s%02x:%02x:%02x:%02x:%02x:%02x\0A\00"
@.str.10 = [27 x i8] c"./WCN1314_qcom_wlan_nv.bin\00"
@.str.11 = [69 x i8] c"wfc_util_main : wfc_util_fget_buffer[%02x:%02x:%02x:%02x:%02x:%02x]\0A\00"
@str = [25 x i8] c"wfc_util_main is started\00"
define i32 @main(i32 %0, i8** nocapture readnone %1) {
%3 = alloca [13 x i8]
%4 = alloca [6 x i8]
%5 = alloca [6 x i8]
%6 = getelementptr inbounds [13 x i8], [13 x i8]* %3, i64 0, i64 0
%7 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 0
%8 = getelementptr inbounds [6 x i8], [6 x i8]* %5, i64 0, i64 0
%9 = tail call i32 @puts(i8* dereferenceable(1) getelementptr inbounds ([25 x i8], [25 x i8]* @str, i64 0, i64 0))
%10 = call i64 @wfc_util_fget_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* %6, i32 13)
%11 = icmp sgt i64 %10, 0
br i1 %11, label %12, label %14
12: ; preds = %2
%13 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %6)
br label %16
14: ; preds = %2
%15 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %16
16: ; preds = %14, %12
%17 = call i32 @wfc_util_fset_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([12 x i8], [12 x i8]* @.str.7, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%18 = call i32 @wfc_util_fset_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* getelementptr inbounds ([13 x i8], [13 x i8]* @.str.8, i64 0, i64 0))
%19 = call i64 @wfc_util_fget_string(i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.1, i64 0, i64 0), i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.2, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0), i8* %6, i32 13)
%20 = icmp sgt i64 %19, 0
br i1 %20, label %21, label %45
21: ; preds = %16
%22 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %6)
%23 = call i32 @strlen(i8* %6)
%24 = call i32 @wfc_util_atoh(i8* %6, i32 %23, i8* %7, i32 6)
%25 = load i8, i8* %7
%26 = zext i8 %25 to i32
%27 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 1
%28 = load i8, i8* %27
%29 = zext i8 %28 to i32
%30 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 2
%31 = load i8, i8* %30
%32 = zext i8 %31 to i32
%33 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 3
%34 = load i8, i8* %33
%35 = zext i8 %34 to i32
%36 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 4
%37 = load i8, i8* %36
%38 = zext i8 %37 to i32
%39 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 5
%40 = load i8, i8* %39
%41 = zext i8 %40 to i32
%42 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([49 x i8], [49 x i8]* @.str.9, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i32 %26, i32 %29, i32 %32, i32 %35, i32 %38, i32 %41)
%43 = call i32 @wfc_util_htoa(i8* %7, i32 6, i8* %6, i32 12)
%44 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([22 x i8], [22 x i8]* @.str.5, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0), i8* %6)
br label %47
45: ; preds = %16
%46 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %47
47: ; preds = %45, %21
%48 = call i32 @wfc_util_fset_buffer(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0), i32 10, i8* %8, i32 6)
%49 = call i64 @wfc_util_fget_buffer(i8* getelementptr inbounds ([27 x i8], [27 x i8]* @.str.10, i64 0, i64 0), i32 10, i32 6, i8* %7, i32 6)
%50 = icmp sgt i64 %49, 0
br i1 %50, label %51, label %70
51: ; preds = %47
%52 = load i8, i8* %7
%53 = zext i8 %52 to i32
%54 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 1
%55 = load i8, i8* %54
%56 = zext i8 %55 to i32
%57 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 2
%58 = load i8, i8* %57
%59 = zext i8 %58 to i32
%60 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 3
%61 = load i8, i8* %60
%62 = zext i8 %61 to i32
%63 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 4
%64 = load i8, i8* %63
%65 = zext i8 %64 to i32
%66 = getelementptr inbounds [6 x i8], [6 x i8]* %4, i64 0, i64 5
%67 = load i8, i8* %66
%68 = zext i8 %67 to i32
%69 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([69 x i8], [69 x i8]* @.str.11, i64 0, i64 0), i32 %53, i32 %56, i32 %59, i32 %62, i32 %65, i32 %68)
br label %72
70: ; preds = %47
%71 = call i32 (i8*, ...) @printf(i8* dereferenceable(1) getelementptr inbounds ([33 x i8], [33 x i8]* @.str.6, i64 0, i64 0), i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.3, i64 0, i64 0))
br label %72
72: ; preds = %70, %51
ret i32 0
}