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

/* Variables and functions */
char *config_get(char *);
int /*<<< orphan*/ fprintf(int /*<<< orphan*/ *, char *, ...);
char *get_user_name(int);
int /*<<< orphan*/ sprintf(char *, char *, ...);
scalar_t__ strcmp(char *, char *);
int strlen(char *);
int /*<<< orphan*/ strncmp(char *, char *, int);
int /*<<< orphan*/ strncpy(char *, char *, int);
int /*<<< orphan*/ *strstr(char *, char *);
char *strtok(char *, char *);
void add_smbd_share_info(FILE *fp, char *displayname, char *reader,
                         char *writer, char *path, int share_floder_num) {
  char writelist[256] = {0}, readlist[256] = {0}, invalidlist[256] = {0};
  char shared_auth_info[8], show_disk_name[8], name[32];
  int i = 0;
  char accessmode;
  char name_enable[64], name_access[64], name_user[64];
  char readycloud_enable_info[512] = {0}, readycloud_access_info[512] = {0},
       readycloud_user_value[512] = {0};
  char *preadycloud_user, *pread_access, *pwrite_access, *pr, *pw;
  strncpy(show_disk_name, displayname, 7);
  show_disk_name[7] = '\0';
  if (!strncmp(show_disk_name, "SD_Card", 7))
    fprintf(fp,
            "[%s]\n"
            "  path=%s\n"
            "  browsable=yes\n",
            displayname, path);
  else
    fprintf(fp,
            "[%s]\n"
            "  path=%s\n"
            "  browsable=yes\n",
            displayname, path);
  sprintf(name_enable, "readycloud_enable");
  strncpy(readycloud_enable_info, config_get(name_enable),
          sizeof(readycloud_enable_info));
  sprintf(name_access,
          "readycloud_access"
          "%d",
          share_floder_num);
  strncpy(readycloud_access_info, config_get(name_access),
          sizeof(readycloud_access_info));
  if ((strcmp(readycloud_enable_info, "1") != 0) ||
      (readycloud_access_info[0] == '\0')) {
    sprintf(name,
            "shared_usb_folder_users"
            "%d",
            share_floder_num);
    strncpy(shared_auth_info, config_get(name), sizeof(shared_auth_info));
    for (i = 0; i <= 3; ++i) {
      accessmode = shared_auth_info[i * 2];
      if (accessmode == '3')
        sprintf(writelist + strlen(writelist), "%s ", get_user_name(i + 1));
      else if (accessmode == '2')
        sprintf(readlist + strlen(readlist), "%s ", get_user_name(i + 1));
      else
        sprintf(invalidlist + strlen(invalidlist), "%s ", get_user_name(i + 1));
    }
    if (strcmp(reader, "guest"))
      fprintf(fp, "  invalid users=%s %s\n", "guest", invalidlist);
    if (!strcmp(config_get("usb_passwdNet"), "1")) {
      fprintf(fp, "  guest ok=no\n");
      fprintf(fp, "  read only=yes\n");
      fprintf(fp, "  write list=%s, %s %s\n", "root", "admin", writelist);
    } else if (strcmp(writer, "guest") == 0) {
      fprintf(fp, "  guest ok=yes\n");
      fprintf(fp, "  read only=no\n");
    } else {
      fprintf(fp, "  guest ok=no\n");
      fprintf(fp, "  read only=yes\n");
      fprintf(fp, "  write list=%s, %s %s\n", "root", "admin", writelist);
    }
  } else {
    pread_access = strtok(readycloud_access_info, ":");
    pwrite_access = strtok(NULL, ":");
    for (i = 0; i <= 9; i++) {
      sprintf(name_user, "readycloud_user%d", i);
      preadycloud_user = config_get(name_user);
      if (*preadycloud_user == '\0') {
        break;
      }
      sprintf(readycloud_user_value + strlen(readycloud_user_value), "%s ",
              strtok(preadycloud_user, " "));
    }
    if (strstr(pread_access, "anonymous")) {
      fprintf(fp, "  guest ok=yes\n");
    } else if (strstr(pread_access, "everyone")) {
      sprintf(readlist + strlen(readlist), "%s ", readycloud_user_value);
      fprintf(fp, "  guest ok=no\n");
      fprintf(fp, "  invalid users=%s\n", "guest");
    } else {
      pr = strtok(pread_access, ",");
      while (1) {
        if (pr == NULL)
          break;
        if (NULL != strstr(readycloud_user_value, pr)) {
          sprintf(readlist + strlen(readlist), "%s   ", pr);
        }
        pr = strtok(NULL, ",");
      }
      fprintf(fp, "  guest ok=no\n");
      fprintf(fp, "  invalid users=%s\n", "guest");
    }
    if (strstr(pwrite_access, "anonymous")) {
      fprintf(fp, "  read only=no\n");
    } else if (strstr(pwrite_access, "everyone")) {
      sprintf(writelist + strlen(writelist), "%s ", readycloud_user_value);
      fprintf(fp, "  read only=yes\n");
      fprintf(fp, "  write list=%s, %s %s\n", "root", "admin", writelist);
    } else {
      pw = strtok(pwrite_access, ",");
      while (1) {
        if (pw == NULL)
          break;
        if (NULL != strstr(readycloud_user_value, pw)) {
          sprintf(writelist + strlen(writelist), "%s ", pw);
        }
        pw = strtok(NULL, ",");
      }
      fprintf(fp, "  read only=yes\n");
      fprintf(fp, "  write list=%s, %s %s\n", "root", "admin", writelist);
    }
  }
  return;
}


