
_wc:     file format elf32-i386

Disassembly of section .text:

00000000 <wc>:
char buf[512];

void
wc(int fd, char *name)
{
   0:	55                   	push   %ebp
   1:	89 e5                	mov    %esp,%ebp
   3:	57                   	push   %edi
   4:	31 ff                	xor    %edi,%edi
   6:	56                   	push   %esi
   7:	53                   	push   %ebx
   8:	83 ec 2c             	sub    $0x2c,%esp
   b:	c7 45 f0 00 00 00 00 	movl   $0x0,0xfffffff0(%ebp)
  12:	c7 45 e8 00 00 00 00 	movl   $0x0,0xffffffe8(%ebp)
  19:	c7 45 ec 00 00 00 00 	movl   $0x0,0xffffffec(%ebp)
  20:	eb 0e                	jmp    30 <wc+0x30>
  int i, n;
  int l, w, c, inword;

  l = w = c = 0;
  inword = 0;
  while((n = read(fd, buf, sizeof(buf))) > 0){
    for(i=0; i<n; i++){
      c++;
      if(buf[i] == '\n')
        l++;
      if(strchr(" \r\t\n\v", buf[i]))
  22:	c7 45 f0 00 00 00 00 	movl   $0x0,0xfffffff0(%ebp)
  29:	46                   	inc    %esi
  2a:	39 f3                	cmp    %esi,%ebx
  2c:	75 28                	jne    56 <wc+0x56>
  2e:	01 df                	add    %ebx,%edi
  30:	8b 45 08             	mov    0x8(%ebp),%eax
  33:	bb 00 02 00 00       	mov    $0x200,%ebx
  38:	b9 80 08 00 00       	mov    $0x880,%ecx
  3d:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  41:	89 4c 24 04          	mov    %ecx,0x4(%esp)
  45:	89 04 24             	mov    %eax,(%esp)
  48:	e8 87 03 00 00       	call   3d4 <read>
  4d:	83 f8 00             	cmp    $0x0,%eax
  50:	89 c3                	mov    %eax,%ebx
  52:	7e 3b                	jle    8f <wc+0x8f>
  54:	31 f6                	xor    %esi,%esi
  56:	0f be 96 80 08 00 00 	movsbl 0x880(%esi),%edx
  5d:	31 c0                	xor    %eax,%eax
  5f:	c7 04 24 0a 08 00 00 	movl   $0x80a,(%esp)
  66:	80 fa 0a             	cmp    $0xa,%dl
  69:	0f 94 c0             	sete   %al
  6c:	01 45 e8             	add    %eax,0xffffffe8(%ebp)
  6f:	89 54 24 04          	mov    %edx,0x4(%esp)
  73:	e8 c8 01 00 00       	call   240 <strchr>
  78:	85 c0                	test   %eax,%eax
  7a:	75 a6                	jne    22 <wc+0x22>
        inword = 0;
      else if(!inword){
  7c:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  7f:	85 c0                	test   %eax,%eax
  81:	75 a6                	jne    29 <wc+0x29>
        w++;
  83:	ff 45 ec             	incl   0xffffffec(%ebp)
  86:	c7 45 f0 01 00 00 00 	movl   $0x1,0xfffffff0(%ebp)
  8d:	eb 9a                	jmp    29 <wc+0x29>
  8f:	90                   	nop    
        inword = 1;
      }
    }
  }
  if(n < 0){
  90:	75 36                	jne    c8 <wc+0xc8>
    printf(1, "wc: read error\n");
    exit();
  }
  printf(1, "%d %d %d %s\n", l, w, c, name);
  92:	8b 45 0c             	mov    0xc(%ebp),%eax
  95:	89 7c 24 10          	mov    %edi,0x10(%esp)
  99:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  a0:	89 44 24 14          	mov    %eax,0x14(%esp)
  a4:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  a7:	89 44 24 0c          	mov    %eax,0xc(%esp)
  ab:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  ae:	89 44 24 08          	mov    %eax,0x8(%esp)
  b2:	b8 20 08 00 00       	mov    $0x820,%eax
  b7:	89 44 24 04          	mov    %eax,0x4(%esp)
  bb:	e8 60 04 00 00       	call   520 <printf>
}
  c0:	83 c4 2c             	add    $0x2c,%esp
  c3:	5b                   	pop    %ebx
  c4:	5e                   	pop    %esi
  c5:	5f                   	pop    %edi
  c6:	5d                   	pop    %ebp
  c7:	c3                   	ret    
  c8:	ba 10 08 00 00       	mov    $0x810,%edx
  cd:	89 54 24 04          	mov    %edx,0x4(%esp)
  d1:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  d8:	e8 43 04 00 00       	call   520 <printf>
  dd:	e8 da 02 00 00       	call   3bc <exit>
  e2:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  e9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

000000f0 <main>:

