#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*/ symlink;
struct stat {
  int /*<<< orphan*/ st_mode;
};
typedef int /*<<< orphan*/ next_token;
typedef int /*<<< orphan*/ left;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ ELOOP;
int /*<<< orphan*/ ENAMETOOLONG;
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ ENOTDIR;
int /*<<< orphan*/ MAXSYMLINKS;
int PATH_MAX;
int /*<<< orphan*/ S_ISDIR(int /*<<< orphan*/);
scalar_t__ S_ISLNK(int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ *getcwd(char *, int);
scalar_t__ lstat(char *, struct stat *);
char *malloc(int);
int /*<<< orphan*/ memcpy(char *, char *, int);
int /*<<< orphan*/ memmove(char *, char *, size_t);
int readlink(char *, char *, int);
char *strchr(char *, char);
scalar_t__ strcmp(char *, char *);
size_t strlcat(char *, char *, int);
size_t strlcpy(char *, char const *, int);
size_t strlen(char *);
char *strrchr(char *, char);
char *realpath(const char *__restrict path, char *__restrict resolved) {
  struct stat sb;
  char *p, *q, *s;
  size_t left_len, resolved_len;
  unsigned symlinks;
  int m, slen;
  char left[PATH_MAX], next_token[PATH_MAX], symlink[PATH_MAX];
  if (path == NULL) {
    errno = EINVAL;
    return (NULL);
  }
  if (path[0] == '\0') {
    errno = ENOENT;
    return (NULL);
  }
  if (resolved == NULL) {
    resolved = malloc(PATH_MAX);
    if (resolved == NULL)
      return (NULL);
    m = 1;
  } else
    m = 0;
  symlinks = 0;
  if (path[0] == '/') {
    resolved[0] = '/';
    resolved[1] = '\0';
    if (path[1] == '\0')
      return (resolved);
    resolved_len = 1;
    left_len = strlcpy(left, path + 1, sizeof(left));
  } else {
    if (getcwd(resolved, PATH_MAX) == NULL) {
      if (m)
        free(resolved);
      else {
        resolved[0] = '.';
        resolved[1] = '\0';
      }
      return (NULL);
    }
    resolved_len = strlen(resolved);
    left_len = strlcpy(left, path, sizeof(left));
  }
  if (left_len >= sizeof(left) || resolved_len >= PATH_MAX) {
    if (m)
      free(resolved);
    errno = ENAMETOOLONG;
    return (NULL);
  }
  while (left_len != 0) {
    p = strchr(left, '/');
    s = p ? p : left + left_len;
    if (s - left >= sizeof(next_token)) {
      if (m)
        free(resolved);
      errno = ENAMETOOLONG;
      return (NULL);
    }
    memcpy(next_token, left, s - left);
    next_token[s - left] = '\0';
    left_len -= s - left;
    if (p != NULL)
      memmove(left, s + 1, left_len + 1);
    if (resolved[resolved_len - 1] != '/') {
      if (resolved_len + 1 >= PATH_MAX) {
        if (m)
          free(resolved);
        errno = ENAMETOOLONG;
        return (NULL);
      }
      resolved[resolved_len++] = '/';
      resolved[resolved_len] = '\0';
    }
    if (next_token[0] == '\0') {
      if (lstat(resolved, &sb) != 0) {
        if (m)
          free(resolved);
        return (NULL);
      }
      if (!S_ISDIR(sb.st_mode)) {
        if (m)
          free(resolved);
        errno = ENOTDIR;
        return (NULL);
      }
      continue;
    } else if (strcmp(next_token, ".") == 0)
      continue;
    else if (strcmp(next_token, "..") == 0) {
      if (resolved_len > 1) {
        resolved[resolved_len - 1] = '\0';
        q = strrchr(resolved, '/') + 1;
        *q = '\0';
        resolved_len = q - resolved;
      }
      continue;
    }
    resolved_len = strlcat(resolved, next_token, PATH_MAX);
    if (resolved_len >= PATH_MAX) {
      if (m)
        free(resolved);
      errno = ENAMETOOLONG;
      return (NULL);
    }
    if (lstat(resolved, &sb) != 0) {
      if (m)
        free(resolved);
      return (NULL);
    }
    if (S_ISLNK(sb.st_mode)) {
      if (symlinks++ > MAXSYMLINKS) {
        if (m)
          free(resolved);
        errno = ELOOP;
        return (NULL);
      }
      slen = readlink(resolved, symlink, sizeof(symlink) - 1);
      if (slen < 0) {
        if (m)
          free(resolved);
        return (NULL);
      }
      symlink[slen] = '\0';
      if (symlink[0] == '/') {
        resolved[1] = 0;
        resolved_len = 1;
      } else if (resolved_len > 1) {
        resolved[resolved_len - 1] = '\0';
        q = strrchr(resolved, '/') + 1;
        *q = '\0';
        resolved_len = q - resolved;
      }
      if (p != NULL) {
        if (symlink[slen - 1] != '/') {
          if (slen + 1 >= sizeof(symlink)) {
            if (m)
              free(resolved);
            errno = ENAMETOOLONG;
            return (NULL);
          }
          symlink[slen] = '/';
          symlink[slen + 1] = 0;
        }
        left_len = strlcat(symlink, left, sizeof(symlink));
        if (left_len >= sizeof(left)) {
          if (m)
            free(resolved);
          errno = ENAMETOOLONG;
          return (NULL);
        }
      }
      left_len = strlcpy(left, symlink, sizeof(left));
    }
  }
  if (resolved_len > 1 && resolved[resolved_len - 1] == '/')
    resolved[resolved_len - 1] = '\0';
  return (resolved);
}


x86 assembly (clang, -O0):
<realpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0xc0,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
mov    0x2dde(%rip),%rax
mov    (%rax),%ecx
mov    %rcx,-0xb0(%rbp)
mov    %rsp,%rdx
mov    %rdx,-0x60(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0xa8(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x68(%rbp)
mov    (%rax),%ecx
mov    %rcx,-0xa0(%rbp)
mov    %rcx,%rsi
add    $0xf,%rsi
and    $0xfffffffffffffff0,%rsi
mov    %rsp,%rdx
sub    %rsi,%rdx
mov    %rdx,-0x98(%rbp)
mov    %rdx,%rsp
mov    %rcx,-0x70(%rbp)
mov    (%rax),%eax
mov    %rax,-0x90(%rbp)
mov    %rax,%rdx
add    $0xf,%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x88(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x78(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    12ba <realpath+0xca>
mov    0x2d1d(%rip),%rax
mov    (%rax),%ecx
mov    0x2d1c(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    12f0 <realpath+0x100>
mov    0x2ccf(%rip),%rax
mov    (%rax),%ecx
mov    0x2ce6(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
cmpq   $0x0,-0x18(%rbp)
jne    1338 <realpath+0x148>
mov    0x2ce6(%rip),%rax
mov    (%rax),%edi
call   10f0 <malloc@plt>
mov    %rax,-0x18(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    132c <realpath+0x13c>
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
movl   $0x1,-0x50(%rbp)
jmp    133f <realpath+0x14f>
movl   $0x0,-0x50(%rbp)
movl   $0x0,-0x4c(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    13b8 <realpath+0x1c8>
mov    -0x18(%rbp),%rax
movb   $0x2f,(%rax)
mov    -0x18(%rbp),%rax
movb   $0x0,0x1(%rax)
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x0,%eax
jne    138a <realpath+0x19a>
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0xa8(%rbp),%rdi
mov    -0xb0(%rbp),%rax
movq   $0x1,-0x48(%rbp)
mov    -0x10(%rbp),%rsi
add    $0x1,%rsi
mov    %eax,%edx
call   1100 <strlcpy@plt>
mov    %rax,-0x40(%rbp)
jmp    143c <realpath+0x24c>
mov    -0x18(%rbp),%rdi
mov    0x2c25(%rip),%rax
mov    (%rax),%esi
call   10b0 <getcwd@plt>
cmp    $0x0,%rax
jne    140f <realpath+0x21f>
cmpl   $0x0,-0x50(%rbp)
je     13ec <realpath+0x1fc>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
jmp    13fb <realpath+0x20b>
mov    -0x18(%rbp),%rax
movb   $0x2e,(%rax)
mov    -0x18(%rbp),%rax
movb   $0x0,0x1(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0x18(%rbp),%rdi
call   1070 <strlen@plt>
mov    -0xa8(%rbp),%rdi
mov    %rax,%rcx
mov    -0xb0(%rbp),%rax
mov    %rcx,-0x48(%rbp)
mov    -0x10(%rbp),%rsi
mov    %eax,%edx
call   1100 <strlcpy@plt>
mov    %rax,-0x40(%rbp)
mov    -0xb0(%rbp),%rax
cmp    %rax,-0x40(%rbp)
jae    1464 <realpath+0x274>
mov    -0x48(%rbp),%rax
mov    0x2b90(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%rax
jb     149d <realpath+0x2ad>
cmpl   $0x0,-0x50(%rbp)
je     1477 <realpath+0x287>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x2b32(%rip),%rax
mov    (%rax),%ecx
mov    0x2b39(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
jmp    14a2 <realpath+0x2b2>
cmpq   $0x0,-0x40(%rbp)
je     1a8d <realpath+0x89d>
mov    -0xa8(%rbp),%rdi
mov    $0x2f,%esi
call   1080 <strchr@plt>
mov    %rax,-0x28(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     14dd <realpath+0x2ed>
mov    -0x28(%rbp),%rax
mov    %rax,-0xb8(%rbp)
jmp    14ef <realpath+0x2ff>
mov    -0xa8(%rbp),%rax
add    -0x40(%rbp),%rax
mov    %rax,-0xb8(%rbp)
mov    -0xa0(%rbp),%rcx
mov    -0xa8(%rbp),%rdx
mov    -0xb8(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x38(%rbp),%rax
sub    %rdx,%rax
cmp    %rcx,%rax
jb     1551 <realpath+0x361>
cmpl   $0x0,-0x50(%rbp)
je     152b <realpath+0x33b>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x2a7e(%rip),%rax
mov    (%rax),%ecx
mov    0x2a85(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0xa8(%rbp),%rsi
mov    -0x98(%rbp),%rdi
mov    -0x38(%rbp),%rax
sub    %rsi,%rax
mov    %eax,%edx
call   10e0 <memcpy@plt>
mov    -0x98(%rbp),%rcx
mov    -0xa8(%rbp),%rax
mov    -0x38(%rbp),%rdx
sub    %rax,%rdx
movb   $0x0,(%rcx,%rdx,1)
mov    -0x38(%rbp),%rcx
sub    %rax,%rcx
mov    -0x40(%rbp),%rax
sub    %rcx,%rax
mov    %rax,-0x40(%rbp)
cmpq   $0x0,-0x28(%rbp)
je     15bf <realpath+0x3cf>
mov    -0xa8(%rbp),%rdi
mov    -0x38(%rbp),%rsi
add    $0x1,%rsi
mov    -0x40(%rbp),%rdx
add    $0x1,%rdx
call   1110 <memmove@plt>
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     164f <realpath+0x45f>
mov    -0x48(%rbp),%rax
add    $0x1,%rax
mov    0x2a01(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%rax
jb     162c <realpath+0x43c>
cmpl   $0x0,-0x50(%rbp)
je     1606 <realpath+0x416>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x29a3(%rip),%rax
mov    (%rax),%ecx
mov    0x29aa(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
mov    %rcx,%rdx
add    $0x1,%rdx
mov    %rdx,-0x48(%rbp)
movb   $0x2f,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x98(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    16ef <realpath+0x4ff>
mov    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   10c0 <lstat@plt>
cmp    $0x0,%rax
je     16a0 <realpath+0x4b0>
cmpl   $0x0,-0x50(%rbp)
je     168c <realpath+0x49c>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0x20(%rbp),%edi
call   1090 <S_ISDIR@plt>
cmp    $0x0,%eax
jne    16ea <realpath+0x4fa>
cmpl   $0x0,-0x50(%rbp)
je     16c4 <realpath+0x4d4>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x292d(%rip),%rax
mov    (%rax),%ecx
mov    0x28ec(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
jmp    14a2 <realpath+0x2b2>
mov    -0x98(%rbp),%rdi
lea    0x904(%rip),%rsi
call   10d0 <strcmp@plt>
cmp    $0x0,%rax
jne    1711 <realpath+0x521>
jmp    14a2 <realpath+0x2b2>
mov    -0x98(%rbp),%rdi
lea    0x8e1(%rip),%rsi
call   10d0 <strcmp@plt>
cmp    $0x0,%rax
jne    177a <realpath+0x58a>
cmpq   $0x1,-0x48(%rbp)
jbe    1775 <realpath+0x585>
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
mov    $0x2f,%esi
call   10a0 <strrchr@plt>
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x48(%rbp)
jmp    14a2 <realpath+0x2b2>
jmp    177f <realpath+0x58f>
jmp    1784 <realpath+0x594>
mov    -0x98(%rbp),%rsi
mov    -0x18(%rbp),%rdi
mov    0x2852(%rip),%rax
mov    (%rax),%edx
call   1060 <strlcat@plt>
mov    %rax,-0x48(%rbp)
mov    -0x48(%rbp),%rax
mov    0x283c(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%rax
jb     17f1 <realpath+0x601>
cmpl   $0x0,-0x50(%rbp)
je     17cb <realpath+0x5db>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x27de(%rip),%rax
mov    (%rax),%ecx
mov    0x27e5(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   10c0 <lstat@plt>
cmp    $0x0,%rax
je     182f <realpath+0x63f>
cmpl   $0x0,-0x50(%rbp)
je     181b <realpath+0x62b>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0x20(%rbp),%edi
call   1040 <S_ISLNK@plt>
cmp    $0x0,%rax
je     1a88 <realpath+0x898>
mov    -0x4c(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x4c(%rbp)
mov    0x2785(%rip),%rcx
cmp    (%rcx),%eax
jbe    1894 <realpath+0x6a4>
cmpl   $0x0,-0x50(%rbp)
je     186e <realpath+0x67e>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x275b(%rip),%rax
mov    (%rax),%ecx
mov    0x2742(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0x88(%rbp),%rsi
mov    -0x90(%rbp),%rax
mov    -0x18(%rbp),%rdi
sub    $0x1,%rax
mov    %eax,%edx
call   1050 <readlink@plt>
mov    %eax,-0x54(%rbp)
cmpl   $0x0,-0x54(%rbp)
jge    18e5 <realpath+0x6f5>
cmpl   $0x0,-0x50(%rbp)
je     18d1 <realpath+0x6e1>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0x88(%rbp),%rax
movslq -0x54(%rbp),%rcx
movb   $0x0,(%rax,%rcx,1)
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1915 <realpath+0x725>
mov    -0x18(%rbp),%rax
movb   $0x0,0x1(%rax)
movq   $0x1,-0x48(%rbp)
jmp    1961 <realpath+0x771>
cmpq   $0x1,-0x48(%rbp)
jbe    195c <realpath+0x76c>
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
mov    $0x2f,%esi
call   10a0 <strrchr@plt>
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x30(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
mov    %rax,-0x48(%rbp)
jmp    1961 <realpath+0x771>
cmpq   $0x0,-0x28(%rbp)
je     1a68 <realpath+0x878>
mov    -0x88(%rbp),%rax
mov    -0x54(%rbp),%ecx
sub    $0x1,%ecx
movslq %ecx,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
je     19f6 <realpath+0x806>
mov    -0x90(%rbp),%rcx
mov    -0x54(%rbp),%eax
add    $0x1,%eax
cltq
cmp    %rcx,%rax
jb     19da <realpath+0x7ea>
cmpl   $0x0,-0x50(%rbp)
je     19b4 <realpath+0x7c4>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x25f5(%rip),%rax
mov    (%rax),%ecx
mov    0x25fc(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
mov    -0x88(%rbp),%rax
movslq -0x54(%rbp),%rcx
movb   $0x2f,(%rax,%rcx,1)
mov    -0x54(%rbp),%ecx
add    $0x1,%ecx
movslq %ecx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0xa8(%rbp),%rsi
mov    -0x88(%rbp),%rdi
mov    -0x90(%rbp),%rax
mov    %eax,%edx
call   1060 <strlcat@plt>
mov    %rax,%rcx
mov    -0xb0(%rbp),%rax
mov    %rcx,-0x40(%rbp)
cmp    %rax,-0x40(%rbp)
jb     1a63 <realpath+0x873>
cmpl   $0x0,-0x50(%rbp)
je     1a3d <realpath+0x84d>
mov    -0x18(%rbp),%rdi
call   1030 <free@plt>
mov    0x256c(%rip),%rax
mov    (%rax),%ecx
mov    0x2573(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
jmp    1ad0 <realpath+0x8e0>
jmp    1a68 <realpath+0x878>
mov    -0x88(%rbp),%rsi
mov    -0xa8(%rbp),%rdi
mov    -0xb0(%rbp),%rax
mov    %eax,%edx
call   1100 <strlcpy@plt>
mov    %rax,-0x40(%rbp)
jmp    14a2 <realpath+0x2b2>
cmpq   $0x1,-0x48(%rbp)
jbe    1ac1 <realpath+0x8d1>
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    $0x1,%rcx
movsbl (%rax,%rcx,1),%eax
cmp    $0x2f,%eax
jne    1ac1 <realpath+0x8d1>
mov    -0x18(%rbp),%rax
mov    -0x48(%rbp),%rcx
sub    $0x1,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
movl   $0x1,-0x7c(%rbp)
mov    -0x60(%rbp),%rax
mov    %rax,%rsp
mov    -0x8(%rbp),%rax
mov    %rbp,%rsp
pop    %rbp
ret

x86 assembly (clang, -O2):
<realpath>:
push   %rbp
mov    %rsp,%rbp
push   %r15
push   %r14
push   %r13
push   %r12
push   %rbx
sub    $0x68,%rsp
mov    %rdi,%r14
mov    %rsp,%r8
mov    0x2dda(%rip),%rcx
mov    (%rcx),%edx
mov    %rsp,%r13
lea    0xf(%rdx),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%r13
mov    %r13,%rsp
mov    (%rcx),%ecx
mov    %rsp,%rdi
lea    0xf(%rcx),%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rdi
mov    %rdi,%rsp
mov    %rsp,%rbx
sub    %rax,%rbx
mov    %rbx,%rsp
test   %r14,%r14
je     12ae <realpath+0xbe>
mov    %rdi,-0x88(%rbp)
mov    (%r14),%r15b
test   %r15b,%r15b
je     12ba <realpath+0xca>
mov    %rbx,-0x68(%rbp)
mov    %rdx,-0x70(%rbp)
mov    %rsi,%r12
mov    %rsi,-0x38(%rbp)
test   %rsi,%rsi
mov    %rcx,-0x58(%rbp)
jne    1286 <realpath+0x96>
mov    %ecx,%edi
mov    %r8,%rbx
call   10f0 <malloc@plt>
mov    %rbx,%r8
mov    -0x58(%rbp),%rcx
mov    %rax,%r12
test   %rax,%rax
je     160e <realpath+0x41e>
cmp    $0x2f,%r15b
mov    %r8,-0x30(%rbp)
jne    12c6 <realpath+0xd6>
movw   $0x2f,(%r12)
cmpb   $0x0,0x1(%r14)
je     1611 <realpath+0x421>
add    $0x1,%r14
mov    $0x1,%r15d
jmp    12e4 <realpath+0xf4>
mov    0x2d03(%rip),%rax
jmp    1603 <realpath+0x413>
mov    0x2cdf(%rip),%rax
jmp    1603 <realpath+0x413>
mov    %r12,%rdi
mov    %ecx,%esi
call   10b0 <getcwd@plt>
test   %rax,%rax
je     1626 <realpath+0x436>
mov    %r12,%rdi
call   1070 <strlen@plt>
mov    %rax,%r15
mov    %r13,%rdi
mov    %r14,%rsi
mov    -0x70(%rbp),%rbx
mov    %ebx,%edx
call   1100 <strlcpy@plt>
cmp    %rbx,%rax
jae    15e3 <realpath+0x3f3>
mov    %rax,%r14
mov    0x2ce0(%rip),%rax
movslq (%rax),%rax
cmp    %rax,%r15
jae    15e3 <realpath+0x3f3>
test   %r14,%r14
mov    -0x30(%rbp),%r8
je     163d <realpath+0x44d>
mov    -0x58(%rbp),%rax
add    $0xffffffff,%eax
mov    %eax,-0x74(%rbp)
movl   $0x0,-0x44(%rbp)
mov    %r12,-0x50(%rbp)
mov    %r15,%rax
jmp    134f <realpath+0x15f>
mov    -0x30(%rbp),%r8
mov    -0x60(%rbp),%r14
mov    %r15,%rax
test   %r14,%r14
je     163d <realpath+0x44d>
mov    %rax,-0x90(%rbp)
mov    %r13,%rdi
mov    $0x2f,%esi
call   1080 <strchr@plt>
lea    (%r14,%r13,1),%r12
test   %rax,%rax
cmovne %rax,%r12
mov    %r12,%rbx
sub    %r13,%rbx
cmp    -0x58(%rbp),%rbx
jae    1653 <realpath+0x463>
mov    %rax,-0x80(%rbp)
mov    %r13,%r15
mov    -0x88(%rbp),%r13
mov    %r13,%rdi
mov    %r15,%rsi
mov    %ebx,%edx
call   10e0 <memcpy@plt>
sub    %rbx,%r14
movb   $0x0,0x0(%r13,%rbx,1)
mov    %r13,%rbx
mov    %r15,%r13
cmpq   $0x0,-0x80(%rbp)
je     13c2 <realpath+0x1d2>
add    $0x1,%r12
lea    0x1(%r14),%rdx
mov    %r13,%rdi
mov    %r12,%rsi
call   1110 <memmove@plt>
mov    %r14,-0x60(%rbp)
mov    -0x50(%rbp),%r12
mov    -0x90(%rbp),%rcx
cmpb   $0x2f,-0x1(%rcx,%r12,1)
jne    1450 <realpath+0x260>
mov    %rcx,%r15
cmpb   $0x0,(%rbx)
je     1477 <realpath+0x287>
mov    %rbx,%rdi
lea    0xc12(%rip),%rsi
call   10d0 <strcmp@plt>
test   %rax,%rax
je     133b <realpath+0x14b>
mov    %rbx,%rdi
lea    0xbf9(%rip),%rsi
call   10d0 <strcmp@plt>
test   %rax,%rax
jne    14a9 <realpath+0x2b9>
cmp    $0x2,%r15
mov    -0x60(%rbp),%r14
jb     1440 <realpath+0x250>
movb   $0x0,-0x1(%r15,%r12,1)
mov    %r12,%rdi
mov    $0x2f,%esi
call   10a0 <strrchr@plt>
mov    %rax,%r15
movb   $0x0,0x1(%rax)
add    $0x1,%r15
sub    %r12,%r15
mov    -0x30(%rbp),%r8
jmp    1343 <realpath+0x153>
nopl   0x0(%rax)
lea    0x1(%rcx),%r15
mov    0x2b8d(%rip),%rax
movslq (%rax),%rax
cmp    %rax,%r15
jae    1660 <realpath+0x470>
movw   $0x2f,(%r12,%rcx,1)
cmpb   $0x0,(%rbx)
jne    13e5 <realpath+0x1f5>
mov    %r12,%rdi
lea    -0x40(%rbp),%rsi
call   10c0 <lstat@plt>
test   %rax,%rax
mov    -0x60(%rbp),%r14
jne    1683 <realpath+0x493>
mov    -0x40(%rbp),%edi
call   1090 <S_ISDIR@plt>
test   %eax,%eax
mov    -0x30(%rbp),%r8
jne    1343 <realpath+0x153>
jmp    16a1 <realpath+0x4b1>
mov    0x2b38(%rip),%rax
mov    %rbx,%rsi
mov    %rax,%rbx
mov    (%rax),%edx
mov    %r12,%rdi
call   1060 <strlcat@plt>
mov    %rax,%r15
movslq (%rbx),%rax
cmp    %rax,%r15
jae    1660 <realpath+0x470>
mov    %r12,%rdi
lea    -0x40(%rbp),%rsi
call   10c0 <lstat@plt>
test   %rax,%rax
jne    16c2 <realpath+0x4d2>
mov    -0x40(%rbp),%edi
call   1040 <S_ISLNK@plt>
test   %rax,%rax
je     1539 <realpath+0x349>
mov    -0x44(%rbp),%eax
mov    0x2add(%rip),%rcx
cmp    (%rcx),%eax
ja     16dd <realpath+0x4ed>
mov    %r12,%rdi
mov    -0x68(%rbp),%rbx
mov    %rbx,%rsi
mov    -0x74(%rbp),%edx
call   1050 <readlink@plt>
test   %eax,%eax
js     16c2 <realpath+0x4d2>
mov    %eax,%r14d
mov    %eax,%ecx
movb   $0x0,(%rbx,%rcx,1)
cmpb   $0x2f,(%rbx)
jne    1546 <realpath+0x356>
movb   $0x0,0x1(%r12)
mov    $0x1,%r15d
jmp    1573 <realpath+0x383>
mov    -0x30(%rbp),%r8
mov    -0x60(%rbp),%r14
jmp    15d6 <realpath+0x3e6>
cmp    $0x2,%r15
jb     1573 <realpath+0x383>
movb   $0x0,-0x1(%r15,%r12,1)
mov    %r12,%rdi
mov    $0x2f,%esi
mov    %rcx,%rbx
call   10a0 <strrchr@plt>
mov    %rbx,%rcx
mov    %rax,%r15
movb   $0x0,0x1(%rax)
add    $0x1,%r15
sub    %r12,%r15
cmpq   $0x0,-0x80(%rbp)
mov    -0x68(%rbp),%rbx
je     15bc <realpath+0x3cc>
movslq %r14d,%rax
cmpb   $0x2f,-0x1(%rax,%rbx,1)
mov    -0x58(%rbp),%rdx
je     15a7 <realpath+0x3b7>
mov    %rcx,%rax
add    $0x1,%rax
cmp    %edx,%eax
jae    1653 <realpath+0x463>
mov    -0x68(%rbp),%rbx
movb   $0x2f,(%rbx,%rcx,1)
movb   $0x0,(%rbx,%rax,1)
mov    %rbx,%rdi
mov    %r13,%rsi
call   1060 <strlcat@plt>
cmp    -0x70(%rbp),%rax
jae    1653 <realpath+0x463>
addl   $0x1,-0x44(%rbp)
mov    %r13,%rdi
mov    %rbx,%rsi
mov    -0x70(%rbp),%rdx
call   1100 <strlcpy@plt>
mov    %rax,%r14
mov    -0x30(%rbp),%r8
test   %r14,%r14
je     163d <realpath+0x44d>
mov    %r15,%rax
jmp    134f <realpath+0x15f>
cmpq   $0x0,-0x38(%rbp)
mov    -0x30(%rbp),%r8
jne    15fc <realpath+0x40c>
mov    %r12,%rdi
mov    %r8,%rbx
call   1030 <free@plt>
mov    %rbx,%r8
mov    0x29ad(%rip),%rax
mov    (%rax),%eax
mov    0x29b4(%rip),%rcx
mov    %eax,(%rcx)
xor    %r12d,%r12d
mov    %r8,%rsp
mov    %r12,%rax
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
cmpq   $0x0,-0x38(%rbp)
je     16c9 <realpath+0x4d9>
movw   $0x2e,(%r12)
jmp    16d1 <realpath+0x4e1>
cmp    $0x2,%r15
jb     1611 <realpath+0x421>
cmpb   $0x2f,-0x1(%r15,%r12,1)
jne    1611 <realpath+0x421>
movb   $0x0,-0x1(%r12,%r15,1)
jmp    1611 <realpath+0x421>
cmpq   $0x0,-0x38(%rbp)
jne    166f <realpath+0x47f>
mov    -0x50(%rbp),%rdi
jmp    166a <realpath+0x47a>
cmpq   $0x0,-0x38(%rbp)
jne    166f <realpath+0x47f>
mov    %r12,%rdi
call   1030 <free@plt>
mov    0x293a(%rip),%rax
mov    (%rax),%eax
mov    0x2941(%rip),%rcx
mov    %eax,(%rcx)
jmp    16d1 <realpath+0x4e1>
cmpq   $0x0,-0x38(%rbp)
mov    -0x30(%rbp),%r8
jne    160e <realpath+0x41e>
mov    %r12,%rdi
mov    %r8,%rbx
call   1030 <free@plt>
mov    %rbx,%r8
jmp    160e <realpath+0x41e>
cmpq   $0x0,-0x38(%rbp)
jne    16b6 <realpath+0x4c6>
mov    %r12,%rdi
mov    %r8,%rbx
call   1030 <free@plt>
mov    %rbx,%r8
mov    0x293b(%rip),%rax
jmp    1603 <realpath+0x413>
cmpq   $0x0,-0x38(%rbp)
jne    16d1 <realpath+0x4e1>
mov    %r12,%rdi
call   1030 <free@plt>
xor    %r12d,%r12d
mov    -0x30(%rbp),%r8
jmp    1611 <realpath+0x421>
cmpq   $0x0,-0x38(%rbp)
jne    16ec <realpath+0x4fc>
mov    %r12,%rdi
call   1030 <free@plt>
mov    0x28dd(%rip),%rax
jmp    1676 <realpath+0x486>

LLVM IR (-O0):
%struct.stat = type { i32 }
@PATH_MAX = global i32 0
@EINVAL = global i32 0
@errno = global i32 0
@ENOENT = global i32 0
@ENAMETOOLONG = global i32 0
@ENOTDIR = global i32 0
@.str = [2 x i8] c".\00"
@.str.1 = [3 x i8] c"..\00"
@MAXSYMLINKS = global i32 0
@ELOOP = global i32 0
define i8* @realpath(i8* noalias %0, i8* noalias %1) {
%3 = alloca i8*
%4 = alloca i8*
%5 = alloca i8*
%6 = alloca %struct.stat
%7 = alloca i8*
%8 = alloca i8*
%9 = alloca i8*
%10 = alloca i64
%11 = alloca i64
%12 = alloca i32
%13 = alloca i32
%14 = alloca i32
%15 = alloca i8*
%16 = alloca i64
%17 = alloca i64
%18 = alloca i64
%19 = alloca i32
store i8* %0, i8** %4
store i8* %1, i8** %5
%20 = load i32, i32* @PATH_MAX
%21 = zext i32 %20 to i64
%22 = call i8* @llvm.stacksave()
store i8* %22, i8** %15
%23 = alloca i8, i64 %21
store i64 %21, i64* %16
%24 = load i32, i32* @PATH_MAX
%25 = zext i32 %24 to i64
%26 = alloca i8, i64 %25
store i64 %25, i64* %17
%27 = load i32, i32* @PATH_MAX
%28 = zext i32 %27 to i64
%29 = alloca i8, i64 %28
store i64 %28, i64* %18
%30 = load i8*, i8** %4
%31 = icmp eq i8* %30, null
br i1 %31, label %32, label %34
32: ; preds = %2
%33 = load i32, i32* @EINVAL
store i32 %33, i32* @errno
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
34: ; preds = %2
%35 = load i8*, i8** %4
%36 = getelementptr inbounds i8, i8* %35, i64 0
%37 = load i8, i8* %36
%38 = sext i8 %37 to i32
%39 = icmp eq i32 %38, 0
br i1 %39, label %40, label %42
40: ; preds = %34
%41 = load i32, i32* @ENOENT
store i32 %41, i32* @errno
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
42: ; preds = %34
%43 = load i8*, i8** %5
%44 = icmp eq i8* %43, null
br i1 %44, label %45, label %52
45: ; preds = %42
%46 = load i32, i32* @PATH_MAX
%47 = call i8* @malloc(i32 %46)
store i8* %47, i8** %5
%48 = load i8*, i8** %5
%49 = icmp eq i8* %48, null
br i1 %49, label %50, label %51
50: ; preds = %45
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
51: ; preds = %45
store i32 1, i32* %13
br label %53
52: ; preds = %42
store i32 0, i32* %13
br label %53
53: ; preds = %52, %51
store i32 0, i32* %12
%54 = load i8*, i8** %4
%55 = getelementptr inbounds i8, i8* %54, i64 0
%56 = load i8, i8* %55
%57 = sext i8 %56 to i32
%58 = icmp eq i32 %57, 47
br i1 %58, label %59, label %76
59: ; preds = %53
%60 = load i8*, i8** %5
%61 = getelementptr inbounds i8, i8* %60, i64 0
store i8 47, i8* %61
%62 = load i8*, i8** %5
%63 = getelementptr inbounds i8, i8* %62, i64 1
store i8 0, i8* %63
%64 = load i8*, i8** %4
%65 = getelementptr inbounds i8, i8* %64, i64 1
%66 = load i8, i8* %65
%67 = sext i8 %66 to i32
%68 = icmp eq i32 %67, 0
br i1 %68, label %69, label %71
69: ; preds = %59
%70 = load i8*, i8** %5
store i8* %70, i8** %3
store i32 1, i32* %19
br label %412
71: ; preds = %59
store i64 1, i64* %11
%72 = load i8*, i8** %4
%73 = getelementptr inbounds i8, i8* %72, i64 1
%74 = trunc i64 %21 to i32
%75 = call i64 @strlcpy(i8* %23, i8* %73, i32 %74)
store i64 %75, i64* %10
br label %99
76: ; preds = %53
%77 = load i8*, i8** %5
%78 = load i32, i32* @PATH_MAX
%79 = call i32* @getcwd(i8* %77, i32 %78)
%80 = icmp eq i32* %79, null
br i1 %80, label %81, label %93
81: ; preds = %76
%82 = load i32, i32* %13
%83 = icmp ne i32 %82, 0
br i1 %83, label %84, label %87
84: ; preds = %81
%85 = load i8*, i8** %5
%86 = call i32 @free(i8* %85)
br label %92
87: ; preds = %81
%88 = load i8*, i8** %5
%89 = getelementptr inbounds i8, i8* %88, i64 0
store i8 46, i8* %89
%90 = load i8*, i8** %5
%91 = getelementptr inbounds i8, i8* %90, i64 1
store i8 0, i8* %91
br label %92
92: ; preds = %87, %84
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
93: ; preds = %76
%94 = load i8*, i8** %5
%95 = call i64 @strlen(i8* %94)
store i64 %95, i64* %11
%96 = load i8*, i8** %4
%97 = trunc i64 %21 to i32
%98 = call i64 @strlcpy(i8* %23, i8* %96, i32 %97)
store i64 %98, i64* %10
br label %99
99: ; preds = %93, %71
%100 = load i64, i64* %10
%101 = icmp uge i64 %100, %21
br i1 %101, label %107, label %102
102: ; preds = %99
%103 = load i64, i64* %11
%104 = load i32, i32* @PATH_MAX
%105 = sext i32 %104 to i64
%106 = icmp uge i64 %103, %105
br i1 %106, label %107, label %115
107: ; preds = %102, %99
%108 = load i32, i32* %13
%109 = icmp ne i32 %108, 0
br i1 %109, label %110, label %113
110: ; preds = %107
%111 = load i8*, i8** %5
%112 = call i32 @free(i8* %111)
br label %113
113: ; preds = %110, %107
%114 = load i32, i32* @ENAMETOOLONG
store i32 %114, i32* @errno
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
115: ; preds = %102
br label %116
116: ; preds = %393, %253, %232, %228, %115
%117 = load i64, i64* %10
%118 = icmp ne i64 %117, 0
br i1 %118, label %119, label %394
119: ; preds = %116
%120 = call i8* @strchr(i8* %23, i8 signext 47)
store i8* %120, i8** %7
%121 = load i8*, i8** %7
%122 = icmp ne i8* %121, null
br i1 %122, label %123, label %125
123: ; preds = %119
%124 = load i8*, i8** %7
br label %128
125: ; preds = %119
%126 = load i64, i64* %10
%127 = getelementptr inbounds i8, i8* %23, i64 %126
br label %128
128: ; preds = %125, %123
%129 = phi i8* [ %124, %123 ], [ %127, %125 ]
store i8* %129, i8** %9
%130 = load i8*, i8** %9
%131 = ptrtoint i8* %130 to i64
%132 = ptrtoint i8* %23 to i64
%133 = sub i64 %131, %132
%134 = icmp uge i64 %133, %25
br i1 %134, label %135, label %143
135: ; preds = %128
%136 = load i32, i32* %13
%137 = icmp ne i32 %136, 0
br i1 %137, label %138, label %141
138: ; preds = %135
%139 = load i8*, i8** %5
%140 = call i32 @free(i8* %139)
br label %141
141: ; preds = %138, %135
%142 = load i32, i32* @ENAMETOOLONG
store i32 %142, i32* @errno
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
143: ; preds = %128
%144 = load i8*, i8** %9
%145 = ptrtoint i8* %144 to i64
%146 = ptrtoint i8* %23 to i64
%147 = sub i64 %145, %146
%148 = trunc i64 %147 to i32
%149 = call i32 @memcpy(i8* %26, i8* %23, i32 %148)
%150 = load i8*, i8** %9
%151 = ptrtoint i8* %150 to i64
%152 = ptrtoint i8* %23 to i64
%153 = sub i64 %151, %152
%154 = getelementptr inbounds i8, i8* %26, i64 %153
store i8 0, i8* %154
%155 = load i8*, i8** %9
%156 = ptrtoint i8* %155 to i64
%157 = ptrtoint i8* %23 to i64
%158 = sub i64 %156, %157
%159 = load i64, i64* %10
%160 = sub i64 %159, %158
store i64 %160, i64* %10
%161 = load i8*, i8** %7
%162 = icmp ne i8* %161, null
br i1 %162, label %163, label %169
163: ; preds = %143
%164 = load i8*, i8** %9
%165 = getelementptr inbounds i8, i8* %164, i64 1
%166 = load i64, i64* %10
%167 = add i64 %166, 1
%168 = call i32 @memmove(i8* %23, i8* %165, i64 %167)
br label %169
169: ; preds = %163, %143
%170 = load i8*, i8** %5
%171 = load i64, i64* %11
%172 = sub i64 %171, 1
%173 = getelementptr inbounds i8, i8* %170, i64 %172
%174 = load i8, i8* %173
%175 = sext i8 %174 to i32
%176 = icmp ne i32 %175, 47
br i1 %176, label %177, label %199
177: ; preds = %169
%178 = load i64, i64* %11
%179 = add i64 %178, 1
%180 = load i32, i32* @PATH_MAX
%181 = sext i32 %180 to i64
%182 = icmp uge i64 %179, %181
br i1 %182, label %183, label %191
183: ; preds = %177
%184 = load i32, i32* %13
%185 = icmp ne i32 %184, 0
br i1 %185, label %186, label %189
186: ; preds = %183
%187 = load i8*, i8** %5
%188 = call i32 @free(i8* %187)
br label %189
189: ; preds = %186, %183
%190 = load i32, i32* @ENAMETOOLONG
store i32 %190, i32* @errno
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
191: ; preds = %177
%192 = load i8*, i8** %5
%193 = load i64, i64* %11
%194 = add i64 %193, 1
store i64 %194, i64* %11
%195 = getelementptr inbounds i8, i8* %192, i64 %193
store i8 47, i8* %195
%196 = load i8*, i8** %5
%197 = load i64, i64* %11
%198 = getelementptr inbounds i8, i8* %196, i64 %197
store i8 0, i8* %198
br label %199
199: ; preds = %191, %169
%200 = getelementptr inbounds i8, i8* %26, i64 0
%201 = load i8, i8* %200
%202 = sext i8 %201 to i32
%203 = icmp eq i32 %202, 0
br i1 %203, label %204, label %229
204: ; preds = %199
%205 = load i8*, i8** %5
%206 = call i64 @lstat(i8* %205, %struct.stat* %6)
%207 = icmp ne i64 %206, 0
br i1 %207, label %208, label %215
208: ; preds = %204
%209 = load i32, i32* %13
%210 = icmp ne i32 %209, 0
br i1 %210, label %211, label %214
211: ; preds = %208
%212 = load i8*, i8** %5
%213 = call i32 @free(i8* %212)
br label %214
214: ; preds = %211, %208
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
215: ; preds = %204
%216 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%217 = load i32, i32* %216
%218 = call i32 @S_ISDIR(i32 %217)
%219 = icmp ne i32 %218, 0
br i1 %219, label %228, label %220
220: ; preds = %215
%221 = load i32, i32* %13
%222 = icmp ne i32 %221, 0
br i1 %222, label %223, label %226
223: ; preds = %220
%224 = load i8*, i8** %5
%225 = call i32 @free(i8* %224)
br label %226
226: ; preds = %223, %220
%227 = load i32, i32* @ENOTDIR
store i32 %227, i32* @errno
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
228: ; preds = %215
br label %116
229: ; preds = %199
%230 = call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%231 = icmp eq i64 %230, 0
br i1 %231, label %232, label %233
232: ; preds = %229
br label %116
233: ; preds = %229
%234 = call i64 @strcmp(i8* %26, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%235 = icmp eq i64 %234, 0
br i1 %235, label %236, label %254
236: ; preds = %233
%237 = load i64, i64* %11
%238 = icmp ugt i64 %237, 1
br i1 %238, label %239, label %253
239: ; preds = %236
%240 = load i8*, i8** %5
%241 = load i64, i64* %11
%242 = sub i64 %241, 1
%243 = getelementptr inbounds i8, i8* %240, i64 %242
store i8 0, i8* %243
%244 = load i8*, i8** %5
%245 = call i8* @strrchr(i8* %244, i8 signext 47)
%246 = getelementptr inbounds i8, i8* %245, i64 1
store i8* %246, i8** %8
%247 = load i8*, i8** %8
store i8 0, i8* %247
%248 = load i8*, i8** %8
%249 = load i8*, i8** %5
%250 = ptrtoint i8* %248 to i64
%251 = ptrtoint i8* %249 to i64
%252 = sub i64 %250, %251
store i64 %252, i64* %11
br label %253
253: ; preds = %239, %236
br label %116
254: ; preds = %233
br label %255
255: ; preds = %254
br label %256
256: ; preds = %255
%257 = load i8*, i8** %5
%258 = load i32, i32* @PATH_MAX
%259 = call i64 @strlcat(i8* %257, i8* %26, i32 %258)
store i64 %259, i64* %11
%260 = load i64, i64* %11
%261 = load i32, i32* @PATH_MAX
%262 = sext i32 %261 to i64
%263 = icmp uge i64 %260, %262
br i1 %263, label %264, label %272
264: ; preds = %256
%265 = load i32, i32* %13
%266 = icmp ne i32 %265, 0
br i1 %266, label %267, label %270
267: ; preds = %264
%268 = load i8*, i8** %5
%269 = call i32 @free(i8* %268)
br label %270
270: ; preds = %267, %264
%271 = load i32, i32* @ENAMETOOLONG
store i32 %271, i32* @errno
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
272: ; preds = %256
%273 = load i8*, i8** %5
%274 = call i64 @lstat(i8* %273, %struct.stat* %6)
%275 = icmp ne i64 %274, 0
br i1 %275, label %276, label %283
276: ; preds = %272
%277 = load i32, i32* %13
%278 = icmp ne i32 %277, 0
br i1 %278, label %279, label %282
279: ; preds = %276
%280 = load i8*, i8** %5
%281 = call i32 @free(i8* %280)
br label %282
282: ; preds = %279, %276
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
283: ; preds = %272
%284 = getelementptr inbounds %struct.stat, %struct.stat* %6, i32 0, i32 0
%285 = load i32, i32* %284
%286 = call i64 @S_ISLNK(i32 %285)
%287 = icmp ne i64 %286, 0
br i1 %287, label %288, label %393
288: ; preds = %283
%289 = load i32, i32* %12
%290 = add i32 %289, 1
store i32 %290, i32* %12
%291 = load i32, i32* @MAXSYMLINKS
%292 = icmp ugt i32 %289, %291
br i1 %292, label %293, label %301
293: ; preds = %288
%294 = load i32, i32* %13
%295 = icmp ne i32 %294, 0
br i1 %295, label %296, label %299
296: ; preds = %293
%297 = load i8*, i8** %5
%298 = call i32 @free(i8* %297)
br label %299
299: ; preds = %296, %293
%300 = load i32, i32* @ELOOP
store i32 %300, i32* @errno
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
301: ; preds = %288
%302 = load i8*, i8** %5
%303 = sub i64 %28, 1
%304 = trunc i64 %303 to i32
%305 = call i32 @readlink(i8* %302, i8* %29, i32 %304)
store i32 %305, i32* %14
%306 = load i32, i32* %14
%307 = icmp slt i32 %306, 0
br i1 %307, label %308, label %315
308: ; preds = %301
%309 = load i32, i32* %13
%310 = icmp ne i32 %309, 0
br i1 %310, label %311, label %314
311: ; preds = %308
%312 = load i8*, i8** %5
%313 = call i32 @free(i8* %312)
br label %314
314: ; preds = %311, %308
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
315: ; preds = %301
%316 = load i32, i32* %14
%317 = sext i32 %316 to i64
%318 = getelementptr inbounds i8, i8* %29, i64 %317
store i8 0, i8* %318
%319 = getelementptr inbounds i8, i8* %29, i64 0
%320 = load i8, i8* %319
%321 = sext i8 %320 to i32
%322 = icmp eq i32 %321, 47
br i1 %322, label %323, label %326
323: ; preds = %315
%324 = load i8*, i8** %5
%325 = getelementptr inbounds i8, i8* %324, i64 1
store i8 0, i8* %325
store i64 1, i64* %11
br label %344
326: ; preds = %315
%327 = load i64, i64* %11
%328 = icmp ugt i64 %327, 1
br i1 %328, label %329, label %343
329: ; preds = %326
%330 = load i8*, i8** %5
%331 = load i64, i64* %11
%332 = sub i64 %331, 1
%333 = getelementptr inbounds i8, i8* %330, i64 %332
store i8 0, i8* %333
%334 = load i8*, i8** %5
%335 = call i8* @strrchr(i8* %334, i8 signext 47)
%336 = getelementptr inbounds i8, i8* %335, i64 1
store i8* %336, i8** %8
%337 = load i8*, i8** %8
store i8 0, i8* %337
%338 = load i8*, i8** %8
%339 = load i8*, i8** %5
%340 = ptrtoint i8* %338 to i64
%341 = ptrtoint i8* %339 to i64
%342 = sub i64 %340, %341
store i64 %342, i64* %11
br label %343
343: ; preds = %329, %326
br label %344
344: ; preds = %343, %323
%345 = load i8*, i8** %7
%346 = icmp ne i8* %345, null
br i1 %346, label %347, label %390
347: ; preds = %344
%348 = load i32, i32* %14
%349 = sub nsw i32 %348, 1
%350 = sext i32 %349 to i64
%351 = getelementptr inbounds i8, i8* %29, i64 %350
%352 = load i8, i8* %351
%353 = sext i8 %352 to i32
%354 = icmp ne i32 %353, 47
br i1 %354, label %355, label %376
355: ; preds = %347
%356 = load i32, i32* %14
%357 = add nsw i32 %356, 1
%358 = sext i32 %357 to i64
%359 = icmp uge i64 %358, %28
br i1 %359, label %360, label %368
360: ; preds = %355
%361 = load i32, i32* %13
%362 = icmp ne i32 %361, 0
br i1 %362, label %363, label %366
363: ; preds = %360
%364 = load i8*, i8** %5
%365 = call i32 @free(i8* %364)
br label %366
366: ; preds = %363, %360
%367 = load i32, i32* @ENAMETOOLONG
store i32 %367, i32* @errno
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
368: ; preds = %355
%369 = load i32, i32* %14
%370 = sext i32 %369 to i64
%371 = getelementptr inbounds i8, i8* %29, i64 %370
store i8 47, i8* %371
%372 = load i32, i32* %14
%373 = add nsw i32 %372, 1
%374 = sext i32 %373 to i64
%375 = getelementptr inbounds i8, i8* %29, i64 %374
store i8 0, i8* %375
br label %376
376: ; preds = %368, %347
%377 = trunc i64 %28 to i32
%378 = call i64 @strlcat(i8* %29, i8* %23, i32 %377)
store i64 %378, i64* %10
%379 = load i64, i64* %10
%380 = icmp uge i64 %379, %21
br i1 %380, label %381, label %389
381: ; preds = %376
%382 = load i32, i32* %13
%383 = icmp ne i32 %382, 0
br i1 %383, label %384, label %387
384: ; preds = %381
%385 = load i8*, i8** %5
%386 = call i32 @free(i8* %385)
br label %387
387: ; preds = %384, %381
%388 = load i32, i32* @ENAMETOOLONG
store i32 %388, i32* @errno
store i8* null, i8** %3
store i32 1, i32* %19
br label %412
389: ; preds = %376
br label %390
390: ; preds = %389, %344
%391 = trunc i64 %21 to i32
%392 = call i64 @strlcpy(i8* %23, i8* %29, i32 %391)
store i64 %392, i64* %10
br label %393
393: ; preds = %390, %283
br label %116
394: ; preds = %116
%395 = load i64, i64* %11
%396 = icmp ugt i64 %395, 1
br i1 %396, label %397, label %410
397: ; preds = %394
%398 = load i8*, i8** %5
%399 = load i64, i64* %11
%400 = sub i64 %399, 1
%401 = getelementptr inbounds i8, i8* %398, i64 %400
%402 = load i8, i8* %401
%403 = sext i8 %402 to i32
%404 = icmp eq i32 %403, 47
br i1 %404, label %405, label %410
405: ; preds = %397
%406 = load i8*, i8** %5
%407 = load i64, i64* %11
%408 = sub i64 %407, 1
%409 = getelementptr inbounds i8, i8* %406, i64 %408
store i8 0, i8* %409
br label %410
410: ; preds = %405, %397, %394
%411 = load i8*, i8** %5
store i8* %411, i8** %3
store i32 1, i32* %19
br label %412
412: ; preds = %410, %387, %366, %314, %299, %282, %270, %226, %214, %189, %141, %113, %92, %69, %50, %40, %32
%413 = load i8*, i8** %15
%414 = load i8*, i8** %3
ret i8* %414
}

LLVM IR (-O2):
%struct.stat = type { i32 }
@PATH_MAX = global i32 0
@EINVAL = global i32 0
@errno = global i32 0
@ENOENT = global i32 0
@ENAMETOOLONG = global i32 0
@ENOTDIR = global i32 0
@.str = [2 x i8] c".\00"
@.str.1 = [3 x i8] c"..\00"
@MAXSYMLINKS = global i32 0
@ELOOP = global i32 0
define i8* @realpath(i8* noalias %0, i8* noalias %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = load i32, i32* @PATH_MAX
%6 = zext i32 %5 to i64
%7 = tail call i8* @llvm.stacksave()
%8 = alloca i8, i64 %6
%9 = load i32, i32* @PATH_MAX
%10 = zext i32 %9 to i64
%11 = alloca i8, i64 %10
%12 = alloca i8, i64 %10
%13 = icmp eq i8* %0, null
br i1 %13, label %14, label %16
14: ; preds = %2
%15 = load i32, i32* @EINVAL
store i32 %15, i32* @errno
br label %243
16: ; preds = %2
%17 = load i8, i8* %0
%18 = icmp eq i8 %17, 0
br i1 %18, label %19, label %21
19: ; preds = %16
%20 = load i32, i32* @ENOENT
store i32 %20, i32* @errno
br label %243
21: ; preds = %16
%22 = icmp eq i8* %1, null
br i1 %22, label %23, label %26
23: ; preds = %21
%24 = tail call i8* @malloc(i32 %9)
%25 = icmp eq i8* %24, null
br i1 %25, label %243, label %26
26: ; preds = %21, %23
%27 = phi i8* [ %24, %23 ], [ %1, %21 ]
%28 = icmp eq i8 %17, 47
br i1 %28, label %29, label %34
29: ; preds = %26
store i8 47, i8* %27
%30 = getelementptr inbounds i8, i8* %27, i64 1
store i8 0, i8* %30
%31 = getelementptr inbounds i8, i8* %0, i64 1
%32 = load i8, i8* %31
%33 = icmp eq i8 %32, 0
br i1 %33, label %243, label %44
34: ; preds = %26
%35 = tail call i32* @getcwd(i8* %27, i32 %9)
%36 = icmp eq i32* %35, null
br i1 %36, label %37, label %42
37: ; preds = %34
br i1 %22, label %38, label %40
38: ; preds = %37
%39 = tail call i32 @free(i8* %27)
br label %243
40: ; preds = %37
store i8 46, i8* %27
%41 = getelementptr inbounds i8, i8* %27, i64 1
store i8 0, i8* %41
br label %243
42: ; preds = %34
%43 = tail call i64 @strlen(i8* %27)
br label %44
44: ; preds = %29, %42
%45 = phi i8* [ %0, %42 ], [ %31, %29 ]
%46 = phi i64 [ %43, %42 ], [ 1, %29 ]
%47 = call i64 @strlcpy(i8* %8, i8* %45, i32 %5)
%48 = icmp ult i64 %47, %6
%49 = load i32, i32* @PATH_MAX
%50 = sext i32 %49 to i64
%51 = icmp ult i64 %46, %50
%52 = select i1 %48, i1 %51, i1 false
br i1 %52, label %53, label %61
53: ; preds = %44
%54 = icmp eq i64 %47, 0
br i1 %54, label %234, label %55
55: ; preds = %53
%56 = ptrtoint i8* %8 to i64
%57 = ptrtoint i8* %27 to i64
%58 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%59 = add i32 %9, -1
%60 = getelementptr inbounds i8, i8* %27, i64 1
br label %230
61: ; preds = %44
br i1 %22, label %62, label %64
62: ; preds = %61
%63 = call i32 @free(i8* %27)
br label %64
64: ; preds = %62, %61
%65 = load i32, i32* @ENAMETOOLONG
store i32 %65, i32* @errno
br label %243
66: ; preds = %230, %142
%67 = phi i64 [ %231, %230 ], [ %85, %142 ]
%68 = phi i64 [ %232, %230 ], [ %143, %142 ]
%69 = call i8* @strchr(i8* %8, i8 signext 47)
%70 = icmp eq i8* %69, null
%71 = getelementptr inbounds i8, i8* %8, i64 %67
%72 = select i1 %70, i8* %71, i8* %69
%73 = ptrtoint i8* %72 to i64
%74 = sub i64 %73, %56
%75 = icmp ult i64 %74, %10
br i1 %75, label %81, label %76
76: ; preds = %66
br i1 %22, label %77, label %79
77: ; preds = %76
%78 = call i32 @free(i8* %27)
br label %79
79: ; preds = %77, %76
%80 = load i32, i32* @ENAMETOOLONG
store i32 %80, i32* @errno
br label %243
81: ; preds = %66
%82 = trunc i64 %74 to i32
%83 = call i32 @memcpy(i8* %11, i8* %8, i32 %82)
%84 = getelementptr inbounds i8, i8* %11, i64 %74
store i8 0, i8* %84
%85 = sub i64 %67, %74
br i1 %70, label %90, label %86
86: ; preds = %81
%87 = getelementptr inbounds i8, i8* %72, i64 1
%88 = add i64 %85, 1
%89 = call i32 @memmove(i8* %8, i8* %87, i64 %88)
br label %90
90: ; preds = %86, %81
%91 = add i64 %68, -1
%92 = getelementptr inbounds i8, i8* %27, i64 %91
%93 = load i8, i8* %92
%94 = icmp eq i8 %93, 47
br i1 %94, label %108, label %95
95: ; preds = %90
%96 = add i64 %68, 1
%97 = load i32, i32* @PATH_MAX
%98 = sext i32 %97 to i64
%99 = icmp ult i64 %96, %98
br i1 %99, label %105, label %100
100: ; preds = %95
br i1 %22, label %101, label %103
101: ; preds = %100
%102 = call i32 @free(i8* %27)
br label %103
103: ; preds = %101, %100
%104 = load i32, i32* @ENAMETOOLONG
store i32 %104, i32* @errno
br label %243
105: ; preds = %95
%106 = getelementptr inbounds i8, i8* %27, i64 %68
store i8 47, i8* %106
%107 = getelementptr inbounds i8, i8* %27, i64 %96
store i8 0, i8* %107
br label %108
108: ; preds = %105, %90
%109 = phi i64 [ %96, %105 ], [ %68, %90 ]
%110 = load i8, i8* %11
%111 = icmp eq i8 %110, 0
br i1 %111, label %112, label %127
112: ; preds = %108
%113 = call i64 @lstat(i8* %27, %struct.stat* %3)
%114 = icmp eq i64 %113, 0
br i1 %114, label %118, label %115
115: ; preds = %112
br i1 %22, label %116, label %243
116: ; preds = %115
%117 = call i32 @free(i8* %27)
br label %243
118: ; preds = %112
%119 = load i32, i32* %58
%120 = call i32 @S_ISDIR(i32 %119)
%121 = icmp eq i32 %120, 0
br i1 %121, label %122, label %142
122: ; preds = %118
br i1 %22, label %123, label %125
123: ; preds = %122
%124 = call i32 @free(i8* %27)
br label %125
125: ; preds = %123, %122
%126 = load i32, i32* @ENOTDIR
store i32 %126, i32* @errno
br label %243
127: ; preds = %108
%128 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([2 x i8], [2 x i8]* @.str, i64 0, i64 0))
%129 = icmp eq i64 %128, 0
br i1 %129, label %142, label %130
130: ; preds = %127
%131 = call i64 @strcmp(i8* %11, i8* getelementptr inbounds ([3 x i8], [3 x i8]* @.str.1, i64 0, i64 0))
%132 = icmp eq i64 %131, 0
br i1 %132, label %133, label %145
133: ; preds = %130
%134 = icmp ugt i64 %109, 1
br i1 %134, label %135, label %142
135: ; preds = %133
%136 = add i64 %109, -1
%137 = getelementptr inbounds i8, i8* %27, i64 %136
store i8 0, i8* %137
%138 = call i8* @strrchr(i8* %27, i8 signext 47)
%139 = getelementptr inbounds i8, i8* %138, i64 1
store i8 0, i8* %139
%140 = ptrtoint i8* %139 to i64
%141 = sub i64 %140, %57
br label %142
142: ; preds = %133, %135, %118, %127
%143 = phi i64 [ %109, %118 ], [ %109, %127 ], [ %141, %135 ], [ %109, %133 ]
%144 = icmp eq i64 %85, 0
br i1 %144, label %234, label %66
145: ; preds = %130
%146 = load i32, i32* @PATH_MAX
%147 = call i64 @strlcat(i8* %27, i8* %11, i32 %146)
%148 = load i32, i32* @PATH_MAX
%149 = sext i32 %148 to i64
%150 = icmp ult i64 %147, %149
br i1 %150, label %156, label %151
151: ; preds = %145
br i1 %22, label %152, label %154
152: ; preds = %151
%153 = call i32 @free(i8* %27)
br label %154
154: ; preds = %152, %151
%155 = load i32, i32* @ENAMETOOLONG
store i32 %155, i32* @errno
br label %243
156: ; preds = %145
%157 = call i64 @lstat(i8* %27, %struct.stat* %3)
%158 = icmp eq i64 %157, 0
br i1 %158, label %162, label %159
159: ; preds = %156
br i1 %22, label %160, label %243
160: ; preds = %159
%161 = call i32 @free(i8* %27)
br label %243
162: ; preds = %156
%163 = load i32, i32* %58
%164 = call i64 @S_ISLNK(i32 %163)
%165 = icmp eq i64 %164, 0
br i1 %165, label %225, label %166
166: ; preds = %162
%167 = add i32 %233, 1
%168 = load i32, i32* @MAXSYMLINKS
%169 = icmp ugt i32 %233, %168
br i1 %169, label %170, label %175
170: ; preds = %166
br i1 %22, label %171, label %173
171: ; preds = %170
%172 = call i32 @free(i8* %27)
br label %173
173: ; preds = %171, %170
%174 = load i32, i32* @ELOOP
store i32 %174, i32* @errno
br label %243
175: ; preds = %166
%176 = call i32 @readlink(i8* %27, i8* %12, i32 %59)
%177 = icmp slt i32 %176, 0
br i1 %177, label %178, label %181
178: ; preds = %175
br i1 %22, label %179, label %243
179: ; preds = %178
%180 = call i32 @free(i8* %27)
br label %243
181: ; preds = %175
%182 = zext i32 %176 to i64
%183 = getelementptr inbounds i8, i8* %12, i64 %182
store i8 0, i8* %183
%184 = load i8, i8* %12
%185 = icmp eq i8 %184, 47
br i1 %185, label %186, label %187
186: ; preds = %181
store i8 0, i8* %60
br label %196
187: ; preds = %181
%188 = icmp ugt i64 %147, 1
br i1 %188, label %189, label %196
189: ; preds = %187
%190 = add i64 %147, -1
%191 = getelementptr inbounds i8, i8* %27, i64 %190
store i8 0, i8* %191
%192 = call i8* @strrchr(i8* %27, i8 signext 47)
%193 = getelementptr inbounds i8, i8* %192, i64 1
store i8 0, i8* %193
%194 = ptrtoint i8* %193 to i64
%195 = sub i64 %194, %57
br label %196
196: ; preds = %187, %189, %186
%197 = phi i64 [ 1, %186 ], [ %195, %189 ], [ %147, %187 ]
br i1 %70, label %223, label %198
198: ; preds = %196
%199 = add nsw i32 %176, -1
%200 = sext i32 %199 to i64
%201 = getelementptr inbounds i8, i8* %12, i64 %200
%202 = load i8, i8* %201
%203 = icmp eq i8 %202, 47
br i1 %203, label %215, label %204
204: ; preds = %198
%205 = add nuw nsw i32 %176, 1
%206 = icmp ult i32 %205, %9
br i1 %206, label %212, label %207
207: ; preds = %204
br i1 %22, label %208, label %210
208: ; preds = %207
%209 = call i32 @free(i8* %27)
br label %210
210: ; preds = %208, %207
%211 = load i32, i32* @ENAMETOOLONG
store i32 %211, i32* @errno
br label %243
212: ; preds = %204
%213 = zext i32 %205 to i64
store i8 47, i8* %183
%214 = getelementptr inbounds i8, i8* %12, i64 %213
store i8 0, i8* %214
br label %215
215: ; preds = %212, %198
%216 = call i64 @strlcat(i8* %12, i8* %8, i32 %9)
%217 = icmp ult i64 %216, %6
br i1 %217, label %223, label %218
218: ; preds = %215
br i1 %22, label %219, label %221
219: ; preds = %218
%220 = call i32 @free(i8* %27)
br label %221
221: ; preds = %219, %218
%222 = load i32, i32* @ENAMETOOLONG
store i32 %222, i32* @errno
br label %243
223: ; preds = %215, %196
%224 = call i64 @strlcpy(i8* %8, i8* %12, i32 %5)
br label %225
225: ; preds = %223, %162
%226 = phi i32 [ %167, %223 ], [ %233, %162 ]
%227 = phi i64 [ %197, %223 ], [ %147, %162 ]
%228 = phi i64 [ %224, %223 ], [ %85, %162 ]
%229 = icmp eq i64 %228, 0
br i1 %229, label %234, label %230
230: ; preds = %55, %225
%231 = phi i64 [ %47, %55 ], [ %228, %225 ]
%232 = phi i64 [ %46, %55 ], [ %227, %225 ]
%233 = phi i32 [ 0, %55 ], [ %226, %225 ]
br label %66
234: ; preds = %225, %142, %53
%235 = phi i64 [ %46, %53 ], [ %143, %142 ], [ %227, %225 ]
%236 = icmp ugt i64 %235, 1
br i1 %236, label %237, label %243
237: ; preds = %234
%238 = add i64 %235, -1
%239 = getelementptr inbounds i8, i8* %27, i64 %238
%240 = load i8, i8* %239
%241 = icmp eq i8 %240, 47
br i1 %241, label %242, label %243
242: ; preds = %237
store i8 0, i8* %239
br label %243
243: ; preds = %234, %237, %242, %178, %179, %159, %160, %115, %116, %38, %40, %29, %23, %221, %210, %173, %154, %125, %103, %79, %64, %19, %14
%244 = phi i8* [ null, %14 ], [ null, %19 ], [ null, %64 ], [ null, %79 ], [ null, %103 ], [ null, %125 ], [ null, %154 ], [ null, %173 ], [ null, %210 ], [ null, %221 ], [ null, %23 ], [ %27, %29 ], [ null, %40 ], [ null, %38 ], [ null, %116 ], [ null, %115 ], [ null, %160 ], [ null, %159 ], [ null, %179 ], [ null, %178 ], [ %27, %242 ], [ %27, %237 ], [ %27, %234 ]
ret i8* %244
}