#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*/ wbuf;
struct stat {
  int /*<<< orphan*/ st_mode;
};
typedef size_t ssize_t;

/* Variables and functions */
int /*<<< orphan*/ EINVAL;
int /*<<< orphan*/ ELOOP;
int /*<<< orphan*/ ENAMETOOLONG;
int /*<<< orphan*/ ENOENT;
int /*<<< orphan*/ ENOTDIR;
int MAXPATHLEN;
int /*<<< orphan*/ MAXSYMLINKS;
int /*<<< orphan*/ S_ISDIR(int /*<<< orphan*/);
scalar_t__ S_ISLNK(int /*<<< orphan*/);
int /*<<< orphan*/ errno;
int /*<<< orphan*/ free(char *);
int /*<<< orphan*/ *getcwd(char *, int);
int lstat(char *, struct stat *);
char *malloc(int);
int /*<<< orphan*/ memcpy(char *, char const *, size_t);
size_t readlink(char *, char *, int);
size_t strlen(char const *);
char *realpath(const char *path, char *resolved) {
  struct stat sb;
  int idx = 0, nlnk = 0;
  const char *q;
  char *p, wbuf[2][MAXPATHLEN], *fres;
  size_t len;
  ssize_t n;
  if (path == NULL) {
    errno = EINVAL;
    return NULL;
  }
  if (resolved == NULL) {
    fres = resolved = malloc(MAXPATHLEN);
    if (resolved == NULL)
      return NULL;
  } else
    fres = NULL;
  p = resolved;
  if (*path == '\0') {
    *p = '\0';
    errno = ENOENT;
    goto out;
  }
  if (*path != '/') {
    if (resolved && getcwd(resolved, MAXPATHLEN) == NULL) {
      p[0] = '.';
      p[1] = '\0';
      goto out;
    }
    len = strlen(resolved);
    if (len > 1)
      p += len;
  }
loop:
  while (*path == '/')
    path++;
  if (*path == '\0') {
    if (p == resolved)
      *p++ = '/';
    *p = '\0';
    return resolved;
  }
  q = path;
  do
    q++;
  while (*q != '/' && *q != '\0');
  if (path[0] == '.') {
    if (q - path == 1) {
      path = q;
      goto loop;
    }
    if (path[1] == '.' && q - path == 2) {
      if (p != resolved)
        while (*--p != '/')
          continue;
      path = q;
      goto loop;
    }
  }
  if (p - resolved + 1 + q - path + 1 > MAXPATHLEN) {
    errno = ENAMETOOLONG;
    if (p == resolved)
      *p++ = '/';
    *p = '\0';
    goto out;
  }
  p[0] = '/';
  memcpy(&p[1], path, q - path);
  p[1 + q - path] = '\0';
  if (lstat(resolved, &sb) == -1)
    goto out;
  if (S_ISLNK(sb.st_mode)) {
    if (nlnk++ >= MAXSYMLINKS) {
      errno = ELOOP;
      goto out;
    }
    n = readlink(resolved, wbuf[idx], sizeof(wbuf[0]) - 1);
    if (n < 0)
      goto out;
    if (n == 0) {
      errno = ENOENT;
      goto out;
    }
    if (n + (len = strlen(q)) + 1 > sizeof(wbuf[0])) {
      errno = ENAMETOOLONG;
      goto out;
    }
    memcpy(&wbuf[idx][n], q, len + 1);
    path = wbuf[idx];
    idx ^= 1;
    if (*path == '/')
      p = resolved;
    goto loop;
  }
  if (*q == '/' && !S_ISDIR(sb.st_mode)) {
    errno = ENOTDIR;
    goto out;
  }
  p += 1 + q - path;
  path = q;
  goto loop;
out:
  free(fres);
  return NULL;
}