int
main(int argc, char *argv[])
{
  f0:	8d 4c 24 04          	lea    0x4(%esp),%ecx
  f4:	83 e4 f0             	and    $0xfffffff0,%esp
  f7:	ff 71 fc             	pushl  0xfffffffc(%ecx)
  fa:	55                   	push   %ebp
  fb:	89 e5                	mov    %esp,%ebp
  fd:	57                   	push   %edi
  fe:	56                   	push   %esi
  ff:	53                   	push   %ebx
 100:	51                   	push   %ecx
 101:	83 ec 18             	sub    $0x18,%esp
 104:	8b 01                	mov    (%ecx),%eax
 106:	89 45 ec             	mov    %eax,0xffffffec(%ebp)
 109:	8b 41 04             	mov    0x4(%ecx),%eax
  int fd, i;

  if(argc <= 1){
 10c:	83 7d ec 01          	cmpl   $0x1,0xffffffec(%ebp)
 110:	7e 68                	jle    17a <main+0x8a>
    wc(0, "");
    exit();
 112:	8d 70 04             	lea    0x4(%eax),%esi
 115:	bf 01 00 00 00       	mov    $0x1,%edi
 11a:	eb 23                	jmp    13f <main+0x4f>
 11c:	8d 74 26 00          	lea    0x0(%esi),%esi
  }

  for(i = 1; i < argc; i++){
    if((fd = open(argv[i], 0)) < 0){
      printf(1, "cat: cannot open %s\n", argv[i]);
      exit();
    }
    wc(fd, argv[i]);
 120:	8b 06                	mov    (%esi),%eax
 122:	47                   	inc    %edi
 123:	83 c6 04             	add    $0x4,%esi
 126:	89 1c 24             	mov    %ebx,(%esp)
 129:	89 44 24 04          	mov    %eax,0x4(%esp)
 12d:	e8 ce fe ff ff       	call   0 <wc>
    close(fd);
 132:	89 1c 24             	mov    %ebx,(%esp)
 135:	e8 aa 02 00 00       	call   3e4 <close>
 13a:	39 7d ec             	cmp    %edi,0xffffffec(%ebp)
 13d:	74 36                	je     175 <main+0x85>
 13f:	31 c0                	xor    %eax,%eax
 141:	89 44 24 04          	mov    %eax,0x4(%esp)
 145:	8b 06                	mov    (%esi),%eax
 147:	89 04 24             	mov    %eax,(%esp)
 14a:	e8 ad 02 00 00       	call   3fc <open>
 14f:	85 c0                	test   %eax,%eax
 151:	89 c3                	mov    %eax,%ebx
 153:	79 cb                	jns    120 <main+0x30>
 155:	8b 06                	mov    (%esi),%eax
 157:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
 15e:	89 44 24 08          	mov    %eax,0x8(%esp)
 162:	b8 2d 08 00 00       	mov    $0x82d,%eax
 167:	89 44 24 04          	mov    %eax,0x4(%esp)
 16b:	e8 b0 03 00 00       	call   520 <printf>
 170:	e8 47 02 00 00       	call   3bc <exit>
  }
  exit();
 175:	e8 42 02 00 00       	call   3bc <exit>
 17a:	b8 1f 08 00 00       	mov    $0x81f,%eax
 17f:	89 44 24 04          	mov    %eax,0x4(%esp)
 183:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
 18a:	e8 71 fe ff ff       	call   0 <wc>
 18f:	e8 28 02 00 00       	call   3bc <exit>
 194:	90                   	nop    
 195:	90                   	nop    
 196:	90                   	nop    
 197:	90                   	nop    
 198:	90                   	nop    
 199:	90                   	nop    
 19a:	90                   	nop    
 19b:	90                   	nop    
 19c:	90                   	nop    
 19d:	90                   	nop    
 19e:	90                   	nop    
 19f:	90                   	nop    

000001a0 <strcpy>:
#include "user.h"

char*
strcpy(char *s, char *t)
{
 1a0:	55                   	push   %ebp
 1a1:	89 e5                	mov    %esp,%ebp
 1a3:	53                   	push   %ebx
 1a4:	8b 5d 08             	mov    0x8(%ebp),%ebx
 1a7:	8b 4d 0c             	mov    0xc(%ebp),%ecx
 1aa:	89 da                	mov    %ebx,%edx
 1ac:	8d 74 26 00          	lea    0x0(%esi),%esi
  char *os;

  os = s;
  while((*s++ = *t++) != 0)
 1b0:	0f b6 01             	movzbl (%ecx),%eax
 1b3:	41                   	inc    %ecx
 1b4:	88 02                	mov    %al,(%edx)
 1b6:	42                   	inc    %edx
 1b7:	84 c0                	test   %al,%al
 1b9:	75 f5                	jne    1b0 <strcpy+0x10>
    ;
  return os;
}
 1bb:	89 d8                	mov    %ebx,%eax
 1bd:	5b                   	pop    %ebx
 1be:	5d                   	pop    %ebp
 1bf:	c3                   	ret    

000001c0 <strcmp>:

int
strcmp(const char *p, const char *q)
{
 1c0:	55                   	push   %ebp
 1c1:	89 e5                	mov    %esp,%ebp
 1c3:	8b 55 08             	mov    0x8(%ebp),%edx
 1c6:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  while(*p && *p == *q)
 1c9:	0f b6 02             	movzbl (%edx),%eax
 1cc:	84 c0                	test   %al,%al
 1ce:	75 0c                	jne    1dc <strcmp+0x1c>
 1d0:	eb 10                	jmp    1e2 <strcmp+0x22>
 1d2:	0f b6 42 01          	movzbl 0x1(%edx),%eax
    p++, q++;
 1d6:	41                   	inc    %ecx
 1d7:	84 c0                	test   %al,%al
 1d9:	74 07                	je     1e2 <strcmp+0x22>
 1db:	42                   	inc    %edx
 1dc:	3a 01                	cmp    (%ecx),%al
 1de:	89 f6                	mov    %esi,%esi
 1e0:	74 f0                	je     1d2 <strcmp+0x12>
 1e2:	0f b6 11             	movzbl (%ecx),%edx
 1e5:	0f b6 c0             	movzbl %al,%eax
  return (uchar)*p - (uchar)*q;
}
 1e8:	5d                   	pop    %ebp
 1e9:	29 d0                	sub    %edx,%eax
 1eb:	c3                   	ret    
 1ec:	8d 74 26 00          	lea    0x0(%esi),%esi

000001f0 <strlen>:

uint
strlen(char *s)
{
 1f0:	55                   	push   %ebp
  int n;

  for(n = 0; s[n]; n++)
 1f1:	31 c0                	xor    %eax,%eax
 1f3:	89 e5                	mov    %esp,%ebp
 1f5:	8b 55 08             	mov    0x8(%ebp),%edx
 1f8:	80 3a 00             	cmpb   $0x0,(%edx)
 1fb:	74 0a                	je     207 <strlen+0x17>
 1fd:	8d 76 00             	lea    0x0(%esi),%esi
 200:	40                   	inc    %eax
 201:	80 3c 10 00          	cmpb   $0x0,(%eax,%edx,1)
 205:	75 f9                	jne    200 <strlen+0x10>
    ;
  return n;
}
 207:	5d                   	pop    %ebp
 208:	c3                   	ret    
 209:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00000210 <memset>:

void*
memset(void *dst, int c, uint n)
{
 210:	55                   	push   %ebp
 211:	89 e5                	mov    %esp,%ebp
 213:	8b 45 10             	mov    0x10(%ebp),%eax
 216:	53                   	push   %ebx
 217:	8b 5d 08             	mov    0x8(%ebp),%ebx
  char *d;
  
  d = dst;
  while(n-- > 0)
 21a:	85 c0                	test   %eax,%eax
 21c:	74 1a                	je     238 <memset+0x28>
 21e:	0f b6 4d 0c          	movzbl 0xc(%ebp),%ecx
 222:	31 d2                	xor    %edx,%edx
 224:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
 22a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi
    *d++ = c;
 230:	88 0c 1a             	mov    %cl,(%edx,%ebx,1)
 233:	42                   	inc    %edx
 234:	39 d0                	cmp    %edx,%eax
 236:	75 f8                	jne    230 <memset+0x20>
  return dst;
}
 238:	89 d8                	mov    %ebx,%eax
 23a:	5b                   	pop    %ebx
 23b:	5d                   	pop    %ebp
 23c:	c3                   	ret    
 23d:	8d 76 00             	lea    0x0(%esi),%esi

00000240 <strchr>:

char*
strchr(const char *s, char c)
{
 240:	55                   	push   %ebp
 241:	89 e5                	mov    %esp,%ebp
 243:	8b 45 08             	mov    0x8(%ebp),%eax
 246:	0f b6 4d 0c          	movzbl 0xc(%ebp),%ecx
  for(; *s; s++)
 24a:	0f b6 10             	movzbl (%eax),%edx
 24d:	84 d2                	test   %dl,%dl
 24f:	74 19                	je     26a <strchr+0x2a>
    if(*s == c)
 251:	38 d1                	cmp    %dl,%cl
 253:	75 0d                	jne    262 <strchr+0x22>
 255:	eb 15                	jmp    26c <strchr+0x2c>
 257:	38 ca                	cmp    %cl,%dl
 259:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
 260:	74 0a                	je     26c <strchr+0x2c>
 262:	40                   	inc    %eax
 263:	0f b6 10             	movzbl (%eax),%edx
 266:	84 d2                	test   %dl,%dl
 268:	75 ed                	jne    257 <strchr+0x17>
 26a:	31 c0                	xor    %eax,%eax
      return (char*) s;
  return 0;
}
 26c:	5d                   	pop    %ebp
 26d:	c3                   	ret    
 26e:	89 f6                	mov    %esi,%esi

00000270 <atoi>:

char*
gets(char *buf, int max)
{
  int i, cc;
  char c;

  for(i=0; i+1 < max; ){
    cc = read(0, &c, 1);
    if(cc < 1)
      break;
    buf[i++] = c;
    if(c == '\n' || c == '\r')
      break;
  }
  buf[i] = '\0';
  return buf;
}

int
stat(char *n, struct stat *st)
{
  int fd;
  int r;

  fd = open(n, O_RDONLY);
  if(fd < 0)
    return -1;
  r = fstat(fd, st);
  close(fd);
  return r;
}

int
atoi(const char *s)
{
 270:	55                   	push   %ebp
 271:	89 e5                	mov    %esp,%ebp
 273:	8b 4d 08             	mov    0x8(%ebp),%ecx
 276:	53                   	push   %ebx
  int n;

  n = 0;
  while('0' <= *s && *s <= '9')
 277:	31 db                	xor    %ebx,%ebx
 279:	0f b6 11             	movzbl (%ecx),%edx
 27c:	88 d0                	mov    %dl,%al
 27e:	2c 30                	sub    $0x30,%al
 280:	3c 09                	cmp    $0x9,%al
 282:	77 23                	ja     2a7 <atoi+0x37>
 284:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
 28a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi
    n = n*10 + *s++ - '0';
 290:	8d 04 9b             	lea    (%ebx,%ebx,4),%eax
 293:	0f be d2             	movsbl %dl,%edx
 296:	8d 5c 42 d0          	lea    0xffffffd0(%edx,%eax,2),%ebx
 29a:	0f b6 51 01          	movzbl 0x1(%ecx),%edx
 29e:	41                   	inc    %ecx
 29f:	88 d0                	mov    %dl,%al
 2a1:	2c 30                	sub    $0x30,%al
 2a3:	3c 09                	cmp    $0x9,%al
 2a5:	76 e9                	jbe    290 <atoi+0x20>
  return n;
}
 2a7:	89 d8                	mov    %ebx,%eax
 2a9:	5b                   	pop    %ebx
 2aa:	5d                   	pop    %ebp
 2ab:	c3                   	ret    
 2ac:	8d 74 26 00          	lea    0x0(%esi),%esi

000002b0 <memmove>:

void*
memmove(void *vdst, void *vsrc, int n)
{
 2b0:	55                   	push   %ebp
 2b1:	89 e5                	mov    %esp,%ebp
 2b3:	8b 4d 10             	mov    0x10(%ebp),%ecx
 2b6:	56                   	push   %esi
 2b7:	8b 75 08             	mov    0x8(%ebp),%esi
 2ba:	53                   	push   %ebx
 2bb:	8b 5d 0c             	mov    0xc(%ebp),%ebx
  char *dst, *src;
  
  dst = vdst;
  src = vsrc;
  while(n-- > 0)
 2be:	85 c9                	test   %ecx,%ecx
 2c0:	7e 1a                	jle    2dc <memmove+0x2c>
 2c2:	31 d2                	xor    %edx,%edx
 2c4:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
 2ca:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi
    *dst++ = *src++;
 2d0:	0f b6 04 1a          	movzbl (%edx,%ebx,1),%eax
 2d4:	88 04 32             	mov    %al,(%edx,%esi,1)
 2d7:	42                   	inc    %edx
 2d8:	39 ca                	cmp    %ecx,%edx
 2da:	75 f4                	jne    2d0 <memmove+0x20>
  return vdst;
}
 2dc:	5b                   	pop    %ebx
 2dd:	89 f0                	mov    %esi,%eax
 2df:	5e                   	pop    %esi
 2e0:	5d                   	pop    %ebp
 2e1:	c3                   	ret    
 2e2:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
 2e9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

000002f0 <stat>:
 2f0:	55                   	push   %ebp
 2f1:	31 c0                	xor    %eax,%eax
 2f3:	89 e5                	mov    %esp,%ebp
 2f5:	83 ec 18             	sub    $0x18,%esp
 2f8:	89 44 24 04          	mov    %eax,0x4(%esp)
 2fc:	8b 45 08             	mov    0x8(%ebp),%eax
 2ff:	89 5d f8             	mov    %ebx,0xfffffff8(%ebp)
 302:	89 75 fc             	mov    %esi,0xfffffffc(%ebp)
 305:	be ff ff ff ff       	mov    $0xffffffff,%esi
 30a:	89 04 24             	mov    %eax,(%esp)
 30d:	e8 ea 00 00 00       	call   3fc <open>
 312:	85 c0                	test   %eax,%eax
 314:	89 c3                	mov    %eax,%ebx
 316:	78 19                	js     331 <stat+0x41>
 318:	8b 45 0c             	mov    0xc(%ebp),%eax
 31b:	89 1c 24             	mov    %ebx,(%esp)
 31e:	89 44 24 04          	mov    %eax,0x4(%esp)
 322:	e8 ed 00 00 00       	call   414 <fstat>
 327:	89 1c 24             	mov    %ebx,(%esp)
 32a:	89 c6                	mov    %eax,%esi
 32c:	e8 b3 00 00 00       	call   3e4 <close>
 331:	89 f0                	mov    %esi,%eax
 333:	8b 5d f8             	mov    0xfffffff8(%ebp),%ebx
 336:	8b 75 fc             	mov    0xfffffffc(%ebp),%esi
 339:	89 ec                	mov    %ebp,%esp
 33b:	5d                   	pop    %ebp
 33c:	c3                   	ret    
 33d:	8d 76 00             	lea    0x0(%esi),%esi

00000340 <gets>:
 340:	55                   	push   %ebp
 341:	89 e5                	mov    %esp,%ebp
 343:	57                   	push   %edi
 344:	56                   	push   %esi
 345:	31 f6                	xor    %esi,%esi
 347:	53                   	push   %ebx
 348:	83 ec 1c             	sub    $0x1c,%esp
 34b:	8d 5e 01             	lea    0x1(%esi),%ebx
 34e:	8b 7d 08             	mov    0x8(%ebp),%edi
 351:	3b 5d 0c             	cmp    0xc(%ebp),%ebx
 354:	7d 3e                	jge    394 <gets+0x54>
 356:	ba 01 00 00 00       	mov    $0x1,%edx
 35b:	8d 45 f3             	lea    0xfffffff3(%ebp),%eax
 35e:	89 54 24 08          	mov    %edx,0x8(%esp)
 362:	89 44 24 04          	mov    %eax,0x4(%esp)
 366:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
 36d:	e8 62 00 00 00       	call   3d4 <read>
 372:	85 c0                	test   %eax,%eax
 374:	7e 1e                	jle    394 <gets+0x54>
 376:	0f b6 45 f3          	movzbl 0xfffffff3(%ebp),%eax
 37a:	88 44 3b ff          	mov    %al,0xffffffff(%ebx,%edi,1)
 37e:	0f b6 45 f3          	movzbl 0xfffffff3(%ebp),%eax
 382:	3c 0a                	cmp    $0xa,%al
 384:	74 1c                	je     3a2 <gets+0x62>
 386:	3c 0d                	cmp    $0xd,%al
 388:	74 18                	je     3a2 <gets+0x62>
 38a:	89 de                	mov    %ebx,%esi
 38c:	8d 5e 01             	lea    0x1(%esi),%ebx
 38f:	3b 5d 0c             	cmp    0xc(%ebp),%ebx
 392:	7c c2                	jl     356 <gets+0x16>
 394:	c6 04 3e 00          	movb   $0x0,(%esi,%edi,1)
 398:	83 c4 1c             	add    $0x1c,%esp
 39b:	89 f8                	mov    %edi,%eax
 39d:	5b                   	pop    %ebx
 39e:	5e                   	pop    %esi
 39f:	5f                   	pop    %edi
 3a0:	5d                   	pop    %ebp
 3a1:	c3                   	ret    
 3a2:	89 de                	mov    %ebx,%esi
 3a4:	89 f8                	mov    %edi,%eax
 3a6:	c6 04 3e 00          	movb   $0x0,(%esi,%edi,1)
 3aa:	83 c4 1c             	add    $0x1c,%esp
 3ad:	5b                   	pop    %ebx
 3ae:	5e                   	pop    %esi
 3af:	5f                   	pop    %edi
 3b0:	5d                   	pop    %ebp
 3b1:	c3                   	ret    
 3b2:	90                   	nop    
 3b3:	90                   	nop    

000003b4 <fork>:
 3b4:	b8 01 00 00 00       	mov    $0x1,%eax
 3b9:	cd 30                	int    $0x30
 3bb:	c3                   	ret    

000003bc <exit>:
 3bc:	b8 02 00 00 00       	mov    $0x2,%eax
 3c1:	cd 30                	int    $0x30
 3c3:	c3                   	ret    

000003c4 <wait>:
 3c4:	b8 03 00 00 00       	mov    $0x3,%eax
 3c9:	cd 30                	int    $0x30
 3cb:	c3                   	ret    

000003cc <pipe>:
 3cc:	b8 04 00 00 00       	mov    $0x4,%eax
 3d1:	cd 30                	int    $0x30
 3d3:	c3                   	ret    

000003d4 <read>:
 3d4:	b8 06 00 00 00       	mov    $0x6,%eax
 3d9:	cd 30                	int    $0x30
 3db:	c3                   	ret    

000003dc <write>:
 3dc:	b8 05 00 00 00       	mov    $0x5,%eax
 3e1:	cd 30                	int    $0x30
 3e3:	c3                   	ret    

000003e4 <close>:
 3e4:	b8 07 00 00 00       	mov    $0x7,%eax
 3e9:	cd 30                	int    $0x30
 3eb:	c3                   	ret    

000003ec <kill>:
 3ec:	b8 08 00 00 00       	mov    $0x8,%eax
 3f1:	cd 30                	int    $0x30
 3f3:	c3                   	ret    

000003f4 <exec>:
 3f4:	b8 09 00 00 00       	mov    $0x9,%eax
 3f9:	cd 30                	int    $0x30
 3fb:	c3                   	ret    

000003fc <open>:
 3fc:	b8 0a 00 00 00       	mov    $0xa,%eax
 401:	cd 30                	int    $0x30
 403:	c3                   	ret    

00000404 <mknod>:
 404:	b8 0b 00 00 00       	mov    $0xb,%eax
 409:	cd 30                	int    $0x30
 40b:	c3                   	ret    

0000040c <unlink>:
 40c:	b8 0c 00 00 00       	mov    $0xc,%eax
 411:	cd 30                	int    $0x30
 413:	c3                   	ret    

00000414 <fstat>:
 414:	b8 0d 00 00 00       	mov    $0xd,%eax
 419:	cd 30                	int    $0x30
 41b:	c3                   	ret    

0000041c <link>:
 41c:	b8 0e 00 00 00       	mov    $0xe,%eax
 421:	cd 30                	int    $0x30
 423:	c3                   	ret    

00000424 <mkdir>:
 424:	b8 0f 00 00 00       	mov    $0xf,%eax
 429:	cd 30                	int    $0x30
 42b:	c3                   	ret    

0000042c <chdir>:
 42c:	b8 10 00 00 00       	mov    $0x10,%eax
 431:	cd 30                	int    $0x30
 433:	c3                   	ret    

00000434 <dup>:
 434:	b8 11 00 00 00       	mov    $0x11,%eax
 439:	cd 30                	int    $0x30
 43b:	c3                   	ret    

0000043c <getpid>:
 43c:	b8 12 00 00 00       	mov    $0x12,%eax
 441:	cd 30                	int    $0x30
 443:	c3                   	ret    

00000444 <sbrk>:
 444:	b8 13 00 00 00       	mov    $0x13,%eax
 449:	cd 30                	int    $0x30
 44b:	c3                   	ret    

0000044c <sleep>:
 44c:	b8 14 00 00 00       	mov    $0x14,%eax
 451:	cd 30                	int    $0x30
 453:	c3                   	ret    
 454:	90                   	nop    
 455:	90                   	nop    
 456:	90                   	nop    
 457:	90                   	nop    
 458:	90                   	nop    
 459:	90                   	nop    
 45a:	90                   	nop    
 45b:	90                   	nop    
 45c:	90                   	nop    
 45d:	90                   	nop    
 45e:	90                   	nop    
 45f:	90                   	nop    

00000460 <putc>:
#include "user.h"

static void
putc(int fd, char c)
{
 460:	55                   	push   %ebp
 461:	89 e5                	mov    %esp,%ebp
 463:	83 ec 18             	sub    $0x18,%esp
 466:	88 55 fc             	mov    %dl,0xfffffffc(%ebp)
  write(fd, &c, 1);
 469:	ba 01 00 00 00       	mov    $0x1,%edx
 46e:	89 54 24 08          	mov    %edx,0x8(%esp)
 472:	8d 55 fc             	lea    0xfffffffc(%ebp),%edx
 475:	89 54 24 04          	mov    %edx,0x4(%esp)
 479:	89 04 24             	mov    %eax,(%esp)
 47c:	e8 5b ff ff ff       	call   3dc <write>
}
 481:	c9                   	leave  
 482:	c3                   	ret    
 483:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
 489:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00000490 <printint>:

static void
printint(int fd, int xx, int base, int sgn)
{
 490:	55                   	push   %ebp
 491:	89 e5                	mov    %esp,%ebp
 493:	57                   	push   %edi
 494:	56                   	push   %esi
 495:	89 ce                	mov    %ecx,%esi
 497:	53                   	push   %ebx
 498:	83 ec 1c             	sub    $0x1c,%esp
  static char digits[] = "0123456789ABCDEF";
  char buf[16];
  int i, neg;
  uint x;

  neg = 0;
  if(sgn && xx < 0){
 49b:	8b 5d 08             	mov    0x8(%ebp),%ebx
 49e:	89 45 dc             	mov    %eax,0xffffffdc(%ebp)
 4a1:	85 db                	test   %ebx,%ebx
 4a3:	74 04                	je     4a9 <printint+0x19>
 4a5:	85 d2                	test   %edx,%edx
 4a7:	78 62                	js     50b <printint+0x7b>
    neg = 1;
    x = -xx;
  } else {
    x = xx;
 4a9:	89 d0                	mov    %edx,%eax
 4ab:	c7 45 e0 00 00 00 00 	movl   $0x0,0xffffffe0(%ebp)
 4b2:	31 db                	xor    %ebx,%ebx
 4b4:	8d 7d e4             	lea    0xffffffe4(%ebp),%edi
 4b7:	89 f6                	mov    %esi,%esi
 4b9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  }

  i = 0;
  do{
    buf[i++] = digits[x % base];
 4c0:	31 d2                	xor    %edx,%edx
 4c2:	f7 f6                	div    %esi
 4c4:	89 c1                	mov    %eax,%ecx
 4c6:	0f b6 82 49 08 00 00 	movzbl 0x849(%edx),%eax
 4cd:	88 04 3b             	mov    %al,(%ebx,%edi,1)
 4d0:	43                   	inc    %ebx
  }while((x /= base) != 0);
 4d1:	85 c9                	test   %ecx,%ecx
 4d3:	89 c8                	mov    %ecx,%eax
 4d5:	75 e9                	jne    4c0 <printint+0x30>
  if(neg)
 4d7:	8b 4d e0             	mov    0xffffffe0(%ebp),%ecx
 4da:	85 c9                	test   %ecx,%ecx
 4dc:	74 06                	je     4e4 <printint+0x54>
    buf[i++] = '-';
 4de:	c6 44 1d e4 2d       	movb   $0x2d,0xffffffe4(%ebp,%ebx,1)
 4e3:	43                   	inc    %ebx

  while(--i >= 0)
 4e4:	4b                   	dec    %ebx
 4e5:	78 1c                	js     503 <printint+0x73>
 4e7:	89 f6                	mov    %esi,%esi
 4e9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
    putc(fd, buf[i]);
 4f0:	0f be 54 1d e4       	movsbl 0xffffffe4(%ebp,%ebx,1),%edx
 4f5:	4b                   	dec    %ebx
 4f6:	8b 45 dc             	mov    0xffffffdc(%ebp),%eax
 4f9:	e8 62 ff ff ff       	call   460 <putc>
 4fe:	83 fb ff             	cmp    $0xffffffff,%ebx
 501:	75 ed                	jne    4f0 <printint+0x60>
}
 503:	83 c4 1c             	add    $0x1c,%esp
 506:	5b                   	pop    %ebx
 507:	5e                   	pop    %esi
 508:	5f                   	pop    %edi
 509:	5d                   	pop    %ebp
 50a:	c3                   	ret    
 50b:	89 d0                	mov    %edx,%eax
 50d:	f7 d8                	neg    %eax
 50f:	c7 45 e0 01 00 00 00 	movl   $0x1,0xffffffe0(%ebp)
 516:	eb 9a                	jmp    4b2 <printint+0x22>
 518:	90                   	nop    
 519:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00000520 <printf>:

// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
 520:	55                   	push   %ebp
 521:	89 e5                	mov    %esp,%ebp
 523:	57                   	push   %edi
 524:	56                   	push   %esi
 525:	53                   	push   %ebx
 526:	83 ec 0c             	sub    $0xc,%esp
  char *s;
  int c, i, state;
  uint *ap;

  state = 0;
  ap = (uint*)(void*)&fmt + 1;
  for(i = 0; fmt[i]; i++){
 529:	8b 55 0c             	mov    0xc(%ebp),%edx
 52c:	0f b6 02             	movzbl (%edx),%eax
 52f:	84 c0                	test   %al,%al
 531:	0f 84 99 00 00 00    	je     5d0 <printf+0xb0>
 537:	8d 4d 10             	lea    0x10(%ebp),%ecx
 53a:	31 ff                	xor    %edi,%edi
 53c:	31 f6                	xor    %esi,%esi
 53e:	89 4d f0             	mov    %ecx,0xfffffff0(%ebp)
 541:	eb 26                	jmp    569 <printf+0x49>
    c = fmt[i] & 0xff;
    if(state == 0){
      if(c == '%'){
 543:	83 fb 25             	cmp    $0x25,%ebx
 546:	0f 85 8c 00 00 00    	jne    5d8 <printf+0xb8>
 54c:	be 25 00 00 00       	mov    $0x25,%esi
 551:	eb 0d                	jmp    560 <printf+0x40>
 553:	90                   	nop    
 554:	90                   	nop    
 555:	90                   	nop    
 556:	90                   	nop    
 557:	90                   	nop    
 558:	90                   	nop    
 559:	90                   	nop    
 55a:	90                   	nop    
 55b:	90                   	nop    
 55c:	90                   	nop    
 55d:	90                   	nop    
 55e:	90                   	nop    
 55f:	90                   	nop    
 560:	47                   	inc    %edi
 561:	0f b6 04 3a          	movzbl (%edx,%edi,1),%eax
 565:	84 c0                	test   %al,%al
 567:	74 67                	je     5d0 <printf+0xb0>
 569:	85 f6                	test   %esi,%esi
 56b:	0f b6 d8             	movzbl %al,%ebx
 56e:	74 d3                	je     543 <printf+0x23>
        state = '%';
      } else {
        putc(fd, c);
      }
    } else if(state == '%'){
 570:	83 fe 25             	cmp    $0x25,%esi
 573:	75 eb                	jne    560 <printf+0x40>
      if(c == 'd'){
 575:	83 fb 64             	cmp    $0x64,%ebx
 578:	0f 84 e0 00 00 00    	je     65e <printf+0x13e>
        printint(fd, *ap, 10, 1);
        ap++;
      } else if(c == 'x' || c == 'p'){
 57e:	83 fb 78             	cmp    $0x78,%ebx
 581:	74 68                	je     5eb <printf+0xcb>
 583:	83 fb 70             	cmp    $0x70,%ebx
 586:	74 63                	je     5eb <printf+0xcb>
        printint(fd, *ap, 16, 0);
        ap++;
      } else if(c == 's'){
 588:	83 fb 73             	cmp    $0x73,%ebx
 58b:	90                   	nop    
 58c:	8d 74 26 00          	lea    0x0(%esi),%esi
 590:	0f 84 7c 00 00 00    	je     612 <printf+0xf2>
        s = (char*)*ap;
        ap++;
        if(s == 0)
          s = "(null)";
        while(*s != 0){
          putc(fd, *s);
          s++;
        }
      } else if(c == 'c'){
 596:	83 fb 63             	cmp    $0x63,%ebx
 599:	0f 84 e4 00 00 00    	je     683 <printf+0x163>
        putc(fd, *ap);
        ap++;
      } else if(c == '%'){
 59f:	83 fb 25             	cmp    $0x25,%ebx
 5a2:	0f 84 c4 00 00 00    	je     66c <printf+0x14c>
        putc(fd, c);
      } else {
        // Unknown % sequence.  Print it to draw attention.
        putc(fd, '%');
 5a8:	8b 45 08             	mov    0x8(%ebp),%eax
 5ab:	ba 25 00 00 00       	mov    $0x25,%edx
 5b0:	47                   	inc    %edi
        putc(fd, c);
 5b1:	31 f6                	xor    %esi,%esi
 5b3:	e8 a8 fe ff ff       	call   460 <putc>
 5b8:	8b 45 08             	mov    0x8(%ebp),%eax
 5bb:	0f be d3             	movsbl %bl,%edx
 5be:	e8 9d fe ff ff       	call   460 <putc>
 5c3:	8b 55 0c             	mov    0xc(%ebp),%edx
 5c6:	0f b6 04 3a          	movzbl (%edx,%edi,1),%eax
 5ca:	84 c0                	test   %al,%al
 5cc:	75 9b                	jne    569 <printf+0x49>
 5ce:	89 f6                	mov    %esi,%esi
      }
      state = 0;
    }
  }
}
 5d0:	83 c4 0c             	add    $0xc,%esp
 5d3:	5b                   	pop    %ebx
 5d4:	5e                   	pop    %esi
 5d5:	5f                   	pop    %edi
 5d6:	5d                   	pop    %ebp
 5d7:	c3                   	ret    
 5d8:	8b 45 08             	mov    0x8(%ebp),%eax
 5db:	0f be d3             	movsbl %bl,%edx
 5de:	e8 7d fe ff ff       	call   460 <putc>
 5e3:	8b 55 0c             	mov    0xc(%ebp),%edx
 5e6:	e9 75 ff ff ff       	jmp    560 <printf+0x40>
 5eb:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
 5f2:	b9 10 00 00 00       	mov    $0x10,%ecx
 5f7:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
 5fa:	31 f6                	xor    %esi,%esi
 5fc:	8b 10                	mov    (%eax),%edx
 5fe:	8b 45 08             	mov    0x8(%ebp),%eax
 601:	e8 8a fe ff ff       	call   490 <printint>
 606:	8b 55 0c             	mov    0xc(%ebp),%edx
 609:	83 45 f0 04          	addl   $0x4,0xfffffff0(%ebp)
 60d:	e9 4e ff ff ff       	jmp    560 <printf+0x40>
 612:	8b 4d f0             	mov    0xfffffff0(%ebp),%ecx
 615:	8b 01                	mov    (%ecx),%eax
 617:	83 c1 04             	add    $0x4,%ecx
 61a:	89 4d f0             	mov    %ecx,0xfffffff0(%ebp)
 61d:	b9 42 08 00 00       	mov    $0x842,%ecx
 622:	85 c0                	test   %eax,%eax
 624:	74 02                	je     628 <printf+0x108>
 626:	89 c1                	mov    %eax,%ecx
 628:	0f b6 01             	movzbl (%ecx),%eax
 62b:	84 c0                	test   %al,%al
 62d:	74 28                	je     657 <printf+0x137>
 62f:	89 cb                	mov    %ecx,%ebx
 631:	eb 0d                	jmp    640 <printf+0x120>
 633:	90                   	nop    
 634:	90                   	nop    
 635:	90                   	nop    
 636:	90                   	nop    
 637:	90                   	nop    
 638:	90                   	nop    
 639:	90                   	nop    
 63a:	90                   	nop    
 63b:	90                   	nop    
 63c:	90                   	nop    
 63d:	90                   	nop    
 63e:	90                   	nop    
 63f:	90                   	nop    
 640:	0f be d0             	movsbl %al,%edx
 643:	8b 45 08             	mov    0x8(%ebp),%eax
 646:	e8 15 fe ff ff       	call   460 <putc>
 64b:	0f b6 43 01          	movzbl 0x1(%ebx),%eax
 64f:	43                   	inc    %ebx
 650:	84 c0                	test   %al,%al
 652:	75 ec                	jne    640 <printf+0x120>
 654:	8b 55 0c             	mov    0xc(%ebp),%edx
 657:	31 f6                	xor    %esi,%esi
 659:	e9 02 ff ff ff       	jmp    560 <printf+0x40>
 65e:	b9 0a 00 00 00       	mov    $0xa,%ecx
 663:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
 66a:	eb 8b                	jmp    5f7 <printf+0xd7>
 66c:	8b 45 08             	mov    0x8(%ebp),%eax
 66f:	ba 25 00 00 00       	mov    $0x25,%edx
 674:	31 f6                	xor    %esi,%esi
 676:	e8 e5 fd ff ff       	call   460 <putc>
 67b:	8b 55 0c             	mov    0xc(%ebp),%edx
 67e:	e9 dd fe ff ff       	jmp    560 <printf+0x40>
 683:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
 686:	31 f6                	xor    %esi,%esi
 688:	0f be 10             	movsbl (%eax),%edx
 68b:	8b 45 08             	mov    0x8(%ebp),%eax
 68e:	e8 cd fd ff ff       	call   460 <putc>
 693:	8b 55 0c             	mov    0xc(%ebp),%edx
 696:	83 45 f0 04          	addl   $0x4,0xfffffff0(%ebp)
 69a:	e9 c1 fe ff ff       	jmp    560 <printf+0x40>
 69f:	90                   	nop    