x86 assembly (clang, -O0):
<add_smbd_share_info>:
push   %rbp
mov    %rsp,%rbp
sub    $0xad0,%rsp
mov    %rdi,-0x8(%rbp)
mov    %rsi,-0x10(%rbp)
mov    %rdx,-0x18(%rbp)
mov    %rcx,-0x20(%rbp)
mov    %r8,-0x28(%rbp)
mov    %r9d,-0x2c(%rbp)
lea    -0x130(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
lea    -0x230(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
lea    -0x330(%rbp),%rdi
xor    %esi,%esi
mov    $0x100,%edx
call   1060 <memset@plt>
movl   $0x0,-0x364(%rbp)
lea    -0x630(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1060 <memset@plt>
lea    -0x830(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1060 <memset@plt>
lea    -0xa30(%rbp),%rdi
xor    %esi,%esi
mov    $0x200,%edx
call   1060 <memset@plt>
lea    -0x340(%rbp),%rdi
mov    -0x10(%rbp),%rsi
mov    $0x7,%edx
call   1030 <strncpy@plt>
movb   $0x0,-0x339(%rbp)
lea    -0x340(%rbp),%rdi
lea    0xd87(%rip),%rsi
mov    $0x7,%edx
call   1040 <strncmp@plt>
cmp    $0x0,%eax
jne    12ab <add_smbd_share_info+0xfb>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0xd69(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    12c5 <add_smbd_share_info+0x115>
mov    -0x8(%rbp),%rdi
mov    -0x10(%rbp),%rdx
mov    -0x28(%rbp),%rcx
lea    0xd4a(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
lea    -0x3b0(%rbp),%rdi
lea    0xd55(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x630(%rbp),%rax
mov    %rax,-0xa68(%rbp)
lea    -0x3b0(%rbp),%rdi
call   1070 <config_get@plt>
mov    -0xa68(%rbp),%rdi
mov    %rax,%rsi
mov    $0x200,%edx
call   1030 <strncpy@plt>
lea    -0x3f0(%rbp),%rdi
mov    -0x2c(%rbp),%edx
lea    0xd21(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x830(%rbp),%rax
mov    %rax,-0xa60(%rbp)
lea    -0x3f0(%rbp),%rdi
call   1070 <config_get@plt>
mov    -0xa60(%rbp),%rdi
mov    %rax,%rsi
mov    $0x200,%edx
call   1030 <strncpy@plt>
lea    -0x630(%rbp),%rdi
lea    0xcf2(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    137b <add_smbd_share_info+0x1cb>
movsbl -0x830(%rbp),%eax
cmp    $0x0,%eax
jne    1681 <add_smbd_share_info+0x4d1>
lea    -0x360(%rbp),%rdi
mov    -0x2c(%rbp),%edx
lea    0xcc4(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x338(%rbp),%rax
mov    %rax,-0xa70(%rbp)
lea    -0x360(%rbp),%rdi
call   1070 <config_get@plt>
mov    -0xa70(%rbp),%rdi
mov    %rax,%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
movl   $0x0,-0x364(%rbp)
cmpl   $0x3,-0x364(%rbp)
jg     153a <add_smbd_share_info+0x38a>
mov    -0x364(%rbp),%eax
shl    $0x1,%eax
cltq
mov    -0x338(%rbp,%rax,1),%al
mov    %al,-0x365(%rbp)
movsbl -0x365(%rbp),%eax
cmp    $0x33,%eax
jne    145b <add_smbd_share_info+0x2ab>
lea    -0x130(%rbp),%rax
mov    %rax,-0xa80(%rbp)
lea    -0x130(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0xa80(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0xa78(%rbp)
mov    -0x364(%rbp),%edi
add    $0x1,%edi
call   10b0 <get_user_name@plt>
mov    -0xa78(%rbp),%rdi
mov    %rax,%rdx
lea    0xc1b(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
jmp    1521 <add_smbd_share_info+0x371>
movsbl -0x365(%rbp),%eax
cmp    $0x32,%eax
jne    14c6 <add_smbd_share_info+0x316>
lea    -0x230(%rbp),%rax
mov    %rax,-0xa90(%rbp)
lea    -0x230(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0xa90(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0xa88(%rbp)
mov    -0x364(%rbp),%edi
add    $0x1,%edi
call   10b0 <get_user_name@plt>
mov    -0xa88(%rbp),%rdi
mov    %rax,%rdx
lea    0xbb0(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
jmp    151c <add_smbd_share_info+0x36c>
lea    -0x330(%rbp),%rax
mov    %rax,-0xaa0(%rbp)
lea    -0x330(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0xaa0(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0xa98(%rbp)
mov    -0x364(%rbp),%edi
add    $0x1,%edi
call   10b0 <get_user_name@plt>
mov    -0xa98(%rbp),%rdi
mov    %rax,%rdx
lea    0xb55(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
jmp    1521 <add_smbd_share_info+0x371>
jmp    1526 <add_smbd_share_info+0x376>
mov    -0x364(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x364(%rbp)
jmp    13cb <add_smbd_share_info+0x21b>
mov    -0x18(%rbp),%rdi
lea    0xb29(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
je     1574 <add_smbd_share_info+0x3c4>
mov    -0x8(%rbp),%rdi
lea    -0x330(%rbp),%rcx
lea    0xb0e(%rip),%rsi
lea    0xb01(%rip),%rdx
mov    $0x0,%al
call   1090 <fprintf@plt>
lea    0xb10(%rip),%rdi
call   1070 <config_get@plt>
mov    %rax,%rdi
lea    0xac4(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    15e9 <add_smbd_share_info+0x439>
mov    -0x8(%rbp),%rdi
lea    0xaf5(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xaf2(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x130(%rbp),%r8
lea    0xaea(%rip),%rsi
lea    0xafb(%rip),%rdx
lea    0xaf9(%rip),%rcx
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    167c <add_smbd_share_info+0x4cc>
mov    -0x20(%rbp),%rdi
lea    0xa7a(%rip),%rsi
call   1080 <strcmp@plt>
cmp    $0x0,%rax
jne    162c <add_smbd_share_info+0x47c>
mov    -0x8(%rbp),%rdi
lea    0xace(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xacc(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1677 <add_smbd_share_info+0x4c7>
mov    -0x8(%rbp),%rdi
lea    0xa62(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0xa5f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x130(%rbp),%r8
lea    0xa57(%rip),%rsi
lea    0xa68(%rip),%rdx
lea    0xa66(%rip),%rcx
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    167c <add_smbd_share_info+0x4cc>
jmp    1ac1 <add_smbd_share_info+0x911>
lea    -0x830(%rbp),%rdi
lea    0xa6d(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xa40(%rbp)
xor    %eax,%eax
mov    %eax,%edi
lea    0xa56(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xa48(%rbp)
movl   $0x0,-0x364(%rbp)
cmpl   $0x9,-0x364(%rbp)
jg     177e <add_smbd_share_info+0x5ce>
lea    -0x430(%rbp),%rdi
mov    -0x364(%rbp),%edx
lea    0xa21(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
lea    -0x430(%rbp),%rdi
call   1070 <config_get@plt>
mov    %rax,-0xa38(%rbp)
mov    -0xa38(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    170f <add_smbd_share_info+0x55f>
jmp    177e <add_smbd_share_info+0x5ce>
lea    -0xa30(%rbp),%rax
mov    %rax,-0xab0(%rbp)
lea    -0xa30(%rbp),%rdi
call   1050 <strlen@plt>
mov    %eax,%ecx
mov    -0xab0(%rbp),%rax
movslq %ecx,%rcx
add    %rcx,%rax
mov    %rax,-0xaa8(%rbp)
mov    -0xa38(%rbp),%rdi
lea    0x9f0(%rip),%rsi
call   10a0 <strtok@plt>
mov    -0xaa8(%rbp),%rdi
mov    %rax,%rdx
lea    0x907(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
mov    -0x364(%rbp),%eax
add    $0x1,%eax
mov    %eax,-0x364(%rbp)
jmp    16bc <add_smbd_share_info+0x50c>
mov    -0xa40(%rbp),%rdi
lea    0x984(%rip),%rsi
call   10d0 <strstr@plt>
cmp    $0x0,%rax
je     17b2 <add_smbd_share_info+0x602>
mov    -0x8(%rbp),%rdi
lea    0x936(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    190f <add_smbd_share_info+0x75f>
mov    -0xa40(%rbp),%rdi
lea    0x95a(%rip),%rsi
call   10d0 <strstr@plt>
cmp    $0x0,%rax
je     183a <add_smbd_share_info+0x68a>
lea    -0x230(%rbp),%rax
mov    %rax,-0xab8(%rbp)
lea    -0x230(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0xab8(%rbp),%rdi
cltq
add    %rax,%rdi
lea    -0xa30(%rbp),%rdx
lea    0x867(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x884(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x8fc(%rip),%rsi
lea    0x840(%rip),%rdx
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    190a <add_smbd_share_info+0x75a>
mov    -0xa40(%rbp),%rdi
lea    0x8ef(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xa50(%rbp)
cmpq   $0x0,-0xa50(%rbp)
jne    1867 <add_smbd_share_info+0x6b7>
jmp    18df <add_smbd_share_info+0x72f>
lea    -0xa30(%rbp),%rdi
mov    -0xa50(%rbp),%rsi
call   10d0 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     18c3 <add_smbd_share_info+0x713>
lea    -0x230(%rbp),%rax
mov    %rax,-0xac0(%rbp)
lea    -0x230(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0xac0(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0xa50(%rbp),%rdx
lea    0x87d(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0x869(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xa50(%rbp)
jmp    1854 <add_smbd_share_info+0x6a4>
mov    -0x8(%rbp),%rdi
lea    0x7af(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x827(%rip),%rsi
lea    0x76b(%rip),%rdx
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    190f <add_smbd_share_info+0x75f>
mov    -0xa48(%rbp),%rdi
lea    0x7f3(%rip),%rsi
call   10d0 <strstr@plt>
cmp    $0x0,%rax
je     1943 <add_smbd_share_info+0x793>
mov    -0x8(%rbp),%rdi
lea    0x7b5(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1abc <add_smbd_share_info+0x90c>
mov    -0xa48(%rbp),%rdi
lea    0x7c9(%rip),%rsi
call   10d0 <strstr@plt>
cmp    $0x0,%rax
je     19d9 <add_smbd_share_info+0x829>
lea    -0x130(%rbp),%rax
mov    %rax,-0xac8(%rbp)
lea    -0x130(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0xac8(%rbp),%rdi
cltq
add    %rax,%rdi
lea    -0xa30(%rbp),%rdx
lea    0x6d6(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
mov    -0x8(%rbp),%rdi
lea    0x702(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x130(%rbp),%r8
lea    0x6fa(%rip),%rsi
lea    0x70b(%rip),%rdx
lea    0x709(%rip),%rcx
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1ab7 <add_smbd_share_info+0x907>
mov    -0xa48(%rbp),%rdi
lea    0x750(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xa58(%rbp)
cmpq   $0x0,-0xa58(%rbp)
jne    1a06 <add_smbd_share_info+0x856>
jmp    1a7e <add_smbd_share_info+0x8ce>
lea    -0xa30(%rbp),%rdi
mov    -0xa58(%rbp),%rsi
call   10d0 <strstr@plt>
mov    %rax,%rcx
xor    %eax,%eax
cmp    %rcx,%rax
je     1a62 <add_smbd_share_info+0x8b2>
lea    -0x130(%rbp),%rax
mov    %rax,-0xad0(%rbp)
lea    -0x130(%rbp),%rdi
call   1050 <strlen@plt>
mov    -0xad0(%rbp),%rdi
cltq
add    %rax,%rdi
mov    -0xa58(%rbp),%rdx
lea    0x60f(%rip),%rsi
mov    $0x0,%al
call   10c0 <sprintf@plt>
xor    %eax,%eax
mov    %eax,%edi
lea    0x6ca(%rip),%rsi
call   10a0 <strtok@plt>
mov    %rax,-0xa58(%rbp)
jmp    19f3 <add_smbd_share_info+0x843>
mov    -0x8(%rbp),%rdi
lea    0x61f(%rip),%rsi
mov    $0x0,%al
call   1090 <fprintf@plt>
mov    -0x8(%rbp),%rdi
lea    -0x130(%rbp),%r8
lea    0x617(%rip),%rsi
lea    0x628(%rip),%rdx
lea    0x626(%rip),%rcx
mov    $0x0,%al
call   1090 <fprintf@plt>
jmp    1abc <add_smbd_share_info+0x90c>
jmp    1ac1 <add_smbd_share_info+0x911>
add    $0xad0,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<add_smbd_share_info>:
push   %rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x9f8,%rsp
mov    %r9d,%r15d
mov    %r8,%r12
mov    %rcx,0x10(%rsp)
mov    %rdx,0x18(%rsp)
mov    %rsi,%rbp
mov    %rdi,%r13
xorps  %xmm0,%xmm0
movaps %xmm0,0x120(%rsp)
movaps %xmm0,0x110(%rsp)
movaps %xmm0,0x100(%rsp)
movaps %xmm0,0xf0(%rsp)
movaps %xmm0,0xe0(%rsp)
movaps %xmm0,0xd0(%rsp)
movaps %xmm0,0xc0(%rsp)
movaps %xmm0,0xb0(%rsp)
movaps %xmm0,0xa0(%rsp)
movaps %xmm0,0x90(%rsp)
movaps %xmm0,0x80(%rsp)
movaps %xmm0,0x70(%rsp)
movaps %xmm0,0x60(%rsp)
movaps %xmm0,0x50(%rsp)
movaps %xmm0,0x40(%rsp)
movaps %xmm0,0x30(%rsp)
movaps %xmm0,0x220(%rsp)
movaps %xmm0,0x210(%rsp)
movaps %xmm0,0x200(%rsp)
movaps %xmm0,0x1f0(%rsp)
movaps %xmm0,0x1e0(%rsp)
movaps %xmm0,0x1d0(%rsp)
movaps %xmm0,0x1c0(%rsp)
movaps %xmm0,0x1b0(%rsp)
movaps %xmm0,0x1a0(%rsp)
movaps %xmm0,0x190(%rsp)
movaps %xmm0,0x180(%rsp)
movaps %xmm0,0x170(%rsp)
movaps %xmm0,0x160(%rsp)
movaps %xmm0,0x150(%rsp)
movaps %xmm0,0x140(%rsp)
movaps %xmm0,0x130(%rsp)
movaps %xmm0,0x320(%rsp)
movaps %xmm0,0x310(%rsp)
movaps %xmm0,0x300(%rsp)
movaps %xmm0,0x2f0(%rsp)
movaps %xmm0,0x2e0(%rsp)
movaps %xmm0,0x2d0(%rsp)
movaps %xmm0,0x2c0(%rsp)
movaps %xmm0,0x2b0(%rsp)
movaps %xmm0,0x2a0(%rsp)
movaps %xmm0,0x290(%rsp)
movaps %xmm0,0x280(%rsp)
movaps %xmm0,0x270(%rsp)
movaps %xmm0,0x260(%rsp)
movaps %xmm0,0x250(%rsp)
movaps %xmm0,0x240(%rsp)
movaps %xmm0,0x230(%rsp)
lea    0x7f0(%rsp),%r14
mov    $0x200,%edx
mov    %r14,%rdi
xor    %esi,%esi
call   1060 <memset@plt>
lea    0x5f0(%rsp),%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   1060 <memset@plt>
lea    0x3f0(%rsp),%rdi
mov    $0x200,%edx
xor    %esi,%esi
call   1060 <memset@plt>
lea    0x28(%rsp),%rbx
mov    %rbx,%rdi
mov    %rbp,%rsi
mov    $0x7,%edx
call   1030 <strncpy@plt>
movb   $0x0,0x2f(%rsp)
lea    0xc45(%rip),%rsi
mov    %rbx,%rdi
mov    $0x7,%edx
call   1040 <strncmp@plt>
lea    0xc39(%rip),%rsi
mov    %r13,0x8(%rsp)
mov    %r13,%rdi
mov    %rbp,%rdx
mov    %r12,%rcx
xor    %eax,%eax
call   1090 <fprintf@plt>
movups 0xc3d(%rip),%xmm0
movaps %xmm0,0x330(%rsp)
movw   $0x65,0x340(%rsp)
lea    0x330(%rsp),%rdi
call   1070 <config_get@plt>
mov    %r14,%rdi
mov    %rax,%rsi
mov    $0x200,%edx
call   1030 <strncpy@plt>
lea    0xc19(%rip),%rsi
lea    0x3b0(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    %rbx,%rdi
call   1070 <config_get@plt>
lea    0x5f0(%rsp),%rdi
mov    %rax,%rsi
mov    $0x200,%edx
call   1030 <strncpy@plt>
lea    0xbf4(%rip),%rsi
mov    %r14,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
jne    155f <add_smbd_share_info+0x39f>
cmpb   $0x0,0x5f0(%rsp)
je     155f <add_smbd_share_info+0x39f>
lea    0xc7c(%rip),%rbx
lea    0x5f0(%rsp),%rdi
mov    %rbx,%rsi
call   10a0 <strtok@plt>
mov    %rax,0x18(%rsp)
xor    %edi,%edi
mov    %rbx,%rsi
call   10a0 <strtok@plt>
mov    %rax,0x10(%rsp)
lea    0x370(%rsp),%rbx
lea    0xc8a(%rip),%r14
lea    0xbb0(%rip),%r12
xor    %r15d,%r15d
nopl   (%rax)
mov    %rbx,%rdi
lea    0xc34(%rip),%rsi
mov    %r15d,%edx
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    %rbx,%rdi
call   1070 <config_get@plt>
cmpb   $0x0,(%rax)
je     1523 <add_smbd_share_info+0x363>
mov    %rax,%r13
lea    0x3f0(%rsp),%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rbp
add    $0x3f0,%rbp
mov    %r13,%rdi
mov    %r14,%rsi
call   10a0 <strtok@plt>
mov    %rbp,%rdi
mov    %r12,%rsi
mov    %rax,%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
add    $0x1,%r15d
cmp    $0xa,%r15d
jne    14c0 <add_smbd_share_info+0x300>
lea    0xbe6(%rip),%rsi
mov    0x18(%rsp),%rbx
mov    %rbx,%rdi
call   10e0 <strstr@plt>
test   %rax,%rax
je     15ab <add_smbd_share_info+0x3eb>
lea    0xb99(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
mov    0x8(%rsp),%r13
mov    %r13,%rcx
call   10d0 <fwrite@plt>
jmp    18e7 <add_smbd_share_info+0x727>
lea    0xaea(%rip),%rsi
lea    0x370(%rsp),%rbx
mov    %rbx,%rdi
mov    %r15d,%edx
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    %rbx,%rdi
call   1070 <config_get@plt>
lea    0x20(%rsp),%rdi
mov    %rax,%rsi
mov    $0x8,%edx
call   1030 <strncpy@plt>
mov    0x20(%rsp),%al
cmp    $0x33,%al
je     160e <add_smbd_share_info+0x44e>
cmp    $0x32,%al
jne    1615 <add_smbd_share_info+0x455>
lea    0x130(%rsp),%rbx
jmp    161d <add_smbd_share_info+0x45d>
lea    0xb68(%rip),%rsi
mov    %rbx,%rdi
call   10e0 <strstr@plt>
test   %rax,%rax
je     182f <add_smbd_share_info+0x66f>
lea    0x130(%rsp),%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0x130,%rdi
lea    0xa86(%rip),%rsi
lea    0x3f0(%rsp),%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0xa9f(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    0x8(%rsp),%r13
jmp    18c7 <add_smbd_share_info+0x707>
lea    0x30(%rsp),%rbx
jmp    161d <add_smbd_share_info+0x45d>
lea    0x230(%rsp),%rbx
mov    0x8(%rsp),%r15
mov    0x18(%rsp),%r12
lea    0x130(%rsp),%r14
mov    %rbx,%rdi
call   1050 <strlen@plt>
movslq %eax,%rbp
add    %rbx,%rbp
mov    $0x1,%edi
call   10b0 <get_user_name@plt>
lea    0xa1c(%rip),%rsi
mov    %rbp,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    0x22(%rsp),%al
cmp    $0x32,%al
je     166e <add_smbd_share_info+0x4ae>
cmp    $0x33,%al
jne    1673 <add_smbd_share_info+0x4b3>
lea    0x30(%rsp),%rbx
jmp    167b <add_smbd_share_info+0x4bb>
mov    %r14,%rbx
jmp    167b <add_smbd_share_info+0x4bb>
lea    0x230(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
movslq %eax,%rbp
add    %rbx,%rbp
mov    $0x2,%edi
call   10b0 <get_user_name@plt>
lea    0x9d0(%rip),%rsi
mov    %rbp,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    0x24(%rsp),%al
cmp    $0x32,%al
je     16ba <add_smbd_share_info+0x4fa>
cmp    $0x33,%al
jne    16bf <add_smbd_share_info+0x4ff>
lea    0x30(%rsp),%rbx
jmp    16c7 <add_smbd_share_info+0x507>
mov    %r14,%rbx
jmp    16c7 <add_smbd_share_info+0x507>
lea    0x230(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
movslq %eax,%rbp
add    %rbx,%rbp
mov    $0x3,%edi
call   10b0 <get_user_name@plt>
lea    0x984(%rip),%rsi
mov    %rbp,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
mov    0x26(%rsp),%al
cmp    $0x32,%al
je     170e <add_smbd_share_info+0x54e>
cmp    $0x33,%al
jne    1706 <add_smbd_share_info+0x546>
lea    0x30(%rsp),%r14
jmp    170e <add_smbd_share_info+0x54e>
lea    0x230(%rsp),%r14
mov    %r14,%rdi
call   1050 <strlen@plt>
movslq %eax,%rbx
add    %r14,%rbx
mov    $0x4,%edi
call   10b0 <get_user_name@plt>
lea    0x93d(%rip),%rsi
mov    %rbx,%rdi
mov    %rax,%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0x92d(%rip),%rsi
mov    %r12,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     176e <add_smbd_share_info+0x5ae>
lea    0x91f(%rip),%rsi
lea    0x912(%rip),%rdx
lea    0x230(%rsp),%rcx
mov    %r15,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
lea    0x916(%rip),%rdi
call   1070 <config_get@plt>
lea    0x8cd(%rip),%rsi
mov    %rax,%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     17a4 <add_smbd_share_info+0x5e4>
lea    0x8d9(%rip),%rsi
mov    0x10(%rsp),%rdi
call   1080 <strcmp@plt>
test   %rax,%rax
je     17f8 <add_smbd_share_info+0x638>
lea    0x8ee(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10d0 <fwrite@plt>
lea    0x8e4(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10d0 <fwrite@plt>
lea    0x8dc(%rip),%rsi
lea    0x8ed(%rip),%rdx
lea    0x8eb(%rip),%rcx
lea    0x30(%rsp),%r8
mov    %r15,%rdi
jmp    1a49 <add_smbd_share_info+0x889>
lea    0x8dd(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10d0 <fwrite@plt>
lea    0x8d4(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
mov    %r15,%rcx
call   10d0 <fwrite@plt>
jmp    1a50 <add_smbd_share_info+0x890>
lea    0x901(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strtok@plt>
test   %rax,%rax
mov    0x8(%rsp),%r13
je     18b6 <add_smbd_share_info+0x6f6>
mov    %rax,%rbx
lea    0x3f0(%rsp),%r15
lea    0x8dd(%rip),%rbp
lea    0x130(%rsp),%r14
lea    0x8d0(%rip),%r12
jmp    1882 <add_smbd_share_info+0x6c2>
nopl   0x0(%rax,%rax,1)
xor    %edi,%edi
mov    %rbp,%rsi
call   10a0 <strtok@plt>
mov    %rax,%rbx
test   %rax,%rax
je     18b6 <add_smbd_share_info+0x6f6>
mov    %r15,%rdi
mov    %rbx,%rsi
call   10e0 <strstr@plt>
test   %rax,%rax
je     1870 <add_smbd_share_info+0x6b0>
mov    %r14,%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0x130,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
jmp    1870 <add_smbd_share_info+0x6b0>
lea    0x7dc(%rip),%rdi
mov    $0xe,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10d0 <fwrite@plt>
lea    0x84d(%rip),%rsi
lea    0x791(%rip),%rdx
mov    %r13,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
mov    0x10(%rsp),%rbx
lea    0x81d(%rip),%rsi
mov    %rbx,%rdi
call   10e0 <strstr@plt>
test   %rax,%rax
je     191e <add_smbd_share_info+0x75e>
lea    0x7e5(%rip),%rdi
mov    $0xf,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10d0 <fwrite@plt>
jmp    1a50 <add_smbd_share_info+0x890>
lea    0x7f5(%rip),%rsi
mov    %rbx,%rdi
call   10e0 <strstr@plt>
test   %rax,%rax
je     1998 <add_smbd_share_info+0x7d8>
lea    0x30(%rsp),%rbx
mov    %rbx,%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0x30,%rdi
lea    0x71a(%rip),%rsi
lea    0x3f0(%rsp),%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
lea    0x742(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10d0 <fwrite@plt>
lea    0x73a(%rip),%rsi
lea    0x74b(%rip),%rdx
lea    0x749(%rip),%rcx
mov    %r13,%rdi
mov    %rbx,%r8
jmp    1a49 <add_smbd_share_info+0x889>
lea    0x798(%rip),%rsi
mov    %rbx,%rdi
call   10a0 <strtok@plt>
test   %rax,%rax
je     1a13 <add_smbd_share_info+0x853>
mov    %rax,%rbx
lea    0x3f0(%rsp),%r15
lea    0x779(%rip),%rbp
lea    0x30(%rsp),%r14
lea    0x6a0(%rip),%r12
jmp    19e2 <add_smbd_share_info+0x822>
nopl   0x0(%rax)
xor    %edi,%edi
mov    %rbp,%rsi
call   10a0 <strtok@plt>
mov    %rax,%rbx
test   %rax,%rax
je     1a13 <add_smbd_share_info+0x853>
mov    %r15,%rdi
mov    %rbx,%rsi
call   10e0 <strstr@plt>
test   %rax,%rax
je     19d0 <add_smbd_share_info+0x810>
mov    %r14,%rdi
call   1050 <strlen@plt>
cltq
lea    (%rsp,%rax,1),%rdi
add    $0x30,%rdi
mov    %r12,%rsi
mov    %rbx,%rdx
xor    %eax,%eax
call   10c0 <sprintf@plt>
jmp    19d0 <add_smbd_share_info+0x810>
lea    0x68e(%rip),%rdi
mov    $0x10,%esi
mov    $0x1,%edx
mov    %r13,%rcx
call   10d0 <fwrite@plt>
lea    0x686(%rip),%rsi
lea    0x697(%rip),%rdx
lea    0x695(%rip),%rcx
lea    0x30(%rsp),%r8
mov    %r13,%rdi
xor    %eax,%eax
call   1090 <fprintf@plt>
add    $0x9f8,%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret

LLVM IR (-O0):
@.str = [8 x i8] c"SD_Card\00"
@.str.1 = [32 x i8] c"[%s]\0A path=%s\0A browsable=yes\0A\00"
@.str.2 = [18 x i8] c"readycloud_enable\00"
@.str.3 = [20 x i8] c"readycloud_access%d\00"
@.str.4 = [2 x i8] c"1\00"
@.str.5 = [26 x i8] c"shared_usb_folder_users%d\00"
@.str.6 = [4 x i8] c"%s \00"
@.str.7 = [6 x i8] c"guest\00"
@.str.8 = [23 x i8] c" invalid users=%s %s\0A\00"
@.str.9 = [14 x i8] c"usb_passwdNet\00"
@.str.10 = [15 x i8] c" guest ok=no\0A\00"
@.str.11 = [17 x i8] c" read only=yes\0A\00"
@.str.12 = [24 x i8] c" write list=%s, %s %s\0A\00"
@.str.13 = [5 x i8] c"root\00"
@.str.14 = [6 x i8] c"admin\00"
@.str.15 = [16 x i8] c" guest ok=yes\0A\00"
@.str.16 = [16 x i8] c" read only=no\0A\00"
@.str.17 = [2 x i8] c":\00"
@.str.18 = [18 x i8] c"readycloud_user%d\00"
@.str.19 = [2 x i8] c" \00"
@.str.20 = [10 x i8] c"anonymous\00"
@.str.21 = [9 x i8] c"everyone\00"
@.str.22 = [20 x i8] c" invalid users=%s\0A\00"
@.str.23 = [2 x i8] c",\00"
@.str.24 = [6 x i8] c"%s \00"
define void @add_smbd_share_info(i32* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca i32*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i8*
%11 = alloca i8*
%12 = alloca i32
%13 = alloca [256 x i8]
%14 = alloca [256 x i8]
%15 = alloca [256 x i8]
%16 = alloca [8 x i8]
%17 = alloca [8 x i8]
%18 = alloca [32 x i8]
%19 = alloca i32
%20 = alloca i8
%21 = alloca [64 x i8]
%22 = alloca [64 x i8]
%23 = alloca [64 x i8]
%24 = alloca [512 x i8]
%25 = alloca [512 x i8]
%26 = alloca [512 x i8]
%27 = alloca i8*
%28 = alloca i8*
%29 = alloca i8*
%30 = alloca i8*
%31 = alloca i8*
store i32* %0, i32** %7
store i8* %1, i8** %8
store i8* %2, i8** %9
store i8* %3, i8** %10
store i8* %4, i8** %11
store i32 %5, i32* %12
%32 = bitcast [256 x i8]* %13 to i8*
%33 = bitcast [256 x i8]* %14 to i8*
%34 = bitcast [256 x i8]* %15 to i8*
store i32 0, i32* %19
%35 = bitcast [512 x i8]* %24 to i8*
%36 = bitcast [512 x i8]* %25 to i8*
%37 = bitcast [512 x i8]* %26 to i8*
%38 = getelementptr inbounds [8 x i8], [8 x i8]* %17, i64 0, i64 0
%39 = load i8*, i8** %8
%40 = call i32 @strncpy(i8* %38, i8* %39, i32 7)
%41 = getelementptr inbounds [8 x i8], [8 x i8]* %17, i64 0, i64 7
store i8 0, i8* %41
%42 = getelementptr inbounds [8 x i8], [8 x i8]* %17, i64 0, i64 0
%43 = call i32 @strncmp(i8* %42, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%44 = icmp ne i32 %43, 0
br i1 %44, label %50, label %45
45: ; preds = %6
%46 = load i32*, i32** %7
%47 = load i8*, i8** %8
%48 = load i8*, i8** %11
%49 = call i32 (i32*, i8*, ...) @fprintf(i32* %46, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %47, i8* %48)
br label %55
50: ; preds = %6
%51 = load i32*, i32** %7
%52 = load i8*, i8** %8
%53 = load i8*, i8** %11
%54 = call i32 (i32*, i8*, ...) @fprintf(i32* %51, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %52, i8* %53)
br label %55
55: ; preds = %50, %45
%56 = getelementptr inbounds [64 x i8], [64 x i8]* %21, i64 0, i64 0
%57 = call i32 (i8*, i8*, ...) @sprintf(i8* %56, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.2, i64 0, i64 0))
%58 = getelementptr inbounds [512 x i8], [512 x i8]* %24, i64 0, i64 0
%59 = getelementptr inbounds [64 x i8], [64 x i8]* %21, i64 0, i64 0
%60 = call i8* @config_get(i8* %59)
%61 = call i32 @strncpy(i8* %58, i8* %60, i32 512)
%62 = getelementptr inbounds [64 x i8], [64 x i8]* %22, i64 0, i64 0
%63 = load i32, i32* %12
%64 = call i32 (i8*, i8*, ...) @sprintf(i8* %62, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %63)
%65 = getelementptr inbounds [512 x i8], [512 x i8]* %25, i64 0, i64 0
%66 = getelementptr inbounds [64 x i8], [64 x i8]* %22, i64 0, i64 0
%67 = call i8* @config_get(i8* %66)
%68 = call i32 @strncpy(i8* %65, i8* %67, i32 512)
%69 = getelementptr inbounds [512 x i8], [512 x i8]* %24, i64 0, i64 0
%70 = call i64 @strcmp(i8* %69, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%71 = icmp ne i64 %70, 0
br i1 %71, label %77, label %72
72: ; preds = %55
%73 = getelementptr inbounds [512 x i8], [512 x i8]* %25, i64 0, i64 0
%74 = load i8, i8* %73
%75 = sext i8 %74 to i32
%76 = icmp eq i32 %75, 0
br i1 %76, label %77, label %175
77: ; preds = %72, %55
%78 = getelementptr inbounds [32 x i8], [32 x i8]* %18, i64 0, i64 0
%79 = load i32, i32* %12
%80 = call i32 (i8*, i8*, ...) @sprintf(i8* %78, i8* getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i32 %79)
%81 = getelementptr inbounds [8 x i8], [8 x i8]* %16, i64 0, i64 0
%82 = getelementptr inbounds [32 x i8], [32 x i8]* %18, i64 0, i64 0
%83 = call i8* @config_get(i8* %82)
%84 = call i32 @strncpy(i8* %81, i8* %83, i32 8)
store i32 0, i32* %19
br label %85
85: ; preds = %133, %77
%86 = load i32, i32* %19
%87 = icmp sle i32 %86, 3
br i1 %87, label %88, label %136
88: ; preds = %85
%89 = load i32, i32* %19
%90 = mul nsw i32 %89, 2
%91 = sext i32 %90 to i64
%92 = getelementptr inbounds [8 x i8], [8 x i8]* %16, i64 0, i64 %91
%93 = load i8, i8* %92
store i8 %93, i8* %20
%94 = load i8, i8* %20
%95 = sext i8 %94 to i32
%96 = icmp eq i32 %95, 51
br i1 %96, label %97, label %107
97: ; preds = %88
%98 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%99 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%100 = call i32 @strlen(i8* %99)
%101 = sext i32 %100 to i64
%102 = getelementptr inbounds i8, i8* %98, i64 %101
%103 = load i32, i32* %19
%104 = add nsw i32 %103, 1
%105 = call i8* @get_user_name(i32 %104)
%106 = call i32 (i8*, i8*, ...) @sprintf(i8* %102, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %105)
br label %132
107: ; preds = %88
%108 = load i8, i8* %20
%109 = sext i8 %108 to i32
%110 = icmp eq i32 %109, 50
br i1 %110, label %111, label %121
111: ; preds = %107
%112 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%113 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%114 = call i32 @strlen(i8* %113)
%115 = sext i32 %114 to i64
%116 = getelementptr inbounds i8, i8* %112, i64 %115
%117 = load i32, i32* %19
%118 = add nsw i32 %117, 1
%119 = call i8* @get_user_name(i32 %118)
%120 = call i32 (i8*, i8*, ...) @sprintf(i8* %116, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %119)
br label %131
121: ; preds = %107
%122 = getelementptr inbounds [256 x i8], [256 x i8]* %15, i64 0, i64 0
%123 = getelementptr inbounds [256 x i8], [256 x i8]* %15, i64 0, i64 0
%124 = call i32 @strlen(i8* %123)
%125 = sext i32 %124 to i64
%126 = getelementptr inbounds i8, i8* %122, i64 %125
%127 = load i32, i32* %19
%128 = add nsw i32 %127, 1
%129 = call i8* @get_user_name(i32 %128)
%130 = call i32 (i8*, i8*, ...) @sprintf(i8* %126, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %129)
br label %131
131: ; preds = %121, %111
br label %132
132: ; preds = %131, %97
br label %133
133: ; preds = %132
%134 = load i32, i32* %19
%135 = add nsw i32 %134, 1
store i32 %135, i32* %19
br label %85
136: ; preds = %85
%137 = load i8*, i8** %9
%138 = call i64 @strcmp(i8* %137, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%139 = icmp ne i64 %138, 0
br i1 %139, label %140, label %144
140: ; preds = %136
%141 = load i32*, i32** %7
%142 = getelementptr inbounds [256 x i8], [256 x i8]* %15, i64 0, i64 0
%143 = call i32 (i32*, i8*, ...) @fprintf(i32* %141, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %142)
br label %144
144: ; preds = %140, %136
%145 = call i8* @config_get(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%146 = call i64 @strcmp(i8* %145, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%147 = icmp ne i64 %146, 0
br i1 %147, label %156, label %148
148: ; preds = %144
%149 = load i32*, i32** %7
%150 = call i32 (i32*, i8*, ...) @fprintf(i32* %149, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0))
%151 = load i32*, i32** %7
%152 = call i32 (i32*, i8*, ...) @fprintf(i32* %151, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%153 = load i32*, i32** %7
%154 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%155 = call i32 (i32*, i8*, ...) @fprintf(i32* %153, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %154)
br label %174
156: ; preds = %144
%157 = load i8*, i8** %10
%158 = call i64 @strcmp(i8* %157, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%159 = icmp eq i64 %158, 0
br i1 %159, label %160, label %165
160: ; preds = %156
%161 = load i32*, i32** %7
%162 = call i32 (i32*, i8*, ...) @fprintf(i32* %161, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
%163 = load i32*, i32** %7
%164 = call i32 (i32*, i8*, ...) @fprintf(i32* %163, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0))
br label %173
165: ; preds = %156
%166 = load i32*, i32** %7
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %166, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0))
%168 = load i32*, i32** %7
%169 = call i32 (i32*, i8*, ...) @fprintf(i32* %168, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%170 = load i32*, i32** %7
%171 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%172 = call i32 (i32*, i8*, ...) @fprintf(i32* %170, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %171)
br label %173
173: ; preds = %165, %160
br label %174
174: ; preds = %173, %148
br label %310
175: ; preds = %72
%176 = getelementptr inbounds [512 x i8], [512 x i8]* %25, i64 0, i64 0
%177 = call i8* @strtok(i8* %176, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
store i8* %177, i8** %28
%178 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
store i8* %178, i8** %29
store i32 0, i32* %19
br label %179
179: ; preds = %202, %175
%180 = load i32, i32* %19
%181 = icmp sle i32 %180, 9
br i1 %181, label %182, label %205
182: ; preds = %179
%183 = getelementptr inbounds [64 x i8], [64 x i8]* %23, i64 0, i64 0
%184 = load i32, i32* %19
%185 = call i32 (i8*, i8*, ...) @sprintf(i8* %183, i8* getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0), i32 %184)
%186 = getelementptr inbounds [64 x i8], [64 x i8]* %23, i64 0, i64 0
%187 = call i8* @config_get(i8* %186)
store i8* %187, i8** %27
%188 = load i8*, i8** %27
%189 = load i8, i8* %188
%190 = sext i8 %189 to i32
%191 = icmp eq i32 %190, 0
br i1 %191, label %192, label %193
192: ; preds = %182
br label %205
193: ; preds = %182
%194 = getelementptr inbounds [512 x i8], [512 x i8]* %26, i64 0, i64 0
%195 = getelementptr inbounds [512 x i8], [512 x i8]* %26, i64 0, i64 0
%196 = call i32 @strlen(i8* %195)
%197 = sext i32 %196 to i64
%198 = getelementptr inbounds i8, i8* %194, i64 %197
%199 = load i8*, i8** %27
%200 = call i8* @strtok(i8* %199, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0))
%201 = call i32 (i8*, i8*, ...) @sprintf(i8* %198, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %200)
br label %202
202: ; preds = %193
%203 = load i32, i32* %19
%204 = add nsw i32 %203, 1
store i32 %204, i32* %19
br label %179
205: ; preds = %192, %179
%206 = load i8*, i8** %28
%207 = call i32* @strstr(i8* %206, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0))
%208 = icmp ne i32* %207, null
br i1 %208, label %209, label %212
209: ; preds = %205
%210 = load i32*, i32** %7
%211 = call i32 (i32*, i8*, ...) @fprintf(i32* %210, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0))
br label %256
212: ; preds = %205
%213 = load i8*, i8** %28
%214 = call i32* @strstr(i8* %213, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%215 = icmp ne i32* %214, null
br i1 %215, label %216, label %228
216: ; preds = %212
%217 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%218 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%219 = call i32 @strlen(i8* %218)
%220 = sext i32 %219 to i64
%221 = getelementptr inbounds i8, i8* %217, i64 %220
%222 = getelementptr inbounds [512 x i8], [512 x i8]* %26, i64 0, i64 0
%223 = call i32 (i8*, i8*, ...) @sprintf(i8* %221, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %222)
%224 = load i32*, i32** %7
%225 = call i32 (i32*, i8*, ...) @fprintf(i32* %224, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0))
%226 = load i32*, i32** %7
%227 = call i32 (i32*, i8*, ...) @fprintf(i32* %226, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %255
228: ; preds = %212
%229 = load i8*, i8** %28
%230 = call i8* @strtok(i8* %229, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
store i8* %230, i8** %30
br label %231
231: ; preds = %228, %248
%232 = load i8*, i8** %30
%233 = icmp eq i8* %232, null
br i1 %233, label %234, label %235
234: ; preds = %231
br label %250
235: ; preds = %231
%236 = getelementptr inbounds [512 x i8], [512 x i8]* %26, i64 0, i64 0
%237 = load i8*, i8** %30
%238 = call i32* @strstr(i8* %236, i8* %237)
%239 = icmp ne i32* null, %238
br i1 %239, label %240, label %248
240: ; preds = %235
%241 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%242 = getelementptr inbounds [256 x i8], [256 x i8]* %14, i64 0, i64 0
%243 = call i32 @strlen(i8* %242)
%244 = sext i32 %243 to i64
%245 = getelementptr inbounds i8, i8* %241, i64 %244
%246 = load i8*, i8** %30
%247 = call i32 (i8*, i8*, ...) @sprintf(i8* %245, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.24, i64 0, i64 0), i8* %246)
br label %248
248: ; preds = %240, %235
%249 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
store i8* %249, i8** %30
br label %231
250: ; preds = %234
%251 = load i32*, i32** %7
%252 = call i32 (i32*, i8*, ...) @fprintf(i32* %251, i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0))
%253 = load i32*, i32** %7
%254 = call i32 (i32*, i8*, ...) @fprintf(i32* %253, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %255
255: ; preds = %250, %216
br label %256
256: ; preds = %255, %209
%257 = load i8*, i8** %29
%258 = call i32* @strstr(i8* %257, i8* getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0))
%259 = icmp ne i32* %258, null
br i1 %259, label %260, label %263
260: ; preds = %256
%261 = load i32*, i32** %7
%262 = call i32 (i32*, i8*, ...) @fprintf(i32* %261, i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0))
br label %309
263: ; preds = %256
%264 = load i8*, i8** %29
%265 = call i32* @strstr(i8* %264, i8* getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%266 = icmp ne i32* %265, null
br i1 %266, label %267, label %280
267: ; preds = %263
%268 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%269 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%270 = call i32 @strlen(i8* %269)
%271 = sext i32 %270 to i64
%272 = getelementptr inbounds i8, i8* %268, i64 %271
%273 = getelementptr inbounds [512 x i8], [512 x i8]* %26, i64 0, i64 0
%274 = call i32 (i8*, i8*, ...) @sprintf(i8* %272, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %273)
%275 = load i32*, i32** %7
%276 = call i32 (i32*, i8*, ...) @fprintf(i32* %275, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%277 = load i32*, i32** %7
%278 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%279 = call i32 (i32*, i8*, ...) @fprintf(i32* %277, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %278)
br label %308
280: ; preds = %263
%281 = load i8*, i8** %29
%282 = call i8* @strtok(i8* %281, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
store i8* %282, i8** %31
br label %283
283: ; preds = %280, %300
%284 = load i8*, i8** %31
%285 = icmp eq i8* %284, null
br i1 %285, label %286, label %287
286: ; preds = %283
br label %302
287: ; preds = %283
%288 = getelementptr inbounds [512 x i8], [512 x i8]* %26, i64 0, i64 0
%289 = load i8*, i8** %31
%290 = call i32* @strstr(i8* %288, i8* %289)
%291 = icmp ne i32* null, %290
br i1 %291, label %292, label %300
292: ; preds = %287
%293 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%294 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%295 = call i32 @strlen(i8* %294)
%296 = sext i32 %295 to i64
%297 = getelementptr inbounds i8, i8* %293, i64 %296
%298 = load i8*, i8** %31
%299 = call i32 (i8*, i8*, ...) @sprintf(i8* %297, i8* getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %298)
br label %300
300: ; preds = %292, %287
%301 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
store i8* %301, i8** %31
br label %283
302: ; preds = %286
%303 = load i32*, i32** %7
%304 = call i32 (i32*, i8*, ...) @fprintf(i32* %303, i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0))
%305 = load i32*, i32** %7
%306 = getelementptr inbounds [256 x i8], [256 x i8]* %13, i64 0, i64 0
%307 = call i32 (i32*, i8*, ...) @fprintf(i32* %305, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %306)
br label %308
308: ; preds = %302, %267
br label %309
309: ; preds = %308, %260
br label %310
310: ; preds = %309, %174
ret void
}

LLVM IR (-O2):
@.str = [8 x i8] c"SD_Card\00"
@.str.1 = [32 x i8] c"[%s]\0A path=%s\0A browsable=yes\0A\00"
@.str.2 = [18 x i8] c"readycloud_enable\00"
@.str.3 = [20 x i8] c"readycloud_access%d\00"
@.str.4 = [2 x i8] c"1\00"
@.str.5 = [26 x i8] c"shared_usb_folder_users%d\00"
@.str.6 = [4 x i8] c"%s \00"
@.str.7 = [6 x i8] c"guest\00"
@.str.8 = [23 x i8] c" invalid users=%s %s\0A\00"
@.str.9 = [14 x i8] c"usb_passwdNet\00"
@.str.10 = [15 x i8] c" guest ok=no\0A\00"
@.str.11 = [17 x i8] c" read only=yes\0A\00"
@.str.12 = [24 x i8] c" write list=%s, %s %s\0A\00"
@.str.13 = [5 x i8] c"root\00"
@.str.14 = [6 x i8] c"admin\00"
@.str.15 = [16 x i8] c" guest ok=yes\0A\00"
@.str.16 = [16 x i8] c" read only=no\0A\00"
@.str.17 = [2 x i8] c":\00"
@.str.18 = [18 x i8] c"readycloud_user%d\00"
@.str.19 = [2 x i8] c" \00"
@.str.20 = [10 x i8] c"anonymous\00"
@.str.21 = [9 x i8] c"everyone\00"
@.str.22 = [20 x i8] c" invalid users=%s\0A\00"
@.str.23 = [2 x i8] c",\00"
@.str.24 = [6 x i8] c"%s \00"
define void @add_smbd_share_info(i32* %0, i8* %1, i8* %2, i8* %3, i8* %4, i32 %5) {
%7 = alloca [256 x i8]
%8 = alloca [256 x i8]
%9 = alloca [256 x i8]
%10 = alloca [8 x i8]
%11 = alloca [8 x i8]
%12 = alloca [32 x i8]
%13 = alloca [64 x i8]
%14 = alloca [64 x i8]
%15 = alloca [64 x i8]
%16 = alloca [512 x i8]
%17 = alloca [512 x i8]
%18 = alloca [512 x i8]
%19 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 0
%20 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 0
%21 = getelementptr inbounds [256 x i8], [256 x i8]* %9, i64 0, i64 0
%22 = getelementptr inbounds [8 x i8], [8 x i8]* %10, i64 0, i64 0
%23 = getelementptr inbounds [8 x i8], [8 x i8]* %11, i64 0, i64 0
%24 = getelementptr inbounds [32 x i8], [32 x i8]* %12, i64 0, i64 0
%25 = getelementptr inbounds [64 x i8], [64 x i8]* %13, i64 0, i64 0
%26 = getelementptr inbounds [64 x i8], [64 x i8]* %14, i64 0, i64 0
%27 = getelementptr inbounds [64 x i8], [64 x i8]* %15, i64 0, i64 0
%28 = getelementptr inbounds [512 x i8], [512 x i8]* %16, i64 0, i64 0
%29 = getelementptr inbounds [512 x i8], [512 x i8]* %17, i64 0, i64 0
%30 = getelementptr inbounds [512 x i8], [512 x i8]* %18, i64 0, i64 0
%31 = call i32 @strncpy(i8* %23, i8* %1, i32 7)
%32 = getelementptr inbounds [8 x i8], [8 x i8]* %11, i64 0, i64 7
store i8 0, i8* %32
%33 = call i32 @strncmp(i8* %23, i8* getelementptr inbounds ([8 x i8], [8 x i8]* @.str, i64 0, i64 0), i32 7)
%34 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([32 x i8], [32 x i8]* @.str.1, i64 0, i64 0), i8* %1, i8* %4)
%35 = call i8* @config_get(i8* %25)
%36 = call i32 @strncpy(i8* %28, i8* %35, i32 512)
%37 = call i32 (i8*, i8*, ...) @sprintf(i8* %26, i8* dereferenceable(1) getelementptr inbounds ([20 x i8], [20 x i8]* @.str.3, i64 0, i64 0), i32 %5)
%38 = call i8* @config_get(i8* %26)
%39 = call i32 @strncpy(i8* %29, i8* %38, i32 512)
%40 = call i64 @strcmp(i8* %28, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%41 = icmp ne i64 %40, 0
%42 = load i8, i8* %29
%43 = icmp eq i8 %42, 0
%44 = select i1 %41, i1 true, i1 %43
br i1 %44, label %45, label %118
45: ; preds = %6
%46 = call i32 (i8*, i8*, ...) @sprintf(i8* %24, i8* dereferenceable(1) getelementptr inbounds ([26 x i8], [26 x i8]* @.str.5, i64 0, i64 0), i32 %5)
%47 = call i8* @config_get(i8* %24)
%48 = call i32 @strncpy(i8* %22, i8* %47, i32 8)
%49 = load i8, i8* %22
switch i8 %49, label %51 [
i8 51, label %52
i8 50, label %50
]
50: ; preds = %45
br label %52
51: ; preds = %45
br label %52
52: ; preds = %45, %51, %50
%53 = phi i8* [ %21, %51 ], [ %20, %50 ], [ %19, %45 ]
%54 = phi [256 x i8]* [ %9, %51 ], [ %8, %50 ], [ %7, %45 ]
%55 = call i32 @strlen(i8* %53)
%56 = sext i32 %55 to i64
%57 = getelementptr inbounds [256 x i8], [256 x i8]* %54, i64 0, i64 %56
%58 = call i8* @get_user_name(i32 1)
%59 = call i32 (i8*, i8*, ...) @sprintf(i8* %57, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %58)
%60 = getelementptr inbounds [8 x i8], [8 x i8]* %10, i64 0, i64 2
%61 = load i8, i8* %60
switch i8 %61, label %63 [
i8 51, label %62
i8 50, label %64
]
62: ; preds = %52
br label %64
63: ; preds = %52
br label %64
64: ; preds = %52, %63, %62
%65 = phi i8* [ %21, %63 ], [ %19, %62 ], [ %20, %52 ]
%66 = phi [256 x i8]* [ %9, %63 ], [ %7, %62 ], [ %8, %52 ]
%67 = call i32 @strlen(i8* %65)
%68 = sext i32 %67 to i64
%69 = getelementptr inbounds [256 x i8], [256 x i8]* %66, i64 0, i64 %68
%70 = call i8* @get_user_name(i32 2)
%71 = call i32 (i8*, i8*, ...) @sprintf(i8* %69, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %70)
%72 = getelementptr inbounds [8 x i8], [8 x i8]* %10, i64 0, i64 4
%73 = load i8, i8* %72
switch i8 %73, label %75 [
i8 51, label %74
i8 50, label %76
]
74: ; preds = %64
br label %76
75: ; preds = %64
br label %76
76: ; preds = %64, %75, %74
%77 = phi i8* [ %21, %75 ], [ %19, %74 ], [ %20, %64 ]
%78 = phi [256 x i8]* [ %9, %75 ], [ %7, %74 ], [ %8, %64 ]
%79 = call i32 @strlen(i8* %77)
%80 = sext i32 %79 to i64
%81 = getelementptr inbounds [256 x i8], [256 x i8]* %78, i64 0, i64 %80
%82 = call i8* @get_user_name(i32 3)
%83 = call i32 (i8*, i8*, ...) @sprintf(i8* %81, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %82)
%84 = getelementptr inbounds [8 x i8], [8 x i8]* %10, i64 0, i64 6
%85 = load i8, i8* %84
switch i8 %85, label %87 [
i8 51, label %86
i8 50, label %88
]
86: ; preds = %76
br label %88
87: ; preds = %76
br label %88
88: ; preds = %76, %87, %86
%89 = phi i8* [ %21, %87 ], [ %19, %86 ], [ %20, %76 ]
%90 = phi [256 x i8]* [ %9, %87 ], [ %7, %86 ], [ %8, %76 ]
%91 = call i32 @strlen(i8* %89)
%92 = sext i32 %91 to i64
%93 = getelementptr inbounds [256 x i8], [256 x i8]* %90, i64 0, i64 %92
%94 = call i8* @get_user_name(i32 4)
%95 = call i32 (i8*, i8*, ...) @sprintf(i8* %93, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %94)
%96 = call i64 @strcmp(i8* %2, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%97 = icmp eq i64 %96, 0
br i1 %97, label %100, label %98
98: ; preds = %88
%99 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([23 x i8], [23 x i8]* @.str.8, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0), i8* %21)
br label %100
100: ; preds = %98, %88
%101 = call i8* @config_get(i8* getelementptr inbounds ([14 x i8], [14 x i8]* @.str.9, i64 0, i64 0))
%102 = call i64 @strcmp(i8* %101, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.4, i64 0, i64 0))
%103 = icmp eq i64 %102, 0
br i1 %103, label %104, label %108
104: ; preds = %100
%105 = call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i64 14, i64 1, i32* %0)
%106 = call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i64 16, i64 1, i32* %0)
%107 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %19)
br label %201
108: ; preds = %100
%109 = call i64 @strcmp(i8* %3, i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
%110 = icmp eq i64 %109, 0
br i1 %110, label %111, label %114
111: ; preds = %108
%112 = call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i64 15, i64 1, i32* %0)
%113 = call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i64 15, i64 1, i32* %0)
br label %201
114: ; preds = %108
%115 = call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i64 14, i64 1, i32* %0)
%116 = call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i64 16, i64 1, i32* %0)
%117 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %19)
br label %201
118: ; preds = %6
%119 = call i8* @strtok(i8* %29, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
%120 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.17, i64 0, i64 0))
br label %121
121: ; preds = %118, %127
%122 = phi i32 [ 0, %118 ], [ %133, %127 ]
%123 = call i32 (i8*, i8*, ...) @sprintf(i8* %27, i8* dereferenceable(1) getelementptr inbounds ([18 x i8], [18 x i8]* @.str.18, i64 0, i64 0), i32 %122)
%124 = call i8* @config_get(i8* %27)
%125 = load i8, i8* %124
%126 = icmp eq i8 %125, 0
br i1 %126, label %135, label %127
127: ; preds = %121
%128 = call i32 @strlen(i8* %30)
%129 = sext i32 %128 to i64
%130 = getelementptr inbounds [512 x i8], [512 x i8]* %18, i64 0, i64 %129
%131 = call i8* @strtok(i8* %124, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.19, i64 0, i64 0))
%132 = call i32 (i8*, i8*, ...) @sprintf(i8* %130, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %131)
%133 = add nuw nsw i32 %122, 1
%134 = icmp eq i32 %133, 10
br i1 %134, label %135, label %121
135: ; preds = %121, %127
%136 = call i32* @strstr(i8* dereferenceable(1) %119, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0))
%137 = icmp eq i32* %136, null
br i1 %137, label %140, label %138
138: ; preds = %135
%139 = call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.15, i64 0, i64 0), i64 15, i64 1, i32* %0)
br label %168
140: ; preds = %135
%141 = call i32* @strstr(i8* dereferenceable(1) %119, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%142 = icmp eq i32* %141, null
br i1 %142, label %150, label %143
143: ; preds = %140
%144 = call i32 @strlen(i8* %20)
%145 = sext i32 %144 to i64
%146 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 %145
%147 = call i32 (i8*, i8*, ...) @sprintf(i8* %146, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %30)
%148 = call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i64 14, i64 1, i32* %0)
%149 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %168
150: ; preds = %140
%151 = call i8* @strtok(i8* %119, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
%152 = icmp eq i8* %151, null
br i1 %152, label %165, label %153
153: ; preds = %150, %162
%154 = phi i8* [ %163, %162 ], [ %151, %150 ]
%155 = call i32* @strstr(i8* %30, i8* %154)
%156 = icmp eq i32* %155, null
br i1 %156, label %162, label %157
157: ; preds = %153
%158 = call i32 @strlen(i8* %20)
%159 = sext i32 %158 to i64
%160 = getelementptr inbounds [256 x i8], [256 x i8]* %8, i64 0, i64 %159
%161 = call i32 (i8*, i8*, ...) @sprintf(i8* %160, i8* dereferenceable(1) getelementptr inbounds ([6 x i8], [6 x i8]* @.str.24, i64 0, i64 0), i8* %154)
br label %162
162: ; preds = %157, %153
%163 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
%164 = icmp eq i8* %163, null
br i1 %164, label %165, label %153
165: ; preds = %162, %150
%166 = call i64 @fwrite(i8* getelementptr inbounds ([15 x i8], [15 x i8]* @.str.10, i64 0, i64 0), i64 14, i64 1, i32* %0)
%167 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([20 x i8], [20 x i8]* @.str.22, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.7, i64 0, i64 0))
br label %168
168: ; preds = %143, %165, %138
%169 = call i32* @strstr(i8* dereferenceable(1) %120, i8* dereferenceable(1) getelementptr inbounds ([10 x i8], [10 x i8]* @.str.20, i64 0, i64 0))
%170 = icmp eq i32* %169, null
br i1 %170, label %173, label %171
171: ; preds = %168
%172 = call i64 @fwrite(i8* getelementptr inbounds ([16 x i8], [16 x i8]* @.str.16, i64 0, i64 0), i64 15, i64 1, i32* %0)
br label %201
173: ; preds = %168
%174 = call i32* @strstr(i8* dereferenceable(1) %120, i8* dereferenceable(1) getelementptr inbounds ([9 x i8], [9 x i8]* @.str.21, i64 0, i64 0))
%175 = icmp eq i32* %174, null
br i1 %175, label %183, label %176
176: ; preds = %173
%177 = call i32 @strlen(i8* %19)
%178 = sext i32 %177 to i64
%179 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 %178
%180 = call i32 (i8*, i8*, ...) @sprintf(i8* %179, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %30)
%181 = call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i64 16, i64 1, i32* %0)
%182 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %19)
br label %201
183: ; preds = %173
%184 = call i8* @strtok(i8* %120, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
%185 = icmp eq i8* %184, null
br i1 %185, label %198, label %186
186: ; preds = %183, %195
%187 = phi i8* [ %196, %195 ], [ %184, %183 ]
%188 = call i32* @strstr(i8* %30, i8* %187)
%189 = icmp eq i32* %188, null
br i1 %189, label %195, label %190
190: ; preds = %186
%191 = call i32 @strlen(i8* %19)
%192 = sext i32 %191 to i64
%193 = getelementptr inbounds [256 x i8], [256 x i8]* %7, i64 0, i64 %192
%194 = call i32 (i8*, i8*, ...) @sprintf(i8* %193, i8* dereferenceable(1) getelementptr inbounds ([4 x i8], [4 x i8]* @.str.6, i64 0, i64 0), i8* %187)
br label %195
195: ; preds = %190, %186
%196 = call i8* @strtok(i8* null, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str.23, i64 0, i64 0))
%197 = icmp eq i8* %196, null
br i1 %197, label %198, label %186
198: ; preds = %195, %183
%199 = call i64 @fwrite(i8* getelementptr inbounds ([17 x i8], [17 x i8]* @.str.11, i64 0, i64 0), i64 16, i64 1, i32* %0)
%200 = call i32 (i32*, i8*, ...) @fprintf(i32* %0, i8* getelementptr inbounds ([24 x i8], [24 x i8]* @.str.12, i64 0, i64 0), i8* getelementptr inbounds ([5 x i8], [5 x i8]* @.str.13, i64 0, i64 0), i8* getelementptr inbounds ([6 x i8], [6 x i8]* @.str.14, i64 0, i64 0), i8* %19)
br label %201
201: ; preds = %171, %198, %176, %104, %114, %111
ret void
}