x86 assembly (clang, -O0):
<realpath>:
push   %rbp
mov    %rsp,%rbp
sub    $0x90,%rsp
mov    %rdi,-0x10(%rbp)
mov    %rsi,-0x18(%rbp)
movl   $0x0,-0x24(%rbp)
movl   $0x0,-0x28(%rbp)
mov    0x2e20(%rip),%rax
mov    (%rax),%eax
mov    %rax,-0x78(%rbp)
mov    %rsp,%rcx
mov    %rcx,-0x40(%rbp)
lea    0xf(%rax,%rax,1),%rdx
and    $0xfffffffffffffff0,%rdx
mov    %rsp,%rcx
sub    %rdx,%rcx
mov    %rcx,-0x70(%rbp)
mov    %rcx,%rsp
mov    %rax,-0x48(%rbp)
cmpq   $0x0,-0x10(%rbp)
jne    1210 <realpath+0x80>
mov    0x2dc7(%rip),%rax
mov    (%rax),%ecx
mov    0x2dc6(%rip),%rax
mov    %ecx,(%rax)
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    16e9 <realpath+0x559>
cmpq   $0x0,-0x18(%rbp)
jne    1255 <realpath+0xc5>
mov    0x2db6(%rip),%rax
mov    (%rax),%edi
call   10b0 <malloc@plt>
mov    %rax,-0x18(%rbp)
mov    %rax,-0x50(%rbp)
cmpq   $0x0,-0x18(%rbp)
jne    1250 <realpath+0xc0>
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    16e9 <realpath+0x559>
jmp    125d <realpath+0xcd>
movq   $0x0,-0x50(%rbp)
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    1293 <realpath+0x103>
mov    -0x38(%rbp),%rax
movb   $0x0,(%rax)
mov    0x2d1d(%rip),%rax
mov    (%rax),%ecx
mov    0x2d34(%rip),%rax
mov    %ecx,(%rax)
jmp    16d1 <realpath+0x541>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
je     1307 <realpath+0x177>
cmpq   $0x0,-0x18(%rbp)
je     12de <realpath+0x14e>
mov    -0x18(%rbp),%rdi
mov    0x2d1f(%rip),%rax
mov    (%rax),%esi
call   1080 <getcwd@plt>
cmp    $0x0,%rax
jne    12de <realpath+0x14e>
mov    -0x38(%rbp),%rax
movb   $0x2e,(%rax)
mov    -0x38(%rbp),%rax
movb   $0x0,0x1(%rax)
jmp    16d1 <realpath+0x541>
mov    -0x18(%rbp),%rdi
call   1060 <strlen@plt>
mov    %rax,-0x58(%rbp)
cmpq   $0x1,-0x58(%rbp)
jbe    1302 <realpath+0x172>
mov    -0x58(%rbp),%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    1307 <realpath+0x177>
jmp    130c <realpath+0x17c>
jmp    1311 <realpath+0x181>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1332 <realpath+0x1a2>
mov    -0x10(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x10(%rbp)
jmp    1311 <realpath+0x181>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
jne    137d <realpath+0x1ed>
mov    -0x38(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    1362 <realpath+0x1d2>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x38(%rbp)
movb   $0x2f,(%rax)
mov    -0x38(%rbp),%rax
movb   $0x0,(%rax)
mov    -0x18(%rbp),%rax
mov    %rax,-0x8(%rbp)
movl   $0x1,-0x64(%rbp)
jmp    16e9 <realpath+0x559>
mov    -0x10(%rbp),%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    %rax,-0x30(%rbp)
mov    -0x30(%rbp),%rax
movsbl (%rax),%ecx
xor    %eax,%eax
cmp    $0x2f,%ecx
mov    %al,-0x79(%rbp)
je     13b6 <realpath+0x226>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x0,%eax
setne  %al
mov    %al,-0x79(%rbp)
mov    -0x79(%rbp),%al
test   $0x1,%al
jne    1385 <realpath+0x1f5>
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2e,%eax
jne    1464 <realpath+0x2d4>
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x1,%rax
jne    13f3 <realpath+0x263>
mov    -0x30(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    130c <realpath+0x17c>
mov    -0x10(%rbp),%rax
movsbl 0x1(%rax),%eax
cmp    $0x2e,%eax
jne    145f <realpath+0x2cf>
mov    -0x30(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
cmp    $0x2,%rax
jne    145f <realpath+0x2cf>
mov    -0x38(%rbp),%rax
cmp    -0x18(%rbp),%rax
je     1452 <realpath+0x2c2>
jmp    142c <realpath+0x29c>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0xffffffffffffffff,%rcx
mov    %rcx,-0x38(%rbp)
movsbl -0x1(%rax),%eax
cmp    $0x2f,%eax
je     144d <realpath+0x2bd>
jmp    142c <realpath+0x29c>
jmp    1452 <realpath+0x2c2>
mov    -0x30(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    130c <realpath+0x17c>
jmp    1464 <realpath+0x2d4>
mov    -0x38(%rbp),%rax
mov    -0x18(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
add    -0x30(%rbp),%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
add    $0x1,%rax
mov    0x2b4f(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%rax
jle    14d3 <realpath+0x343>
mov    0x2b14(%rip),%rax
mov    (%rax),%ecx
mov    0x2b1b(%rip),%rax
mov    %ecx,(%rax)
mov    -0x38(%rbp),%rax
cmp    -0x18(%rbp),%rax
jne    14c7 <realpath+0x337>
mov    -0x38(%rbp),%rax
mov    %rax,%rcx
add    $0x1,%rcx
mov    %rcx,-0x38(%rbp)
movb   $0x2f,(%rax)
mov    -0x38(%rbp),%rax
movb   $0x0,(%rax)
jmp    16d1 <realpath+0x541>
mov    -0x38(%rbp),%rax
movb   $0x2f,(%rax)
mov    -0x38(%rbp),%rdi
add    $0x1,%rdi
mov    -0x10(%rbp),%rsi
mov    -0x30(%rbp),%rdx
mov    -0x10(%rbp),%rax
sub    %rax,%rdx
call   10a0 <memcpy@plt>
mov    -0x38(%rbp),%rax
mov    -0x30(%rbp),%rcx
add    $0x1,%rcx
mov    -0x10(%rbp),%rdx
sub    %rdx,%rcx
movb   $0x0,(%rax,%rcx,1)
mov    -0x18(%rbp),%rdi
lea    -0x20(%rbp),%rsi
call   1090 <lstat@plt>
cmp    $0xffffffff,%eax
jne    1528 <realpath+0x398>
jmp    16d1 <realpath+0x541>
mov    -0x20(%rbp),%edi
call   1040 <S_ISLNK@plt>
cmp    $0x0,%rax
je     1675 <realpath+0x4e5>
mov    -0x28(%rbp),%eax
mov    %eax,%ecx
add    $0x1,%ecx
mov    %ecx,-0x28(%rbp)
mov    0x2a94(%rip),%rcx
cmp    (%rcx),%eax
jl     156b <realpath+0x3db>
mov    0x2a75(%rip),%rax
mov    (%rax),%ecx
mov    0x2a5c(%rip),%rax
mov    %ecx,(%rax)
jmp    16d1 <realpath+0x541>
mov    -0x78(%rbp),%rax
mov    -0x70(%rbp),%rsi
mov    -0x18(%rbp),%rdi
movslq -0x24(%rbp),%rcx
imul   %rax,%rcx
add    %rcx,%rsi
sub    $0x1,%rax
mov    %eax,%edx
call   1050 <readlink@plt>
mov    %rax,-0x60(%rbp)
cmpq   $0x0,-0x60(%rbp)
jae    15a1 <realpath+0x411>
jmp    16d1 <realpath+0x541>
cmpq   $0x0,-0x60(%rbp)
jne    15c3 <realpath+0x433>
mov    0x29ed(%rip),%rax
mov    (%rax),%ecx
mov    0x2a04(%rip),%rax
mov    %ecx,(%rax)
jmp    16d1 <realpath+0x541>
mov    -0x60(%rbp),%rax
mov    %rax,-0x88(%rbp)
mov    -0x30(%rbp),%rdi
call   1060 <strlen@plt>
mov    -0x78(%rbp),%rcx
mov    %rax,%rdx
mov    -0x88(%rbp),%rax
mov    %rdx,-0x58(%rbp)
add    %rdx,%rax
add    $0x1,%rax
cmp    %rcx,%rax
jbe    1610 <realpath+0x480>
mov    0x29b0(%rip),%rax
mov    (%rax),%ecx
mov    0x29b7(%rip),%rax
mov    %ecx,(%rax)
jmp    16d1 <realpath+0x541>
mov    -0x70(%rbp),%rdi
mov    -0x78(%rbp),%rcx
movslq -0x24(%rbp),%rax
imul   %rcx,%rax
add    %rax,%rdi
add    -0x60(%rbp),%rdi
mov    -0x30(%rbp),%rsi
mov    -0x58(%rbp),%rdx
add    $0x1,%rdx
call   10a0 <memcpy@plt>
mov    -0x78(%rbp),%rdx
mov    -0x70(%rbp),%rax
movslq -0x24(%rbp),%rcx
imul   %rdx,%rcx
add    %rcx,%rax
mov    %rax,-0x10(%rbp)
mov    -0x24(%rbp),%eax
xor    $0x1,%eax
mov    %eax,-0x24(%rbp)
mov    -0x10(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    1670 <realpath+0x4e0>
mov    -0x18(%rbp),%rax
mov    %rax,-0x38(%rbp)
jmp    130c <realpath+0x17c>
mov    -0x30(%rbp),%rax
movsbl (%rax),%eax
cmp    $0x2f,%eax
jne    16ad <realpath+0x51d>
mov    -0x20(%rbp),%edi
call   1070 <S_ISDIR@plt>
cmp    $0x0,%eax
jne    16ad <realpath+0x51d>
mov    0x295b(%rip),%rax
mov    (%rax),%ecx
mov    0x291a(%rip),%rax
mov    %ecx,(%rax)
jmp    16d1 <realpath+0x541>
mov    -0x30(%rbp),%rax
add    $0x1,%rax
mov    -0x10(%rbp),%rcx
sub    %rcx,%rax
add    -0x38(%rbp),%rax
mov    %rax,-0x38(%rbp)
mov    -0x30(%rbp),%rax
mov    %rax,-0x10(%rbp)
jmp    130c <realpath+0x17c>
mov    -0x50(%rbp),%rdi
call   1030 <free@plt>
movq   $0x0,-0x8(%rbp)
movl   $0x1,-0x64(%rbp)
mov    -0x40(%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    $0x58,%rsp
mov    %rsp,%rdx
mov    0x2e2d(%rip),%r12
mov    (%r12),%ebx
mov    %rsp,%rcx
lea    (%rbx,%rbx,1),%rax
add    $0xf,%rax
and    $0xfffffffffffffff0,%rax
sub    %rax,%rcx
mov    %rcx,%rsp
test   %rdi,%rdi
je     11dc <realpath+0x4c>
mov    %rsi,%r13
mov    %rdi,%r15
mov    %rcx,-0x68(%rbp)
test   %rsi,%rsi
je     11f5 <realpath+0x65>
xor    %eax,%eax
jmp    1210 <realpath+0x80>
mov    0x2dd5(%rip),%rax
mov    (%rax),%eax
mov    0x2dd4(%rip),%rcx
mov    %eax,(%rcx)
xor    %eax,%eax
jmp    146a <realpath+0x2da>
mov    (%r12),%edi
mov    %rdx,%r14
call   10b0 <malloc@plt>
mov    %r14,%rdx
mov    %rax,%r13
test   %rax,%rax
je     1450 <realpath+0x2c0>
mov    %rbx,-0x60(%rbp)
mov    %rax,-0x78(%rbp)
mov    (%r15),%al
mov    %r13,%r14
cmp    $0x2f,%al
mov    %rdx,-0x40(%rbp)
je     1275 <realpath+0xe5>
test   %al,%al
jne    1246 <realpath+0xb6>
movb   $0x0,0x0(%r13)
mov    0x2d6a(%rip),%rax
mov    (%rax),%eax
mov    0x2d81(%rip),%rcx
mov    %eax,(%rcx)
jmp    145b <realpath+0x2cb>
mov    (%r12),%esi
mov    %r13,%rdi
call   1080 <getcwd@plt>
test   %rax,%rax
je     1454 <realpath+0x2c4>
mov    %r13,%rdi
call   1060 <strlen@plt>
xor    %r14d,%r14d
cmp    $0x2,%rax
cmovae %rax,%r14
add    %r13,%r14
mov    -0x40(%rbp),%rdx
mov    $0x1,%eax
mov    %r13,-0x30(%rbp)
sub    %r13,%rax
mov    %rax,-0x70(%rbp)
mov    -0x60(%rbp),%rax
add    $0xffffffff,%eax
mov    %eax,-0x54(%rbp)
xor    %eax,%eax
mov    %rax,-0x48(%rbp)
movl   $0x0,-0x34(%rbp)
mov    %r15,%rbx
jmp    12b4 <realpath+0x124>
cs nopw 0x0(%rax,%rax,1)
nopl   0x0(%rax,%rax,1)
add    $0x1,%rbx
mov    %rbx,%rax
mov    %rax,%rbx
mov    (%rax),%al
cmp    $0x2f,%al
je     12b0 <realpath+0x120>
test   %al,%al
je     143a <realpath+0x2aa>
xor    %r12d,%r12d
nopl   0x0(%rax,%rax,1)
movzbl 0x1(%rbx,%r12,1),%ecx
add    $0x1,%r12
cmp    $0x2f,%cl
je     12e3 <realpath+0x153>
test   %cl,%cl
jne    12d0 <realpath+0x140>
cmp    $0x2e,%al
jne    1320 <realpath+0x190>
lea    (%rbx,%r12,1),%rax
cmp    $0x1,%r12
je     12b7 <realpath+0x127>
cmp    $0x2,%r12
jne    1320 <realpath+0x190>
cmpb   $0x2e,0x1(%rbx)
jne    1320 <realpath+0x190>
mov    -0x30(%rbp),%rax
mov    %rax,%r13
cmp    %rax,%r14
je     139c <realpath+0x20c>
nopl   (%rax)
lea    -0x1(%r14),%r13
cmpb   $0x2f,-0x1(%r14)
mov    %r13,%r14
jne    1310 <realpath+0x180>
jmp    139c <realpath+0x20c>
mov    -0x70(%rbp),%rax
add    %r14,%rax
add    %r12,%rax
mov    0x2ca7(%rip),%rcx
movslq (%rcx),%rcx
cmp    %rcx,%rax
jge    147c <realpath+0x2ec>
movb   $0x2f,(%r14)
lea    0x1(%r14),%rdi
mov    %rbx,%rsi
mov    %r12,%rdx
call   10a0 <memcpy@plt>
movb   $0x0,0x1(%r14,%r12,1)
mov    -0x30(%rbp),%rdi
lea    -0x50(%rbp),%rsi
call   1090 <lstat@plt>
cmp    $0xffffffff,%eax
je     145b <realpath+0x2cb>
mov    -0x50(%rbp),%r15d
mov    %r15d,%edi
call   1040 <S_ISLNK@plt>
test   %rax,%rax
jne    13ab <realpath+0x21b>
lea    (%r14,%r12,1),%r13
add    $0x1,%r13
cmpb   $0x2f,(%rbx,%r12,1)
jne    139c <realpath+0x20c>
mov    %r15d,%edi
call   1070 <S_ISDIR@plt>
test   %eax,%eax
je     14a7 <realpath+0x317>
add    %r12,%rbx
mov    %r13,%r14
mov    -0x40(%rbp),%rdx
jmp    12b4 <realpath+0x124>
mov    0x2c2e(%rip),%rax
mov    -0x34(%rbp),%ecx
cmp    (%rax),%ecx
jge    14b3 <realpath+0x323>
movslq -0x48(%rbp),%r15
mov    -0x60(%rbp),%r13
imul   %r13,%r15
add    -0x68(%rbp),%r15
mov    -0x30(%rbp),%rdi
mov    %r15,%rsi
mov    -0x54(%rbp),%edx
call   1050 <readlink@plt>
test   %rax,%rax
je     122f <realpath+0x9f>
add    %r12,%rbx
mov    %rax,%r12
mov    %rbx,%rdi
call   1060 <strlen@plt>
lea    (%rax,%r12,1),%rcx
add    $0x1,%rcx
cmp    %r13,%rcx
ja     14bf <realpath+0x32f>
mov    %r12,%rdi
addl   $0x1,-0x34(%rbp)
add    $0x1,%rax
add    %r15,%rdi
mov    %rbx,%rsi
mov    %rax,%rdx
call   10a0 <memcpy@plt>
mov    -0x48(%rbp),%rax
xor    $0x1,%eax
mov    %rax,-0x48(%rbp)
cmpb   $0x2f,(%r15)
cmove  -0x30(%rbp),%r14
mov    -0x40(%rbp),%rdx
jmp    129c <realpath+0x10c>
mov    -0x30(%rbp),%rax
cmp    %rax,%r14
jne    144a <realpath+0x2ba>
lea    0x1(%rax),%r14
movb   $0x2f,(%rax)
movb   $0x0,(%r14)
jmp    146a <realpath+0x2da>
xor    %eax,%eax
jmp    146a <realpath+0x2da>
movw   $0x2e,0x0(%r13)
mov    -0x78(%rbp),%rdi
call   1030 <free@plt>
xor    %eax,%eax
mov    -0x40(%rbp),%rdx
mov    %rdx,%rsp
lea    -0x28(%rbp),%rsp
pop    %rbx
pop    %r12
pop    %r13
pop    %r14
pop    %r15
pop    %rbp
ret
mov    0x2b2d(%rip),%rax
mov    (%rax),%eax
mov    0x2b34(%rip),%rcx
mov    %eax,(%rcx)
mov    -0x30(%rbp),%rax
cmp    %rax,%r14
jne    14a1 <realpath+0x311>
movb   $0x2f,(%rax)
add    $0x1,%rax
mov    %rax,%r14
movb   $0x0,(%r14)
jmp    145b <realpath+0x2cb>
mov    0x2b4a(%rip),%rax
jmp    1236 <realpath+0xa6>
mov    0x2b16(%rip),%rax
jmp    1236 <realpath+0xa6>
mov    0x2aea(%rip),%rax
jmp    1236 <realpath+0xa6>

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

LLVM IR (-O2):
%struct.stat = type { i32 }
@MAXPATHLEN = global i32 0
@EINVAL = global i32 0
@errno = global i32 0
@ENOENT = global i32 0
@ENAMETOOLONG = global i32 0
@MAXSYMLINKS = global i32 0
@ELOOP = global i32 0
@ENOTDIR = global i32 0
define i8* @realpath(i8* %0, i8* %1) {
%3 = alloca %struct.stat
%4 = bitcast %struct.stat* %3 to i8*
%5 = load i32, i32* @MAXPATHLEN
%6 = zext i32 %5 to i64
%7 = tail call i8* @llvm.stacksave()
%8 = shl nuw nsw i64 %6, 1
%9 = alloca i8, i64 %8
%10 = icmp eq i8* %0, null
br i1 %10, label %11, label %13
11: ; preds = %2
%12 = load i32, i32* @EINVAL
store i32 %12, i32* @errno
br label %159
13: ; preds = %2
%14 = icmp eq i8* %1, null
br i1 %14, label %15, label %19
15: ; preds = %13
%16 = load i32, i32* @MAXPATHLEN
%17 = tail call i8* @malloc(i32 %16)
%18 = icmp eq i8* %17, null
br i1 %18, label %159, label %19
19: ; preds = %13, %15
%20 = phi i8* [ %17, %15 ], [ %1, %13 ]
%21 = phi i8* [ %17, %15 ], [ null, %13 ]
%22 = load i8, i8* %0
switch i8 %22, label %25 [
i8 0, label %23
i8 47, label %36
]
23: ; preds = %19
store i8 0, i8* %20
%24 = load i32, i32* @ENOENT
store i32 %24, i32* @errno
br label %157
25: ; preds = %19
%26 = load i32, i32* @MAXPATHLEN
%27 = tail call i32* @getcwd(i8* %20, i32 %26)
%28 = icmp eq i32* %27, null
br i1 %28, label %29, label %31
29: ; preds = %25
store i8 46, i8* %20
%30 = getelementptr inbounds i8, i8* %20, i64 1
store i8 0, i8* %30
br label %157
31: ; preds = %25
%32 = tail call i64 @strlen(i8* dereferenceable(1) %20)
%33 = icmp ugt i64 %32, 1
%34 = select i1 %33, i64 %32, i64 0
%35 = getelementptr i8, i8* %20, i64 %34
br label %36
36: ; preds = %31, %19
%37 = phi i8* [ %20, %19 ], [ %35, %31 ]
%38 = ptrtoint i8* %20 to i64
%39 = sub i64 1, %38
%40 = getelementptr inbounds %struct.stat, %struct.stat* %3, i64 0, i32 0
%41 = add i32 %5, -1
br label %42
42: ; preds = %140, %36
%43 = phi i32 [ %143, %140 ], [ 0, %36 ]
%44 = phi i32 [ %120, %140 ], [ 0, %36 ]
%45 = phi i8* [ %146, %140 ], [ %37, %36 ]
%46 = phi i8* [ %128, %140 ], [ %0, %36 ]
br label %47
47: ; preds = %150, %42
%48 = phi i8* [ %45, %42 ], [ %151, %150 ]
%49 = phi i8* [ %46, %42 ], [ %65, %150 ]
br label %50
50: ; preds = %55, %47
%51 = phi i8* [ %49, %47 ], [ %56, %55 ]
%52 = load i8, i8* %51
switch i8 %52, label %63 [
i8 47, label %53
i8 0, label %57
]
53: ; preds = %50
%54 = getelementptr inbounds i8, i8* %51, i64 1
br label %55
55: ; preds = %53, %69
%56 = phi i8* [ %54, %53 ], [ %65, %69 ]
br label %50
57: ; preds = %50
%58 = icmp eq i8* %48, %20
br i1 %58, label %59, label %61
59: ; preds = %57
%60 = getelementptr inbounds i8, i8* %20, i64 1
store i8 47, i8* %20
br label %61
61: ; preds = %59, %57
%62 = phi i8* [ %60, %59 ], [ %48, %57 ]
store i8 0, i8* %62
br label %159
63: ; preds = %50, %63
%64 = phi i8* [ %65, %63 ], [ %51, %50 ]
%65 = getelementptr inbounds i8, i8* %64, i64 1
%66 = load i8, i8* %65
switch i8 %66, label %63 [
i8 47, label %67
i8 0, label %67
]
67: ; preds = %63, %63
%68 = icmp eq i8 %52, 46
br i1 %68, label %69, label %87
69: ; preds = %67
%70 = ptrtoint i8* %65 to i64
%71 = ptrtoint i8* %51 to i64
%72 = sub i64 %70, %71
%73 = icmp eq i64 %72, 1
br i1 %73, label %55, label %74
74: ; preds = %69
%75 = getelementptr inbounds i8, i8* %51, i64 1
%76 = load i8, i8* %75
%77 = icmp eq i8 %76, 46
%78 = icmp eq i64 %72, 2
%79 = and i1 %78, %77
br i1 %79, label %80, label %87
80: ; preds = %74
%81 = icmp eq i8* %48, %20
br i1 %81, label %150, label %82
82: ; preds = %80, %82
%83 = phi i8* [ %84, %82 ], [ %48, %80 ]
%84 = getelementptr inbounds i8, i8* %83, i64 -1
%85 = load i8, i8* %84
%86 = icmp eq i8 %85, 47
br i1 %86, label %150, label %82
87: ; preds = %67, %74
%88 = ptrtoint i8* %51 to i64
%89 = ptrtoint i8* %48 to i64
%90 = add i64 %39, %89
%91 = getelementptr inbounds i8, i8* %65, i64 %90
%92 = ptrtoint i8* %91 to i64
%93 = sub i64 %92, %88
%94 = load i32, i32* @MAXPATHLEN
%95 = sext i32 %94 to i64
%96 = icmp slt i64 %93, %95
br i1 %96, label %104, label %97
97: ; preds = %87
%98 = load i32, i32* @ENAMETOOLONG
store i32 %98, i32* @errno
%99 = icmp eq i8* %48, %20
br i1 %99, label %100, label %102
100: ; preds = %97
%101 = getelementptr inbounds i8, i8* %20, i64 1
store i8 47, i8* %20
br label %102
102: ; preds = %100, %97
%103 = phi i8* [ %101, %100 ], [ %48, %97 ]
store i8 0, i8* %103
br label %157
104: ; preds = %87
store i8 47, i8* %48
%105 = getelementptr inbounds i8, i8* %48, i64 1
%106 = ptrtoint i8* %65 to i64
%107 = sub i64 %106, %88
%108 = call i32 @memcpy(i8* %105, i8* %51, i64 %107)
%109 = getelementptr inbounds i8, i8* %64, i64 2
%110 = ptrtoint i8* %109 to i64
%111 = sub i64 %110, %88
%112 = getelementptr inbounds i8, i8* %48, i64 %111
store i8 0, i8* %112
%113 = call i32 @lstat(i8* %20, %struct.stat* %3)
%114 = icmp eq i32 %113, -1
br i1 %114, label %157, label %115
115: ; preds = %104
%116 = load i32, i32* %40
%117 = call i64 @S_ISLNK(i32 %116)
%118 = icmp eq i64 %117, 0
br i1 %118, label %147, label %119
119: ; preds = %115
%120 = add nuw nsw i32 %44, 1
%121 = load i32, i32* @MAXSYMLINKS
%122 = icmp slt i32 %44, %121
br i1 %122, label %125, label %123
123: ; preds = %119
%124 = load i32, i32* @ELOOP
store i32 %124, i32* @errno
br label %157
125: ; preds = %119
%126 = sext i32 %43 to i64
%127 = mul nsw i64 %126, %6
%128 = getelementptr inbounds i8, i8* %9, i64 %127
%129 = call i64 @readlink(i8* %20, i8* %128, i32 %41)
%130 = icmp eq i64 %129, 0
br i1 %130, label %131, label %133
131: ; preds = %125
%132 = load i32, i32* @ENOENT
store i32 %132, i32* @errno
br label %157
133: ; preds = %125
%134 = call i64 @strlen(i8* %65)
%135 = add i64 %134, 1
%136 = add i64 %135, %129
%137 = icmp ugt i64 %136, %6
br i1 %137, label %138, label %140
138: ; preds = %133
%139 = load i32, i32* @ENAMETOOLONG
store i32 %139, i32* @errno
br label %157
140: ; preds = %133
%141 = getelementptr inbounds i8, i8* %128, i64 %129
%142 = call i32 @memcpy(i8* %141, i8* %65, i64 %135)
%143 = xor i32 %43, 1
%144 = load i8, i8* %128
%145 = icmp eq i8 %144, 47
%146 = select i1 %145, i8* %20, i8* %48
br label %42
147: ; preds = %115
%148 = load i8, i8* %65
%149 = icmp eq i8 %148, 47
br i1 %149, label %152, label %150
150: ; preds = %82, %147, %152, %80
%151 = phi i8* [ %20, %80 ], [ %112, %152 ], [ %112, %147 ], [ %84, %82 ]
br label %47
152: ; preds = %147
%153 = call i32 @S_ISDIR(i32 %116)
%154 = icmp eq i32 %153, 0
br i1 %154, label %155, label %150
155: ; preds = %152
%156 = load i32, i32* @ENOTDIR
store i32 %156, i32* @errno
br label %157
157: ; preds = %104, %155, %138, %131, %123, %102, %29, %23
%158 = call i32 @free(i8* %21)
br label %159
159: ; preds = %15, %157, %61, %11
%160 = phi i8* [ null, %11 ], [ null, %157 ], [ %20, %61 ], [ null, %15 ]
ret i8* %160
}