000006a0 <free>:
static Header *freep;

void
free(void *ap)
{
 6a0:	55                   	push   %ebp
  Header *bp, *p;

  bp = (Header*) ap - 1;
  for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
 6a1:	8b 0d 68 08 00 00    	mov    0x868,%ecx
 6a7:	89 e5                	mov    %esp,%ebp
 6a9:	56                   	push   %esi
 6aa:	53                   	push   %ebx
 6ab:	8b 5d 08             	mov    0x8(%ebp),%ebx
 6ae:	83 eb 08             	sub    $0x8,%ebx
 6b1:	eb 0d                	jmp    6c0 <free+0x20>
 6b3:	90                   	nop    
 6b4:	90                   	nop    
 6b5:	90                   	nop    
 6b6:	90                   	nop    
 6b7:	90                   	nop    
 6b8:	90                   	nop    
 6b9:	90                   	nop    
 6ba:	90                   	nop    
 6bb:	90                   	nop    
 6bc:	90                   	nop    
 6bd:	90                   	nop    
 6be:	90                   	nop    
 6bf:	90                   	nop    
 6c0:	39 d9                	cmp    %ebx,%ecx
 6c2:	73 04                	jae    6c8 <free+0x28>
 6c4:	3b 19                	cmp    (%ecx),%ebx
 6c6:	72 12                	jb     6da <free+0x3a>
    if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
 6c8:	8b 11                	mov    (%ecx),%edx
 6ca:	39 d1                	cmp    %edx,%ecx
 6cc:	72 08                	jb     6d6 <free+0x36>
 6ce:	39 d9                	cmp    %ebx,%ecx
 6d0:	72 0a                	jb     6dc <free+0x3c>
 6d2:	39 d3                	cmp    %edx,%ebx
 6d4:	72 06                	jb     6dc <free+0x3c>
 6d6:	89 d1                	mov    %edx,%ecx
 6d8:	eb e6                	jmp    6c0 <free+0x20>
 6da:	8b 11                	mov    (%ecx),%edx
      break;
  if(bp + bp->s.size == p->s.ptr){
 6dc:	8b 73 04             	mov    0x4(%ebx),%esi
 6df:	8d 04 f3             	lea    (%ebx,%esi,8),%eax
 6e2:	39 d0                	cmp    %edx,%eax
 6e4:	74 2e                	je     714 <free+0x74>
    bp->s.size += p->s.ptr->s.size;
    bp->s.ptr = p->s.ptr->s.ptr;
  } else
    bp->s.ptr = p->s.ptr;
 6e6:	89 13                	mov    %edx,(%ebx)
  if(p + p->s.size == bp){
 6e8:	8b 51 04             	mov    0x4(%ecx),%edx
 6eb:	8d 04 d1             	lea    (%ecx,%edx,8),%eax
 6ee:	39 c3                	cmp    %eax,%ebx
 6f0:	74 0c                	je     6fe <free+0x5e>
    p->s.size += bp->s.size;
    p->s.ptr = bp->s.ptr;
  } else
    p->s.ptr = bp;
 6f2:	89 19                	mov    %ebx,(%ecx)
  freep = p;
}
 6f4:	5b                   	pop    %ebx
 6f5:	89 0d 68 08 00 00    	mov    %ecx,0x868
 6fb:	5e                   	pop    %esi
 6fc:	5d                   	pop    %ebp
 6fd:	c3                   	ret    
 6fe:	8b 43 04             	mov    0x4(%ebx),%eax
 701:	01 c2                	add    %eax,%edx
 703:	8b 03                	mov    (%ebx),%eax
 705:	89 51 04             	mov    %edx,0x4(%ecx)
 708:	89 01                	mov    %eax,(%ecx)
 70a:	5b                   	pop    %ebx
 70b:	89 0d 68 08 00 00    	mov    %ecx,0x868
 711:	5e                   	pop    %esi
 712:	5d                   	pop    %ebp
 713:	c3                   	ret    
 714:	8b 42 04             	mov    0x4(%edx),%eax
 717:	01 c6                	add    %eax,%esi
 719:	8b 02                	mov    (%edx),%eax
 71b:	89 73 04             	mov    %esi,0x4(%ebx)
 71e:	89 03                	mov    %eax,(%ebx)
 720:	eb c6                	jmp    6e8 <free+0x48>
 722:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
 729:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00000730 <malloc>:

static Header*
morecore(uint nu)
{
  char *p;
  Header *hp;

  if(nu < PAGE)
    nu = PAGE;
  p = sbrk(nu * sizeof(Header));
  if(p == (char*) -1)
    return 0;
  hp = (Header*)p;
  hp->s.size = nu;
  free((void*)(hp + 1));
  return freep;
}

void*
malloc(uint nbytes)
{
 730:	55                   	push   %ebp
 731:	89 e5                	mov    %esp,%ebp
 733:	57                   	push   %edi
 734:	56                   	push   %esi
 735:	53                   	push   %ebx
 736:	83 ec 0c             	sub    $0xc,%esp
  Header *p, *prevp;
  uint nunits;

  nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
 739:	8b 45 08             	mov    0x8(%ebp),%eax
  if((prevp = freep) == 0){
 73c:	8b 15 68 08 00 00    	mov    0x868,%edx
 742:	83 c0 07             	add    $0x7,%eax
 745:	c1 e8 03             	shr    $0x3,%eax
 748:	85 d2                	test   %edx,%edx
 74a:	8d 58 01             	lea    0x1(%eax),%ebx
 74d:	0f 84 92 00 00 00    	je     7e5 <malloc+0xb5>
    base.s.ptr = freep = prevp = &base;
    base.s.size = 0;
  }
  for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
 753:	8b 0a                	mov    (%edx),%ecx
    if(p->s.size >= nunits){
 755:	8b 41 04             	mov    0x4(%ecx),%eax
 758:	39 c3                	cmp    %eax,%ebx
 75a:	76 63                	jbe    7bf <malloc+0x8f>
      if(p->s.size == nunits)
        prevp->s.ptr = p->s.ptr;
      else {
        p->s.size -= nunits;
        p += p->s.size;
        p->s.size = nunits;
      }
      freep = prevp;
      return (void*) (p + 1);
 75c:	8d 3c dd 00 00 00 00 	lea    0x0(,%ebx,8),%edi
 763:	eb 09                	jmp    76e <malloc+0x3e>
 765:	8b 0a                	mov    (%edx),%ecx
 767:	8b 41 04             	mov    0x4(%ecx),%eax
 76a:	39 c3                	cmp    %eax,%ebx
 76c:	76 51                	jbe    7bf <malloc+0x8f>
    }
    if(p == freep)
 76e:	39 0d 68 08 00 00    	cmp    %ecx,0x868
 774:	89 ca                	mov    %ecx,%edx
 776:	75 ed                	jne    765 <malloc+0x35>
 778:	81 fb ff 0f 00 00    	cmp    $0xfff,%ebx
 77e:	77 39                	ja     7b9 <malloc+0x89>
 780:	be 00 10 00 00       	mov    $0x1000,%esi
 785:	b8 00 80 00 00       	mov    $0x8000,%eax
 78a:	89 04 24             	mov    %eax,(%esp)
 78d:	e8 b2 fc ff ff       	call   444 <sbrk>
 792:	83 f8 ff             	cmp    $0xffffffff,%eax
 795:	74 18                	je     7af <malloc+0x7f>
 797:	89 70 04             	mov    %esi,0x4(%eax)
 79a:	83 c0 08             	add    $0x8,%eax
 79d:	89 04 24             	mov    %eax,(%esp)
 7a0:	e8 fb fe ff ff       	call   6a0 <free>
 7a5:	8b 15 68 08 00 00    	mov    0x868,%edx
      if((p = morecore(nunits)) == 0)
 7ab:	85 d2                	test   %edx,%edx
 7ad:	75 b6                	jne    765 <malloc+0x35>
        return 0;
  }
}
 7af:	83 c4 0c             	add    $0xc,%esp
 7b2:	31 c0                	xor    %eax,%eax
 7b4:	5b                   	pop    %ebx
 7b5:	5e                   	pop    %esi
 7b6:	5f                   	pop    %edi
 7b7:	5d                   	pop    %ebp
 7b8:	c3                   	ret    
 7b9:	89 de                	mov    %ebx,%esi
 7bb:	89 f8                	mov    %edi,%eax
 7bd:	eb cb                	jmp    78a <malloc+0x5a>
 7bf:	39 c3                	cmp    %eax,%ebx
 7c1:	74 1c                	je     7df <malloc+0xaf>
 7c3:	29 d8                	sub    %ebx,%eax
 7c5:	89 41 04             	mov    %eax,0x4(%ecx)
 7c8:	8d 0c c1             	lea    (%ecx,%eax,8),%ecx
 7cb:	89 59 04             	mov    %ebx,0x4(%ecx)
 7ce:	89 15 68 08 00 00    	mov    %edx,0x868
 7d4:	83 c4 0c             	add    $0xc,%esp
 7d7:	5b                   	pop    %ebx
 7d8:	8d 41 08             	lea    0x8(%ecx),%eax
 7db:	5e                   	pop    %esi
 7dc:	5f                   	pop    %edi
 7dd:	5d                   	pop    %ebp
 7de:	c3                   	ret    
 7df:	8b 01                	mov    (%ecx),%eax
 7e1:	89 02                	mov    %eax,(%edx)
 7e3:	eb e9                	jmp    7ce <malloc+0x9e>
 7e5:	b8 60 08 00 00       	mov    $0x860,%eax
 7ea:	ba 60 08 00 00       	mov    $0x860,%edx
 7ef:	a3 68 08 00 00       	mov    %eax,0x868
 7f4:	b8 60 08 00 00       	mov    $0x860,%eax
 7f9:	a3 60 08 00 00       	mov    %eax,0x860
 7fe:	31 c0                	xor    %eax,%eax
 800:	a3 64 08 00 00       	mov    %eax,0x864
 805:	e9 49 ff ff ff       	jmp    753 <malloc+0x23>
