
kernel:     file format elf32-i386

Disassembly of section .text:

00100000 <brelse>:

// Release the buffer buf.
void
brelse(struct buf *b)
{
  100000:	55                   	push   %ebp
  100001:	89 e5                	mov    %esp,%ebp
  100003:	53                   	push   %ebx
  100004:	83 ec 04             	sub    $0x4,%esp
  100007:	8b 5d 08             	mov    0x8(%ebp),%ebx
  if((b->flags & B_BUSY) == 0)
  10000a:	f6 03 01             	testb  $0x1,(%ebx)
  10000d:	74 56                	je     100065 <brelse+0x65>
    panic("brelse");

  acquire(&buf_table_lock);
  10000f:	c7 04 24 80 8f 10 00 	movl   $0x108f80,(%esp)
  100016:	e8 f5 3e 00 00       	call   103f10 <acquire>

  b->next->prev = b->prev;
  10001b:	8b 53 10             	mov    0x10(%ebx),%edx
  10001e:	8b 43 0c             	mov    0xc(%ebx),%eax
  b->prev->next = b->next;
  b->next = bufhead.next;
  b->prev = &bufhead;
  bufhead.next->prev = b;
  bufhead.next = b;

  b->flags &= ~B_BUSY;
  100021:	83 23 fe             	andl   $0xfffffffe,(%ebx)
  100024:	89 42 0c             	mov    %eax,0xc(%edx)
  100027:	8b 43 0c             	mov    0xc(%ebx),%eax
  10002a:	c7 43 0c 60 78 10 00 	movl   $0x107860,0xc(%ebx)
  100031:	89 50 10             	mov    %edx,0x10(%eax)
  100034:	a1 70 78 10 00       	mov    0x107870,%eax
  100039:	89 43 10             	mov    %eax,0x10(%ebx)
  10003c:	a1 70 78 10 00       	mov    0x107870,%eax
  100041:	89 1d 70 78 10 00    	mov    %ebx,0x107870
  100047:	89 58 0c             	mov    %ebx,0xc(%eax)
  wakeup(buf);
  10004a:	c7 04 24 80 7a 10 00 	movl   $0x107a80,(%esp)
  100051:	e8 3a 32 00 00       	call   103290 <wakeup>

  release(&buf_table_lock);
  100056:	c7 45 08 80 8f 10 00 	movl   $0x108f80,0x8(%ebp)
}
  10005d:	58                   	pop    %eax
  10005e:	5b                   	pop    %ebx
  10005f:	5d                   	pop    %ebp
  100060:	e9 6b 3e 00 00       	jmp    103ed0 <release>
  100065:	c7 04 24 e0 5d 10 00 	movl   $0x105de0,(%esp)
  10006c:	e8 3f 08 00 00       	call   1008b0 <panic>
  100071:	eb 0d                	jmp    100080 <bwrite>
  100073:	90                   	nop    
  100074:	90                   	nop    
  100075:	90                   	nop    
  100076:	90                   	nop    
  100077:	90                   	nop    
  100078:	90                   	nop    
  100079:	90                   	nop    
  10007a:	90                   	nop    
  10007b:	90                   	nop    
  10007c:	90                   	nop    
  10007d:	90                   	nop    
  10007e:	90                   	nop    
  10007f:	90                   	nop    

00100080 <bwrite>:
  100080:	55                   	push   %ebp
  100081:	89 e5                	mov    %esp,%ebp
  100083:	83 ec 08             	sub    $0x8,%esp
  100086:	8b 55 08             	mov    0x8(%ebp),%edx
  100089:	8b 02                	mov    (%edx),%eax
  10008b:	a8 01                	test   $0x1,%al
  10008d:	74 0e                	je     10009d <bwrite+0x1d>
  10008f:	83 c8 04             	or     $0x4,%eax
  100092:	89 02                	mov    %eax,(%edx)
  100094:	89 55 08             	mov    %edx,0x8(%ebp)
  100097:	c9                   	leave  
  100098:	e9 d3 1e 00 00       	jmp    101f70 <ide_rw>
  10009d:	c7 04 24 e7 5d 10 00 	movl   $0x105de7,(%esp)
  1000a4:	e8 07 08 00 00       	call   1008b0 <panic>
  1000a9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

001000b0 <bread>:
  1000b0:	55                   	push   %ebp
  1000b1:	89 e5                	mov    %esp,%ebp
  1000b3:	57                   	push   %edi
  1000b4:	56                   	push   %esi
  1000b5:	53                   	push   %ebx
  1000b6:	83 ec 0c             	sub    $0xc,%esp
  1000b9:	8b 75 08             	mov    0x8(%ebp),%esi
  1000bc:	8b 7d 0c             	mov    0xc(%ebp),%edi
  1000bf:	c7 04 24 80 8f 10 00 	movl   $0x108f80,(%esp)
  1000c6:	e8 45 3e 00 00       	call   103f10 <acquire>
  1000cb:	8b 1d 70 78 10 00    	mov    0x107870,%ebx
  1000d1:	81 fb 60 78 10 00    	cmp    $0x107860,%ebx
  1000d7:	75 12                	jne    1000eb <bread+0x3b>
  1000d9:	eb 42                	jmp    10011d <bread+0x6d>
  1000db:	90                   	nop    
  1000dc:	8d 74 26 00          	lea    0x0(%esi),%esi
  1000e0:	8b 5b 10             	mov    0x10(%ebx),%ebx
  1000e3:	81 fb 60 78 10 00    	cmp    $0x107860,%ebx
  1000e9:	74 32                	je     10011d <bread+0x6d>
  1000eb:	8b 03                	mov    (%ebx),%eax
  1000ed:	a8 03                	test   $0x3,%al
  1000ef:	74 ef                	je     1000e0 <bread+0x30>
  1000f1:	3b 73 04             	cmp    0x4(%ebx),%esi
  1000f4:	75 ea                	jne    1000e0 <bread+0x30>
  1000f6:	3b 7b 08             	cmp    0x8(%ebx),%edi
  1000f9:	75 e5                	jne    1000e0 <bread+0x30>
  1000fb:	a8 01                	test   $0x1,%al
  1000fd:	8d 76 00             	lea    0x0(%esi),%esi
  100100:	0f 84 81 00 00 00    	je     100187 <bread+0xd7>
  100106:	ba 80 8f 10 00       	mov    $0x108f80,%edx
  10010b:	89 54 24 04          	mov    %edx,0x4(%esp)
  10010f:	c7 04 24 80 7a 10 00 	movl   $0x107a80,(%esp)
  100116:	e8 d5 33 00 00       	call   1034f0 <sleep>
  10011b:	eb ae                	jmp    1000cb <bread+0x1b>
  10011d:	8b 1d 6c 78 10 00    	mov    0x10786c,%ebx
  100123:	81 fb 60 78 10 00    	cmp    $0x107860,%ebx
  100129:	75 10                	jne    10013b <bread+0x8b>
  10012b:	eb 4e                	jmp    10017b <bread+0xcb>
  10012d:	8d 76 00             	lea    0x0(%esi),%esi
  100130:	8b 5b 0c             	mov    0xc(%ebx),%ebx
  100133:	81 fb 60 78 10 00    	cmp    $0x107860,%ebx
  100139:	74 40                	je     10017b <bread+0xcb>
  10013b:	f6 03 01             	testb  $0x1,(%ebx)
  10013e:	89 f6                	mov    %esi,%esi
  100140:	75 ee                	jne    100130 <bread+0x80>
  100142:	c7 03 01 00 00 00    	movl   $0x1,(%ebx)
  100148:	89 73 04             	mov    %esi,0x4(%ebx)
  10014b:	89 7b 08             	mov    %edi,0x8(%ebx)
  10014e:	c7 04 24 80 8f 10 00 	movl   $0x108f80,(%esp)
  100155:	e8 76 3d 00 00       	call   103ed0 <release>
  10015a:	f6 03 02             	testb  $0x2,(%ebx)
  10015d:	74 0a                	je     100169 <bread+0xb9>
  10015f:	83 c4 0c             	add    $0xc,%esp
  100162:	89 d8                	mov    %ebx,%eax
  100164:	5b                   	pop    %ebx
  100165:	5e                   	pop    %esi
  100166:	5f                   	pop    %edi
  100167:	5d                   	pop    %ebp
  100168:	c3                   	ret    
  100169:	89 1c 24             	mov    %ebx,(%esp)
  10016c:	e8 ff 1d 00 00       	call   101f70 <ide_rw>
  100171:	83 c4 0c             	add    $0xc,%esp
  100174:	89 d8                	mov    %ebx,%eax
  100176:	5b                   	pop    %ebx
  100177:	5e                   	pop    %esi
  100178:	5f                   	pop    %edi
  100179:	5d                   	pop    %ebp
  10017a:	c3                   	ret    
  10017b:	c7 04 24 ee 5d 10 00 	movl   $0x105dee,(%esp)
  100182:	e8 29 07 00 00       	call   1008b0 <panic>
  100187:	83 c8 01             	or     $0x1,%eax
  10018a:	89 03                	mov    %eax,(%ebx)
  10018c:	c7 04 24 80 8f 10 00 	movl   $0x108f80,(%esp)
  100193:	e8 38 3d 00 00       	call   103ed0 <release>
  100198:	eb c0                	jmp    10015a <bread+0xaa>
  10019a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

001001a0 <binit>:
  1001a0:	55                   	push   %ebp
  1001a1:	b8 ff 5d 10 00       	mov    $0x105dff,%eax
  1001a6:	89 e5                	mov    %esp,%ebp
  1001a8:	83 ec 08             	sub    $0x8,%esp
  1001ab:	89 44 24 04          	mov    %eax,0x4(%esp)
  1001af:	c7 04 24 80 8f 10 00 	movl   $0x108f80,(%esp)
  1001b6:	e8 75 3b 00 00       	call   103d30 <initlock>
  1001bb:	b9 60 78 10 00       	mov    $0x107860,%ecx
  1001c0:	b8 80 7a 10 00       	mov    $0x107a80,%eax
  1001c5:	89 0d 6c 78 10 00    	mov    %ecx,0x10786c
  1001cb:	3d 70 8f 10 00       	cmp    $0x108f70,%eax
  1001d0:	b9 60 78 10 00       	mov    $0x107860,%ecx
  1001d5:	89 0d 70 78 10 00    	mov    %ecx,0x107870
  1001db:	73 25                	jae    100202 <binit+0x62>
  1001dd:	8d 76 00             	lea    0x0(%esi),%esi
  1001e0:	89 48 10             	mov    %ecx,0x10(%eax)
  1001e3:	c7 40 0c 60 78 10 00 	movl   $0x107860,0xc(%eax)
  1001ea:	89 41 0c             	mov    %eax,0xc(%ecx)
  1001ed:	89 c1                	mov    %eax,%ecx
  1001ef:	8d 80 18 02 00 00    	lea    0x218(%eax),%eax
  1001f5:	3d 70 8f 10 00       	cmp    $0x108f70,%eax
  1001fa:	72 e4                	jb     1001e0 <binit+0x40>
  1001fc:	89 0d 70 78 10 00    	mov    %ecx,0x107870
  100202:	c9                   	leave  
  100203:	c3                   	ret    
  100204:	90                   	nop    
  100205:	90                   	nop    
  100206:	90                   	nop    
  100207:	90                   	nop    
  100208:	90                   	nop    
  100209:	90                   	nop    
  10020a:	90                   	nop    
  10020b:	90                   	nop    
  10020c:	90                   	nop    
  10020d:	90                   	nop    
  10020e:	90                   	nop    
  10020f:	90                   	nop    

00100210 <console_init>:
}

void
console_init(void)
{
  100210:	55                   	push   %ebp
  initlock(&console_lock, "console");
  100211:	b8 09 5e 10 00       	mov    $0x105e09,%eax
  100216:	89 e5                	mov    %esp,%ebp
  100218:	83 ec 08             	sub    $0x8,%esp
  10021b:	89 44 24 04          	mov    %eax,0x4(%esp)
  10021f:	c7 04 24 c0 77 10 00 	movl   $0x1077c0,(%esp)
  100226:	e8 05 3b 00 00       	call   103d30 <initlock>
  initlock(&input.lock, "console input");
  10022b:	b8 11 5e 10 00       	mov    $0x105e11,%eax
  100230:	89 44 24 04          	mov    %eax,0x4(%esp)
  100234:	c7 04 24 c0 8f 10 00 	movl   $0x108fc0,(%esp)
  10023b:	e8 f0 3a 00 00       	call   103d30 <initlock>

  devsw[CONSOLE].write = console_write;
  100240:	b8 30 06 10 00       	mov    $0x100630,%eax
  devsw[CONSOLE].read = console_read;
  100245:	b9 80 02 10 00       	mov    $0x100280,%ecx
  use_console_lock = 1;
  10024a:	ba 01 00 00 00       	mov    $0x1,%edx
  10024f:	a3 2c 9a 10 00       	mov    %eax,0x109a2c
  100254:	89 0d 28 9a 10 00    	mov    %ecx,0x109a28
  10025a:	89 15 a4 77 10 00    	mov    %edx,0x1077a4

  pic_enable(IRQ_KBD);
  100260:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  100267:	e8 b4 2a 00 00       	call   102d20 <pic_enable>
  ioapic_enable(IRQ_KBD, 0);
  10026c:	31 c0                	xor    %eax,%eax
  10026e:	89 44 24 04          	mov    %eax,0x4(%esp)
  100272:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  100279:	e8 f2 1e 00 00       	call   102170 <ioapic_enable>
}
  10027e:	c9                   	leave  
  10027f:	c3                   	ret    

00100280 <console_read>:
  100280:	55                   	push   %ebp
  100281:	89 e5                	mov    %esp,%ebp
  100283:	57                   	push   %edi
  100284:	56                   	push   %esi
  100285:	53                   	push   %ebx
  100286:	83 ec 0c             	sub    $0xc,%esp
  100289:	8b 5d 10             	mov    0x10(%ebp),%ebx
  10028c:	8b 45 08             	mov    0x8(%ebp),%eax
  10028f:	8b 75 0c             	mov    0xc(%ebp),%esi
  100292:	89 df                	mov    %ebx,%edi
  100294:	89 04 24             	mov    %eax,(%esp)
  100297:	e8 b4 18 00 00       	call   101b50 <iunlock>
  10029c:	c7 04 24 c0 8f 10 00 	movl   $0x108fc0,(%esp)
  1002a3:	e8 68 3c 00 00       	call   103f10 <acquire>
  1002a8:	85 db                	test   %ebx,%ebx
  1002aa:	7f 26                	jg     1002d2 <console_read+0x52>
  1002ac:	e9 ac 00 00 00       	jmp    10035d <console_read+0xdd>
  1002b1:	e8 0a 30 00 00       	call   1032c0 <curproc>
  1002b6:	8b 40 1c             	mov    0x1c(%eax),%eax
  1002b9:	85 c0                	test   %eax,%eax
  1002bb:	75 4b                	jne    100308 <console_read+0x88>
  1002bd:	b8 c0 8f 10 00       	mov    $0x108fc0,%eax
  1002c2:	89 44 24 04          	mov    %eax,0x4(%esp)
  1002c6:	c7 04 24 74 90 10 00 	movl   $0x109074,(%esp)
  1002cd:	e8 1e 32 00 00       	call   1034f0 <sleep>
  1002d2:	8b 15 74 90 10 00    	mov    0x109074,%edx
  1002d8:	3b 15 78 90 10 00    	cmp    0x109078,%edx
  1002de:	74 d1                	je     1002b1 <console_read+0x31>
  1002e0:	89 d0                	mov    %edx,%eax
  1002e2:	83 e0 7f             	and    $0x7f,%eax
  1002e5:	0f b6 88 f4 8f 10 00 	movzbl 0x108ff4(%eax),%ecx
  1002ec:	8d 42 01             	lea    0x1(%edx),%eax
  1002ef:	a3 74 90 10 00       	mov    %eax,0x109074
  1002f4:	80 f9 04             	cmp    $0x4,%cl
  1002f7:	74 35                	je     10032e <console_read+0xae>
  1002f9:	4b                   	dec    %ebx
  1002fa:	80 f9 0a             	cmp    $0xa,%cl
  1002fd:	88 0e                	mov    %cl,(%esi)
  1002ff:	74 37                	je     100338 <console_read+0xb8>
  100301:	85 db                	test   %ebx,%ebx
  100303:	74 35                	je     10033a <console_read+0xba>
  100305:	46                   	inc    %esi
  100306:	eb ca                	jmp    1002d2 <console_read+0x52>
  100308:	c7 04 24 c0 8f 10 00 	movl   $0x108fc0,(%esp)
  10030f:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
  100314:	e8 b7 3b 00 00       	call   103ed0 <release>
  100319:	8b 45 08             	mov    0x8(%ebp),%eax
  10031c:	89 04 24             	mov    %eax,(%esp)
  10031f:	e8 9c 18 00 00       	call   101bc0 <ilock>
  100324:	83 c4 0c             	add    $0xc,%esp
  100327:	89 d8                	mov    %ebx,%eax
  100329:	5b                   	pop    %ebx
  10032a:	5e                   	pop    %esi
  10032b:	5f                   	pop    %edi
  10032c:	5d                   	pop    %ebp
  10032d:	c3                   	ret    
  10032e:	39 df                	cmp    %ebx,%edi
  100330:	76 06                	jbe    100338 <console_read+0xb8>
  100332:	89 15 74 90 10 00    	mov    %edx,0x109074
  100338:	29 df                	sub    %ebx,%edi
  10033a:	89 fb                	mov    %edi,%ebx
  10033c:	c7 04 24 c0 8f 10 00 	movl   $0x108fc0,(%esp)
  100343:	e8 88 3b 00 00       	call   103ed0 <release>
  100348:	8b 45 08             	mov    0x8(%ebp),%eax
  10034b:	89 04 24             	mov    %eax,(%esp)
  10034e:	e8 6d 18 00 00       	call   101bc0 <ilock>
  100353:	83 c4 0c             	add    $0xc,%esp
  100356:	89 d8                	mov    %ebx,%eax
  100358:	5b                   	pop    %ebx
  100359:	5e                   	pop    %esi
  10035a:	5f                   	pop    %edi
  10035b:	5d                   	pop    %ebp
  10035c:	c3                   	ret    
  10035d:	31 db                	xor    %ebx,%ebx
  10035f:	eb db                	jmp    10033c <console_read+0xbc>
  100361:	eb 0d                	jmp    100370 <cons_putc>
  100363:	90                   	nop    
  100364:	90                   	nop    
  100365:	90                   	nop    
  100366:	90                   	nop    
  100367:	90                   	nop    
  100368:	90                   	nop    
  100369:	90                   	nop    
  10036a:	90                   	nop    
  10036b:	90                   	nop    
  10036c:	90                   	nop    
  10036d:	90                   	nop    
  10036e:	90                   	nop    
  10036f:	90                   	nop    

00100370 <cons_putc>:
  100370:	55                   	push   %ebp
  100371:	89 e5                	mov    %esp,%ebp
  100373:	57                   	push   %edi
  100374:	56                   	push   %esi
  100375:	53                   	push   %ebx
  100376:	83 ec 0c             	sub    $0xc,%esp
  100379:	8b 3d a0 77 10 00    	mov    0x1077a0,%edi
  10037f:	8b 75 08             	mov    0x8(%ebp),%esi
  100382:	85 ff                	test   %edi,%edi
  100384:	0f 85 ca 00 00 00    	jne    100454 <cons_putc+0xe4>
inb(ushort port)
{
  uchar data;

  asm volatile("in %1,%0" : "=a" (data) : "d" (port));
  10038a:	ba 79 03 00 00       	mov    $0x379,%edx
  10038f:	ec                   	in     (%dx),%al
  100390:	84 c0                	test   %al,%al
  100392:	78 1c                	js     1003b0 <cons_putc+0x40>
  100394:	31 db                	xor    %ebx,%ebx
  100396:	b9 79 03 00 00       	mov    $0x379,%ecx
  10039b:	eb 0c                	jmp    1003a9 <cons_putc+0x39>
  10039d:	8d 76 00             	lea    0x0(%esi),%esi
  1003a0:	43                   	inc    %ebx
  1003a1:	81 fb 00 32 00 00    	cmp    $0x3200,%ebx
  1003a7:	74 07                	je     1003b0 <cons_putc+0x40>
inb(ushort port)
{
  uchar data;

  asm volatile("in %1,%0" : "=a" (data) : "d" (port));
  1003a9:	89 ca                	mov    %ecx,%edx
  1003ab:	ec                   	in     (%dx),%al
  1003ac:	84 c0                	test   %al,%al
  1003ae:	79 f0                	jns    1003a0 <cons_putc+0x30>
  1003b0:	81 fe 00 01 00 00    	cmp    $0x100,%esi
  1003b6:	b0 08                	mov    $0x8,%al
  1003b8:	74 02                	je     1003bc <cons_putc+0x4c>
  1003ba:	89 f0                	mov    %esi,%eax

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  1003bc:	ba 78 03 00 00       	mov    $0x378,%edx
  1003c1:	ee                   	out    %al,(%dx)
  1003c2:	b0 0d                	mov    $0xd,%al
  1003c4:	ba 7a 03 00 00       	mov    $0x37a,%edx
  1003c9:	ee                   	out    %al,(%dx)
  1003ca:	b0 08                	mov    $0x8,%al
  1003cc:	ee                   	out    %al,(%dx)
  1003cd:	b9 d4 03 00 00       	mov    $0x3d4,%ecx
  1003d2:	b0 0e                	mov    $0xe,%al
  1003d4:	89 ca                	mov    %ecx,%edx
  1003d6:	ee                   	out    %al,(%dx)
  1003d7:	bf d5 03 00 00       	mov    $0x3d5,%edi
  1003dc:	89 fa                	mov    %edi,%edx
  1003de:	ec                   	in     (%dx),%al
  1003df:	0f b6 d8             	movzbl %al,%ebx

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  1003e2:	89 ca                	mov    %ecx,%edx
  1003e4:	c1 e3 08             	shl    $0x8,%ebx

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  1003e7:	b0 0f                	mov    $0xf,%al
  1003e9:	ee                   	out    %al,(%dx)
  1003ea:	89 fa                	mov    %edi,%edx
  1003ec:	ec                   	in     (%dx),%al
  1003ed:	0f b6 c0             	movzbl %al,%eax
  1003f0:	09 c3                	or     %eax,%ebx
  1003f2:	83 fe 0a             	cmp    $0xa,%esi
  1003f5:	74 60                	je     100457 <cons_putc+0xe7>
  1003f7:	81 fe 00 01 00 00    	cmp    $0x100,%esi
  1003fd:	0f 84 b3 00 00 00    	je     1004b6 <cons_putc+0x146>
  100403:	89 f0                	mov    %esi,%eax
  100405:	25 ff 00 00 00       	and    $0xff,%eax
  10040a:	0d 00 07 00 00       	or     $0x700,%eax
  10040f:	66 89 84 1b 00 80 0b 	mov    %ax,0xb8000(%ebx,%ebx,1)
  100416:	00 
  100417:	43                   	inc    %ebx
  100418:	81 fb 7f 07 00 00    	cmp    $0x77f,%ebx
  10041e:	8d b4 1b 00 80 0b 00 	lea    0xb8000(%ebx,%ebx,1),%esi
  100425:	7f 47                	jg     10046e <cons_putc+0xfe>

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  100427:	b9 d4 03 00 00       	mov    $0x3d4,%ecx
  10042c:	b0 0e                	mov    $0xe,%al
  10042e:	89 ca                	mov    %ecx,%edx
  100430:	ee                   	out    %al,(%dx)
  100431:	bf d5 03 00 00       	mov    $0x3d5,%edi
  100436:	0f b6 c7             	movzbl %bh,%eax
  100439:	89 fa                	mov    %edi,%edx
  10043b:	ee                   	out    %al,(%dx)
  10043c:	b0 0f                	mov    $0xf,%al
  10043e:	89 ca                	mov    %ecx,%edx
  100440:	ee                   	out    %al,(%dx)
  100441:	0f b6 c3             	movzbl %bl,%eax
  100444:	89 fa                	mov    %edi,%edx
  100446:	ee                   	out    %al,(%dx)
  100447:	66 c7 06 20 07       	movw   $0x720,(%esi)
  10044c:	83 c4 0c             	add    $0xc,%esp
  10044f:	5b                   	pop    %ebx
  100450:	5e                   	pop    %esi
  100451:	5f                   	pop    %edi
  100452:	5d                   	pop    %ebp
  100453:	c3                   	ret    

static inline void
cli(void)
{
  asm volatile("cli");
  100454:	fa                   	cli    
  100455:	eb fe                	jmp    100455 <cons_putc+0xe5>
  100457:	89 d8                	mov    %ebx,%eax
  100459:	ba 67 66 66 66       	mov    $0x66666667,%edx
  10045e:	f7 ea                	imul   %edx
  100460:	c1 ea 05             	shr    $0x5,%edx
  100463:	8d 14 92             	lea    (%edx,%edx,4),%edx
  100466:	c1 e2 04             	shl    $0x4,%edx
  100469:	8d 5a 50             	lea    0x50(%edx),%ebx
  10046c:	eb aa                	jmp    100418 <cons_putc+0xa8>
  10046e:	b9 60 0e 00 00       	mov    $0xe60,%ecx
  100473:	ba a0 80 0b 00       	mov    $0xb80a0,%edx
  100478:	83 eb 50             	sub    $0x50,%ebx
  10047b:	89 4c 24 08          	mov    %ecx,0x8(%esp)
  10047f:	8d b4 1b 00 80 0b 00 	lea    0xb8000(%ebx,%ebx,1),%esi
  100486:	89 54 24 04          	mov    %edx,0x4(%esp)
  10048a:	c7 04 24 00 80 0b 00 	movl   $0xb8000,(%esp)
  100491:	e8 7a 3b 00 00       	call   104010 <memmove>
  100496:	b8 80 07 00 00       	mov    $0x780,%eax
  10049b:	29 d8                	sub    %ebx,%eax
  10049d:	01 c0                	add    %eax,%eax
  10049f:	89 44 24 08          	mov    %eax,0x8(%esp)
  1004a3:	31 c0                	xor    %eax,%eax
  1004a5:	89 44 24 04          	mov    %eax,0x4(%esp)
  1004a9:	89 34 24             	mov    %esi,(%esp)
  1004ac:	e8 cf 3a 00 00       	call   103f80 <memset>
  1004b1:	e9 71 ff ff ff       	jmp    100427 <cons_putc+0xb7>
  1004b6:	85 db                	test   %ebx,%ebx
  1004b8:	0f 8e 5a ff ff ff    	jle    100418 <cons_putc+0xa8>
  1004be:	4b                   	dec    %ebx
  1004bf:	be 20 07 00 00       	mov    $0x720,%esi
  1004c4:	66 89 b4 1b 00 80 0b 	mov    %si,0xb8000(%ebx,%ebx,1)
  1004cb:	00 
  1004cc:	e9 47 ff ff ff       	jmp    100418 <cons_putc+0xa8>
  1004d1:	eb 0d                	jmp    1004e0 <console_intr>
  1004d3:	90                   	nop    
  1004d4:	90                   	nop    
  1004d5:	90                   	nop    
  1004d6:	90                   	nop    
  1004d7:	90                   	nop    
  1004d8:	90                   	nop    
  1004d9:	90                   	nop    
  1004da:	90                   	nop    
  1004db:	90                   	nop    
  1004dc:	90                   	nop    
  1004dd:	90                   	nop    
  1004de:	90                   	nop    
  1004df:	90                   	nop    

001004e0 <console_intr>:
  1004e0:	55                   	push   %ebp
  1004e1:	89 e5                	mov    %esp,%ebp
  1004e3:	56                   	push   %esi
  1004e4:	53                   	push   %ebx
  1004e5:	83 ec 10             	sub    $0x10,%esp
  1004e8:	8b 75 08             	mov    0x8(%ebp),%esi
  1004eb:	c7 04 24 c0 8f 10 00 	movl   $0x108fc0,(%esp)
  1004f2:	e8 19 3a 00 00       	call   103f10 <acquire>
  1004f7:	89 f6                	mov    %esi,%esi
  1004f9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  100500:	ff d6                	call   *%esi
  100502:	85 c0                	test   %eax,%eax
  100504:	89 c3                	mov    %eax,%ebx
  100506:	0f 88 8c 00 00 00    	js     100598 <console_intr+0xb8>
  10050c:	83 fb 10             	cmp    $0x10,%ebx
  10050f:	90                   	nop    
  100510:	0f 84 da 00 00 00    	je     1005f0 <console_intr+0x110>
  100516:	83 fb 15             	cmp    $0x15,%ebx
  100519:	0f 84 b8 00 00 00    	je     1005d7 <console_intr+0xf7>
  10051f:	83 fb 08             	cmp    $0x8,%ebx
  100522:	0f 84 d2 00 00 00    	je     1005fa <console_intr+0x11a>
  100528:	85 db                	test   %ebx,%ebx
  10052a:	74 d4                	je     100500 <console_intr+0x20>
  10052c:	8b 15 7c 90 10 00    	mov    0x10907c,%edx
  100532:	8b 0d 74 90 10 00    	mov    0x109074,%ecx
  100538:	89 d0                	mov    %edx,%eax
  10053a:	29 c8                	sub    %ecx,%eax
  10053c:	83 f8 7f             	cmp    $0x7f,%eax
  10053f:	77 bf                	ja     100500 <console_intr+0x20>
  100541:	89 d0                	mov    %edx,%eax
  100543:	83 e0 7f             	and    $0x7f,%eax
  100546:	88 98 f4 8f 10 00    	mov    %bl,0x108ff4(%eax)
  10054c:	8d 42 01             	lea    0x1(%edx),%eax
  10054f:	a3 7c 90 10 00       	mov    %eax,0x10907c
  100554:	89 1c 24             	mov    %ebx,(%esp)
  100557:	e8 14 fe ff ff       	call   100370 <cons_putc>
  10055c:	83 fb 0a             	cmp    $0xa,%ebx
  10055f:	74 15                	je     100576 <console_intr+0x96>
  100561:	83 fb 04             	cmp    $0x4,%ebx
  100564:	74 10                	je     100576 <console_intr+0x96>
  100566:	a1 74 90 10 00       	mov    0x109074,%eax
  10056b:	83 e8 80             	sub    $0xffffff80,%eax
  10056e:	39 05 7c 90 10 00    	cmp    %eax,0x10907c
  100574:	75 8a                	jne    100500 <console_intr+0x20>
  100576:	a1 7c 90 10 00       	mov    0x10907c,%eax
  10057b:	c7 04 24 74 90 10 00 	movl   $0x109074,(%esp)
  100582:	a3 78 90 10 00       	mov    %eax,0x109078
  100587:	e8 04 2d 00 00       	call   103290 <wakeup>
  10058c:	ff d6                	call   *%esi
  10058e:	85 c0                	test   %eax,%eax
  100590:	89 c3                	mov    %eax,%ebx
  100592:	0f 89 74 ff ff ff    	jns    10050c <console_intr+0x2c>
  100598:	c7 45 08 c0 8f 10 00 	movl   $0x108fc0,0x8(%ebp)
  10059f:	83 c4 10             	add    $0x10,%esp
  1005a2:	5b                   	pop    %ebx
  1005a3:	5e                   	pop    %esi
  1005a4:	5d                   	pop    %ebp
  1005a5:	e9 26 39 00 00       	jmp    103ed0 <release>
  1005aa:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1005b0:	8d 50 ff             	lea    0xffffffff(%eax),%edx
  1005b3:	89 d0                	mov    %edx,%eax
  1005b5:	83 e0 7f             	and    $0x7f,%eax
  1005b8:	80 b8 f4 8f 10 00 0a 	cmpb   $0xa,0x108ff4(%eax)
  1005bf:	0f 84 3b ff ff ff    	je     100500 <console_intr+0x20>
  1005c5:	89 15 7c 90 10 00    	mov    %edx,0x10907c
  1005cb:	c7 04 24 00 01 00 00 	movl   $0x100,(%esp)
  1005d2:	e8 99 fd ff ff       	call   100370 <cons_putc>
  1005d7:	a1 7c 90 10 00       	mov    0x10907c,%eax
  1005dc:	3b 05 78 90 10 00    	cmp    0x109078,%eax
  1005e2:	75 cc                	jne    1005b0 <console_intr+0xd0>
  1005e4:	e9 17 ff ff ff       	jmp    100500 <console_intr+0x20>
  1005e9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  1005f0:	e8 4b 2b 00 00       	call   103140 <procdump>
  1005f5:	e9 06 ff ff ff       	jmp    100500 <console_intr+0x20>
  1005fa:	a1 7c 90 10 00       	mov    0x10907c,%eax
  1005ff:	3b 05 78 90 10 00    	cmp    0x109078,%eax
  100605:	0f 84 f5 fe ff ff    	je     100500 <console_intr+0x20>
  10060b:	48                   	dec    %eax
  10060c:	a3 7c 90 10 00       	mov    %eax,0x10907c
  100611:	c7 04 24 00 01 00 00 	movl   $0x100,(%esp)
  100618:	e8 53 fd ff ff       	call   100370 <cons_putc>
  10061d:	e9 de fe ff ff       	jmp    100500 <console_intr+0x20>
  100622:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  100629:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00100630 <console_write>:
  100630:	55                   	push   %ebp
  100631:	89 e5                	mov    %esp,%ebp
  100633:	57                   	push   %edi
  100634:	56                   	push   %esi
  100635:	53                   	push   %ebx
  100636:	83 ec 0c             	sub    $0xc,%esp
  100639:	8b 45 08             	mov    0x8(%ebp),%eax
  10063c:	8b 75 10             	mov    0x10(%ebp),%esi
  10063f:	8b 7d 0c             	mov    0xc(%ebp),%edi
  100642:	89 04 24             	mov    %eax,(%esp)
  100645:	e8 06 15 00 00       	call   101b50 <iunlock>
  10064a:	c7 04 24 c0 77 10 00 	movl   $0x1077c0,(%esp)
  100651:	e8 ba 38 00 00       	call   103f10 <acquire>
  100656:	85 f6                	test   %esi,%esi
  100658:	7e 17                	jle    100671 <console_write+0x41>
  10065a:	31 db                	xor    %ebx,%ebx
  10065c:	8d 74 26 00          	lea    0x0(%esi),%esi
  100660:	0f b6 04 3b          	movzbl (%ebx,%edi,1),%eax
  100664:	43                   	inc    %ebx
  100665:	89 04 24             	mov    %eax,(%esp)
  100668:	e8 03 fd ff ff       	call   100370 <cons_putc>
  10066d:	39 de                	cmp    %ebx,%esi
  10066f:	75 ef                	jne    100660 <console_write+0x30>
  100671:	c7 04 24 c0 77 10 00 	movl   $0x1077c0,(%esp)
  100678:	e8 53 38 00 00       	call   103ed0 <release>
  10067d:	8b 45 08             	mov    0x8(%ebp),%eax
  100680:	89 04 24             	mov    %eax,(%esp)
  100683:	e8 38 15 00 00       	call   101bc0 <ilock>
  100688:	83 c4 0c             	add    $0xc,%esp
  10068b:	89 f0                	mov    %esi,%eax
  10068d:	5b                   	pop    %ebx
  10068e:	5e                   	pop    %esi
  10068f:	5f                   	pop    %edi
  100690:	5d                   	pop    %ebp
  100691:	c3                   	ret    
  100692:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  100699:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

001006a0 <printint>:
  1006a0:	55                   	push   %ebp
  1006a1:	89 e5                	mov    %esp,%ebp
  1006a3:	57                   	push   %edi
  1006a4:	56                   	push   %esi
  1006a5:	53                   	push   %ebx
  1006a6:	83 ec 1c             	sub    $0x1c,%esp
  1006a9:	8b 55 10             	mov    0x10(%ebp),%edx
  1006ac:	8b 45 08             	mov    0x8(%ebp),%eax
  1006af:	8b 7d 0c             	mov    0xc(%ebp),%edi
  1006b2:	85 d2                	test   %edx,%edx
  1006b4:	74 04                	je     1006ba <printint+0x1a>
  1006b6:	85 c0                	test   %eax,%eax
  1006b8:	78 61                	js     10071b <printint+0x7b>
  1006ba:	c7 45 e0 00 00 00 00 	movl   $0x0,0xffffffe0(%ebp)
  1006c1:	31 db                	xor    %ebx,%ebx
  1006c3:	8d 75 e4             	lea    0xffffffe4(%ebp),%esi
  1006c6:	8d 76 00             	lea    0x0(%esi),%esi
  1006c9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  1006d0:	31 d2                	xor    %edx,%edx
  1006d2:	f7 f7                	div    %edi
  1006d4:	89 c1                	mov    %eax,%ecx
  1006d6:	0f b6 82 39 5e 10 00 	movzbl 0x105e39(%edx),%eax
  1006dd:	88 04 33             	mov    %al,(%ebx,%esi,1)
  1006e0:	43                   	inc    %ebx
  1006e1:	85 c9                	test   %ecx,%ecx
  1006e3:	89 c8                	mov    %ecx,%eax
  1006e5:	75 e9                	jne    1006d0 <printint+0x30>
  1006e7:	8b 75 e0             	mov    0xffffffe0(%ebp),%esi
  1006ea:	85 f6                	test   %esi,%esi
  1006ec:	74 06                	je     1006f4 <printint+0x54>
  1006ee:	c6 44 1d e4 2d       	movb   $0x2d,0xffffffe4(%ebp,%ebx,1)
  1006f3:	43                   	inc    %ebx
  1006f4:	4b                   	dec    %ebx
  1006f5:	78 1c                	js     100713 <printint+0x73>
  1006f7:	89 f6                	mov    %esi,%esi
  1006f9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  100700:	0f be 44 1d e4       	movsbl 0xffffffe4(%ebp,%ebx,1),%eax
  100705:	4b                   	dec    %ebx
  100706:	89 04 24             	mov    %eax,(%esp)
  100709:	e8 62 fc ff ff       	call   100370 <cons_putc>
  10070e:	83 fb ff             	cmp    $0xffffffff,%ebx
  100711:	75 ed                	jne    100700 <printint+0x60>
  100713:	83 c4 1c             	add    $0x1c,%esp
  100716:	5b                   	pop    %ebx
  100717:	5e                   	pop    %esi
  100718:	5f                   	pop    %edi
  100719:	5d                   	pop    %ebp
  10071a:	c3                   	ret    
  10071b:	f7 d8                	neg    %eax
  10071d:	c7 45 e0 01 00 00 00 	movl   $0x1,0xffffffe0(%ebp)
  100724:	eb 9b                	jmp    1006c1 <printint+0x21>
  100726:	8d 76 00             	lea    0x0(%esi),%esi
  100729:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00100730 <cprintf>:
  100730:	55                   	push   %ebp
  100731:	89 e5                	mov    %esp,%ebp
  100733:	57                   	push   %edi
  100734:	56                   	push   %esi
  100735:	53                   	push   %ebx
  100736:	83 ec 1c             	sub    $0x1c,%esp
  100739:	a1 a4 77 10 00       	mov    0x1077a4,%eax
  10073e:	85 c0                	test   %eax,%eax
  100740:	89 45 f0             	mov    %eax,0xfffffff0(%ebp)
  100743:	0f 85 c9 00 00 00    	jne    100812 <cprintf+0xe2>
  100749:	8b 4d 08             	mov    0x8(%ebp),%ecx
  10074c:	0f b6 01             	movzbl (%ecx),%eax
  10074f:	84 c0                	test   %al,%al
  100751:	74 74                	je     1007c7 <cprintf+0x97>
  100753:	8d 7d 0c             	lea    0xc(%ebp),%edi
  100756:	0f b6 d8             	movzbl %al,%ebx
  100759:	31 f6                	xor    %esi,%esi
  10075b:	90                   	nop    
  10075c:	8d 74 26 00          	lea    0x0(%esi),%esi
  100760:	83 fb 25             	cmp    $0x25,%ebx
  100763:	ba 25 00 00 00       	mov    $0x25,%edx
  100768:	74 16                	je     100780 <cprintf+0x50>
  10076a:	89 1c 24             	mov    %ebx,(%esp)
  10076d:	e8 fe fb ff ff       	call   100370 <cons_putc>
  100772:	8b 4d 08             	mov    0x8(%ebp),%ecx
  100775:	31 d2                	xor    %edx,%edx
  100777:	89 f6                	mov    %esi,%esi
  100779:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  100780:	46                   	inc    %esi
  100781:	0f b6 04 31          	movzbl (%ecx,%esi,1),%eax
  100785:	84 c0                	test   %al,%al
  100787:	74 3e                	je     1007c7 <cprintf+0x97>
  100789:	85 d2                	test   %edx,%edx
  10078b:	0f b6 d8             	movzbl %al,%ebx
  10078e:	74 d0                	je     100760 <cprintf+0x30>
  100790:	83 fa 25             	cmp    $0x25,%edx
  100793:	75 eb                	jne    100780 <cprintf+0x50>
  100795:	83 fb 70             	cmp    $0x70,%ebx
  100798:	74 52                	je     1007ec <cprintf+0xbc>
  10079a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1007a0:	7f 40                	jg     1007e2 <cprintf+0xb2>
  1007a2:	83 fb 25             	cmp    $0x25,%ebx
  1007a5:	74 7c                	je     100823 <cprintf+0xf3>
  1007a7:	83 fb 64             	cmp    $0x64,%ebx
  1007aa:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1007b0:	0f 84 c8 00 00 00    	je     10087e <cprintf+0x14e>
  1007b6:	c7 04 24 25 00 00 00 	movl   $0x25,(%esp)
  1007bd:	8d 76 00             	lea    0x0(%esi),%esi
  1007c0:	e8 ab fb ff ff       	call   100370 <cons_putc>
  1007c5:	eb a3                	jmp    10076a <cprintf+0x3a>
  1007c7:	8b 4d f0             	mov    0xfffffff0(%ebp),%ecx
  1007ca:	85 c9                	test   %ecx,%ecx
  1007cc:	74 0c                	je     1007da <cprintf+0xaa>
  1007ce:	c7 04 24 c0 77 10 00 	movl   $0x1077c0,(%esp)
  1007d5:	e8 f6 36 00 00       	call   103ed0 <release>
  1007da:	83 c4 1c             	add    $0x1c,%esp
  1007dd:	5b                   	pop    %ebx
  1007de:	5e                   	pop    %esi
  1007df:	5f                   	pop    %edi
  1007e0:	5d                   	pop    %ebp
  1007e1:	c3                   	ret    
  1007e2:	83 fb 73             	cmp    $0x73,%ebx
  1007e5:	74 52                	je     100839 <cprintf+0x109>
  1007e7:	83 fb 78             	cmp    $0x78,%ebx
  1007ea:	75 ca                	jne    1007b6 <cprintf+0x86>
  1007ec:	8b 07                	mov    (%edi),%eax
  1007ee:	31 d2                	xor    %edx,%edx
  1007f0:	bb 10 00 00 00       	mov    $0x10,%ebx
  1007f5:	89 54 24 08          	mov    %edx,0x8(%esp)
  1007f9:	83 c7 04             	add    $0x4,%edi
  1007fc:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  100800:	89 04 24             	mov    %eax,(%esp)
  100803:	e8 98 fe ff ff       	call   1006a0 <printint>
  100808:	8b 4d 08             	mov    0x8(%ebp),%ecx
  10080b:	31 d2                	xor    %edx,%edx
  10080d:	e9 6e ff ff ff       	jmp    100780 <cprintf+0x50>
  100812:	c7 04 24 c0 77 10 00 	movl   $0x1077c0,(%esp)
  100819:	e8 f2 36 00 00       	call   103f10 <acquire>
  10081e:	e9 26 ff ff ff       	jmp    100749 <cprintf+0x19>
  100823:	c7 04 24 25 00 00 00 	movl   $0x25,(%esp)
  10082a:	e8 41 fb ff ff       	call   100370 <cons_putc>
  10082f:	8b 4d 08             	mov    0x8(%ebp),%ecx
  100832:	31 d2                	xor    %edx,%edx
  100834:	e9 47 ff ff ff       	jmp    100780 <cprintf+0x50>
  100839:	8b 07                	mov    (%edi),%eax
  10083b:	83 c7 04             	add    $0x4,%edi
  10083e:	ba 1f 5e 10 00       	mov    $0x105e1f,%edx
  100843:	85 c0                	test   %eax,%eax
  100845:	74 02                	je     100849 <cprintf+0x119>
  100847:	89 c2                	mov    %eax,%edx
  100849:	0f b6 02             	movzbl (%edx),%eax
  10084c:	84 c0                	test   %al,%al
  10084e:	74 27                	je     100877 <cprintf+0x147>
  100850:	89 d3                	mov    %edx,%ebx
  100852:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  100859:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  100860:	0f be c0             	movsbl %al,%eax
  100863:	89 04 24             	mov    %eax,(%esp)
  100866:	e8 05 fb ff ff       	call   100370 <cons_putc>
  10086b:	0f b6 43 01          	movzbl 0x1(%ebx),%eax
  10086f:	43                   	inc    %ebx
  100870:	84 c0                	test   %al,%al
  100872:	75 ec                	jne    100860 <cprintf+0x130>
  100874:	8b 4d 08             	mov    0x8(%ebp),%ecx
  100877:	31 d2                	xor    %edx,%edx
  100879:	e9 02 ff ff ff       	jmp    100780 <cprintf+0x50>
  10087e:	8b 07                	mov    (%edi),%eax
  100880:	b9 0a 00 00 00       	mov    $0xa,%ecx
  100885:	bb 01 00 00 00       	mov    $0x1,%ebx
  10088a:	89 4c 24 04          	mov    %ecx,0x4(%esp)
  10088e:	83 c7 04             	add    $0x4,%edi
  100891:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  100895:	89 04 24             	mov    %eax,(%esp)
  100898:	e8 03 fe ff ff       	call   1006a0 <printint>
  10089d:	8b 4d 08             	mov    0x8(%ebp),%ecx
  1008a0:	31 d2                	xor    %edx,%edx
  1008a2:	e9 d9 fe ff ff       	jmp    100780 <cprintf+0x50>
  1008a7:	89 f6                	mov    %esi,%esi
  1008a9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

001008b0 <panic>:

void
panic(char *s)
{
  1008b0:	55                   	push   %ebp
  1008b1:	89 e5                	mov    %esp,%ebp
  1008b3:	56                   	push   %esi
  1008b4:	53                   	push   %ebx
  1008b5:	83 ec 40             	sub    $0x40,%esp
  int i;
  uint pcs[10];
  
  __asm __volatile("cli");
  1008b8:	fa                   	cli    
  use_console_lock = 0;
  1008b9:	31 c0                	xor    %eax,%eax
  cprintf("cpu%d: panic: ", cpu());
  cprintf(s);
  cprintf("\n");
  getcallerpcs(&s, pcs);
  1008bb:	bb 01 00 00 00       	mov    $0x1,%ebx
  1008c0:	a3 a4 77 10 00       	mov    %eax,0x1077a4
  1008c5:	8d 75 d0             	lea    0xffffffd0(%ebp),%esi
  1008c8:	e8 83 1e 00 00       	call   102750 <cpu>
  1008cd:	c7 04 24 26 5e 10 00 	movl   $0x105e26,(%esp)
  1008d4:	89 44 24 04          	mov    %eax,0x4(%esp)
  1008d8:	e8 53 fe ff ff       	call   100730 <cprintf>
  1008dd:	8b 45 08             	mov    0x8(%ebp),%eax
  1008e0:	89 04 24             	mov    %eax,(%esp)
  1008e3:	e8 48 fe ff ff       	call   100730 <cprintf>
  1008e8:	c7 04 24 73 62 10 00 	movl   $0x106273,(%esp)
  1008ef:	e8 3c fe ff ff       	call   100730 <cprintf>
  1008f4:	8d 45 08             	lea    0x8(%ebp),%eax
  1008f7:	89 74 24 04          	mov    %esi,0x4(%esp)
  1008fb:	89 04 24             	mov    %eax,(%esp)
  1008fe:	e8 4d 34 00 00       	call   103d50 <getcallerpcs>
  for(i=0; i<10; i++)
    cprintf(" %p", pcs[i]);
  100903:	8b 44 9e fc          	mov    0xfffffffc(%esi,%ebx,4),%eax
  100907:	43                   	inc    %ebx
  100908:	c7 04 24 35 5e 10 00 	movl   $0x105e35,(%esp)
  10090f:	89 44 24 04          	mov    %eax,0x4(%esp)
  100913:	e8 18 fe ff ff       	call   100730 <cprintf>
  100918:	83 fb 0b             	cmp    $0xb,%ebx
  10091b:	75 e6                	jne    100903 <panic+0x53>
  panicked = 1; // freeze other CPU
  10091d:	be 01 00 00 00       	mov    $0x1,%esi
  100922:	89 35 a0 77 10 00    	mov    %esi,0x1077a0
  100928:	eb fe                	jmp    100928 <panic+0x78>
  10092a:	90                   	nop    
  10092b:	90                   	nop    
  10092c:	90                   	nop    
  10092d:	90                   	nop    
  10092e:	90                   	nop    
  10092f:	90                   	nop    

00100930 <exec>:
#include "elf.h"

int
exec(char *path, char **argv)
{
  100930:	55                   	push   %ebp
  100931:	89 e5                	mov    %esp,%ebp
  100933:	57                   	push   %edi
  100934:	56                   	push   %esi
  100935:	53                   	push   %ebx
  100936:	81 ec 9c 00 00 00    	sub    $0x9c,%esp
  char *mem, *s, *last;
  int i, argc, arglen, len, off;
  uint sz, sp, argp;
  struct elfhdr elf;
  struct inode *ip;
  struct proghdr ph;

  if((ip = namei(path)) == 0)
  10093c:	8b 45 08             	mov    0x8(%ebp),%eax
  10093f:	89 04 24             	mov    %eax,(%esp)
  100942:	e8 09 15 00 00       	call   101e50 <namei>
  100947:	89 c7                	mov    %eax,%edi
  100949:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  10094e:	85 ff                	test   %edi,%edi
  100950:	74 41                	je     100993 <exec+0x63>
    return -1;
  ilock(ip);
  100952:	89 3c 24             	mov    %edi,(%esp)

  // Compute memory size of new process.
  mem = 0;
  sz = 0;

  // Program segments.
  if(readi(ip, (char*)&elf, 0, sizeof(elf)) < sizeof(elf))
  100955:	bb 34 00 00 00       	mov    $0x34,%ebx
  10095a:	e8 61 12 00 00       	call   101bc0 <ilock>
  10095f:	31 c9                	xor    %ecx,%ecx
  100961:	8d 45 a0             	lea    0xffffffa0(%ebp),%eax
  100964:	89 5c 24 0c          	mov    %ebx,0xc(%esp)
  100968:	89 4c 24 08          	mov    %ecx,0x8(%esp)
  10096c:	89 44 24 04          	mov    %eax,0x4(%esp)
  100970:	89 3c 24             	mov    %edi,(%esp)
  100973:	e8 d8 0b 00 00       	call   101550 <readi>
  100978:	83 f8 33             	cmp    $0x33,%eax
  10097b:	76 09                	jbe    100986 <exec+0x56>
    goto bad;
  if(elf.magic != ELF_MAGIC)
  10097d:	81 7d a0 7f 45 4c 46 	cmpl   $0x464c457f,0xffffffa0(%ebp)
  100984:	74 18                	je     10099e <exec+0x6e>
    goto bad;
  for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
    if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph))
      goto bad;
    if(ph.type != ELF_PROG_LOAD)
      continue;
    if(ph.memsz < ph.filesz)
      goto bad;
    sz += ph.memsz;
  }
  
  // Arguments.
  arglen = 0;
  for(argc=0; argv[argc]; argc++)
    arglen += strlen(argv[argc]) + 1;
  arglen = (arglen+3) & ~3;
  sz += arglen + 4*(argc+1);

  // Stack.
  sz += PAGE;
  
  // Allocate program memory.
  sz = (sz+PAGE-1) & ~(PAGE-1);
  mem = kalloc(sz);
  if(mem == 0)
    goto bad;
  memset(mem, 0, sz);

  // Load program into memory.
  for(i=0, off=elf.phoff; i<elf.phnum; i++, off+=sizeof(ph)){
    if(readi(ip, (char*)&ph, off, sizeof(ph)) != sizeof(ph))
      goto bad;
    if(ph.type != ELF_PROG_LOAD)
      continue;
    if(ph.va + ph.memsz > sz)
      goto bad;
    if(readi(ip, mem + ph.va, ph.offset, ph.filesz) != ph.filesz)
      goto bad;
    memset(mem + ph.va + ph.filesz, 0, ph.memsz - ph.filesz);
  }
  iunlockput(ip);
  
  // Initialize stack.
  sp = sz;
  argp = sz - arglen - 4*(argc+1);

  // Copy argv strings and pointers to stack.
  *(uint*)(mem+argp + 4*argc) = 0;  // argv[argc]
  for(i=argc-1; i>=0; i--){
    len = strlen(argv[i]) + 1;
    sp -= len;
    memmove(mem+sp, argv[i], len);
    *(uint*)(mem+argp + 4*i) = sp;  // argv[i]
  }

  // Stack frame for main(argc, argv), below arguments.
  sp = argp;
  sp -= 4;
  *(uint*)(mem+sp) = argp;
  sp -= 4;
  *(uint*)(mem+sp) = argc;
  sp -= 4;
  *(uint*)(mem+sp) = 0xffffffff;   // fake return pc

  // Save program name for debugging.
  for(last=s=path; *s; s++)
    if(*s == '/')
      last = s+1;
  safestrcpy(cp->name, last, sizeof(cp->name));

  // Commit to the new image.
  kfree(cp->mem, cp->sz);
  cp->mem = mem;
  cp->sz = sz;
  cp->tf->eip = elf.entry;  // main
  cp->tf->esp = sp;
  setupsegs(cp);
  return 0;

 bad:
  if(mem)
    kfree(mem, sz);
  iunlockput(ip);
  100986:	89 3c 24             	mov    %edi,(%esp)
  100989:	e8 12 12 00 00       	call   101ba0 <iunlockput>
  10098e:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  return -1;
}
  100993:	81 c4 9c 00 00 00    	add    $0x9c,%esp
  100999:	5b                   	pop    %ebx
  10099a:	5e                   	pop    %esi
  10099b:	5f                   	pop    %edi
  10099c:	5d                   	pop    %ebp
  10099d:	c3                   	ret    
  10099e:	31 d2                	xor    %edx,%edx
  1009a0:	8b 45 bc             	mov    0xffffffbc(%ebp),%eax
  1009a3:	66 83 7d cc 00       	cmpw   $0x0,0xffffffcc(%ebp)
  1009a8:	89 95 7c ff ff ff    	mov    %edx,0xffffff7c(%ebp)
  1009ae:	74 4a                	je     1009fa <exec+0xca>
  1009b0:	31 f6                	xor    %esi,%esi
  1009b2:	89 c3                	mov    %eax,%ebx
  1009b4:	eb 0c                	jmp    1009c2 <exec+0x92>
  1009b6:	0f b7 45 cc          	movzwl 0xffffffcc(%ebp),%eax
  1009ba:	46                   	inc    %esi
  1009bb:	83 c3 20             	add    $0x20,%ebx
  1009be:	39 f0                	cmp    %esi,%eax
  1009c0:	7e 38                	jle    1009fa <exec+0xca>
  1009c2:	b8 20 00 00 00       	mov    $0x20,%eax
  1009c7:	8d 55 d4             	lea    0xffffffd4(%ebp),%edx
  1009ca:	89 44 24 0c          	mov    %eax,0xc(%esp)
  1009ce:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  1009d2:	89 54 24 04          	mov    %edx,0x4(%esp)
  1009d6:	89 3c 24             	mov    %edi,(%esp)
  1009d9:	e8 72 0b 00 00       	call   101550 <readi>
  1009de:	83 f8 20             	cmp    $0x20,%eax
  1009e1:	75 a3                	jne    100986 <exec+0x56>
  1009e3:	83 7d d4 01          	cmpl   $0x1,0xffffffd4(%ebp)
  1009e7:	75 cd                	jne    1009b6 <exec+0x86>
  1009e9:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  1009ec:	3b 45 e4             	cmp    0xffffffe4(%ebp),%eax
  1009ef:	90                   	nop    
  1009f0:	72 94                	jb     100986 <exec+0x56>
  1009f2:	01 85 7c ff ff ff    	add    %eax,0xffffff7c(%ebp)
  1009f8:	eb bc                	jmp    1009b6 <exec+0x86>
  1009fa:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  1009fd:	8b 01                	mov    (%ecx),%eax
  1009ff:	85 c0                	test   %eax,%eax
  100a01:	0f 84 c1 02 00 00    	je     100cc8 <exec+0x398>
  100a07:	31 c9                	xor    %ecx,%ecx
  100a09:	31 db                	xor    %ebx,%ebx
  100a0b:	89 8d 78 ff ff ff    	mov    %ecx,0xffffff78(%ebp)
  100a11:	eb 0d                	jmp    100a20 <exec+0xf0>
  100a13:	90                   	nop    
  100a14:	90                   	nop    
  100a15:	90                   	nop    
  100a16:	90                   	nop    
  100a17:	90                   	nop    
  100a18:	90                   	nop    
  100a19:	90                   	nop    
  100a1a:	90                   	nop    
  100a1b:	90                   	nop    
  100a1c:	90                   	nop    
  100a1d:	90                   	nop    
  100a1e:	90                   	nop    
  100a1f:	90                   	nop    
  100a20:	89 04 24             	mov    %eax,(%esp)
  100a23:	e8 18 37 00 00       	call   104140 <strlen>
  100a28:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  100a2b:	ff 85 78 ff ff ff    	incl   0xffffff78(%ebp)
  100a31:	8b 95 78 ff ff ff    	mov    0xffffff78(%ebp),%edx
  100a37:	8d 5c 18 01          	lea    0x1(%eax,%ebx,1),%ebx
  100a3b:	8b 04 91             	mov    (%ecx,%edx,4),%eax
  100a3e:	85 c0                	test   %eax,%eax
  100a40:	75 de                	jne    100a20 <exec+0xf0>
  100a42:	83 c3 03             	add    $0x3,%ebx
  100a45:	89 5d 84             	mov    %ebx,0xffffff84(%ebp)
  100a48:	83 65 84 fc          	andl   $0xfffffffc,0xffffff84(%ebp)
  100a4c:	89 95 70 ff ff ff    	mov    %edx,0xffffff70(%ebp)
  100a52:	c1 e2 02             	shl    $0x2,%edx
  100a55:	8b 4d 84             	mov    0xffffff84(%ebp),%ecx
  100a58:	89 55 88             	mov    %edx,0xffffff88(%ebp)
  100a5b:	8d 84 0a 03 20 00 00 	lea    0x2003(%edx,%ecx,1),%eax
  100a62:	8b 95 7c ff ff ff    	mov    0xffffff7c(%ebp),%edx
  100a68:	01 d0                	add    %edx,%eax
  100a6a:	25 00 f0 ff ff       	and    $0xfffff000,%eax
  100a6f:	89 45 90             	mov    %eax,0xffffff90(%ebp)
  100a72:	89 04 24             	mov    %eax,(%esp)
  100a75:	e8 e6 17 00 00       	call   102260 <kalloc>
  100a7a:	85 c0                	test   %eax,%eax
  100a7c:	89 85 74 ff ff ff    	mov    %eax,0xffffff74(%ebp)
  100a82:	0f 84 fe fe ff ff    	je     100986 <exec+0x56>
  100a88:	8b 45 90             	mov    0xffffff90(%ebp),%eax
  100a8b:	8b 95 74 ff ff ff    	mov    0xffffff74(%ebp),%edx
  100a91:	89 44 24 08          	mov    %eax,0x8(%esp)
  100a95:	31 c0                	xor    %eax,%eax
  100a97:	89 44 24 04          	mov    %eax,0x4(%esp)
  100a9b:	89 14 24             	mov    %edx,(%esp)
  100a9e:	e8 dd 34 00 00       	call   103f80 <memset>
  100aa3:	8b 45 bc             	mov    0xffffffbc(%ebp),%eax
  100aa6:	66 83 7d cc 00       	cmpw   $0x0,0xffffffcc(%ebp)
  100aab:	0f 84 b8 00 00 00    	je     100b69 <exec+0x239>
  100ab1:	89 c3                	mov    %eax,%ebx
  100ab3:	31 f6                	xor    %esi,%esi
  100ab5:	eb 10                	jmp    100ac7 <exec+0x197>
  100ab7:	0f b7 45 cc          	movzwl 0xffffffcc(%ebp),%eax
  100abb:	46                   	inc    %esi
  100abc:	39 f0                	cmp    %esi,%eax
  100abe:	0f 8e a5 00 00 00    	jle    100b69 <exec+0x239>
  100ac4:	83 c3 20             	add    $0x20,%ebx
  100ac7:	b8 20 00 00 00       	mov    $0x20,%eax
  100acc:	8d 4d d4             	lea    0xffffffd4(%ebp),%ecx
  100acf:	89 44 24 0c          	mov    %eax,0xc(%esp)
  100ad3:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  100ad7:	89 4c 24 04          	mov    %ecx,0x4(%esp)
  100adb:	89 3c 24             	mov    %edi,(%esp)
  100ade:	e8 6d 0a 00 00       	call   101550 <readi>
  100ae3:	83 f8 20             	cmp    $0x20,%eax
  100ae6:	75 67                	jne    100b4f <exec+0x21f>
  100ae8:	83 7d d4 01          	cmpl   $0x1,0xffffffd4(%ebp)
  100aec:	75 c9                	jne    100ab7 <exec+0x187>
  100aee:	8b 55 dc             	mov    0xffffffdc(%ebp),%edx
  100af1:	8b 4d e8             	mov    0xffffffe8(%ebp),%ecx
  100af4:	89 d0                	mov    %edx,%eax
  100af6:	01 c8                	add    %ecx,%eax
  100af8:	39 45 90             	cmp    %eax,0xffffff90(%ebp)
  100afb:	72 52                	jb     100b4f <exec+0x21f>
  100afd:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
  100b00:	89 3c 24             	mov    %edi,(%esp)
  100b03:	89 44 24 0c          	mov    %eax,0xc(%esp)
  100b07:	8b 45 d8             	mov    0xffffffd8(%ebp),%eax
  100b0a:	89 44 24 08          	mov    %eax,0x8(%esp)
  100b0e:	8b 85 74 ff ff ff    	mov    0xffffff74(%ebp),%eax
  100b14:	01 d0                	add    %edx,%eax
  100b16:	89 44 24 04          	mov    %eax,0x4(%esp)
  100b1a:	e8 31 0a 00 00       	call   101550 <readi>
  100b1f:	3b 45 e4             	cmp    0xffffffe4(%ebp),%eax
  100b22:	89 c2                	mov    %eax,%edx
  100b24:	75 29                	jne    100b4f <exec+0x21f>
  100b26:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  100b29:	8b 4d dc             	mov    0xffffffdc(%ebp),%ecx
  100b2c:	29 d0                	sub    %edx,%eax
  100b2e:	89 44 24 08          	mov    %eax,0x8(%esp)
  100b32:	31 c0                	xor    %eax,%eax
  100b34:	89 44 24 04          	mov    %eax,0x4(%esp)
  100b38:	8b 85 74 ff ff ff    	mov    0xffffff74(%ebp),%eax
  100b3e:	01 c8                	add    %ecx,%eax
  100b40:	01 d0                	add    %edx,%eax
  100b42:	89 04 24             	mov    %eax,(%esp)
  100b45:	e8 36 34 00 00       	call   103f80 <memset>
  100b4a:	e9 68 ff ff ff       	jmp    100ab7 <exec+0x187>
  100b4f:	8b 4d 90             	mov    0xffffff90(%ebp),%ecx
  100b52:	8b 85 74 ff ff ff    	mov    0xffffff74(%ebp),%eax
  100b58:	89 4c 24 04          	mov    %ecx,0x4(%esp)
  100b5c:	89 04 24             	mov    %eax,(%esp)
  100b5f:	e8 bc 17 00 00       	call   102320 <kfree>
  100b64:	e9 1d fe ff ff       	jmp    100986 <exec+0x56>
  100b69:	89 3c 24             	mov    %edi,(%esp)
  100b6c:	e8 2f 10 00 00       	call   101ba0 <iunlockput>
  100b71:	8b 45 90             	mov    0xffffff90(%ebp),%eax
  100b74:	8b 5d 84             	mov    0xffffff84(%ebp),%ebx
  100b77:	8b 95 78 ff ff ff    	mov    0xffffff78(%ebp),%edx
  100b7d:	29 d8                	sub    %ebx,%eax
  100b7f:	c1 e2 02             	shl    $0x2,%edx
  100b82:	29 d0                	sub    %edx,%eax
  100b84:	83 e8 04             	sub    $0x4,%eax
  100b87:	89 45 80             	mov    %eax,0xffffff80(%ebp)
  100b8a:	8b 85 74 ff ff ff    	mov    0xffffff74(%ebp),%eax
  100b90:	8b 4d 80             	mov    0xffffff80(%ebp),%ecx
  100b93:	01 c8                	add    %ecx,%eax
  100b95:	8b 4d 88             	mov    0xffffff88(%ebp),%ecx
  100b98:	c7 04 08 00 00 00 00 	movl   $0x0,(%eax,%ecx,1)
  100b9f:	8b 8d 78 ff ff ff    	mov    0xffffff78(%ebp),%ecx
  100ba5:	49                   	dec    %ecx
  100ba6:	78 52                	js     100bfa <exec+0x2ca>
  100ba8:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  100bab:	8d 7c 10 fc          	lea    0xfffffffc(%eax,%edx,1),%edi
  100baf:	8b 5d 90             	mov    0xffffff90(%ebp),%ebx
  100bb2:	c7 45 8c 00 00 00 00 	movl   $0x0,0xffffff8c(%ebp)
  100bb9:	8d 74 11 fc          	lea    0xfffffffc(%ecx,%edx,1),%esi
  100bbd:	8b 06                	mov    (%esi),%eax
  100bbf:	89 04 24             	mov    %eax,(%esp)
  100bc2:	e8 79 35 00 00       	call   104140 <strlen>
  100bc7:	40                   	inc    %eax
  100bc8:	89 44 24 08          	mov    %eax,0x8(%esp)
  100bcc:	29 c3                	sub    %eax,%ebx
  100bce:	8b 06                	mov    (%esi),%eax
  100bd0:	83 ee 04             	sub    $0x4,%esi
  100bd3:	89 44 24 04          	mov    %eax,0x4(%esp)
  100bd7:	8b 85 74 ff ff ff    	mov    0xffffff74(%ebp),%eax
  100bdd:	01 d8                	add    %ebx,%eax
  100bdf:	89 04 24             	mov    %eax,(%esp)
  100be2:	e8 29 34 00 00       	call   104010 <memmove>
  100be7:	ff 45 8c             	incl   0xffffff8c(%ebp)
  100bea:	89 1f                	mov    %ebx,(%edi)
  100bec:	83 ef 04             	sub    $0x4,%edi
  100bef:	8b 45 8c             	mov    0xffffff8c(%ebp),%eax
  100bf2:	39 85 78 ff ff ff    	cmp    %eax,0xffffff78(%ebp)
  100bf8:	75 c3                	jne    100bbd <exec+0x28d>
  100bfa:	8b 55 80             	mov    0xffffff80(%ebp),%edx
  100bfd:	8b 8d 74 ff ff ff    	mov    0xffffff74(%ebp),%ecx
  100c03:	8b 85 70 ff ff ff    	mov    0xffffff70(%ebp),%eax
  100c09:	89 d6                	mov    %edx,%esi
  100c0b:	89 54 0a fc          	mov    %edx,0xfffffffc(%edx,%ecx,1)
  100c0f:	83 ee 0c             	sub    $0xc,%esi
  100c12:	89 44 0a f8          	mov    %eax,0xfffffff8(%edx,%ecx,1)
  100c16:	8b 55 08             	mov    0x8(%ebp),%edx
  100c19:	c7 04 31 ff ff ff ff 	movl   $0xffffffff,(%ecx,%esi,1)
  100c20:	0f b6 02             	movzbl (%edx),%eax
  100c23:	89 d3                	mov    %edx,%ebx
  100c25:	84 c0                	test   %al,%al
  100c27:	75 0f                	jne    100c38 <exec+0x308>
  100c29:	eb 18                	jmp    100c43 <exec+0x313>
  100c2b:	90                   	nop    
  100c2c:	8d 74 26 00          	lea    0x0(%esi),%esi
  100c30:	42                   	inc    %edx
  100c31:	0f b6 02             	movzbl (%edx),%eax
  100c34:	84 c0                	test   %al,%al
  100c36:	74 0b                	je     100c43 <exec+0x313>
  100c38:	3c 2f                	cmp    $0x2f,%al
  100c3a:	75 f4                	jne    100c30 <exec+0x300>
  100c3c:	8d 5a 01             	lea    0x1(%edx),%ebx
  100c3f:	89 da                	mov    %ebx,%edx
  100c41:	eb ee                	jmp    100c31 <exec+0x301>
  100c43:	e8 78 26 00 00       	call   1032c0 <curproc>
  100c48:	ba 10 00 00 00       	mov    $0x10,%edx
  100c4d:	89 54 24 08          	mov    %edx,0x8(%esp)
  100c51:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  100c55:	05 88 00 00 00       	add    $0x88,%eax
  100c5a:	89 04 24             	mov    %eax,(%esp)
  100c5d:	e8 ae 34 00 00       	call   104110 <safestrcpy>
  100c62:	e8 59 26 00 00       	call   1032c0 <curproc>
  100c67:	8b 58 04             	mov    0x4(%eax),%ebx
  100c6a:	e8 51 26 00 00       	call   1032c0 <curproc>
  100c6f:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  100c73:	8b 00                	mov    (%eax),%eax
  100c75:	89 04 24             	mov    %eax,(%esp)
  100c78:	e8 a3 16 00 00       	call   102320 <kfree>
  100c7d:	e8 3e 26 00 00       	call   1032c0 <curproc>
  100c82:	8b 8d 74 ff ff ff    	mov    0xffffff74(%ebp),%ecx
  100c88:	89 08                	mov    %ecx,(%eax)
  100c8a:	e8 31 26 00 00       	call   1032c0 <curproc>
  100c8f:	8b 55 90             	mov    0xffffff90(%ebp),%edx
  100c92:	89 50 04             	mov    %edx,0x4(%eax)
  100c95:	e8 26 26 00 00       	call   1032c0 <curproc>
  100c9a:	8b 90 84 00 00 00    	mov    0x84(%eax),%edx
  100ca0:	8b 45 b8             	mov    0xffffffb8(%ebp),%eax
  100ca3:	89 42 30             	mov    %eax,0x30(%edx)
  100ca6:	e8 15 26 00 00       	call   1032c0 <curproc>
  100cab:	8b 80 84 00 00 00    	mov    0x84(%eax),%eax
  100cb1:	89 70 3c             	mov    %esi,0x3c(%eax)
  100cb4:	e8 07 26 00 00       	call   1032c0 <curproc>
  100cb9:	89 04 24             	mov    %eax,(%esp)
  100cbc:	e8 4f 2a 00 00       	call   103710 <setupsegs>
  100cc1:	31 c0                	xor    %eax,%eax
  100cc3:	e9 cb fc ff ff       	jmp    100993 <exec+0x63>
  100cc8:	31 f6                	xor    %esi,%esi
  100cca:	31 db                	xor    %ebx,%ebx
  100ccc:	b8 03 20 00 00       	mov    $0x2003,%eax
  100cd1:	89 b5 78 ff ff ff    	mov    %esi,0xffffff78(%ebp)
  100cd7:	89 9d 70 ff ff ff    	mov    %ebx,0xffffff70(%ebp)
  100cdd:	c7 45 84 00 00 00 00 	movl   $0x0,0xffffff84(%ebp)
  100ce4:	c7 45 88 00 00 00 00 	movl   $0x0,0xffffff88(%ebp)
  100ceb:	e9 72 fd ff ff       	jmp    100a62 <exec+0x132>

00100cf0 <filewrite>:

// Write to file f.  Addr is kernel address.
int
filewrite(struct file *f, char *addr, int n)
{
  100cf0:	55                   	push   %ebp
  100cf1:	89 e5                	mov    %esp,%ebp
  100cf3:	83 ec 28             	sub    $0x28,%esp
  100cf6:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  100cf9:	8b 5d 08             	mov    0x8(%ebp),%ebx
  100cfc:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  100cff:	8b 75 10             	mov    0x10(%ebp),%esi
  100d02:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  100d05:	8b 7d 0c             	mov    0xc(%ebp),%edi
  int r;

  if(f->writable == 0)
  100d08:	80 7b 09 00          	cmpb   $0x0,0x9(%ebx)
  100d0c:	74 54                	je     100d62 <filewrite+0x72>
    return -1;
  if(f->type == FD_PIPE)
  100d0e:	8b 03                	mov    (%ebx),%eax
  100d10:	83 f8 02             	cmp    $0x2,%eax
  100d13:	74 54                	je     100d69 <filewrite+0x79>
    return pipewrite(f->pipe, addr, n);
  if(f->type == FD_INODE){
  100d15:	83 f8 03             	cmp    $0x3,%eax
  100d18:	75 66                	jne    100d80 <filewrite+0x90>
    ilock(f->ip);
  100d1a:	8b 43 10             	mov    0x10(%ebx),%eax
  100d1d:	89 04 24             	mov    %eax,(%esp)
  100d20:	e8 9b 0e 00 00       	call   101bc0 <ilock>
    if((r = writei(f->ip, addr, f->off, n)) > 0)
  100d25:	89 74 24 0c          	mov    %esi,0xc(%esp)
  100d29:	8b 43 14             	mov    0x14(%ebx),%eax
  100d2c:	89 7c 24 04          	mov    %edi,0x4(%esp)
  100d30:	89 44 24 08          	mov    %eax,0x8(%esp)
  100d34:	8b 43 10             	mov    0x10(%ebx),%eax
  100d37:	89 04 24             	mov    %eax,(%esp)
  100d3a:	e8 e1 06 00 00       	call   101420 <writei>
  100d3f:	85 c0                	test   %eax,%eax
  100d41:	89 c6                	mov    %eax,%esi
  100d43:	7e 03                	jle    100d48 <filewrite+0x58>
      f->off += r;
  100d45:	01 43 14             	add    %eax,0x14(%ebx)
    iunlock(f->ip);
  100d48:	8b 43 10             	mov    0x10(%ebx),%eax
  100d4b:	89 04 24             	mov    %eax,(%esp)
  100d4e:	e8 fd 0d 00 00       	call   101b50 <iunlock>
    return r;
  }
  panic("filewrite");
}
  100d53:	89 f0                	mov    %esi,%eax
  100d55:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  100d58:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  100d5b:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  100d5e:	89 ec                	mov    %ebp,%esp
  100d60:	5d                   	pop    %ebp
  100d61:	c3                   	ret    
  100d62:	be ff ff ff ff       	mov    $0xffffffff,%esi
  100d67:	eb ea                	jmp    100d53 <filewrite+0x63>
  100d69:	8b 43 0c             	mov    0xc(%ebx),%eax
  100d6c:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  100d6f:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  100d72:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  100d75:	89 45 08             	mov    %eax,0x8(%ebp)
  100d78:	89 ec                	mov    %ebp,%esp
  100d7a:	5d                   	pop    %ebp
  100d7b:	e9 30 21 00 00       	jmp    102eb0 <pipewrite>
  100d80:	c7 04 24 4a 5e 10 00 	movl   $0x105e4a,(%esp)
  100d87:	e8 24 fb ff ff       	call   1008b0 <panic>
  100d8c:	8d 74 26 00          	lea    0x0(%esi),%esi

00100d90 <fileread>:
  100d90:	55                   	push   %ebp
  100d91:	89 e5                	mov    %esp,%ebp
  100d93:	83 ec 28             	sub    $0x28,%esp
  100d96:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  100d99:	8b 5d 08             	mov    0x8(%ebp),%ebx
  100d9c:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  100d9f:	8b 75 10             	mov    0x10(%ebp),%esi
  100da2:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  100da5:	8b 7d 0c             	mov    0xc(%ebp),%edi
  100da8:	80 7b 08 00          	cmpb   $0x0,0x8(%ebx)
  100dac:	74 54                	je     100e02 <fileread+0x72>
  100dae:	8b 03                	mov    (%ebx),%eax
  100db0:	83 f8 02             	cmp    $0x2,%eax
  100db3:	74 54                	je     100e09 <fileread+0x79>
  100db5:	83 f8 03             	cmp    $0x3,%eax
  100db8:	75 66                	jne    100e20 <fileread+0x90>
  100dba:	8b 43 10             	mov    0x10(%ebx),%eax
  100dbd:	89 04 24             	mov    %eax,(%esp)
  100dc0:	e8 fb 0d 00 00       	call   101bc0 <ilock>
  100dc5:	89 74 24 0c          	mov    %esi,0xc(%esp)
  100dc9:	8b 43 14             	mov    0x14(%ebx),%eax
  100dcc:	89 7c 24 04          	mov    %edi,0x4(%esp)
  100dd0:	89 44 24 08          	mov    %eax,0x8(%esp)
  100dd4:	8b 43 10             	mov    0x10(%ebx),%eax
  100dd7:	89 04 24             	mov    %eax,(%esp)
  100dda:	e8 71 07 00 00       	call   101550 <readi>
  100ddf:	85 c0                	test   %eax,%eax
  100de1:	89 c6                	mov    %eax,%esi
  100de3:	7e 03                	jle    100de8 <fileread+0x58>
  100de5:	01 43 14             	add    %eax,0x14(%ebx)
  100de8:	8b 43 10             	mov    0x10(%ebx),%eax
  100deb:	89 04 24             	mov    %eax,(%esp)
  100dee:	e8 5d 0d 00 00       	call   101b50 <iunlock>
  100df3:	89 f0                	mov    %esi,%eax
  100df5:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  100df8:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  100dfb:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  100dfe:	89 ec                	mov    %ebp,%esp
  100e00:	5d                   	pop    %ebp
  100e01:	c3                   	ret    
  100e02:	be ff ff ff ff       	mov    $0xffffffff,%esi
  100e07:	eb ea                	jmp    100df3 <fileread+0x63>
  100e09:	8b 43 0c             	mov    0xc(%ebx),%eax
  100e0c:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  100e0f:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  100e12:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  100e15:	89 45 08             	mov    %eax,0x8(%ebp)
  100e18:	89 ec                	mov    %ebp,%esp
  100e1a:	5d                   	pop    %ebp
  100e1b:	e9 c0 1f 00 00       	jmp    102de0 <piperead>
  100e20:	c7 04 24 54 5e 10 00 	movl   $0x105e54,(%esp)
  100e27:	e8 84 fa ff ff       	call   1008b0 <panic>
  100e2c:	8d 74 26 00          	lea    0x0(%esi),%esi

00100e30 <filestat>:
  100e30:	55                   	push   %ebp
  100e31:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  100e36:	89 e5                	mov    %esp,%ebp
  100e38:	53                   	push   %ebx
  100e39:	83 ec 14             	sub    $0x14,%esp
  100e3c:	8b 5d 08             	mov    0x8(%ebp),%ebx
  100e3f:	83 3b 03             	cmpl   $0x3,(%ebx)
  100e42:	74 0c                	je     100e50 <filestat+0x20>
  100e44:	83 c4 14             	add    $0x14,%esp
  100e47:	5b                   	pop    %ebx
  100e48:	5d                   	pop    %ebp
  100e49:	c3                   	ret    
  100e4a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  100e50:	8b 43 10             	mov    0x10(%ebx),%eax
  100e53:	89 04 24             	mov    %eax,(%esp)
  100e56:	e8 65 0d 00 00       	call   101bc0 <ilock>
  100e5b:	8b 45 0c             	mov    0xc(%ebp),%eax
  100e5e:	89 44 24 04          	mov    %eax,0x4(%esp)
  100e62:	8b 43 10             	mov    0x10(%ebx),%eax
  100e65:	89 04 24             	mov    %eax,(%esp)
  100e68:	e8 d3 01 00 00       	call   101040 <stati>
  100e6d:	8b 43 10             	mov    0x10(%ebx),%eax
  100e70:	89 04 24             	mov    %eax,(%esp)
  100e73:	e8 d8 0c 00 00       	call   101b50 <iunlock>
  100e78:	83 c4 14             	add    $0x14,%esp
  100e7b:	31 c0                	xor    %eax,%eax
  100e7d:	5b                   	pop    %ebx
  100e7e:	5d                   	pop    %ebp
  100e7f:	c3                   	ret    

00100e80 <filedup>:
  100e80:	55                   	push   %ebp
  100e81:	89 e5                	mov    %esp,%ebp
  100e83:	53                   	push   %ebx
  100e84:	83 ec 04             	sub    $0x4,%esp
  100e87:	8b 5d 08             	mov    0x8(%ebp),%ebx
  100e8a:	c7 04 24 e0 99 10 00 	movl   $0x1099e0,(%esp)
  100e91:	e8 7a 30 00 00       	call   103f10 <acquire>
  100e96:	8b 43 04             	mov    0x4(%ebx),%eax
  100e99:	85 c0                	test   %eax,%eax
  100e9b:	7e 06                	jle    100ea3 <filedup+0x23>
  100e9d:	8b 0b                	mov    (%ebx),%ecx
  100e9f:	85 c9                	test   %ecx,%ecx
  100ea1:	75 0d                	jne    100eb0 <filedup+0x30>
  100ea3:	c7 04 24 5d 5e 10 00 	movl   $0x105e5d,(%esp)
  100eaa:	e8 01 fa ff ff       	call   1008b0 <panic>
  100eaf:	90                   	nop    
  100eb0:	40                   	inc    %eax
  100eb1:	89 43 04             	mov    %eax,0x4(%ebx)
  100eb4:	c7 04 24 e0 99 10 00 	movl   $0x1099e0,(%esp)
  100ebb:	e8 10 30 00 00       	call   103ed0 <release>
  100ec0:	89 d8                	mov    %ebx,%eax
  100ec2:	5a                   	pop    %edx
  100ec3:	5b                   	pop    %ebx
  100ec4:	5d                   	pop    %ebp
  100ec5:	c3                   	ret    
  100ec6:	8d 76 00             	lea    0x0(%esi),%esi
  100ec9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00100ed0 <filealloc>:
  100ed0:	55                   	push   %ebp
  100ed1:	89 e5                	mov    %esp,%ebp
  100ed3:	53                   	push   %ebx
  100ed4:	31 db                	xor    %ebx,%ebx
  100ed6:	83 ec 04             	sub    $0x4,%esp
  100ed9:	c7 04 24 e0 99 10 00 	movl   $0x1099e0,(%esp)
  100ee0:	e8 2b 30 00 00       	call   103f10 <acquire>
  100ee5:	31 d2                	xor    %edx,%edx
  100ee7:	31 c0                	xor    %eax,%eax
  100ee9:	eb 11                	jmp    100efc <filealloc+0x2c>
  100eeb:	90                   	nop    
  100eec:	8d 74 26 00          	lea    0x0(%esi),%esi
  100ef0:	42                   	inc    %edx
  100ef1:	83 c3 18             	add    $0x18,%ebx
  100ef4:	83 c0 18             	add    $0x18,%eax
  100ef7:	83 fa 64             	cmp    $0x64,%edx
  100efa:	74 36                	je     100f32 <filealloc+0x62>
  100efc:	8b 88 80 90 10 00    	mov    0x109080(%eax),%ecx
  100f02:	85 c9                	test   %ecx,%ecx
  100f04:	75 ea                	jne    100ef0 <filealloc+0x20>
  100f06:	b8 01 00 00 00       	mov    $0x1,%eax
  100f0b:	89 83 80 90 10 00    	mov    %eax,0x109080(%ebx)
  100f11:	b8 01 00 00 00       	mov    $0x1,%eax
  100f16:	89 83 84 90 10 00    	mov    %eax,0x109084(%ebx)
  100f1c:	c7 04 24 e0 99 10 00 	movl   $0x1099e0,(%esp)
  100f23:	e8 a8 2f 00 00       	call   103ed0 <release>
  100f28:	8d 83 80 90 10 00    	lea    0x109080(%ebx),%eax
  100f2e:	5b                   	pop    %ebx
  100f2f:	5b                   	pop    %ebx
  100f30:	5d                   	pop    %ebp
  100f31:	c3                   	ret    
  100f32:	c7 04 24 e0 99 10 00 	movl   $0x1099e0,(%esp)
  100f39:	e8 92 2f 00 00       	call   103ed0 <release>
  100f3e:	31 c0                	xor    %eax,%eax
  100f40:	5b                   	pop    %ebx
  100f41:	5b                   	pop    %ebx
  100f42:	5d                   	pop    %ebp
  100f43:	c3                   	ret    
  100f44:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  100f4a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi

00100f50 <fileclose>:
  100f50:	55                   	push   %ebp
  100f51:	89 e5                	mov    %esp,%ebp
  100f53:	83 ec 28             	sub    $0x28,%esp
  100f56:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  100f59:	8b 5d 08             	mov    0x8(%ebp),%ebx
  100f5c:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  100f5f:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  100f62:	c7 04 24 e0 99 10 00 	movl   $0x1099e0,(%esp)
  100f69:	e8 a2 2f 00 00       	call   103f10 <acquire>
  100f6e:	8b 43 04             	mov    0x4(%ebx),%eax
  100f71:	85 c0                	test   %eax,%eax
  100f73:	7e 2b                	jle    100fa0 <fileclose+0x50>
  100f75:	8b 33                	mov    (%ebx),%esi
  100f77:	85 f6                	test   %esi,%esi
  100f79:	74 25                	je     100fa0 <fileclose+0x50>
  100f7b:	48                   	dec    %eax
  100f7c:	85 c0                	test   %eax,%eax
  100f7e:	89 43 04             	mov    %eax,0x4(%ebx)
  100f81:	7e 2d                	jle    100fb0 <fileclose+0x60>
  100f83:	c7 45 08 e0 99 10 00 	movl   $0x1099e0,0x8(%ebp)
  100f8a:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  100f8d:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  100f90:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  100f93:	89 ec                	mov    %ebp,%esp
  100f95:	5d                   	pop    %ebp
  100f96:	e9 35 2f 00 00       	jmp    103ed0 <release>
  100f9b:	90                   	nop    
  100f9c:	8d 74 26 00          	lea    0x0(%esi),%esi
  100fa0:	c7 04 24 65 5e 10 00 	movl   $0x105e65,(%esp)
  100fa7:	e8 04 f9 ff ff       	call   1008b0 <panic>
  100fac:	8d 74 26 00          	lea    0x0(%esi),%esi
  100fb0:	8b 43 0c             	mov    0xc(%ebx),%eax
  100fb3:	8b 33                	mov    (%ebx),%esi
  100fb5:	8b 7b 10             	mov    0x10(%ebx),%edi
  100fb8:	c7 43 04 00 00 00 00 	movl   $0x0,0x4(%ebx)
  100fbf:	89 45 ec             	mov    %eax,0xffffffec(%ebp)
  100fc2:	0f b6 43 09          	movzbl 0x9(%ebx),%eax
  100fc6:	c7 03 00 00 00 00    	movl   $0x0,(%ebx)
  100fcc:	88 45 f3             	mov    %al,0xfffffff3(%ebp)
  100fcf:	c7 04 24 e0 99 10 00 	movl   $0x1099e0,(%esp)
  100fd6:	e8 f5 2e 00 00       	call   103ed0 <release>
  100fdb:	83 fe 02             	cmp    $0x2,%esi
  100fde:	74 19                	je     100ff9 <fileclose+0xa9>
  100fe0:	83 fe 03             	cmp    $0x3,%esi
  100fe3:	75 bb                	jne    100fa0 <fileclose+0x50>
  100fe5:	89 7d 08             	mov    %edi,0x8(%ebp)
  100fe8:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  100feb:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  100fee:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  100ff1:	89 ec                	mov    %ebp,%esp
  100ff3:	5d                   	pop    %ebp
  100ff4:	e9 27 09 00 00       	jmp    101920 <iput>
  100ff9:	0f be 45 f3          	movsbl 0xfffffff3(%ebp),%eax
  100ffd:	89 44 24 04          	mov    %eax,0x4(%esp)
  101001:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  101004:	89 04 24             	mov    %eax,(%esp)
  101007:	e8 64 1f 00 00       	call   102f70 <pipeclose>
  10100c:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  10100f:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  101012:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  101015:	89 ec                	mov    %ebp,%esp
  101017:	5d                   	pop    %ebp
  101018:	c3                   	ret    
  101019:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00101020 <fileinit>:
  101020:	55                   	push   %ebp
  101021:	b8 6f 5e 10 00       	mov    $0x105e6f,%eax
  101026:	89 e5                	mov    %esp,%ebp
  101028:	83 ec 08             	sub    $0x8,%esp
  10102b:	89 44 24 04          	mov    %eax,0x4(%esp)
  10102f:	c7 04 24 e0 99 10 00 	movl   $0x1099e0,(%esp)
  101036:	e8 f5 2c 00 00       	call   103d30 <initlock>
  10103b:	c9                   	leave  
  10103c:	c3                   	ret    
  10103d:	90                   	nop    
  10103e:	90                   	nop    
  10103f:	90                   	nop    

00101040 <stati>:

// Copy stat information from inode.
void
stati(struct inode *ip, struct stat *st)
{
  101040:	55                   	push   %ebp
  101041:	89 e5                	mov    %esp,%ebp
  101043:	8b 55 08             	mov    0x8(%ebp),%edx
  101046:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  st->dev = ip->dev;
  101049:	8b 02                	mov    (%edx),%eax
  10104b:	89 01                	mov    %eax,(%ecx)
  st->ino = ip->inum;
  10104d:	8b 42 04             	mov    0x4(%edx),%eax
  101050:	89 41 04             	mov    %eax,0x4(%ecx)
  st->type = ip->type;
  101053:	8b 42 10             	mov    0x10(%edx),%eax
  101056:	66 89 41 08          	mov    %ax,0x8(%ecx)
  st->nlink = ip->nlink;
  10105a:	0f b7 42 16          	movzwl 0x16(%edx),%eax
  10105e:	66 89 41 0a          	mov    %ax,0xa(%ecx)
  st->size = ip->size;
  101062:	8b 42 18             	mov    0x18(%edx),%eax
  101065:	89 41 0c             	mov    %eax,0xc(%ecx)
}
  101068:	5d                   	pop    %ebp
  101069:	c3                   	ret    
  10106a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

00101070 <idup>:
  101070:	55                   	push   %ebp
  101071:	89 e5                	mov    %esp,%ebp
  101073:	53                   	push   %ebx
  101074:	83 ec 04             	sub    $0x4,%esp
  101077:	8b 5d 08             	mov    0x8(%ebp),%ebx
  10107a:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  101081:	e8 8a 2e 00 00       	call   103f10 <acquire>
  101086:	ff 43 08             	incl   0x8(%ebx)
  101089:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  101090:	e8 3b 2e 00 00       	call   103ed0 <release>
  101095:	89 d8                	mov    %ebx,%eax
  101097:	5a                   	pop    %edx
  101098:	5b                   	pop    %ebx
  101099:	5d                   	pop    %ebp
  10109a:	c3                   	ret    
  10109b:	90                   	nop    
  10109c:	8d 74 26 00          	lea    0x0(%esi),%esi

001010a0 <iget>:
  1010a0:	55                   	push   %ebp
  1010a1:	89 e5                	mov    %esp,%ebp
  1010a3:	57                   	push   %edi
  1010a4:	56                   	push   %esi
  1010a5:	53                   	push   %ebx
  1010a6:	83 ec 0c             	sub    $0xc,%esp
  1010a9:	89 45 ec             	mov    %eax,0xffffffec(%ebp)
  1010ac:	89 55 f0             	mov    %edx,0xfffffff0(%ebp)
  1010af:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  1010b6:	e8 55 2e 00 00       	call   103f10 <acquire>
  1010bb:	b8 b4 9a 10 00       	mov    $0x109ab4,%eax
  1010c0:	3d 54 aa 10 00       	cmp    $0x10aa54,%eax
  1010c5:	0f 83 9c 00 00 00    	jae    101167 <iget+0xc7>
  1010cb:	b9 80 9a 10 00       	mov    $0x109a80,%ecx
  1010d0:	89 c3                	mov    %eax,%ebx
  1010d2:	31 f6                	xor    %esi,%esi
  1010d4:	f7 d9                	neg    %ecx
  1010d6:	eb 0f                	jmp    1010e7 <iget+0x47>
  1010d8:	85 f6                	test   %esi,%esi
  1010da:	74 45                	je     101121 <iget+0x81>
  1010dc:	83 c3 50             	add    $0x50,%ebx
  1010df:	81 fb 54 aa 10 00    	cmp    $0x10aa54,%ebx
  1010e5:	74 4b                	je     101132 <iget+0x92>
  1010e7:	8d 93 b4 9a 10 00    	lea    0x109ab4(%ebx),%edx
  1010ed:	8b 44 11 d4          	mov    0xffffffd4(%ecx,%edx,1),%eax
  1010f1:	85 c0                	test   %eax,%eax
  1010f3:	7e e3                	jle    1010d8 <iget+0x38>
  1010f5:	8b 7d ec             	mov    0xffffffec(%ebp),%edi
  1010f8:	3b 7c 11 cc          	cmp    0xffffffcc(%ecx,%edx,1),%edi
  1010fc:	75 da                	jne    1010d8 <iget+0x38>
  1010fe:	8b 7d f0             	mov    0xfffffff0(%ebp),%edi
  101101:	3b 7c 11 d0          	cmp    0xffffffd0(%ecx,%edx,1),%edi
  101105:	75 d1                	jne    1010d8 <iget+0x38>
  101107:	40                   	inc    %eax
  101108:	89 43 08             	mov    %eax,0x8(%ebx)
  10110b:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  101112:	e8 b9 2d 00 00       	call   103ed0 <release>
  101117:	83 c4 0c             	add    $0xc,%esp
  10111a:	89 d8                	mov    %ebx,%eax
  10111c:	5b                   	pop    %ebx
  10111d:	5e                   	pop    %esi
  10111e:	5f                   	pop    %edi
  10111f:	5d                   	pop    %ebp
  101120:	c3                   	ret    
  101121:	85 c0                	test   %eax,%eax
  101123:	75 b7                	jne    1010dc <iget+0x3c>
  101125:	89 de                	mov    %ebx,%esi
  101127:	83 c3 50             	add    $0x50,%ebx
  10112a:	81 fb 54 aa 10 00    	cmp    $0x10aa54,%ebx
  101130:	75 b5                	jne    1010e7 <iget+0x47>
  101132:	85 f6                	test   %esi,%esi
  101134:	74 31                	je     101167 <iget+0xc7>
  101136:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  101139:	89 f3                	mov    %esi,%ebx
  10113b:	8b 7d f0             	mov    0xfffffff0(%ebp),%edi
  10113e:	c7 46 08 01 00 00 00 	movl   $0x1,0x8(%esi)
  101145:	c7 46 0c 00 00 00 00 	movl   $0x0,0xc(%esi)
  10114c:	89 06                	mov    %eax,(%esi)
  10114e:	89 7e 04             	mov    %edi,0x4(%esi)
  101151:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  101158:	e8 73 2d 00 00       	call   103ed0 <release>
  10115d:	83 c4 0c             	add    $0xc,%esp
  101160:	89 d8                	mov    %ebx,%eax
  101162:	5b                   	pop    %ebx
  101163:	5e                   	pop    %esi
  101164:	5f                   	pop    %edi
  101165:	5d                   	pop    %ebp
  101166:	c3                   	ret    
  101167:	c7 04 24 7a 5e 10 00 	movl   $0x105e7a,(%esp)
  10116e:	e8 3d f7 ff ff       	call   1008b0 <panic>
  101173:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  101179:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00101180 <readsb>:
  101180:	55                   	push   %ebp
  101181:	89 e5                	mov    %esp,%ebp
  101183:	83 ec 18             	sub    $0x18,%esp
  101186:	89 5d f8             	mov    %ebx,0xfffffff8(%ebp)
  101189:	bb 01 00 00 00       	mov    $0x1,%ebx
  10118e:	89 75 fc             	mov    %esi,0xfffffffc(%ebp)
  101191:	89 d6                	mov    %edx,%esi
  101193:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  101197:	89 04 24             	mov    %eax,(%esp)
  10119a:	e8 11 ef ff ff       	call   1000b0 <bread>
  10119f:	b9 0c 00 00 00       	mov    $0xc,%ecx
  1011a4:	89 4c 24 08          	mov    %ecx,0x8(%esp)
  1011a8:	89 34 24             	mov    %esi,(%esp)
  1011ab:	89 c3                	mov    %eax,%ebx
  1011ad:	8d 40 18             	lea    0x18(%eax),%eax
  1011b0:	89 44 24 04          	mov    %eax,0x4(%esp)
  1011b4:	e8 57 2e 00 00       	call   104010 <memmove>
  1011b9:	89 1c 24             	mov    %ebx,(%esp)
  1011bc:	e8 3f ee ff ff       	call   100000 <brelse>
  1011c1:	8b 5d f8             	mov    0xfffffff8(%ebp),%ebx
  1011c4:	8b 75 fc             	mov    0xfffffffc(%ebp),%esi
  1011c7:	89 ec                	mov    %ebp,%esp
  1011c9:	5d                   	pop    %ebp
  1011ca:	c3                   	ret    
  1011cb:	90                   	nop    
  1011cc:	8d 74 26 00          	lea    0x0(%esi),%esi

001011d0 <iupdate>:
  1011d0:	55                   	push   %ebp
  1011d1:	89 e5                	mov    %esp,%ebp
  1011d3:	56                   	push   %esi
  1011d4:	53                   	push   %ebx
  1011d5:	83 ec 10             	sub    $0x10,%esp
  1011d8:	8b 5d 08             	mov    0x8(%ebp),%ebx
  1011db:	8b 43 04             	mov    0x4(%ebx),%eax
  1011de:	c1 e8 03             	shr    $0x3,%eax
  1011e1:	83 c0 02             	add    $0x2,%eax
  1011e4:	89 44 24 04          	mov    %eax,0x4(%esp)
  1011e8:	8b 03                	mov    (%ebx),%eax
  1011ea:	89 04 24             	mov    %eax,(%esp)
  1011ed:	e8 be ee ff ff       	call   1000b0 <bread>
  1011f2:	89 c6                	mov    %eax,%esi
  1011f4:	8b 43 04             	mov    0x4(%ebx),%eax
  1011f7:	83 e0 07             	and    $0x7,%eax
  1011fa:	c1 e0 06             	shl    $0x6,%eax
  1011fd:	8d 54 06 18          	lea    0x18(%esi,%eax,1),%edx
  101201:	8b 43 10             	mov    0x10(%ebx),%eax
  101204:	66 89 02             	mov    %ax,(%edx)
  101207:	0f b7 43 12          	movzwl 0x12(%ebx),%eax
  10120b:	66 89 42 02          	mov    %ax,0x2(%edx)
  10120f:	8b 43 14             	mov    0x14(%ebx),%eax
  101212:	66 89 42 04          	mov    %ax,0x4(%edx)
  101216:	0f b7 43 16          	movzwl 0x16(%ebx),%eax
  10121a:	66 89 42 06          	mov    %ax,0x6(%edx)
  10121e:	8b 43 18             	mov    0x18(%ebx),%eax
  101221:	83 c3 1c             	add    $0x1c,%ebx
  101224:	89 42 08             	mov    %eax,0x8(%edx)
  101227:	83 c2 0c             	add    $0xc,%edx
  10122a:	b8 34 00 00 00       	mov    $0x34,%eax
  10122f:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  101233:	89 14 24             	mov    %edx,(%esp)
  101236:	89 44 24 08          	mov    %eax,0x8(%esp)
  10123a:	e8 d1 2d 00 00       	call   104010 <memmove>
  10123f:	89 34 24             	mov    %esi,(%esp)
  101242:	e8 39 ee ff ff       	call   100080 <bwrite>
  101247:	89 75 08             	mov    %esi,0x8(%ebp)
  10124a:	83 c4 10             	add    $0x10,%esp
  10124d:	5b                   	pop    %ebx
  10124e:	5e                   	pop    %esi
  10124f:	5d                   	pop    %ebp
  101250:	e9 ab ed ff ff       	jmp    100000 <brelse>
  101255:	8d 74 26 00          	lea    0x0(%esi),%esi
  101259:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00101260 <balloc>:
  101260:	55                   	push   %ebp
  101261:	89 e5                	mov    %esp,%ebp
  101263:	57                   	push   %edi
  101264:	56                   	push   %esi
  101265:	53                   	push   %ebx
  101266:	83 ec 2c             	sub    $0x2c,%esp
  101269:	8d 55 e8             	lea    0xffffffe8(%ebp),%edx
  10126c:	89 45 dc             	mov    %eax,0xffffffdc(%ebp)
  10126f:	e8 0c ff ff ff       	call   101180 <readsb>
  101274:	8b 4d e8             	mov    0xffffffe8(%ebp),%ecx
  101277:	85 c9                	test   %ecx,%ecx
  101279:	0f 84 a7 00 00 00    	je     101326 <balloc+0xc6>
  10127f:	c7 45 e0 00 00 00 00 	movl   $0x0,0xffffffe0(%ebp)
  101286:	8b 45 e0             	mov    0xffffffe0(%ebp),%eax
  101289:	31 f6                	xor    %esi,%esi
  10128b:	8b 55 e0             	mov    0xffffffe0(%ebp),%edx
  10128e:	c1 f8 1f             	sar    $0x1f,%eax
  101291:	c1 e8 14             	shr    $0x14,%eax
  101294:	01 d0                	add    %edx,%eax
  101296:	8b 55 f0             	mov    0xfffffff0(%ebp),%edx
  101299:	c1 f8 0c             	sar    $0xc,%eax
  10129c:	c1 ea 03             	shr    $0x3,%edx
  10129f:	8d 54 02 03          	lea    0x3(%edx,%eax,1),%edx
  1012a3:	8b 45 dc             	mov    0xffffffdc(%ebp),%eax
  1012a6:	89 54 24 04          	mov    %edx,0x4(%esp)
  1012aa:	89 04 24             	mov    %eax,(%esp)
  1012ad:	e8 fe ed ff ff       	call   1000b0 <bread>
  1012b2:	89 c7                	mov    %eax,%edi
  1012b4:	eb 09                	jmp    1012bf <balloc+0x5f>
  1012b6:	46                   	inc    %esi
  1012b7:	81 fe 00 10 00 00    	cmp    $0x1000,%esi
  1012bd:	74 4c                	je     10130b <balloc+0xab>
  1012bf:	89 f0                	mov    %esi,%eax
  1012c1:	bb 01 00 00 00       	mov    $0x1,%ebx
  1012c6:	c1 f8 1f             	sar    $0x1f,%eax
  1012c9:	c1 e8 1d             	shr    $0x1d,%eax
  1012cc:	8d 14 06             	lea    (%esi,%eax,1),%edx
  1012cf:	89 d1                	mov    %edx,%ecx
  1012d1:	83 e1 07             	and    $0x7,%ecx
  1012d4:	29 c1                	sub    %eax,%ecx
  1012d6:	c1 fa 03             	sar    $0x3,%edx
  1012d9:	d3 e3                	shl    %cl,%ebx
  1012db:	0f b6 4c 3a 18       	movzbl 0x18(%edx,%edi,1),%ecx
  1012e0:	0f b6 c1             	movzbl %cl,%eax
  1012e3:	85 d8                	test   %ebx,%eax
  1012e5:	75 cf                	jne    1012b6 <balloc+0x56>
  1012e7:	08 d9                	or     %bl,%cl
  1012e9:	88 4c 3a 18          	mov    %cl,0x18(%edx,%edi,1)
  1012ed:	89 3c 24             	mov    %edi,(%esp)
  1012f0:	e8 8b ed ff ff       	call   100080 <bwrite>
  1012f5:	89 3c 24             	mov    %edi,(%esp)
  1012f8:	e8 03 ed ff ff       	call   100000 <brelse>
  1012fd:	8b 55 e0             	mov    0xffffffe0(%ebp),%edx
  101300:	83 c4 2c             	add    $0x2c,%esp
  101303:	5b                   	pop    %ebx
  101304:	8d 04 16             	lea    (%esi,%edx,1),%eax
  101307:	5e                   	pop    %esi
  101308:	5f                   	pop    %edi
  101309:	5d                   	pop    %ebp
  10130a:	c3                   	ret    
  10130b:	89 3c 24             	mov    %edi,(%esp)
  10130e:	e8 ed ec ff ff       	call   100000 <brelse>
  101313:	81 45 e0 00 10 00 00 	addl   $0x1000,0xffffffe0(%ebp)
  10131a:	8b 55 e0             	mov    0xffffffe0(%ebp),%edx
  10131d:	39 55 e8             	cmp    %edx,0xffffffe8(%ebp)
  101320:	0f 87 60 ff ff ff    	ja     101286 <balloc+0x26>
  101326:	c7 04 24 8a 5e 10 00 	movl   $0x105e8a,(%esp)
  10132d:	e8 7e f5 ff ff       	call   1008b0 <panic>
  101332:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  101339:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00101340 <bmap>:
  101340:	55                   	push   %ebp
  101341:	89 e5                	mov    %esp,%ebp
  101343:	83 ec 28             	sub    $0x28,%esp
  101346:	83 fa 0b             	cmp    $0xb,%edx
  101349:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  10134c:	89 d6                	mov    %edx,%esi
  10134e:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  101351:	89 c7                	mov    %eax,%edi
  101353:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  101356:	89 4d ec             	mov    %ecx,0xffffffec(%ebp)
  101359:	77 35                	ja     101390 <bmap+0x50>
  10135b:	8b 5c 90 1c          	mov    0x1c(%eax,%edx,4),%ebx
  10135f:	85 db                	test   %ebx,%ebx
  101361:	75 1d                	jne    101380 <bmap+0x40>
  101363:	85 c9                	test   %ecx,%ecx
  101365:	74 3f                	je     1013a6 <bmap+0x66>
  101367:	8b 00                	mov    (%eax),%eax
  101369:	e8 f2 fe ff ff       	call   101260 <balloc>
  10136e:	89 c3                	mov    %eax,%ebx
  101370:	89 44 b7 1c          	mov    %eax,0x1c(%edi,%esi,4)
  101374:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  10137a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi
  101380:	89 d8                	mov    %ebx,%eax
  101382:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  101385:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  101388:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  10138b:	89 ec                	mov    %ebp,%esp
  10138d:	5d                   	pop    %ebp
  10138e:	c3                   	ret    
  10138f:	90                   	nop    
  101390:	8d 5a f4             	lea    0xfffffff4(%edx),%ebx
  101393:	83 fb 7f             	cmp    $0x7f,%ebx
  101396:	77 78                	ja     101410 <bmap+0xd0>
  101398:	8b 40 4c             	mov    0x4c(%eax),%eax
  10139b:	85 c0                	test   %eax,%eax
  10139d:	75 1b                	jne    1013ba <bmap+0x7a>
  10139f:	8b 75 ec             	mov    0xffffffec(%ebp),%esi
  1013a2:	85 f6                	test   %esi,%esi
  1013a4:	75 0a                	jne    1013b0 <bmap+0x70>
  1013a6:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
  1013ab:	eb d3                	jmp    101380 <bmap+0x40>
  1013ad:	8d 76 00             	lea    0x0(%esi),%esi
  1013b0:	8b 07                	mov    (%edi),%eax
  1013b2:	e8 a9 fe ff ff       	call   101260 <balloc>
  1013b7:	89 47 4c             	mov    %eax,0x4c(%edi)
  1013ba:	89 44 24 04          	mov    %eax,0x4(%esp)
  1013be:	8b 07                	mov    (%edi),%eax
  1013c0:	89 04 24             	mov    %eax,(%esp)
  1013c3:	e8 e8 ec ff ff       	call   1000b0 <bread>
  1013c8:	8d 5c 98 18          	lea    0x18(%eax,%ebx,4),%ebx
  1013cc:	89 c6                	mov    %eax,%esi
  1013ce:	89 5d f0             	mov    %ebx,0xfffffff0(%ebp)
  1013d1:	8b 1b                	mov    (%ebx),%ebx
  1013d3:	85 db                	test   %ebx,%ebx
  1013d5:	75 2c                	jne    101403 <bmap+0xc3>
  1013d7:	8b 5d ec             	mov    0xffffffec(%ebp),%ebx
  1013da:	85 db                	test   %ebx,%ebx
  1013dc:	75 0f                	jne    1013ed <bmap+0xad>
  1013de:	89 34 24             	mov    %esi,(%esp)
  1013e1:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
  1013e6:	e8 15 ec ff ff       	call   100000 <brelse>
  1013eb:	eb 93                	jmp    101380 <bmap+0x40>
  1013ed:	8b 07                	mov    (%edi),%eax
  1013ef:	e8 6c fe ff ff       	call   101260 <balloc>
  1013f4:	89 c3                	mov    %eax,%ebx
  1013f6:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  1013f9:	89 18                	mov    %ebx,(%eax)
  1013fb:	89 34 24             	mov    %esi,(%esp)
  1013fe:	e8 7d ec ff ff       	call   100080 <bwrite>
  101403:	89 34 24             	mov    %esi,(%esp)
  101406:	e8 f5 eb ff ff       	call   100000 <brelse>
  10140b:	e9 70 ff ff ff       	jmp    101380 <bmap+0x40>
  101410:	c7 04 24 a0 5e 10 00 	movl   $0x105ea0,(%esp)
  101417:	e8 94 f4 ff ff       	call   1008b0 <panic>
  10141c:	8d 74 26 00          	lea    0x0(%esi),%esi

00101420 <writei>:

// Read data from inode.
int
readi(struct inode *ip, char *dst, uint off, uint n)
{
  uint tot, m;
  struct buf *bp;

  if(ip->type == T_DEV){
    if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].read)
      return -1;
    return devsw[ip->major].read(ip, dst, n);
  }

  if(off > ip->size || off + n < off)
    return -1;
  if(off + n > ip->size)
    n = ip->size - off;

  for(tot=0; tot<n; tot+=m, off+=m, dst+=m){
    bp = bread(ip->dev, bmap(ip, off/BSIZE, 0));
    m = min(n - tot, BSIZE - off%BSIZE);
    memmove(dst, bp->data + off%BSIZE, m);
    brelse(bp);
  }
  return n;
}

// Write data to inode.
int
writei(struct inode *ip, char *src, uint off, uint n)
{
  101420:	55                   	push   %ebp
  101421:	89 e5                	mov    %esp,%ebp
  101423:	57                   	push   %edi
  101424:	56                   	push   %esi
  101425:	53                   	push   %ebx
  101426:	83 ec 1c             	sub    $0x1c,%esp
  101429:	8b 45 08             	mov    0x8(%ebp),%eax
  10142c:	8b 55 0c             	mov    0xc(%ebp),%edx
  10142f:	8b 7d 10             	mov    0x10(%ebp),%edi
  101432:	89 45 ec             	mov    %eax,0xffffffec(%ebp)
  101435:	8b 45 14             	mov    0x14(%ebp),%eax
  101438:	89 55 e8             	mov    %edx,0xffffffe8(%ebp)
  uint tot, m;
  struct buf *bp;

  if(ip->type == T_DEV){
  10143b:	8b 55 ec             	mov    0xffffffec(%ebp),%edx
  10143e:	89 45 e4             	mov    %eax,0xffffffe4(%ebp)
  101441:	66 83 7a 10 03       	cmpw   $0x3,0x10(%edx)
  101446:	0f 84 c0 00 00 00    	je     10150c <writei+0xec>
    if(ip->major < 0 || ip->major >= NDEV || !devsw[ip->major].write)
      return -1;
    return devsw[ip->major].write(ip, src, n);
  }

  if(off + n < off)
  10144c:	8b 55 e4             	mov    0xffffffe4(%ebp),%edx
  10144f:	8d 04 17             	lea    (%edi,%edx,1),%eax
  101452:	39 c7                	cmp    %eax,%edi
  101454:	0f 87 bc 00 00 00    	ja     101516 <writei+0xf6>
    return -1;
  if(off + n > MAXFILE*BSIZE)
  10145a:	3d 00 18 01 00       	cmp    $0x11800,%eax
  10145f:	76 0a                	jbe    10146b <writei+0x4b>
    n = MAXFILE*BSIZE - off;
  101461:	c7 45 e4 00 18 01 00 	movl   $0x11800,0xffffffe4(%ebp)
  101468:	29 7d e4             	sub    %edi,0xffffffe4(%ebp)

  for(tot=0; tot<n; tot+=m, off+=m, src+=m){
  10146b:	8b 5d e4             	mov    0xffffffe4(%ebp),%ebx
  10146e:	85 db                	test   %ebx,%ebx
  101470:	0f 84 8b 00 00 00    	je     101501 <writei+0xe1>
  101476:	c7 45 f0 00 00 00 00 	movl   $0x0,0xfffffff0(%ebp)
  10147d:	8d 76 00             	lea    0x0(%esi),%esi
    bp = bread(ip->dev, bmap(ip, off/BSIZE, 1));
  101480:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  101483:	89 fa                	mov    %edi,%edx
  101485:	b9 01 00 00 00       	mov    $0x1,%ecx
  10148a:	c1 ea 09             	shr    $0x9,%edx
    m = min(n - tot, BSIZE - off%BSIZE);
  10148d:	bb 00 02 00 00       	mov    $0x200,%ebx
  101492:	e8 a9 fe ff ff       	call   101340 <bmap>
  101497:	89 44 24 04          	mov    %eax,0x4(%esp)
  10149b:	8b 55 ec             	mov    0xffffffec(%ebp),%edx
  10149e:	8b 02                	mov    (%edx),%eax
  1014a0:	89 04 24             	mov    %eax,(%esp)
  1014a3:	e8 08 ec ff ff       	call   1000b0 <bread>
  1014a8:	8b 4d f0             	mov    0xfffffff0(%ebp),%ecx
  1014ab:	89 fa                	mov    %edi,%edx
  1014ad:	81 e2 ff 01 00 00    	and    $0x1ff,%edx
  1014b3:	29 d3                	sub    %edx,%ebx
  1014b5:	89 c6                	mov    %eax,%esi
  1014b7:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
  1014ba:	29 c8                	sub    %ecx,%eax
  1014bc:	39 c3                	cmp    %eax,%ebx
  1014be:	76 02                	jbe    1014c2 <writei+0xa2>
  1014c0:	89 c3                	mov    %eax,%ebx
    memmove(bp->data + off%BSIZE, src, m);
  1014c2:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  1014c6:	01 df                	add    %ebx,%edi
  1014c8:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  1014cb:	89 44 24 04          	mov    %eax,0x4(%esp)
  1014cf:	8d 44 16 18          	lea    0x18(%esi,%edx,1),%eax
  1014d3:	89 04 24             	mov    %eax,(%esp)
  1014d6:	e8 35 2b 00 00       	call   104010 <memmove>
    bwrite(bp);
  1014db:	89 34 24             	mov    %esi,(%esp)
  1014de:	e8 9d eb ff ff       	call   100080 <bwrite>
    brelse(bp);
  1014e3:	89 34 24             	mov    %esi,(%esp)
  1014e6:	e8 15 eb ff ff       	call   100000 <brelse>
  1014eb:	01 5d f0             	add    %ebx,0xfffffff0(%ebp)
  1014ee:	01 5d e8             	add    %ebx,0xffffffe8(%ebp)
  1014f1:	8b 55 f0             	mov    0xfffffff0(%ebp),%edx
  1014f4:	39 55 e4             	cmp    %edx,0xffffffe4(%ebp)
  1014f7:	77 87                	ja     101480 <writei+0x60>
  }

  if(n > 0 && off > ip->size){
  1014f9:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  1014fc:	39 78 18             	cmp    %edi,0x18(%eax)
  1014ff:	72 22                	jb     101523 <writei+0x103>
    ip->size = off;
    iupdate(ip);
  }
  return n;
  101501:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
}
  101504:	83 c4 1c             	add    $0x1c,%esp
  101507:	5b                   	pop    %ebx
  101508:	5e                   	pop    %esi
  101509:	5f                   	pop    %edi
  10150a:	5d                   	pop    %ebp
  10150b:	c3                   	ret    
  10150c:	0f bf 42 12          	movswl 0x12(%edx),%eax
  101510:	66 83 f8 09          	cmp    $0x9,%ax
  101514:	76 1a                	jbe    101530 <writei+0x110>
  101516:	83 c4 1c             	add    $0x1c,%esp
  101519:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  10151e:	5b                   	pop    %ebx
  10151f:	5e                   	pop    %esi
  101520:	5f                   	pop    %edi
  101521:	5d                   	pop    %ebp
  101522:	c3                   	ret    
  101523:	89 78 18             	mov    %edi,0x18(%eax)
  101526:	89 04 24             	mov    %eax,(%esp)
  101529:	e8 a2 fc ff ff       	call   1011d0 <iupdate>
  10152e:	eb d1                	jmp    101501 <writei+0xe1>
  101530:	8b 0c c5 24 9a 10 00 	mov    0x109a24(,%eax,8),%ecx
  101537:	85 c9                	test   %ecx,%ecx
  101539:	74 db                	je     101516 <writei+0xf6>
  10153b:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
  10153e:	89 45 10             	mov    %eax,0x10(%ebp)
  101541:	83 c4 1c             	add    $0x1c,%esp
  101544:	5b                   	pop    %ebx
  101545:	5e                   	pop    %esi
  101546:	5f                   	pop    %edi
  101547:	5d                   	pop    %ebp
  101548:	ff e1                	jmp    *%ecx
  10154a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

00101550 <readi>:
  101550:	55                   	push   %ebp
  101551:	89 e5                	mov    %esp,%ebp
  101553:	83 ec 28             	sub    $0x28,%esp
  101556:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  101559:	8b 7d 08             	mov    0x8(%ebp),%edi
  10155c:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  10155f:	8b 45 0c             	mov    0xc(%ebp),%eax
  101562:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  101565:	8b 4d 14             	mov    0x14(%ebp),%ecx
  101568:	8b 5d 10             	mov    0x10(%ebp),%ebx
  10156b:	66 83 7f 10 03       	cmpw   $0x3,0x10(%edi)
  101570:	89 45 e8             	mov    %eax,0xffffffe8(%ebp)
  101573:	89 4d e4             	mov    %ecx,0xffffffe4(%ebp)
  101576:	74 19                	je     101591 <readi+0x41>
  101578:	8b 47 18             	mov    0x18(%edi),%eax
  10157b:	39 d8                	cmp    %ebx,%eax
  10157d:	73 3b                	jae    1015ba <readi+0x6a>
  10157f:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  101584:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  101587:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  10158a:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  10158d:	89 ec                	mov    %ebp,%esp
  10158f:	5d                   	pop    %ebp
  101590:	c3                   	ret    
  101591:	0f bf 47 12          	movswl 0x12(%edi),%eax
  101595:	66 83 f8 09          	cmp    $0x9,%ax
  101599:	77 e4                	ja     10157f <readi+0x2f>
  10159b:	8b 0c c5 20 9a 10 00 	mov    0x109a20(,%eax,8),%ecx
  1015a2:	85 c9                	test   %ecx,%ecx
  1015a4:	74 d9                	je     10157f <readi+0x2f>
  1015a6:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
  1015a9:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  1015ac:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  1015af:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  1015b2:	89 45 10             	mov    %eax,0x10(%ebp)
  1015b5:	89 ec                	mov    %ebp,%esp
  1015b7:	5d                   	pop    %ebp
  1015b8:	ff e1                	jmp    *%ecx
  1015ba:	8b 4d e4             	mov    0xffffffe4(%ebp),%ecx
  1015bd:	8d 14 0b             	lea    (%ebx,%ecx,1),%edx
  1015c0:	39 d3                	cmp    %edx,%ebx
  1015c2:	77 bb                	ja     10157f <readi+0x2f>
  1015c4:	39 d0                	cmp    %edx,%eax
  1015c6:	73 05                	jae    1015cd <readi+0x7d>
  1015c8:	29 d8                	sub    %ebx,%eax
  1015ca:	89 45 e4             	mov    %eax,0xffffffe4(%ebp)
  1015cd:	8b 75 e4             	mov    0xffffffe4(%ebp),%esi
  1015d0:	85 f6                	test   %esi,%esi
  1015d2:	74 7d                	je     101651 <readi+0x101>
  1015d4:	c7 45 ec 00 00 00 00 	movl   $0x0,0xffffffec(%ebp)
  1015db:	90                   	nop    
  1015dc:	8d 74 26 00          	lea    0x0(%esi),%esi
  1015e0:	89 da                	mov    %ebx,%edx
  1015e2:	31 c9                	xor    %ecx,%ecx
  1015e4:	c1 ea 09             	shr    $0x9,%edx
  1015e7:	89 f8                	mov    %edi,%eax
  1015e9:	e8 52 fd ff ff       	call   101340 <bmap>
  1015ee:	be 00 02 00 00       	mov    $0x200,%esi
  1015f3:	89 44 24 04          	mov    %eax,0x4(%esp)
  1015f7:	8b 07                	mov    (%edi),%eax
  1015f9:	89 04 24             	mov    %eax,(%esp)
  1015fc:	e8 af ea ff ff       	call   1000b0 <bread>
  101601:	8b 4d ec             	mov    0xffffffec(%ebp),%ecx
  101604:	89 da                	mov    %ebx,%edx
  101606:	81 e2 ff 01 00 00    	and    $0x1ff,%edx
  10160c:	29 d6                	sub    %edx,%esi
  10160e:	89 45 f0             	mov    %eax,0xfffffff0(%ebp)
  101611:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
  101614:	29 c8                	sub    %ecx,%eax
  101616:	39 c6                	cmp    %eax,%esi
  101618:	76 02                	jbe    10161c <readi+0xcc>
  10161a:	89 c6                	mov    %eax,%esi
  10161c:	89 74 24 08          	mov    %esi,0x8(%esp)
  101620:	01 f3                	add    %esi,%ebx
  101622:	8b 4d f0             	mov    0xfffffff0(%ebp),%ecx
  101625:	8d 44 11 18          	lea    0x18(%ecx,%edx,1),%eax
  101629:	89 44 24 04          	mov    %eax,0x4(%esp)
  10162d:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  101630:	89 04 24             	mov    %eax,(%esp)
  101633:	e8 d8 29 00 00       	call   104010 <memmove>
  101638:	8b 4d f0             	mov    0xfffffff0(%ebp),%ecx
  10163b:	89 0c 24             	mov    %ecx,(%esp)
  10163e:	e8 bd e9 ff ff       	call   100000 <brelse>
  101643:	01 75 ec             	add    %esi,0xffffffec(%ebp)
  101646:	01 75 e8             	add    %esi,0xffffffe8(%ebp)
  101649:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  10164c:	39 45 e4             	cmp    %eax,0xffffffe4(%ebp)
  10164f:	77 8f                	ja     1015e0 <readi+0x90>
  101651:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
  101654:	e9 2b ff ff ff       	jmp    101584 <readi+0x34>
  101659:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00101660 <namecmp>:

// Directories

int
namecmp(const char *s, const char *t)
{
  101660:	55                   	push   %ebp
  return strncmp(s, t, DIRSIZ);
  101661:	b8 0e 00 00 00       	mov    $0xe,%eax
  101666:	89 e5                	mov    %esp,%ebp
  101668:	83 ec 18             	sub    $0x18,%esp
  10166b:	89 44 24 08          	mov    %eax,0x8(%esp)
  10166f:	8b 45 0c             	mov    0xc(%ebp),%eax
  101672:	89 44 24 04          	mov    %eax,0x4(%esp)
  101676:	8b 45 08             	mov    0x8(%ebp),%eax
  101679:	89 04 24             	mov    %eax,(%esp)
  10167c:	e8 ff 29 00 00       	call   104080 <strncmp>
}
  101681:	c9                   	leave  
  101682:	c3                   	ret    
  101683:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  101689:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00101690 <dirlookup>:

// Look for a directory entry in a directory.
// If found, set *poff to byte offset of entry.
// Caller must have already locked dp.
struct inode*
dirlookup(struct inode *dp, char *name, uint *poff)
{
  101690:	55                   	push   %ebp
  101691:	89 e5                	mov    %esp,%ebp
  101693:	57                   	push   %edi
  101694:	56                   	push   %esi
  101695:	53                   	push   %ebx
  101696:	83 ec 1c             	sub    $0x1c,%esp
  101699:	8b 45 08             	mov    0x8(%ebp),%eax
  10169c:	8b 55 0c             	mov    0xc(%ebp),%edx
  10169f:	8b 4d 10             	mov    0x10(%ebp),%ecx
  uint off, inum;
  struct buf *bp;
  struct dirent *de;

  if(dp->type != T_DIR)
  1016a2:	66 83 78 10 01       	cmpw   $0x1,0x10(%eax)
  1016a7:	89 45 e8             	mov    %eax,0xffffffe8(%ebp)
  1016aa:	89 55 e4             	mov    %edx,0xffffffe4(%ebp)
  1016ad:	89 4d e0             	mov    %ecx,0xffffffe0(%ebp)
  1016b0:	0f 85 cf 00 00 00    	jne    101785 <dirlookup+0xf5>
    panic("dirlookup not DIR");

  for(off = 0; off < dp->size; off += BSIZE){
  1016b6:	8b 58 18             	mov    0x18(%eax),%ebx
  1016b9:	c7 45 f0 00 00 00 00 	movl   $0x0,0xfffffff0(%ebp)
  1016c0:	85 db                	test   %ebx,%ebx
  1016c2:	0f 84 b3 00 00 00    	je     10177b <dirlookup+0xeb>
    bp = bread(dp->dev, bmap(dp, off / BSIZE, 0));
  1016c8:	8b 55 f0             	mov    0xfffffff0(%ebp),%edx
  1016cb:	31 c9                	xor    %ecx,%ecx
  1016cd:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  1016d0:	c1 ea 09             	shr    $0x9,%edx
  1016d3:	e8 68 fc ff ff       	call   101340 <bmap>
  1016d8:	89 44 24 04          	mov    %eax,0x4(%esp)
  1016dc:	8b 55 e8             	mov    0xffffffe8(%ebp),%edx
  1016df:	8b 02                	mov    (%edx),%eax
  1016e1:	89 04 24             	mov    %eax,(%esp)
  1016e4:	e8 c7 e9 ff ff       	call   1000b0 <bread>
    for(de = (struct dirent*)bp->data;
  1016e9:	8d 48 18             	lea    0x18(%eax),%ecx
  1016ec:	89 c7                	mov    %eax,%edi
        de < (struct dirent*)(bp->data + BSIZE);
  1016ee:	8d b0 18 02 00 00    	lea    0x218(%eax),%esi
  1016f4:	89 cb                	mov    %ecx,%ebx
  1016f6:	39 f1                	cmp    %esi,%ecx
  1016f8:	89 4d ec             	mov    %ecx,0xffffffec(%ebp)
  1016fb:	72 0a                	jb     101707 <dirlookup+0x77>
  1016fd:	eb 5e                	jmp    10175d <dirlookup+0xcd>
  1016ff:	90                   	nop    
        de++){
  101700:	83 c3 10             	add    $0x10,%ebx
  101703:	39 f3                	cmp    %esi,%ebx
  101705:	73 56                	jae    10175d <dirlookup+0xcd>
      if(de->inum == 0)
  101707:	66 83 3b 00          	cmpw   $0x0,(%ebx)
  10170b:	90                   	nop    
  10170c:	8d 74 26 00          	lea    0x0(%esi),%esi
  101710:	74 ee                	je     101700 <dirlookup+0x70>
        continue;
      if(namecmp(name, de->name) == 0){
  101712:	8d 43 02             	lea    0x2(%ebx),%eax
  101715:	89 44 24 04          	mov    %eax,0x4(%esp)
  101719:	8b 45 e4             	mov    0xffffffe4(%ebp),%eax
  10171c:	89 04 24             	mov    %eax,(%esp)
  10171f:	e8 3c ff ff ff       	call   101660 <namecmp>
  101724:	85 c0                	test   %eax,%eax
  101726:	75 d8                	jne    101700 <dirlookup+0x70>
        // entry matches path element
        if(poff)
  101728:	8b 4d e0             	mov    0xffffffe0(%ebp),%ecx
  10172b:	85 c9                	test   %ecx,%ecx
  10172d:	74 10                	je     10173f <dirlookup+0xaf>
          *poff = off + (uchar*)de - bp->data;
  10172f:	8b 55 f0             	mov    0xfffffff0(%ebp),%edx
  101732:	8b 4d e0             	mov    0xffffffe0(%ebp),%ecx
  101735:	8d 04 13             	lea    (%ebx,%edx,1),%eax
  101738:	8b 55 ec             	mov    0xffffffec(%ebp),%edx
  10173b:	29 d0                	sub    %edx,%eax
  10173d:	89 01                	mov    %eax,(%ecx)
        inum = de->inum;
  10173f:	0f b7 1b             	movzwl (%ebx),%ebx
        brelse(bp);
  101742:	89 3c 24             	mov    %edi,(%esp)
  101745:	e8 b6 e8 ff ff       	call   100000 <brelse>
        return iget(dp->dev, inum);
  10174a:	8b 4d e8             	mov    0xffffffe8(%ebp),%ecx
  10174d:	89 da                	mov    %ebx,%edx
  10174f:	8b 01                	mov    (%ecx),%eax
      }
    }
    brelse(bp);
  }
  return 0;
}
  101751:	83 c4 1c             	add    $0x1c,%esp
  101754:	5b                   	pop    %ebx
  101755:	5e                   	pop    %esi
  101756:	5f                   	pop    %edi
  101757:	5d                   	pop    %ebp
  101758:	e9 43 f9 ff ff       	jmp    1010a0 <iget>
  10175d:	89 3c 24             	mov    %edi,(%esp)
  101760:	e8 9b e8 ff ff       	call   100000 <brelse>
  101765:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  101768:	81 45 f0 00 02 00 00 	addl   $0x200,0xfffffff0(%ebp)
  10176f:	8b 55 f0             	mov    0xfffffff0(%ebp),%edx
  101772:	39 50 18             	cmp    %edx,0x18(%eax)
  101775:	0f 87 4d ff ff ff    	ja     1016c8 <dirlookup+0x38>
  10177b:	83 c4 1c             	add    $0x1c,%esp
  10177e:	31 c0                	xor    %eax,%eax
  101780:	5b                   	pop    %ebx
  101781:	5e                   	pop    %esi
  101782:	5f                   	pop    %edi
  101783:	5d                   	pop    %ebp
  101784:	c3                   	ret    
  101785:	c7 04 24 b3 5e 10 00 	movl   $0x105eb3,(%esp)
  10178c:	e8 1f f1 ff ff       	call   1008b0 <panic>
  101791:	eb 0d                	jmp    1017a0 <ialloc>
  101793:	90                   	nop    
  101794:	90                   	nop    
  101795:	90                   	nop    
  101796:	90                   	nop    
  101797:	90                   	nop    
  101798:	90                   	nop    
  101799:	90                   	nop    
  10179a:	90                   	nop    
  10179b:	90                   	nop    
  10179c:	90                   	nop    
  10179d:	90                   	nop    
  10179e:	90                   	nop    
  10179f:	90                   	nop    

001017a0 <ialloc>:
  1017a0:	55                   	push   %ebp
  1017a1:	89 e5                	mov    %esp,%ebp
  1017a3:	57                   	push   %edi
  1017a4:	56                   	push   %esi
  1017a5:	53                   	push   %ebx
  1017a6:	83 ec 2c             	sub    $0x2c,%esp
  1017a9:	0f bf 45 0c          	movswl 0xc(%ebp),%eax
  1017ad:	8d 55 e8             	lea    0xffffffe8(%ebp),%edx
  1017b0:	89 45 dc             	mov    %eax,0xffffffdc(%ebp)
  1017b3:	8b 45 08             	mov    0x8(%ebp),%eax
  1017b6:	e8 c5 f9 ff ff       	call   101180 <readsb>
  1017bb:	83 7d f0 01          	cmpl   $0x1,0xfffffff0(%ebp)
  1017bf:	0f 86 8b 00 00 00    	jbe    101850 <ialloc+0xb0>
  1017c5:	bf 01 00 00 00       	mov    $0x1,%edi
  1017ca:	c7 45 e0 01 00 00 00 	movl   $0x1,0xffffffe0(%ebp)
  1017d1:	eb 13                	jmp    1017e6 <ialloc+0x46>
  1017d3:	89 34 24             	mov    %esi,(%esp)
  1017d6:	e8 25 e8 ff ff       	call   100000 <brelse>
  1017db:	ff 45 e0             	incl   0xffffffe0(%ebp)
  1017de:	8b 7d e0             	mov    0xffffffe0(%ebp),%edi
  1017e1:	39 7d f0             	cmp    %edi,0xfffffff0(%ebp)
  1017e4:	76 6a                	jbe    101850 <ialloc+0xb0>
  1017e6:	89 f8                	mov    %edi,%eax
  1017e8:	c1 e8 03             	shr    $0x3,%eax
  1017eb:	83 c0 02             	add    $0x2,%eax
  1017ee:	89 44 24 04          	mov    %eax,0x4(%esp)
  1017f2:	8b 45 08             	mov    0x8(%ebp),%eax
  1017f5:	89 04 24             	mov    %eax,(%esp)
  1017f8:	e8 b3 e8 ff ff       	call   1000b0 <bread>
  1017fd:	89 c6                	mov    %eax,%esi
  1017ff:	89 f8                	mov    %edi,%eax
  101801:	83 e0 07             	and    $0x7,%eax
  101804:	c1 e0 06             	shl    $0x6,%eax
  101807:	8d 5c 06 18          	lea    0x18(%esi,%eax,1),%ebx
  10180b:	66 83 3b 00          	cmpw   $0x0,(%ebx)
  10180f:	75 c2                	jne    1017d3 <ialloc+0x33>
  101811:	b8 40 00 00 00       	mov    $0x40,%eax
  101816:	89 44 24 08          	mov    %eax,0x8(%esp)
  10181a:	31 c0                	xor    %eax,%eax
  10181c:	89 1c 24             	mov    %ebx,(%esp)
  10181f:	89 44 24 04          	mov    %eax,0x4(%esp)
  101823:	e8 58 27 00 00       	call   103f80 <memset>
  101828:	8b 45 dc             	mov    0xffffffdc(%ebp),%eax
  10182b:	66 89 03             	mov    %ax,(%ebx)
  10182e:	89 34 24             	mov    %esi,(%esp)
  101831:	e8 4a e8 ff ff       	call   100080 <bwrite>
  101836:	89 34 24             	mov    %esi,(%esp)
  101839:	e8 c2 e7 ff ff       	call   100000 <brelse>
  10183e:	8b 45 08             	mov    0x8(%ebp),%eax
  101841:	89 fa                	mov    %edi,%edx
  101843:	e8 58 f8 ff ff       	call   1010a0 <iget>
  101848:	83 c4 2c             	add    $0x2c,%esp
  10184b:	5b                   	pop    %ebx
  10184c:	5e                   	pop    %esi
  10184d:	5f                   	pop    %edi
  10184e:	5d                   	pop    %ebp
  10184f:	c3                   	ret    
  101850:	c7 04 24 c5 5e 10 00 	movl   $0x105ec5,(%esp)
  101857:	e8 54 f0 ff ff       	call   1008b0 <panic>
  10185c:	8d 74 26 00          	lea    0x0(%esi),%esi

00101860 <bfree>:
  101860:	55                   	push   %ebp
  101861:	89 e5                	mov    %esp,%ebp
  101863:	57                   	push   %edi
  101864:	89 d7                	mov    %edx,%edi
  101866:	56                   	push   %esi
  101867:	89 c6                	mov    %eax,%esi
  101869:	53                   	push   %ebx
  10186a:	83 ec 1c             	sub    $0x1c,%esp
  10186d:	89 54 24 04          	mov    %edx,0x4(%esp)
  101871:	89 04 24             	mov    %eax,(%esp)
  101874:	e8 37 e8 ff ff       	call   1000b0 <bread>
  101879:	89 c3                	mov    %eax,%ebx
  10187b:	b8 00 02 00 00       	mov    $0x200,%eax
  101880:	89 44 24 08          	mov    %eax,0x8(%esp)
  101884:	31 c0                	xor    %eax,%eax
  101886:	89 44 24 04          	mov    %eax,0x4(%esp)
  10188a:	8d 43 18             	lea    0x18(%ebx),%eax
  10188d:	89 04 24             	mov    %eax,(%esp)
  101890:	e8 eb 26 00 00       	call   103f80 <memset>
  101895:	89 1c 24             	mov    %ebx,(%esp)
  101898:	e8 e3 e7 ff ff       	call   100080 <bwrite>
  10189d:	89 1c 24             	mov    %ebx,(%esp)
  1018a0:	e8 5b e7 ff ff       	call   100000 <brelse>
  1018a5:	89 f0                	mov    %esi,%eax
  1018a7:	8d 55 e8             	lea    0xffffffe8(%ebp),%edx
  1018aa:	e8 d1 f8 ff ff       	call   101180 <readsb>
  1018af:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  1018b2:	89 fa                	mov    %edi,%edx
  1018b4:	c1 ea 0c             	shr    $0xc,%edx
  1018b7:	89 34 24             	mov    %esi,(%esp)
  1018ba:	c1 e8 03             	shr    $0x3,%eax
  1018bd:	8d 44 10 03          	lea    0x3(%eax,%edx,1),%eax
  1018c1:	89 44 24 04          	mov    %eax,0x4(%esp)
  1018c5:	e8 e6 e7 ff ff       	call   1000b0 <bread>
  1018ca:	ba 01 00 00 00       	mov    $0x1,%edx
  1018cf:	89 c6                	mov    %eax,%esi
  1018d1:	89 f8                	mov    %edi,%eax
  1018d3:	25 ff 0f 00 00       	and    $0xfff,%eax
  1018d8:	89 c1                	mov    %eax,%ecx
  1018da:	83 e1 07             	and    $0x7,%ecx
  1018dd:	d3 e2                	shl    %cl,%edx
  1018df:	89 c1                	mov    %eax,%ecx
  1018e1:	c1 f9 03             	sar    $0x3,%ecx
  1018e4:	0f b6 5c 31 18       	movzbl 0x18(%ecx,%esi,1),%ebx
  1018e9:	0f b6 c3             	movzbl %bl,%eax
  1018ec:	85 d0                	test   %edx,%eax
  1018ee:	74 22                	je     101912 <bfree+0xb2>
  1018f0:	88 d0                	mov    %dl,%al
  1018f2:	f6 d0                	not    %al
  1018f4:	20 c3                	and    %al,%bl
  1018f6:	88 5c 31 18          	mov    %bl,0x18(%ecx,%esi,1)
  1018fa:	89 34 24             	mov    %esi,(%esp)
  1018fd:	e8 7e e7 ff ff       	call   100080 <bwrite>
  101902:	89 34 24             	mov    %esi,(%esp)
  101905:	e8 f6 e6 ff ff       	call   100000 <brelse>
  10190a:	83 c4 1c             	add    $0x1c,%esp
  10190d:	5b                   	pop    %ebx
  10190e:	5e                   	pop    %esi
  10190f:	5f                   	pop    %edi
  101910:	5d                   	pop    %ebp
  101911:	c3                   	ret    
  101912:	c7 04 24 d7 5e 10 00 	movl   $0x105ed7,(%esp)
  101919:	e8 92 ef ff ff       	call   1008b0 <panic>
  10191e:	89 f6                	mov    %esi,%esi

00101920 <iput>:
  101920:	55                   	push   %ebp
  101921:	89 e5                	mov    %esp,%ebp
  101923:	57                   	push   %edi
  101924:	56                   	push   %esi
  101925:	53                   	push   %ebx
  101926:	83 ec 0c             	sub    $0xc,%esp
  101929:	8b 75 08             	mov    0x8(%ebp),%esi
  10192c:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  101933:	e8 d8 25 00 00       	call   103f10 <acquire>
  101938:	83 7e 08 01          	cmpl   $0x1,0x8(%esi)
  10193c:	0f 85 9e 00 00 00    	jne    1019e0 <iput+0xc0>
  101942:	8b 46 0c             	mov    0xc(%esi),%eax
  101945:	a8 02                	test   $0x2,%al
  101947:	0f 84 93 00 00 00    	je     1019e0 <iput+0xc0>
  10194d:	66 83 7e 16 00       	cmpw   $0x0,0x16(%esi)
  101952:	0f 85 88 00 00 00    	jne    1019e0 <iput+0xc0>
  101958:	a8 01                	test   $0x1,%al
  10195a:	0f 85 e5 00 00 00    	jne    101a45 <iput+0x125>
  101960:	83 c8 01             	or     $0x1,%eax
  101963:	31 db                	xor    %ebx,%ebx
  101965:	89 46 0c             	mov    %eax,0xc(%esi)
  101968:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  10196f:	e8 5c 25 00 00       	call   103ed0 <release>
  101974:	eb 06                	jmp    10197c <iput+0x5c>
  101976:	43                   	inc    %ebx
  101977:	83 fb 0c             	cmp    $0xc,%ebx
  10197a:	74 1b                	je     101997 <iput+0x77>
  10197c:	8b 54 9e 1c          	mov    0x1c(%esi,%ebx,4),%edx
  101980:	85 d2                	test   %edx,%edx
  101982:	74 f2                	je     101976 <iput+0x56>
  101984:	8b 06                	mov    (%esi),%eax
  101986:	e8 d5 fe ff ff       	call   101860 <bfree>
  10198b:	31 c0                	xor    %eax,%eax
  10198d:	89 44 9e 1c          	mov    %eax,0x1c(%esi,%ebx,4)
  101991:	43                   	inc    %ebx
  101992:	83 fb 0c             	cmp    $0xc,%ebx
  101995:	75 e5                	jne    10197c <iput+0x5c>
  101997:	8b 46 4c             	mov    0x4c(%esi),%eax
  10199a:	85 c0                	test   %eax,%eax
  10199c:	75 58                	jne    1019f6 <iput+0xd6>
  10199e:	c7 46 18 00 00 00 00 	movl   $0x0,0x18(%esi)
  1019a5:	89 34 24             	mov    %esi,(%esp)
  1019a8:	e8 23 f8 ff ff       	call   1011d0 <iupdate>
  1019ad:	66 c7 46 10 00 00    	movw   $0x0,0x10(%esi)
  1019b3:	89 34 24             	mov    %esi,(%esp)
  1019b6:	e8 15 f8 ff ff       	call   1011d0 <iupdate>
  1019bb:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  1019c2:	e8 49 25 00 00       	call   103f10 <acquire>
  1019c7:	83 66 0c fe          	andl   $0xfffffffe,0xc(%esi)
  1019cb:	89 34 24             	mov    %esi,(%esp)
  1019ce:	e8 bd 18 00 00       	call   103290 <wakeup>
  1019d3:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1019d9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  1019e0:	ff 4e 08             	decl   0x8(%esi)
  1019e3:	c7 45 08 80 9a 10 00 	movl   $0x109a80,0x8(%ebp)
  1019ea:	83 c4 0c             	add    $0xc,%esp
  1019ed:	5b                   	pop    %ebx
  1019ee:	5e                   	pop    %esi
  1019ef:	5f                   	pop    %edi
  1019f0:	5d                   	pop    %ebp
  1019f1:	e9 da 24 00 00       	jmp    103ed0 <release>
  1019f6:	89 44 24 04          	mov    %eax,0x4(%esp)
  1019fa:	31 db                	xor    %ebx,%ebx
  1019fc:	8b 06                	mov    (%esi),%eax
  1019fe:	89 04 24             	mov    %eax,(%esp)
  101a01:	e8 aa e6 ff ff       	call   1000b0 <bread>
  101a06:	89 c7                	mov    %eax,%edi
  101a08:	89 45 f0             	mov    %eax,0xfffffff0(%ebp)
  101a0b:	83 c7 18             	add    $0x18,%edi
  101a0e:	31 c0                	xor    %eax,%eax
  101a10:	eb 0b                	jmp    101a1d <iput+0xfd>
  101a12:	43                   	inc    %ebx
  101a13:	81 fb 80 00 00 00    	cmp    $0x80,%ebx
  101a19:	89 d8                	mov    %ebx,%eax
  101a1b:	74 10                	je     101a2d <iput+0x10d>
  101a1d:	8b 14 87             	mov    (%edi,%eax,4),%edx
  101a20:	85 d2                	test   %edx,%edx
  101a22:	74 ee                	je     101a12 <iput+0xf2>
  101a24:	8b 06                	mov    (%esi),%eax
  101a26:	e8 35 fe ff ff       	call   101860 <bfree>
  101a2b:	eb e5                	jmp    101a12 <iput+0xf2>
  101a2d:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  101a30:	89 04 24             	mov    %eax,(%esp)
  101a33:	e8 c8 e5 ff ff       	call   100000 <brelse>
  101a38:	c7 46 4c 00 00 00 00 	movl   $0x0,0x4c(%esi)
  101a3f:	90                   	nop    
  101a40:	e9 59 ff ff ff       	jmp    10199e <iput+0x7e>
  101a45:	c7 04 24 ea 5e 10 00 	movl   $0x105eea,(%esp)
  101a4c:	e8 5f ee ff ff       	call   1008b0 <panic>
  101a51:	eb 0d                	jmp    101a60 <dirlink>
  101a53:	90                   	nop    
  101a54:	90                   	nop    
  101a55:	90                   	nop    
  101a56:	90                   	nop    
  101a57:	90                   	nop    
  101a58:	90                   	nop    
  101a59:	90                   	nop    
  101a5a:	90                   	nop    
  101a5b:	90                   	nop    
  101a5c:	90                   	nop    
  101a5d:	90                   	nop    
  101a5e:	90                   	nop    
  101a5f:	90                   	nop    

00101a60 <dirlink>:

// Write a new directory entry (name, ino) into the directory dp.
int
dirlink(struct inode *dp, char *name, uint ino)
{
  101a60:	55                   	push   %ebp
  101a61:	89 e5                	mov    %esp,%ebp
  101a63:	57                   	push   %edi
  int off;
  struct dirent de;
  struct inode *ip;

  // Check that name is not present.
  if((ip = dirlookup(dp, name, 0)) != 0){
  101a64:	31 ff                	xor    %edi,%edi
  101a66:	56                   	push   %esi
  101a67:	53                   	push   %ebx
  101a68:	83 ec 2c             	sub    $0x2c,%esp
  101a6b:	8b 75 08             	mov    0x8(%ebp),%esi
  101a6e:	8b 45 0c             	mov    0xc(%ebp),%eax
  101a71:	89 7c 24 08          	mov    %edi,0x8(%esp)
  101a75:	89 34 24             	mov    %esi,(%esp)
  101a78:	89 44 24 04          	mov    %eax,0x4(%esp)
  101a7c:	e8 0f fc ff ff       	call   101690 <dirlookup>
  101a81:	85 c0                	test   %eax,%eax
  101a83:	0f 85 9c 00 00 00    	jne    101b25 <dirlink+0xc5>
    iput(ip);
    return -1;
  }

  // Look for an empty dirent.
  for(off = 0; off < dp->size; off += sizeof(de)){
  101a89:	8b 5e 18             	mov    0x18(%esi),%ebx
  101a8c:	85 db                	test   %ebx,%ebx
  101a8e:	0f 84 a0 00 00 00    	je     101b34 <dirlink+0xd4>
  101a94:	8d 7d e4             	lea    0xffffffe4(%ebp),%edi
  101a97:	31 db                	xor    %ebx,%ebx
  101a99:	eb 0d                	jmp    101aa8 <dirlink+0x48>
  101a9b:	90                   	nop    
  101a9c:	8d 74 26 00          	lea    0x0(%esi),%esi
    if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
      panic("dirlink read");
    if(de.inum == 0)
      break;
  101aa0:	83 c3 10             	add    $0x10,%ebx
  101aa3:	39 5e 18             	cmp    %ebx,0x18(%esi)
  101aa6:	76 25                	jbe    101acd <dirlink+0x6d>
  101aa8:	b9 10 00 00 00       	mov    $0x10,%ecx
  101aad:	89 4c 24 0c          	mov    %ecx,0xc(%esp)
  101ab1:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  101ab5:	89 7c 24 04          	mov    %edi,0x4(%esp)
  101ab9:	89 34 24             	mov    %esi,(%esp)
  101abc:	e8 8f fa ff ff       	call   101550 <readi>
  101ac1:	83 f8 10             	cmp    $0x10,%eax
  101ac4:	75 53                	jne    101b19 <dirlink+0xb9>
  101ac6:	66 83 7d e4 00       	cmpw   $0x0,0xffffffe4(%ebp)
  101acb:	75 d3                	jne    101aa0 <dirlink+0x40>
  }

  strncpy(de.name, name, DIRSIZ);
  101acd:	8b 45 0c             	mov    0xc(%ebp),%eax
  101ad0:	ba 0e 00 00 00       	mov    $0xe,%edx
  101ad5:	89 54 24 08          	mov    %edx,0x8(%esp)
  101ad9:	89 44 24 04          	mov    %eax,0x4(%esp)
  101add:	8d 45 e6             	lea    0xffffffe6(%ebp),%eax
  101ae0:	89 04 24             	mov    %eax,(%esp)
  101ae3:	e8 e8 25 00 00       	call   1040d0 <strncpy>
  de.inum = ino;
  101ae8:	8b 45 10             	mov    0x10(%ebp),%eax
  if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
  101aeb:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  101aef:	89 7c 24 04          	mov    %edi,0x4(%esp)
  101af3:	89 34 24             	mov    %esi,(%esp)
  101af6:	66 89 45 e4          	mov    %ax,0xffffffe4(%ebp)
  101afa:	b8 10 00 00 00       	mov    $0x10,%eax
  101aff:	89 44 24 0c          	mov    %eax,0xc(%esp)
  101b03:	e8 18 f9 ff ff       	call   101420 <writei>
    panic("dirlink");
  101b08:	31 d2                	xor    %edx,%edx
  101b0a:	83 f8 10             	cmp    $0x10,%eax
  101b0d:	75 2c                	jne    101b3b <dirlink+0xdb>
  
  return 0;
}
  101b0f:	83 c4 2c             	add    $0x2c,%esp
  101b12:	89 d0                	mov    %edx,%eax
  101b14:	5b                   	pop    %ebx
  101b15:	5e                   	pop    %esi
  101b16:	5f                   	pop    %edi
  101b17:	5d                   	pop    %ebp
  101b18:	c3                   	ret    
  101b19:	c7 04 24 f4 5e 10 00 	movl   $0x105ef4,(%esp)
  101b20:	e8 8b ed ff ff       	call   1008b0 <panic>
  101b25:	89 04 24             	mov    %eax,(%esp)
  101b28:	e8 f3 fd ff ff       	call   101920 <iput>
  101b2d:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  101b32:	eb db                	jmp    101b0f <dirlink+0xaf>
  101b34:	8d 7d e4             	lea    0xffffffe4(%ebp),%edi
  101b37:	31 db                	xor    %ebx,%ebx
  101b39:	eb 92                	jmp    101acd <dirlink+0x6d>
  101b3b:	c7 04 24 01 5f 10 00 	movl   $0x105f01,(%esp)
  101b42:	e8 69 ed ff ff       	call   1008b0 <panic>
  101b47:	89 f6                	mov    %esi,%esi
  101b49:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00101b50 <iunlock>:
  101b50:	55                   	push   %ebp
  101b51:	89 e5                	mov    %esp,%ebp
  101b53:	53                   	push   %ebx
  101b54:	83 ec 04             	sub    $0x4,%esp
  101b57:	8b 5d 08             	mov    0x8(%ebp),%ebx
  101b5a:	85 db                	test   %ebx,%ebx
  101b5c:	74 34                	je     101b92 <iunlock+0x42>
  101b5e:	f6 43 0c 01          	testb  $0x1,0xc(%ebx)
  101b62:	74 2e                	je     101b92 <iunlock+0x42>
  101b64:	8b 43 08             	mov    0x8(%ebx),%eax
  101b67:	85 c0                	test   %eax,%eax
  101b69:	7e 27                	jle    101b92 <iunlock+0x42>
  101b6b:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  101b72:	e8 99 23 00 00       	call   103f10 <acquire>
  101b77:	83 63 0c fe          	andl   $0xfffffffe,0xc(%ebx)
  101b7b:	89 1c 24             	mov    %ebx,(%esp)
  101b7e:	e8 0d 17 00 00       	call   103290 <wakeup>
  101b83:	c7 45 08 80 9a 10 00 	movl   $0x109a80,0x8(%ebp)
  101b8a:	58                   	pop    %eax
  101b8b:	5b                   	pop    %ebx
  101b8c:	5d                   	pop    %ebp
  101b8d:	e9 3e 23 00 00       	jmp    103ed0 <release>
  101b92:	c7 04 24 09 5f 10 00 	movl   $0x105f09,(%esp)
  101b99:	e8 12 ed ff ff       	call   1008b0 <panic>
  101b9e:	89 f6                	mov    %esi,%esi

00101ba0 <iunlockput>:
  101ba0:	55                   	push   %ebp
  101ba1:	89 e5                	mov    %esp,%ebp
  101ba3:	53                   	push   %ebx
  101ba4:	83 ec 04             	sub    $0x4,%esp
  101ba7:	8b 5d 08             	mov    0x8(%ebp),%ebx
  101baa:	89 1c 24             	mov    %ebx,(%esp)
  101bad:	e8 9e ff ff ff       	call   101b50 <iunlock>
  101bb2:	89 5d 08             	mov    %ebx,0x8(%ebp)
  101bb5:	58                   	pop    %eax
  101bb6:	5b                   	pop    %ebx
  101bb7:	5d                   	pop    %ebp
  101bb8:	e9 63 fd ff ff       	jmp    101920 <iput>
  101bbd:	8d 76 00             	lea    0x0(%esi),%esi

00101bc0 <ilock>:
  101bc0:	55                   	push   %ebp
  101bc1:	89 e5                	mov    %esp,%ebp
  101bc3:	56                   	push   %esi
  101bc4:	53                   	push   %ebx
  101bc5:	83 ec 10             	sub    $0x10,%esp
  101bc8:	8b 75 08             	mov    0x8(%ebp),%esi
  101bcb:	85 f6                	test   %esi,%esi
  101bcd:	0f 84 ed 00 00 00    	je     101cc0 <ilock+0x100>
  101bd3:	8b 5e 08             	mov    0x8(%esi),%ebx
  101bd6:	85 db                	test   %ebx,%ebx
  101bd8:	0f 8e e2 00 00 00    	jle    101cc0 <ilock+0x100>
  101bde:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  101be5:	e8 26 23 00 00       	call   103f10 <acquire>
  101bea:	8b 46 0c             	mov    0xc(%esi),%eax
  101bed:	a8 01                	test   $0x1,%al
  101bef:	74 27                	je     101c18 <ilock+0x58>
  101bf1:	eb 0d                	jmp    101c00 <ilock+0x40>
  101bf3:	90                   	nop    
  101bf4:	90                   	nop    
  101bf5:	90                   	nop    
  101bf6:	90                   	nop    
  101bf7:	90                   	nop    
  101bf8:	90                   	nop    
  101bf9:	90                   	nop    
  101bfa:	90                   	nop    
  101bfb:	90                   	nop    
  101bfc:	90                   	nop    
  101bfd:	90                   	nop    
  101bfe:	90                   	nop    
  101bff:	90                   	nop    
  101c00:	b9 80 9a 10 00       	mov    $0x109a80,%ecx
  101c05:	89 4c 24 04          	mov    %ecx,0x4(%esp)
  101c09:	89 34 24             	mov    %esi,(%esp)
  101c0c:	e8 df 18 00 00       	call   1034f0 <sleep>
  101c11:	8b 46 0c             	mov    0xc(%esi),%eax
  101c14:	a8 01                	test   $0x1,%al
  101c16:	75 e8                	jne    101c00 <ilock+0x40>
  101c18:	83 c8 01             	or     $0x1,%eax
  101c1b:	89 46 0c             	mov    %eax,0xc(%esi)
  101c1e:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  101c25:	e8 a6 22 00 00       	call   103ed0 <release>
  101c2a:	f6 46 0c 02          	testb  $0x2,0xc(%esi)
  101c2e:	74 07                	je     101c37 <ilock+0x77>
  101c30:	83 c4 10             	add    $0x10,%esp
  101c33:	5b                   	pop    %ebx
  101c34:	5e                   	pop    %esi
  101c35:	5d                   	pop    %ebp
  101c36:	c3                   	ret    
  101c37:	8b 46 04             	mov    0x4(%esi),%eax
  101c3a:	c1 e8 03             	shr    $0x3,%eax
  101c3d:	83 c0 02             	add    $0x2,%eax
  101c40:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c44:	8b 06                	mov    (%esi),%eax
  101c46:	89 04 24             	mov    %eax,(%esp)
  101c49:	e8 62 e4 ff ff       	call   1000b0 <bread>
  101c4e:	89 c3                	mov    %eax,%ebx
  101c50:	8b 46 04             	mov    0x4(%esi),%eax
  101c53:	83 e0 07             	and    $0x7,%eax
  101c56:	c1 e0 06             	shl    $0x6,%eax
  101c59:	8d 44 03 18          	lea    0x18(%ebx,%eax,1),%eax
  101c5d:	8b 10                	mov    (%eax),%edx
  101c5f:	66 89 56 10          	mov    %dx,0x10(%esi)
  101c63:	0f b7 50 02          	movzwl 0x2(%eax),%edx
  101c67:	66 89 56 12          	mov    %dx,0x12(%esi)
  101c6b:	8b 50 04             	mov    0x4(%eax),%edx
  101c6e:	66 89 56 14          	mov    %dx,0x14(%esi)
  101c72:	0f b7 50 06          	movzwl 0x6(%eax),%edx
  101c76:	66 89 56 16          	mov    %dx,0x16(%esi)
  101c7a:	8b 50 08             	mov    0x8(%eax),%edx
  101c7d:	83 c0 0c             	add    $0xc,%eax
  101c80:	89 56 18             	mov    %edx,0x18(%esi)
  101c83:	ba 34 00 00 00       	mov    $0x34,%edx
  101c88:	89 44 24 04          	mov    %eax,0x4(%esp)
  101c8c:	8d 46 1c             	lea    0x1c(%esi),%eax
  101c8f:	89 54 24 08          	mov    %edx,0x8(%esp)
  101c93:	89 04 24             	mov    %eax,(%esp)
  101c96:	e8 75 23 00 00       	call   104010 <memmove>
  101c9b:	89 1c 24             	mov    %ebx,(%esp)
  101c9e:	e8 5d e3 ff ff       	call   100000 <brelse>
  101ca3:	83 4e 0c 02          	orl    $0x2,0xc(%esi)
  101ca7:	66 83 7e 10 00       	cmpw   $0x0,0x10(%esi)
  101cac:	75 82                	jne    101c30 <ilock+0x70>
  101cae:	c7 04 24 17 5f 10 00 	movl   $0x105f17,(%esp)
  101cb5:	e8 f6 eb ff ff       	call   1008b0 <panic>
  101cba:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  101cc0:	c7 04 24 11 5f 10 00 	movl   $0x105f11,(%esp)
  101cc7:	e8 e4 eb ff ff       	call   1008b0 <panic>
  101ccc:	8d 74 26 00          	lea    0x0(%esi),%esi

00101cd0 <_namei>:

// Paths

// Copy the next path element from path into name.
// Return a pointer to the element following the copied one.
// The returned path has no leading slashes,
// so the caller can check *path=='\0' to see if the name is the last one.
// If no name to remove, return 0.
//
// Examples:
//   skipelem("a/bb/c", name) = "bb/c", setting name = "a"
//   skipelem("///a//bb", name) = "bb", setting name = "a"
//   skipelem("", name) = skipelem("////", name) = 0
//
static char*
skipelem(char *path, char *name)
{
  char *s;
  int len;

  while(*path == '/')
    path++;
  if(*path == 0)
    return 0;
  s = path;
  while(*path != '/' && *path != 0)
    path++;
  len = path - s;
  if(len >= DIRSIZ)
    memmove(name, s, DIRSIZ);
  else {
    memmove(name, s, len);
    name[len] = 0;
  }
  while(*path == '/')
    path++;
  return path;
}

// Look up and return the inode for a path name.
// If parent != 0, return the inode for the parent and copy the final
// path element into name, which must have room for DIRSIZ bytes.
static struct inode*
_namei(char *path, int parent, char *name)
{
  101cd0:	55                   	push   %ebp
  101cd1:	89 e5                	mov    %esp,%ebp
  101cd3:	57                   	push   %edi
  101cd4:	56                   	push   %esi
  101cd5:	53                   	push   %ebx
  101cd6:	89 c3                	mov    %eax,%ebx
  101cd8:	83 ec 1c             	sub    $0x1c,%esp
  101cdb:	89 55 ec             	mov    %edx,0xffffffec(%ebp)
  101cde:	89 4d e8             	mov    %ecx,0xffffffe8(%ebp)
  struct inode *ip, *next;

  if(*path == '/')
  101ce1:	80 38 2f             	cmpb   $0x2f,(%eax)
  101ce4:	0f 84 ee 00 00 00    	je     101dd8 <_namei+0x108>
    ip = iget(ROOTDEV, 1);
  else
    ip = idup(cp->cwd);
  101cea:	e8 d1 15 00 00       	call   1032c0 <curproc>
  101cef:	8b 40 60             	mov    0x60(%eax),%eax
  101cf2:	89 04 24             	mov    %eax,(%esp)
  101cf5:	e8 76 f3 ff ff       	call   101070 <idup>
  101cfa:	89 45 f0             	mov    %eax,0xfffffff0(%ebp)
  101cfd:	eb 02                	jmp    101d01 <_namei+0x31>
  101cff:	90                   	nop    
  101d00:	43                   	inc    %ebx
  101d01:	0f b6 03             	movzbl (%ebx),%eax
  101d04:	3c 2f                	cmp    $0x2f,%al
  101d06:	74 f8                	je     101d00 <_namei+0x30>
  101d08:	84 c0                	test   %al,%al
  101d0a:	0f 84 df 00 00 00    	je     101def <_namei+0x11f>
  101d10:	89 de                	mov    %ebx,%esi
  101d12:	46                   	inc    %esi
  101d13:	0f b6 06             	movzbl (%esi),%eax
  101d16:	3c 2f                	cmp    $0x2f,%al
  101d18:	74 04                	je     101d1e <_namei+0x4e>
  101d1a:	84 c0                	test   %al,%al
  101d1c:	75 f4                	jne    101d12 <_namei+0x42>
  101d1e:	89 f7                	mov    %esi,%edi
  101d20:	29 df                	sub    %ebx,%edi
  101d22:	83 ff 0d             	cmp    $0xd,%edi
  101d25:	7e 78                	jle    101d9f <_namei+0xcf>
  101d27:	bf 0e 00 00 00       	mov    $0xe,%edi
  101d2c:	89 7c 24 08          	mov    %edi,0x8(%esp)
  101d30:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  101d34:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  101d37:	89 04 24             	mov    %eax,(%esp)
  101d3a:	e8 d1 22 00 00       	call   104010 <memmove>
  101d3f:	eb 01                	jmp    101d42 <_namei+0x72>
  101d41:	46                   	inc    %esi
  101d42:	80 3e 2f             	cmpb   $0x2f,(%esi)
  101d45:	74 fa                	je     101d41 <_namei+0x71>

  while((path = skipelem(path, name)) != 0){
    ilock(ip);
  101d47:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  101d4a:	89 04 24             	mov    %eax,(%esp)
  101d4d:	e8 6e fe ff ff       	call   101bc0 <ilock>
    if(ip->type != T_DIR){
  101d52:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  101d55:	66 83 78 10 01       	cmpw   $0x1,0x10(%eax)
  101d5a:	75 5f                	jne    101dbb <_namei+0xeb>
      iunlockput(ip);
      return 0;
    }
    if(parent && *path == '\0'){
  101d5c:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  101d5f:	85 c0                	test   %eax,%eax
  101d61:	74 09                	je     101d6c <_namei+0x9c>
  101d63:	80 3e 00             	cmpb   $0x0,(%esi)
  101d66:	0f 84 a4 00 00 00    	je     101e10 <_namei+0x140>
      // Stop one level early.
      iunlock(ip);
      return ip;
    }
    if((next = dirlookup(ip, name, 0)) == 0){
  101d6c:	31 c0                	xor    %eax,%eax
  101d6e:	89 44 24 08          	mov    %eax,0x8(%esp)
  101d72:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  101d75:	89 44 24 04          	mov    %eax,0x4(%esp)
  101d79:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  101d7c:	89 04 24             	mov    %eax,(%esp)
  101d7f:	e8 0c f9 ff ff       	call   101690 <dirlookup>
  101d84:	85 c0                	test   %eax,%eax
  101d86:	89 c3                	mov    %eax,%ebx
  101d88:	74 31                	je     101dbb <_namei+0xeb>
      iunlockput(ip);
      return 0;
    }
    iunlockput(ip);
  101d8a:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  101d8d:	89 04 24             	mov    %eax,(%esp)
  101d90:	e8 0b fe ff ff       	call   101ba0 <iunlockput>
  101d95:	89 5d f0             	mov    %ebx,0xfffffff0(%ebp)
  101d98:	89 f3                	mov    %esi,%ebx
  101d9a:	e9 62 ff ff ff       	jmp    101d01 <_namei+0x31>
  101d9f:	89 7c 24 08          	mov    %edi,0x8(%esp)
  101da3:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  101da7:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  101daa:	89 04 24             	mov    %eax,(%esp)
  101dad:	e8 5e 22 00 00       	call   104010 <memmove>
  101db2:	8b 45 e8             	mov    0xffffffe8(%ebp),%eax
  101db5:	c6 04 38 00          	movb   $0x0,(%eax,%edi,1)
  101db9:	eb 87                	jmp    101d42 <_namei+0x72>
  101dbb:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  101dbe:	89 04 24             	mov    %eax,(%esp)
  101dc1:	e8 da fd ff ff       	call   101ba0 <iunlockput>
  101dc6:	c7 45 f0 00 00 00 00 	movl   $0x0,0xfffffff0(%ebp)
    ip = next;
  }
  if(parent){
    iput(ip);
    return 0;
  }
  return ip;
}
  101dcd:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  101dd0:	83 c4 1c             	add    $0x1c,%esp
  101dd3:	5b                   	pop    %ebx
  101dd4:	5e                   	pop    %esi
  101dd5:	5f                   	pop    %edi
  101dd6:	5d                   	pop    %ebp
  101dd7:	c3                   	ret    
  101dd8:	ba 01 00 00 00       	mov    $0x1,%edx
  101ddd:	b8 01 00 00 00       	mov    $0x1,%eax
  101de2:	e8 b9 f2 ff ff       	call   1010a0 <iget>
  101de7:	89 45 f0             	mov    %eax,0xfffffff0(%ebp)
  101dea:	e9 12 ff ff ff       	jmp    101d01 <_namei+0x31>
  101def:	8b 75 ec             	mov    0xffffffec(%ebp),%esi
  101df2:	85 f6                	test   %esi,%esi
  101df4:	74 d7                	je     101dcd <_namei+0xfd>
  101df6:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  101df9:	89 04 24             	mov    %eax,(%esp)
  101dfc:	e8 1f fb ff ff       	call   101920 <iput>
  101e01:	c7 45 f0 00 00 00 00 	movl   $0x0,0xfffffff0(%ebp)
  101e08:	eb c3                	jmp    101dcd <_namei+0xfd>
  101e0a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  101e10:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  101e13:	89 04 24             	mov    %eax,(%esp)
  101e16:	e8 35 fd ff ff       	call   101b50 <iunlock>
  101e1b:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  101e1e:	83 c4 1c             	add    $0x1c,%esp
  101e21:	5b                   	pop    %ebx
  101e22:	5e                   	pop    %esi
  101e23:	5f                   	pop    %edi
  101e24:	5d                   	pop    %ebp
  101e25:	c3                   	ret    
  101e26:	8d 76 00             	lea    0x0(%esi),%esi
  101e29:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00101e30 <nameiparent>:

struct inode*
namei(char *path)
{
  char name[DIRSIZ];
  return _namei(path, 0, name);
}

struct inode*
nameiparent(char *path, char *name)
{
  101e30:	55                   	push   %ebp
  return _namei(path, 1, name);
  101e31:	ba 01 00 00 00       	mov    $0x1,%edx
  101e36:	89 e5                	mov    %esp,%ebp
  101e38:	8b 45 08             	mov    0x8(%ebp),%eax
  101e3b:	8b 4d 0c             	mov    0xc(%ebp),%ecx
}
  101e3e:	5d                   	pop    %ebp
  101e3f:	e9 8c fe ff ff       	jmp    101cd0 <_namei>
  101e44:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  101e4a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi

00101e50 <namei>:
  101e50:	55                   	push   %ebp
  101e51:	31 d2                	xor    %edx,%edx
  101e53:	89 e5                	mov    %esp,%ebp
  101e55:	83 ec 18             	sub    $0x18,%esp
  101e58:	8b 45 08             	mov    0x8(%ebp),%eax
  101e5b:	8d 4d f2             	lea    0xfffffff2(%ebp),%ecx
  101e5e:	e8 6d fe ff ff       	call   101cd0 <_namei>
  101e63:	c9                   	leave  
  101e64:	c3                   	ret    
  101e65:	8d 74 26 00          	lea    0x0(%esi),%esi
  101e69:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00101e70 <iinit>:
  101e70:	55                   	push   %ebp
  101e71:	b8 26 5f 10 00       	mov    $0x105f26,%eax
  101e76:	89 e5                	mov    %esp,%ebp
  101e78:	83 ec 08             	sub    $0x8,%esp
  101e7b:	89 44 24 04          	mov    %eax,0x4(%esp)
  101e7f:	c7 04 24 80 9a 10 00 	movl   $0x109a80,(%esp)
  101e86:	e8 a5 1e 00 00       	call   103d30 <initlock>
  101e8b:	c9                   	leave  
  101e8c:	c3                   	ret    
  101e8d:	90                   	nop    
  101e8e:	90                   	nop    
  101e8f:	90                   	nop    

00101e90 <ide_wait_ready>:

// Wait for IDE disk to become ready.
static int
ide_wait_ready(int check_error)
{
  101e90:	55                   	push   %ebp
  101e91:	89 c1                	mov    %eax,%ecx
  101e93:	89 e5                	mov    %esp,%ebp
  101e95:	ba f7 01 00 00       	mov    $0x1f7,%edx
  101e9a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
inb(ushort port)
{
  uchar data;

  asm volatile("in %1,%0" : "=a" (data) : "d" (port));
  101ea0:	ec                   	in     (%dx),%al
  int r;

  while(((r = inb(0x1f7)) & IDE_BSY) || !(r & IDE_DRDY))
  101ea1:	0f b6 c0             	movzbl %al,%eax
  101ea4:	84 c0                	test   %al,%al
  101ea6:	78 f8                	js     101ea0 <ide_wait_ready+0x10>
  101ea8:	a8 40                	test   $0x40,%al
  101eaa:	74 f4                	je     101ea0 <ide_wait_ready+0x10>
    ;
  if(check_error && (r & (IDE_DF|IDE_ERR)) != 0)
  101eac:	85 c9                	test   %ecx,%ecx
  101eae:	74 09                	je     101eb9 <ide_wait_ready+0x29>
  101eb0:	a8 21                	test   $0x21,%al
  101eb2:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  101eb7:	75 02                	jne    101ebb <ide_wait_ready+0x2b>
  101eb9:	31 d2                	xor    %edx,%edx
    return -1;
  return 0;
}
  101ebb:	5d                   	pop    %ebp
  101ebc:	89 d0                	mov    %edx,%eax
  101ebe:	c3                   	ret    
  101ebf:	90                   	nop    

00101ec0 <ide_start_request>:

void
ide_init(void)
{
  int i;

  initlock(&ide_lock, "ide");
  pic_enable(IRQ_IDE);
  ioapic_enable(IRQ_IDE, ncpu - 1);
  ide_wait_ready(0);
  
  // Check if disk 1 is present
  outb(0x1f6, 0xe0 | (1<<4));
  for(i=0; i<1000; i++){
    if(inb(0x1f7) != 0){
      disk_1_present = 1;
      break;
    }
  }
  
  // Switch back to disk 0.
  outb(0x1f6, 0xe0 | (0<<4));
}

// Start the request for b.  Caller must hold ide_lock.
static void
ide_start_request(struct buf *b)
{
  101ec0:	55                   	push   %ebp
  101ec1:	89 e5                	mov    %esp,%ebp
  101ec3:	56                   	push   %esi
  101ec4:	89 c6                	mov    %eax,%esi
  101ec6:	53                   	push   %ebx
  101ec7:	83 ec 10             	sub    $0x10,%esp
  if(b == 0)
  101eca:	85 c0                	test   %eax,%eax
  101ecc:	0f 84 8f 00 00 00    	je     101f61 <ide_start_request+0xa1>
    panic("ide_start_request");

  ide_wait_ready(0);
  101ed2:	31 c0                	xor    %eax,%eax
  101ed4:	e8 b7 ff ff ff       	call   101e90 <ide_wait_ready>

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  101ed9:	31 c0                	xor    %eax,%eax
  101edb:	ba f6 03 00 00       	mov    $0x3f6,%edx
  101ee0:	ee                   	out    %al,(%dx)
  outb(0x3f6, 0);  // generate interrupt
  outb(0x1f2, 1);  // number of sectors
  outb(0x1f3, b->sector & 0xff);
  101ee1:	b0 01                	mov    $0x1,%al
  101ee3:	ba f2 01 00 00       	mov    $0x1f2,%edx
  101ee8:	ee                   	out    %al,(%dx)
  101ee9:	8b 5e 08             	mov    0x8(%esi),%ebx

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  101eec:	ba f3 01 00 00       	mov    $0x1f3,%edx
  101ef1:	0f b6 cb             	movzbl %bl,%ecx
  101ef4:	88 c8                	mov    %cl,%al
  101ef6:	ee                   	out    %al,(%dx)
  outb(0x1f4, (b->sector >> 8) & 0xff);
  outb(0x1f5, (b->sector >> 16) & 0xff);
  outb(0x1f6, 0xe0 | ((b->dev&1)<<4) | ((b->sector>>24)&0x0f));
  if(b->flags & B_DIRTY){
  101ef7:	0f b6 cf             	movzbl %bh,%ecx
  101efa:	ba f4 01 00 00       	mov    $0x1f4,%edx
  101eff:	88 c8                	mov    %cl,%al
  101f01:	ee                   	out    %al,(%dx)
  101f02:	c1 eb 10             	shr    $0x10,%ebx
  101f05:	ba f5 01 00 00       	mov    $0x1f5,%edx
  101f0a:	0f b6 cb             	movzbl %bl,%ecx
  101f0d:	88 c8                	mov    %cl,%al
  101f0f:	ee                   	out    %al,(%dx)
  101f10:	0f b6 46 04          	movzbl 0x4(%esi),%eax
  101f14:	c1 eb 08             	shr    $0x8,%ebx
  101f17:	88 da                	mov    %bl,%dl
  101f19:	80 e2 0f             	and    $0xf,%dl
  101f1c:	24 01                	and    $0x1,%al
  101f1e:	c0 e0 04             	shl    $0x4,%al
  101f21:	0c e0                	or     $0xe0,%al
  101f23:	08 c2                	or     %al,%dl
  101f25:	0f b6 c2             	movzbl %dl,%eax
  101f28:	ba f6 01 00 00       	mov    $0x1f6,%edx
  101f2d:	ee                   	out    %al,(%dx)
  101f2e:	f6 06 04             	testb  $0x4,(%esi)
  101f31:	74 1f                	je     101f52 <ide_start_request+0x92>

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  101f33:	b0 30                	mov    $0x30,%al
  101f35:	ba f7 01 00 00       	mov    $0x1f7,%edx
  101f3a:	ee                   	out    %al,(%dx)
}

static inline void
outw(ushort port, ushort data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
}

static inline void
outsl(int port, const void *addr, int cnt)
{
  asm volatile("cld\n\trepne\n\toutsl"    :
  101f3b:	ba f0 01 00 00       	mov    $0x1f0,%edx
  101f40:	83 c6 18             	add    $0x18,%esi
  101f43:	b9 80 00 00 00       	mov    $0x80,%ecx
  101f48:	fc                   	cld    
  101f49:	f2 6f                	repnz outsl %ds:(%esi),(%dx)
    outb(0x1f7, IDE_CMD_WRITE);
    outsl(0x1f0, b->data, 512/4);
  } else {
    outb(0x1f7, IDE_CMD_READ);
  }
}
  101f4b:	83 c4 10             	add    $0x10,%esp
  101f4e:	5b                   	pop    %ebx
  101f4f:	5e                   	pop    %esi
  101f50:	5d                   	pop    %ebp
  101f51:	c3                   	ret    

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  101f52:	b0 20                	mov    $0x20,%al
  101f54:	ba f7 01 00 00       	mov    $0x1f7,%edx
  101f59:	ee                   	out    %al,(%dx)
  101f5a:	83 c4 10             	add    $0x10,%esp
  101f5d:	5b                   	pop    %ebx
  101f5e:	5e                   	pop    %esi
  101f5f:	5d                   	pop    %ebp
  101f60:	c3                   	ret    
  101f61:	c7 04 24 32 5f 10 00 	movl   $0x105f32,(%esp)
  101f68:	e8 43 e9 ff ff       	call   1008b0 <panic>
  101f6d:	8d 76 00             	lea    0x0(%esi),%esi

00101f70 <ide_rw>:

// Interrupt handler.
void
ide_intr(void)
{
  struct buf *b;

  acquire(&ide_lock);
  if((b = ide_queue) == 0){
    release(&ide_lock);
    return;
  }

  // Read data if needed.
  if(!(b->flags & B_DIRTY) && ide_wait_ready(1) >= 0)
    insl(0x1f0, b->data, 512/4);
  
  // Wake process waiting for this buf.
  b->flags |= B_VALID;
  b->flags &= ~B_DIRTY;
  wakeup(b);
  
  // Start disk on next buf in queue.
  if((ide_queue = b->qnext) != 0)
    ide_start_request(ide_queue);

  release(&ide_lock);
}

// Sync buf with disk. 
// If B_DIRTY is set, write buf to disk, clear B_DIRTY, set B_VALID.
// Else if B_VALID is not set, read buf from disk, set B_VALID.
void
ide_rw(struct buf *b)
{
  101f70:	55                   	push   %ebp
  101f71:	89 e5                	mov    %esp,%ebp
  101f73:	53                   	push   %ebx
  101f74:	83 ec 14             	sub    $0x14,%esp
  101f77:	8b 5d 08             	mov    0x8(%ebp),%ebx
  struct buf **pp;

  if(!(b->flags & B_BUSY))
  101f7a:	8b 03                	mov    (%ebx),%eax
  101f7c:	a8 01                	test   $0x1,%al
  101f7e:	0f 84 97 00 00 00    	je     10201b <ide_rw+0xab>
    panic("ide_rw: buf not busy");
  if((b->flags & (B_VALID|B_DIRTY)) == B_VALID)
  101f84:	83 e0 06             	and    $0x6,%eax
  101f87:	83 f8 02             	cmp    $0x2,%eax
  101f8a:	0f 84 97 00 00 00    	je     102027 <ide_rw+0xb7>
    panic("ide_rw: nothing to do");
  if(b->dev != 0 && !disk_1_present)
  101f90:	8b 4b 04             	mov    0x4(%ebx),%ecx
  101f93:	85 c9                	test   %ecx,%ecx
  101f95:	74 0e                	je     101fa5 <ide_rw+0x35>
  101f97:	8b 15 38 78 10 00    	mov    0x107838,%edx
  101f9d:	85 d2                	test   %edx,%edx
  101f9f:	0f 84 8e 00 00 00    	je     102033 <ide_rw+0xc3>
    panic("ide disk 1 not present");

  acquire(&ide_lock);
  101fa5:	c7 04 24 00 78 10 00 	movl   $0x107800,(%esp)
  101fac:	e8 5f 1f 00 00       	call   103f10 <acquire>

  // Append b to ide_queue.
  b->qnext = 0;
  for(pp=&ide_queue; *pp; pp=&(*pp)->qnext)
  101fb1:	a1 34 78 10 00       	mov    0x107834,%eax
  101fb6:	ba 34 78 10 00       	mov    $0x107834,%edx
  101fbb:	c7 43 14 00 00 00 00 	movl   $0x0,0x14(%ebx)
  101fc2:	85 c0                	test   %eax,%eax
  101fc4:	74 14                	je     101fda <ide_rw+0x6a>
  101fc6:	8d 76 00             	lea    0x0(%esi),%esi
  101fc9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  101fd0:	8d 50 14             	lea    0x14(%eax),%edx
  101fd3:	8b 40 14             	mov    0x14(%eax),%eax
  101fd6:	85 c0                	test   %eax,%eax
  101fd8:	75 f6                	jne    101fd0 <ide_rw+0x60>
    ;
  *pp = b;
  101fda:	89 1a                	mov    %ebx,(%edx)
  
  // Start disk if necessary.
  if(ide_queue == b)
  101fdc:	3b 1d 34 78 10 00    	cmp    0x107834,%ebx
  101fe2:	75 13                	jne    101ff7 <ide_rw+0x87>
  101fe4:	eb 2c                	jmp    102012 <ide_rw+0xa2>
    ide_start_request(b);
  
  // Wait for request to finish.
  // Assuming will not sleep too long: ignore cp->killed.
  while((b->flags & (B_VALID|B_DIRTY)) != B_VALID)
    sleep(b, &ide_lock);
  101fe6:	b8 00 78 10 00       	mov    $0x107800,%eax
  101feb:	89 44 24 04          	mov    %eax,0x4(%esp)
  101fef:	89 1c 24             	mov    %ebx,(%esp)
  101ff2:	e8 f9 14 00 00       	call   1034f0 <sleep>
  101ff7:	8b 03                	mov    (%ebx),%eax
  101ff9:	83 e0 06             	and    $0x6,%eax
  101ffc:	83 f8 02             	cmp    $0x2,%eax
  101fff:	75 e5                	jne    101fe6 <ide_rw+0x76>

  release(&ide_lock);
  102001:	c7 45 08 00 78 10 00 	movl   $0x107800,0x8(%ebp)
}
  102008:	83 c4 14             	add    $0x14,%esp
  10200b:	5b                   	pop    %ebx
  10200c:	5d                   	pop    %ebp
  10200d:	e9 be 1e 00 00       	jmp    103ed0 <release>
  102012:	89 d8                	mov    %ebx,%eax
  102014:	e8 a7 fe ff ff       	call   101ec0 <ide_start_request>
  102019:	eb dc                	jmp    101ff7 <ide_rw+0x87>
  10201b:	c7 04 24 44 5f 10 00 	movl   $0x105f44,(%esp)
  102022:	e8 89 e8 ff ff       	call   1008b0 <panic>
  102027:	c7 04 24 59 5f 10 00 	movl   $0x105f59,(%esp)
  10202e:	e8 7d e8 ff ff       	call   1008b0 <panic>
  102033:	c7 04 24 6f 5f 10 00 	movl   $0x105f6f,(%esp)
  10203a:	e8 71 e8 ff ff       	call   1008b0 <panic>
  10203f:	90                   	nop    

00102040 <ide_intr>:
  102040:	55                   	push   %ebp
  102041:	89 e5                	mov    %esp,%ebp
  102043:	57                   	push   %edi
  102044:	53                   	push   %ebx
  102045:	83 ec 10             	sub    $0x10,%esp
  102048:	c7 04 24 00 78 10 00 	movl   $0x107800,(%esp)
  10204f:	e8 bc 1e 00 00       	call   103f10 <acquire>
  102054:	8b 1d 34 78 10 00    	mov    0x107834,%ebx
  10205a:	85 db                	test   %ebx,%ebx
  10205c:	74 28                	je     102086 <ide_intr+0x46>
  10205e:	f6 03 04             	testb  $0x4,(%ebx)
  102061:	74 3d                	je     1020a0 <ide_intr+0x60>
  102063:	8b 03                	mov    (%ebx),%eax
  102065:	83 c8 02             	or     $0x2,%eax
  102068:	83 e0 fb             	and    $0xfffffffb,%eax
  10206b:	89 03                	mov    %eax,(%ebx)
  10206d:	89 1c 24             	mov    %ebx,(%esp)
  102070:	e8 1b 12 00 00       	call   103290 <wakeup>
  102075:	8b 43 14             	mov    0x14(%ebx),%eax
  102078:	85 c0                	test   %eax,%eax
  10207a:	a3 34 78 10 00       	mov    %eax,0x107834
  10207f:	74 05                	je     102086 <ide_intr+0x46>
  102081:	e8 3a fe ff ff       	call   101ec0 <ide_start_request>
  102086:	c7 04 24 00 78 10 00 	movl   $0x107800,(%esp)
  10208d:	e8 3e 1e 00 00       	call   103ed0 <release>
  102092:	83 c4 10             	add    $0x10,%esp
  102095:	5b                   	pop    %ebx
  102096:	5f                   	pop    %edi
  102097:	5d                   	pop    %ebp
  102098:	c3                   	ret    
  102099:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  1020a0:	b8 01 00 00 00       	mov    $0x1,%eax
  1020a5:	e8 e6 fd ff ff       	call   101e90 <ide_wait_ready>
  1020aa:	85 c0                	test   %eax,%eax
  1020ac:	78 b5                	js     102063 <ide_intr+0x23>
  1020ae:	8d 7b 18             	lea    0x18(%ebx),%edi

static inline void
insl(int port, void *addr, int cnt)
{
  asm volatile("cld\n\trepne\n\tinsl"     :
  1020b1:	ba f0 01 00 00       	mov    $0x1f0,%edx
  1020b6:	b9 80 00 00 00       	mov    $0x80,%ecx
  1020bb:	fc                   	cld    
  1020bc:	f2 6d                	repnz insl (%dx),%es:(%edi)
  1020be:	eb a3                	jmp    102063 <ide_intr+0x23>

001020c0 <ide_init>:
  1020c0:	55                   	push   %ebp
  1020c1:	89 e5                	mov    %esp,%ebp
  1020c3:	56                   	push   %esi
  1020c4:	53                   	push   %ebx
  1020c5:	bb 86 5f 10 00       	mov    $0x105f86,%ebx
  1020ca:	83 ec 10             	sub    $0x10,%esp
  1020cd:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  1020d1:	c7 04 24 00 78 10 00 	movl   $0x107800,(%esp)
  1020d8:	e8 53 1c 00 00       	call   103d30 <initlock>
  1020dd:	c7 04 24 0e 00 00 00 	movl   $0xe,(%esp)
  1020e4:	e8 37 0c 00 00       	call   102d20 <pic_enable>
  1020e9:	a1 20 b1 10 00       	mov    0x10b120,%eax
  1020ee:	c7 04 24 0e 00 00 00 	movl   $0xe,(%esp)
  1020f5:	48                   	dec    %eax
  1020f6:	89 44 24 04          	mov    %eax,0x4(%esp)
  1020fa:	e8 71 00 00 00       	call   102170 <ioapic_enable>
  1020ff:	31 c0                	xor    %eax,%eax
  102101:	e8 8a fd ff ff       	call   101e90 <ide_wait_ready>

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  102106:	b0 f0                	mov    $0xf0,%al
  102108:	ba f6 01 00 00       	mov    $0x1f6,%edx
  10210d:	ee                   	out    %al,(%dx)
  10210e:	8b 1d 38 78 10 00    	mov    0x107838,%ebx
  102114:	31 f6                	xor    %esi,%esi
  102116:	b9 f7 01 00 00       	mov    $0x1f7,%ecx
  10211b:	eb 0c                	jmp    102129 <ide_init+0x69>
  10211d:	8d 76 00             	lea    0x0(%esi),%esi
  102120:	46                   	inc    %esi
  102121:	81 fe e8 03 00 00    	cmp    $0x3e8,%esi
  102127:	74 0c                	je     102135 <ide_init+0x75>
  102129:	89 ca                	mov    %ecx,%edx
  10212b:	ec                   	in     (%dx),%al
  10212c:	84 c0                	test   %al,%al
  10212e:	74 f0                	je     102120 <ide_init+0x60>
  102130:	bb 01 00 00 00       	mov    $0x1,%ebx
  102135:	89 1d 38 78 10 00    	mov    %ebx,0x107838

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  10213b:	b0 e0                	mov    $0xe0,%al
  10213d:	ba f6 01 00 00       	mov    $0x1f6,%edx
  102142:	ee                   	out    %al,(%dx)
  102143:	83 c4 10             	add    $0x10,%esp
  102146:	5b                   	pop    %ebx
  102147:	5e                   	pop    %esi
  102148:	5d                   	pop    %ebp
  102149:	c3                   	ret    
  10214a:	90                   	nop    
  10214b:	90                   	nop    
  10214c:	90                   	nop    
  10214d:	90                   	nop    
  10214e:	90                   	nop    
  10214f:	90                   	nop    

00102150 <ioapic_read>:

static uint
ioapic_read(int reg)
{
  ioapic->reg = reg;
  102150:	8b 15 54 aa 10 00    	mov    0x10aa54,%edx
  102156:	55                   	push   %ebp
  102157:	89 e5                	mov    %esp,%ebp
  102159:	89 02                	mov    %eax,(%edx)
  return ioapic->data;
  10215b:	8b 42 10             	mov    0x10(%edx),%eax
}
  10215e:	5d                   	pop    %ebp
  10215f:	c3                   	ret    

00102160 <ioapic_write>:

static void
ioapic_write(int reg, uint data)
{
  ioapic->reg = reg;
  102160:	8b 0d 54 aa 10 00    	mov    0x10aa54,%ecx
  102166:	55                   	push   %ebp
  102167:	89 e5                	mov    %esp,%ebp
  102169:	89 01                	mov    %eax,(%ecx)
  ioapic->data = data;
  10216b:	89 51 10             	mov    %edx,0x10(%ecx)
}
  10216e:	5d                   	pop    %ebp
  10216f:	c3                   	ret    

00102170 <ioapic_enable>:

void
ioapic_init(void)
{
  int i, id, maxintr;

  if(!ismp)
    return;

  ioapic = (volatile struct ioapic*)IOAPIC;
  maxintr = (ioapic_read(REG_VER) >> 16) & 0xFF;
  id = ioapic_read(REG_ID) >> 24;
  if(id != ioapic_id)
    cprintf("ioapic_init: id isn't equal to ioapic_id; not a MP\n");

  // Mark all interrupts edge-triggered, active high, disabled,
  // and not routed to any CPUs.
  for(i = 0; i <= maxintr; i++){
    ioapic_write(REG_TABLE+2*i, INT_DISABLED | (IRQ_OFFSET + i));
    ioapic_write(REG_TABLE+2*i+1, 0);
  }
}

void
ioapic_enable(int irq, int cpunum)
{
  102170:	55                   	push   %ebp
  102171:	89 e5                	mov    %esp,%ebp
  102173:	83 ec 08             	sub    $0x8,%esp
  102176:	89 1c 24             	mov    %ebx,(%esp)
  102179:	89 74 24 04          	mov    %esi,0x4(%esp)
  if(!ismp)
  10217d:	8b 15 a0 aa 10 00    	mov    0x10aaa0,%edx
  102183:	8b 45 08             	mov    0x8(%ebp),%eax
  102186:	8b 5d 0c             	mov    0xc(%ebp),%ebx
  102189:	85 d2                	test   %edx,%edx
  10218b:	75 0b                	jne    102198 <ioapic_enable+0x28>
    return;

  // Mark interrupt edge-triggered, active high,
  // enabled, and routed to the given cpunum,
  // which happens to be that cpu's APIC ID.
  ioapic_write(REG_TABLE+2*irq, IRQ_OFFSET + irq);
  ioapic_write(REG_TABLE+2*irq+1, cpunum << 24);
}
  10218d:	8b 1c 24             	mov    (%esp),%ebx
  102190:	8b 74 24 04          	mov    0x4(%esp),%esi
  102194:	89 ec                	mov    %ebp,%esp
  102196:	5d                   	pop    %ebp
  102197:	c3                   	ret    
  102198:	8d 34 00             	lea    (%eax,%eax,1),%esi
  10219b:	8d 50 20             	lea    0x20(%eax),%edx
  10219e:	c1 e3 18             	shl    $0x18,%ebx
  1021a1:	8d 46 10             	lea    0x10(%esi),%eax
  1021a4:	e8 b7 ff ff ff       	call   102160 <ioapic_write>
  1021a9:	8d 46 11             	lea    0x11(%esi),%eax
  1021ac:	89 da                	mov    %ebx,%edx
  1021ae:	8b 74 24 04          	mov    0x4(%esp),%esi
  1021b2:	8b 1c 24             	mov    (%esp),%ebx
  1021b5:	89 ec                	mov    %ebp,%esp
  1021b7:	5d                   	pop    %ebp
  1021b8:	eb a6                	jmp    102160 <ioapic_write>
  1021ba:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

001021c0 <ioapic_init>:
  1021c0:	55                   	push   %ebp
  1021c1:	89 e5                	mov    %esp,%ebp
  1021c3:	57                   	push   %edi
  1021c4:	56                   	push   %esi
  1021c5:	53                   	push   %ebx
  1021c6:	83 ec 0c             	sub    $0xc,%esp
  1021c9:	8b 1d a0 aa 10 00    	mov    0x10aaa0,%ebx
  1021cf:	85 db                	test   %ebx,%ebx
  1021d1:	75 0d                	jne    1021e0 <ioapic_init+0x20>
  1021d3:	83 c4 0c             	add    $0xc,%esp
  1021d6:	5b                   	pop    %ebx
  1021d7:	5e                   	pop    %esi
  1021d8:	5f                   	pop    %edi
  1021d9:	5d                   	pop    %ebp
  1021da:	c3                   	ret    
  1021db:	90                   	nop    
  1021dc:	8d 74 26 00          	lea    0x0(%esi),%esi
  1021e0:	b9 00 00 c0 fe       	mov    $0xfec00000,%ecx
  1021e5:	b8 01 00 00 00       	mov    $0x1,%eax
  1021ea:	89 0d 54 aa 10 00    	mov    %ecx,0x10aa54
  1021f0:	e8 5b ff ff ff       	call   102150 <ioapic_read>
  1021f5:	c1 e8 10             	shr    $0x10,%eax
  1021f8:	0f b6 f8             	movzbl %al,%edi
  1021fb:	31 c0                	xor    %eax,%eax
  1021fd:	e8 4e ff ff ff       	call   102150 <ioapic_read>
  102202:	0f b6 15 a4 aa 10 00 	movzbl 0x10aaa4,%edx
  102209:	c1 e8 18             	shr    $0x18,%eax
  10220c:	39 d0                	cmp    %edx,%eax
  10220e:	74 0c                	je     10221c <ioapic_init+0x5c>
  102210:	c7 04 24 8c 5f 10 00 	movl   $0x105f8c,(%esp)
  102217:	e8 14 e5 ff ff       	call   100730 <cprintf>
  10221c:	31 f6                	xor    %esi,%esi
  10221e:	bb 10 00 00 00       	mov    $0x10,%ebx
  102223:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  102229:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  102230:	8d 56 20             	lea    0x20(%esi),%edx
  102233:	89 d8                	mov    %ebx,%eax
  102235:	81 ca 00 00 01 00    	or     $0x10000,%edx
  10223b:	46                   	inc    %esi
  10223c:	e8 1f ff ff ff       	call   102160 <ioapic_write>
  102241:	8d 43 01             	lea    0x1(%ebx),%eax
  102244:	31 d2                	xor    %edx,%edx
  102246:	e8 15 ff ff ff       	call   102160 <ioapic_write>
  10224b:	83 c3 02             	add    $0x2,%ebx
  10224e:	39 f7                	cmp    %esi,%edi
  102250:	7d de                	jge    102230 <ioapic_init+0x70>
  102252:	83 c4 0c             	add    $0xc,%esp
  102255:	5b                   	pop    %ebx
  102256:	5e                   	pop    %esi
  102257:	5f                   	pop    %edi
  102258:	5d                   	pop    %ebp
  102259:	c3                   	ret    
  10225a:	90                   	nop    
  10225b:	90                   	nop    
  10225c:	90                   	nop    
  10225d:	90                   	nop    
  10225e:	90                   	nop    
  10225f:	90                   	nop    

00102260 <kalloc>:
// Returns a kernel-segment pointer.
// Returns 0 if the memory cannot be allocated.
char*
kalloc(int n)
{
  102260:	55                   	push   %ebp
  102261:	89 e5                	mov    %esp,%ebp
  102263:	56                   	push   %esi
  102264:	53                   	push   %ebx
  102265:	83 ec 10             	sub    $0x10,%esp
  102268:	8b 75 08             	mov    0x8(%ebp),%esi
  char *p;
  struct run *r, **rp;

  if(n % PAGE || n <= 0)
  10226b:	f7 c6 ff 0f 00 00    	test   $0xfff,%esi
  102271:	75 5d                	jne    1022d0 <kalloc+0x70>
  102273:	85 f6                	test   %esi,%esi
  102275:	7e 59                	jle    1022d0 <kalloc+0x70>
    panic("kalloc");

  acquire(&kalloc_lock);
  102277:	c7 04 24 60 aa 10 00 	movl   $0x10aa60,(%esp)
  10227e:	e8 8d 1c 00 00       	call   103f10 <acquire>
  for(rp=&freelist; (r=*rp) != 0; rp=&r->next){
  102283:	8b 1d 94 aa 10 00    	mov    0x10aa94,%ebx
  102289:	85 db                	test   %ebx,%ebx
  10228b:	74 4f                	je     1022dc <kalloc+0x7c>
    if(r->len == n){
  10228d:	8b 43 04             	mov    0x4(%ebx),%eax
  102290:	ba 94 aa 10 00       	mov    $0x10aa94,%edx
  102295:	39 c6                	cmp    %eax,%esi
  102297:	74 18                	je     1022b1 <kalloc+0x51>
  102299:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
      *rp = r->next;
      release(&kalloc_lock);
      return (char*)r;
    }
    if(r->len > n){
  1022a0:	7c 5d                	jl     1022ff <kalloc+0x9f>
  1022a2:	89 da                	mov    %ebx,%edx
  1022a4:	8b 1b                	mov    (%ebx),%ebx
  1022a6:	85 db                	test   %ebx,%ebx
  1022a8:	74 32                	je     1022dc <kalloc+0x7c>
  1022aa:	8b 43 04             	mov    0x4(%ebx),%eax
  1022ad:	39 c6                	cmp    %eax,%esi
  1022af:	75 ef                	jne    1022a0 <kalloc+0x40>
  1022b1:	8b 03                	mov    (%ebx),%eax
  1022b3:	89 02                	mov    %eax,(%edx)
  1022b5:	c7 04 24 60 aa 10 00 	movl   $0x10aa60,(%esp)
  1022bc:	e8 0f 1c 00 00       	call   103ed0 <release>
      r->len -= n;
      p = (char*)r + r->len;
      release(&kalloc_lock);
      return p;
    }
  }
  release(&kalloc_lock);

  cprintf("kalloc: out of memory\n");
  return 0;
}
  1022c1:	83 c4 10             	add    $0x10,%esp
  1022c4:	89 d8                	mov    %ebx,%eax
  1022c6:	5b                   	pop    %ebx
  1022c7:	5e                   	pop    %esi
  1022c8:	5d                   	pop    %ebp
  1022c9:	c3                   	ret    
  1022ca:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1022d0:	c7 04 24 c0 5f 10 00 	movl   $0x105fc0,(%esp)
  1022d7:	e8 d4 e5 ff ff       	call   1008b0 <panic>
  1022dc:	c7 04 24 60 aa 10 00 	movl   $0x10aa60,(%esp)
  1022e3:	31 db                	xor    %ebx,%ebx
  1022e5:	e8 e6 1b 00 00       	call   103ed0 <release>
  1022ea:	c7 04 24 c7 5f 10 00 	movl   $0x105fc7,(%esp)
  1022f1:	e8 3a e4 ff ff       	call   100730 <cprintf>
  1022f6:	83 c4 10             	add    $0x10,%esp
  1022f9:	89 d8                	mov    %ebx,%eax
  1022fb:	5b                   	pop    %ebx
  1022fc:	5e                   	pop    %esi
  1022fd:	5d                   	pop    %ebp
  1022fe:	c3                   	ret    
  1022ff:	29 f0                	sub    %esi,%eax
  102301:	89 43 04             	mov    %eax,0x4(%ebx)
  102304:	8d 1c 18             	lea    (%eax,%ebx,1),%ebx
  102307:	c7 04 24 60 aa 10 00 	movl   $0x10aa60,(%esp)
  10230e:	e8 bd 1b 00 00       	call   103ed0 <release>
  102313:	83 c4 10             	add    $0x10,%esp
  102316:	89 d8                	mov    %ebx,%eax
  102318:	5b                   	pop    %ebx
  102319:	5e                   	pop    %esi
  10231a:	5d                   	pop    %ebp
  10231b:	c3                   	ret    
  10231c:	8d 74 26 00          	lea    0x0(%esi),%esi

00102320 <kfree>:
  102320:	55                   	push   %ebp
  102321:	89 e5                	mov    %esp,%ebp
  102323:	83 ec 28             	sub    $0x28,%esp
  102326:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  102329:	8b 5d 0c             	mov    0xc(%ebp),%ebx
  10232c:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  10232f:	8b 75 08             	mov    0x8(%ebp),%esi
  102332:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  102335:	85 db                	test   %ebx,%ebx
  102337:	7e 08                	jle    102341 <kfree+0x21>
  102339:	f7 c3 ff 0f 00 00    	test   $0xfff,%ebx
  10233f:	74 0f                	je     102350 <kfree+0x30>
  102341:	c7 04 24 de 5f 10 00 	movl   $0x105fde,(%esp)
  102348:	e8 63 e5 ff ff       	call   1008b0 <panic>
  10234d:	8d 76 00             	lea    0x0(%esi),%esi
  102350:	bf 01 00 00 00       	mov    $0x1,%edi
  102355:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  102359:	89 7c 24 04          	mov    %edi,0x4(%esp)
  10235d:	89 34 24             	mov    %esi,(%esp)
  102360:	e8 1b 1c 00 00       	call   103f80 <memset>
  102365:	c7 04 24 60 aa 10 00 	movl   $0x10aa60,(%esp)
  10236c:	e8 9f 1b 00 00       	call   103f10 <acquire>
  102371:	8b 15 94 aa 10 00    	mov    0x10aa94,%edx
  102377:	c7 45 f0 94 aa 10 00 	movl   $0x10aa94,0xfffffff0(%ebp)
  10237e:	85 d2                	test   %edx,%edx
  102380:	0f 84 96 00 00 00    	je     10241c <kfree+0xfc>
  102386:	8d 3c 1e             	lea    (%esi,%ebx,1),%edi
  102389:	39 d7                	cmp    %edx,%edi
  10238b:	0f 82 8b 00 00 00    	jb     10241c <kfree+0xfc>
  102391:	8b 42 04             	mov    0x4(%edx),%eax
  102394:	39 d6                	cmp    %edx,%esi
  102396:	8d 0c 02             	lea    (%edx,%eax,1),%ecx
  102399:	73 65                	jae    102400 <kfree+0xe0>
  10239b:	39 d7                	cmp    %edx,%edi
  10239d:	c7 45 f0 94 aa 10 00 	movl   $0x10aa94,0xfffffff0(%ebp)
  1023a4:	74 2d                	je     1023d3 <kfree+0xb3>
  1023a6:	8d 76 00             	lea    0x0(%esi),%esi
  1023a9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  1023b0:	39 ce                	cmp    %ecx,%esi
  1023b2:	74 74                	je     102428 <kfree+0x108>
  1023b4:	89 55 f0             	mov    %edx,0xfffffff0(%ebp)
  1023b7:	8b 12                	mov    (%edx),%edx
  1023b9:	85 d2                	test   %edx,%edx
  1023bb:	74 5f                	je     10241c <kfree+0xfc>
  1023bd:	39 d7                	cmp    %edx,%edi
  1023bf:	72 5b                	jb     10241c <kfree+0xfc>
  1023c1:	8b 42 04             	mov    0x4(%edx),%eax
  1023c4:	39 d6                	cmp    %edx,%esi
  1023c6:	8d 0c 10             	lea    (%eax,%edx,1),%ecx
  1023c9:	72 04                	jb     1023cf <kfree+0xaf>
  1023cb:	39 ce                	cmp    %ecx,%esi
  1023cd:	72 41                	jb     102410 <kfree+0xf0>
  1023cf:	39 d7                	cmp    %edx,%edi
  1023d1:	75 dd                	jne    1023b0 <kfree+0x90>
  1023d3:	8d 04 03             	lea    (%ebx,%eax,1),%eax
  1023d6:	89 46 04             	mov    %eax,0x4(%esi)
  1023d9:	8b 07                	mov    (%edi),%eax
  1023db:	89 06                	mov    %eax,(%esi)
  1023dd:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  1023e0:	89 30                	mov    %esi,(%eax)
  1023e2:	c7 45 08 60 aa 10 00 	movl   $0x10aa60,0x8(%ebp)
  1023e9:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  1023ec:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  1023ef:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  1023f2:	89 ec                	mov    %ebp,%esp
  1023f4:	5d                   	pop    %ebp
  1023f5:	e9 d6 1a 00 00       	jmp    103ed0 <release>
  1023fa:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  102400:	39 ce                	cmp    %ecx,%esi
  102402:	73 97                	jae    10239b <kfree+0x7b>
  102404:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  10240a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi
  102410:	c7 04 24 e4 5f 10 00 	movl   $0x105fe4,(%esp)
  102417:	e8 94 e4 ff ff       	call   1008b0 <panic>
  10241c:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  10241f:	89 16                	mov    %edx,(%esi)
  102421:	89 5e 04             	mov    %ebx,0x4(%esi)
  102424:	89 30                	mov    %esi,(%eax)
  102426:	eb ba                	jmp    1023e2 <kfree+0xc2>
  102428:	8b 0a                	mov    (%edx),%ecx
  10242a:	8d 04 03             	lea    (%ebx,%eax,1),%eax
  10242d:	89 42 04             	mov    %eax,0x4(%edx)
  102430:	85 c9                	test   %ecx,%ecx
  102432:	74 ae                	je     1023e2 <kfree+0xc2>
  102434:	39 cf                	cmp    %ecx,%edi
  102436:	75 aa                	jne    1023e2 <kfree+0xc2>
  102438:	8b 4f 04             	mov    0x4(%edi),%ecx
  10243b:	01 c8                	add    %ecx,%eax
  10243d:	89 42 04             	mov    %eax,0x4(%edx)
  102440:	8b 07                	mov    (%edi),%eax
  102442:	89 02                	mov    %eax,(%edx)
  102444:	eb 9c                	jmp    1023e2 <kfree+0xc2>
  102446:	8d 76 00             	lea    0x0(%esi),%esi
  102449:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00102450 <kinit>:
  102450:	55                   	push   %ebp
  102451:	b8 c0 5f 10 00       	mov    $0x105fc0,%eax
  102456:	89 e5                	mov    %esp,%ebp
  102458:	83 ec 08             	sub    $0x8,%esp
  10245b:	89 44 24 04          	mov    %eax,0x4(%esp)
  10245f:	c7 04 24 60 aa 10 00 	movl   $0x10aa60,(%esp)
  102466:	e8 c5 18 00 00       	call   103d30 <initlock>
  10246b:	b8 00 00 10 00       	mov    $0x100000,%eax
  102470:	89 44 24 04          	mov    %eax,0x4(%esp)
  102474:	c7 04 24 f6 5f 10 00 	movl   $0x105ff6,(%esp)
  10247b:	e8 b0 e2 ff ff       	call   100730 <cprintf>
  102480:	b8 00 00 10 00       	mov    $0x100000,%eax
  102485:	89 44 24 04          	mov    %eax,0x4(%esp)
  102489:	b8 c4 ef 10 00       	mov    $0x10efc4,%eax
  10248e:	25 00 f0 ff ff       	and    $0xfffff000,%eax
  102493:	89 04 24             	mov    %eax,(%esp)
  102496:	e8 85 fe ff ff       	call   102320 <kfree>
  10249b:	c9                   	leave  
  10249c:	c3                   	ret    
  10249d:	90                   	nop    
  10249e:	90                   	nop    
  10249f:	90                   	nop    

001024a0 <kbd_intr>:
}

void
kbd_intr(void)
{
  1024a0:	55                   	push   %ebp
  1024a1:	89 e5                	mov    %esp,%ebp
  1024a3:	83 ec 08             	sub    $0x8,%esp
  console_intr(kbd_getc);
  1024a6:	c7 04 24 c0 24 10 00 	movl   $0x1024c0,(%esp)
  1024ad:	e8 2e e0 ff ff       	call   1004e0 <console_intr>
}
  1024b2:	c9                   	leave  
  1024b3:	c3                   	ret    
  1024b4:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1024ba:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi

001024c0 <kbd_getc>:
  1024c0:	55                   	push   %ebp
inb(ushort port)
{
  uchar data;

  asm volatile("in %1,%0" : "=a" (data) : "d" (port));
  1024c1:	ba 64 00 00 00       	mov    $0x64,%edx
  1024c6:	89 e5                	mov    %esp,%ebp
inb(ushort port)
{
  uchar data;

  asm volatile("in %1,%0" : "=a" (data) : "d" (port));
  1024c8:	ec                   	in     (%dx),%al
  1024c9:	0f b6 c0             	movzbl %al,%eax
  1024cc:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  1024d1:	a8 01                	test   $0x1,%al
  1024d3:	74 3b                	je     102510 <kbd_getc+0x50>
inb(ushort port)
{
  uchar data;

  asm volatile("in %1,%0" : "=a" (data) : "d" (port));
  1024d5:	ba 60 00 00 00       	mov    $0x60,%edx
  1024da:	ec                   	in     (%dx),%al
  1024db:	3c e0                	cmp    $0xe0,%al
  1024dd:	0f 84 7d 00 00 00    	je     102560 <kbd_getc+0xa0>
  1024e3:	0f b6 c8             	movzbl %al,%ecx
  1024e6:	84 c9                	test   %cl,%cl
  1024e8:	79 2a                	jns    102514 <kbd_getc+0x54>
  1024ea:	8b 15 3c 78 10 00    	mov    0x10783c,%edx
  1024f0:	f6 c2 40             	test   $0x40,%dl
  1024f3:	74 7b                	je     102570 <kbd_getc+0xb0>
  1024f5:	0f b6 81 00 60 10 00 	movzbl 0x106000(%ecx),%eax
  1024fc:	0c 40                	or     $0x40,%al
  1024fe:	0f b6 c0             	movzbl %al,%eax
  102501:	f7 d0                	not    %eax
  102503:	21 c2                	and    %eax,%edx
  102505:	89 15 3c 78 10 00    	mov    %edx,0x10783c
  10250b:	31 d2                	xor    %edx,%edx
  10250d:	8d 76 00             	lea    0x0(%esi),%esi
  102510:	5d                   	pop    %ebp
  102511:	89 d0                	mov    %edx,%eax
  102513:	c3                   	ret    
  102514:	a1 3c 78 10 00       	mov    0x10783c,%eax
  102519:	a8 40                	test   $0x40,%al
  10251b:	75 58                	jne    102575 <kbd_getc+0xb5>
  10251d:	8b 15 3c 78 10 00    	mov    0x10783c,%edx
  102523:	0f b6 81 00 60 10 00 	movzbl 0x106000(%ecx),%eax
  10252a:	09 d0                	or     %edx,%eax
  10252c:	0f b6 91 00 61 10 00 	movzbl 0x106100(%ecx),%edx
  102533:	31 d0                	xor    %edx,%eax
  102535:	89 c2                	mov    %eax,%edx
  102537:	83 e2 03             	and    $0x3,%edx
  10253a:	a8 08                	test   $0x8,%al
  10253c:	8b 14 95 00 62 10 00 	mov    0x106200(,%edx,4),%edx
  102543:	a3 3c 78 10 00       	mov    %eax,0x10783c
  102548:	0f b6 14 0a          	movzbl (%edx,%ecx,1),%edx
  10254c:	74 c2                	je     102510 <kbd_getc+0x50>
  10254e:	8d 42 9f             	lea    0xffffff9f(%edx),%eax
  102551:	83 f8 19             	cmp    $0x19,%eax
  102554:	77 2f                	ja     102585 <kbd_getc+0xc5>
  102556:	83 ea 20             	sub    $0x20,%edx
  102559:	eb b5                	jmp    102510 <kbd_getc+0x50>
  10255b:	90                   	nop    
  10255c:	8d 74 26 00          	lea    0x0(%esi),%esi
  102560:	83 0d 3c 78 10 00 40 	orl    $0x40,0x10783c
  102567:	31 d2                	xor    %edx,%edx
  102569:	5d                   	pop    %ebp
  10256a:	89 d0                	mov    %edx,%eax
  10256c:	c3                   	ret    
  10256d:	8d 76 00             	lea    0x0(%esi),%esi
  102570:	83 e1 7f             	and    $0x7f,%ecx
  102573:	eb 80                	jmp    1024f5 <kbd_getc+0x35>
  102575:	83 e0 bf             	and    $0xffffffbf,%eax
  102578:	81 c9 80 00 00 00    	or     $0x80,%ecx
  10257e:	a3 3c 78 10 00       	mov    %eax,0x10783c
  102583:	eb 98                	jmp    10251d <kbd_getc+0x5d>
  102585:	8d 42 bf             	lea    0xffffffbf(%edx),%eax
  102588:	83 f8 19             	cmp    $0x19,%eax
  10258b:	77 83                	ja     102510 <kbd_getc+0x50>
  10258d:	83 c2 20             	add    $0x20,%edx
  102590:	e9 7b ff ff ff       	jmp    102510 <kbd_getc+0x50>
  102595:	90                   	nop    
  102596:	90                   	nop    
  102597:	90                   	nop    
  102598:	90                   	nop    
  102599:	90                   	nop    
  10259a:	90                   	nop    
  10259b:	90                   	nop    
  10259c:	90                   	nop    
  10259d:	90                   	nop    
  10259e:	90                   	nop    
  10259f:	90                   	nop    

001025a0 <lapicw>:

static void
lapicw(int index, int value)
{
  lapic[index] = value;
  1025a0:	8b 0d 98 aa 10 00    	mov    0x10aa98,%ecx
  1025a6:	55                   	push   %ebp
  1025a7:	89 e5                	mov    %esp,%ebp
  1025a9:	8d 04 81             	lea    (%ecx,%eax,4),%eax
  1025ac:	89 10                	mov    %edx,(%eax)
  lapic[ID];  // wait for write to finish, by reading
  1025ae:	8b 41 20             	mov    0x20(%ecx),%eax
}
  1025b1:	5d                   	pop    %ebp
  1025b2:	c3                   	ret    
  1025b3:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1025b9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

001025c0 <lapic_init>:

void
lapic_init(int c)
{
  if(!lapic) 
  1025c0:	a1 98 aa 10 00       	mov    0x10aa98,%eax
  1025c5:	55                   	push   %ebp
  1025c6:	89 e5                	mov    %esp,%ebp
  1025c8:	85 c0                	test   %eax,%eax
  1025ca:	0f 84 f8 00 00 00    	je     1026c8 <lapic_init+0x108>
    return;

  // Enable local APIC; set spurious interrupt vector.
  lapicw(SVR, ENABLE | (IRQ_OFFSET+IRQ_SPURIOUS));
  1025d0:	ba 3f 01 00 00       	mov    $0x13f,%edx
  1025d5:	b8 3c 00 00 00       	mov    $0x3c,%eax
  1025da:	e8 c1 ff ff ff       	call   1025a0 <lapicw>

  // The timer repeatedly counts down at bus frequency
  // from lapic[TICR] and then issues an interrupt.  
  // If xv6 cared more about precise timekeeping,
  // TICR would be calibrated using an external time source.
  lapicw(TDCR, X1);
  1025df:	ba 0b 00 00 00       	mov    $0xb,%edx
  1025e4:	b8 f8 00 00 00       	mov    $0xf8,%eax
  1025e9:	e8 b2 ff ff ff       	call   1025a0 <lapicw>
  lapicw(TIMER, PERIODIC | (IRQ_OFFSET + IRQ_TIMER));
  1025ee:	ba 20 00 02 00       	mov    $0x20020,%edx
  1025f3:	b8 c8 00 00 00       	mov    $0xc8,%eax
  1025f8:	e8 a3 ff ff ff       	call   1025a0 <lapicw>
  lapicw(TICR, 10000000); 
  1025fd:	ba 80 96 98 00       	mov    $0x989680,%edx
  102602:	b8 e0 00 00 00       	mov    $0xe0,%eax
  102607:	e8 94 ff ff ff       	call   1025a0 <lapicw>

  // Disable logical interrupt lines.
  lapicw(LINT0, MASKED);
  10260c:	ba 00 00 01 00       	mov    $0x10000,%edx
  102611:	b8 d4 00 00 00       	mov    $0xd4,%eax
  102616:	e8 85 ff ff ff       	call   1025a0 <lapicw>
  lapicw(LINT1, MASKED);
  10261b:	b8 d8 00 00 00       	mov    $0xd8,%eax
  102620:	ba 00 00 01 00       	mov    $0x10000,%edx
  102625:	e8 76 ff ff ff       	call   1025a0 <lapicw>

  // Disable performance counter overflow interrupts
  // on machines that provide that interrupt entry.
  if(((lapic[VER]>>16) & 0xFF) >= 4)
  10262a:	a1 98 aa 10 00       	mov    0x10aa98,%eax
  10262f:	83 c0 30             	add    $0x30,%eax
  102632:	8b 00                	mov    (%eax),%eax
  102634:	c1 e8 10             	shr    $0x10,%eax
  102637:	25 ff 00 00 00       	and    $0xff,%eax
  10263c:	83 f8 03             	cmp    $0x3,%eax
  10263f:	77 73                	ja     1026b4 <lapic_init+0xf4>
    lapicw(PCINT, MASKED);

  // Map error interrupt to IRQ_ERROR.
  lapicw(ERROR, IRQ_OFFSET+IRQ_ERROR);
  102641:	ba 33 00 00 00       	mov    $0x33,%edx
  102646:	b8 dc 00 00 00       	mov    $0xdc,%eax
  10264b:	e8 50 ff ff ff       	call   1025a0 <lapicw>

  // Clear error status register (requires back-to-back writes).
  lapicw(ESR, 0);
  102650:	31 d2                	xor    %edx,%edx
  102652:	b8 a0 00 00 00       	mov    $0xa0,%eax
  102657:	e8 44 ff ff ff       	call   1025a0 <lapicw>
  lapicw(ESR, 0);
  10265c:	31 d2                	xor    %edx,%edx
  10265e:	b8 a0 00 00 00       	mov    $0xa0,%eax
  102663:	e8 38 ff ff ff       	call   1025a0 <lapicw>

  // Ack any outstanding interrupts.
  lapicw(EOI, 0);
  102668:	31 d2                	xor    %edx,%edx
  10266a:	b8 2c 00 00 00       	mov    $0x2c,%eax
  10266f:	e8 2c ff ff ff       	call   1025a0 <lapicw>

  // Send an Init Level De-Assert to synchronise arbitration ID's.
  lapicw(ICRHI, 0);
  102674:	31 d2                	xor    %edx,%edx
  102676:	b8 c4 00 00 00       	mov    $0xc4,%eax
  10267b:	e8 20 ff ff ff       	call   1025a0 <lapicw>
  lapicw(ICRLO, BCAST | INIT | LEVEL);
  102680:	ba 00 85 08 00       	mov    $0x88500,%edx
  102685:	b8 c0 00 00 00       	mov    $0xc0,%eax
  10268a:	e8 11 ff ff ff       	call   1025a0 <lapicw>
  while(lapic[ICRLO] & DELIVS)
  10268f:	8b 15 98 aa 10 00    	mov    0x10aa98,%edx
  102695:	81 c2 00 03 00 00    	add    $0x300,%edx
  10269b:	90                   	nop    
  10269c:	8d 74 26 00          	lea    0x0(%esi),%esi
  1026a0:	8b 02                	mov    (%edx),%eax
  1026a2:	f6 c4 10             	test   $0x10,%ah
  1026a5:	75 f9                	jne    1026a0 <lapic_init+0xe0>
    ;

  // Enable interrupts on the APIC (but not on the processor).
  lapicw(TPR, 0);
}
  1026a7:	5d                   	pop    %ebp
  1026a8:	31 d2                	xor    %edx,%edx
  1026aa:	b8 20 00 00 00       	mov    $0x20,%eax
  1026af:	e9 ec fe ff ff       	jmp    1025a0 <lapicw>
  1026b4:	ba 00 00 01 00       	mov    $0x10000,%edx
  1026b9:	b8 d0 00 00 00       	mov    $0xd0,%eax
  1026be:	e8 dd fe ff ff       	call   1025a0 <lapicw>
  1026c3:	e9 79 ff ff ff       	jmp    102641 <lapic_init+0x81>
  1026c8:	5d                   	pop    %ebp
  1026c9:	c3                   	ret    
  1026ca:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

001026d0 <lapic_eoi>:

int
cpu(void)
{
  // Cannot call cpu when interrupts are enabled:
  // result not guaranteed to last long enough to be used!
  // Would prefer to panic but even printing is chancy here:
  // everything, including cprintf, calls cpu, at least indirectly
  // through acquire and release.
  if(read_eflags()&FL_IF){
    static int n;
    if(n++ == 0)
      cprintf("cpu called from %x with interrupts enabled\n",
        ((uint*)read_ebp())[1]);
  }

  if(lapic)
    return lapic[ID]>>24;
  return 0;
}

// Acknowledge interrupt.
void
lapic_eoi(void)
{
  if(lapic)
  1026d0:	8b 15 98 aa 10 00    	mov    0x10aa98,%edx
  1026d6:	55                   	push   %ebp
  1026d7:	89 e5                	mov    %esp,%ebp
  1026d9:	85 d2                	test   %edx,%edx
  1026db:	74 13                	je     1026f0 <lapic_eoi+0x20>
    lapicw(EOI, 0);
}
  1026dd:	5d                   	pop    %ebp
  1026de:	31 d2                	xor    %edx,%edx
  1026e0:	b8 2c 00 00 00       	mov    $0x2c,%eax
  1026e5:	e9 b6 fe ff ff       	jmp    1025a0 <lapicw>
  1026ea:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1026f0:	5d                   	pop    %ebp
  1026f1:	c3                   	ret    
  1026f2:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  1026f9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00102700 <microdelay>:

// Spin for a given number of microseconds.
// On real hardware would want to tune this dynamically.
static void
microdelay(int us)
{
  102700:	55                   	push   %ebp
  volatile int j = 0;
  102701:	89 c2                	mov    %eax,%edx
  102703:	89 e5                	mov    %esp,%ebp
  102705:	83 ec 10             	sub    $0x10,%esp
  
  while(us-- > 0)
  102708:	85 d2                	test   %edx,%edx
  10270a:	c7 45 fc 00 00 00 00 	movl   $0x0,0xfffffffc(%ebp)
  102711:	7e 23                	jle    102736 <microdelay+0x36>
  102713:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  102719:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
    for(j=0; j<10000; j++);
  102720:	c7 45 fc 00 00 00 00 	movl   $0x0,0xfffffffc(%ebp)
  102727:	8b 45 fc             	mov    0xfffffffc(%ebp),%eax
  10272a:	3d 0f 27 00 00       	cmp    $0x270f,%eax
  10272f:	7e 07                	jle    102738 <microdelay+0x38>
  102731:	4a                   	dec    %edx
  102732:	85 d2                	test   %edx,%edx
  102734:	7f ea                	jg     102720 <microdelay+0x20>
}
  102736:	c9                   	leave  
  102737:	c3                   	ret    
  102738:	8b 45 fc             	mov    0xfffffffc(%ebp),%eax
  10273b:	40                   	inc    %eax
  10273c:	89 45 fc             	mov    %eax,0xfffffffc(%ebp)
  10273f:	8b 45 fc             	mov    0xfffffffc(%ebp),%eax
  102742:	3d 0f 27 00 00       	cmp    $0x270f,%eax
  102747:	7e ef                	jle    102738 <microdelay+0x38>
  102749:	4a                   	dec    %edx
  10274a:	eb e6                	jmp    102732 <microdelay+0x32>
  10274c:	8d 74 26 00          	lea    0x0(%esi),%esi

00102750 <cpu>:
  102750:	55                   	push   %ebp
  102751:	89 e5                	mov    %esp,%ebp
  102753:	83 ec 08             	sub    $0x8,%esp
static inline uint
read_eflags(void)
{
  uint eflags;
  asm volatile("pushfl; popl %0" : "=r" (eflags));
  102756:	9c                   	pushf  
  102757:	58                   	pop    %eax
  102758:	f6 c4 02             	test   $0x2,%ah
  10275b:	74 0e                	je     10276b <cpu+0x1b>
  10275d:	a1 40 78 10 00       	mov    0x107840,%eax
  102762:	40                   	inc    %eax
  102763:	a3 40 78 10 00       	mov    %eax,0x107840
  102768:	48                   	dec    %eax
  102769:	74 14                	je     10277f <cpu+0x2f>
  10276b:	8b 15 98 aa 10 00    	mov    0x10aa98,%edx
  102771:	31 c0                	xor    %eax,%eax
  102773:	85 d2                	test   %edx,%edx
  102775:	74 06                	je     10277d <cpu+0x2d>
  102777:	8b 42 20             	mov    0x20(%edx),%eax
  10277a:	c1 e8 18             	shr    $0x18,%eax
  10277d:	c9                   	leave  
  10277e:	c3                   	ret    
read_ebp(void)
{
  uint ebp;
  
  asm volatile("movl %%ebp, %0" : "=a" (ebp));
  10277f:	89 e8                	mov    %ebp,%eax
  102781:	8b 40 04             	mov    0x4(%eax),%eax
  102784:	c7 04 24 10 62 10 00 	movl   $0x106210,(%esp)
  10278b:	89 44 24 04          	mov    %eax,0x4(%esp)
  10278f:	e8 9c df ff ff       	call   100730 <cprintf>
  102794:	eb d5                	jmp    10276b <cpu+0x1b>
  102796:	8d 76 00             	lea    0x0(%esi),%esi
  102799:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

001027a0 <lapic_startap>:


#define IO_RTC  0x70

// Start additional processor running bootstrap code at addr.
// See Appendix B of MultiProcessor Specification.
void
lapic_startap(uchar apicid, uint addr)
{
  1027a0:	55                   	push   %ebp

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  1027a1:	b0 0f                	mov    $0xf,%al
  1027a3:	89 e5                	mov    %esp,%ebp

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  1027a5:	ba 70 00 00 00       	mov    $0x70,%edx
  1027aa:	57                   	push   %edi
  1027ab:	0f b6 4d 08          	movzbl 0x8(%ebp),%ecx
  1027af:	56                   	push   %esi
  1027b0:	53                   	push   %ebx
  1027b1:	8b 5d 0c             	mov    0xc(%ebp),%ebx

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  1027b4:	ee                   	out    %al,(%dx)
  int i;
  ushort *wrv;
  
  // "The BSP must initialize CMOS shutdown code to 0AH
  // and the warm reset vector (DWORD based at 40:67) to point at
  // the AP startup code prior to the [universal startup algorithm]."
  outb(IO_RTC, 0xF);  // offset 0xF is shutdown code
  outb(IO_RTC+1, 0x0A);
  wrv = (ushort*)(0x40<<4 | 0x67);  // Warm reset vector
  wrv[0] = 0;
  wrv[1] = addr >> 4;

  // "Universal startup algorithm."
  // Send INIT (level-triggered) interrupt to reset other CPU.
  lapicw(ICRHI, apicid<<24);
  1027b5:	b0 0a                	mov    $0xa,%al
  1027b7:	ba 71 00 00 00       	mov    $0x71,%edx
  1027bc:	ee                   	out    %al,(%dx)
  1027bd:	0f b6 f9             	movzbl %cl,%edi
  1027c0:	31 f6                	xor    %esi,%esi
  1027c2:	c1 e7 18             	shl    $0x18,%edi
  1027c5:	b8 c4 00 00 00       	mov    $0xc4,%eax
  1027ca:	c1 eb 04             	shr    $0x4,%ebx
  1027cd:	89 fa                	mov    %edi,%edx
  1027cf:	66 89 35 67 04 00 00 	mov    %si,0x467
  lapicw(ICRLO, INIT | LEVEL | ASSERT);
  microdelay(200);
  lapicw(ICRLO, INIT | LEVEL);
  microdelay(100);	// should be 10ms, but too slow in Bochs!
  1027d6:	31 f6                	xor    %esi,%esi
  1027d8:	66 89 1d 69 04 00 00 	mov    %bx,0x469
  1027df:	c1 eb 08             	shr    $0x8,%ebx
  1027e2:	e8 b9 fd ff ff       	call   1025a0 <lapicw>
  1027e7:	ba 00 c5 00 00       	mov    $0xc500,%edx
  1027ec:	b8 c0 00 00 00       	mov    $0xc0,%eax
  1027f1:	e8 aa fd ff ff       	call   1025a0 <lapicw>
  1027f6:	b8 c8 00 00 00       	mov    $0xc8,%eax
  1027fb:	81 cb 00 06 00 00    	or     $0x600,%ebx
  102801:	e8 fa fe ff ff       	call   102700 <microdelay>
  102806:	ba 00 85 00 00       	mov    $0x8500,%edx
  10280b:	b8 c0 00 00 00       	mov    $0xc0,%eax
  102810:	e8 8b fd ff ff       	call   1025a0 <lapicw>
  102815:	b8 64 00 00 00       	mov    $0x64,%eax
  10281a:	e8 e1 fe ff ff       	call   102700 <microdelay>
  
  // Send startup IPI (twice!) to enter bootstrap code.
  // Regular hardware is supposed to only accept a STARTUP
  // when it is in the halted state due to an INIT.  So the second
  // should be ignored, but it is part of the official Intel algorithm.
  // Bochs complains about the second one.  Too bad for Bochs.
  for(i = 0; i < 2; i++){
    lapicw(ICRHI, apicid<<24);
  10281f:	89 fa                	mov    %edi,%edx
  102821:	b8 c4 00 00 00       	mov    $0xc4,%eax
  102826:	e8 75 fd ff ff       	call   1025a0 <lapicw>
    lapicw(ICRLO, STARTUP | (addr>>12));
  10282b:	89 da                	mov    %ebx,%edx
  10282d:	b8 c0 00 00 00       	mov    $0xc0,%eax
  102832:	e8 69 fd ff ff       	call   1025a0 <lapicw>
  102837:	46                   	inc    %esi
    microdelay(200);
  102838:	b8 c8 00 00 00       	mov    $0xc8,%eax
  10283d:	e8 be fe ff ff       	call   102700 <microdelay>
  102842:	83 fe 02             	cmp    $0x2,%esi
  102845:	75 d8                	jne    10281f <lapic_startap+0x7f>
  }
}
  102847:	5b                   	pop    %ebx
  102848:	5e                   	pop    %esi
  102849:	5f                   	pop    %edi
  10284a:	5d                   	pop    %ebp
  10284b:	c3                   	ret    
  10284c:	90                   	nop    
  10284d:	90                   	nop    
  10284e:	90                   	nop    
  10284f:	90                   	nop    

00102850 <mpmain>:
// Bootstrap processor gets here after setting up the hardware.
// Additional processors start here.
static void
mpmain(void)
{
  102850:	55                   	push   %ebp
  102851:	89 e5                	mov    %esp,%ebp
  102853:	53                   	push   %ebx
  102854:	83 ec 14             	sub    $0x14,%esp
  cprintf("cpu%d: mpmain\n", cpu());
  102857:	e8 f4 fe ff ff       	call   102750 <cpu>
  10285c:	c7 04 24 3c 62 10 00 	movl   $0x10623c,(%esp)
  102863:	89 44 24 04          	mov    %eax,0x4(%esp)
  102867:	e8 c4 de ff ff       	call   100730 <cprintf>
  idtinit();
  10286c:	e8 cf 27 00 00       	call   105040 <idtinit>
  if(cpu() != mp_bcpu())
  102871:	e8 da fe ff ff       	call   102750 <cpu>
  102876:	89 c3                	mov    %eax,%ebx
  102878:	e8 e3 01 00 00       	call   102a60 <mp_bcpu>
  10287d:	39 c3                	cmp    %eax,%ebx
  10287f:	74 0d                	je     10288e <mpmain+0x3e>
    lapic_init(cpu());
  102881:	e8 ca fe ff ff       	call   102750 <cpu>
  102886:	89 04 24             	mov    %eax,(%esp)
  102889:	e8 32 fd ff ff       	call   1025c0 <lapic_init>
  setupsegs(0);
  10288e:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  102895:	e8 76 0e 00 00       	call   103710 <setupsegs>
  xchg(&cpus[cpu()].booted, 1);
  10289a:	e8 b1 fe ff ff       	call   102750 <cpu>
  10289f:	8d 04 40             	lea    (%eax,%eax,2),%eax
  1028a2:	89 c2                	mov    %eax,%edx
  1028a4:	c1 e2 04             	shl    $0x4,%edx
  1028a7:	01 d0                	add    %edx,%eax
{
  uint result;
  
  // The + in "+m" denotes a read-modify-write operand.
  asm volatile("lock; xchgl %0, %1" :
  1028a9:	ba 01 00 00 00       	mov    $0x1,%edx
  1028ae:	8d 0c 85 c0 00 00 00 	lea    0xc0(,%eax,4),%ecx
{
  uint result;
  
  // The + in "+m" denotes a read-modify-write operand.
  asm volatile("lock; xchgl %0, %1" :
  1028b5:	89 d0                	mov    %edx,%eax
  1028b7:	f0 87 81 c0 aa 10 00 	lock xchg %eax,0x10aac0(%ecx)

  cprintf("cpu%d: scheduling\n", cpu());
  1028be:	e8 8d fe ff ff       	call   102750 <cpu>
  1028c3:	c7 04 24 4b 62 10 00 	movl   $0x10624b,(%esp)
  1028ca:	89 44 24 04          	mov    %eax,0x4(%esp)
  1028ce:	e8 5d de ff ff       	call   100730 <cprintf>
  scheduler();
  1028d3:	e8 28 10 00 00       	call   103900 <scheduler>
  1028d8:	90                   	nop    
  1028d9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

001028e0 <main>:
  1028e0:	8d 4c 24 04          	lea    0x4(%esp),%ecx
  1028e4:	83 e4 f0             	and    $0xfffffff0,%esp
  1028e7:	ff 71 fc             	pushl  0xfffffffc(%ecx)
  1028ea:	b8 c4 df 10 00       	mov    $0x10dfc4,%eax
  1028ef:	2d 8e 77 10 00       	sub    $0x10778e,%eax
  1028f4:	55                   	push   %ebp
  1028f5:	89 e5                	mov    %esp,%ebp
  1028f7:	53                   	push   %ebx
  1028f8:	51                   	push   %ecx
  1028f9:	83 ec 10             	sub    $0x10,%esp
  1028fc:	89 44 24 08          	mov    %eax,0x8(%esp)
  102900:	31 c0                	xor    %eax,%eax
  102902:	89 44 24 04          	mov    %eax,0x4(%esp)
  102906:	c7 04 24 8e 77 10 00 	movl   $0x10778e,(%esp)
  10290d:	e8 6e 16 00 00       	call   103f80 <memset>
  102912:	e8 09 02 00 00       	call   102b20 <mp_init>
  102917:	e8 44 01 00 00       	call   102a60 <mp_bcpu>
  10291c:	89 04 24             	mov    %eax,(%esp)
  10291f:	e8 9c fc ff ff       	call   1025c0 <lapic_init>
  102924:	e8 27 fe ff ff       	call   102750 <cpu>
  102929:	c7 04 24 5e 62 10 00 	movl   $0x10625e,(%esp)
  102930:	89 44 24 04          	mov    %eax,0x4(%esp)
  102934:	e8 f7 dd ff ff       	call   100730 <cprintf>
  102939:	e8 d2 13 00 00       	call   103d10 <pinit>
  10293e:	e8 5d d8 ff ff       	call   1001a0 <binit>
  102943:	e8 f8 03 00 00       	call   102d40 <pic_init>
  102948:	e8 73 f8 ff ff       	call   1021c0 <ioapic_init>
  10294d:	8d 76 00             	lea    0x0(%esi),%esi
  102950:	e8 fb fa ff ff       	call   102450 <kinit>
  102955:	e8 66 29 00 00       	call   1052c0 <tvinit>
  10295a:	e8 c1 e6 ff ff       	call   101020 <fileinit>
  10295f:	90                   	nop    
  102960:	e8 0b f5 ff ff       	call   101e70 <iinit>
  102965:	e8 a6 d8 ff ff       	call   100210 <console_init>
  10296a:	e8 51 f7 ff ff       	call   1020c0 <ide_init>
  10296f:	a1 a0 aa 10 00       	mov    0x10aaa0,%eax
  102974:	85 c0                	test   %eax,%eax
  102976:	0f 84 d3 00 00 00    	je     102a4f <main+0x16f>
  10297c:	e8 9f 12 00 00       	call   103c20 <userinit>
}

static void
bootothers(void)
{
  extern uchar _binary_bootother_start[], _binary_bootother_size[];
  uchar *code;
  struct cpu *c;
  char *stack;

  // Write bootstrap code to unused memory at 0x7000.
  code = (uchar*)0x7000;
  memmove(code, _binary_bootother_start, (uint)_binary_bootother_size);
  102981:	bb 5a 00 00 00       	mov    $0x5a,%ebx
  102986:	b9 34 77 10 00       	mov    $0x107734,%ecx
  10298b:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  10298f:	89 4c 24 04          	mov    %ecx,0x4(%esp)
  102993:	c7 04 24 00 70 00 00 	movl   $0x7000,(%esp)
  10299a:	e8 71 16 00 00       	call   104010 <memmove>

  for(c = cpus; c < cpus+ncpu; c++){
  10299f:	a1 20 b1 10 00       	mov    0x10b120,%eax
  1029a4:	8d 04 40             	lea    (%eax,%eax,2),%eax
  1029a7:	89 c2                	mov    %eax,%edx
  1029a9:	c1 e2 04             	shl    $0x4,%edx
  1029ac:	01 d0                	add    %edx,%eax
  1029ae:	8d 04 85 c0 aa 10 00 	lea    0x10aac0(,%eax,4),%eax
  1029b5:	3d c0 aa 10 00       	cmp    $0x10aac0,%eax
  1029ba:	0f 86 8a 00 00 00    	jbe    102a4a <main+0x16a>
  1029c0:	bb c0 aa 10 00       	mov    $0x10aac0,%ebx
  1029c5:	8d 74 26 00          	lea    0x0(%esi),%esi
  1029c9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
    if(c == cpus+cpu())  // We've started already.
  1029d0:	e8 7b fd ff ff       	call   102750 <cpu>
  1029d5:	8d 04 40             	lea    (%eax,%eax,2),%eax
  1029d8:	89 c2                	mov    %eax,%edx
  1029da:	c1 e2 04             	shl    $0x4,%edx
  1029dd:	01 d0                	add    %edx,%eax
  1029df:	8d 04 85 c0 aa 10 00 	lea    0x10aac0(,%eax,4),%eax
  1029e6:	39 d8                	cmp    %ebx,%eax
  1029e8:	74 40                	je     102a2a <main+0x14a>
      continue;

    // Fill in %esp, %eip and start code on cpu.
    stack = kalloc(KSTACKSIZE);
  1029ea:	c7 04 24 00 10 00 00 	movl   $0x1000,(%esp)
  1029f1:	e8 6a f8 ff ff       	call   102260 <kalloc>
    *(void**)(code-4) = stack + KSTACKSIZE;
    *(void**)(code-8) = mpmain;
  1029f6:	ba 50 28 10 00       	mov    $0x102850,%edx
  1029fb:	89 15 f8 6f 00 00    	mov    %edx,0x6ff8
  102a01:	05 00 10 00 00       	add    $0x1000,%eax
  102a06:	a3 fc 6f 00 00       	mov    %eax,0x6ffc
    lapic_startap(c->apicid, (uint)code);
  102a0b:	b8 00 70 00 00       	mov    $0x7000,%eax
  102a10:	89 44 24 04          	mov    %eax,0x4(%esp)
  102a14:	0f b6 03             	movzbl (%ebx),%eax
  102a17:	89 04 24             	mov    %eax,(%esp)
  102a1a:	e8 81 fd ff ff       	call   1027a0 <lapic_startap>
  102a1f:	90                   	nop    

    // Wait for cpu to get through bootstrap.
    while(c->booted == 0)
  102a20:	8b 83 c0 00 00 00    	mov    0xc0(%ebx),%eax
  102a26:	85 c0                	test   %eax,%eax
  102a28:	74 f6                	je     102a20 <main+0x140>
  102a2a:	a1 20 b1 10 00       	mov    0x10b120,%eax
  102a2f:	81 c3 cc 00 00 00    	add    $0xcc,%ebx
  102a35:	8d 04 40             	lea    (%eax,%eax,2),%eax
  102a38:	89 c2                	mov    %eax,%edx
  102a3a:	c1 e2 04             	shl    $0x4,%edx
  102a3d:	01 d0                	add    %edx,%eax
  102a3f:	8d 04 85 c0 aa 10 00 	lea    0x10aac0(,%eax,4),%eax
  102a46:	39 d8                	cmp    %ebx,%eax
  102a48:	77 86                	ja     1029d0 <main+0xf0>
  102a4a:	e8 01 fe ff ff       	call   102850 <mpmain>
  102a4f:	e8 9c 25 00 00       	call   104ff0 <timer_init>
  102a54:	e9 23 ff ff ff       	jmp    10297c <main+0x9c>
  102a59:	90                   	nop    
  102a5a:	90                   	nop    
  102a5b:	90                   	nop    
  102a5c:	90                   	nop    
  102a5d:	90                   	nop    
  102a5e:	90                   	nop    
  102a5f:	90                   	nop    

00102a60 <mp_bcpu>:

int
mp_bcpu(void)
{
  return bcpu-cpus;
  102a60:	a1 44 78 10 00       	mov    0x107844,%eax
  102a65:	55                   	push   %ebp
  102a66:	89 e5                	mov    %esp,%ebp
}
  102a68:	5d                   	pop    %ebp
  102a69:	2d c0 aa 10 00       	sub    $0x10aac0,%eax
  102a6e:	c1 f8 02             	sar    $0x2,%eax
  102a71:	69 c0 fb fa fa fa    	imul   $0xfafafafb,%eax,%eax
  102a77:	c3                   	ret    
  102a78:	90                   	nop    
  102a79:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00102a80 <sum>:

static uchar
sum(uchar *addr, int len)
{
  102a80:	55                   	push   %ebp
  102a81:	89 e5                	mov    %esp,%ebp
  102a83:	56                   	push   %esi
  102a84:	89 c6                	mov    %eax,%esi
  int i, sum;
  
  sum = 0;
  for(i=0; i<len; i++)
  102a86:	31 c0                	xor    %eax,%eax
  102a88:	85 d2                	test   %edx,%edx
  102a8a:	53                   	push   %ebx
  102a8b:	89 d3                	mov    %edx,%ebx
  102a8d:	7e 1f                	jle    102aae <sum+0x2e>
  102a8f:	31 d2                	xor    %edx,%edx
  102a91:	31 c9                	xor    %ecx,%ecx
  102a93:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  102a99:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
    sum += addr[i];
  102aa0:	0f b6 04 31          	movzbl (%ecx,%esi,1),%eax
  102aa4:	41                   	inc    %ecx
  102aa5:	01 c2                	add    %eax,%edx
  102aa7:	39 cb                	cmp    %ecx,%ebx
  102aa9:	75 f5                	jne    102aa0 <sum+0x20>
  102aab:	0f b6 c2             	movzbl %dl,%eax
  return sum;
}
  102aae:	5b                   	pop    %ebx
  102aaf:	5e                   	pop    %esi
  102ab0:	5d                   	pop    %ebp
  102ab1:	c3                   	ret    
  102ab2:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  102ab9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00102ac0 <mp_search1>:

// Look for an MP structure in the len bytes at addr.
static struct mp*
mp_search1(uchar *addr, int len)
{
  102ac0:	55                   	push   %ebp
  102ac1:	89 e5                	mov    %esp,%ebp
  102ac3:	56                   	push   %esi
  102ac4:	53                   	push   %ebx
  uchar *e, *p;

  e = addr+len;
  102ac5:	8d 34 02             	lea    (%edx,%eax,1),%esi
  102ac8:	83 ec 10             	sub    $0x10,%esp
  for(p = addr; p < e; p += sizeof(struct mp))
  102acb:	39 f0                	cmp    %esi,%eax
  102acd:	73 42                	jae    102b11 <mp_search1+0x51>
  102acf:	89 c3                	mov    %eax,%ebx
  102ad1:	eb 07                	jmp    102ada <mp_search1+0x1a>
  102ad3:	83 c3 10             	add    $0x10,%ebx
  102ad6:	39 de                	cmp    %ebx,%esi
  102ad8:	76 37                	jbe    102b11 <mp_search1+0x51>
    if(memcmp(p, "_MP_", 4) == 0 && sum(p, sizeof(struct mp)) == 0)
  102ada:	ba 04 00 00 00       	mov    $0x4,%edx
  102adf:	b8 75 62 10 00       	mov    $0x106275,%eax
  102ae4:	89 54 24 08          	mov    %edx,0x8(%esp)
  102ae8:	89 44 24 04          	mov    %eax,0x4(%esp)
  102aec:	89 1c 24             	mov    %ebx,(%esp)
  102aef:	e8 bc 14 00 00       	call   103fb0 <memcmp>
  102af4:	85 c0                	test   %eax,%eax
  102af6:	75 db                	jne    102ad3 <mp_search1+0x13>
  102af8:	ba 10 00 00 00       	mov    $0x10,%edx
  102afd:	89 d8                	mov    %ebx,%eax
  102aff:	e8 7c ff ff ff       	call   102a80 <sum>
  102b04:	84 c0                	test   %al,%al
  102b06:	75 cb                	jne    102ad3 <mp_search1+0x13>
      return (struct mp*)p;
  return 0;
}
  102b08:	83 c4 10             	add    $0x10,%esp
  102b0b:	89 d8                	mov    %ebx,%eax
  102b0d:	5b                   	pop    %ebx
  102b0e:	5e                   	pop    %esi
  102b0f:	5d                   	pop    %ebp
  102b10:	c3                   	ret    
  102b11:	83 c4 10             	add    $0x10,%esp
  102b14:	31 c0                	xor    %eax,%eax
  102b16:	5b                   	pop    %ebx
  102b17:	5e                   	pop    %esi
  102b18:	5d                   	pop    %ebp
  102b19:	c3                   	ret    
  102b1a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

00102b20 <mp_init>:

// Search for the MP Floating Pointer Structure, which according to the
// spec is in one of the following three locations:
// 1) in the first KB of the EBDA;
// 2) in the last KB of system base memory;
// 3) in the BIOS ROM between 0xE0000 and 0xFFFFF.
static struct mp*
mp_search(void)
{
  uchar *bda;
  uint p;
  struct mp *mp;

  bda = (uchar*)0x400;
  if((p = ((bda[0x0F]<<8)|bda[0x0E]) << 4)){
    if((mp = mp_search1((uchar*)p, 1024)))
      return mp;
  } else {
    p = ((bda[0x14]<<8)|bda[0x13])*1024;
    if((mp = mp_search1((uchar*)p-1024, 1024)))
      return mp;
  }
  return mp_search1((uchar*)0xF0000, 0x10000);
}

// Search for an MP configuration table.  For now,
// don't accept the default configurations (physaddr == 0).
// Check for correct signature, calculate the checksum and,
// if correct, check the version.
// To do: check extended table checksum.
static struct mpconf*
mp_config(struct mp **pmp)
{
  struct mpconf *conf;
  struct mp *mp;

  if((mp = mp_search()) == 0 || mp->physaddr == 0)
    return 0;
  conf = (struct mpconf*)mp->physaddr;
  if(memcmp(conf, "PCMP", 4) != 0)
    return 0;
  if(conf->version != 1 && conf->version != 4)
    return 0;
  if(sum((uchar*)conf, conf->length) != 0)
    return 0;
  *pmp = mp;
  return conf;
}

void
mp_init(void)
{
  102b20:	55                   	push   %ebp
  102b21:	89 e5                	mov    %esp,%ebp
  102b23:	83 ec 28             	sub    $0x28,%esp
  uchar *p, *e;
  struct mp *mp;
  struct mpconf *conf;
  struct mpproc *proc;
  struct mpioapic *ioapic;

  bcpu = &cpus[ncpu];
  102b26:	a1 20 b1 10 00       	mov    0x10b120,%eax
  102b2b:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  102b2e:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  102b31:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  102b34:	8d 04 40             	lea    (%eax,%eax,2),%eax
  102b37:	89 c2                	mov    %eax,%edx
  102b39:	c1 e2 04             	shl    $0x4,%edx
  102b3c:	01 d0                	add    %edx,%eax
  102b3e:	0f b6 15 0e 04 00 00 	movzbl 0x40e,%edx
  102b45:	8d 04 85 c0 aa 10 00 	lea    0x10aac0(,%eax,4),%eax
  102b4c:	a3 44 78 10 00       	mov    %eax,0x107844
  102b51:	0f b6 05 0f 04 00 00 	movzbl 0x40f,%eax
  102b58:	c1 e0 08             	shl    $0x8,%eax
  102b5b:	09 d0                	or     %edx,%eax
  102b5d:	c1 e0 04             	shl    $0x4,%eax
  102b60:	75 1b                	jne    102b7d <mp_init+0x5d>
  102b62:	0f b6 05 14 04 00 00 	movzbl 0x414,%eax
  102b69:	0f b6 15 13 04 00 00 	movzbl 0x413,%edx
  102b70:	c1 e0 08             	shl    $0x8,%eax
  102b73:	09 d0                	or     %edx,%eax
  102b75:	c1 e0 0a             	shl    $0xa,%eax
  102b78:	2d 00 04 00 00       	sub    $0x400,%eax
  102b7d:	ba 00 04 00 00       	mov    $0x400,%edx
  102b82:	e8 39 ff ff ff       	call   102ac0 <mp_search1>
  102b87:	85 c0                	test   %eax,%eax
  102b89:	89 c6                	mov    %eax,%esi
  102b8b:	0f 84 9f 00 00 00    	je     102c30 <mp_init+0x110>
  102b91:	8b 5e 04             	mov    0x4(%esi),%ebx
  102b94:	85 db                	test   %ebx,%ebx
  102b96:	74 38                	je     102bd0 <mp_init+0xb0>
  102b98:	b8 04 00 00 00       	mov    $0x4,%eax
  102b9d:	bf 7a 62 10 00       	mov    $0x10627a,%edi
  102ba2:	89 44 24 08          	mov    %eax,0x8(%esp)
  102ba6:	89 7c 24 04          	mov    %edi,0x4(%esp)
  102baa:	89 1c 24             	mov    %ebx,(%esp)
  102bad:	e8 fe 13 00 00       	call   103fb0 <memcmp>
  102bb2:	85 c0                	test   %eax,%eax
  102bb4:	75 1a                	jne    102bd0 <mp_init+0xb0>
  102bb6:	0f b6 43 06          	movzbl 0x6(%ebx),%eax
  102bba:	3c 01                	cmp    $0x1,%al
  102bbc:	74 22                	je     102be0 <mp_init+0xc0>
  102bbe:	3c 04                	cmp    $0x4,%al
  102bc0:	74 1e                	je     102be0 <mp_init+0xc0>
  102bc2:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  102bc9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  if((conf = mp_config(&mp)) == 0)
    return;

  ismp = 1;
  lapic = (uint*)conf->lapicaddr;

  for(p=(uchar*)(conf+1), e=(uchar*)conf+conf->length; p<e; ){
    switch(*p){
    case MPPROC:
      proc = (struct mpproc*)p;
      cpus[ncpu].apicid = proc->apicid;
      if(proc->flags & MPBOOT)
        bcpu = &cpus[ncpu];
      ncpu++;
      p += sizeof(struct mpproc);
      continue;
    case MPIOAPIC:
      ioapic = (struct mpioapic*)p;
      ioapic_id = ioapic->apicno;
      p += sizeof(struct mpioapic);
      continue;
    case MPBUS:
    case MPIOINTR:
    case MPLINTR:
      p += 8;
      continue;
    default:
      cprintf("mp_init: unknown config type %x\n", *p);
      panic("mp_init");
    }
  }

  if(mp->imcrp){
    // Bochs doesn't support IMCR, so this doesn't run on Bochs.
    // But it would on real hardware.
    outb(0x22, 0x70);   // Select IMCR
    outb(0x23, inb(0x23) | 1);  // Mask external interrupts.
  }
}
  102bd0:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  102bd3:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  102bd6:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  102bd9:	89 ec                	mov    %ebp,%esp
  102bdb:	5d                   	pop    %ebp
  102bdc:	c3                   	ret    
  102bdd:	8d 76 00             	lea    0x0(%esi),%esi
  102be0:	0f b7 53 04          	movzwl 0x4(%ebx),%edx
  102be4:	89 d8                	mov    %ebx,%eax
  102be6:	e8 95 fe ff ff       	call   102a80 <sum>
  102beb:	84 c0                	test   %al,%al
  102bed:	75 e1                	jne    102bd0 <mp_init+0xb0>
  102bef:	8b 43 24             	mov    0x24(%ebx),%eax
  102bf2:	b9 01 00 00 00       	mov    $0x1,%ecx
  102bf7:	89 0d a0 aa 10 00    	mov    %ecx,0x10aaa0
  102bfd:	8d 4b 2c             	lea    0x2c(%ebx),%ecx
  102c00:	a3 98 aa 10 00       	mov    %eax,0x10aa98
  102c05:	0f b7 43 04          	movzwl 0x4(%ebx),%eax
  102c09:	01 d8                	add    %ebx,%eax
  102c0b:	39 c1                	cmp    %eax,%ecx
  102c0d:	89 45 f0             	mov    %eax,0xfffffff0(%ebp)
  102c10:	0f 83 9e 00 00 00    	jae    102cb4 <mp_init+0x194>
  102c16:	8b 3d 44 78 10 00    	mov    0x107844,%edi
  102c1c:	0f b6 01             	movzbl (%ecx),%eax
  102c1f:	3c 04                	cmp    $0x4,%al
  102c21:	0f b6 d0             	movzbl %al,%edx
  102c24:	77 25                	ja     102c4b <mp_init+0x12b>
  102c26:	ff 24 95 ac 62 10 00 	jmp    *0x1062ac(,%edx,4)
  102c2d:	8d 76 00             	lea    0x0(%esi),%esi
  102c30:	ba 00 00 01 00       	mov    $0x10000,%edx
  102c35:	b8 00 00 0f 00       	mov    $0xf0000,%eax
  102c3a:	e8 81 fe ff ff       	call   102ac0 <mp_search1>
  102c3f:	85 c0                	test   %eax,%eax
  102c41:	89 c6                	mov    %eax,%esi
  102c43:	0f 85 48 ff ff ff    	jne    102b91 <mp_init+0x71>
  102c49:	eb 85                	jmp    102bd0 <mp_init+0xb0>
  102c4b:	89 3d 44 78 10 00    	mov    %edi,0x107844
  102c51:	89 54 24 04          	mov    %edx,0x4(%esp)
  102c55:	c7 04 24 88 62 10 00 	movl   $0x106288,(%esp)
  102c5c:	e8 cf da ff ff       	call   100730 <cprintf>
  102c61:	c7 04 24 7f 62 10 00 	movl   $0x10627f,(%esp)
  102c68:	e8 43 dc ff ff       	call   1008b0 <panic>
  102c6d:	8b 1d 20 b1 10 00    	mov    0x10b120,%ebx
  102c73:	8d 04 5b             	lea    (%ebx,%ebx,2),%eax
  102c76:	89 c2                	mov    %eax,%edx
  102c78:	c1 e2 04             	shl    $0x4,%edx
  102c7b:	01 d0                	add    %edx,%eax
  102c7d:	8d 14 85 00 00 00 00 	lea    0x0(,%eax,4),%edx
  102c84:	0f b6 41 01          	movzbl 0x1(%ecx),%eax
  102c88:	88 82 c0 aa 10 00    	mov    %al,0x10aac0(%edx)
  102c8e:	f6 41 03 02          	testb  $0x2,0x3(%ecx)
  102c92:	74 06                	je     102c9a <mp_init+0x17a>
  102c94:	8d ba c0 aa 10 00    	lea    0x10aac0(%edx),%edi
  102c9a:	8d 43 01             	lea    0x1(%ebx),%eax
  102c9d:	83 c1 14             	add    $0x14,%ecx
  102ca0:	a3 20 b1 10 00       	mov    %eax,0x10b120
  102ca5:	3b 4d f0             	cmp    0xfffffff0(%ebp),%ecx
  102ca8:	0f 82 6e ff ff ff    	jb     102c1c <mp_init+0xfc>
  102cae:	89 3d 44 78 10 00    	mov    %edi,0x107844
  102cb4:	80 7e 0c 00          	cmpb   $0x0,0xc(%esi)
  102cb8:	0f 84 12 ff ff ff    	je     102bd0 <mp_init+0xb0>

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  102cbe:	b0 70                	mov    $0x70,%al
  102cc0:	ba 22 00 00 00       	mov    $0x22,%edx
  102cc5:	ee                   	out    %al,(%dx)
  102cc6:	ba 23 00 00 00       	mov    $0x23,%edx
  102ccb:	ec                   	in     (%dx),%al
  102ccc:	0c 01                	or     $0x1,%al
  102cce:	0f b6 c0             	movzbl %al,%eax
  102cd1:	ee                   	out    %al,(%dx)
  102cd2:	e9 f9 fe ff ff       	jmp    102bd0 <mp_init+0xb0>
  102cd7:	83 c1 08             	add    $0x8,%ecx
  102cda:	eb c9                	jmp    102ca5 <mp_init+0x185>
  102cdc:	0f b6 41 01          	movzbl 0x1(%ecx),%eax
  102ce0:	83 c1 08             	add    $0x8,%ecx
  102ce3:	a2 a4 aa 10 00       	mov    %al,0x10aaa4
  102ce8:	eb bb                	jmp    102ca5 <mp_init+0x185>
  102cea:	90                   	nop    
  102ceb:	90                   	nop    
  102cec:	90                   	nop    
  102ced:	90                   	nop    
  102cee:	90                   	nop    
  102cef:	90                   	nop    

00102cf0 <pic_setmask>:
static ushort irqmask = 0xFFFF & ~(1<<IRQ_SLAVE);

static void
pic_setmask(ushort mask)
{
  102cf0:	55                   	push   %ebp

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  102cf1:	ba 21 00 00 00       	mov    $0x21,%edx
  102cf6:	89 e5                	mov    %esp,%ebp
  102cf8:	53                   	push   %ebx
  102cf9:	0f b7 d8             	movzwl %ax,%ebx

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  102cfc:	0f b6 cb             	movzbl %bl,%ecx
  irqmask = mask;
  102cff:	66 89 1d 00 73 10 00 	mov    %bx,0x107300

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  102d06:	88 c8                	mov    %cl,%al
  102d08:	ee                   	out    %al,(%dx)
  outb(IO_PIC1+1, mask);
  outb(IO_PIC2+1, mask >> 8);
}
  102d09:	89 d8                	mov    %ebx,%eax
  102d0b:	ba a1 00 00 00       	mov    $0xa1,%edx
  102d10:	c1 e8 08             	shr    $0x8,%eax
  102d13:	0f b6 c0             	movzbl %al,%eax
  102d16:	ee                   	out    %al,(%dx)
  102d17:	5b                   	pop    %ebx
  102d18:	5d                   	pop    %ebp
  102d19:	c3                   	ret    
  102d1a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

00102d20 <pic_enable>:

void
pic_enable(int irq)
{
  102d20:	55                   	push   %ebp
  pic_setmask(irqmask & ~(1<<irq));
  102d21:	0f b7 15 00 73 10 00 	movzwl 0x107300,%edx
  102d28:	b8 fe ff ff ff       	mov    $0xfffffffe,%eax
  102d2d:	89 e5                	mov    %esp,%ebp
  102d2f:	8b 4d 08             	mov    0x8(%ebp),%ecx
}
  102d32:	5d                   	pop    %ebp
  102d33:	d3 c0                	rol    %cl,%eax
  102d35:	21 d0                	and    %edx,%eax
  102d37:	0f b7 c0             	movzwl %ax,%eax
  102d3a:	eb b4                	jmp    102cf0 <pic_setmask>
  102d3c:	8d 74 26 00          	lea    0x0(%esi),%esi

00102d40 <pic_init>:

// Initialize the 8259A interrupt controllers.
void
pic_init(void)
{
  102d40:	55                   	push   %ebp

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  102d41:	b0 ff                	mov    $0xff,%al
  102d43:	89 e5                	mov    %esp,%ebp
  102d45:	83 ec 0c             	sub    $0xc,%esp
  102d48:	89 74 24 04          	mov    %esi,0x4(%esp)

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  102d4c:	be 21 00 00 00       	mov    $0x21,%esi
  102d51:	89 1c 24             	mov    %ebx,(%esp)

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  102d54:	89 f2                	mov    %esi,%edx
  102d56:	89 7c 24 08          	mov    %edi,0x8(%esp)

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  102d5a:	ee                   	out    %al,(%dx)
  // mask all interrupts
  outb(IO_PIC1+1, 0xFF);
  outb(IO_PIC2+1, 0xFF);

  // Set up master (8259A-1)

  // ICW1:  0001g0hi
  //    g:  0 = edge triggering, 1 = level triggering
  //    h:  0 = cascaded PICs, 1 = master only
  //    i:  0 = no ICW4, 1 = ICW4 required
  outb(IO_PIC1, 0x11);

  // ICW2:  Vector offset
  outb(IO_PIC1+1, IRQ_OFFSET);

  // ICW3:  (master PIC) bit mask of IR lines connected to slaves
  //        (slave PIC) 3-bit # of slave's connection to master
  outb(IO_PIC1+1, 1<<IRQ_SLAVE);

  // ICW4:  000nbmap
  //    n:  1 = special fully nested mode
  //    b:  1 = buffered mode
  //    m:  0 = slave PIC, 1 = master PIC
  //      (ignored when b is 0, as the master/slave role
  //      can be hardwired).
  //    a:  1 = Automatic EOI mode
  //    p:  0 = MCS-80/85 mode, 1 = intel x86 mode
  outb(IO_PIC1+1, 0x3);

  // Set up slave (8259A-2)
  outb(IO_PIC2, 0x11);                  // ICW1
  outb(IO_PIC2+1, IRQ_OFFSET + 8);      // ICW2
  outb(IO_PIC2+1, IRQ_SLAVE);           // ICW3
  // NB Automatic EOI mode doesn't tend to work on the slave.
  // Linux source code says it's "to be investigated".
  outb(IO_PIC2+1, 0x3);                 // ICW4

  // OCW3:  0ef01prs
  //   ef:  0x = NOP, 10 = clear specific mask, 11 = set specific mask
  //    p:  0 = no polling, 1 = polling mode
  //   rs:  0x = NOP, 10 = read IRR, 11 = read ISR
  outb(IO_PIC1, 0x68);             // clear specific mask
  outb(IO_PIC1, 0x0a);             // read IRR by default

  outb(IO_PIC2, 0x68);             // OCW3
  outb(IO_PIC2, 0x0a);             // OCW3

  if(irqmask != 0xFFFF)
  102d5b:	b9 a1 00 00 00       	mov    $0xa1,%ecx
  102d60:	89 ca                	mov    %ecx,%edx
  102d62:	ee                   	out    %al,(%dx)
  102d63:	bf 20 00 00 00       	mov    $0x20,%edi
  102d68:	b0 11                	mov    $0x11,%al
  102d6a:	89 fa                	mov    %edi,%edx
  102d6c:	ee                   	out    %al,(%dx)
  102d6d:	b0 20                	mov    $0x20,%al
  102d6f:	89 f2                	mov    %esi,%edx
  102d71:	ee                   	out    %al,(%dx)
  102d72:	b0 04                	mov    $0x4,%al
  102d74:	ee                   	out    %al,(%dx)
  102d75:	b3 03                	mov    $0x3,%bl
  102d77:	88 d8                	mov    %bl,%al
  102d79:	ee                   	out    %al,(%dx)
  102d7a:	be a0 00 00 00       	mov    $0xa0,%esi
  102d7f:	b0 11                	mov    $0x11,%al
  102d81:	89 f2                	mov    %esi,%edx
  102d83:	ee                   	out    %al,(%dx)
  102d84:	b0 28                	mov    $0x28,%al
  102d86:	89 ca                	mov    %ecx,%edx
  102d88:	ee                   	out    %al,(%dx)
  102d89:	b0 02                	mov    $0x2,%al
  102d8b:	ee                   	out    %al,(%dx)
  102d8c:	88 d8                	mov    %bl,%al
  102d8e:	ee                   	out    %al,(%dx)
  102d8f:	b1 68                	mov    $0x68,%cl
  102d91:	89 fa                	mov    %edi,%edx
  102d93:	88 c8                	mov    %cl,%al
  102d95:	ee                   	out    %al,(%dx)
  102d96:	b3 0a                	mov    $0xa,%bl
  102d98:	88 d8                	mov    %bl,%al
  102d9a:	ee                   	out    %al,(%dx)
  102d9b:	88 c8                	mov    %cl,%al
  102d9d:	89 f2                	mov    %esi,%edx
  102d9f:	ee                   	out    %al,(%dx)
  102da0:	88 d8                	mov    %bl,%al
  102da2:	ee                   	out    %al,(%dx)
  102da3:	0f b7 05 00 73 10 00 	movzwl 0x107300,%eax
  102daa:	66 83 f8 ff          	cmp    $0xffffffff,%ax
  102dae:	74 13                	je     102dc3 <pic_init+0x83>
    pic_setmask(irqmask);
}
  102db0:	8b 1c 24             	mov    (%esp),%ebx
  102db3:	8b 74 24 04          	mov    0x4(%esp),%esi
  102db7:	8b 7c 24 08          	mov    0x8(%esp),%edi
  102dbb:	89 ec                	mov    %ebp,%esp
  102dbd:	5d                   	pop    %ebp
  102dbe:	e9 2d ff ff ff       	jmp    102cf0 <pic_setmask>
  102dc3:	8b 1c 24             	mov    (%esp),%ebx
  102dc6:	8b 74 24 04          	mov    0x4(%esp),%esi
  102dca:	8b 7c 24 08          	mov    0x8(%esp),%edi
  102dce:	89 ec                	mov    %ebp,%esp
  102dd0:	5d                   	pop    %ebp
  102dd1:	c3                   	ret    
  102dd2:	90                   	nop    
  102dd3:	90                   	nop    
  102dd4:	90                   	nop    
  102dd5:	90                   	nop    
  102dd6:	90                   	nop    
  102dd7:	90                   	nop    
  102dd8:	90                   	nop    
  102dd9:	90                   	nop    
  102dda:	90                   	nop    
  102ddb:	90                   	nop    
  102ddc:	90                   	nop    
  102ddd:	90                   	nop    
  102dde:	90                   	nop    
  102ddf:	90                   	nop    

00102de0 <piperead>:
}

int
piperead(struct pipe *p, char *addr, int n)
{
  102de0:	55                   	push   %ebp
  102de1:	89 e5                	mov    %esp,%ebp
  102de3:	57                   	push   %edi
  102de4:	56                   	push   %esi
  102de5:	53                   	push   %ebx
  102de6:	83 ec 0c             	sub    $0xc,%esp
  102de9:	8b 5d 08             	mov    0x8(%ebp),%ebx
  int i;

  acquire(&p->lock);
  102dec:	8d 7b 10             	lea    0x10(%ebx),%edi
  102def:	89 3c 24             	mov    %edi,(%esp)
  102df2:	e8 19 11 00 00       	call   103f10 <acquire>
  while(p->readp == p->writep && p->writeopen){
  102df7:	8b 43 0c             	mov    0xc(%ebx),%eax
  102dfa:	3b 43 08             	cmp    0x8(%ebx),%eax
  102dfd:	75 4f                	jne    102e4e <piperead+0x6e>
  102dff:	8b 53 04             	mov    0x4(%ebx),%edx
  102e02:	85 d2                	test   %edx,%edx
  102e04:	74 48                	je     102e4e <piperead+0x6e>
  102e06:	8d 73 0c             	lea    0xc(%ebx),%esi
  102e09:	eb 20                	jmp    102e2b <piperead+0x4b>
  102e0b:	90                   	nop    
  102e0c:	8d 74 26 00          	lea    0x0(%esi),%esi
    if(cp->killed){
      release(&p->lock);
      return -1;
    }
    sleep(&p->readp, &p->lock);
  102e10:	89 7c 24 04          	mov    %edi,0x4(%esp)
  102e14:	89 34 24             	mov    %esi,(%esp)
  102e17:	e8 d4 06 00 00       	call   1034f0 <sleep>
  102e1c:	8b 43 0c             	mov    0xc(%ebx),%eax
  102e1f:	3b 43 08             	cmp    0x8(%ebx),%eax
  102e22:	75 2a                	jne    102e4e <piperead+0x6e>
  102e24:	8b 4b 04             	mov    0x4(%ebx),%ecx
  102e27:	85 c9                	test   %ecx,%ecx
  102e29:	74 23                	je     102e4e <piperead+0x6e>
  102e2b:	e8 90 04 00 00       	call   1032c0 <curproc>
  102e30:	8b 40 1c             	mov    0x1c(%eax),%eax
  102e33:	85 c0                	test   %eax,%eax
  102e35:	74 d9                	je     102e10 <piperead+0x30>
  102e37:	89 3c 24             	mov    %edi,(%esp)
  102e3a:	be ff ff ff ff       	mov    $0xffffffff,%esi
  102e3f:	e8 8c 10 00 00       	call   103ed0 <release>
  }
  for(i = 0; i < n; i++){
    if(p->readp == p->writep)
      break;
    addr[i] = p->data[p->readp++ % PIPESIZE];
  }
  wakeup(&p->writep);
  release(&p->lock);
  return i;
}
  102e44:	83 c4 0c             	add    $0xc,%esp
  102e47:	89 f0                	mov    %esi,%eax
  102e49:	5b                   	pop    %ebx
  102e4a:	5e                   	pop    %esi
  102e4b:	5f                   	pop    %edi
  102e4c:	5d                   	pop    %ebp
  102e4d:	c3                   	ret    
  102e4e:	8b 55 10             	mov    0x10(%ebp),%edx
  102e51:	85 d2                	test   %edx,%edx
  102e53:	7e 49                	jle    102e9e <piperead+0xbe>
  102e55:	31 f6                	xor    %esi,%esi
  102e57:	89 c2                	mov    %eax,%edx
  102e59:	3b 43 08             	cmp    0x8(%ebx),%eax
  102e5c:	75 07                	jne    102e65 <piperead+0x85>
  102e5e:	eb 3e                	jmp    102e9e <piperead+0xbe>
  102e60:	39 53 08             	cmp    %edx,0x8(%ebx)
  102e63:	74 1c                	je     102e81 <piperead+0xa1>
  102e65:	89 d0                	mov    %edx,%eax
  102e67:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  102e6a:	42                   	inc    %edx
  102e6b:	25 ff 01 00 00       	and    $0x1ff,%eax
  102e70:	0f b6 44 18 44       	movzbl 0x44(%eax,%ebx,1),%eax
  102e75:	88 04 0e             	mov    %al,(%esi,%ecx,1)
  102e78:	46                   	inc    %esi
  102e79:	39 75 10             	cmp    %esi,0x10(%ebp)
  102e7c:	89 53 0c             	mov    %edx,0xc(%ebx)
  102e7f:	75 df                	jne    102e60 <piperead+0x80>
  102e81:	8d 43 08             	lea    0x8(%ebx),%eax
  102e84:	89 04 24             	mov    %eax,(%esp)
  102e87:	e8 04 04 00 00       	call   103290 <wakeup>
  102e8c:	89 3c 24             	mov    %edi,(%esp)
  102e8f:	e8 3c 10 00 00       	call   103ed0 <release>
  102e94:	83 c4 0c             	add    $0xc,%esp
  102e97:	89 f0                	mov    %esi,%eax
  102e99:	5b                   	pop    %ebx
  102e9a:	5e                   	pop    %esi
  102e9b:	5f                   	pop    %edi
  102e9c:	5d                   	pop    %ebp
  102e9d:	c3                   	ret    
  102e9e:	31 f6                	xor    %esi,%esi
  102ea0:	eb df                	jmp    102e81 <piperead+0xa1>
  102ea2:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  102ea9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00102eb0 <pipewrite>:
  102eb0:	55                   	push   %ebp
  102eb1:	89 e5                	mov    %esp,%ebp
  102eb3:	57                   	push   %edi
  102eb4:	31 ff                	xor    %edi,%edi
  102eb6:	56                   	push   %esi
  102eb7:	53                   	push   %ebx
  102eb8:	83 ec 0c             	sub    $0xc,%esp
  102ebb:	8b 5d 08             	mov    0x8(%ebp),%ebx
  102ebe:	8d 73 10             	lea    0x10(%ebx),%esi
  102ec1:	89 34 24             	mov    %esi,(%esp)
  102ec4:	e8 47 10 00 00       	call   103f10 <acquire>
  102ec9:	8b 45 10             	mov    0x10(%ebp),%eax
  102ecc:	85 c0                	test   %eax,%eax
  102ece:	7f 36                	jg     102f06 <pipewrite+0x56>
  102ed0:	e9 92 00 00 00       	jmp    102f67 <pipewrite+0xb7>
  102ed5:	8b 03                	mov    (%ebx),%eax
  102ed7:	85 c0                	test   %eax,%eax
  102ed9:	74 75                	je     102f50 <pipewrite+0xa0>
  102edb:	90                   	nop    
  102edc:	8d 74 26 00          	lea    0x0(%esi),%esi
  102ee0:	e8 db 03 00 00       	call   1032c0 <curproc>
  102ee5:	8b 48 1c             	mov    0x1c(%eax),%ecx
  102ee8:	85 c9                	test   %ecx,%ecx
  102eea:	75 64                	jne    102f50 <pipewrite+0xa0>
  102eec:	8d 43 0c             	lea    0xc(%ebx),%eax
  102eef:	89 04 24             	mov    %eax,(%esp)
  102ef2:	e8 99 03 00 00       	call   103290 <wakeup>
  102ef7:	8d 43 08             	lea    0x8(%ebx),%eax
  102efa:	89 74 24 04          	mov    %esi,0x4(%esp)
  102efe:	89 04 24             	mov    %eax,(%esp)
  102f01:	e8 ea 05 00 00       	call   1034f0 <sleep>
  102f06:	8b 43 0c             	mov    0xc(%ebx),%eax
  102f09:	8b 4b 08             	mov    0x8(%ebx),%ecx
  102f0c:	05 00 02 00 00       	add    $0x200,%eax
  102f11:	39 c1                	cmp    %eax,%ecx
  102f13:	74 c0                	je     102ed5 <pipewrite+0x25>
  102f15:	89 c8                	mov    %ecx,%eax
  102f17:	25 ff 01 00 00       	and    $0x1ff,%eax
  102f1c:	89 45 f0             	mov    %eax,0xfffffff0(%ebp)
  102f1f:	8b 45 0c             	mov    0xc(%ebp),%eax
  102f22:	0f b6 14 07          	movzbl (%edi,%eax,1),%edx
  102f26:	47                   	inc    %edi
  102f27:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  102f2a:	88 54 18 44          	mov    %dl,0x44(%eax,%ebx,1)
  102f2e:	8d 41 01             	lea    0x1(%ecx),%eax
  102f31:	39 7d 10             	cmp    %edi,0x10(%ebp)
  102f34:	89 43 08             	mov    %eax,0x8(%ebx)
  102f37:	75 cd                	jne    102f06 <pipewrite+0x56>
  102f39:	8d 43 0c             	lea    0xc(%ebx),%eax
  102f3c:	89 04 24             	mov    %eax,(%esp)
  102f3f:	e8 4c 03 00 00       	call   103290 <wakeup>
  102f44:	89 34 24             	mov    %esi,(%esp)
  102f47:	e8 84 0f 00 00       	call   103ed0 <release>
  102f4c:	eb 0f                	jmp    102f5d <pipewrite+0xad>
  102f4e:	89 f6                	mov    %esi,%esi
  102f50:	89 34 24             	mov    %esi,(%esp)
  102f53:	bf ff ff ff ff       	mov    $0xffffffff,%edi
  102f58:	e8 73 0f 00 00       	call   103ed0 <release>
  102f5d:	83 c4 0c             	add    $0xc,%esp
  102f60:	89 f8                	mov    %edi,%eax
  102f62:	5b                   	pop    %ebx
  102f63:	5e                   	pop    %esi
  102f64:	5f                   	pop    %edi
  102f65:	5d                   	pop    %ebp
  102f66:	c3                   	ret    
  102f67:	31 ff                	xor    %edi,%edi
  102f69:	eb ce                	jmp    102f39 <pipewrite+0x89>
  102f6b:	90                   	nop    
  102f6c:	8d 74 26 00          	lea    0x0(%esi),%esi

00102f70 <pipeclose>:
  102f70:	55                   	push   %ebp
  102f71:	89 e5                	mov    %esp,%ebp
  102f73:	83 ec 18             	sub    $0x18,%esp
  102f76:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  102f79:	8b 75 08             	mov    0x8(%ebp),%esi
  102f7c:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  102f7f:	8b 5d 0c             	mov    0xc(%ebp),%ebx
  102f82:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  102f85:	8d 7e 10             	lea    0x10(%esi),%edi
  102f88:	89 3c 24             	mov    %edi,(%esp)
  102f8b:	e8 80 0f 00 00       	call   103f10 <acquire>
  102f90:	85 db                	test   %ebx,%ebx
  102f92:	74 34                	je     102fc8 <pipeclose+0x58>
  102f94:	8d 46 0c             	lea    0xc(%esi),%eax
  102f97:	c7 46 04 00 00 00 00 	movl   $0x0,0x4(%esi)
  102f9e:	89 04 24             	mov    %eax,(%esp)
  102fa1:	e8 ea 02 00 00       	call   103290 <wakeup>
  102fa6:	89 3c 24             	mov    %edi,(%esp)
  102fa9:	e8 22 0f 00 00       	call   103ed0 <release>
  102fae:	8b 06                	mov    (%esi),%eax
  102fb0:	85 c0                	test   %eax,%eax
  102fb2:	75 07                	jne    102fbb <pipeclose+0x4b>
  102fb4:	8b 46 04             	mov    0x4(%esi),%eax
  102fb7:	85 c0                	test   %eax,%eax
  102fb9:	74 25                	je     102fe0 <pipeclose+0x70>
  102fbb:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  102fbe:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  102fc1:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  102fc4:	89 ec                	mov    %ebp,%esp
  102fc6:	5d                   	pop    %ebp
  102fc7:	c3                   	ret    
  102fc8:	8d 46 08             	lea    0x8(%esi),%eax
  102fcb:	c7 06 00 00 00 00    	movl   $0x0,(%esi)
  102fd1:	89 04 24             	mov    %eax,(%esp)
  102fd4:	e8 b7 02 00 00       	call   103290 <wakeup>
  102fd9:	eb cb                	jmp    102fa6 <pipeclose+0x36>
  102fdb:	90                   	nop    
  102fdc:	8d 74 26 00          	lea    0x0(%esi),%esi
  102fe0:	89 75 08             	mov    %esi,0x8(%ebp)
  102fe3:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  102fe6:	c7 45 0c 00 10 00 00 	movl   $0x1000,0xc(%ebp)
  102fed:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  102ff0:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  102ff3:	89 ec                	mov    %ebp,%esp
  102ff5:	5d                   	pop    %ebp
  102ff6:	e9 25 f3 ff ff       	jmp    102320 <kfree>
  102ffb:	90                   	nop    
  102ffc:	8d 74 26 00          	lea    0x0(%esi),%esi

00103000 <pipealloc>:
  103000:	55                   	push   %ebp
  103001:	89 e5                	mov    %esp,%ebp
  103003:	83 ec 18             	sub    $0x18,%esp
  103006:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  103009:	8b 75 08             	mov    0x8(%ebp),%esi
  10300c:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  10300f:	8b 7d 0c             	mov    0xc(%ebp),%edi
  103012:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  103015:	c7 07 00 00 00 00    	movl   $0x0,(%edi)
  10301b:	c7 06 00 00 00 00    	movl   $0x0,(%esi)
  103021:	e8 aa de ff ff       	call   100ed0 <filealloc>
  103026:	85 c0                	test   %eax,%eax
  103028:	89 06                	mov    %eax,(%esi)
  10302a:	0f 84 94 00 00 00    	je     1030c4 <pipealloc+0xc4>
  103030:	e8 9b de ff ff       	call   100ed0 <filealloc>
  103035:	85 c0                	test   %eax,%eax
  103037:	89 07                	mov    %eax,(%edi)
  103039:	74 75                	je     1030b0 <pipealloc+0xb0>
  10303b:	c7 04 24 00 10 00 00 	movl   $0x1000,(%esp)
  103042:	e8 19 f2 ff ff       	call   102260 <kalloc>
  103047:	85 c0                	test   %eax,%eax
  103049:	89 c3                	mov    %eax,%ebx
  10304b:	74 63                	je     1030b0 <pipealloc+0xb0>
  10304d:	c7 00 01 00 00 00    	movl   $0x1,(%eax)
  103053:	c7 40 04 01 00 00 00 	movl   $0x1,0x4(%eax)
  10305a:	c7 40 08 00 00 00 00 	movl   $0x0,0x8(%eax)
  103061:	c7 40 0c 00 00 00 00 	movl   $0x0,0xc(%eax)
  103068:	b8 c0 62 10 00       	mov    $0x1062c0,%eax
  10306d:	89 44 24 04          	mov    %eax,0x4(%esp)
  103071:	8d 43 10             	lea    0x10(%ebx),%eax
  103074:	89 04 24             	mov    %eax,(%esp)
  103077:	e8 b4 0c 00 00       	call   103d30 <initlock>
  10307c:	8b 06                	mov    (%esi),%eax
  10307e:	31 d2                	xor    %edx,%edx
  103080:	c6 40 08 01          	movb   $0x1,0x8(%eax)
  103084:	c7 00 02 00 00 00    	movl   $0x2,(%eax)
  10308a:	8b 06                	mov    (%esi),%eax
  10308c:	c6 40 09 00          	movb   $0x0,0x9(%eax)
  103090:	8b 06                	mov    (%esi),%eax
  103092:	89 58 0c             	mov    %ebx,0xc(%eax)
  103095:	8b 07                	mov    (%edi),%eax
  103097:	c6 40 08 00          	movb   $0x0,0x8(%eax)
  10309b:	c7 00 02 00 00 00    	movl   $0x2,(%eax)
  1030a1:	8b 07                	mov    (%edi),%eax
  1030a3:	c6 40 09 01          	movb   $0x1,0x9(%eax)
  1030a7:	8b 07                	mov    (%edi),%eax
  1030a9:	89 58 0c             	mov    %ebx,0xc(%eax)
  1030ac:	eb 21                	jmp    1030cf <pipealloc+0xcf>
  1030ae:	89 f6                	mov    %esi,%esi
  1030b0:	8b 06                	mov    (%esi),%eax
  1030b2:	85 c0                	test   %eax,%eax
  1030b4:	74 0e                	je     1030c4 <pipealloc+0xc4>
  1030b6:	c7 00 01 00 00 00    	movl   $0x1,(%eax)
  1030bc:	89 04 24             	mov    %eax,(%esp)
  1030bf:	e8 8c de ff ff       	call   100f50 <fileclose>
  1030c4:	8b 07                	mov    (%edi),%eax
  1030c6:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  1030cb:	85 c0                	test   %eax,%eax
  1030cd:	75 0f                	jne    1030de <pipealloc+0xde>
  1030cf:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  1030d2:	89 d0                	mov    %edx,%eax
  1030d4:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  1030d7:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  1030da:	89 ec                	mov    %ebp,%esp
  1030dc:	5d                   	pop    %ebp
  1030dd:	c3                   	ret    
  1030de:	c7 00 01 00 00 00    	movl   $0x1,(%eax)
  1030e4:	89 04 24             	mov    %eax,(%esp)
  1030e7:	e8 64 de ff ff       	call   100f50 <fileclose>
  1030ec:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  1030f1:	eb dc                	jmp    1030cf <pipealloc+0xcf>
  1030f3:	90                   	nop    
  1030f4:	90                   	nop    
  1030f5:	90                   	nop    
  1030f6:	90                   	nop    
  1030f7:	90                   	nop    
  1030f8:	90                   	nop    
  1030f9:	90                   	nop    
  1030fa:	90                   	nop    
  1030fb:	90                   	nop    
  1030fc:	90                   	nop    
  1030fd:	90                   	nop    
  1030fe:	90                   	nop    
  1030ff:	90                   	nop    

00103100 <wakeup1>:
// Wake up all processes sleeping on chan.
// Proc_table_lock must be held.
static void
wakeup1(void *chan)
{
  103100:	89 c2                	mov    %eax,%edx
  struct proc *p;

  for(p = proc; p < &proc[NPROC]; p++)
  103102:	b8 40 b1 10 00       	mov    $0x10b140,%eax
  103107:	55                   	push   %ebp
  103108:	3d 40 d7 10 00       	cmp    $0x10d740,%eax
  10310d:	89 e5                	mov    %esp,%ebp
  10310f:	72 0e                	jb     10311f <wakeup1+0x1f>
  103111:	eb 2a                	jmp    10313d <wakeup1+0x3d>
  103113:	05 98 00 00 00       	add    $0x98,%eax
  103118:	3d 40 d7 10 00       	cmp    $0x10d740,%eax
  10311d:	73 1e                	jae    10313d <wakeup1+0x3d>
    if(p->state == SLEEPING && p->chan == chan)
  10311f:	83 78 0c 02          	cmpl   $0x2,0xc(%eax)
  103123:	75 ee                	jne    103113 <wakeup1+0x13>
  103125:	39 50 18             	cmp    %edx,0x18(%eax)
  103128:	75 e9                	jne    103113 <wakeup1+0x13>
      p->state = RUNNABLE;
  10312a:	c7 40 0c 03 00 00 00 	movl   $0x3,0xc(%eax)
  103131:	05 98 00 00 00       	add    $0x98,%eax
  103136:	3d 40 d7 10 00       	cmp    $0x10d740,%eax
  10313b:	72 e2                	jb     10311f <wakeup1+0x1f>
}
  10313d:	5d                   	pop    %ebp
  10313e:	c3                   	ret    
  10313f:	90                   	nop    

00103140 <procdump>:

// Wake up all processes sleeping on chan.
void
wakeup(void *chan)
{
  acquire(&proc_table_lock);
  wakeup1(chan);
  release(&proc_table_lock);
}

// Kill the process with the given pid.
// Process won't actually exit until it returns
// to user space (see trap in trap.c).
int
kill(int pid)
{
  struct proc *p;

  acquire(&proc_table_lock);
  for(p = proc; p < &proc[NPROC]; p++){
    if(p->pid == pid){
      p->killed = 1;
      // Wake process from sleep if necessary.
      if(p->state == SLEEPING)
        p->state = RUNNABLE;
      release(&proc_table_lock);
      return 0;
    }
  }
  release(&proc_table_lock);
  return -1;
}

// Exit the current process.  Does not return.
// Exited processes remain in the zombie state
// until their parent calls wait() to find out they exited.
void
exit(void)
{
  struct proc *p;
  int fd;

  if(cp == initproc)
    panic("init exiting");

  // Close all open files.
  for(fd = 0; fd < NOFILE; fd++){
    if(cp->ofile[fd]){
      fileclose(cp->ofile[fd]);
      cp->ofile[fd] = 0;
    }
  }

  iput(cp->cwd);
  cp->cwd = 0;

  acquire(&proc_table_lock);

  // Parent might be sleeping in wait().
  wakeup1(cp->parent);

  // Pass abandoned children to init.
  for(p = proc; p < &proc[NPROC]; p++){
    if(p->parent == cp){
      p->parent = initproc;
      if(p->state == ZOMBIE)
        wakeup1(initproc);
    }
  }

  // Jump into the scheduler, never to return.
  cp->killed = 0;
  cp->state = ZOMBIE;
  sched();
  panic("zombie exit");
}

// Wait for a child process to exit and return its pid.
// Return -1 if this process has no children.
int
wait(void)
{
  struct proc *p;
  int i, havekids, pid;

  acquire(&proc_table_lock);
  for(;;){
    // Scan through table looking for zombie children.
    havekids = 0;
    for(i = 0; i < NPROC; i++){
      p = &proc[i];
      if(p->state == UNUSED)
        continue;
      if(p->parent == cp){
        if(p->state == ZOMBIE){
          // Found one.
          kfree(p->mem, p->sz);
          kfree(p->kstack, KSTACKSIZE);
          pid = p->pid;
          p->state = UNUSED;
          p->pid = 0;
          p->parent = 0;
          p->name[0] = 0;
          release(&proc_table_lock);
          return pid;
        }
        havekids = 1;
      }
    }

    // No point waiting if we don't have any children.
    if(!havekids || cp->killed){
      release(&proc_table_lock);
      return -1;
    }

    // Wait for children to exit.  (See wakeup1 call in proc_exit.)
    sleep(cp, &proc_table_lock);
  }
}

// Print a process listing to console.  For debugging.
// Runs when user types ^P on console.
// No lock to avoid wedging a stuck machine further.
void
procdump(void)
{
  103140:	55                   	push   %ebp
  103141:	89 e5                	mov    %esp,%ebp
  103143:	57                   	push   %edi
  103144:	bf 4c b1 10 00       	mov    $0x10b14c,%edi
  103149:	56                   	push   %esi
  10314a:	be 40 b1 10 00       	mov    $0x10b140,%esi
  10314f:	53                   	push   %ebx
  103150:	83 ec 4c             	sub    $0x4c,%esp
  103153:	eb 52                	jmp    1031a7 <procdump+0x67>
  static char *states[] = {
  [UNUSED]    "unused",
  [EMBRYO]    "embryo",
  [SLEEPING]  "sleep ",
  [RUNNABLE]  "runble",
  [RUNNING]   "run   ",
  [ZOMBIE]    "zombie"
  };
  int i, j;
  struct proc *p;
  char *state;
  uint pc[10];
  
  for(i = 0; i < NPROC; i++){
    p = &proc[i];
    if(p->state == UNUSED)
      continue;
    if(p->state >= 0 && p->state < NELEM(states) && states[p->state])
  103155:	8b 14 85 88 63 10 00 	mov    0x106388(,%eax,4),%edx
  10315c:	85 d2                	test   %edx,%edx
  10315e:	74 53                	je     1031b3 <procdump+0x73>
      state = states[p->state];
    else
      state = "???";
    cprintf("%d %s %s", p->pid, state, p->name);
  103160:	8d 86 88 00 00 00    	lea    0x88(%esi),%eax
  103166:	89 44 24 0c          	mov    %eax,0xc(%esp)
  10316a:	8b 46 10             	mov    0x10(%esi),%eax
  10316d:	89 54 24 08          	mov    %edx,0x8(%esp)
  103171:	c7 04 24 c9 62 10 00 	movl   $0x1062c9,(%esp)
  103178:	89 44 24 04          	mov    %eax,0x4(%esp)
  10317c:	e8 af d5 ff ff       	call   100730 <cprintf>
    if(p->state == SLEEPING){
  103181:	83 7e 0c 02          	cmpl   $0x2,0xc(%esi)
  103185:	74 33                	je     1031ba <procdump+0x7a>
      getcallerpcs((uint*)p->context.ebp+2, pc);
      for(j=0; j<10 && pc[j] != 0; j++)
        cprintf(" %p", pc[j]);
    }
    cprintf("\n");
  103187:	c7 04 24 73 62 10 00 	movl   $0x106273,(%esp)
  10318e:	e8 9d d5 ff ff       	call   100730 <cprintf>
  103193:	81 c7 98 00 00 00    	add    $0x98,%edi
  103199:	81 c6 98 00 00 00    	add    $0x98,%esi
  10319f:	81 ff 4c d7 10 00    	cmp    $0x10d74c,%edi
  1031a5:	74 59                	je     103200 <procdump+0xc0>
  1031a7:	8b 46 0c             	mov    0xc(%esi),%eax
  1031aa:	85 c0                	test   %eax,%eax
  1031ac:	74 e5                	je     103193 <procdump+0x53>
  1031ae:	83 f8 05             	cmp    $0x5,%eax
  1031b1:	76 a2                	jbe    103155 <procdump+0x15>
  1031b3:	ba c5 62 10 00       	mov    $0x1062c5,%edx
  1031b8:	eb a6                	jmp    103160 <procdump+0x20>
  1031ba:	8d 45 cc             	lea    0xffffffcc(%ebp),%eax
  1031bd:	bb 01 00 00 00       	mov    $0x1,%ebx
  1031c2:	89 44 24 04          	mov    %eax,0x4(%esp)
  1031c6:	8b 86 80 00 00 00    	mov    0x80(%esi),%eax
  1031cc:	83 c0 08             	add    $0x8,%eax
  1031cf:	89 04 24             	mov    %eax,(%esp)
  1031d2:	e8 79 0b 00 00       	call   103d50 <getcallerpcs>
  1031d7:	89 f6                	mov    %esi,%esi
  1031d9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  1031e0:	8b 44 9d c8          	mov    0xffffffc8(%ebp,%ebx,4),%eax
  1031e4:	85 c0                	test   %eax,%eax
  1031e6:	74 9f                	je     103187 <procdump+0x47>
  1031e8:	43                   	inc    %ebx
  1031e9:	89 44 24 04          	mov    %eax,0x4(%esp)
  1031ed:	c7 04 24 35 5e 10 00 	movl   $0x105e35,(%esp)
  1031f4:	e8 37 d5 ff ff       	call   100730 <cprintf>
  1031f9:	83 fb 0b             	cmp    $0xb,%ebx
  1031fc:	75 e2                	jne    1031e0 <procdump+0xa0>
  1031fe:	eb 87                	jmp    103187 <procdump+0x47>
  }
}
  103200:	83 c4 4c             	add    $0x4c,%esp
  103203:	5b                   	pop    %ebx
  103204:	5e                   	pop    %esi
  103205:	5f                   	pop    %edi
  103206:	5d                   	pop    %ebp
  103207:	c3                   	ret    
  103208:	90                   	nop    
  103209:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00103210 <kill>:
  103210:	55                   	push   %ebp
  103211:	89 e5                	mov    %esp,%ebp
  103213:	53                   	push   %ebx
  103214:	83 ec 04             	sub    $0x4,%esp
  103217:	8b 5d 08             	mov    0x8(%ebp),%ebx
  10321a:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103221:	e8 ea 0c 00 00       	call   103f10 <acquire>
  103226:	b8 40 b1 10 00       	mov    $0x10b140,%eax
  10322b:	3d 40 d7 10 00       	cmp    $0x10d740,%eax
  103230:	73 3e                	jae    103270 <kill+0x60>
  103232:	39 1d 50 b1 10 00    	cmp    %ebx,0x10b150
  103238:	74 17                	je     103251 <kill+0x41>
  10323a:	b8 40 b1 10 00       	mov    $0x10b140,%eax
  10323f:	90                   	nop    
  103240:	05 98 00 00 00       	add    $0x98,%eax
  103245:	3d 40 d7 10 00       	cmp    $0x10d740,%eax
  10324a:	73 24                	jae    103270 <kill+0x60>
  10324c:	39 58 10             	cmp    %ebx,0x10(%eax)
  10324f:	75 ef                	jne    103240 <kill+0x30>
  103251:	83 78 0c 02          	cmpl   $0x2,0xc(%eax)
  103255:	c7 40 1c 01 00 00 00 	movl   $0x1,0x1c(%eax)
  10325c:	74 27                	je     103285 <kill+0x75>
  10325e:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103265:	e8 66 0c 00 00       	call   103ed0 <release>
  10326a:	31 c0                	xor    %eax,%eax
  10326c:	5a                   	pop    %edx
  10326d:	5b                   	pop    %ebx
  10326e:	5d                   	pop    %ebp
  10326f:	c3                   	ret    
  103270:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103277:	e8 54 0c 00 00       	call   103ed0 <release>
  10327c:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  103281:	5a                   	pop    %edx
  103282:	5b                   	pop    %ebx
  103283:	5d                   	pop    %ebp
  103284:	c3                   	ret    
  103285:	c7 40 0c 03 00 00 00 	movl   $0x3,0xc(%eax)
  10328c:	eb d0                	jmp    10325e <kill+0x4e>
  10328e:	89 f6                	mov    %esi,%esi

00103290 <wakeup>:
  103290:	55                   	push   %ebp
  103291:	89 e5                	mov    %esp,%ebp
  103293:	53                   	push   %ebx
  103294:	83 ec 04             	sub    $0x4,%esp
  103297:	8b 5d 08             	mov    0x8(%ebp),%ebx
  10329a:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  1032a1:	e8 6a 0c 00 00       	call   103f10 <acquire>
  1032a6:	89 d8                	mov    %ebx,%eax
  1032a8:	e8 53 fe ff ff       	call   103100 <wakeup1>
  1032ad:	c7 45 08 40 d7 10 00 	movl   $0x10d740,0x8(%ebp)
  1032b4:	59                   	pop    %ecx
  1032b5:	5b                   	pop    %ebx
  1032b6:	5d                   	pop    %ebp
  1032b7:	e9 14 0c 00 00       	jmp    103ed0 <release>
  1032bc:	8d 74 26 00          	lea    0x0(%esi),%esi

001032c0 <curproc>:
  1032c0:	55                   	push   %ebp
  1032c1:	89 e5                	mov    %esp,%ebp
  1032c3:	53                   	push   %ebx
  1032c4:	83 ec 04             	sub    $0x4,%esp
  1032c7:	e8 74 0b 00 00       	call   103e40 <pushcli>
  1032cc:	e8 7f f4 ff ff       	call   102750 <cpu>
  1032d1:	8d 04 40             	lea    (%eax,%eax,2),%eax
  1032d4:	89 c2                	mov    %eax,%edx
  1032d6:	c1 e2 04             	shl    $0x4,%edx
  1032d9:	01 d0                	add    %edx,%eax
  1032db:	8b 1c 85 c4 aa 10 00 	mov    0x10aac4(,%eax,4),%ebx
  1032e2:	e8 c9 0a 00 00       	call   103db0 <popcli>
  1032e7:	89 d8                	mov    %ebx,%eax
  1032e9:	5b                   	pop    %ebx
  1032ea:	5b                   	pop    %ebx
  1032eb:	5d                   	pop    %ebp
  1032ec:	c3                   	ret    
  1032ed:	8d 76 00             	lea    0x0(%esi),%esi

001032f0 <forkret>:
  1032f0:	55                   	push   %ebp
  1032f1:	89 e5                	mov    %esp,%ebp
  1032f3:	83 ec 08             	sub    $0x8,%esp
  1032f6:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  1032fd:	e8 ce 0b 00 00       	call   103ed0 <release>
  103302:	e8 b9 ff ff ff       	call   1032c0 <curproc>
  103307:	8b 80 84 00 00 00    	mov    0x84(%eax),%eax
  10330d:	89 04 24             	mov    %eax,(%esp)
  103310:	e8 1f 1d 00 00       	call   105034 <forkret1>
  103315:	c9                   	leave  
  103316:	c3                   	ret    
  103317:	89 f6                	mov    %esi,%esi
  103319:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00103320 <sched>:
  103320:	55                   	push   %ebp
  103321:	89 e5                	mov    %esp,%ebp
  103323:	53                   	push   %ebx
  103324:	83 ec 14             	sub    $0x14,%esp
static inline uint
read_eflags(void)
{
  uint eflags;
  asm volatile("pushfl; popl %0" : "=r" (eflags));
  103327:	9c                   	pushf  
  103328:	58                   	pop    %eax
  103329:	f6 c4 02             	test   $0x2,%ah
  10332c:	0f 85 83 00 00 00    	jne    1033b5 <sched+0x95>
  103332:	e8 89 ff ff ff       	call   1032c0 <curproc>
  103337:	83 78 0c 04          	cmpl   $0x4,0xc(%eax)
  10333b:	0f 84 80 00 00 00    	je     1033c1 <sched+0xa1>
  103341:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103348:	e8 53 0b 00 00       	call   103ea0 <holding>
  10334d:	85 c0                	test   %eax,%eax
  10334f:	74 7c                	je     1033cd <sched+0xad>
  103351:	e8 fa f3 ff ff       	call   102750 <cpu>
  103356:	8d 04 40             	lea    (%eax,%eax,2),%eax
  103359:	89 c2                	mov    %eax,%edx
  10335b:	c1 e2 04             	shl    $0x4,%edx
  10335e:	01 d0                	add    %edx,%eax
  103360:	83 3c 85 84 ab 10 00 	cmpl   $0x1,0x10ab84(,%eax,4)
  103367:	01 
  103368:	75 6f                	jne    1033d9 <sched+0xb9>
  10336a:	c7 04 24 63 00 00 00 	movl   $0x63,(%esp)
  103371:	e8 fa cf ff ff       	call   100370 <cons_putc>
  103376:	e8 d5 f3 ff ff       	call   102750 <cpu>
  10337b:	89 c3                	mov    %eax,%ebx
  10337d:	e8 3e ff ff ff       	call   1032c0 <curproc>
  103382:	8d 0c 5b             	lea    (%ebx,%ebx,2),%ecx
  103385:	89 ca                	mov    %ecx,%edx
  103387:	c1 e2 04             	shl    $0x4,%edx
  10338a:	8d 14 11             	lea    (%ecx,%edx,1),%edx
  10338d:	8d 14 95 c8 aa 10 00 	lea    0x10aac8(,%edx,4),%edx
  103394:	89 54 24 04          	mov    %edx,0x4(%esp)
  103398:	83 c0 64             	add    $0x64,%eax
  10339b:	89 04 24             	mov    %eax,(%esp)
  10339e:	e8 b9 0d 00 00       	call   10415c <swtch>
  1033a3:	c7 04 24 64 00 00 00 	movl   $0x64,(%esp)
  1033aa:	e8 c1 cf ff ff       	call   100370 <cons_putc>
  1033af:	83 c4 14             	add    $0x14,%esp
  1033b2:	5b                   	pop    %ebx
  1033b3:	5d                   	pop    %ebp
  1033b4:	c3                   	ret    
  1033b5:	c7 04 24 d2 62 10 00 	movl   $0x1062d2,(%esp)
  1033bc:	e8 ef d4 ff ff       	call   1008b0 <panic>
  1033c1:	c7 04 24 e6 62 10 00 	movl   $0x1062e6,(%esp)
  1033c8:	e8 e3 d4 ff ff       	call   1008b0 <panic>
  1033cd:	c7 04 24 f4 62 10 00 	movl   $0x1062f4,(%esp)
  1033d4:	e8 d7 d4 ff ff       	call   1008b0 <panic>
  1033d9:	c7 04 24 0a 63 10 00 	movl   $0x10630a,(%esp)
  1033e0:	e8 cb d4 ff ff       	call   1008b0 <panic>
  1033e5:	8d 74 26 00          	lea    0x0(%esi),%esi
  1033e9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

001033f0 <exit>:
  1033f0:	55                   	push   %ebp
  1033f1:	89 e5                	mov    %esp,%ebp
  1033f3:	83 ec 18             	sub    $0x18,%esp
  1033f6:	89 5d f8             	mov    %ebx,0xfffffff8(%ebp)
  1033f9:	89 75 fc             	mov    %esi,0xfffffffc(%ebp)
  1033fc:	e8 bf fe ff ff       	call   1032c0 <curproc>
  103401:	3b 05 48 78 10 00    	cmp    0x107848,%eax
  103407:	75 0c                	jne    103415 <exit+0x25>
  103409:	c7 04 24 16 63 10 00 	movl   $0x106316,(%esp)
  103410:	e8 9b d4 ff ff       	call   1008b0 <panic>
  103415:	31 db                	xor    %ebx,%ebx
  103417:	89 f6                	mov    %esi,%esi
  103419:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  103420:	e8 9b fe ff ff       	call   1032c0 <curproc>
  103425:	8b 44 98 20          	mov    0x20(%eax,%ebx,4),%eax
  103429:	85 c0                	test   %eax,%eax
  10342b:	74 1c                	je     103449 <exit+0x59>
  10342d:	e8 8e fe ff ff       	call   1032c0 <curproc>
  103432:	31 f6                	xor    %esi,%esi
  103434:	8b 44 98 20          	mov    0x20(%eax,%ebx,4),%eax
  103438:	89 04 24             	mov    %eax,(%esp)
  10343b:	e8 10 db ff ff       	call   100f50 <fileclose>
  103440:	e8 7b fe ff ff       	call   1032c0 <curproc>
  103445:	89 74 98 20          	mov    %esi,0x20(%eax,%ebx,4)
  103449:	43                   	inc    %ebx
  10344a:	83 fb 10             	cmp    $0x10,%ebx
  10344d:	75 d1                	jne    103420 <exit+0x30>
  10344f:	e8 6c fe ff ff       	call   1032c0 <curproc>
  103454:	8b 40 60             	mov    0x60(%eax),%eax
  103457:	89 04 24             	mov    %eax,(%esp)
  10345a:	e8 c1 e4 ff ff       	call   101920 <iput>
  10345f:	e8 5c fe ff ff       	call   1032c0 <curproc>
  103464:	c7 40 60 00 00 00 00 	movl   $0x0,0x60(%eax)
  10346b:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103472:	e8 99 0a 00 00       	call   103f10 <acquire>
  103477:	e8 44 fe ff ff       	call   1032c0 <curproc>
  10347c:	8b 40 14             	mov    0x14(%eax),%eax
  10347f:	e8 7c fc ff ff       	call   103100 <wakeup1>
  103484:	b8 40 b1 10 00       	mov    $0x10b140,%eax
  103489:	3d 40 d7 10 00       	cmp    $0x10d740,%eax
  10348e:	73 33                	jae    1034c3 <exit+0xd3>
  103490:	89 c6                	mov    %eax,%esi
  103492:	eb 0e                	jmp    1034a2 <exit+0xb2>
  103494:	81 c6 98 00 00 00    	add    $0x98,%esi
  10349a:	81 fe 40 d7 10 00    	cmp    $0x10d740,%esi
  1034a0:	73 21                	jae    1034c3 <exit+0xd3>
  1034a2:	8b 5e 14             	mov    0x14(%esi),%ebx
  1034a5:	e8 16 fe ff ff       	call   1032c0 <curproc>
  1034aa:	39 c3                	cmp    %eax,%ebx
  1034ac:	75 e6                	jne    103494 <exit+0xa4>
  1034ae:	a1 48 78 10 00       	mov    0x107848,%eax
  1034b3:	83 7e 0c 05          	cmpl   $0x5,0xc(%esi)
  1034b7:	89 46 14             	mov    %eax,0x14(%esi)
  1034ba:	75 d8                	jne    103494 <exit+0xa4>
  1034bc:	e8 3f fc ff ff       	call   103100 <wakeup1>
  1034c1:	eb d1                	jmp    103494 <exit+0xa4>
  1034c3:	e8 f8 fd ff ff       	call   1032c0 <curproc>
  1034c8:	c7 40 1c 00 00 00 00 	movl   $0x0,0x1c(%eax)
  1034cf:	90                   	nop    
  1034d0:	e8 eb fd ff ff       	call   1032c0 <curproc>
  1034d5:	c7 40 0c 05 00 00 00 	movl   $0x5,0xc(%eax)
  1034dc:	e8 3f fe ff ff       	call   103320 <sched>
  1034e1:	c7 04 24 23 63 10 00 	movl   $0x106323,(%esp)
  1034e8:	e8 c3 d3 ff ff       	call   1008b0 <panic>
  1034ed:	8d 76 00             	lea    0x0(%esi),%esi

001034f0 <sleep>:
  1034f0:	55                   	push   %ebp
  1034f1:	89 e5                	mov    %esp,%ebp
  1034f3:	56                   	push   %esi
  1034f4:	53                   	push   %ebx
  1034f5:	83 ec 10             	sub    $0x10,%esp
  1034f8:	8b 75 08             	mov    0x8(%ebp),%esi
  1034fb:	8b 5d 0c             	mov    0xc(%ebp),%ebx
  1034fe:	e8 bd fd ff ff       	call   1032c0 <curproc>
  103503:	85 c0                	test   %eax,%eax
  103505:	0f 84 91 00 00 00    	je     10359c <sleep+0xac>
  10350b:	85 db                	test   %ebx,%ebx
  10350d:	0f 84 95 00 00 00    	je     1035a8 <sleep+0xb8>
  103513:	81 fb 40 d7 10 00    	cmp    $0x10d740,%ebx
  103519:	74 55                	je     103570 <sleep+0x80>
  10351b:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103522:	e8 e9 09 00 00       	call   103f10 <acquire>
  103527:	89 1c 24             	mov    %ebx,(%esp)
  10352a:	e8 a1 09 00 00       	call   103ed0 <release>
  10352f:	e8 8c fd ff ff       	call   1032c0 <curproc>
  103534:	89 70 18             	mov    %esi,0x18(%eax)
  103537:	e8 84 fd ff ff       	call   1032c0 <curproc>
  10353c:	c7 40 0c 02 00 00 00 	movl   $0x2,0xc(%eax)
  103543:	e8 d8 fd ff ff       	call   103320 <sched>
  103548:	e8 73 fd ff ff       	call   1032c0 <curproc>
  10354d:	c7 40 18 00 00 00 00 	movl   $0x0,0x18(%eax)
  103554:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  10355b:	e8 70 09 00 00       	call   103ed0 <release>
  103560:	89 5d 08             	mov    %ebx,0x8(%ebp)
  103563:	83 c4 10             	add    $0x10,%esp
  103566:	5b                   	pop    %ebx
  103567:	5e                   	pop    %esi
  103568:	5d                   	pop    %ebp
  103569:	e9 a2 09 00 00       	jmp    103f10 <acquire>
  10356e:	89 f6                	mov    %esi,%esi
  103570:	e8 4b fd ff ff       	call   1032c0 <curproc>
  103575:	89 70 18             	mov    %esi,0x18(%eax)
  103578:	e8 43 fd ff ff       	call   1032c0 <curproc>
  10357d:	c7 40 0c 02 00 00 00 	movl   $0x2,0xc(%eax)
  103584:	e8 97 fd ff ff       	call   103320 <sched>
  103589:	e8 32 fd ff ff       	call   1032c0 <curproc>
  10358e:	c7 40 18 00 00 00 00 	movl   $0x0,0x18(%eax)
  103595:	83 c4 10             	add    $0x10,%esp
  103598:	5b                   	pop    %ebx
  103599:	5e                   	pop    %esi
  10359a:	5d                   	pop    %ebp
  10359b:	c3                   	ret    
  10359c:	c7 04 24 2f 63 10 00 	movl   $0x10632f,(%esp)
  1035a3:	e8 08 d3 ff ff       	call   1008b0 <panic>
  1035a8:	c7 04 24 35 63 10 00 	movl   $0x106335,(%esp)
  1035af:	e8 fc d2 ff ff       	call   1008b0 <panic>
  1035b4:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1035ba:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi

001035c0 <wait>:
  1035c0:	55                   	push   %ebp
  1035c1:	89 e5                	mov    %esp,%ebp
  1035c3:	57                   	push   %edi
  1035c4:	56                   	push   %esi
  1035c5:	53                   	push   %ebx
  1035c6:	83 ec 0c             	sub    $0xc,%esp
  1035c9:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  1035d0:	e8 3b 09 00 00       	call   103f10 <acquire>
  1035d5:	be 4c b1 10 00       	mov    $0x10b14c,%esi
  1035da:	bf 40 b1 10 00       	mov    $0x10b140,%edi
  1035df:	c7 45 f0 00 00 00 00 	movl   $0x0,0xfffffff0(%ebp)
  1035e6:	eb 14                	jmp    1035fc <wait+0x3c>
  1035e8:	81 c6 98 00 00 00    	add    $0x98,%esi
  1035ee:	81 c7 98 00 00 00    	add    $0x98,%edi
  1035f4:	81 fe 4c d7 10 00    	cmp    $0x10d74c,%esi
  1035fa:	74 26                	je     103622 <wait+0x62>
  1035fc:	8b 47 0c             	mov    0xc(%edi),%eax
  1035ff:	85 c0                	test   %eax,%eax
  103601:	74 e5                	je     1035e8 <wait+0x28>
  103603:	8b 5f 14             	mov    0x14(%edi),%ebx
  103606:	e8 b5 fc ff ff       	call   1032c0 <curproc>
  10360b:	39 c3                	cmp    %eax,%ebx
  10360d:	75 d9                	jne    1035e8 <wait+0x28>
  10360f:	83 7f 0c 05          	cmpl   $0x5,0xc(%edi)
  103613:	74 38                	je     10364d <wait+0x8d>
  103615:	c7 45 f0 01 00 00 00 	movl   $0x1,0xfffffff0(%ebp)
  10361c:	8d 74 26 00          	lea    0x0(%esi),%esi
  103620:	eb c6                	jmp    1035e8 <wait+0x28>
  103622:	8b 5d f0             	mov    0xfffffff0(%ebp),%ebx
  103625:	85 db                	test   %ebx,%ebx
  103627:	74 7e                	je     1036a7 <wait+0xe7>
  103629:	e8 92 fc ff ff       	call   1032c0 <curproc>
  10362e:	8b 48 1c             	mov    0x1c(%eax),%ecx
  103631:	85 c9                	test   %ecx,%ecx
  103633:	75 72                	jne    1036a7 <wait+0xe7>
  103635:	e8 86 fc ff ff       	call   1032c0 <curproc>
  10363a:	ba 40 d7 10 00       	mov    $0x10d740,%edx
  10363f:	89 54 24 04          	mov    %edx,0x4(%esp)
  103643:	89 04 24             	mov    %eax,(%esp)
  103646:	e8 a5 fe ff ff       	call   1034f0 <sleep>
  10364b:	eb 88                	jmp    1035d5 <wait+0x15>
  10364d:	8b 47 04             	mov    0x4(%edi),%eax
  103650:	be 00 10 00 00       	mov    $0x1000,%esi
  103655:	89 44 24 04          	mov    %eax,0x4(%esp)
  103659:	8b 07                	mov    (%edi),%eax
  10365b:	89 04 24             	mov    %eax,(%esp)
  10365e:	e8 bd ec ff ff       	call   102320 <kfree>
  103663:	89 74 24 04          	mov    %esi,0x4(%esp)
  103667:	8b 47 08             	mov    0x8(%edi),%eax
  10366a:	89 04 24             	mov    %eax,(%esp)
  10366d:	e8 ae ec ff ff       	call   102320 <kfree>
  103672:	8b 5f 10             	mov    0x10(%edi),%ebx
  103675:	c7 47 0c 00 00 00 00 	movl   $0x0,0xc(%edi)
  10367c:	c7 47 10 00 00 00 00 	movl   $0x0,0x10(%edi)
  103683:	c7 47 14 00 00 00 00 	movl   $0x0,0x14(%edi)
  10368a:	c6 87 88 00 00 00 00 	movb   $0x0,0x88(%edi)
  103691:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103698:	e8 33 08 00 00       	call   103ed0 <release>
  10369d:	83 c4 0c             	add    $0xc,%esp
  1036a0:	89 d8                	mov    %ebx,%eax
  1036a2:	5b                   	pop    %ebx
  1036a3:	5e                   	pop    %esi
  1036a4:	5f                   	pop    %edi
  1036a5:	5d                   	pop    %ebp
  1036a6:	c3                   	ret    
  1036a7:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  1036ae:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
  1036b3:	e8 18 08 00 00       	call   103ed0 <release>
  1036b8:	83 c4 0c             	add    $0xc,%esp
  1036bb:	89 d8                	mov    %ebx,%eax
  1036bd:	5b                   	pop    %ebx
  1036be:	5e                   	pop    %esi
  1036bf:	5f                   	pop    %edi
  1036c0:	5d                   	pop    %ebp
  1036c1:	c3                   	ret    
  1036c2:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  1036c9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

001036d0 <yield>:
  1036d0:	55                   	push   %ebp
  1036d1:	89 e5                	mov    %esp,%ebp
  1036d3:	83 ec 08             	sub    $0x8,%esp
  1036d6:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  1036dd:	e8 2e 08 00 00       	call   103f10 <acquire>
  1036e2:	e8 d9 fb ff ff       	call   1032c0 <curproc>
  1036e7:	c7 40 0c 03 00 00 00 	movl   $0x3,0xc(%eax)
  1036ee:	e8 2d fc ff ff       	call   103320 <sched>
  1036f3:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  1036fa:	e8 d1 07 00 00       	call   103ed0 <release>
  1036ff:	c9                   	leave  
  103700:	c3                   	ret    
  103701:	eb 0d                	jmp    103710 <setupsegs>
  103703:	90                   	nop    
  103704:	90                   	nop    
  103705:	90                   	nop    
  103706:	90                   	nop    
  103707:	90                   	nop    
  103708:	90                   	nop    
  103709:	90                   	nop    
  10370a:	90                   	nop    
  10370b:	90                   	nop    
  10370c:	90                   	nop    
  10370d:	90                   	nop    
  10370e:	90                   	nop    
  10370f:	90                   	nop    

00103710 <setupsegs>:
  103710:	55                   	push   %ebp
  103711:	89 e5                	mov    %esp,%ebp
  103713:	56                   	push   %esi
  103714:	53                   	push   %ebx
  103715:	83 ec 10             	sub    $0x10,%esp
  103718:	8b 75 08             	mov    0x8(%ebp),%esi
  10371b:	e8 20 07 00 00       	call   103e40 <pushcli>
  103720:	e8 2b f0 ff ff       	call   102750 <cpu>
  103725:	8d 04 40             	lea    (%eax,%eax,2),%eax
  103728:	89 c2                	mov    %eax,%edx
  10372a:	c1 e2 04             	shl    $0x4,%edx
  10372d:	01 d0                	add    %edx,%eax
  10372f:	85 f6                	test   %esi,%esi
  103731:	8d 1c 85 c0 aa 10 00 	lea    0x10aac0(,%eax,4),%ebx
  103738:	66 c7 43 30 10 00    	movw   $0x10,0x30(%ebx)
  10373e:	0f 84 7c 01 00 00    	je     1038c0 <setupsegs+0x1b0>
  103744:	8b 46 08             	mov    0x8(%esi),%eax
  103747:	05 00 10 00 00       	add    $0x1000,%eax
  10374c:	89 43 2c             	mov    %eax,0x2c(%ebx)
  10374f:	31 c0                	xor    %eax,%eax
  103751:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  103756:	89 83 90 00 00 00    	mov    %eax,0x90(%ebx)
  10375c:	31 c0                	xor    %eax,%eax
  10375e:	31 c9                	xor    %ecx,%ecx
  103760:	89 83 94 00 00 00    	mov    %eax,0x94(%ebx)
  103766:	31 c0                	xor    %eax,%eax
  103768:	66 89 83 9a 00 00 00 	mov    %ax,0x9a(%ebx)
  10376f:	b8 0f 01 00 00       	mov    $0x10f,%eax
  103774:	66 89 83 98 00 00 00 	mov    %ax,0x98(%ebx)
  10377b:	8d 43 28             	lea    0x28(%ebx),%eax
  10377e:	66 89 93 a0 00 00 00 	mov    %dx,0xa0(%ebx)
  103785:	89 c2                	mov    %eax,%edx
  103787:	c1 ea 18             	shr    $0x18,%edx
  10378a:	88 93 bf 00 00 00    	mov    %dl,0xbf(%ebx)
  103790:	89 c2                	mov    %eax,%edx
  103792:	c1 ea 10             	shr    $0x10,%edx
  103795:	85 f6                	test   %esi,%esi
  103797:	66 89 83 ba 00 00 00 	mov    %ax,0xba(%ebx)
  10379e:	b8 67 00 00 00       	mov    $0x67,%eax
  1037a3:	c6 83 9f 00 00 00 00 	movb   $0x0,0x9f(%ebx)
  1037aa:	c6 83 9e 00 00 00 c0 	movb   $0xc0,0x9e(%ebx)
  1037b1:	c6 83 9d 00 00 00 9a 	movb   $0x9a,0x9d(%ebx)
  1037b8:	c6 83 9c 00 00 00 00 	movb   $0x0,0x9c(%ebx)
  1037bf:	c6 83 a7 00 00 00 00 	movb   $0x0,0xa7(%ebx)
  1037c6:	c6 83 a6 00 00 00 cf 	movb   $0xcf,0xa6(%ebx)
  1037cd:	c6 83 a5 00 00 00 92 	movb   $0x92,0xa5(%ebx)
  1037d4:	c6 83 a4 00 00 00 00 	movb   $0x0,0xa4(%ebx)
  1037db:	66 89 8b a2 00 00 00 	mov    %cx,0xa2(%ebx)
  1037e2:	c6 83 be 00 00 00 40 	movb   $0x40,0xbe(%ebx)
  1037e9:	88 93 bc 00 00 00    	mov    %dl,0xbc(%ebx)
  1037ef:	66 89 83 b8 00 00 00 	mov    %ax,0xb8(%ebx)
  1037f6:	c6 83 bd 00 00 00 89 	movb   $0x89,0xbd(%ebx)
  1037fd:	0f 84 cd 00 00 00    	je     1038d0 <setupsegs+0x1c0>
  103803:	8b 16                	mov    (%esi),%edx
  103805:	8b 4e 04             	mov    0x4(%esi),%ecx
  103808:	c6 83 ad 00 00 00 fa 	movb   $0xfa,0xad(%ebx)
  10380f:	89 d0                	mov    %edx,%eax
  103811:	49                   	dec    %ecx
  103812:	c1 e8 18             	shr    $0x18,%eax
  103815:	88 83 af 00 00 00    	mov    %al,0xaf(%ebx)
  10381b:	89 c8                	mov    %ecx,%eax
  10381d:	c1 e8 1c             	shr    $0x1c,%eax
  103820:	0c c0                	or     $0xc0,%al
  103822:	88 83 ae 00 00 00    	mov    %al,0xae(%ebx)
  103828:	c1 e9 0c             	shr    $0xc,%ecx
  10382b:	89 d0                	mov    %edx,%eax
  10382d:	66 89 93 aa 00 00 00 	mov    %dx,0xaa(%ebx)
  103834:	8b 16                	mov    (%esi),%edx
  103836:	c1 e8 10             	shr    $0x10,%eax
  103839:	66 89 8b a8 00 00 00 	mov    %cx,0xa8(%ebx)
  103840:	8b 4e 04             	mov    0x4(%esi),%ecx
  103843:	88 83 ac 00 00 00    	mov    %al,0xac(%ebx)
  103849:	c6 83 b5 00 00 00 f2 	movb   $0xf2,0xb5(%ebx)
  103850:	89 d0                	mov    %edx,%eax
  103852:	49                   	dec    %ecx
  103853:	c1 e8 18             	shr    $0x18,%eax
  103856:	88 83 b7 00 00 00    	mov    %al,0xb7(%ebx)
  10385c:	89 c8                	mov    %ecx,%eax
  10385e:	c1 e8 1c             	shr    $0x1c,%eax
  103861:	0c c0                	or     $0xc0,%al
  103863:	88 83 b6 00 00 00    	mov    %al,0xb6(%ebx)
  103869:	89 d0                	mov    %edx,%eax
  10386b:	c1 e8 10             	shr    $0x10,%eax
  10386e:	c1 e9 0c             	shr    $0xc,%ecx
  103871:	88 83 b4 00 00 00    	mov    %al,0xb4(%ebx)
  103877:	66 89 93 b2 00 00 00 	mov    %dx,0xb2(%ebx)
  10387e:	66 89 8b b0 00 00 00 	mov    %cx,0xb0(%ebx)
{
  volatile ushort pd[3];

  pd[0] = size-1;
  pd[1] = (uint)p;
  103885:	8d 83 90 00 00 00    	lea    0x90(%ebx),%eax
  10388b:	0f b7 d0             	movzwl %ax,%edx
  pd[2] = (uint)p >> 16;
  10388e:	c1 e8 10             	shr    $0x10,%eax
  103891:	66 c7 45 f2 2f 00    	movw   $0x2f,0xfffffff2(%ebp)
  103897:	66 89 55 f4          	mov    %dx,0xfffffff4(%ebp)
  10389b:	66 89 45 f6          	mov    %ax,0xfffffff6(%ebp)

  asm volatile("lgdt (%0)" : : "r" (pd));
  10389f:	8d 45 f2             	lea    0xfffffff2(%ebp),%eax
  1038a2:	0f 01 10             	lgdtl  (%eax)
}

struct gatedesc;

static inline void
lidt(struct gatedesc *p, int size)
{
  volatile ushort pd[3];

  pd[0] = size-1;
  pd[1] = (uint)p;
  pd[2] = (uint)p >> 16;

  asm volatile("lidt (%0)" : : "r" (pd));
}

static inline void
ltr(ushort sel)
{
  asm volatile("ltr %0" : : "r" (sel));
  1038a5:	b8 28 00 00 00       	mov    $0x28,%eax
  1038aa:	0f 00 d8             	ltr    %ax
  1038ad:	e8 fe 04 00 00       	call   103db0 <popcli>
  1038b2:	83 c4 10             	add    $0x10,%esp
  1038b5:	5b                   	pop    %ebx
  1038b6:	5e                   	pop    %esi
  1038b7:	5d                   	pop    %ebp
  1038b8:	c3                   	ret    
  1038b9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  1038c0:	c7 43 2c ff ff ff ff 	movl   $0xffffffff,0x2c(%ebx)
  1038c7:	e9 83 fe ff ff       	jmp    10374f <setupsegs+0x3f>
  1038cc:	8d 74 26 00          	lea    0x0(%esi),%esi
  1038d0:	31 c0                	xor    %eax,%eax
  1038d2:	89 83 a8 00 00 00    	mov    %eax,0xa8(%ebx)
  1038d8:	31 c0                	xor    %eax,%eax
  1038da:	89 83 ac 00 00 00    	mov    %eax,0xac(%ebx)
  1038e0:	31 c0                	xor    %eax,%eax
  1038e2:	89 83 b0 00 00 00    	mov    %eax,0xb0(%ebx)
  1038e8:	31 c0                	xor    %eax,%eax
  1038ea:	89 83 b4 00 00 00    	mov    %eax,0xb4(%ebx)
  1038f0:	eb 93                	jmp    103885 <setupsegs+0x175>
  1038f2:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  1038f9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00103900 <scheduler>:
  103900:	55                   	push   %ebp
  103901:	89 e5                	mov    %esp,%ebp
  103903:	57                   	push   %edi
  103904:	56                   	push   %esi
  103905:	53                   	push   %ebx
  103906:	83 ec 0c             	sub    $0xc,%esp
  103909:	e8 42 ee ff ff       	call   102750 <cpu>
  10390e:	8d 04 40             	lea    (%eax,%eax,2),%eax
  103911:	89 c2                	mov    %eax,%edx
  103913:	c1 e2 04             	shl    $0x4,%edx
  103916:	01 d0                	add    %edx,%eax
  103918:	8d 3c 85 c0 aa 10 00 	lea    0x10aac0(,%eax,4),%edi
  10391f:	8d 47 08             	lea    0x8(%edi),%eax
  103922:	89 45 f0             	mov    %eax,0xfffffff0(%ebp)

static inline void
sti(void)
{
  asm volatile("sti");
  103925:	fb                   	sti    
  103926:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  10392d:	be 4c b1 10 00       	mov    $0x10b14c,%esi
  103932:	bb 40 b1 10 00       	mov    $0x10b140,%ebx
  103937:	e8 d4 05 00 00       	call   103f10 <acquire>
  10393c:	eb 16                	jmp    103954 <scheduler+0x54>
  10393e:	89 f6                	mov    %esi,%esi
  103940:	81 c6 98 00 00 00    	add    $0x98,%esi
  103946:	81 c3 98 00 00 00    	add    $0x98,%ebx
  10394c:	81 fe 4c d7 10 00    	cmp    $0x10d74c,%esi
  103952:	74 57                	je     1039ab <scheduler+0xab>
  103954:	83 7b 0c 03          	cmpl   $0x3,0xc(%ebx)
  103958:	75 e6                	jne    103940 <scheduler+0x40>
  10395a:	89 5f 04             	mov    %ebx,0x4(%edi)
  10395d:	89 1c 24             	mov    %ebx,(%esp)
  103960:	e8 ab fd ff ff       	call   103710 <setupsegs>
  103965:	c7 43 0c 04 00 00 00 	movl   $0x4,0xc(%ebx)
  10396c:	c7 04 24 61 00 00 00 	movl   $0x61,(%esp)
  103973:	e8 f8 c9 ff ff       	call   100370 <cons_putc>
  103978:	8d 46 58             	lea    0x58(%esi),%eax
  10397b:	89 44 24 04          	mov    %eax,0x4(%esp)
  10397f:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  103982:	89 04 24             	mov    %eax,(%esp)
  103985:	e8 d2 07 00 00       	call   10415c <swtch>
  10398a:	c7 04 24 62 00 00 00 	movl   $0x62,(%esp)
  103991:	e8 da c9 ff ff       	call   100370 <cons_putc>
  103996:	c7 47 04 00 00 00 00 	movl   $0x0,0x4(%edi)
  10399d:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  1039a4:	e8 67 fd ff ff       	call   103710 <setupsegs>
  1039a9:	eb 95                	jmp    103940 <scheduler+0x40>
  1039ab:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  1039b2:	e8 19 05 00 00       	call   103ed0 <release>
  1039b7:	e9 69 ff ff ff       	jmp    103925 <scheduler+0x25>
  1039bc:	8d 74 26 00          	lea    0x0(%esi),%esi

001039c0 <growproc>:
  1039c0:	55                   	push   %ebp
  1039c1:	89 e5                	mov    %esp,%ebp
  1039c3:	57                   	push   %edi
  1039c4:	56                   	push   %esi
  1039c5:	53                   	push   %ebx
  1039c6:	83 ec 0c             	sub    $0xc,%esp
  1039c9:	8b 7d 08             	mov    0x8(%ebp),%edi
  1039cc:	e8 ef f8 ff ff       	call   1032c0 <curproc>
  1039d1:	8b 50 04             	mov    0x4(%eax),%edx
  1039d4:	8d 04 17             	lea    (%edi,%edx,1),%eax
  1039d7:	89 04 24             	mov    %eax,(%esp)
  1039da:	e8 81 e8 ff ff       	call   102260 <kalloc>
  1039df:	89 c6                	mov    %eax,%esi
  1039e1:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1039e6:	85 f6                	test   %esi,%esi
  1039e8:	74 7d                	je     103a67 <growproc+0xa7>
  1039ea:	e8 d1 f8 ff ff       	call   1032c0 <curproc>
  1039ef:	8b 58 04             	mov    0x4(%eax),%ebx
  1039f2:	e8 c9 f8 ff ff       	call   1032c0 <curproc>
  1039f7:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  1039fb:	8b 00                	mov    (%eax),%eax
  1039fd:	89 34 24             	mov    %esi,(%esp)
  103a00:	89 44 24 04          	mov    %eax,0x4(%esp)
  103a04:	e8 07 06 00 00       	call   104010 <memmove>
  103a09:	e8 b2 f8 ff ff       	call   1032c0 <curproc>
  103a0e:	31 d2                	xor    %edx,%edx
  103a10:	89 7c 24 08          	mov    %edi,0x8(%esp)
  103a14:	89 54 24 04          	mov    %edx,0x4(%esp)
  103a18:	8b 50 04             	mov    0x4(%eax),%edx
  103a1b:	8d 04 16             	lea    (%esi,%edx,1),%eax
  103a1e:	89 04 24             	mov    %eax,(%esp)
  103a21:	e8 5a 05 00 00       	call   103f80 <memset>
  103a26:	e8 95 f8 ff ff       	call   1032c0 <curproc>
  103a2b:	8b 58 04             	mov    0x4(%eax),%ebx
  103a2e:	e8 8d f8 ff ff       	call   1032c0 <curproc>
  103a33:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  103a37:	8b 00                	mov    (%eax),%eax
  103a39:	89 04 24             	mov    %eax,(%esp)
  103a3c:	e8 df e8 ff ff       	call   102320 <kfree>
  103a41:	e8 7a f8 ff ff       	call   1032c0 <curproc>
  103a46:	89 30                	mov    %esi,(%eax)
  103a48:	e8 73 f8 ff ff       	call   1032c0 <curproc>
  103a4d:	01 78 04             	add    %edi,0x4(%eax)
  103a50:	e8 6b f8 ff ff       	call   1032c0 <curproc>
  103a55:	89 04 24             	mov    %eax,(%esp)
  103a58:	e8 b3 fc ff ff       	call   103710 <setupsegs>
  103a5d:	e8 5e f8 ff ff       	call   1032c0 <curproc>
  103a62:	8b 40 04             	mov    0x4(%eax),%eax
  103a65:	29 f8                	sub    %edi,%eax
  103a67:	83 c4 0c             	add    $0xc,%esp
  103a6a:	5b                   	pop    %ebx
  103a6b:	5e                   	pop    %esi
  103a6c:	5f                   	pop    %edi
  103a6d:	5d                   	pop    %ebp
  103a6e:	c3                   	ret    
  103a6f:	90                   	nop    

00103a70 <copyproc>:
  103a70:	55                   	push   %ebp
  103a71:	89 e5                	mov    %esp,%ebp
  103a73:	57                   	push   %edi
  103a74:	bf 40 b1 10 00       	mov    $0x10b140,%edi
  103a79:	56                   	push   %esi
  103a7a:	53                   	push   %ebx
  103a7b:	83 ec 0c             	sub    $0xc,%esp
  103a7e:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103a85:	e8 86 04 00 00       	call   103f10 <acquire>
  103a8a:	eb 16                	jmp    103aa2 <copyproc+0x32>
  103a8c:	8d 74 26 00          	lea    0x0(%esi),%esi
  103a90:	8d bf 98 00 00 00    	lea    0x98(%edi),%edi
  103a96:	81 ff 40 d7 10 00    	cmp    $0x10d740,%edi
  103a9c:	0f 84 27 01 00 00    	je     103bc9 <copyproc+0x159>
  103aa2:	8b 47 0c             	mov    0xc(%edi),%eax
  103aa5:	89 fe                	mov    %edi,%esi
  103aa7:	85 c0                	test   %eax,%eax
  103aa9:	75 e5                	jne    103a90 <copyproc+0x20>
  103aab:	a1 04 73 10 00       	mov    0x107304,%eax
  103ab0:	c7 47 0c 01 00 00 00 	movl   $0x1,0xc(%edi)
  103ab7:	89 47 10             	mov    %eax,0x10(%edi)
  103aba:	40                   	inc    %eax
  103abb:	a3 04 73 10 00       	mov    %eax,0x107304
  103ac0:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103ac7:	e8 04 04 00 00       	call   103ed0 <release>
  103acc:	c7 04 24 00 10 00 00 	movl   $0x1000,(%esp)
  103ad3:	e8 88 e7 ff ff       	call   102260 <kalloc>
  103ad8:	85 c0                	test   %eax,%eax
  103ada:	89 47 08             	mov    %eax,0x8(%edi)
  103add:	0f 84 fe 00 00 00    	je     103be1 <copyproc+0x171>
  103ae3:	8d 90 bc 0f 00 00    	lea    0xfbc(%eax),%edx
  103ae9:	8b 45 08             	mov    0x8(%ebp),%eax
  103aec:	89 97 84 00 00 00    	mov    %edx,0x84(%edi)
  103af2:	85 c0                	test   %eax,%eax
  103af4:	0f 84 94 00 00 00    	je     103b8e <copyproc+0x11e>
  103afa:	8b 45 08             	mov    0x8(%ebp),%eax
  103afd:	89 47 14             	mov    %eax,0x14(%edi)
  103b00:	b8 44 00 00 00       	mov    $0x44,%eax
  103b05:	89 44 24 08          	mov    %eax,0x8(%esp)
  103b09:	8b 4d 08             	mov    0x8(%ebp),%ecx
  103b0c:	8b 81 84 00 00 00    	mov    0x84(%ecx),%eax
  103b12:	89 14 24             	mov    %edx,(%esp)
  103b15:	89 44 24 04          	mov    %eax,0x4(%esp)
  103b19:	e8 f2 04 00 00       	call   104010 <memmove>
  103b1e:	8b 55 08             	mov    0x8(%ebp),%edx
  103b21:	8b 42 04             	mov    0x4(%edx),%eax
  103b24:	89 47 04             	mov    %eax,0x4(%edi)
  103b27:	89 04 24             	mov    %eax,(%esp)
  103b2a:	e8 31 e7 ff ff       	call   102260 <kalloc>
  103b2f:	85 c0                	test   %eax,%eax
  103b31:	89 c2                	mov    %eax,%edx
  103b33:	89 06                	mov    %eax,(%esi)
  103b35:	0f 84 b1 00 00 00    	je     103bec <copyproc+0x17c>
  103b3b:	8b 47 04             	mov    0x4(%edi),%eax
  103b3e:	31 db                	xor    %ebx,%ebx
  103b40:	89 44 24 08          	mov    %eax,0x8(%esp)
  103b44:	8b 4d 08             	mov    0x8(%ebp),%ecx
  103b47:	8b 01                	mov    (%ecx),%eax
  103b49:	89 14 24             	mov    %edx,(%esp)
  103b4c:	89 44 24 04          	mov    %eax,0x4(%esp)
  103b50:	e8 bb 04 00 00       	call   104010 <memmove>
  103b55:	8d 74 26 00          	lea    0x0(%esi),%esi
  103b59:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  103b60:	8b 55 08             	mov    0x8(%ebp),%edx
  103b63:	8b 44 9a 20          	mov    0x20(%edx,%ebx,4),%eax
  103b67:	85 c0                	test   %eax,%eax
  103b69:	74 0c                	je     103b77 <copyproc+0x107>
  103b6b:	89 04 24             	mov    %eax,(%esp)
  103b6e:	e8 0d d3 ff ff       	call   100e80 <filedup>
  103b73:	89 44 9f 20          	mov    %eax,0x20(%edi,%ebx,4)
  103b77:	43                   	inc    %ebx
  103b78:	83 fb 10             	cmp    $0x10,%ebx
  103b7b:	75 e3                	jne    103b60 <copyproc+0xf0>
  103b7d:	8b 4d 08             	mov    0x8(%ebp),%ecx
  103b80:	8b 41 60             	mov    0x60(%ecx),%eax
  103b83:	89 04 24             	mov    %eax,(%esp)
  103b86:	e8 e5 d4 ff ff       	call   101070 <idup>
  103b8b:	89 47 60             	mov    %eax,0x60(%edi)
  103b8e:	31 c9                	xor    %ecx,%ecx
  103b90:	bb 20 00 00 00       	mov    $0x20,%ebx
  103b95:	8d 47 64             	lea    0x64(%edi),%eax
  103b98:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  103b9c:	89 4c 24 04          	mov    %ecx,0x4(%esp)
  103ba0:	89 04 24             	mov    %eax,(%esp)
  103ba3:	e8 d8 03 00 00       	call   103f80 <memset>
  103ba8:	8b 87 84 00 00 00    	mov    0x84(%edi),%eax
  103bae:	c7 47 64 f0 32 10 00 	movl   $0x1032f0,0x64(%edi)
  103bb5:	89 47 68             	mov    %eax,0x68(%edi)
  103bb8:	c7 40 1c 00 00 00 00 	movl   $0x0,0x1c(%eax)
  103bbf:	83 c4 0c             	add    $0xc,%esp
  103bc2:	89 f0                	mov    %esi,%eax
  103bc4:	5b                   	pop    %ebx
  103bc5:	5e                   	pop    %esi
  103bc6:	5f                   	pop    %edi
  103bc7:	5d                   	pop    %ebp
  103bc8:	c3                   	ret    
  103bc9:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103bd0:	31 f6                	xor    %esi,%esi
  103bd2:	e8 f9 02 00 00       	call   103ed0 <release>
  103bd7:	83 c4 0c             	add    $0xc,%esp
  103bda:	89 f0                	mov    %esi,%eax
  103bdc:	5b                   	pop    %ebx
  103bdd:	5e                   	pop    %esi
  103bde:	5f                   	pop    %edi
  103bdf:	5d                   	pop    %ebp
  103be0:	c3                   	ret    
  103be1:	31 f6                	xor    %esi,%esi
  103be3:	c7 47 0c 00 00 00 00 	movl   $0x0,0xc(%edi)
  103bea:	eb d3                	jmp    103bbf <copyproc+0x14f>
  103bec:	bf 00 10 00 00       	mov    $0x1000,%edi
  103bf1:	89 7c 24 04          	mov    %edi,0x4(%esp)
  103bf5:	8b 46 08             	mov    0x8(%esi),%eax
  103bf8:	89 04 24             	mov    %eax,(%esp)
  103bfb:	e8 20 e7 ff ff       	call   102320 <kfree>
  103c00:	c7 46 08 00 00 00 00 	movl   $0x0,0x8(%esi)
  103c07:	c7 46 0c 00 00 00 00 	movl   $0x0,0xc(%esi)
  103c0e:	c7 46 14 00 00 00 00 	movl   $0x0,0x14(%esi)
  103c15:	31 f6                	xor    %esi,%esi
  103c17:	eb a6                	jmp    103bbf <copyproc+0x14f>
  103c19:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00103c20 <userinit>:
  103c20:	55                   	push   %ebp
  103c21:	89 e5                	mov    %esp,%ebp
  103c23:	53                   	push   %ebx
  103c24:	83 ec 14             	sub    $0x14,%esp
  103c27:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  103c2e:	e8 3d fe ff ff       	call   103a70 <copyproc>
  103c33:	c7 40 04 00 10 00 00 	movl   $0x1000,0x4(%eax)
  103c3a:	89 c3                	mov    %eax,%ebx
  103c3c:	c7 04 24 00 10 00 00 	movl   $0x1000,(%esp)
  103c43:	e8 18 e6 ff ff       	call   102260 <kalloc>
  103c48:	89 03                	mov    %eax,(%ebx)
  103c4a:	c7 04 24 46 63 10 00 	movl   $0x106346,(%esp)
  103c51:	e8 fa e1 ff ff       	call   101e50 <namei>
  103c56:	31 c9                	xor    %ecx,%ecx
  103c58:	89 43 60             	mov    %eax,0x60(%ebx)
  103c5b:	b8 44 00 00 00       	mov    $0x44,%eax
  103c60:	89 4c 24 04          	mov    %ecx,0x4(%esp)
  103c64:	89 44 24 08          	mov    %eax,0x8(%esp)
  103c68:	8b 83 84 00 00 00    	mov    0x84(%ebx),%eax
  103c6e:	89 04 24             	mov    %eax,(%esp)
  103c71:	e8 0a 03 00 00       	call   103f80 <memset>
  103c76:	8b 83 84 00 00 00    	mov    0x84(%ebx),%eax
  103c7c:	8b 0b                	mov    (%ebx),%ecx
  103c7e:	c7 40 38 00 02 00 00 	movl   $0x200,0x38(%eax)
  103c85:	8b 53 04             	mov    0x4(%ebx),%edx
  103c88:	66 c7 40 34 1b 00    	movw   $0x1b,0x34(%eax)
  103c8e:	66 c7 40 24 23 00    	movw   $0x23,0x24(%eax)
  103c94:	66 c7 40 20 23 00    	movw   $0x23,0x20(%eax)
  103c9a:	89 50 3c             	mov    %edx,0x3c(%eax)
  103c9d:	83 68 3c 04          	subl   $0x4,0x3c(%eax)
  103ca1:	66 c7 40 40 23 00    	movw   $0x23,0x40(%eax)
  103ca7:	8b 50 3c             	mov    0x3c(%eax),%edx
  103caa:	c7 04 11 ef ef ef ef 	movl   $0xefefefef,(%ecx,%edx,1)
  103cb1:	ba 2c 00 00 00       	mov    $0x2c,%edx
  103cb6:	c7 40 30 00 00 00 00 	movl   $0x0,0x30(%eax)
  103cbd:	b8 08 77 10 00       	mov    $0x107708,%eax
  103cc2:	89 54 24 08          	mov    %edx,0x8(%esp)
  103cc6:	89 44 24 04          	mov    %eax,0x4(%esp)
  103cca:	8b 03                	mov    (%ebx),%eax
  103ccc:	89 04 24             	mov    %eax,(%esp)
  103ccf:	e8 3c 03 00 00       	call   104010 <memmove>
  103cd4:	b8 10 00 00 00       	mov    $0x10,%eax
  103cd9:	89 44 24 08          	mov    %eax,0x8(%esp)
  103cdd:	b8 48 63 10 00       	mov    $0x106348,%eax
  103ce2:	89 44 24 04          	mov    %eax,0x4(%esp)
  103ce6:	8d 83 88 00 00 00    	lea    0x88(%ebx),%eax
  103cec:	89 04 24             	mov    %eax,(%esp)
  103cef:	e8 1c 04 00 00       	call   104110 <safestrcpy>
  103cf4:	c7 43 0c 03 00 00 00 	movl   $0x3,0xc(%ebx)
  103cfb:	89 1d 48 78 10 00    	mov    %ebx,0x107848
  103d01:	83 c4 14             	add    $0x14,%esp
  103d04:	5b                   	pop    %ebx
  103d05:	5d                   	pop    %ebp
  103d06:	c3                   	ret    
  103d07:	89 f6                	mov    %esi,%esi
  103d09:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00103d10 <pinit>:
  103d10:	55                   	push   %ebp
  103d11:	b8 51 63 10 00       	mov    $0x106351,%eax
  103d16:	89 e5                	mov    %esp,%ebp
  103d18:	83 ec 08             	sub    $0x8,%esp
  103d1b:	89 44 24 04          	mov    %eax,0x4(%esp)
  103d1f:	c7 04 24 40 d7 10 00 	movl   $0x10d740,(%esp)
  103d26:	e8 05 00 00 00       	call   103d30 <initlock>
  103d2b:	c9                   	leave  
  103d2c:	c3                   	ret    
  103d2d:	90                   	nop    
  103d2e:	90                   	nop    
  103d2f:	90                   	nop    

00103d30 <initlock>:
extern int use_console_lock;

void
initlock(struct spinlock *lock, char *name)
{
  103d30:	55                   	push   %ebp
  103d31:	89 e5                	mov    %esp,%ebp
  103d33:	8b 45 08             	mov    0x8(%ebp),%eax
  lock->name = name;
  103d36:	8b 55 0c             	mov    0xc(%ebp),%edx
  lock->locked = 0;
  103d39:	c7 00 00 00 00 00    	movl   $0x0,(%eax)
  103d3f:	89 50 04             	mov    %edx,0x4(%eax)
  lock->cpu = 0xffffffff;
  103d42:	c7 40 08 ff ff ff ff 	movl   $0xffffffff,0x8(%eax)
}
  103d49:	5d                   	pop    %ebp
  103d4a:	c3                   	ret    
  103d4b:	90                   	nop    
  103d4c:	8d 74 26 00          	lea    0x0(%esi),%esi

00103d50 <getcallerpcs>:

// Acquire the lock.
// Loops (spins) until the lock is acquired.
// Holding a lock for a long time may cause
// other CPUs to waste time spinning to acquire it.
void
acquire(struct spinlock *lock)
{
  pushcli();
  if(holding(lock))
    panic("acquire");

  // The xchg is atomic.
  // It also serializes, so that reads after acquire are not
  // reordered before it.  
  while(xchg(&lock->locked, 1) == 1)
    ;

  // Record info about lock acquisition for debugging.
  // The +10 is only so that we can tell the difference
  // between forgetting to initialize lock->cpu
  // and holding a lock on cpu 0.
  lock->cpu = cpu() + 10;
  getcallerpcs(&lock, lock->pcs);
}

// Release the lock.
void
release(struct spinlock *lock)
{
  if(!holding(lock))
    panic("release");

  lock->pcs[0] = 0;
  lock->cpu = 0xffffffff;

  // The xchg serializes, so that reads before release are 
  // not reordered after it.  (This reordering would be allowed
  // by the Intel manuals, but does not happen on current 
  // Intel processors.  The xchg being asm volatile also keeps
  // gcc from delaying the above assignments.)
  xchg(&lock->locked, 0);

  popcli();
}

// Record the current call stack in pcs[] by following the %ebp chain.
void
getcallerpcs(void *v, uint pcs[])
{
  103d50:	55                   	push   %ebp
  uint *ebp;
  int i;
  
  ebp = (uint*)v - 2;
  103d51:	31 c9                	xor    %ecx,%ecx
  103d53:	89 e5                	mov    %esp,%ebp
  103d55:	53                   	push   %ebx
  103d56:	8b 55 08             	mov    0x8(%ebp),%edx
  103d59:	8b 5d 0c             	mov    0xc(%ebp),%ebx
  103d5c:	83 ea 08             	sub    $0x8,%edx
  103d5f:	eb 02                	jmp    103d63 <getcallerpcs+0x13>
  for(i = 0; i < 10; i++){
    if(ebp == 0 || ebp == (uint*)0xffffffff)
      break;
    pcs[i] = ebp[1];     // saved %eip
    ebp = (uint*)ebp[0]; // saved %ebp
  103d61:	89 c2                	mov    %eax,%edx
  103d63:	8d 42 ff             	lea    0xffffffff(%edx),%eax
  103d66:	83 f8 fd             	cmp    $0xfffffffd,%eax
  103d69:	77 11                	ja     103d7c <getcallerpcs+0x2c>
  103d6b:	8b 42 04             	mov    0x4(%edx),%eax
  103d6e:	89 04 8b             	mov    %eax,(%ebx,%ecx,4)
  103d71:	41                   	inc    %ecx
  103d72:	83 f9 0a             	cmp    $0xa,%ecx
  103d75:	8b 02                	mov    (%edx),%eax
  103d77:	75 e8                	jne    103d61 <getcallerpcs+0x11>
  }
  for(; i < 10; i++)
    pcs[i] = 0;
}
  103d79:	5b                   	pop    %ebx
  103d7a:	5d                   	pop    %ebp
  103d7b:	c3                   	ret    
  103d7c:	83 f9 09             	cmp    $0x9,%ecx
  103d7f:	7f f8                	jg     103d79 <getcallerpcs+0x29>
  103d81:	8d 04 8b             	lea    (%ebx,%ecx,4),%eax
  103d84:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  103d8a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi
  103d90:	41                   	inc    %ecx
  103d91:	c7 00 00 00 00 00    	movl   $0x0,(%eax)
  103d97:	83 c0 04             	add    $0x4,%eax
  103d9a:	83 f9 0a             	cmp    $0xa,%ecx
  103d9d:	75 f1                	jne    103d90 <getcallerpcs+0x40>
  103d9f:	5b                   	pop    %ebx
  103da0:	5d                   	pop    %ebp
  103da1:	c3                   	ret    
  103da2:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  103da9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00103db0 <popcli>:

// Check whether this cpu is holding the lock.
int
holding(struct spinlock *lock)
{
  return lock->locked && lock->cpu == cpu() + 10;
}


// Pushcli/popcli are like cli/sti except that they are matched:
// it takes two popcli to undo two pushcli.  Also, if interrupts
// are off, then pushcli, popcli leaves them off.

void
pushcli(void)
{
  int eflags;
  
  eflags = read_eflags();
  cli();
  if(cpus[cpu()].ncli++ == 0)
    cpus[cpu()].intena = eflags & FL_IF;
}

void
popcli(void)
{
  103db0:	55                   	push   %ebp
  103db1:	89 e5                	mov    %esp,%ebp
  103db3:	83 ec 08             	sub    $0x8,%esp
static inline uint
read_eflags(void)
{
  uint eflags;
  asm volatile("pushfl; popl %0" : "=r" (eflags));
  103db6:	9c                   	pushf  
  103db7:	58                   	pop    %eax
  if(read_eflags()&FL_IF)
  103db8:	f6 c4 02             	test   $0x2,%ah
  103dbb:	75 60                	jne    103e1d <popcli+0x6d>
    panic("popcli - interruptible");
  if(--cpus[cpu()].ncli < 0)
  103dbd:	e8 8e e9 ff ff       	call   102750 <cpu>
  103dc2:	8d 04 40             	lea    (%eax,%eax,2),%eax
  103dc5:	89 c2                	mov    %eax,%edx
  103dc7:	c1 e2 04             	shl    $0x4,%edx
  103dca:	01 d0                	add    %edx,%eax
  103dcc:	8d 04 85 c4 aa 10 00 	lea    0x10aac4(,%eax,4),%eax
  103dd3:	8b 90 c0 00 00 00    	mov    0xc0(%eax),%edx
  103dd9:	4a                   	dec    %edx
  103dda:	85 d2                	test   %edx,%edx
  103ddc:	89 90 c0 00 00 00    	mov    %edx,0xc0(%eax)
  103de2:	78 45                	js     103e29 <popcli+0x79>
    panic("popcli");
  if(cpus[cpu()].ncli == 0 && cpus[cpu()].intena)
  103de4:	e8 67 e9 ff ff       	call   102750 <cpu>
  103de9:	8d 04 40             	lea    (%eax,%eax,2),%eax
  103dec:	89 c2                	mov    %eax,%edx
  103dee:	c1 e2 04             	shl    $0x4,%edx
  103df1:	01 d0                	add    %edx,%eax
  103df3:	8b 14 85 84 ab 10 00 	mov    0x10ab84(,%eax,4),%edx
  103dfa:	85 d2                	test   %edx,%edx
  103dfc:	74 02                	je     103e00 <popcli+0x50>
    sti();
}
  103dfe:	c9                   	leave  
  103dff:	c3                   	ret    
  103e00:	e8 4b e9 ff ff       	call   102750 <cpu>
  103e05:	8d 04 40             	lea    (%eax,%eax,2),%eax
  103e08:	89 c2                	mov    %eax,%edx
  103e0a:	c1 e2 04             	shl    $0x4,%edx
  103e0d:	01 d0                	add    %edx,%eax
  103e0f:	8b 04 85 88 ab 10 00 	mov    0x10ab88(,%eax,4),%eax
  103e16:	85 c0                	test   %eax,%eax
  103e18:	74 e4                	je     103dfe <popcli+0x4e>

static inline void
sti(void)
{
  asm volatile("sti");
  103e1a:	fb                   	sti    
  103e1b:	c9                   	leave  
  103e1c:	c3                   	ret    
  103e1d:	c7 04 24 a0 63 10 00 	movl   $0x1063a0,(%esp)
  103e24:	e8 87 ca ff ff       	call   1008b0 <panic>
  103e29:	c7 04 24 b7 63 10 00 	movl   $0x1063b7,(%esp)
  103e30:	e8 7b ca ff ff       	call   1008b0 <panic>
  103e35:	8d 74 26 00          	lea    0x0(%esi),%esi
  103e39:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00103e40 <pushcli>:
  103e40:	55                   	push   %ebp
  103e41:	89 e5                	mov    %esp,%ebp
  103e43:	53                   	push   %ebx
  103e44:	83 ec 04             	sub    $0x4,%esp
static inline uint
read_eflags(void)
{
  uint eflags;
  asm volatile("pushfl; popl %0" : "=r" (eflags));
  103e47:	9c                   	pushf  
  103e48:	5b                   	pop    %ebx
  return eflags;
}

static inline void
write_eflags(uint eflags)
{
  asm volatile("pushl %0; popfl" : : "r" (eflags));
}

static inline uint
xchg(volatile uint *addr, uint newval)
{
  uint result;
  
  // The + in "+m" denotes a read-modify-write operand.
  asm volatile("lock; xchgl %0, %1" :
               "+m" (*addr), "=a" (result) :
               "1" (newval) :
               "cc");
  return result;
}

static inline void
cli(void)
{
  asm volatile("cli");
  103e49:	fa                   	cli    
  103e4a:	e8 01 e9 ff ff       	call   102750 <cpu>
  103e4f:	8d 04 40             	lea    (%eax,%eax,2),%eax
  103e52:	89 c2                	mov    %eax,%edx
  103e54:	c1 e2 04             	shl    $0x4,%edx
  103e57:	01 d0                	add    %edx,%eax
  103e59:	8d 04 85 c4 aa 10 00 	lea    0x10aac4(,%eax,4),%eax
  103e60:	8b 90 c0 00 00 00    	mov    0xc0(%eax),%edx
  103e66:	42                   	inc    %edx
  103e67:	89 90 c0 00 00 00    	mov    %edx,0xc0(%eax)
  103e6d:	4a                   	dec    %edx
  103e6e:	74 04                	je     103e74 <pushcli+0x34>
  103e70:	59                   	pop    %ecx
  103e71:	5b                   	pop    %ebx
  103e72:	5d                   	pop    %ebp
  103e73:	c3                   	ret    
  103e74:	e8 d7 e8 ff ff       	call   102750 <cpu>
  103e79:	81 e3 00 02 00 00    	and    $0x200,%ebx
  103e7f:	8d 04 40             	lea    (%eax,%eax,2),%eax
  103e82:	89 c2                	mov    %eax,%edx
  103e84:	c1 e2 04             	shl    $0x4,%edx
  103e87:	01 d0                	add    %edx,%eax
  103e89:	89 1c 85 88 ab 10 00 	mov    %ebx,0x10ab88(,%eax,4)
  103e90:	59                   	pop    %ecx
  103e91:	5b                   	pop    %ebx
  103e92:	5d                   	pop    %ebp
  103e93:	c3                   	ret    
  103e94:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  103e9a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi

00103ea0 <holding>:
  103ea0:	55                   	push   %ebp
  103ea1:	31 c0                	xor    %eax,%eax
  103ea3:	89 e5                	mov    %esp,%ebp
  103ea5:	53                   	push   %ebx
  103ea6:	83 ec 04             	sub    $0x4,%esp
  103ea9:	8b 55 08             	mov    0x8(%ebp),%edx
  103eac:	8b 0a                	mov    (%edx),%ecx
  103eae:	85 c9                	test   %ecx,%ecx
  103eb0:	74 13                	je     103ec5 <holding+0x25>
  103eb2:	8b 5a 08             	mov    0x8(%edx),%ebx
  103eb5:	e8 96 e8 ff ff       	call   102750 <cpu>
  103eba:	83 c0 0a             	add    $0xa,%eax
  103ebd:	39 c3                	cmp    %eax,%ebx
  103ebf:	0f 94 c0             	sete   %al
  103ec2:	0f b6 c0             	movzbl %al,%eax
  103ec5:	5b                   	pop    %ebx
  103ec6:	5b                   	pop    %ebx
  103ec7:	5d                   	pop    %ebp
  103ec8:	c3                   	ret    
  103ec9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00103ed0 <release>:
  103ed0:	55                   	push   %ebp
  103ed1:	89 e5                	mov    %esp,%ebp
  103ed3:	53                   	push   %ebx
  103ed4:	83 ec 04             	sub    $0x4,%esp
  103ed7:	8b 5d 08             	mov    0x8(%ebp),%ebx
  103eda:	89 1c 24             	mov    %ebx,(%esp)
  103edd:	e8 be ff ff ff       	call   103ea0 <holding>
  103ee2:	85 c0                	test   %eax,%eax
  103ee4:	74 1b                	je     103f01 <release+0x31>
  103ee6:	c7 43 0c 00 00 00 00 	movl   $0x0,0xc(%ebx)
{
  uint result;
  
  // The + in "+m" denotes a read-modify-write operand.
  asm volatile("lock; xchgl %0, %1" :
  103eed:	31 c0                	xor    %eax,%eax
  103eef:	c7 43 08 ff ff ff ff 	movl   $0xffffffff,0x8(%ebx)
{
  uint result;
  
  // The + in "+m" denotes a read-modify-write operand.
  asm volatile("lock; xchgl %0, %1" :
  103ef6:	f0 87 03             	lock xchg %eax,(%ebx)
  103ef9:	5b                   	pop    %ebx
  103efa:	5b                   	pop    %ebx
  103efb:	5d                   	pop    %ebp
  103efc:	e9 af fe ff ff       	jmp    103db0 <popcli>
  103f01:	c7 04 24 be 63 10 00 	movl   $0x1063be,(%esp)
  103f08:	e8 a3 c9 ff ff       	call   1008b0 <panic>
  103f0d:	8d 76 00             	lea    0x0(%esi),%esi

00103f10 <acquire>:
  103f10:	55                   	push   %ebp
  103f11:	89 e5                	mov    %esp,%ebp
  103f13:	53                   	push   %ebx
  103f14:	83 ec 14             	sub    $0x14,%esp
  103f17:	e8 24 ff ff ff       	call   103e40 <pushcli>
  103f1c:	8b 45 08             	mov    0x8(%ebp),%eax
  103f1f:	89 04 24             	mov    %eax,(%esp)
  103f22:	e8 79 ff ff ff       	call   103ea0 <holding>
  103f27:	85 c0                	test   %eax,%eax
  103f29:	75 43                	jne    103f6e <acquire+0x5e>
  103f2b:	8b 5d 08             	mov    0x8(%ebp),%ebx
  103f2e:	ba 01 00 00 00       	mov    $0x1,%edx
  103f33:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  103f39:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
{
  uint result;
  
  // The + in "+m" denotes a read-modify-write operand.
  asm volatile("lock; xchgl %0, %1" :
  103f40:	89 d0                	mov    %edx,%eax
  103f42:	f0 87 03             	lock xchg %eax,(%ebx)
  103f45:	48                   	dec    %eax
  103f46:	74 f8                	je     103f40 <acquire+0x30>
  103f48:	e8 03 e8 ff ff       	call   102750 <cpu>
  103f4d:	83 c0 0a             	add    $0xa,%eax
  103f50:	89 43 08             	mov    %eax,0x8(%ebx)
  103f53:	8b 45 08             	mov    0x8(%ebp),%eax
  103f56:	83 c0 0c             	add    $0xc,%eax
  103f59:	89 44 24 04          	mov    %eax,0x4(%esp)
  103f5d:	8d 45 08             	lea    0x8(%ebp),%eax
  103f60:	89 04 24             	mov    %eax,(%esp)
  103f63:	e8 e8 fd ff ff       	call   103d50 <getcallerpcs>
  103f68:	83 c4 14             	add    $0x14,%esp
  103f6b:	5b                   	pop    %ebx
  103f6c:	5d                   	pop    %ebp
  103f6d:	c3                   	ret    
  103f6e:	c7 04 24 c6 63 10 00 	movl   $0x1063c6,(%esp)
  103f75:	e8 36 c9 ff ff       	call   1008b0 <panic>
  103f7a:	90                   	nop    
  103f7b:	90                   	nop    
  103f7c:	90                   	nop    
  103f7d:	90                   	nop    
  103f7e:	90                   	nop    
  103f7f:	90                   	nop    

00103f80 <memset>:
#include "types.h"

void*
memset(void *dst, int c, uint n)
{
  103f80:	55                   	push   %ebp
  103f81:	89 e5                	mov    %esp,%ebp
  103f83:	8b 45 10             	mov    0x10(%ebp),%eax
  103f86:	53                   	push   %ebx
  103f87:	8b 5d 08             	mov    0x8(%ebp),%ebx
  char *d;

  d = (char*)dst;
  while(n-- > 0)
  103f8a:	85 c0                	test   %eax,%eax
  103f8c:	74 1a                	je     103fa8 <memset+0x28>
  103f8e:	0f b6 4d 0c          	movzbl 0xc(%ebp),%ecx
  103f92:	31 d2                	xor    %edx,%edx
  103f94:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  103f9a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi
    *d++ = c;
  103fa0:	88 0c 1a             	mov    %cl,(%edx,%ebx,1)
  103fa3:	42                   	inc    %edx
  103fa4:	39 d0                	cmp    %edx,%eax
  103fa6:	75 f8                	jne    103fa0 <memset+0x20>

  return dst;
}
  103fa8:	89 d8                	mov    %ebx,%eax
  103faa:	5b                   	pop    %ebx
  103fab:	5d                   	pop    %ebp
  103fac:	c3                   	ret    
  103fad:	8d 76 00             	lea    0x0(%esi),%esi

00103fb0 <memcmp>:

int
memcmp(const void *v1, const void *v2, uint n)
{
  103fb0:	55                   	push   %ebp
  103fb1:	89 e5                	mov    %esp,%ebp
  103fb3:	57                   	push   %edi
  103fb4:	56                   	push   %esi
  103fb5:	53                   	push   %ebx
  const uchar *s1, *s2;
  
  s1 = v1;
  s2 = v2;
  while(n-- > 0){
  103fb6:	8b 75 10             	mov    0x10(%ebp),%esi
  103fb9:	8b 55 08             	mov    0x8(%ebp),%edx
  103fbc:	8b 7d 0c             	mov    0xc(%ebp),%edi
  103fbf:	4e                   	dec    %esi
  103fc0:	83 fe ff             	cmp    $0xffffffff,%esi
  103fc3:	74 24                	je     103fe9 <memcmp+0x39>
    if(*s1 != *s2)
  103fc5:	0f b6 1a             	movzbl (%edx),%ebx
  103fc8:	0f b6 07             	movzbl (%edi),%eax
  103fcb:	38 c3                	cmp    %al,%bl
  103fcd:	75 23                	jne    103ff2 <memcmp+0x42>
      return *s1 - *s2;
  103fcf:	89 d1                	mov    %edx,%ecx
  103fd1:	89 fa                	mov    %edi,%edx
  103fd3:	eb 0e                	jmp    103fe3 <memcmp+0x33>
  103fd5:	0f b6 59 01          	movzbl 0x1(%ecx),%ebx
  103fd9:	41                   	inc    %ecx
  103fda:	0f b6 42 01          	movzbl 0x1(%edx),%eax
  103fde:	42                   	inc    %edx
  103fdf:	38 c3                	cmp    %al,%bl
  103fe1:	75 0f                	jne    103ff2 <memcmp+0x42>
  103fe3:	4e                   	dec    %esi
  103fe4:	83 fe ff             	cmp    $0xffffffff,%esi
  103fe7:	75 ec                	jne    103fd5 <memcmp+0x25>
    s1++, s2++;
  }

  return 0;
}
  103fe9:	5b                   	pop    %ebx
  103fea:	31 d2                	xor    %edx,%edx
  103fec:	89 d0                	mov    %edx,%eax
  103fee:	5e                   	pop    %esi
  103fef:	5f                   	pop    %edi
  103ff0:	5d                   	pop    %ebp
  103ff1:	c3                   	ret    
  103ff2:	0f b6 d3             	movzbl %bl,%edx
  103ff5:	0f b6 c0             	movzbl %al,%eax
  103ff8:	5b                   	pop    %ebx
  103ff9:	29 c2                	sub    %eax,%edx
  103ffb:	89 d0                	mov    %edx,%eax
  103ffd:	5e                   	pop    %esi
  103ffe:	5f                   	pop    %edi
  103fff:	5d                   	pop    %ebp
  104000:	c3                   	ret    
  104001:	eb 0d                	jmp    104010 <memmove>
  104003:	90                   	nop    
  104004:	90                   	nop    
  104005:	90                   	nop    
  104006:	90                   	nop    
  104007:	90                   	nop    
  104008:	90                   	nop    
  104009:	90                   	nop    
  10400a:	90                   	nop    
  10400b:	90                   	nop    
  10400c:	90                   	nop    
  10400d:	90                   	nop    
  10400e:	90                   	nop    
  10400f:	90                   	nop    

00104010 <memmove>:

void*
memmove(void *dst, const void *src, uint n)
{
  104010:	55                   	push   %ebp
  104011:	89 e5                	mov    %esp,%ebp
  104013:	56                   	push   %esi
  104014:	53                   	push   %ebx
  104015:	8b 75 08             	mov    0x8(%ebp),%esi
  104018:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  10401b:	8b 5d 10             	mov    0x10(%ebp),%ebx
  const char *s;
  char *d;

  s = src;
  d = dst;
  if(s < d && s + n > d){
  10401e:	39 f1                	cmp    %esi,%ecx
  104020:	73 2f                	jae    104051 <memmove+0x41>
  104022:	8d 04 19             	lea    (%ecx,%ebx,1),%eax
  104025:	39 c6                	cmp    %eax,%esi
  104027:	73 28                	jae    104051 <memmove+0x41>
    s += n;
    d += n;
    while(n-- > 0)
  104029:	85 db                	test   %ebx,%ebx
  10402b:	74 1e                	je     10404b <memmove+0x3b>
  10402d:	89 c2                	mov    %eax,%edx
  10402f:	29 d8                	sub    %ebx,%eax
  104031:	8d 0c 1e             	lea    (%esi,%ebx,1),%ecx
  104034:	89 c3                	mov    %eax,%ebx
  104036:	8d 76 00             	lea    0x0(%esi),%esi
  104039:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
      *--d = *--s;
  104040:	4a                   	dec    %edx
  104041:	49                   	dec    %ecx
  104042:	0f b6 02             	movzbl (%edx),%eax
  104045:	39 da                	cmp    %ebx,%edx
  104047:	88 01                	mov    %al,(%ecx)
  104049:	75 f5                	jne    104040 <memmove+0x30>
  } else
    while(n-- > 0)
      *d++ = *s++;

  return dst;
}
  10404b:	5b                   	pop    %ebx
  10404c:	89 f0                	mov    %esi,%eax
  10404e:	5e                   	pop    %esi
  10404f:	5d                   	pop    %ebp
  104050:	c3                   	ret    
  104051:	31 d2                	xor    %edx,%edx
  104053:	85 db                	test   %ebx,%ebx
  104055:	74 f4                	je     10404b <memmove+0x3b>
  104057:	89 f6                	mov    %esi,%esi
  104059:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  104060:	0f b6 04 0a          	movzbl (%edx,%ecx,1),%eax
  104064:	88 04 32             	mov    %al,(%edx,%esi,1)
  104067:	42                   	inc    %edx
  104068:	39 d3                	cmp    %edx,%ebx
  10406a:	75 f4                	jne    104060 <memmove+0x50>
  10406c:	5b                   	pop    %ebx
  10406d:	89 f0                	mov    %esi,%eax
  10406f:	5e                   	pop    %esi
  104070:	5d                   	pop    %ebp
  104071:	c3                   	ret    
  104072:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  104079:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00104080 <strncmp>:

int
strncmp(const char *p, const char *q, uint n)
{
  104080:	55                   	push   %ebp
  104081:	89 e5                	mov    %esp,%ebp
  104083:	53                   	push   %ebx
  104084:	8b 4d 10             	mov    0x10(%ebp),%ecx
  104087:	8b 55 08             	mov    0x8(%ebp),%edx
  10408a:	8b 5d 0c             	mov    0xc(%ebp),%ebx
  while(n > 0 && *p && *p == *q)
  10408d:	85 c9                	test   %ecx,%ecx
  10408f:	74 2e                	je     1040bf <strncmp+0x3f>
  104091:	0f b6 02             	movzbl (%edx),%eax
  104094:	84 c0                	test   %al,%al
  104096:	75 15                	jne    1040ad <strncmp+0x2d>
  104098:	eb 18                	jmp    1040b2 <strncmp+0x32>
  10409a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1040a0:	49                   	dec    %ecx
  1040a1:	74 1c                	je     1040bf <strncmp+0x3f>
  1040a3:	0f b6 42 01          	movzbl 0x1(%edx),%eax
    n--, p++, q++;
  1040a7:	43                   	inc    %ebx
  1040a8:	84 c0                	test   %al,%al
  1040aa:	74 06                	je     1040b2 <strncmp+0x32>
  1040ac:	42                   	inc    %edx
  1040ad:	3a 03                	cmp    (%ebx),%al
  1040af:	90                   	nop    
  1040b0:	74 ee                	je     1040a0 <strncmp+0x20>
  if(n == 0)
    return 0;
  return (uchar)*p - (uchar)*q;
  1040b2:	0f b6 d0             	movzbl %al,%edx
  1040b5:	0f b6 03             	movzbl (%ebx),%eax
}
  1040b8:	5b                   	pop    %ebx
  1040b9:	5d                   	pop    %ebp
  1040ba:	29 c2                	sub    %eax,%edx
  1040bc:	89 d0                	mov    %edx,%eax
  1040be:	c3                   	ret    
  1040bf:	5b                   	pop    %ebx
  1040c0:	31 d2                	xor    %edx,%edx
  1040c2:	89 d0                	mov    %edx,%eax
  1040c4:	5d                   	pop    %ebp
  1040c5:	c3                   	ret    
  1040c6:	8d 76 00             	lea    0x0(%esi),%esi
  1040c9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

001040d0 <strncpy>:

char*
strncpy(char *s, const char *t, int n)
{
  1040d0:	55                   	push   %ebp
  1040d1:	89 e5                	mov    %esp,%ebp
  1040d3:	56                   	push   %esi
  1040d4:	8b 75 08             	mov    0x8(%ebp),%esi
  1040d7:	53                   	push   %ebx
  1040d8:	8b 4d 10             	mov    0x10(%ebp),%ecx
  1040db:	8b 5d 0c             	mov    0xc(%ebp),%ebx
  1040de:	89 f2                	mov    %esi,%edx
  1040e0:	eb 01                	jmp    1040e3 <strncpy+0x13>
  char *os;
  
  os = s;
  while(n-- > 0 && (*s++ = *t++) != 0)
  1040e2:	43                   	inc    %ebx
  1040e3:	49                   	dec    %ecx
  1040e4:	8d 41 01             	lea    0x1(%ecx),%eax
  1040e7:	85 c0                	test   %eax,%eax
  1040e9:	7e 0a                	jle    1040f5 <strncpy+0x25>
  1040eb:	0f b6 03             	movzbl (%ebx),%eax
  1040ee:	88 02                	mov    %al,(%edx)
  1040f0:	42                   	inc    %edx
  1040f1:	84 c0                	test   %al,%al
  1040f3:	75 ed                	jne    1040e2 <strncpy+0x12>
    ;
  while(n-- > 0)
  1040f5:	85 c9                	test   %ecx,%ecx
  1040f7:	7e 0f                	jle    104108 <strncpy+0x38>
  1040f9:	8d 04 0a             	lea    (%edx,%ecx,1),%eax
  1040fc:	8d 74 26 00          	lea    0x0(%esi),%esi
    *s++ = 0;
  104100:	c6 02 00             	movb   $0x0,(%edx)
  104103:	42                   	inc    %edx
  104104:	39 d0                	cmp    %edx,%eax
  104106:	75 f8                	jne    104100 <strncpy+0x30>
  return os;
}
  104108:	5b                   	pop    %ebx
  104109:	89 f0                	mov    %esi,%eax
  10410b:	5e                   	pop    %esi
  10410c:	5d                   	pop    %ebp
  10410d:	c3                   	ret    
  10410e:	89 f6                	mov    %esi,%esi

00104110 <safestrcpy>:

// Like strncpy but guaranteed to NUL-terminate.
char*
safestrcpy(char *s, const char *t, int n)
{
  104110:	55                   	push   %ebp
  104111:	89 e5                	mov    %esp,%ebp
  104113:	8b 4d 10             	mov    0x10(%ebp),%ecx
  104116:	56                   	push   %esi
  104117:	8b 75 08             	mov    0x8(%ebp),%esi
  10411a:	53                   	push   %ebx
  10411b:	8b 5d 0c             	mov    0xc(%ebp),%ebx
  char *os;
  
  os = s;
  if(n <= 0)
  10411e:	85 c9                	test   %ecx,%ecx
  104120:	7e 15                	jle    104137 <safestrcpy+0x27>
  104122:	89 f2                	mov    %esi,%edx
  104124:	eb 01                	jmp    104127 <safestrcpy+0x17>
    return os;
  while(--n > 0 && (*s++ = *t++) != 0)
  104126:	43                   	inc    %ebx
  104127:	49                   	dec    %ecx
  104128:	74 0a                	je     104134 <safestrcpy+0x24>
  10412a:	0f b6 03             	movzbl (%ebx),%eax
  10412d:	88 02                	mov    %al,(%edx)
  10412f:	42                   	inc    %edx
  104130:	84 c0                	test   %al,%al
  104132:	75 f2                	jne    104126 <safestrcpy+0x16>
    ;
  *s = 0;
  104134:	c6 02 00             	movb   $0x0,(%edx)
  return os;
}
  104137:	5b                   	pop    %ebx
  104138:	89 f0                	mov    %esi,%eax
  10413a:	5e                   	pop    %esi
  10413b:	5d                   	pop    %ebp
  10413c:	c3                   	ret    
  10413d:	8d 76 00             	lea    0x0(%esi),%esi

00104140 <strlen>:

int
strlen(const char *s)
{
  104140:	55                   	push   %ebp
  int n;

  for(n = 0; s[n]; n++)
  104141:	31 c0                	xor    %eax,%eax
  104143:	89 e5                	mov    %esp,%ebp
  104145:	8b 55 08             	mov    0x8(%ebp),%edx
  104148:	80 3a 00             	cmpb   $0x0,(%edx)
  10414b:	74 0a                	je     104157 <strlen+0x17>
  10414d:	8d 76 00             	lea    0x0(%esi),%esi
  104150:	40                   	inc    %eax
  104151:	80 3c 10 00          	cmpb   $0x0,(%eax,%edx,1)
  104155:	75 f9                	jne    104150 <strlen+0x10>
    ;
  return n;
}
  104157:	5d                   	pop    %ebp
  104158:	c3                   	ret    
  104159:	90                   	nop    
  10415a:	90                   	nop    
  10415b:	90                   	nop    

0010415c <swtch>:
  10415c:	8b 44 24 04          	mov    0x4(%esp),%eax
  104160:	8f 00                	popl   (%eax)
  104162:	89 60 04             	mov    %esp,0x4(%eax)
  104165:	89 58 08             	mov    %ebx,0x8(%eax)
  104168:	89 48 0c             	mov    %ecx,0xc(%eax)
  10416b:	89 50 10             	mov    %edx,0x10(%eax)
  10416e:	89 70 14             	mov    %esi,0x14(%eax)
  104171:	89 78 18             	mov    %edi,0x18(%eax)
  104174:	89 68 1c             	mov    %ebp,0x1c(%eax)
  104177:	8b 44 24 04          	mov    0x4(%esp),%eax
  10417b:	8b 68 1c             	mov    0x1c(%eax),%ebp
  10417e:	8b 78 18             	mov    0x18(%eax),%edi
  104181:	8b 70 14             	mov    0x14(%eax),%esi
  104184:	8b 50 10             	mov    0x10(%eax),%edx
  104187:	8b 48 0c             	mov    0xc(%eax),%ecx
  10418a:	8b 58 08             	mov    0x8(%eax),%ebx
  10418d:	8b 60 04             	mov    0x4(%eax),%esp
  104190:	ff 30                	pushl  (%eax)
  104192:	c3                   	ret    
  104193:	90                   	nop    
  104194:	90                   	nop    
  104195:	90                   	nop    
  104196:	90                   	nop    
  104197:	90                   	nop    
  104198:	90                   	nop    
  104199:	90                   	nop    
  10419a:	90                   	nop    
  10419b:	90                   	nop    
  10419c:	90                   	nop    
  10419d:	90                   	nop    
  10419e:	90                   	nop    
  10419f:	90                   	nop    

001041a0 <fetchint>:

// Fetch the int at addr from process p.
int
fetchint(struct proc *p, uint addr, int *ip)
{
  1041a0:	55                   	push   %ebp
  1041a1:	89 e5                	mov    %esp,%ebp
  1041a3:	53                   	push   %ebx
  1041a4:	8b 5d 08             	mov    0x8(%ebp),%ebx
  1041a7:	8b 4d 0c             	mov    0xc(%ebp),%ecx
  if(addr >= p->sz || addr+4 > p->sz)
  1041aa:	8b 53 04             	mov    0x4(%ebx),%edx
  1041ad:	39 ca                	cmp    %ecx,%edx
  1041af:	77 08                	ja     1041b9 <fetchint+0x19>
    return -1;
  *ip = *(int*)(p->mem + addr);
  return 0;
  1041b1:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
}
  1041b6:	5b                   	pop    %ebx
  1041b7:	5d                   	pop    %ebp
  1041b8:	c3                   	ret    
  1041b9:	8d 41 04             	lea    0x4(%ecx),%eax
  1041bc:	39 c2                	cmp    %eax,%edx
  1041be:	72 f1                	jb     1041b1 <fetchint+0x11>
  1041c0:	8b 03                	mov    (%ebx),%eax
  1041c2:	8b 14 08             	mov    (%eax,%ecx,1),%edx
  1041c5:	8b 45 10             	mov    0x10(%ebp),%eax
  1041c8:	89 10                	mov    %edx,(%eax)
  1041ca:	31 c0                	xor    %eax,%eax
  1041cc:	eb e8                	jmp    1041b6 <fetchint+0x16>
  1041ce:	89 f6                	mov    %esi,%esi

001041d0 <fetchstr>:

// Fetch the nul-terminated string at addr from process p.
// Doesn't actually copy the string - just sets *pp to point at it.
// Returns length of string, not including nul.
int
fetchstr(struct proc *p, uint addr, char **pp)
{
  1041d0:	55                   	push   %ebp
  1041d1:	89 e5                	mov    %esp,%ebp
  1041d3:	8b 55 08             	mov    0x8(%ebp),%edx
  1041d6:	53                   	push   %ebx
  1041d7:	8b 45 0c             	mov    0xc(%ebp),%eax
  char *s, *ep;

  if(addr >= p->sz)
  1041da:	39 42 04             	cmp    %eax,0x4(%edx)
  1041dd:	77 08                	ja     1041e7 <fetchstr+0x17>
    return -1;
  *pp = p->mem + addr;
  ep = p->mem + p->sz;
  for(s = *pp; s < ep; s++)
  1041df:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
    if(*s == 0)
      return s - *pp;
  return -1;
}
  1041e4:	5b                   	pop    %ebx
  1041e5:	5d                   	pop    %ebp
  1041e6:	c3                   	ret    
  1041e7:	8b 0a                	mov    (%edx),%ecx
  1041e9:	89 c3                	mov    %eax,%ebx
  1041eb:	8b 45 10             	mov    0x10(%ebp),%eax
  1041ee:	01 cb                	add    %ecx,%ebx
  1041f0:	8b 4a 04             	mov    0x4(%edx),%ecx
  1041f3:	89 18                	mov    %ebx,(%eax)
  1041f5:	8b 02                	mov    (%edx),%eax
  1041f7:	01 c1                	add    %eax,%ecx
  1041f9:	39 cb                	cmp    %ecx,%ebx
  1041fb:	73 e2                	jae    1041df <fetchstr+0xf>
  1041fd:	31 c0                	xor    %eax,%eax
  1041ff:	80 3b 00             	cmpb   $0x0,(%ebx)
  104202:	74 e0                	je     1041e4 <fetchstr+0x14>
  104204:	89 d8                	mov    %ebx,%eax
  104206:	8d 76 00             	lea    0x0(%esi),%esi
  104209:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi
  104210:	40                   	inc    %eax
  104211:	39 c8                	cmp    %ecx,%eax
  104213:	74 ca                	je     1041df <fetchstr+0xf>
  104215:	80 38 00             	cmpb   $0x0,(%eax)
  104218:	75 f6                	jne    104210 <fetchstr+0x40>
  10421a:	29 d8                	sub    %ebx,%eax
  10421c:	eb c6                	jmp    1041e4 <fetchstr+0x14>
  10421e:	89 f6                	mov    %esi,%esi

00104220 <argint>:

// Fetch the nth 32-bit system call argument.
int
argint(int n, int *ip)
{
  104220:	55                   	push   %ebp
  104221:	89 e5                	mov    %esp,%ebp
  104223:	53                   	push   %ebx
  104224:	83 ec 14             	sub    $0x14,%esp
  return fetchint(cp, cp->tf->esp + 4 + 4*n, ip);
  104227:	e8 94 f0 ff ff       	call   1032c0 <curproc>
  10422c:	8b 5d 08             	mov    0x8(%ebp),%ebx
  10422f:	8b 80 84 00 00 00    	mov    0x84(%eax),%eax
  104235:	8b 40 3c             	mov    0x3c(%eax),%eax
  104238:	83 c0 04             	add    $0x4,%eax
  10423b:	8d 1c 98             	lea    (%eax,%ebx,4),%ebx
  10423e:	e8 7d f0 ff ff       	call   1032c0 <curproc>
  104243:	8b 55 0c             	mov    0xc(%ebp),%edx
  104246:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  10424a:	89 54 24 08          	mov    %edx,0x8(%esp)
  10424e:	89 04 24             	mov    %eax,(%esp)
  104251:	e8 4a ff ff ff       	call   1041a0 <fetchint>
}
  104256:	83 c4 14             	add    $0x14,%esp
  104259:	5b                   	pop    %ebx
  10425a:	5d                   	pop    %ebp
  10425b:	c3                   	ret    
  10425c:	8d 74 26 00          	lea    0x0(%esi),%esi

00104260 <argstr>:

// Fetch the nth word-sized system call argument as a pointer
// to a block of memory of size n bytes.  Check that the pointer
// lies within the process address space.
int
argptr(int n, char **pp, int size)
{
  int i;
  
  if(argint(n, &i) < 0)
    return -1;
  if((uint)i >= cp->sz || (uint)i+size >= cp->sz)
    return -1;
  *pp = cp->mem + i;
  return 0;
}

// Fetch the nth word-sized system call argument as a string pointer.
// Check that the pointer is valid and the string is nul-terminated.
// (There is no shared writable memory, so the string can't change
// between this check and being used by the kernel.)
int
argstr(int n, char **pp)
{
  104260:	55                   	push   %ebp
  104261:	89 e5                	mov    %esp,%ebp
  104263:	53                   	push   %ebx
  104264:	83 ec 24             	sub    $0x24,%esp
  int addr;
  if(argint(n, &addr) < 0)
  104267:	8d 45 f8             	lea    0xfffffff8(%ebp),%eax
  10426a:	89 44 24 04          	mov    %eax,0x4(%esp)
  10426e:	8b 45 08             	mov    0x8(%ebp),%eax
  104271:	89 04 24             	mov    %eax,(%esp)
  104274:	e8 a7 ff ff ff       	call   104220 <argint>
  104279:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  10427e:	85 c0                	test   %eax,%eax
  104280:	78 1d                	js     10429f <argstr+0x3f>
    return -1;
  return fetchstr(cp, addr, pp);
  104282:	8b 5d f8             	mov    0xfffffff8(%ebp),%ebx
  104285:	e8 36 f0 ff ff       	call   1032c0 <curproc>
  10428a:	8b 55 0c             	mov    0xc(%ebp),%edx
  10428d:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  104291:	89 54 24 08          	mov    %edx,0x8(%esp)
  104295:	89 04 24             	mov    %eax,(%esp)
  104298:	e8 33 ff ff ff       	call   1041d0 <fetchstr>
  10429d:	89 c2                	mov    %eax,%edx
}
  10429f:	83 c4 24             	add    $0x24,%esp
  1042a2:	89 d0                	mov    %edx,%eax
  1042a4:	5b                   	pop    %ebx
  1042a5:	5d                   	pop    %ebp
  1042a6:	c3                   	ret    
  1042a7:	89 f6                	mov    %esi,%esi
  1042a9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

001042b0 <argptr>:
  1042b0:	55                   	push   %ebp
  1042b1:	89 e5                	mov    %esp,%ebp
  1042b3:	83 ec 28             	sub    $0x28,%esp
  1042b6:	8d 45 f4             	lea    0xfffffff4(%ebp),%eax
  1042b9:	89 44 24 04          	mov    %eax,0x4(%esp)
  1042bd:	8b 45 08             	mov    0x8(%ebp),%eax
  1042c0:	89 75 fc             	mov    %esi,0xfffffffc(%ebp)
  1042c3:	8b 75 10             	mov    0x10(%ebp),%esi
  1042c6:	89 5d f8             	mov    %ebx,0xfffffff8(%ebp)
  1042c9:	89 04 24             	mov    %eax,(%esp)
  1042cc:	e8 4f ff ff ff       	call   104220 <argint>
  1042d1:	85 c0                	test   %eax,%eax
  1042d3:	79 0f                	jns    1042e4 <argptr+0x34>
  1042d5:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1042da:	8b 5d f8             	mov    0xfffffff8(%ebp),%ebx
  1042dd:	8b 75 fc             	mov    0xfffffffc(%ebp),%esi
  1042e0:	89 ec                	mov    %ebp,%esp
  1042e2:	5d                   	pop    %ebp
  1042e3:	c3                   	ret    
  1042e4:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  1042e7:	e8 d4 ef ff ff       	call   1032c0 <curproc>
  1042ec:	3b 58 04             	cmp    0x4(%eax),%ebx
  1042ef:	73 e4                	jae    1042d5 <argptr+0x25>
  1042f1:	8b 45 f4             	mov    0xfffffff4(%ebp),%eax
  1042f4:	01 c6                	add    %eax,%esi
  1042f6:	e8 c5 ef ff ff       	call   1032c0 <curproc>
  1042fb:	3b 70 04             	cmp    0x4(%eax),%esi
  1042fe:	73 d5                	jae    1042d5 <argptr+0x25>
  104300:	e8 bb ef ff ff       	call   1032c0 <curproc>
  104305:	8b 55 f4             	mov    0xfffffff4(%ebp),%edx
  104308:	8b 18                	mov    (%eax),%ebx
  10430a:	8b 45 0c             	mov    0xc(%ebp),%eax
  10430d:	01 da                	add    %ebx,%edx
  10430f:	89 10                	mov    %edx,(%eax)
  104311:	31 c0                	xor    %eax,%eax
  104313:	eb c5                	jmp    1042da <argptr+0x2a>
  104315:	8d 74 26 00          	lea    0x0(%esi),%esi
  104319:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00104320 <syscall>:

extern int sys_chdir(void);
extern int sys_close(void);
extern int sys_dup(void);
extern int sys_exec(void);
extern int sys_exit(void);
extern int sys_fork(void);
extern int sys_fstat(void);
extern int sys_getpid(void);
extern int sys_kill(void);
extern int sys_link(void);
extern int sys_mkdir(void);
extern int sys_mknod(void);
extern int sys_open(void);
extern int sys_pipe(void);
extern int sys_read(void);
extern int sys_sbrk(void);
extern int sys_sleep(void);
extern int sys_unlink(void);
extern int sys_wait(void);
extern int sys_write(void);

static int (*syscalls[])(void) = {
[SYS_chdir]   sys_chdir,
[SYS_close]   sys_close,
[SYS_dup]     sys_dup,
[SYS_exec]    sys_exec,
[SYS_exit]    sys_exit,
[SYS_fork]    sys_fork,
[SYS_fstat]   sys_fstat,
[SYS_getpid]  sys_getpid,
[SYS_kill]    sys_kill,
[SYS_link]    sys_link,
[SYS_mkdir]   sys_mkdir,
[SYS_mknod]   sys_mknod,
[SYS_open]    sys_open,
[SYS_pipe]    sys_pipe,
[SYS_read]    sys_read,
[SYS_sbrk]    sys_sbrk,
[SYS_sleep]   sys_sleep,
[SYS_unlink]  sys_unlink,
[SYS_wait]    sys_wait,
[SYS_write]   sys_write,
};

void
syscall(void)
{
  104320:	55                   	push   %ebp
  104321:	89 e5                	mov    %esp,%ebp
  104323:	83 ec 18             	sub    $0x18,%esp
  104326:	89 5d f8             	mov    %ebx,0xfffffff8(%ebp)
  104329:	89 75 fc             	mov    %esi,0xfffffffc(%ebp)
  int num;
  
  num = cp->tf->eax;
  10432c:	e8 8f ef ff ff       	call   1032c0 <curproc>
  104331:	8b 80 84 00 00 00    	mov    0x84(%eax),%eax
  104337:	8b 58 1c             	mov    0x1c(%eax),%ebx
  if(num >= 0 && num < NELEM(syscalls) && syscalls[num])
  10433a:	83 fb 14             	cmp    $0x14,%ebx
  10433d:	77 25                	ja     104364 <syscall+0x44>
  10433f:	8b 34 9d 00 64 10 00 	mov    0x106400(,%ebx,4),%esi
  104346:	85 f6                	test   %esi,%esi
  104348:	74 1a                	je     104364 <syscall+0x44>
    cp->tf->eax = syscalls[num]();
  10434a:	e8 71 ef ff ff       	call   1032c0 <curproc>
  10434f:	8b 98 84 00 00 00    	mov    0x84(%eax),%ebx
  104355:	ff d6                	call   *%esi
  104357:	89 43 1c             	mov    %eax,0x1c(%ebx)
  else {
    cprintf("%d %s: unknown sys call %d\n",
            cp->pid, cp->name, num);
    cp->tf->eax = -1;
  }
}
  10435a:	8b 5d f8             	mov    0xfffffff8(%ebp),%ebx
  10435d:	8b 75 fc             	mov    0xfffffffc(%ebp),%esi
  104360:	89 ec                	mov    %ebp,%esp
  104362:	5d                   	pop    %ebp
  104363:	c3                   	ret    
  104364:	e8 57 ef ff ff       	call   1032c0 <curproc>
  104369:	89 c6                	mov    %eax,%esi
  10436b:	e8 50 ef ff ff       	call   1032c0 <curproc>
  104370:	8d 96 88 00 00 00    	lea    0x88(%esi),%edx
  104376:	89 5c 24 0c          	mov    %ebx,0xc(%esp)
  10437a:	89 54 24 08          	mov    %edx,0x8(%esp)
  10437e:	8b 40 10             	mov    0x10(%eax),%eax
  104381:	c7 04 24 ce 63 10 00 	movl   $0x1063ce,(%esp)
  104388:	89 44 24 04          	mov    %eax,0x4(%esp)
  10438c:	e8 9f c3 ff ff       	call   100730 <cprintf>
  104391:	e8 2a ef ff ff       	call   1032c0 <curproc>
  104396:	8b 80 84 00 00 00    	mov    0x84(%eax),%eax
  10439c:	c7 40 1c ff ff ff ff 	movl   $0xffffffff,0x1c(%eax)
  1043a3:	8b 5d f8             	mov    0xfffffff8(%ebp),%ebx
  1043a6:	8b 75 fc             	mov    0xfffffffc(%ebp),%esi
  1043a9:	89 ec                	mov    %ebp,%esp
  1043ab:	5d                   	pop    %ebp
  1043ac:	c3                   	ret    
  1043ad:	90                   	nop    
  1043ae:	90                   	nop    
  1043af:	90                   	nop    

001043b0 <fdalloc>:
// Allocate a file descriptor for the given file.
// Takes over file reference from caller on success.
static int
fdalloc(struct file *f)
{
  1043b0:	55                   	push   %ebp
  1043b1:	89 e5                	mov    %esp,%ebp
  1043b3:	56                   	push   %esi
  1043b4:	89 c6                	mov    %eax,%esi
  1043b6:	53                   	push   %ebx
  1043b7:	31 db                	xor    %ebx,%ebx
  1043b9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  int fd;

  for(fd = 0; fd < NOFILE; fd++){
    if(cp->ofile[fd] == 0){
  1043c0:	e8 fb ee ff ff       	call   1032c0 <curproc>
  1043c5:	8b 44 98 20          	mov    0x20(%eax,%ebx,4),%eax
  1043c9:	85 c0                	test   %eax,%eax
  1043cb:	74 11                	je     1043de <fdalloc+0x2e>
  1043cd:	43                   	inc    %ebx
  1043ce:	83 fb 10             	cmp    $0x10,%ebx
  1043d1:	75 ed                	jne    1043c0 <fdalloc+0x10>
  1043d3:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
      cp->ofile[fd] = f;
      return fd;
    }
  }
  return -1;
}
  1043d8:	89 d8                	mov    %ebx,%eax
  1043da:	5b                   	pop    %ebx
  1043db:	5e                   	pop    %esi
  1043dc:	5d                   	pop    %ebp
  1043dd:	c3                   	ret    
  1043de:	e8 dd ee ff ff       	call   1032c0 <curproc>
  1043e3:	89 74 98 20          	mov    %esi,0x20(%eax,%ebx,4)
  1043e7:	89 d8                	mov    %ebx,%eax
  1043e9:	5b                   	pop    %ebx
  1043ea:	5e                   	pop    %esi
  1043eb:	5d                   	pop    %ebp
  1043ec:	c3                   	ret    
  1043ed:	8d 76 00             	lea    0x0(%esi),%esi

001043f0 <sys_pipe>:

int
sys_read(void)
{
  struct file *f;
  int n;
  char *p;

  if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
    return -1;
  return fileread(f, p, n);
}

int
sys_write(void)
{
  struct file *f;
  int n;
  char *p;

  if(argfd(0, 0, &f) < 0 || argint(2, &n) < 0 || argptr(1, &p, n) < 0)
    return -1;
  return filewrite(f, p, n);
}

int
sys_dup(void)
{
  struct file *f;
  int fd;
  
  if(argfd(0, 0, &f) < 0)
    return -1;
  if((fd=fdalloc(f)) < 0)
    return -1;
  filedup(f);
  return fd;
}

int
sys_close(void)
{
  int fd;
  struct file *f;
  
  if(argfd(0, &fd, &f) < 0)
    return -1;
  cp->ofile[fd] = 0;
  fileclose(f);
  return 0;
}

int
sys_fstat(void)
{
  struct file *f;
  struct stat *st;
  
  if(argfd(0, 0, &f) < 0 || argptr(1, (void*)&st, sizeof(*st)) < 0)
    return -1;
  return filestat(f, st);
}

// Create the path new as a link to the same inode as old.
int
sys_link(void)
{
  char name[DIRSIZ], *new, *old;
  struct inode *dp, *ip;

  if(argstr(0, &old) < 0 || argstr(1, &new) < 0)
    return -1;
  if((ip = namei(old)) == 0)
    return -1;
  ilock(ip);
  if(ip->type == T_DIR){
    iunlockput(ip);
    return -1;
  }
  ip->nlink++;
  iupdate(ip);
  iunlock(ip);

  if((dp = nameiparent(new, name)) == 0)
    goto  bad;
  ilock(dp);
  if(dp->dev != ip->dev || dirlink(dp, name, ip->inum) < 0)
    goto bad;
  iunlockput(dp);
  iput(ip);
  return 0;

bad:
  if(dp)
    iunlockput(dp);
  ilock(ip);
  ip->nlink--;
  iupdate(ip);
  iunlockput(ip);
  return -1;
}

// Is the directory dp empty except for "." and ".." ?
static int
isdirempty(struct inode *dp)
{
  int off;
  struct dirent de;

  for(off=2*sizeof(de); off<dp->size; off+=sizeof(de)){
    if(readi(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
      panic("isdirempty: readi");
    if(de.inum != 0)
      return 0;
  }
  return 1;
}

int
sys_unlink(void)
{
  struct inode *ip, *dp;
  struct dirent de;
  char name[DIRSIZ], *path;
  uint off;

  if(argstr(0, &path) < 0)
    return -1;
  if((dp = nameiparent(path, name)) == 0)
    return -1;
  ilock(dp);

  // Cannot unlink "." or "..".
  if(namecmp(name, ".") == 0 || namecmp(name, "..") == 0){
    iunlockput(dp);
    return -1;
  }

  if((ip = dirlookup(dp, name, &off)) == 0){
    iunlockput(dp);
    return -1;
  }
  ilock(ip);

  if(ip->nlink < 1)
    panic("unlink: nlink < 1");
  if(ip->type == T_DIR && !isdirempty(ip)){
    iunlockput(ip);
    iunlockput(dp);
    return -1;
  }

  memset(&de, 0, sizeof(de));
  if(writei(dp, (char*)&de, off, sizeof(de)) != sizeof(de))
    panic("unlink: writei");
  iunlockput(dp);

  ip->nlink--;
  iupdate(ip);
  iunlockput(ip);
  return 0;
}

static struct inode*
create(char *path, int canexist, short type, short major, short minor)
{
  uint off;
  struct inode *ip, *dp;
  char name[DIRSIZ];

  if((dp = nameiparent(path, name)) == 0)
    return 0;
  ilock(dp);

  if(canexist && (ip = dirlookup(dp, name, &off)) != 0){
    iunlockput(dp);
    ilock(ip);
    if(ip->type != type || ip->major != major || ip->minor != minor){
      iunlockput(ip);
      return 0;
    }
    return ip;
  }

  if((ip = ialloc(dp->dev, type)) == 0){
    iunlockput(dp);
    return 0;
  }
  ilock(ip);
  ip->major = major;
  ip->minor = minor;
  ip->nlink = 1;
  iupdate(ip);
  
  if(dirlink(dp, name, ip->inum) < 0){
    ip->nlink = 0;
    iunlockput(ip);
    iunlockput(dp);
    return 0;
  }

  if(type == T_DIR){  // Create . and .. entries.
    dp->nlink++;  // for ".."
    iupdate(dp);
    // No ip->nlink++ for ".": avoid cyclic ref count.
    if(dirlink(ip, ".", ip->inum) < 0 || dirlink(ip, "..", dp->inum) < 0)
      panic("create dots");
  }
  iunlockput(dp);
  return ip;
}

int
sys_open(void)
{
  char *path;
  int fd, omode;
  struct file *f;
  struct inode *ip;

  if(argstr(0, &path) < 0 || argint(1, &omode) < 0)
    return -1;

  if(omode & O_CREATE){
    if((ip = create(path, 1, T_FILE, 0, 0)) == 0)
      return -1;
  } else {
    if((ip = namei(path)) == 0)
      return -1;
    ilock(ip);
    if(ip->type == T_DIR && (omode & (O_RDWR|O_WRONLY))){
      iunlockput(ip);
      return -1;
    }
  }

  if((f = filealloc()) == 0 || (fd = fdalloc(f)) < 0){
    if(f)
      fileclose(f);
    iunlockput(ip);
    return -1;
  }
  iunlock(ip);

  f->type = FD_INODE;
  f->ip = ip;
  f->off = 0;
  f->readable = !(omode & O_WRONLY);
  f->writable = (omode & O_WRONLY) || (omode & O_RDWR);

  return fd;
}

int
sys_mknod(void)
{
  struct inode *ip;
  char *path;
  int len;
  int major, minor;
  
  if((len=argstr(0, &path)) < 0 ||
     argint(1, &major) < 0 ||
     argint(2, &minor) < 0 ||
     (ip = create(path, 0, T_DEV, major, minor)) == 0)
    return -1;
  iunlockput(ip);
  return 0;
}

int
sys_mkdir(void)
{
  char *path;
  struct inode *ip;

  if(argstr(0, &path) < 0 || (ip = create(path, 0, T_DIR, 0, 0)) == 0)
    return -1;
  iunlockput(ip);
  return 0;
}

int
sys_chdir(void)
{
  char *path;
  struct inode *ip;

  if(argstr(0, &path) < 0 || (ip = namei(path)) == 0)
    return -1;
  ilock(ip);
  if(ip->type != T_DIR){
    iunlockput(ip);
    return -1;
  }
  iunlock(ip);
  iput(cp->cwd);
  cp->cwd = ip;
  return 0;
}

int
sys_exec(void)
{
  char *path, *argv[20];
  int i;
  uint uargv, uarg;

  if(argstr(0, &path) < 0 || argint(1, (int*)&uargv) < 0)
    return -1;
  memset(argv, 0, sizeof(argv));
  for(i=0;; i++){
    if(i >= NELEM(argv))
      return -1;
    if(fetchint(cp, uargv+4*i, (int*)&uarg) < 0)
      return -1;
    if(uarg == 0){
      argv[i] = 0;
      break;
    }
    if(fetchstr(cp, uarg, &argv[i]) < 0)
      return -1;
  }
  return exec(path, argv);
}

int
sys_pipe(void)
{
  1043f0:	55                   	push   %ebp
  int *fd;
  struct file *rf, *wf;
  int fd0, fd1;

  if(argptr(0, (void*)&fd, 2*sizeof(fd[0])) < 0)
  1043f1:	b9 08 00 00 00       	mov    $0x8,%ecx
  1043f6:	89 e5                	mov    %esp,%ebp
  1043f8:	53                   	push   %ebx
  1043f9:	83 ec 24             	sub    $0x24,%esp
  1043fc:	8d 45 f8             	lea    0xfffffff8(%ebp),%eax
  1043ff:	89 4c 24 08          	mov    %ecx,0x8(%esp)
  104403:	89 44 24 04          	mov    %eax,0x4(%esp)
  104407:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  10440e:	e8 9d fe ff ff       	call   1042b0 <argptr>
  104413:	85 c0                	test   %eax,%eax
  104415:	79 0b                	jns    104422 <sys_pipe+0x32>
    return -1;
  if(pipealloc(&rf, &wf) < 0)
    return -1;
  fd0 = -1;
  if((fd0 = fdalloc(rf)) < 0 || (fd1 = fdalloc(wf)) < 0){
    if(fd0 >= 0)
      cp->ofile[fd0] = 0;
    fileclose(rf);
    fileclose(wf);
    return -1;
  }
  fd[0] = fd0;
  fd[1] = fd1;
  return 0;
  104417:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
}
  10441c:	83 c4 24             	add    $0x24,%esp
  10441f:	5b                   	pop    %ebx
  104420:	5d                   	pop    %ebp
  104421:	c3                   	ret    
  104422:	8d 45 f0             	lea    0xfffffff0(%ebp),%eax
  104425:	89 44 24 04          	mov    %eax,0x4(%esp)
  104429:	8d 45 f4             	lea    0xfffffff4(%ebp),%eax
  10442c:	89 04 24             	mov    %eax,(%esp)
  10442f:	e8 cc eb ff ff       	call   103000 <pipealloc>
  104434:	85 c0                	test   %eax,%eax
  104436:	78 df                	js     104417 <sys_pipe+0x27>
  104438:	8b 45 f4             	mov    0xfffffff4(%ebp),%eax
  10443b:	e8 70 ff ff ff       	call   1043b0 <fdalloc>
  104440:	85 c0                	test   %eax,%eax
  104442:	89 c3                	mov    %eax,%ebx
  104444:	78 25                	js     10446b <sys_pipe+0x7b>
  104446:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  104449:	e8 62 ff ff ff       	call   1043b0 <fdalloc>
  10444e:	85 c0                	test   %eax,%eax
  104450:	89 c2                	mov    %eax,%edx
  104452:	78 0c                	js     104460 <sys_pipe+0x70>
  104454:	8b 45 f8             	mov    0xfffffff8(%ebp),%eax
  104457:	89 18                	mov    %ebx,(%eax)
  104459:	89 50 04             	mov    %edx,0x4(%eax)
  10445c:	31 c0                	xor    %eax,%eax
  10445e:	eb bc                	jmp    10441c <sys_pipe+0x2c>
  104460:	e8 5b ee ff ff       	call   1032c0 <curproc>
  104465:	31 d2                	xor    %edx,%edx
  104467:	89 54 98 20          	mov    %edx,0x20(%eax,%ebx,4)
  10446b:	8b 45 f4             	mov    0xfffffff4(%ebp),%eax
  10446e:	89 04 24             	mov    %eax,(%esp)
  104471:	e8 da ca ff ff       	call   100f50 <fileclose>
  104476:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  104479:	89 04 24             	mov    %eax,(%esp)
  10447c:	e8 cf ca ff ff       	call   100f50 <fileclose>
  104481:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  104486:	eb 94                	jmp    10441c <sys_pipe+0x2c>
  104488:	90                   	nop    
  104489:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00104490 <argfd>:
  104490:	55                   	push   %ebp
  104491:	89 e5                	mov    %esp,%ebp
  104493:	83 ec 28             	sub    $0x28,%esp
  104496:	89 5d f8             	mov    %ebx,0xfffffff8(%ebp)
  104499:	89 d3                	mov    %edx,%ebx
  10449b:	8d 55 f4             	lea    0xfffffff4(%ebp),%edx
  10449e:	89 75 fc             	mov    %esi,0xfffffffc(%ebp)
  1044a1:	89 ce                	mov    %ecx,%esi
  1044a3:	89 54 24 04          	mov    %edx,0x4(%esp)
  1044a7:	89 04 24             	mov    %eax,(%esp)
  1044aa:	e8 71 fd ff ff       	call   104220 <argint>
  1044af:	85 c0                	test   %eax,%eax
  1044b1:	79 0f                	jns    1044c2 <argfd+0x32>
  1044b3:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1044b8:	8b 5d f8             	mov    0xfffffff8(%ebp),%ebx
  1044bb:	8b 75 fc             	mov    0xfffffffc(%ebp),%esi
  1044be:	89 ec                	mov    %ebp,%esp
  1044c0:	5d                   	pop    %ebp
  1044c1:	c3                   	ret    
  1044c2:	83 7d f4 0f          	cmpl   $0xf,0xfffffff4(%ebp)
  1044c6:	77 eb                	ja     1044b3 <argfd+0x23>
  1044c8:	e8 f3 ed ff ff       	call   1032c0 <curproc>
  1044cd:	8b 55 f4             	mov    0xfffffff4(%ebp),%edx
  1044d0:	8b 4c 90 20          	mov    0x20(%eax,%edx,4),%ecx
  1044d4:	85 c9                	test   %ecx,%ecx
  1044d6:	74 db                	je     1044b3 <argfd+0x23>
  1044d8:	85 db                	test   %ebx,%ebx
  1044da:	74 02                	je     1044de <argfd+0x4e>
  1044dc:	89 13                	mov    %edx,(%ebx)
  1044de:	31 c0                	xor    %eax,%eax
  1044e0:	85 f6                	test   %esi,%esi
  1044e2:	74 d4                	je     1044b8 <argfd+0x28>
  1044e4:	89 0e                	mov    %ecx,(%esi)
  1044e6:	eb d0                	jmp    1044b8 <argfd+0x28>
  1044e8:	90                   	nop    
  1044e9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

001044f0 <sys_close>:
  1044f0:	55                   	push   %ebp
  1044f1:	31 c0                	xor    %eax,%eax
  1044f3:	89 e5                	mov    %esp,%ebp
  1044f5:	83 ec 18             	sub    $0x18,%esp
  1044f8:	8d 55 fc             	lea    0xfffffffc(%ebp),%edx
  1044fb:	8d 4d f8             	lea    0xfffffff8(%ebp),%ecx
  1044fe:	e8 8d ff ff ff       	call   104490 <argfd>
  104503:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  104508:	85 c0                	test   %eax,%eax
  10450a:	78 1b                	js     104527 <sys_close+0x37>
  10450c:	e8 af ed ff ff       	call   1032c0 <curproc>
  104511:	8b 55 fc             	mov    0xfffffffc(%ebp),%edx
  104514:	31 c9                	xor    %ecx,%ecx
  104516:	89 4c 90 20          	mov    %ecx,0x20(%eax,%edx,4)
  10451a:	8b 45 f8             	mov    0xfffffff8(%ebp),%eax
  10451d:	89 04 24             	mov    %eax,(%esp)
  104520:	e8 2b ca ff ff       	call   100f50 <fileclose>
  104525:	31 d2                	xor    %edx,%edx
  104527:	c9                   	leave  
  104528:	89 d0                	mov    %edx,%eax
  10452a:	c3                   	ret    
  10452b:	90                   	nop    
  10452c:	8d 74 26 00          	lea    0x0(%esi),%esi

00104530 <sys_exec>:
  104530:	55                   	push   %ebp
  104531:	89 e5                	mov    %esp,%ebp
  104533:	83 ec 78             	sub    $0x78,%esp
  104536:	8d 45 f0             	lea    0xfffffff0(%ebp),%eax
  104539:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  10453c:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  10453f:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  104542:	89 44 24 04          	mov    %eax,0x4(%esp)
  104546:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  10454d:	e8 0e fd ff ff       	call   104260 <argstr>
  104552:	85 c0                	test   %eax,%eax
  104554:	79 12                	jns    104568 <sys_exec+0x38>
  104556:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  10455b:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  10455e:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  104561:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  104564:	89 ec                	mov    %ebp,%esp
  104566:	5d                   	pop    %ebp
  104567:	c3                   	ret    
  104568:	8d 45 ec             	lea    0xffffffec(%ebp),%eax
  10456b:	89 44 24 04          	mov    %eax,0x4(%esp)
  10456f:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  104576:	e8 a5 fc ff ff       	call   104220 <argint>
  10457b:	85 c0                	test   %eax,%eax
  10457d:	78 d7                	js     104556 <sys_exec+0x26>
  10457f:	b8 50 00 00 00       	mov    $0x50,%eax
  104584:	31 f6                	xor    %esi,%esi
  104586:	89 44 24 08          	mov    %eax,0x8(%esp)
  10458a:	31 c0                	xor    %eax,%eax
  10458c:	31 ff                	xor    %edi,%edi
  10458e:	89 44 24 04          	mov    %eax,0x4(%esp)
  104592:	8d 45 98             	lea    0xffffff98(%ebp),%eax
  104595:	89 04 24             	mov    %eax,(%esp)
  104598:	e8 e3 f9 ff ff       	call   103f80 <memset>
  10459d:	eb 25                	jmp    1045c4 <sys_exec+0x94>
  10459f:	e8 1c ed ff ff       	call   1032c0 <curproc>
  1045a4:	8d 54 bd 98          	lea    0xffffff98(%ebp,%edi,4),%edx
  1045a8:	89 54 24 08          	mov    %edx,0x8(%esp)
  1045ac:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  1045b0:	89 04 24             	mov    %eax,(%esp)
  1045b3:	e8 18 fc ff ff       	call   1041d0 <fetchstr>
  1045b8:	85 c0                	test   %eax,%eax
  1045ba:	78 9a                	js     104556 <sys_exec+0x26>
  1045bc:	46                   	inc    %esi
  1045bd:	83 fe 14             	cmp    $0x14,%esi
  1045c0:	89 f7                	mov    %esi,%edi
  1045c2:	74 92                	je     104556 <sys_exec+0x26>
  1045c4:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  1045c7:	8d 1c b5 00 00 00 00 	lea    0x0(,%esi,4),%ebx
  1045ce:	01 c3                	add    %eax,%ebx
  1045d0:	e8 eb ec ff ff       	call   1032c0 <curproc>
  1045d5:	8d 55 e8             	lea    0xffffffe8(%ebp),%edx
  1045d8:	89 54 24 08          	mov    %edx,0x8(%esp)
  1045dc:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  1045e0:	89 04 24             	mov    %eax,(%esp)
  1045e3:	e8 b8 fb ff ff       	call   1041a0 <fetchint>
  1045e8:	85 c0                	test   %eax,%eax
  1045ea:	0f 88 66 ff ff ff    	js     104556 <sys_exec+0x26>
  1045f0:	8b 5d e8             	mov    0xffffffe8(%ebp),%ebx
  1045f3:	85 db                	test   %ebx,%ebx
  1045f5:	75 a8                	jne    10459f <sys_exec+0x6f>
  1045f7:	8d 45 98             	lea    0xffffff98(%ebp),%eax
  1045fa:	31 db                	xor    %ebx,%ebx
  1045fc:	89 44 24 04          	mov    %eax,0x4(%esp)
  104600:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  104603:	89 5c b5 98          	mov    %ebx,0xffffff98(%ebp,%esi,4)
  104607:	89 04 24             	mov    %eax,(%esp)
  10460a:	e8 21 c3 ff ff       	call   100930 <exec>
  10460f:	e9 47 ff ff ff       	jmp    10455b <sys_exec+0x2b>
  104614:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  10461a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi

00104620 <sys_chdir>:
  104620:	55                   	push   %ebp
  104621:	89 e5                	mov    %esp,%ebp
  104623:	53                   	push   %ebx
  104624:	83 ec 24             	sub    $0x24,%esp
  104627:	8d 45 f8             	lea    0xfffffff8(%ebp),%eax
  10462a:	89 44 24 04          	mov    %eax,0x4(%esp)
  10462e:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  104635:	e8 26 fc ff ff       	call   104260 <argstr>
  10463a:	85 c0                	test   %eax,%eax
  10463c:	79 0b                	jns    104649 <sys_chdir+0x29>
  10463e:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  104643:	83 c4 24             	add    $0x24,%esp
  104646:	5b                   	pop    %ebx
  104647:	5d                   	pop    %ebp
  104648:	c3                   	ret    
  104649:	8b 45 f8             	mov    0xfffffff8(%ebp),%eax
  10464c:	89 04 24             	mov    %eax,(%esp)
  10464f:	e8 fc d7 ff ff       	call   101e50 <namei>
  104654:	85 c0                	test   %eax,%eax
  104656:	89 c3                	mov    %eax,%ebx
  104658:	74 e4                	je     10463e <sys_chdir+0x1e>
  10465a:	89 04 24             	mov    %eax,(%esp)
  10465d:	e8 5e d5 ff ff       	call   101bc0 <ilock>
  104662:	66 83 7b 10 01       	cmpw   $0x1,0x10(%ebx)
  104667:	75 24                	jne    10468d <sys_chdir+0x6d>
  104669:	89 1c 24             	mov    %ebx,(%esp)
  10466c:	e8 df d4 ff ff       	call   101b50 <iunlock>
  104671:	e8 4a ec ff ff       	call   1032c0 <curproc>
  104676:	8b 40 60             	mov    0x60(%eax),%eax
  104679:	89 04 24             	mov    %eax,(%esp)
  10467c:	e8 9f d2 ff ff       	call   101920 <iput>
  104681:	e8 3a ec ff ff       	call   1032c0 <curproc>
  104686:	89 58 60             	mov    %ebx,0x60(%eax)
  104689:	31 c0                	xor    %eax,%eax
  10468b:	eb b6                	jmp    104643 <sys_chdir+0x23>
  10468d:	89 1c 24             	mov    %ebx,(%esp)
  104690:	e8 0b d5 ff ff       	call   101ba0 <iunlockput>
  104695:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  10469a:	eb a7                	jmp    104643 <sys_chdir+0x23>
  10469c:	8d 74 26 00          	lea    0x0(%esi),%esi

001046a0 <sys_link>:
  1046a0:	55                   	push   %ebp
  1046a1:	89 e5                	mov    %esp,%ebp
  1046a3:	83 ec 38             	sub    $0x38,%esp
  1046a6:	8d 45 ec             	lea    0xffffffec(%ebp),%eax
  1046a9:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  1046ac:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  1046af:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  1046b2:	89 44 24 04          	mov    %eax,0x4(%esp)
  1046b6:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  1046bd:	e8 9e fb ff ff       	call   104260 <argstr>
  1046c2:	85 c0                	test   %eax,%eax
  1046c4:	79 12                	jns    1046d8 <sys_link+0x38>
  1046c6:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1046cb:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  1046ce:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  1046d1:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  1046d4:	89 ec                	mov    %ebp,%esp
  1046d6:	5d                   	pop    %ebp
  1046d7:	c3                   	ret    
  1046d8:	8d 45 f0             	lea    0xfffffff0(%ebp),%eax
  1046db:	89 44 24 04          	mov    %eax,0x4(%esp)
  1046df:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  1046e6:	e8 75 fb ff ff       	call   104260 <argstr>
  1046eb:	85 c0                	test   %eax,%eax
  1046ed:	78 d7                	js     1046c6 <sys_link+0x26>
  1046ef:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  1046f2:	89 04 24             	mov    %eax,(%esp)
  1046f5:	e8 56 d7 ff ff       	call   101e50 <namei>
  1046fa:	85 c0                	test   %eax,%eax
  1046fc:	89 c3                	mov    %eax,%ebx
  1046fe:	74 c6                	je     1046c6 <sys_link+0x26>
  104700:	89 04 24             	mov    %eax,(%esp)
  104703:	e8 b8 d4 ff ff       	call   101bc0 <ilock>
  104708:	66 83 7b 10 01       	cmpw   $0x1,0x10(%ebx)
  10470d:	74 60                	je     10476f <sys_link+0xcf>
  10470f:	0f b7 43 16          	movzwl 0x16(%ebx),%eax
  104713:	8d 7d de             	lea    0xffffffde(%ebp),%edi
  104716:	40                   	inc    %eax
  104717:	66 89 43 16          	mov    %ax,0x16(%ebx)
  10471b:	89 1c 24             	mov    %ebx,(%esp)
  10471e:	e8 ad ca ff ff       	call   1011d0 <iupdate>
  104723:	89 1c 24             	mov    %ebx,(%esp)
  104726:	e8 25 d4 ff ff       	call   101b50 <iunlock>
  10472b:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  10472e:	89 7c 24 04          	mov    %edi,0x4(%esp)
  104732:	89 04 24             	mov    %eax,(%esp)
  104735:	e8 f6 d6 ff ff       	call   101e30 <nameiparent>
  10473a:	85 c0                	test   %eax,%eax
  10473c:	89 c6                	mov    %eax,%esi
  10473e:	74 16                	je     104756 <sys_link+0xb6>
  104740:	89 04 24             	mov    %eax,(%esp)
  104743:	e8 78 d4 ff ff       	call   101bc0 <ilock>
  104748:	8b 06                	mov    (%esi),%eax
  10474a:	3b 03                	cmp    (%ebx),%eax
  10474c:	74 2e                	je     10477c <sys_link+0xdc>
  10474e:	89 34 24             	mov    %esi,(%esp)
  104751:	e8 4a d4 ff ff       	call   101ba0 <iunlockput>
  104756:	89 1c 24             	mov    %ebx,(%esp)
  104759:	e8 62 d4 ff ff       	call   101bc0 <ilock>
  10475e:	0f b7 43 16          	movzwl 0x16(%ebx),%eax
  104762:	48                   	dec    %eax
  104763:	66 89 43 16          	mov    %ax,0x16(%ebx)
  104767:	89 1c 24             	mov    %ebx,(%esp)
  10476a:	e8 61 ca ff ff       	call   1011d0 <iupdate>
  10476f:	89 1c 24             	mov    %ebx,(%esp)
  104772:	e8 29 d4 ff ff       	call   101ba0 <iunlockput>
  104777:	e9 4a ff ff ff       	jmp    1046c6 <sys_link+0x26>
  10477c:	8b 43 04             	mov    0x4(%ebx),%eax
  10477f:	89 7c 24 04          	mov    %edi,0x4(%esp)
  104783:	89 34 24             	mov    %esi,(%esp)
  104786:	89 44 24 08          	mov    %eax,0x8(%esp)
  10478a:	e8 d1 d2 ff ff       	call   101a60 <dirlink>
  10478f:	85 c0                	test   %eax,%eax
  104791:	78 bb                	js     10474e <sys_link+0xae>
  104793:	89 34 24             	mov    %esi,(%esp)
  104796:	e8 05 d4 ff ff       	call   101ba0 <iunlockput>
  10479b:	89 1c 24             	mov    %ebx,(%esp)
  10479e:	e8 7d d1 ff ff       	call   101920 <iput>
  1047a3:	31 c0                	xor    %eax,%eax
  1047a5:	e9 21 ff ff ff       	jmp    1046cb <sys_link+0x2b>
  1047aa:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi

001047b0 <create>:
  1047b0:	55                   	push   %ebp
  1047b1:	0f bf c9             	movswl %cx,%ecx
  1047b4:	89 e5                	mov    %esp,%ebp
  1047b6:	57                   	push   %edi
  1047b7:	89 d7                	mov    %edx,%edi
  1047b9:	56                   	push   %esi
  1047ba:	53                   	push   %ebx
  1047bb:	31 db                	xor    %ebx,%ebx
  1047bd:	83 ec 3c             	sub    $0x3c,%esp
  1047c0:	0f bf 55 08          	movswl 0x8(%ebp),%edx
  1047c4:	89 4d d0             	mov    %ecx,0xffffffd0(%ebp)
  1047c7:	89 55 cc             	mov    %edx,0xffffffcc(%ebp)
  1047ca:	0f bf 55 0c          	movswl 0xc(%ebp),%edx
  1047ce:	89 55 c8             	mov    %edx,0xffffffc8(%ebp)
  1047d1:	8d 55 e2             	lea    0xffffffe2(%ebp),%edx
  1047d4:	89 54 24 04          	mov    %edx,0x4(%esp)
  1047d8:	89 04 24             	mov    %eax,(%esp)
  1047db:	e8 50 d6 ff ff       	call   101e30 <nameiparent>
  1047e0:	85 c0                	test   %eax,%eax
  1047e2:	89 c6                	mov    %eax,%esi
  1047e4:	74 74                	je     10485a <create+0xaa>
  1047e6:	89 04 24             	mov    %eax,(%esp)
  1047e9:	e8 d2 d3 ff ff       	call   101bc0 <ilock>
  1047ee:	85 ff                	test   %edi,%edi
  1047f0:	75 72                	jne    104864 <create+0xb4>
  1047f2:	8b 45 d0             	mov    0xffffffd0(%ebp),%eax
  1047f5:	89 44 24 04          	mov    %eax,0x4(%esp)
  1047f9:	8b 06                	mov    (%esi),%eax
  1047fb:	89 04 24             	mov    %eax,(%esp)
  1047fe:	e8 9d cf ff ff       	call   1017a0 <ialloc>
  104803:	85 c0                	test   %eax,%eax
  104805:	89 c3                	mov    %eax,%ebx
  104807:	74 49                	je     104852 <create+0xa2>
  104809:	89 04 24             	mov    %eax,(%esp)
  10480c:	e8 af d3 ff ff       	call   101bc0 <ilock>
  104811:	8b 55 cc             	mov    0xffffffcc(%ebp),%edx
  104814:	8b 45 c8             	mov    0xffffffc8(%ebp),%eax
  104817:	66 c7 43 16 01 00    	movw   $0x1,0x16(%ebx)
  10481d:	66 89 53 12          	mov    %dx,0x12(%ebx)
  104821:	66 89 43 14          	mov    %ax,0x14(%ebx)
  104825:	89 1c 24             	mov    %ebx,(%esp)
  104828:	e8 a3 c9 ff ff       	call   1011d0 <iupdate>
  10482d:	8b 43 04             	mov    0x4(%ebx),%eax
  104830:	8d 55 e2             	lea    0xffffffe2(%ebp),%edx
  104833:	89 54 24 04          	mov    %edx,0x4(%esp)
  104837:	89 34 24             	mov    %esi,(%esp)
  10483a:	89 44 24 08          	mov    %eax,0x8(%esp)
  10483e:	e8 1d d2 ff ff       	call   101a60 <dirlink>
  104843:	85 c0                	test   %eax,%eax
  104845:	0f 88 dc 00 00 00    	js     104927 <create+0x177>
  10484b:	66 83 7d d0 01       	cmpw   $0x1,0xffffffd0(%ebp)
  104850:	74 6e                	je     1048c0 <create+0x110>
  104852:	89 34 24             	mov    %esi,(%esp)
  104855:	e8 46 d3 ff ff       	call   101ba0 <iunlockput>
  10485a:	83 c4 3c             	add    $0x3c,%esp
  10485d:	89 d8                	mov    %ebx,%eax
  10485f:	5b                   	pop    %ebx
  104860:	5e                   	pop    %esi
  104861:	5f                   	pop    %edi
  104862:	5d                   	pop    %ebp
  104863:	c3                   	ret    
  104864:	8d 45 f0             	lea    0xfffffff0(%ebp),%eax
  104867:	89 44 24 08          	mov    %eax,0x8(%esp)
  10486b:	8d 45 e2             	lea    0xffffffe2(%ebp),%eax
  10486e:	89 44 24 04          	mov    %eax,0x4(%esp)
  104872:	89 34 24             	mov    %esi,(%esp)
  104875:	e8 16 ce ff ff       	call   101690 <dirlookup>
  10487a:	85 c0                	test   %eax,%eax
  10487c:	89 c3                	mov    %eax,%ebx
  10487e:	0f 84 6e ff ff ff    	je     1047f2 <create+0x42>
  104884:	89 34 24             	mov    %esi,(%esp)
  104887:	e8 14 d3 ff ff       	call   101ba0 <iunlockput>
  10488c:	89 1c 24             	mov    %ebx,(%esp)
  10488f:	e8 2c d3 ff ff       	call   101bc0 <ilock>
  104894:	8b 55 d0             	mov    0xffffffd0(%ebp),%edx
  104897:	66 39 53 10          	cmp    %dx,0x10(%ebx)
  10489b:	75 09                	jne    1048a6 <create+0xf6>
  10489d:	8b 45 cc             	mov    0xffffffcc(%ebp),%eax
  1048a0:	66 39 43 12          	cmp    %ax,0x12(%ebx)
  1048a4:	74 73                	je     104919 <create+0x169>
  1048a6:	89 1c 24             	mov    %ebx,(%esp)
  1048a9:	31 db                	xor    %ebx,%ebx
  1048ab:	e8 f0 d2 ff ff       	call   101ba0 <iunlockput>
  1048b0:	83 c4 3c             	add    $0x3c,%esp
  1048b3:	89 d8                	mov    %ebx,%eax
  1048b5:	5b                   	pop    %ebx
  1048b6:	5e                   	pop    %esi
  1048b7:	5f                   	pop    %edi
  1048b8:	5d                   	pop    %ebp
  1048b9:	c3                   	ret    
  1048ba:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  1048c0:	0f b7 46 16          	movzwl 0x16(%esi),%eax
  1048c4:	40                   	inc    %eax
  1048c5:	66 89 46 16          	mov    %ax,0x16(%esi)
  1048c9:	89 34 24             	mov    %esi,(%esp)
  1048cc:	e8 ff c8 ff ff       	call   1011d0 <iupdate>
  1048d1:	8b 43 04             	mov    0x4(%ebx),%eax
  1048d4:	89 1c 24             	mov    %ebx,(%esp)
  1048d7:	89 44 24 08          	mov    %eax,0x8(%esp)
  1048db:	b8 55 64 10 00       	mov    $0x106455,%eax
  1048e0:	89 44 24 04          	mov    %eax,0x4(%esp)
  1048e4:	e8 77 d1 ff ff       	call   101a60 <dirlink>
  1048e9:	85 c0                	test   %eax,%eax
  1048eb:	78 20                	js     10490d <create+0x15d>
  1048ed:	8b 46 04             	mov    0x4(%esi),%eax
  1048f0:	89 1c 24             	mov    %ebx,(%esp)
  1048f3:	89 44 24 08          	mov    %eax,0x8(%esp)
  1048f7:	b8 54 64 10 00       	mov    $0x106454,%eax
  1048fc:	89 44 24 04          	mov    %eax,0x4(%esp)
  104900:	e8 5b d1 ff ff       	call   101a60 <dirlink>
  104905:	85 c0                	test   %eax,%eax
  104907:	0f 89 45 ff ff ff    	jns    104852 <create+0xa2>
  10490d:	c7 04 24 57 64 10 00 	movl   $0x106457,(%esp)
  104914:	e8 97 bf ff ff       	call   1008b0 <panic>
  104919:	8b 55 c8             	mov    0xffffffc8(%ebp),%edx
  10491c:	66 39 53 14          	cmp    %dx,0x14(%ebx)
  104920:	75 84                	jne    1048a6 <create+0xf6>
  104922:	e9 33 ff ff ff       	jmp    10485a <create+0xaa>
  104927:	66 c7 43 16 00 00    	movw   $0x0,0x16(%ebx)
  10492d:	89 1c 24             	mov    %ebx,(%esp)
  104930:	31 db                	xor    %ebx,%ebx
  104932:	e8 69 d2 ff ff       	call   101ba0 <iunlockput>
  104937:	89 34 24             	mov    %esi,(%esp)
  10493a:	e8 61 d2 ff ff       	call   101ba0 <iunlockput>
  10493f:	e9 16 ff ff ff       	jmp    10485a <create+0xaa>
  104944:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  10494a:	8d bf 00 00 00 00    	lea    0x0(%edi),%edi

00104950 <sys_mkdir>:
  104950:	55                   	push   %ebp
  104951:	89 e5                	mov    %esp,%ebp
  104953:	83 ec 18             	sub    $0x18,%esp
  104956:	8d 45 fc             	lea    0xfffffffc(%ebp),%eax
  104959:	89 44 24 04          	mov    %eax,0x4(%esp)
  10495d:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  104964:	e8 f7 f8 ff ff       	call   104260 <argstr>
  104969:	85 c0                	test   %eax,%eax
  10496b:	79 07                	jns    104974 <sys_mkdir+0x24>
  10496d:	c9                   	leave  
  10496e:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  104973:	c3                   	ret    
  104974:	8b 45 fc             	mov    0xfffffffc(%ebp),%eax
  104977:	31 d2                	xor    %edx,%edx
  104979:	b9 01 00 00 00       	mov    $0x1,%ecx
  10497e:	89 54 24 04          	mov    %edx,0x4(%esp)
  104982:	31 d2                	xor    %edx,%edx
  104984:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  10498b:	e8 20 fe ff ff       	call   1047b0 <create>
  104990:	85 c0                	test   %eax,%eax
  104992:	74 d9                	je     10496d <sys_mkdir+0x1d>
  104994:	89 04 24             	mov    %eax,(%esp)
  104997:	e8 04 d2 ff ff       	call   101ba0 <iunlockput>
  10499c:	31 c0                	xor    %eax,%eax
  10499e:	c9                   	leave  
  10499f:	90                   	nop    
  1049a0:	c3                   	ret    
  1049a1:	eb 0d                	jmp    1049b0 <sys_mknod>
  1049a3:	90                   	nop    
  1049a4:	90                   	nop    
  1049a5:	90                   	nop    
  1049a6:	90                   	nop    
  1049a7:	90                   	nop    
  1049a8:	90                   	nop    
  1049a9:	90                   	nop    
  1049aa:	90                   	nop    
  1049ab:	90                   	nop    
  1049ac:	90                   	nop    
  1049ad:	90                   	nop    
  1049ae:	90                   	nop    
  1049af:	90                   	nop    

001049b0 <sys_mknod>:
  1049b0:	55                   	push   %ebp
  1049b1:	89 e5                	mov    %esp,%ebp
  1049b3:	83 ec 18             	sub    $0x18,%esp
  1049b6:	8d 45 fc             	lea    0xfffffffc(%ebp),%eax
  1049b9:	89 44 24 04          	mov    %eax,0x4(%esp)
  1049bd:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  1049c4:	e8 97 f8 ff ff       	call   104260 <argstr>
  1049c9:	85 c0                	test   %eax,%eax
  1049cb:	79 07                	jns    1049d4 <sys_mknod+0x24>
  1049cd:	c9                   	leave  
  1049ce:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  1049d3:	c3                   	ret    
  1049d4:	8d 45 f8             	lea    0xfffffff8(%ebp),%eax
  1049d7:	89 44 24 04          	mov    %eax,0x4(%esp)
  1049db:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  1049e2:	e8 39 f8 ff ff       	call   104220 <argint>
  1049e7:	85 c0                	test   %eax,%eax
  1049e9:	78 e2                	js     1049cd <sys_mknod+0x1d>
  1049eb:	8d 45 f4             	lea    0xfffffff4(%ebp),%eax
  1049ee:	89 44 24 04          	mov    %eax,0x4(%esp)
  1049f2:	c7 04 24 02 00 00 00 	movl   $0x2,(%esp)
  1049f9:	e8 22 f8 ff ff       	call   104220 <argint>
  1049fe:	85 c0                	test   %eax,%eax
  104a00:	78 cb                	js     1049cd <sys_mknod+0x1d>
  104a02:	0f bf 55 f4          	movswl 0xfffffff4(%ebp),%edx
  104a06:	b9 03 00 00 00       	mov    $0x3,%ecx
  104a0b:	8b 45 fc             	mov    0xfffffffc(%ebp),%eax
  104a0e:	89 54 24 04          	mov    %edx,0x4(%esp)
  104a12:	0f bf 55 f8          	movswl 0xfffffff8(%ebp),%edx
  104a16:	89 14 24             	mov    %edx,(%esp)
  104a19:	31 d2                	xor    %edx,%edx
  104a1b:	e8 90 fd ff ff       	call   1047b0 <create>
  104a20:	85 c0                	test   %eax,%eax
  104a22:	74 a9                	je     1049cd <sys_mknod+0x1d>
  104a24:	89 04 24             	mov    %eax,(%esp)
  104a27:	e8 74 d1 ff ff       	call   101ba0 <iunlockput>
  104a2c:	31 c0                	xor    %eax,%eax
  104a2e:	c9                   	leave  
  104a2f:	90                   	nop    
  104a30:	c3                   	ret    
  104a31:	eb 0d                	jmp    104a40 <sys_open>
  104a33:	90                   	nop    
  104a34:	90                   	nop    
  104a35:	90                   	nop    
  104a36:	90                   	nop    
  104a37:	90                   	nop    
  104a38:	90                   	nop    
  104a39:	90                   	nop    
  104a3a:	90                   	nop    
  104a3b:	90                   	nop    
  104a3c:	90                   	nop    
  104a3d:	90                   	nop    
  104a3e:	90                   	nop    
  104a3f:	90                   	nop    

00104a40 <sys_open>:
  104a40:	55                   	push   %ebp
  104a41:	89 e5                	mov    %esp,%ebp
  104a43:	83 ec 28             	sub    $0x28,%esp
  104a46:	8d 45 f0             	lea    0xfffffff0(%ebp),%eax
  104a49:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  104a4c:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  104a4f:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  104a52:	89 44 24 04          	mov    %eax,0x4(%esp)
  104a56:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  104a5d:	e8 fe f7 ff ff       	call   104260 <argstr>
  104a62:	85 c0                	test   %eax,%eax
  104a64:	79 14                	jns    104a7a <sys_open+0x3a>
  104a66:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
  104a6b:	89 d8                	mov    %ebx,%eax
  104a6d:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  104a70:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  104a73:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  104a76:	89 ec                	mov    %ebp,%esp
  104a78:	5d                   	pop    %ebp
  104a79:	c3                   	ret    
  104a7a:	8d 45 ec             	lea    0xffffffec(%ebp),%eax
  104a7d:	89 44 24 04          	mov    %eax,0x4(%esp)
  104a81:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  104a88:	e8 93 f7 ff ff       	call   104220 <argint>
  104a8d:	85 c0                	test   %eax,%eax
  104a8f:	78 d5                	js     104a66 <sys_open+0x26>
  104a91:	f6 45 ed 02          	testb  $0x2,0xffffffed(%ebp)
  104a95:	75 35                	jne    104acc <sys_open+0x8c>
  104a97:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  104a9a:	89 04 24             	mov    %eax,(%esp)
  104a9d:	e8 ae d3 ff ff       	call   101e50 <namei>
  104aa2:	85 c0                	test   %eax,%eax
  104aa4:	89 c7                	mov    %eax,%edi
  104aa6:	74 be                	je     104a66 <sys_open+0x26>
  104aa8:	89 04 24             	mov    %eax,(%esp)
  104aab:	e8 10 d1 ff ff       	call   101bc0 <ilock>
  104ab0:	66 83 7f 10 01       	cmpw   $0x1,0x10(%edi)
  104ab5:	75 3e                	jne    104af5 <sys_open+0xb5>
  104ab7:	f6 45 ec 03          	testb  $0x3,0xffffffec(%ebp)
  104abb:	74 38                	je     104af5 <sys_open+0xb5>
  104abd:	89 3c 24             	mov    %edi,(%esp)
  104ac0:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
  104ac5:	e8 d6 d0 ff ff       	call   101ba0 <iunlockput>
  104aca:	eb 9f                	jmp    104a6b <sys_open+0x2b>
  104acc:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  104acf:	31 c9                	xor    %ecx,%ecx
  104ad1:	ba 01 00 00 00       	mov    $0x1,%edx
  104ad6:	89 4c 24 04          	mov    %ecx,0x4(%esp)
  104ada:	b9 02 00 00 00       	mov    $0x2,%ecx
  104adf:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  104ae6:	e8 c5 fc ff ff       	call   1047b0 <create>
  104aeb:	85 c0                	test   %eax,%eax
  104aed:	89 c7                	mov    %eax,%edi
  104aef:	0f 84 71 ff ff ff    	je     104a66 <sys_open+0x26>
  104af5:	e8 d6 c3 ff ff       	call   100ed0 <filealloc>
  104afa:	85 c0                	test   %eax,%eax
  104afc:	89 c6                	mov    %eax,%esi
  104afe:	74 bd                	je     104abd <sys_open+0x7d>
  104b00:	e8 ab f8 ff ff       	call   1043b0 <fdalloc>
  104b05:	85 c0                	test   %eax,%eax
  104b07:	89 c3                	mov    %eax,%ebx
  104b09:	78 30                	js     104b3b <sys_open+0xfb>
  104b0b:	89 3c 24             	mov    %edi,(%esp)
  104b0e:	e8 3d d0 ff ff       	call   101b50 <iunlock>
  104b13:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  104b16:	c7 06 03 00 00 00    	movl   $0x3,(%esi)
  104b1c:	89 7e 10             	mov    %edi,0x10(%esi)
  104b1f:	c7 46 14 00 00 00 00 	movl   $0x0,0x14(%esi)
  104b26:	83 f0 01             	xor    $0x1,%eax
  104b29:	24 01                	and    $0x1,%al
  104b2b:	88 46 08             	mov    %al,0x8(%esi)
  104b2e:	f6 45 ec 03          	testb  $0x3,0xffffffec(%ebp)
  104b32:	0f 95 46 09          	setne  0x9(%esi)
  104b36:	e9 30 ff ff ff       	jmp    104a6b <sys_open+0x2b>
  104b3b:	89 34 24             	mov    %esi,(%esp)
  104b3e:	e8 0d c4 ff ff       	call   100f50 <fileclose>
  104b43:	e9 75 ff ff ff       	jmp    104abd <sys_open+0x7d>
  104b48:	90                   	nop    
  104b49:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00104b50 <sys_unlink>:
  104b50:	55                   	push   %ebp
  104b51:	89 e5                	mov    %esp,%ebp
  104b53:	83 ec 68             	sub    $0x68,%esp
  104b56:	8d 45 f0             	lea    0xfffffff0(%ebp),%eax
  104b59:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  104b5c:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  104b5f:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  104b62:	89 44 24 04          	mov    %eax,0x4(%esp)
  104b66:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  104b6d:	e8 ee f6 ff ff       	call   104260 <argstr>
  104b72:	85 c0                	test   %eax,%eax
  104b74:	79 12                	jns    104b88 <sys_unlink+0x38>
  104b76:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  104b7b:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  104b7e:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  104b81:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  104b84:	89 ec                	mov    %ebp,%esp
  104b86:	5d                   	pop    %ebp
  104b87:	c3                   	ret    
  104b88:	8b 45 f0             	mov    0xfffffff0(%ebp),%eax
  104b8b:	8d 5d de             	lea    0xffffffde(%ebp),%ebx
  104b8e:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  104b92:	89 04 24             	mov    %eax,(%esp)
  104b95:	e8 96 d2 ff ff       	call   101e30 <nameiparent>
  104b9a:	85 c0                	test   %eax,%eax
  104b9c:	89 c7                	mov    %eax,%edi
  104b9e:	74 d6                	je     104b76 <sys_unlink+0x26>
  104ba0:	89 04 24             	mov    %eax,(%esp)
  104ba3:	e8 18 d0 ff ff       	call   101bc0 <ilock>
  104ba8:	b8 55 64 10 00       	mov    $0x106455,%eax
  104bad:	89 44 24 04          	mov    %eax,0x4(%esp)
  104bb1:	89 1c 24             	mov    %ebx,(%esp)
  104bb4:	e8 a7 ca ff ff       	call   101660 <namecmp>
  104bb9:	85 c0                	test   %eax,%eax
  104bbb:	74 15                	je     104bd2 <sys_unlink+0x82>
  104bbd:	b8 54 64 10 00       	mov    $0x106454,%eax
  104bc2:	89 44 24 04          	mov    %eax,0x4(%esp)
  104bc6:	89 1c 24             	mov    %ebx,(%esp)
  104bc9:	e8 92 ca ff ff       	call   101660 <namecmp>
  104bce:	85 c0                	test   %eax,%eax
  104bd0:	75 10                	jne    104be2 <sys_unlink+0x92>
  104bd2:	89 3c 24             	mov    %edi,(%esp)
  104bd5:	e8 c6 cf ff ff       	call   101ba0 <iunlockput>
  104bda:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  104bdf:	90                   	nop    
  104be0:	eb 99                	jmp    104b7b <sys_unlink+0x2b>
  104be2:	8d 45 ec             	lea    0xffffffec(%ebp),%eax
  104be5:	89 44 24 08          	mov    %eax,0x8(%esp)
  104be9:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  104bed:	89 3c 24             	mov    %edi,(%esp)
  104bf0:	e8 9b ca ff ff       	call   101690 <dirlookup>
  104bf5:	85 c0                	test   %eax,%eax
  104bf7:	89 c6                	mov    %eax,%esi
  104bf9:	74 d7                	je     104bd2 <sys_unlink+0x82>
  104bfb:	89 04 24             	mov    %eax,(%esp)
  104bfe:	e8 bd cf ff ff       	call   101bc0 <ilock>
  104c03:	66 83 7e 16 00       	cmpw   $0x0,0x16(%esi)
  104c08:	0f 8e c0 00 00 00    	jle    104cce <sys_unlink+0x17e>
  104c0e:	66 83 7e 10 01       	cmpw   $0x1,0x10(%esi)
  104c13:	75 4a                	jne    104c5f <sys_unlink+0x10f>
  104c15:	83 7e 18 20          	cmpl   $0x20,0x18(%esi)
  104c19:	76 44                	jbe    104c5f <sys_unlink+0x10f>
  104c1b:	bb 20 00 00 00       	mov    $0x20,%ebx
  104c20:	eb 08                	jmp    104c2a <sys_unlink+0xda>
  104c22:	83 c3 10             	add    $0x10,%ebx
  104c25:	3b 5e 18             	cmp    0x18(%esi),%ebx
  104c28:	73 35                	jae    104c5f <sys_unlink+0x10f>
  104c2a:	b8 10 00 00 00       	mov    $0x10,%eax
  104c2f:	89 44 24 0c          	mov    %eax,0xc(%esp)
  104c33:	8d 45 be             	lea    0xffffffbe(%ebp),%eax
  104c36:	89 5c 24 08          	mov    %ebx,0x8(%esp)
  104c3a:	89 44 24 04          	mov    %eax,0x4(%esp)
  104c3e:	89 34 24             	mov    %esi,(%esp)
  104c41:	e8 0a c9 ff ff       	call   101550 <readi>
  104c46:	83 f8 10             	cmp    $0x10,%eax
  104c49:	75 77                	jne    104cc2 <sys_unlink+0x172>
  104c4b:	66 83 7d be 00       	cmpw   $0x0,0xffffffbe(%ebp)
  104c50:	74 d0                	je     104c22 <sys_unlink+0xd2>
  104c52:	89 34 24             	mov    %esi,(%esp)
  104c55:	e8 46 cf ff ff       	call   101ba0 <iunlockput>
  104c5a:	e9 73 ff ff ff       	jmp    104bd2 <sys_unlink+0x82>
  104c5f:	b8 10 00 00 00       	mov    $0x10,%eax
  104c64:	89 44 24 08          	mov    %eax,0x8(%esp)
  104c68:	8d 5d ce             	lea    0xffffffce(%ebp),%ebx
  104c6b:	31 c0                	xor    %eax,%eax
  104c6d:	89 44 24 04          	mov    %eax,0x4(%esp)
  104c71:	89 1c 24             	mov    %ebx,(%esp)
  104c74:	e8 07 f3 ff ff       	call   103f80 <memset>
  104c79:	b8 10 00 00 00       	mov    $0x10,%eax
  104c7e:	89 44 24 0c          	mov    %eax,0xc(%esp)
  104c82:	8b 45 ec             	mov    0xffffffec(%ebp),%eax
  104c85:	89 5c 24 04          	mov    %ebx,0x4(%esp)
  104c89:	89 3c 24             	mov    %edi,(%esp)
  104c8c:	89 44 24 08          	mov    %eax,0x8(%esp)
  104c90:	e8 8b c7 ff ff       	call   101420 <writei>
  104c95:	83 f8 10             	cmp    $0x10,%eax
  104c98:	75 40                	jne    104cda <sys_unlink+0x18a>
  104c9a:	89 3c 24             	mov    %edi,(%esp)
  104c9d:	e8 fe ce ff ff       	call   101ba0 <iunlockput>
  104ca2:	0f b7 46 16          	movzwl 0x16(%esi),%eax
  104ca6:	48                   	dec    %eax
  104ca7:	66 89 46 16          	mov    %ax,0x16(%esi)
  104cab:	89 34 24             	mov    %esi,(%esp)
  104cae:	e8 1d c5 ff ff       	call   1011d0 <iupdate>
  104cb3:	89 34 24             	mov    %esi,(%esp)
  104cb6:	e8 e5 ce ff ff       	call   101ba0 <iunlockput>
  104cbb:	31 c0                	xor    %eax,%eax
  104cbd:	e9 b9 fe ff ff       	jmp    104b7b <sys_unlink+0x2b>
  104cc2:	c7 04 24 75 64 10 00 	movl   $0x106475,(%esp)
  104cc9:	e8 e2 bb ff ff       	call   1008b0 <panic>
  104cce:	c7 04 24 63 64 10 00 	movl   $0x106463,(%esp)
  104cd5:	e8 d6 bb ff ff       	call   1008b0 <panic>
  104cda:	c7 04 24 87 64 10 00 	movl   $0x106487,(%esp)
  104ce1:	e8 ca bb ff ff       	call   1008b0 <panic>
  104ce6:	8d 76 00             	lea    0x0(%esi),%esi
  104ce9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00104cf0 <sys_fstat>:
  104cf0:	55                   	push   %ebp
  104cf1:	31 d2                	xor    %edx,%edx
  104cf3:	89 e5                	mov    %esp,%ebp
  104cf5:	31 c0                	xor    %eax,%eax
  104cf7:	83 ec 28             	sub    $0x28,%esp
  104cfa:	8d 4d fc             	lea    0xfffffffc(%ebp),%ecx
  104cfd:	e8 8e f7 ff ff       	call   104490 <argfd>
  104d02:	85 c0                	test   %eax,%eax
  104d04:	79 07                	jns    104d0d <sys_fstat+0x1d>
  104d06:	c9                   	leave  
  104d07:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  104d0c:	c3                   	ret    
  104d0d:	8d 45 f8             	lea    0xfffffff8(%ebp),%eax
  104d10:	ba 10 00 00 00       	mov    $0x10,%edx
  104d15:	89 54 24 08          	mov    %edx,0x8(%esp)
  104d19:	89 44 24 04          	mov    %eax,0x4(%esp)
  104d1d:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  104d24:	e8 87 f5 ff ff       	call   1042b0 <argptr>
  104d29:	85 c0                	test   %eax,%eax
  104d2b:	78 d9                	js     104d06 <sys_fstat+0x16>
  104d2d:	8b 45 f8             	mov    0xfffffff8(%ebp),%eax
  104d30:	89 44 24 04          	mov    %eax,0x4(%esp)
  104d34:	8b 45 fc             	mov    0xfffffffc(%ebp),%eax
  104d37:	89 04 24             	mov    %eax,(%esp)
  104d3a:	e8 f1 c0 ff ff       	call   100e30 <filestat>
  104d3f:	c9                   	leave  
  104d40:	c3                   	ret    
  104d41:	eb 0d                	jmp    104d50 <sys_dup>
  104d43:	90                   	nop    
  104d44:	90                   	nop    
  104d45:	90                   	nop    
  104d46:	90                   	nop    
  104d47:	90                   	nop    
  104d48:	90                   	nop    
  104d49:	90                   	nop    
  104d4a:	90                   	nop    
  104d4b:	90                   	nop    
  104d4c:	90                   	nop    
  104d4d:	90                   	nop    
  104d4e:	90                   	nop    
  104d4f:	90                   	nop    

00104d50 <sys_dup>:
  104d50:	55                   	push   %ebp
  104d51:	31 d2                	xor    %edx,%edx
  104d53:	89 e5                	mov    %esp,%ebp
  104d55:	31 c0                	xor    %eax,%eax
  104d57:	53                   	push   %ebx
  104d58:	83 ec 14             	sub    $0x14,%esp
  104d5b:	8d 4d f8             	lea    0xfffffff8(%ebp),%ecx
  104d5e:	e8 2d f7 ff ff       	call   104490 <argfd>
  104d63:	85 c0                	test   %eax,%eax
  104d65:	79 0d                	jns    104d74 <sys_dup+0x24>
  104d67:	bb ff ff ff ff       	mov    $0xffffffff,%ebx
  104d6c:	83 c4 14             	add    $0x14,%esp
  104d6f:	89 d8                	mov    %ebx,%eax
  104d71:	5b                   	pop    %ebx
  104d72:	5d                   	pop    %ebp
  104d73:	c3                   	ret    
  104d74:	8b 45 f8             	mov    0xfffffff8(%ebp),%eax
  104d77:	e8 34 f6 ff ff       	call   1043b0 <fdalloc>
  104d7c:	85 c0                	test   %eax,%eax
  104d7e:	89 c3                	mov    %eax,%ebx
  104d80:	78 e5                	js     104d67 <sys_dup+0x17>
  104d82:	8b 45 f8             	mov    0xfffffff8(%ebp),%eax
  104d85:	89 04 24             	mov    %eax,(%esp)
  104d88:	e8 f3 c0 ff ff       	call   100e80 <filedup>
  104d8d:	eb dd                	jmp    104d6c <sys_dup+0x1c>
  104d8f:	90                   	nop    

00104d90 <sys_write>:
  104d90:	55                   	push   %ebp
  104d91:	31 d2                	xor    %edx,%edx
  104d93:	89 e5                	mov    %esp,%ebp
  104d95:	31 c0                	xor    %eax,%eax
  104d97:	83 ec 28             	sub    $0x28,%esp
  104d9a:	8d 4d fc             	lea    0xfffffffc(%ebp),%ecx
  104d9d:	e8 ee f6 ff ff       	call   104490 <argfd>
  104da2:	85 c0                	test   %eax,%eax
  104da4:	79 07                	jns    104dad <sys_write+0x1d>
  104da6:	c9                   	leave  
  104da7:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  104dac:	c3                   	ret    
  104dad:	8d 45 f8             	lea    0xfffffff8(%ebp),%eax
  104db0:	89 44 24 04          	mov    %eax,0x4(%esp)
  104db4:	c7 04 24 02 00 00 00 	movl   $0x2,(%esp)
  104dbb:	e8 60 f4 ff ff       	call   104220 <argint>
  104dc0:	85 c0                	test   %eax,%eax
  104dc2:	78 e2                	js     104da6 <sys_write+0x16>
  104dc4:	8b 45 f8             	mov    0xfffffff8(%ebp),%eax
  104dc7:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  104dce:	89 44 24 08          	mov    %eax,0x8(%esp)
  104dd2:	8d 45 f4             	lea    0xfffffff4(%ebp),%eax
  104dd5:	89 44 24 04          	mov    %eax,0x4(%esp)
  104dd9:	e8 d2 f4 ff ff       	call   1042b0 <argptr>
  104dde:	85 c0                	test   %eax,%eax
  104de0:	78 c4                	js     104da6 <sys_write+0x16>
  104de2:	8b 45 f8             	mov    0xfffffff8(%ebp),%eax
  104de5:	89 44 24 08          	mov    %eax,0x8(%esp)
  104de9:	8b 45 f4             	mov    0xfffffff4(%ebp),%eax
  104dec:	89 44 24 04          	mov    %eax,0x4(%esp)
  104df0:	8b 45 fc             	mov    0xfffffffc(%ebp),%eax
  104df3:	89 04 24             	mov    %eax,(%esp)
  104df6:	e8 f5 be ff ff       	call   100cf0 <filewrite>
  104dfb:	c9                   	leave  
  104dfc:	c3                   	ret    
  104dfd:	8d 76 00             	lea    0x0(%esi),%esi

00104e00 <sys_read>:
  104e00:	55                   	push   %ebp
  104e01:	31 d2                	xor    %edx,%edx
  104e03:	89 e5                	mov    %esp,%ebp
  104e05:	31 c0                	xor    %eax,%eax
  104e07:	83 ec 28             	sub    $0x28,%esp
  104e0a:	8d 4d fc             	lea    0xfffffffc(%ebp),%ecx
  104e0d:	e8 7e f6 ff ff       	call   104490 <argfd>
  104e12:	85 c0                	test   %eax,%eax
  104e14:	79 07                	jns    104e1d <sys_read+0x1d>
  104e16:	c9                   	leave  
  104e17:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  104e1c:	c3                   	ret    
  104e1d:	8d 45 f8             	lea    0xfffffff8(%ebp),%eax
  104e20:	89 44 24 04          	mov    %eax,0x4(%esp)
  104e24:	c7 04 24 02 00 00 00 	movl   $0x2,(%esp)
  104e2b:	e8 f0 f3 ff ff       	call   104220 <argint>
  104e30:	85 c0                	test   %eax,%eax
  104e32:	78 e2                	js     104e16 <sys_read+0x16>
  104e34:	8b 45 f8             	mov    0xfffffff8(%ebp),%eax
  104e37:	c7 04 24 01 00 00 00 	movl   $0x1,(%esp)
  104e3e:	89 44 24 08          	mov    %eax,0x8(%esp)
  104e42:	8d 45 f4             	lea    0xfffffff4(%ebp),%eax
  104e45:	89 44 24 04          	mov    %eax,0x4(%esp)
  104e49:	e8 62 f4 ff ff       	call   1042b0 <argptr>
  104e4e:	85 c0                	test   %eax,%eax
  104e50:	78 c4                	js     104e16 <sys_read+0x16>
  104e52:	8b 45 f8             	mov    0xfffffff8(%ebp),%eax
  104e55:	89 44 24 08          	mov    %eax,0x8(%esp)
  104e59:	8b 45 f4             	mov    0xfffffff4(%ebp),%eax
  104e5c:	89 44 24 04          	mov    %eax,0x4(%esp)
  104e60:	8b 45 fc             	mov    0xfffffffc(%ebp),%eax
  104e63:	89 04 24             	mov    %eax,(%esp)
  104e66:	e8 25 bf ff ff       	call   100d90 <fileread>
  104e6b:	c9                   	leave  
  104e6c:	c3                   	ret    
  104e6d:	90                   	nop    
  104e6e:	90                   	nop    
  104e6f:	90                   	nop    

00104e70 <sys_getpid>:
}

int
sys_getpid(void)
{
  104e70:	55                   	push   %ebp
  104e71:	89 e5                	mov    %esp,%ebp
  104e73:	83 ec 08             	sub    $0x8,%esp
  return cp->pid;
  104e76:	e8 45 e4 ff ff       	call   1032c0 <curproc>
  104e7b:	8b 40 10             	mov    0x10(%eax),%eax
}
  104e7e:	c9                   	leave  
  104e7f:	c3                   	ret    

00104e80 <sys_sleep>:

int
sys_sbrk(void)
{
  int addr;
  int n;

  if(argint(0, &n) < 0)
    return -1;
  if((addr = growproc(n)) < 0)
    return -1;
  return addr;
}

int
sys_sleep(void)
{
  104e80:	55                   	push   %ebp
  104e81:	89 e5                	mov    %esp,%ebp
  104e83:	53                   	push   %ebx
  104e84:	83 ec 24             	sub    $0x24,%esp
  int n, ticks0;
  
  if(argint(0, &n) < 0)
  104e87:	8d 45 f8             	lea    0xfffffff8(%ebp),%eax
  104e8a:	89 44 24 04          	mov    %eax,0x4(%esp)
  104e8e:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  104e95:	e8 86 f3 ff ff       	call   104220 <argint>
  104e9a:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  104e9f:	85 c0                	test   %eax,%eax
  104ea1:	78 5b                	js     104efe <sys_sleep+0x7e>
    return -1;
  acquire(&tickslock);
  104ea3:	c7 04 24 80 d7 10 00 	movl   $0x10d780,(%esp)
  104eaa:	e8 61 f0 ff ff       	call   103f10 <acquire>
  ticks0 = ticks;
  while(ticks - ticks0 < n){
  104eaf:	8b 4d f8             	mov    0xfffffff8(%ebp),%ecx
  104eb2:	8b 1d c0 df 10 00    	mov    0x10dfc0,%ebx
  104eb8:	85 c9                	test   %ecx,%ecx
  104eba:	7f 25                	jg     104ee1 <sys_sleep+0x61>
  104ebc:	eb 48                	jmp    104f06 <sys_sleep+0x86>
  104ebe:	89 f6                	mov    %esi,%esi
    if(cp->killed){
      release(&tickslock);
      return -1;
    }
    sleep(&ticks, &tickslock);
  104ec0:	b8 80 d7 10 00       	mov    $0x10d780,%eax
  104ec5:	89 44 24 04          	mov    %eax,0x4(%esp)
  104ec9:	c7 04 24 c0 df 10 00 	movl   $0x10dfc0,(%esp)
  104ed0:	e8 1b e6 ff ff       	call   1034f0 <sleep>
  104ed5:	a1 c0 df 10 00       	mov    0x10dfc0,%eax
  104eda:	29 d8                	sub    %ebx,%eax
  104edc:	3b 45 f8             	cmp    0xfffffff8(%ebp),%eax
  104edf:	7d 25                	jge    104f06 <sys_sleep+0x86>
  104ee1:	e8 da e3 ff ff       	call   1032c0 <curproc>
  104ee6:	8b 50 1c             	mov    0x1c(%eax),%edx
  104ee9:	85 d2                	test   %edx,%edx
  104eeb:	74 d3                	je     104ec0 <sys_sleep+0x40>
  104eed:	c7 04 24 80 d7 10 00 	movl   $0x10d780,(%esp)
  104ef4:	e8 d7 ef ff ff       	call   103ed0 <release>
  104ef9:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  }
  release(&tickslock);
  return 0;
}
  104efe:	83 c4 24             	add    $0x24,%esp
  104f01:	89 d0                	mov    %edx,%eax
  104f03:	5b                   	pop    %ebx
  104f04:	5d                   	pop    %ebp
  104f05:	c3                   	ret    
  104f06:	c7 04 24 80 d7 10 00 	movl   $0x10d780,(%esp)
  104f0d:	e8 be ef ff ff       	call   103ed0 <release>
  104f12:	83 c4 24             	add    $0x24,%esp
  104f15:	31 d2                	xor    %edx,%edx
  104f17:	5b                   	pop    %ebx
  104f18:	89 d0                	mov    %edx,%eax
  104f1a:	5d                   	pop    %ebp
  104f1b:	c3                   	ret    
  104f1c:	8d 74 26 00          	lea    0x0(%esi),%esi

00104f20 <sys_sbrk>:
  104f20:	55                   	push   %ebp
  104f21:	89 e5                	mov    %esp,%ebp
  104f23:	83 ec 18             	sub    $0x18,%esp
  104f26:	8d 45 fc             	lea    0xfffffffc(%ebp),%eax
  104f29:	89 44 24 04          	mov    %eax,0x4(%esp)
  104f2d:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  104f34:	e8 e7 f2 ff ff       	call   104220 <argint>
  104f39:	85 c0                	test   %eax,%eax
  104f3b:	79 07                	jns    104f44 <sys_sbrk+0x24>
  104f3d:	c9                   	leave  
  104f3e:	b8 ff ff ff ff       	mov    $0xffffffff,%eax
  104f43:	c3                   	ret    
  104f44:	8b 45 fc             	mov    0xfffffffc(%ebp),%eax
  104f47:	89 04 24             	mov    %eax,(%esp)
  104f4a:	e8 71 ea ff ff       	call   1039c0 <growproc>
  104f4f:	85 c0                	test   %eax,%eax
  104f51:	78 ea                	js     104f3d <sys_sbrk+0x1d>
  104f53:	c9                   	leave  
  104f54:	c3                   	ret    
  104f55:	8d 74 26 00          	lea    0x0(%esi),%esi
  104f59:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00104f60 <sys_kill>:
  104f60:	55                   	push   %ebp
  104f61:	89 e5                	mov    %esp,%ebp
  104f63:	83 ec 18             	sub    $0x18,%esp
  104f66:	8d 45 fc             	lea    0xfffffffc(%ebp),%eax
  104f69:	89 44 24 04          	mov    %eax,0x4(%esp)
  104f6d:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  104f74:	e8 a7 f2 ff ff       	call   104220 <argint>
  104f79:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  104f7e:	85 c0                	test   %eax,%eax
  104f80:	78 0d                	js     104f8f <sys_kill+0x2f>
  104f82:	8b 45 fc             	mov    0xfffffffc(%ebp),%eax
  104f85:	89 04 24             	mov    %eax,(%esp)
  104f88:	e8 83 e2 ff ff       	call   103210 <kill>
  104f8d:	89 c2                	mov    %eax,%edx
  104f8f:	c9                   	leave  
  104f90:	89 d0                	mov    %edx,%eax
  104f92:	c3                   	ret    
  104f93:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  104f99:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00104fa0 <sys_wait>:
  104fa0:	55                   	push   %ebp
  104fa1:	89 e5                	mov    %esp,%ebp
  104fa3:	5d                   	pop    %ebp
  104fa4:	e9 17 e6 ff ff       	jmp    1035c0 <wait>
  104fa9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi

00104fb0 <sys_exit>:
  104fb0:	55                   	push   %ebp
  104fb1:	89 e5                	mov    %esp,%ebp
  104fb3:	83 ec 08             	sub    $0x8,%esp
  104fb6:	e8 35 e4 ff ff       	call   1033f0 <exit>
  104fbb:	31 c0                	xor    %eax,%eax
  104fbd:	c9                   	leave  
  104fbe:	c3                   	ret    
  104fbf:	90                   	nop    

00104fc0 <sys_fork>:
  104fc0:	55                   	push   %ebp
  104fc1:	89 e5                	mov    %esp,%ebp
  104fc3:	83 ec 08             	sub    $0x8,%esp
  104fc6:	e8 f5 e2 ff ff       	call   1032c0 <curproc>
  104fcb:	89 04 24             	mov    %eax,(%esp)
  104fce:	e8 9d ea ff ff       	call   103a70 <copyproc>
  104fd3:	ba ff ff ff ff       	mov    $0xffffffff,%edx
  104fd8:	85 c0                	test   %eax,%eax
  104fda:	74 0a                	je     104fe6 <sys_fork+0x26>
  104fdc:	8b 50 10             	mov    0x10(%eax),%edx
  104fdf:	c7 40 0c 03 00 00 00 	movl   $0x3,0xc(%eax)
  104fe6:	c9                   	leave  
  104fe7:	89 d0                	mov    %edx,%eax
  104fe9:	c3                   	ret    
  104fea:	90                   	nop    
  104feb:	90                   	nop    
  104fec:	90                   	nop    
  104fed:	90                   	nop    
  104fee:	90                   	nop    
  104fef:	90                   	nop    

00104ff0 <timer_init>:
#define TIMER_16BIT     0x30    // r/w counter 16 bits, LSB first

void
timer_init(void)
{
  104ff0:	55                   	push   %ebp

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  104ff1:	b0 34                	mov    $0x34,%al
  104ff3:	89 e5                	mov    %esp,%ebp

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  104ff5:	ba 43 00 00 00       	mov    $0x43,%edx
  104ffa:	83 ec 08             	sub    $0x8,%esp

static inline void
outb(ushort port, uchar data)
{
  asm volatile("out %0,%1" : : "a" (data), "d" (port));
  104ffd:	ee                   	out    %al,(%dx)
  // Interrupt 100 times/sec.
  outb(TIMER_MODE, TIMER_SEL0 | TIMER_RATEGEN | TIMER_16BIT);
  outb(IO_TIMER1, TIMER_DIV(100) % 256);
  outb(IO_TIMER1, TIMER_DIV(100) / 256);
  pic_enable(IRQ_TIMER);
  104ffe:	b0 9c                	mov    $0x9c,%al
  105000:	ba 40 00 00 00       	mov    $0x40,%edx
  105005:	ee                   	out    %al,(%dx)
  105006:	b0 2e                	mov    $0x2e,%al
  105008:	ee                   	out    %al,(%dx)
  105009:	c7 04 24 00 00 00 00 	movl   $0x0,(%esp)
  105010:	e8 0b dd ff ff       	call   102d20 <pic_enable>
}
  105015:	c9                   	leave  
  105016:	c3                   	ret    
  105017:	90                   	nop    

00105018 <alltraps>:
  105018:	1e                   	push   %ds
  105019:	06                   	push   %es
  10501a:	60                   	pusha  
  10501b:	b8 10 00 00 00       	mov    $0x10,%eax
  105020:	8e d8                	movl   %eax,%ds
  105022:	8e c0                	movl   %eax,%es
  105024:	54                   	push   %esp
  105025:	e8 46 00 00 00       	call   105070 <trap>
  10502a:	83 c4 04             	add    $0x4,%esp

0010502d <trapret>:
  10502d:	61                   	popa   
  10502e:	07                   	pop    %es
  10502f:	1f                   	pop    %ds
  105030:	83 c4 08             	add    $0x8,%esp
  105033:	cf                   	iret   

00105034 <forkret1>:
  105034:	8b 64 24 04          	mov    0x4(%esp),%esp
  105038:	e9 f0 ff ff ff       	jmp    10502d <trapret>
  10503d:	90                   	nop    
  10503e:	90                   	nop    
  10503f:	90                   	nop    

00105040 <idtinit>:
}

void
idtinit(void)
{
  105040:	55                   	push   %ebp
{
  volatile ushort pd[3];

  pd[0] = size-1;
  pd[1] = (uint)p;
  105041:	b8 c0 d7 10 00       	mov    $0x10d7c0,%eax
  105046:	89 e5                	mov    %esp,%ebp
{
  volatile ushort pd[3];

  pd[0] = size-1;
  pd[1] = (uint)p;
  105048:	0f b7 d0             	movzwl %ax,%edx
  pd[2] = (uint)p >> 16;
  10504b:	c1 e8 10             	shr    $0x10,%eax
  10504e:	83 ec 10             	sub    $0x10,%esp
lidt(struct gatedesc *p, int size)
{
  volatile ushort pd[3];

  pd[0] = size-1;
  105051:	66 c7 45 fa ff 07    	movw   $0x7ff,0xfffffffa(%ebp)
  pd[1] = (uint)p;
  105057:	66 89 55 fc          	mov    %dx,0xfffffffc(%ebp)
  pd[2] = (uint)p >> 16;
  10505b:	66 89 45 fe          	mov    %ax,0xfffffffe(%ebp)

  asm volatile("lidt (%0)" : : "r" (pd));
  10505f:	8d 45 fa             	lea    0xfffffffa(%ebp),%eax
  105062:	0f 01 18             	lidtl  (%eax)
  lidt(idt, sizeof(idt));
}
  105065:	c9                   	leave  
  105066:	c3                   	ret    
  105067:	89 f6                	mov    %esi,%esi
  105069:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

00105070 <trap>:

void
trap(struct trapframe *tf)
{
  105070:	55                   	push   %ebp
  105071:	89 e5                	mov    %esp,%ebp
  105073:	83 ec 38             	sub    $0x38,%esp
  105076:	89 7d fc             	mov    %edi,0xfffffffc(%ebp)
  105079:	8b 7d 08             	mov    0x8(%ebp),%edi
  10507c:	89 5d f4             	mov    %ebx,0xfffffff4(%ebp)
  10507f:	89 75 f8             	mov    %esi,0xfffffff8(%ebp)
  if(tf->trapno == T_SYSCALL){
  105082:	8b 47 28             	mov    0x28(%edi),%eax
  105085:	83 f8 30             	cmp    $0x30,%eax
  105088:	0f 84 25 01 00 00    	je     1051b3 <trap+0x143>
    if(cp->killed)
      exit();
    cp->tf = tf;
    syscall();
    if(cp->killed)
      exit();
    return;
  }

  switch(tf->trapno){
  10508e:	83 f8 21             	cmp    $0x21,%eax
  105091:	0f 84 ca 00 00 00    	je     105161 <trap+0xf1>
  105097:	77 57                	ja     1050f0 <trap+0x80>
  105099:	83 f8 20             	cmp    $0x20,%eax
  10509c:	8d 74 26 00          	lea    0x0(%esi),%esi
  1050a0:	0f 84 c4 01 00 00    	je     10526a <trap+0x1fa>
  case IRQ_OFFSET + IRQ_TIMER:
    if(cpu() == 0){
      acquire(&tickslock);
      ticks++;
      wakeup(&ticks);
      release(&tickslock);
    }
    lapic_eoi();
    break;
  case IRQ_OFFSET + IRQ_IDE:
    ide_intr();
    lapic_eoi();
    break;
  case IRQ_OFFSET + IRQ_KBD:
    kbd_intr();
    lapic_eoi();
    break;
  case IRQ_OFFSET + IRQ_SPURIOUS:
    cprintf("cpu%d: spurious interrupt at %x:%x\n",
            cpu(), tf->cs, tf->eip);
    lapic_eoi();
    break;
    
  default:
    if(cp == 0 || (tf->cs&3) == 0){
  1050a6:	e8 15 e2 ff ff       	call   1032c0 <curproc>
  1050ab:	85 c0                	test   %eax,%eax
  1050ad:	8d 76 00             	lea    0x0(%esi),%esi
  1050b0:	74 0a                	je     1050bc <trap+0x4c>
  1050b2:	f6 47 34 03          	testb  $0x3,0x34(%edi)
  1050b6:	0f 85 38 01 00 00    	jne    1051f4 <trap+0x184>
      // In kernel, it must be our mistake.
      cprintf("unexpected trap %d from cpu %d eip %x\n",
  1050bc:	8b 5f 30             	mov    0x30(%edi),%ebx
  1050bf:	90                   	nop    
  1050c0:	e8 8b d6 ff ff       	call   102750 <cpu>
  1050c5:	89 5c 24 0c          	mov    %ebx,0xc(%esp)
  1050c9:	89 44 24 08          	mov    %eax,0x8(%esp)
  1050cd:	8b 47 28             	mov    0x28(%edi),%eax
  1050d0:	c7 04 24 bc 64 10 00 	movl   $0x1064bc,(%esp)
  1050d7:	89 44 24 04          	mov    %eax,0x4(%esp)
  1050db:	e8 50 b6 ff ff       	call   100730 <cprintf>
              tf->trapno, cpu(), tf->eip);
      panic("trap");
  1050e0:	c7 04 24 20 65 10 00 	movl   $0x106520,(%esp)
  1050e7:	e8 c4 b7 ff ff       	call   1008b0 <panic>
  1050ec:	8d 74 26 00          	lea    0x0(%esi),%esi
  1050f0:	83 f8 2e             	cmp    $0x2e,%eax
  1050f3:	0f 84 67 01 00 00    	je     105260 <trap+0x1f0>
  1050f9:	83 f8 3f             	cmp    $0x3f,%eax
  1050fc:	75 a8                	jne    1050a6 <trap+0x36>
  1050fe:	0f b7 47 34          	movzwl 0x34(%edi),%eax
  105102:	8b 5f 30             	mov    0x30(%edi),%ebx
  105105:	89 45 e8             	mov    %eax,0xffffffe8(%ebp)
  105108:	e8 43 d6 ff ff       	call   102750 <cpu>
  10510d:	89 5c 24 0c          	mov    %ebx,0xc(%esp)
  105111:	8b 55 e8             	mov    0xffffffe8(%ebp),%edx
  105114:	c7 04 24 98 64 10 00 	movl   $0x106498,(%esp)
  10511b:	89 54 24 08          	mov    %edx,0x8(%esp)
  10511f:	89 44 24 04          	mov    %eax,0x4(%esp)
  105123:	e8 08 b6 ff ff       	call   100730 <cprintf>
  105128:	90                   	nop    
  105129:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  105130:	e8 9b d5 ff ff       	call   1026d0 <lapic_eoi>
    }
    // In user space, assume process misbehaved.
    cprintf("pid %d %s: trap %d err %d on cpu %d eip %x -- kill proc\n",
            cp->pid, cp->name, tf->trapno, tf->err, cpu(), tf->eip);
    cp->killed = 1;
  }

  // Force process exit if it has been killed and is in user space.
  // (If it is still executing in the kernel, let it keep running 
  // until it gets to the regular system call return.)
  if(cp && cp->killed && (tf->cs&3) == DPL_USER)
  105135:	e8 86 e1 ff ff       	call   1032c0 <curproc>
  10513a:	85 c0                	test   %eax,%eax
  10513c:	75 3b                	jne    105179 <trap+0x109>
  10513e:	89 f6                	mov    %esi,%esi
    exit();

  // Force process to give up CPU on clock tick.
  // If interrupts were on while locks held, would need to check nlock.
  if(cp && cp->state == RUNNING && tf->trapno == IRQ_OFFSET+IRQ_TIMER)
  105140:	e8 7b e1 ff ff       	call   1032c0 <curproc>
  105145:	85 c0                	test   %eax,%eax
  105147:	74 0b                	je     105154 <trap+0xe4>
  105149:	e8 72 e1 ff ff       	call   1032c0 <curproc>
  10514e:	83 78 0c 04          	cmpl   $0x4,0xc(%eax)
  105152:	74 44                	je     105198 <trap+0x128>
    yield();
}
  105154:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  105157:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  10515a:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  10515d:	89 ec                	mov    %ebp,%esp
  10515f:	5d                   	pop    %ebp
  105160:	c3                   	ret    
  105161:	e8 3a d3 ff ff       	call   1024a0 <kbd_intr>
  105166:	e8 65 d5 ff ff       	call   1026d0 <lapic_eoi>
  10516b:	90                   	nop    
  10516c:	8d 74 26 00          	lea    0x0(%esi),%esi
  105170:	e8 4b e1 ff ff       	call   1032c0 <curproc>
  105175:	85 c0                	test   %eax,%eax
  105177:	74 c7                	je     105140 <trap+0xd0>
  105179:	e8 42 e1 ff ff       	call   1032c0 <curproc>
  10517e:	8b 40 1c             	mov    0x1c(%eax),%eax
  105181:	85 c0                	test   %eax,%eax
  105183:	74 bb                	je     105140 <trap+0xd0>
  105185:	0f b7 47 34          	movzwl 0x34(%edi),%eax
  105189:	83 e0 03             	and    $0x3,%eax
  10518c:	83 f8 03             	cmp    $0x3,%eax
  10518f:	75 af                	jne    105140 <trap+0xd0>
  105191:	e8 5a e2 ff ff       	call   1033f0 <exit>
  105196:	eb a8                	jmp    105140 <trap+0xd0>
  105198:	83 7f 28 20          	cmpl   $0x20,0x28(%edi)
  10519c:	8d 74 26 00          	lea    0x0(%esi),%esi
  1051a0:	75 b2                	jne    105154 <trap+0xe4>
  1051a2:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  1051a5:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  1051a8:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  1051ab:	89 ec                	mov    %ebp,%esp
  1051ad:	5d                   	pop    %ebp
  1051ae:	e9 1d e5 ff ff       	jmp    1036d0 <yield>
  1051b3:	e8 08 e1 ff ff       	call   1032c0 <curproc>
  1051b8:	8b 48 1c             	mov    0x1c(%eax),%ecx
  1051bb:	85 c9                	test   %ecx,%ecx
  1051bd:	0f 85 e9 00 00 00    	jne    1052ac <trap+0x23c>
  1051c3:	e8 f8 e0 ff ff       	call   1032c0 <curproc>
  1051c8:	89 b8 84 00 00 00    	mov    %edi,0x84(%eax)
  1051ce:	e8 4d f1 ff ff       	call   104320 <syscall>
  1051d3:	e8 e8 e0 ff ff       	call   1032c0 <curproc>
  1051d8:	8b 50 1c             	mov    0x1c(%eax),%edx
  1051db:	85 d2                	test   %edx,%edx
  1051dd:	0f 84 71 ff ff ff    	je     105154 <trap+0xe4>
  1051e3:	8b 5d f4             	mov    0xfffffff4(%ebp),%ebx
  1051e6:	8b 75 f8             	mov    0xfffffff8(%ebp),%esi
  1051e9:	8b 7d fc             	mov    0xfffffffc(%ebp),%edi
  1051ec:	89 ec                	mov    %ebp,%esp
  1051ee:	5d                   	pop    %ebp
  1051ef:	e9 fc e1 ff ff       	jmp    1033f0 <exit>
  1051f4:	8b 47 30             	mov    0x30(%edi),%eax
  1051f7:	89 45 ec             	mov    %eax,0xffffffec(%ebp)
  1051fa:	e8 51 d5 ff ff       	call   102750 <cpu>
  1051ff:	8b 57 2c             	mov    0x2c(%edi),%edx
  105202:	89 55 e4             	mov    %edx,0xffffffe4(%ebp)
  105205:	89 c3                	mov    %eax,%ebx
  105207:	8b 47 28             	mov    0x28(%edi),%eax
  10520a:	89 45 f0             	mov    %eax,0xfffffff0(%ebp)
  10520d:	e8 ae e0 ff ff       	call   1032c0 <curproc>
  105212:	89 c6                	mov    %eax,%esi
  105214:	e8 a7 e0 ff ff       	call   1032c0 <curproc>
  105219:	8b 55 ec             	mov    0xffffffec(%ebp),%edx
  10521c:	89 5c 24 14          	mov    %ebx,0x14(%esp)
  105220:	89 54 24 18          	mov    %edx,0x18(%esp)
  105224:	8b 55 e4             	mov    0xffffffe4(%ebp),%edx
  105227:	89 54 24 10          	mov    %edx,0x10(%esp)
  10522b:	8b 55 f0             	mov    0xfffffff0(%ebp),%edx
  10522e:	89 54 24 0c          	mov    %edx,0xc(%esp)
  105232:	8d 96 88 00 00 00    	lea    0x88(%esi),%edx
  105238:	89 54 24 08          	mov    %edx,0x8(%esp)
  10523c:	8b 40 10             	mov    0x10(%eax),%eax
  10523f:	c7 04 24 e4 64 10 00 	movl   $0x1064e4,(%esp)
  105246:	89 44 24 04          	mov    %eax,0x4(%esp)
  10524a:	e8 e1 b4 ff ff       	call   100730 <cprintf>
  10524f:	e8 6c e0 ff ff       	call   1032c0 <curproc>
  105254:	c7 40 1c 01 00 00 00 	movl   $0x1,0x1c(%eax)
  10525b:	e9 0b ff ff ff       	jmp    10516b <trap+0xfb>
  105260:	e8 db cd ff ff       	call   102040 <ide_intr>
  105265:	e9 c6 fe ff ff       	jmp    105130 <trap+0xc0>
  10526a:	8d b6 00 00 00 00    	lea    0x0(%esi),%esi
  105270:	e8 db d4 ff ff       	call   102750 <cpu>
  105275:	85 c0                	test   %eax,%eax
  105277:	0f 85 b3 fe ff ff    	jne    105130 <trap+0xc0>
  10527d:	c7 04 24 80 d7 10 00 	movl   $0x10d780,(%esp)
  105284:	e8 87 ec ff ff       	call   103f10 <acquire>
  105289:	ff 05 c0 df 10 00    	incl   0x10dfc0
  10528f:	c7 04 24 c0 df 10 00 	movl   $0x10dfc0,(%esp)
  105296:	e8 f5 df ff ff       	call   103290 <wakeup>
  10529b:	c7 04 24 80 d7 10 00 	movl   $0x10d780,(%esp)
  1052a2:	e8 29 ec ff ff       	call   103ed0 <release>
  1052a7:	e9 84 fe ff ff       	jmp    105130 <trap+0xc0>
  1052ac:	e8 3f e1 ff ff       	call   1033f0 <exit>
  1052b1:	e9 0d ff ff ff       	jmp    1051c3 <trap+0x153>
  1052b6:	8d 76 00             	lea    0x0(%esi),%esi
  1052b9:	8d bc 27 00 00 00 00 	lea    0x0(%edi),%edi

001052c0 <tvinit>:
  1052c0:	55                   	push   %ebp
  1052c1:	31 d2                	xor    %edx,%edx
  1052c3:	89 e5                	mov    %esp,%ebp
  1052c5:	83 ec 08             	sub    $0x8,%esp
  1052c8:	90                   	nop    
  1052c9:	8d b4 26 00 00 00 00 	lea    0x0(%esi),%esi
  1052d0:	8b 04 95 08 73 10 00 	mov    0x107308(,%edx,4),%eax
  1052d7:	b9 08 00 00 00       	mov    $0x8,%ecx
  1052dc:	66 89 0c d5 c2 d7 10 	mov    %cx,0x10d7c2(,%edx,8)
  1052e3:	00 
  1052e4:	31 c9                	xor    %ecx,%ecx
  1052e6:	88 0c d5 c4 d7 10 00 	mov    %cl,0x10d7c4(,%edx,8)
  1052ed:	b1 8e                	mov    $0x8e,%cl
  1052ef:	88 0c d5 c5 d7 10 00 	mov    %cl,0x10d7c5(,%edx,8)
  1052f6:	66 89 04 d5 c0 d7 10 	mov    %ax,0x10d7c0(,%edx,8)
  1052fd:	00 
  1052fe:	c1 e8 10             	shr    $0x10,%eax
  105301:	66 89 04 d5 c6 d7 10 	mov    %ax,0x10d7c6(,%edx,8)
  105308:	00 
  105309:	42                   	inc    %edx
  10530a:	81 fa 00 01 00 00    	cmp    $0x100,%edx
  105310:	75 be                	jne    1052d0 <tvinit+0x10>
  105312:	a1 c8 73 10 00       	mov    0x1073c8,%eax
  105317:	ba 08 00 00 00       	mov    $0x8,%edx
  10531c:	c7 04 24 80 d7 10 00 	movl   $0x10d780,(%esp)
  105323:	66 89 15 42 d9 10 00 	mov    %dx,0x10d942
  10532a:	c6 05 44 d9 10 00 00 	movb   $0x0,0x10d944
  105331:	66 a3 40 d9 10 00    	mov    %ax,0x10d940
  105337:	c1 e8 10             	shr    $0x10,%eax
  10533a:	66 a3 46 d9 10 00    	mov    %ax,0x10d946
  105340:	b8 25 65 10 00       	mov    $0x106525,%eax
  105345:	89 44 24 04          	mov    %eax,0x4(%esp)
  105349:	c6 05 45 d9 10 00 ef 	movb   $0xef,0x10d945
  105350:	e8 db e9 ff ff       	call   103d30 <initlock>
  105355:	c9                   	leave  
  105356:	c3                   	ret    
  105357:	90                   	nop    

00105358 <vector0>:
  105358:	6a 00                	push   $0x0
  10535a:	6a 00                	push   $0x0
  10535c:	e9 b7 fc ff ff       	jmp    105018 <alltraps>

00105361 <vector1>:
  105361:	6a 00                	push   $0x0
  105363:	6a 01                	push   $0x1
  105365:	e9 ae fc ff ff       	jmp    105018 <alltraps>

0010536a <vector2>:
  10536a:	6a 00                	push   $0x0
  10536c:	6a 02                	push   $0x2
  10536e:	e9 a5 fc ff ff       	jmp    105018 <alltraps>

00105373 <vector3>:
  105373:	6a 00                	push   $0x0
  105375:	6a 03                	push   $0x3
  105377:	e9 9c fc ff ff       	jmp    105018 <alltraps>

0010537c <vector4>:
  10537c:	6a 00                	push   $0x0
  10537e:	6a 04                	push   $0x4
  105380:	e9 93 fc ff ff       	jmp    105018 <alltraps>

00105385 <vector5>:
  105385:	6a 00                	push   $0x0
  105387:	6a 05                	push   $0x5
  105389:	e9 8a fc ff ff       	jmp    105018 <alltraps>

0010538e <vector6>:
  10538e:	6a 00                	push   $0x0
  105390:	6a 06                	push   $0x6
  105392:	e9 81 fc ff ff       	jmp    105018 <alltraps>

00105397 <vector7>:
  105397:	6a 00                	push   $0x0
  105399:	6a 07                	push   $0x7
  10539b:	e9 78 fc ff ff       	jmp    105018 <alltraps>

001053a0 <vector8>:
  1053a0:	6a 08                	push   $0x8
  1053a2:	e9 71 fc ff ff       	jmp    105018 <alltraps>

001053a7 <vector9>:
  1053a7:	6a 09                	push   $0x9
  1053a9:	e9 6a fc ff ff       	jmp    105018 <alltraps>

001053ae <vector10>:
  1053ae:	6a 0a                	push   $0xa
  1053b0:	e9 63 fc ff ff       	jmp    105018 <alltraps>

001053b5 <vector11>:
  1053b5:	6a 0b                	push   $0xb
  1053b7:	e9 5c fc ff ff       	jmp    105018 <alltraps>

001053bc <vector12>:
  1053bc:	6a 0c                	push   $0xc
  1053be:	e9 55 fc ff ff       	jmp    105018 <alltraps>

001053c3 <vector13>:
  1053c3:	6a 0d                	push   $0xd
  1053c5:	e9 4e fc ff ff       	jmp    105018 <alltraps>

001053ca <vector14>:
  1053ca:	6a 0e                	push   $0xe
  1053cc:	e9 47 fc ff ff       	jmp    105018 <alltraps>

001053d1 <vector15>:
  1053d1:	6a 00                	push   $0x0
  1053d3:	6a 0f                	push   $0xf
  1053d5:	e9 3e fc ff ff       	jmp    105018 <alltraps>

001053da <vector16>:
  1053da:	6a 00                	push   $0x0
  1053dc:	6a 10                	push   $0x10
  1053de:	e9 35 fc ff ff       	jmp    105018 <alltraps>

001053e3 <vector17>:
  1053e3:	6a 11                	push   $0x11
  1053e5:	e9 2e fc ff ff       	jmp    105018 <alltraps>

001053ea <vector18>:
  1053ea:	6a 00                	push   $0x0
  1053ec:	6a 12                	push   $0x12
  1053ee:	e9 25 fc ff ff       	jmp    105018 <alltraps>

001053f3 <vector19>:
  1053f3:	6a 00                	push   $0x0
  1053f5:	6a 13                	push   $0x13
  1053f7:	e9 1c fc ff ff       	jmp    105018 <alltraps>

001053fc <vector20>:
  1053fc:	6a 00                	push   $0x0
  1053fe:	6a 14                	push   $0x14
  105400:	e9 13 fc ff ff       	jmp    105018 <alltraps>

00105405 <vector21>:
  105405:	6a 00                	push   $0x0
  105407:	6a 15                	push   $0x15
  105409:	e9 0a fc ff ff       	jmp    105018 <alltraps>

0010540e <vector22>:
  10540e:	6a 00                	push   $0x0
  105410:	6a 16                	push   $0x16
  105412:	e9 01 fc ff ff       	jmp    105018 <alltraps>

00105417 <vector23>:
  105417:	6a 00                	push   $0x0
  105419:	6a 17                	push   $0x17
  10541b:	e9 f8 fb ff ff       	jmp    105018 <alltraps>

00105420 <vector24>:
  105420:	6a 00                	push   $0x0
  105422:	6a 18                	push   $0x18
  105424:	e9 ef fb ff ff       	jmp    105018 <alltraps>

00105429 <vector25>:
  105429:	6a 00                	push   $0x0
  10542b:	6a 19                	push   $0x19
  10542d:	e9 e6 fb ff ff       	jmp    105018 <alltraps>

00105432 <vector26>:
  105432:	6a 00                	push   $0x0
  105434:	6a 1a                	push   $0x1a
  105436:	e9 dd fb ff ff       	jmp    105018 <alltraps>

0010543b <vector27>:
  10543b:	6a 00                	push   $0x0
  10543d:	6a 1b                	push   $0x1b
  10543f:	e9 d4 fb ff ff       	jmp    105018 <alltraps>

00105444 <vector28>:
  105444:	6a 00                	push   $0x0
  105446:	6a 1c                	push   $0x1c
  105448:	e9 cb fb ff ff       	jmp    105018 <alltraps>

0010544d <vector29>:
  10544d:	6a 00                	push   $0x0
  10544f:	6a 1d                	push   $0x1d
  105451:	e9 c2 fb ff ff       	jmp    105018 <alltraps>

00105456 <vector30>:
  105456:	6a 00                	push   $0x0
  105458:	6a 1e                	push   $0x1e
  10545a:	e9 b9 fb ff ff       	jmp    105018 <alltraps>

0010545f <vector31>:
  10545f:	6a 00                	push   $0x0
  105461:	6a 1f                	push   $0x1f
  105463:	e9 b0 fb ff ff       	jmp    105018 <alltraps>

00105468 <vector32>:
  105468:	6a 00                	push   $0x0
  10546a:	6a 20                	push   $0x20
  10546c:	e9 a7 fb ff ff       	jmp    105018 <alltraps>

00105471 <vector33>:
  105471:	6a 00                	push   $0x0
  105473:	6a 21                	push   $0x21
  105475:	e9 9e fb ff ff       	jmp    105018 <alltraps>

0010547a <vector34>:
  10547a:	6a 00                	push   $0x0
  10547c:	6a 22                	push   $0x22
  10547e:	e9 95 fb ff ff       	jmp    105018 <alltraps>

00105483 <vector35>:
  105483:	6a 00                	push   $0x0
  105485:	6a 23                	push   $0x23
  105487:	e9 8c fb ff ff       	jmp    105018 <alltraps>

0010548c <vector36>:
  10548c:	6a 00                	push   $0x0
  10548e:	6a 24                	push   $0x24
  105490:	e9 83 fb ff ff       	jmp    105018 <alltraps>

00105495 <vector37>:
  105495:	6a 00                	push   $0x0
  105497:	6a 25                	push   $0x25
  105499:	e9 7a fb ff ff       	jmp    105018 <alltraps>

0010549e <vector38>:
  10549e:	6a 00                	push   $0x0
  1054a0:	6a 26                	push   $0x26
  1054a2:	e9 71 fb ff ff       	jmp    105018 <alltraps>

001054a7 <vector39>:
  1054a7:	6a 00                	push   $0x0
  1054a9:	6a 27                	push   $0x27
  1054ab:	e9 68 fb ff ff       	jmp    105018 <alltraps>

001054b0 <vector40>:
  1054b0:	6a 00                	push   $0x0
  1054b2:	6a 28                	push   $0x28
  1054b4:	e9 5f fb ff ff       	jmp    105018 <alltraps>

001054b9 <vector41>:
  1054b9:	6a 00                	push   $0x0
  1054bb:	6a 29                	push   $0x29
  1054bd:	e9 56 fb ff ff       	jmp    105018 <alltraps>

001054c2 <vector42>:
  1054c2:	6a 00                	push   $0x0
  1054c4:	6a 2a                	push   $0x2a
  1054c6:	e9 4d fb ff ff       	jmp    105018 <alltraps>

001054cb <vector43>:
  1054cb:	6a 00                	push   $0x0
  1054cd:	6a 2b                	push   $0x2b
  1054cf:	e9 44 fb ff ff       	jmp    105018 <alltraps>

001054d4 <vector44>:
  1054d4:	6a 00                	push   $0x0
  1054d6:	6a 2c                	push   $0x2c
  1054d8:	e9 3b fb ff ff       	jmp    105018 <alltraps>

001054dd <vector45>:
  1054dd:	6a 00                	push   $0x0
  1054df:	6a 2d                	push   $0x2d
  1054e1:	e9 32 fb ff ff       	jmp    105018 <alltraps>

001054e6 <vector46>:
  1054e6:	6a 00                	push   $0x0
  1054e8:	6a 2e                	push   $0x2e
  1054ea:	e9 29 fb ff ff       	jmp    105018 <alltraps>

001054ef <vector47>:
  1054ef:	6a 00                	push   $0x0
  1054f1:	6a 2f                	push   $0x2f
  1054f3:	e9 20 fb ff ff       	jmp    105018 <alltraps>

001054f8 <vector48>:
  1054f8:	6a 00                	push   $0x0
  1054fa:	6a 30                	push   $0x30
  1054fc:	e9 17 fb ff ff       	jmp    105018 <alltraps>

00105501 <vector49>:
  105501:	6a 00                	push   $0x0
  105503:	6a 31                	push   $0x31
  105505:	e9 0e fb ff ff       	jmp    105018 <alltraps>

0010550a <vector50>:
  10550a:	6a 00                	push   $0x0
  10550c:	6a 32                	push   $0x32
  10550e:	e9 05 fb ff ff       	jmp    105018 <alltraps>

00105513 <vector51>:
  105513:	6a 00                	push   $0x0
  105515:	6a 33                	push   $0x33
  105517:	e9 fc fa ff ff       	jmp    105018 <alltraps>

0010551c <vector52>:
  10551c:	6a 00                	push   $0x0
  10551e:	6a 34                	push   $0x34
  105520:	e9 f3 fa ff ff       	jmp    105018 <alltraps>

00105525 <vector53>:
  105525:	6a 00                	push   $0x0
  105527:	6a 35                	push   $0x35
  105529:	e9 ea fa ff ff       	jmp    105018 <alltraps>

0010552e <vector54>:
  10552e:	6a 00                	push   $0x0
  105530:	6a 36                	push   $0x36
  105532:	e9 e1 fa ff ff       	jmp    105018 <alltraps>

00105537 <vector55>:
  105537:	6a 00                	push   $0x0
  105539:	6a 37                	push   $0x37
  10553b:	e9 d8 fa ff ff       	jmp    105018 <alltraps>

00105540 <vector56>:
  105540:	6a 00                	push   $0x0
  105542:	6a 38                	push   $0x38
  105544:	e9 cf fa ff ff       	jmp    105018 <alltraps>

00105549 <vector57>:
  105549:	6a 00                	push   $0x0
  10554b:	6a 39                	push   $0x39
  10554d:	e9 c6 fa ff ff       	jmp    105018 <alltraps>

00105552 <vector58>:
  105552:	6a 00                	push   $0x0
  105554:	6a 3a                	push   $0x3a
  105556:	e9 bd fa ff ff       	jmp    105018 <alltraps>

0010555b <vector59>:
  10555b:	6a 00                	push   $0x0
  10555d:	6a 3b                	push   $0x3b
  10555f:	e9 b4 fa ff ff       	jmp    105018 <alltraps>

00105564 <vector60>:
  105564:	6a 00                	push   $0x0
  105566:	6a 3c                	push   $0x3c
  105568:	e9 ab fa ff ff       	jmp    105018 <alltraps>

0010556d <vector61>:
  10556d:	6a 00                	push   $0x0
  10556f:	6a 3d                	push   $0x3d
  105571:	e9 a2 fa ff ff       	jmp    105018 <alltraps>

00105576 <vector62>:
  105576:	6a 00                	push   $0x0
  105578:	6a 3e                	push   $0x3e
  10557a:	e9 99 fa ff ff       	jmp    105018 <alltraps>

0010557f <vector63>:
  10557f:	6a 00                	push   $0x0
  105581:	6a 3f                	push   $0x3f
  105583:	e9 90 fa ff ff       	jmp    105018 <alltraps>

00105588 <vector64>:
  105588:	6a 00                	push   $0x0
  10558a:	6a 40                	push   $0x40
  10558c:	e9 87 fa ff ff       	jmp    105018 <alltraps>

00105591 <vector65>:
  105591:	6a 00                	push   $0x0
  105593:	6a 41                	push   $0x41
  105595:	e9 7e fa ff ff       	jmp    105018 <alltraps>

0010559a <vector66>:
  10559a:	6a 00                	push   $0x0
  10559c:	6a 42                	push   $0x42
  10559e:	e9 75 fa ff ff       	jmp    105018 <alltraps>

001055a3 <vector67>:
  1055a3:	6a 00                	push   $0x0
  1055a5:	6a 43                	push   $0x43
  1055a7:	e9 6c fa ff ff       	jmp    105018 <alltraps>

001055ac <vector68>:
  1055ac:	6a 00                	push   $0x0
  1055ae:	6a 44                	push   $0x44
  1055b0:	e9 63 fa ff ff       	jmp    105018 <alltraps>

001055b5 <vector69>:
  1055b5:	6a 00                	push   $0x0
  1055b7:	6a 45                	push   $0x45
  1055b9:	e9 5a fa ff ff       	jmp    105018 <alltraps>

001055be <vector70>:
  1055be:	6a 00                	push   $0x0
  1055c0:	6a 46                	push   $0x46
  1055c2:	e9 51 fa ff ff       	jmp    105018 <alltraps>

001055c7 <vector71>:
  1055c7:	6a 00                	push   $0x0
  1055c9:	6a 47                	push   $0x47
  1055cb:	e9 48 fa ff ff       	jmp    105018 <alltraps>

001055d0 <vector72>:
  1055d0:	6a 00                	push   $0x0
  1055d2:	6a 48                	push   $0x48
  1055d4:	e9 3f fa ff ff       	jmp    105018 <alltraps>

001055d9 <vector73>:
  1055d9:	6a 00                	push   $0x0
  1055db:	6a 49                	push   $0x49
  1055dd:	e9 36 fa ff ff       	jmp    105018 <alltraps>

001055e2 <vector74>:
  1055e2:	6a 00                	push   $0x0
  1055e4:	6a 4a                	push   $0x4a
  1055e6:	e9 2d fa ff ff       	jmp    105018 <alltraps>

001055eb <vector75>:
  1055eb:	6a 00                	push   $0x0
  1055ed:	6a 4b                	push   $0x4b
  1055ef:	e9 24 fa ff ff       	jmp    105018 <alltraps>

001055f4 <vector76>:
  1055f4:	6a 00                	push   $0x0
  1055f6:	6a 4c                	push   $0x4c
  1055f8:	e9 1b fa ff ff       	jmp    105018 <alltraps>

001055fd <vector77>:
  1055fd:	6a 00                	push   $0x0
  1055ff:	6a 4d                	push   $0x4d
  105601:	e9 12 fa ff ff       	jmp    105018 <alltraps>

00105606 <vector78>:
  105606:	6a 00                	push   $0x0
  105608:	6a 4e                	push   $0x4e
  10560a:	e9 09 fa ff ff       	jmp    105018 <alltraps>

0010560f <vector79>:
  10560f:	6a 00                	push   $0x0
  105611:	6a 4f                	push   $0x4f
  105613:	e9 00 fa ff ff       	jmp    105018 <alltraps>

00105618 <vector80>:
  105618:	6a 00                	push   $0x0
  10561a:	6a 50                	push   $0x50
  10561c:	e9 f7 f9 ff ff       	jmp    105018 <alltraps>

00105621 <vector81>:
  105621:	6a 00                	push   $0x0
  105623:	6a 51                	push   $0x51
  105625:	e9 ee f9 ff ff       	jmp    105018 <alltraps>

0010562a <vector82>:
  10562a:	6a 00                	push   $0x0
  10562c:	6a 52                	push   $0x52
  10562e:	e9 e5 f9 ff ff       	jmp    105018 <alltraps>

00105633 <vector83>:
  105633:	6a 00                	push   $0x0
  105635:	6a 53                	push   $0x53
  105637:	e9 dc f9 ff ff       	jmp    105018 <alltraps>

0010563c <vector84>:
  10563c:	6a 00                	push   $0x0
  10563e:	6a 54                	push   $0x54
  105640:	e9 d3 f9 ff ff       	jmp    105018 <alltraps>

00105645 <vector85>:
  105645:	6a 00                	push   $0x0
  105647:	6a 55                	push   $0x55
  105649:	e9 ca f9 ff ff       	jmp    105018 <alltraps>

0010564e <vector86>:
  10564e:	6a 00                	push   $0x0
  105650:	6a 56                	push   $0x56
  105652:	e9 c1 f9 ff ff       	jmp    105018 <alltraps>

00105657 <vector87>:
  105657:	6a 00                	push   $0x0
  105659:	6a 57                	push   $0x57
  10565b:	e9 b8 f9 ff ff       	jmp    105018 <alltraps>

00105660 <vector88>:
  105660:	6a 00                	push   $0x0
  105662:	6a 58                	push   $0x58
  105664:	e9 af f9 ff ff       	jmp    105018 <alltraps>

00105669 <vector89>:
  105669:	6a 00                	push   $0x0
  10566b:	6a 59                	push   $0x59
  10566d:	e9 a6 f9 ff ff       	jmp    105018 <alltraps>

00105672 <vector90>:
  105672:	6a 00                	push   $0x0
  105674:	6a 5a                	push   $0x5a
  105676:	e9 9d f9 ff ff       	jmp    105018 <alltraps>

0010567b <vector91>:
  10567b:	6a 00                	push   $0x0
  10567d:	6a 5b                	push   $0x5b
  10567f:	e9 94 f9 ff ff       	jmp    105018 <alltraps>

00105684 <vector92>:
  105684:	6a 00                	push   $0x0
  105686:	6a 5c                	push   $0x5c
  105688:	e9 8b f9 ff ff       	jmp    105018 <alltraps>

0010568d <vector93>:
  10568d:	6a 00                	push   $0x0
  10568f:	6a 5d                	push   $0x5d
  105691:	e9 82 f9 ff ff       	jmp    105018 <alltraps>

00105696 <vector94>:
  105696:	6a 00                	push   $0x0
  105698:	6a 5e                	push   $0x5e
  10569a:	e9 79 f9 ff ff       	jmp    105018 <alltraps>

0010569f <vector95>:
  10569f:	6a 00                	push   $0x0
  1056a1:	6a 5f                	push   $0x5f
  1056a3:	e9 70 f9 ff ff       	jmp    105018 <alltraps>

001056a8 <vector96>:
  1056a8:	6a 00                	push   $0x0
  1056aa:	6a 60                	push   $0x60
  1056ac:	e9 67 f9 ff ff       	jmp    105018 <alltraps>

001056b1 <vector97>:
  1056b1:	6a 00                	push   $0x0
  1056b3:	6a 61                	push   $0x61
  1056b5:	e9 5e f9 ff ff       	jmp    105018 <alltraps>

001056ba <vector98>:
  1056ba:	6a 00                	push   $0x0
  1056bc:	6a 62                	push   $0x62
  1056be:	e9 55 f9 ff ff       	jmp    105018 <alltraps>

001056c3 <vector99>:
  1056c3:	6a 00                	push   $0x0
  1056c5:	6a 63                	push   $0x63
  1056c7:	e9 4c f9 ff ff       	jmp    105018 <alltraps>

001056cc <vector100>:
  1056cc:	6a 00                	push   $0x0
  1056ce:	6a 64                	push   $0x64
  1056d0:	e9 43 f9 ff ff       	jmp    105018 <alltraps>

001056d5 <vector101>:
  1056d5:	6a 00                	push   $0x0
  1056d7:	6a 65                	push   $0x65
  1056d9:	e9 3a f9 ff ff       	jmp    105018 <alltraps>

001056de <vector102>:
  1056de:	6a 00                	push   $0x0
  1056e0:	6a 66                	push   $0x66
  1056e2:	e9 31 f9 ff ff       	jmp    105018 <alltraps>

001056e7 <vector103>:
  1056e7:	6a 00                	push   $0x0
  1056e9:	6a 67                	push   $0x67
  1056eb:	e9 28 f9 ff ff       	jmp    105018 <alltraps>

001056f0 <vector104>:
  1056f0:	6a 00                	push   $0x0
  1056f2:	6a 68                	push   $0x68
  1056f4:	e9 1f f9 ff ff       	jmp    105018 <alltraps>

001056f9 <vector105>:
  1056f9:	6a 00                	push   $0x0
  1056fb:	6a 69                	push   $0x69
  1056fd:	e9 16 f9 ff ff       	jmp    105018 <alltraps>

00105702 <vector106>:
  105702:	6a 00                	push   $0x0
  105704:	6a 6a                	push   $0x6a
  105706:	e9 0d f9 ff ff       	jmp    105018 <alltraps>

0010570b <vector107>:
  10570b:	6a 00                	push   $0x0
  10570d:	6a 6b                	push   $0x6b
  10570f:	e9 04 f9 ff ff       	jmp    105018 <alltraps>

00105714 <vector108>:
  105714:	6a 00                	push   $0x0
  105716:	6a 6c                	push   $0x6c
  105718:	e9 fb f8 ff ff       	jmp    105018 <alltraps>

0010571d <vector109>:
  10571d:	6a 00                	push   $0x0
  10571f:	6a 6d                	push   $0x6d
  105721:	e9 f2 f8 ff ff       	jmp    105018 <alltraps>

00105726 <vector110>:
  105726:	6a 00                	push   $0x0
  105728:	6a 6e                	push   $0x6e
  10572a:	e9 e9 f8 ff ff       	jmp    105018 <alltraps>

0010572f <vector111>:
  10572f:	6a 00                	push   $0x0
  105731:	6a 6f                	push   $0x6f
  105733:	e9 e0 f8 ff ff       	jmp    105018 <alltraps>

00105738 <vector112>:
  105738:	6a 00                	push   $0x0
  10573a:	6a 70                	push   $0x70
  10573c:	e9 d7 f8 ff ff       	jmp    105018 <alltraps>

00105741 <vector113>:
  105741:	6a 00                	push   $0x0
  105743:	6a 71                	push   $0x71
  105745:	e9 ce f8 ff ff       	jmp    105018 <alltraps>

0010574a <vector114>:
  10574a:	6a 00                	push   $0x0
  10574c:	6a 72                	push   $0x72
  10574e:	e9 c5 f8 ff ff       	jmp    105018 <alltraps>

00105753 <vector115>:
  105753:	6a 00                	push   $0x0
  105755:	6a 73                	push   $0x73
  105757:	e9 bc f8 ff ff       	jmp    105018 <alltraps>

0010575c <vector116>:
  10575c:	6a 00                	push   $0x0
  10575e:	6a 74                	push   $0x74
  105760:	e9 b3 f8 ff ff       	jmp    105018 <alltraps>

00105765 <vector117>:
  105765:	6a 00                	push   $0x0
  105767:	6a 75                	push   $0x75
  105769:	e9 aa f8 ff ff       	jmp    105018 <alltraps>

0010576e <vector118>:
  10576e:	6a 00                	push   $0x0
  105770:	6a 76                	push   $0x76
  105772:	e9 a1 f8 ff ff       	jmp    105018 <alltraps>

00105777 <vector119>:
  105777:	6a 00                	push   $0x0
  105779:	6a 77                	push   $0x77
  10577b:	e9 98 f8 ff ff       	jmp    105018 <alltraps>

00105780 <vector120>:
  105780:	6a 00                	push   $0x0
  105782:	6a 78                	push   $0x78
  105784:	e9 8f f8 ff ff       	jmp    105018 <alltraps>

00105789 <vector121>:
  105789:	6a 00                	push   $0x0
  10578b:	6a 79                	push   $0x79
  10578d:	e9 86 f8 ff ff       	jmp    105018 <alltraps>

00105792 <vector122>:
  105792:	6a 00                	push   $0x0
  105794:	6a 7a                	push   $0x7a
  105796:	e9 7d f8 ff ff       	jmp    105018 <alltraps>

0010579b <vector123>:
  10579b:	6a 00                	push   $0x0
  10579d:	6a 7b                	push   $0x7b
  10579f:	e9 74 f8 ff ff       	jmp    105018 <alltraps>

001057a4 <vector124>:
  1057a4:	6a 00                	push   $0x0
  1057a6:	6a 7c                	push   $0x7c
  1057a8:	e9 6b f8 ff ff       	jmp    105018 <alltraps>

001057ad <vector125>:
  1057ad:	6a 00                	push   $0x0
  1057af:	6a 7d                	push   $0x7d
  1057b1:	e9 62 f8 ff ff       	jmp    105018 <alltraps>

001057b6 <vector126>:
  1057b6:	6a 00                	push   $0x0
  1057b8:	6a 7e                	push   $0x7e
  1057ba:	e9 59 f8 ff ff       	jmp    105018 <alltraps>

001057bf <vector127>:
  1057bf:	6a 00                	push   $0x0
  1057c1:	6a 7f                	push   $0x7f
  1057c3:	e9 50 f8 ff ff       	jmp    105018 <alltraps>

001057c8 <vector128>:
  1057c8:	6a 00                	push   $0x0
  1057ca:	68 80 00 00 00       	push   $0x80
  1057cf:	e9 44 f8 ff ff       	jmp    105018 <alltraps>

001057d4 <vector129>:
  1057d4:	6a 00                	push   $0x0
  1057d6:	68 81 00 00 00       	push   $0x81
  1057db:	e9 38 f8 ff ff       	jmp    105018 <alltraps>

001057e0 <vector130>:
  1057e0:	6a 00                	push   $0x0
  1057e2:	68 82 00 00 00       	push   $0x82
  1057e7:	e9 2c f8 ff ff       	jmp    105018 <alltraps>

001057ec <vector131>:
  1057ec:	6a 00                	push   $0x0
  1057ee:	68 83 00 00 00       	push   $0x83
  1057f3:	e9 20 f8 ff ff       	jmp    105018 <alltraps>

001057f8 <vector132>:
  1057f8:	6a 00                	push   $0x0
  1057fa:	68 84 00 00 00       	push   $0x84
  1057ff:	e9 14 f8 ff ff       	jmp    105018 <alltraps>

00105804 <vector133>:
  105804:	6a 00                	push   $0x0
  105806:	68 85 00 00 00       	push   $0x85
  10580b:	e9 08 f8 ff ff       	jmp    105018 <alltraps>

00105810 <vector134>:
  105810:	6a 00                	push   $0x0
  105812:	68 86 00 00 00       	push   $0x86
  105817:	e9 fc f7 ff ff       	jmp    105018 <alltraps>

0010581c <vector135>:
  10581c:	6a 00                	push   $0x0
  10581e:	68 87 00 00 00       	push   $0x87
  105823:	e9 f0 f7 ff ff       	jmp    105018 <alltraps>

00105828 <vector136>:
  105828:	6a 00                	push   $0x0
  10582a:	68 88 00 00 00       	push   $0x88
  10582f:	e9 e4 f7 ff ff       	jmp    105018 <alltraps>

00105834 <vector137>:
  105834:	6a 00                	push   $0x0
  105836:	68 89 00 00 00       	push   $0x89
  10583b:	e9 d8 f7 ff ff       	jmp    105018 <alltraps>

00105840 <vector138>:
  105840:	6a 00                	push   $0x0
  105842:	68 8a 00 00 00       	push   $0x8a
  105847:	e9 cc f7 ff ff       	jmp    105018 <alltraps>

0010584c <vector139>:
  10584c:	6a 00                	push   $0x0
  10584e:	68 8b 00 00 00       	push   $0x8b
  105853:	e9 c0 f7 ff ff       	jmp    105018 <alltraps>

00105858 <vector140>:
  105858:	6a 00                	push   $0x0
  10585a:	68 8c 00 00 00       	push   $0x8c
  10585f:	e9 b4 f7 ff ff       	jmp    105018 <alltraps>

00105864 <vector141>:
  105864:	6a 00                	push   $0x0
  105866:	68 8d 00 00 00       	push   $0x8d
  10586b:	e9 a8 f7 ff ff       	jmp    105018 <alltraps>

00105870 <vector142>:
  105870:	6a 00                	push   $0x0
  105872:	68 8e 00 00 00       	push   $0x8e
  105877:	e9 9c f7 ff ff       	jmp    105018 <alltraps>

0010587c <vector143>:
  10587c:	6a 00                	push   $0x0
  10587e:	68 8f 00 00 00       	push   $0x8f
  105883:	e9 90 f7 ff ff       	jmp    105018 <alltraps>

00105888 <vector144>:
  105888:	6a 00                	push   $0x0
  10588a:	68 90 00 00 00       	push   $0x90
  10588f:	e9 84 f7 ff ff       	jmp    105018 <alltraps>

00105894 <vector145>:
  105894:	6a 00                	push   $0x0
  105896:	68 91 00 00 00       	push   $0x91
  10589b:	e9 78 f7 ff ff       	jmp    105018 <alltraps>

001058a0 <vector146>:
  1058a0:	6a 00                	push   $0x0
  1058a2:	68 92 00 00 00       	push   $0x92
  1058a7:	e9 6c f7 ff ff       	jmp    105018 <alltraps>

001058ac <vector147>:
  1058ac:	6a 00                	push   $0x0
  1058ae:	68 93 00 00 00       	push   $0x93
  1058b3:	e9 60 f7 ff ff       	jmp    105018 <alltraps>

001058b8 <vector148>:
  1058b8:	6a 00                	push   $0x0
  1058ba:	68 94 00 00 00       	push   $0x94
  1058bf:	e9 54 f7 ff ff       	jmp    105018 <alltraps>

001058c4 <vector149>:
  1058c4:	6a 00                	push   $0x0
  1058c6:	68 95 00 00 00       	push   $0x95
  1058cb:	e9 48 f7 ff ff       	jmp    105018 <alltraps>

001058d0 <vector150>:
  1058d0:	6a 00                	push   $0x0
  1058d2:	68 96 00 00 00       	push   $0x96
  1058d7:	e9 3c f7 ff ff       	jmp    105018 <alltraps>

001058dc <vector151>:
  1058dc:	6a 00                	push   $0x0
  1058de:	68 97 00 00 00       	push   $0x97
  1058e3:	e9 30 f7 ff ff       	jmp    105018 <alltraps>

001058e8 <vector152>:
  1058e8:	6a 00                	push   $0x0
  1058ea:	68 98 00 00 00       	push   $0x98
  1058ef:	e9 24 f7 ff ff       	jmp    105018 <alltraps>

001058f4 <vector153>:
  1058f4:	6a 00                	push   $0x0
  1058f6:	68 99 00 00 00       	push   $0x99
  1058fb:	e9 18 f7 ff ff       	jmp    105018 <alltraps>

00105900 <vector154>:
  105900:	6a 00                	push   $0x0
  105902:	68 9a 00 00 00       	push   $0x9a
  105907:	e9 0c f7 ff ff       	jmp    105018 <alltraps>

0010590c <vector155>:
  10590c:	6a 00                	push   $0x0
  10590e:	68 9b 00 00 00       	push   $0x9b
  105913:	e9 00 f7 ff ff       	jmp    105018 <alltraps>

00105918 <vector156>:
  105918:	6a 00                	push   $0x0
  10591a:	68 9c 00 00 00       	push   $0x9c
  10591f:	e9 f4 f6 ff ff       	jmp    105018 <alltraps>

00105924 <vector157>:
  105924:	6a 00                	push   $0x0
  105926:	68 9d 00 00 00       	push   $0x9d
  10592b:	e9 e8 f6 ff ff       	jmp    105018 <alltraps>

00105930 <vector158>:
  105930:	6a 00                	push   $0x0
  105932:	68 9e 00 00 00       	push   $0x9e
  105937:	e9 dc f6 ff ff       	jmp    105018 <alltraps>

0010593c <vector159>:
  10593c:	6a 00                	push   $0x0
  10593e:	68 9f 00 00 00       	push   $0x9f
  105943:	e9 d0 f6 ff ff       	jmp    105018 <alltraps>

00105948 <vector160>:
  105948:	6a 00                	push   $0x0
  10594a:	68 a0 00 00 00       	push   $0xa0
  10594f:	e9 c4 f6 ff ff       	jmp    105018 <alltraps>

00105954 <vector161>:
  105954:	6a 00                	push   $0x0
  105956:	68 a1 00 00 00       	push   $0xa1
  10595b:	e9 b8 f6 ff ff       	jmp    105018 <alltraps>

00105960 <vector162>:
  105960:	6a 00                	push   $0x0
  105962:	68 a2 00 00 00       	push   $0xa2
  105967:	e9 ac f6 ff ff       	jmp    105018 <alltraps>

0010596c <vector163>:
  10596c:	6a 00                	push   $0x0
  10596e:	68 a3 00 00 00       	push   $0xa3
  105973:	e9 a0 f6 ff ff       	jmp    105018 <alltraps>

00105978 <vector164>:
  105978:	6a 00                	push   $0x0
  10597a:	68 a4 00 00 00       	push   $0xa4
  10597f:	e9 94 f6 ff ff       	jmp    105018 <alltraps>

00105984 <vector165>:
  105984:	6a 00                	push   $0x0
  105986:	68 a5 00 00 00       	push   $0xa5
  10598b:	e9 88 f6 ff ff       	jmp    105018 <alltraps>

00105990 <vector166>:
  105990:	6a 00                	push   $0x0
  105992:	68 a6 00 00 00       	push   $0xa6
  105997:	e9 7c f6 ff ff       	jmp    105018 <alltraps>

0010599c <vector167>:
  10599c:	6a 00                	push   $0x0
  10599e:	68 a7 00 00 00       	push   $0xa7
  1059a3:	e9 70 f6 ff ff       	jmp    105018 <alltraps>

001059a8 <vector168>:
  1059a8:	6a 00                	push   $0x0
  1059aa:	68 a8 00 00 00       	push   $0xa8
  1059af:	e9 64 f6 ff ff       	jmp    105018 <alltraps>

001059b4 <vector169>:
  1059b4:	6a 00                	push   $0x0
  1059b6:	68 a9 00 00 00       	push   $0xa9
  1059bb:	e9 58 f6 ff ff       	jmp    105018 <alltraps>

001059c0 <vector170>:
  1059c0:	6a 00                	push   $0x0
  1059c2:	68 aa 00 00 00       	push   $0xaa
  1059c7:	e9 4c f6 ff ff       	jmp    105018 <alltraps>

001059cc <vector171>:
  1059cc:	6a 00                	push   $0x0
  1059ce:	68 ab 00 00 00       	push   $0xab
  1059d3:	e9 40 f6 ff ff       	jmp    105018 <alltraps>

001059d8 <vector172>:
  1059d8:	6a 00                	push   $0x0
  1059da:	68 ac 00 00 00       	push   $0xac
  1059df:	e9 34 f6 ff ff       	jmp    105018 <alltraps>

001059e4 <vector173>:
  1059e4:	6a 00                	push   $0x0
  1059e6:	68 ad 00 00 00       	push   $0xad
  1059eb:	e9 28 f6 ff ff       	jmp    105018 <alltraps>

001059f0 <vector174>:
  1059f0:	6a 00                	push   $0x0
  1059f2:	68 ae 00 00 00       	push   $0xae
  1059f7:	e9 1c f6 ff ff       	jmp    105018 <alltraps>

001059fc <vector175>:
  1059fc:	6a 00                	push   $0x0
  1059fe:	68 af 00 00 00       	push   $0xaf
  105a03:	e9 10 f6 ff ff       	jmp    105018 <alltraps>

00105a08 <vector176>:
  105a08:	6a 00                	push   $0x0
  105a0a:	68 b0 00 00 00       	push   $0xb0
  105a0f:	e9 04 f6 ff ff       	jmp    105018 <alltraps>

00105a14 <vector177>:
  105a14:	6a 00                	push   $0x0
  105a16:	68 b1 00 00 00       	push   $0xb1
  105a1b:	e9 f8 f5 ff ff       	jmp    105018 <alltraps>

00105a20 <vector178>:
  105a20:	6a 00                	push   $0x0
  105a22:	68 b2 00 00 00       	push   $0xb2
  105a27:	e9 ec f5 ff ff       	jmp    105018 <alltraps>

00105a2c <vector179>:
  105a2c:	6a 00                	push   $0x0
  105a2e:	68 b3 00 00 00       	push   $0xb3
  105a33:	e9 e0 f5 ff ff       	jmp    105018 <alltraps>

00105a38 <vector180>:
  105a38:	6a 00                	push   $0x0
  105a3a:	68 b4 00 00 00       	push   $0xb4
  105a3f:	e9 d4 f5 ff ff       	jmp    105018 <alltraps>

00105a44 <vector181>:
  105a44:	6a 00                	push   $0x0
  105a46:	68 b5 00 00 00       	push   $0xb5
  105a4b:	e9 c8 f5 ff ff       	jmp    105018 <alltraps>

00105a50 <vector182>:
  105a50:	6a 00                	push   $0x0
  105a52:	68 b6 00 00 00       	push   $0xb6
  105a57:	e9 bc f5 ff ff       	jmp    105018 <alltraps>

00105a5c <vector183>:
  105a5c:	6a 00                	push   $0x0
  105a5e:	68 b7 00 00 00       	push   $0xb7
  105a63:	e9 b0 f5 ff ff       	jmp    105018 <alltraps>

00105a68 <vector184>:
  105a68:	6a 00                	push   $0x0
  105a6a:	68 b8 00 00 00       	push   $0xb8
  105a6f:	e9 a4 f5 ff ff       	jmp    105018 <alltraps>

00105a74 <vector185>:
  105a74:	6a 00                	push   $0x0
  105a76:	68 b9 00 00 00       	push   $0xb9
  105a7b:	e9 98 f5 ff ff       	jmp    105018 <alltraps>

00105a80 <vector186>:
  105a80:	6a 00                	push   $0x0
  105a82:	68 ba 00 00 00       	push   $0xba
  105a87:	e9 8c f5 ff ff       	jmp    105018 <alltraps>

00105a8c <vector187>:
  105a8c:	6a 00                	push   $0x0
  105a8e:	68 bb 00 00 00       	push   $0xbb
  105a93:	e9 80 f5 ff ff       	jmp    105018 <alltraps>

00105a98 <vector188>:
  105a98:	6a 00                	push   $0x0
  105a9a:	68 bc 00 00 00       	push   $0xbc
  105a9f:	e9 74 f5 ff ff       	jmp    105018 <alltraps>

00105aa4 <vector189>:
  105aa4:	6a 00                	push   $0x0
  105aa6:	68 bd 00 00 00       	push   $0xbd
  105aab:	e9 68 f5 ff ff       	jmp    105018 <alltraps>

00105ab0 <vector190>:
  105ab0:	6a 00                	push   $0x0
  105ab2:	68 be 00 00 00       	push   $0xbe
  105ab7:	e9 5c f5 ff ff       	jmp    105018 <alltraps>

00105abc <vector191>:
  105abc:	6a 00                	push   $0x0
  105abe:	68 bf 00 00 00       	push   $0xbf
  105ac3:	e9 50 f5 ff ff       	jmp    105018 <alltraps>

00105ac8 <vector192>:
  105ac8:	6a 00                	push   $0x0
  105aca:	68 c0 00 00 00       	push   $0xc0
  105acf:	e9 44 f5 ff ff       	jmp    105018 <alltraps>

00105ad4 <vector193>:
  105ad4:	6a 00                	push   $0x0
  105ad6:	68 c1 00 00 00       	push   $0xc1
  105adb:	e9 38 f5 ff ff       	jmp    105018 <alltraps>

00105ae0 <vector194>:
  105ae0:	6a 00                	push   $0x0
  105ae2:	68 c2 00 00 00       	push   $0xc2
  105ae7:	e9 2c f5 ff ff       	jmp    105018 <alltraps>

00105aec <vector195>:
  105aec:	6a 00                	push   $0x0
  105aee:	68 c3 00 00 00       	push   $0xc3
  105af3:	e9 20 f5 ff ff       	jmp    105018 <alltraps>

00105af8 <vector196>:
  105af8:	6a 00                	push   $0x0
  105afa:	68 c4 00 00 00       	push   $0xc4
  105aff:	e9 14 f5 ff ff       	jmp    105018 <alltraps>

00105b04 <vector197>:
  105b04:	6a 00                	push   $0x0
  105b06:	68 c5 00 00 00       	push   $0xc5
  105b0b:	e9 08 f5 ff ff       	jmp    105018 <alltraps>

00105b10 <vector198>:
  105b10:	6a 00                	push   $0x0
  105b12:	68 c6 00 00 00       	push   $0xc6
  105b17:	e9 fc f4 ff ff       	jmp    105018 <alltraps>

00105b1c <vector199>:
  105b1c:	6a 00                	push   $0x0
  105b1e:	68 c7 00 00 00       	push   $0xc7
  105b23:	e9 f0 f4 ff ff       	jmp    105018 <alltraps>

00105b28 <vector200>:
  105b28:	6a 00                	push   $0x0
  105b2a:	68 c8 00 00 00       	push   $0xc8
  105b2f:	e9 e4 f4 ff ff       	jmp    105018 <alltraps>

00105b34 <vector201>:
  105b34:	6a 00                	push   $0x0
  105b36:	68 c9 00 00 00       	push   $0xc9
  105b3b:	e9 d8 f4 ff ff       	jmp    105018 <alltraps>

00105b40 <vector202>:
  105b40:	6a 00                	push   $0x0
  105b42:	68 ca 00 00 00       	push   $0xca
  105b47:	e9 cc f4 ff ff       	jmp    105018 <alltraps>

00105b4c <vector203>:
  105b4c:	6a 00                	push   $0x0
  105b4e:	68 cb 00 00 00       	push   $0xcb
  105b53:	e9 c0 f4 ff ff       	jmp    105018 <alltraps>

00105b58 <vector204>:
  105b58:	6a 00                	push   $0x0
  105b5a:	68 cc 00 00 00       	push   $0xcc
  105b5f:	e9 b4 f4 ff ff       	jmp    105018 <alltraps>

00105b64 <vector205>:
  105b64:	6a 00                	push   $0x0
  105b66:	68 cd 00 00 00       	push   $0xcd
  105b6b:	e9 a8 f4 ff ff       	jmp    105018 <alltraps>

00105b70 <vector206>:
  105b70:	6a 00                	push   $0x0
  105b72:	68 ce 00 00 00       	push   $0xce
  105b77:	e9 9c f4 ff ff       	jmp    105018 <alltraps>

00105b7c <vector207>:
  105b7c:	6a 00                	push   $0x0
  105b7e:	68 cf 00 00 00       	push   $0xcf
  105b83:	e9 90 f4 ff ff       	jmp    105018 <alltraps>

00105b88 <vector208>:
  105b88:	6a 00                	push   $0x0
  105b8a:	68 d0 00 00 00       	push   $0xd0
  105b8f:	e9 84 f4 ff ff       	jmp    105018 <alltraps>

00105b94 <vector209>:
  105b94:	6a 00                	push   $0x0
  105b96:	68 d1 00 00 00       	push   $0xd1
  105b9b:	e9 78 f4 ff ff       	jmp    105018 <alltraps>

00105ba0 <vector210>:
  105ba0:	6a 00                	push   $0x0
  105ba2:	68 d2 00 00 00       	push   $0xd2
  105ba7:	e9 6c f4 ff ff       	jmp    105018 <alltraps>

00105bac <vector211>:
  105bac:	6a 00                	push   $0x0
  105bae:	68 d3 00 00 00       	push   $0xd3
  105bb3:	e9 60 f4 ff ff       	jmp    105018 <alltraps>

00105bb8 <vector212>:
  105bb8:	6a 00                	push   $0x0
  105bba:	68 d4 00 00 00       	push   $0xd4
  105bbf:	e9 54 f4 ff ff       	jmp    105018 <alltraps>

00105bc4 <vector213>:
  105bc4:	6a 00                	push   $0x0
  105bc6:	68 d5 00 00 00       	push   $0xd5
  105bcb:	e9 48 f4 ff ff       	jmp    105018 <alltraps>

00105bd0 <vector214>:
  105bd0:	6a 00                	push   $0x0
  105bd2:	68 d6 00 00 00       	push   $0xd6
  105bd7:	e9 3c f4 ff ff       	jmp    105018 <alltraps>

00105bdc <vector215>:
  105bdc:	6a 00                	push   $0x0
  105bde:	68 d7 00 00 00       	push   $0xd7
  105be3:	e9 30 f4 ff ff       	jmp    105018 <alltraps>

00105be8 <vector216>:
  105be8:	6a 00                	push   $0x0
  105bea:	68 d8 00 00 00       	push   $0xd8
  105bef:	e9 24 f4 ff ff       	jmp    105018 <alltraps>

00105bf4 <vector217>:
  105bf4:	6a 00                	push   $0x0
  105bf6:	68 d9 00 00 00       	push   $0xd9
  105bfb:	e9 18 f4 ff ff       	jmp    105018 <alltraps>

00105c00 <vector218>:
  105c00:	6a 00                	push   $0x0
  105c02:	68 da 00 00 00       	push   $0xda
  105c07:	e9 0c f4 ff ff       	jmp    105018 <alltraps>

00105c0c <vector219>:
  105c0c:	6a 00                	push   $0x0
  105c0e:	68 db 00 00 00       	push   $0xdb
  105c13:	e9 00 f4 ff ff       	jmp    105018 <alltraps>

00105c18 <vector220>:
  105c18:	6a 00                	push   $0x0
  105c1a:	68 dc 00 00 00       	push   $0xdc
  105c1f:	e9 f4 f3 ff ff       	jmp    105018 <alltraps>

00105c24 <vector221>:
  105c24:	6a 00                	push   $0x0
  105c26:	68 dd 00 00 00       	push   $0xdd
  105c2b:	e9 e8 f3 ff ff       	jmp    105018 <alltraps>

00105c30 <vector222>:
  105c30:	6a 00                	push   $0x0
  105c32:	68 de 00 00 00       	push   $0xde
  105c37:	e9 dc f3 ff ff       	jmp    105018 <alltraps>

00105c3c <vector223>:
  105c3c:	6a 00                	push   $0x0
  105c3e:	68 df 00 00 00       	push   $0xdf
  105c43:	e9 d0 f3 ff ff       	jmp    105018 <alltraps>

00105c48 <vector224>:
  105c48:	6a 00                	push   $0x0
  105c4a:	68 e0 00 00 00       	push   $0xe0
  105c4f:	e9 c4 f3 ff ff       	jmp    105018 <alltraps>

00105c54 <vector225>:
  105c54:	6a 00                	push   $0x0
  105c56:	68 e1 00 00 00       	push   $0xe1
  105c5b:	e9 b8 f3 ff ff       	jmp    105018 <alltraps>

00105c60 <vector226>:
  105c60:	6a 00                	push   $0x0
  105c62:	68 e2 00 00 00       	push   $0xe2
  105c67:	e9 ac f3 ff ff       	jmp    105018 <alltraps>

00105c6c <vector227>:
  105c6c:	6a 00                	push   $0x0
  105c6e:	68 e3 00 00 00       	push   $0xe3
  105c73:	e9 a0 f3 ff ff       	jmp    105018 <alltraps>

00105c78 <vector228>:
  105c78:	6a 00                	push   $0x0
  105c7a:	68 e4 00 00 00       	push   $0xe4
  105c7f:	e9 94 f3 ff ff       	jmp    105018 <alltraps>

00105c84 <vector229>:
  105c84:	6a 00                	push   $0x0
  105c86:	68 e5 00 00 00       	push   $0xe5
  105c8b:	e9 88 f3 ff ff       	jmp    105018 <alltraps>

00105c90 <vector230>:
  105c90:	6a 00                	push   $0x0
  105c92:	68 e6 00 00 00       	push   $0xe6
  105c97:	e9 7c f3 ff ff       	jmp    105018 <alltraps>

00105c9c <vector231>:
  105c9c:	6a 00                	push   $0x0
  105c9e:	68 e7 00 00 00       	push   $0xe7
  105ca3:	e9 70 f3 ff ff       	jmp    105018 <alltraps>

00105ca8 <vector232>:
  105ca8:	6a 00                	push   $0x0
  105caa:	68 e8 00 00 00       	push   $0xe8
  105caf:	e9 64 f3 ff ff       	jmp    105018 <alltraps>

00105cb4 <vector233>:
  105cb4:	6a 00                	push   $0x0
  105cb6:	68 e9 00 00 00       	push   $0xe9
  105cbb:	e9 58 f3 ff ff       	jmp    105018 <alltraps>

00105cc0 <vector234>:
  105cc0:	6a 00                	push   $0x0
  105cc2:	68 ea 00 00 00       	push   $0xea
  105cc7:	e9 4c f3 ff ff       	jmp    105018 <alltraps>

00105ccc <vector235>:
  105ccc:	6a 00                	push   $0x0
  105cce:	68 eb 00 00 00       	push   $0xeb
  105cd3:	e9 40 f3 ff ff       	jmp    105018 <alltraps>

00105cd8 <vector236>:
  105cd8:	6a 00                	push   $0x0
  105cda:	68 ec 00 00 00       	push   $0xec
  105cdf:	e9 34 f3 ff ff       	jmp    105018 <alltraps>

00105ce4 <vector237>:
  105ce4:	6a 00                	push   $0x0
  105ce6:	68 ed 00 00 00       	push   $0xed
  105ceb:	e9 28 f3 ff ff       	jmp    105018 <alltraps>

00105cf0 <vector238>:
  105cf0:	6a 00                	push   $0x0
  105cf2:	68 ee 00 00 00       	push   $0xee
  105cf7:	e9 1c f3 ff ff       	jmp    105018 <alltraps>

00105cfc <vector239>:
  105cfc:	6a 00                	push   $0x0
  105cfe:	68 ef 00 00 00       	push   $0xef
  105d03:	e9 10 f3 ff ff       	jmp    105018 <alltraps>

00105d08 <vector240>:
  105d08:	6a 00                	push   $0x0
  105d0a:	68 f0 00 00 00       	push   $0xf0
  105d0f:	e9 04 f3 ff ff       	jmp    105018 <alltraps>

00105d14 <vector241>:
  105d14:	6a 00                	push   $0x0
  105d16:	68 f1 00 00 00       	push   $0xf1
  105d1b:	e9 f8 f2 ff ff       	jmp    105018 <alltraps>

00105d20 <vector242>:
  105d20:	6a 00                	push   $0x0
  105d22:	68 f2 00 00 00       	push   $0xf2
  105d27:	e9 ec f2 ff ff       	jmp    105018 <alltraps>

00105d2c <vector243>:
  105d2c:	6a 00                	push   $0x0
  105d2e:	68 f3 00 00 00       	push   $0xf3
  105d33:	e9 e0 f2 ff ff       	jmp    105018 <alltraps>

00105d38 <vector244>:
  105d38:	6a 00                	push   $0x0
  105d3a:	68 f4 00 00 00       	push   $0xf4
  105d3f:	e9 d4 f2 ff ff       	jmp    105018 <alltraps>

00105d44 <vector245>:
  105d44:	6a 00                	push   $0x0
  105d46:	68 f5 00 00 00       	push   $0xf5
  105d4b:	e9 c8 f2 ff ff       	jmp    105018 <alltraps>

00105d50 <vector246>:
  105d50:	6a 00                	push   $0x0
  105d52:	68 f6 00 00 00       	push   $0xf6
  105d57:	e9 bc f2 ff ff       	jmp    105018 <alltraps>

00105d5c <vector247>:
  105d5c:	6a 00                	push   $0x0
  105d5e:	68 f7 00 00 00       	push   $0xf7
  105d63:	e9 b0 f2 ff ff       	jmp    105018 <alltraps>

00105d68 <vector248>:
  105d68:	6a 00                	push   $0x0
  105d6a:	68 f8 00 00 00       	push   $0xf8
  105d6f:	e9 a4 f2 ff ff       	jmp    105018 <alltraps>

00105d74 <vector249>:
  105d74:	6a 00                	push   $0x0
  105d76:	68 f9 00 00 00       	push   $0xf9
  105d7b:	e9 98 f2 ff ff       	jmp    105018 <alltraps>

00105d80 <vector250>:
  105d80:	6a 00                	push   $0x0
  105d82:	68 fa 00 00 00       	push   $0xfa
  105d87:	e9 8c f2 ff ff       	jmp    105018 <alltraps>

00105d8c <vector251>:
  105d8c:	6a 00                	push   $0x0
  105d8e:	68 fb 00 00 00       	push   $0xfb
  105d93:	e9 80 f2 ff ff       	jmp    105018 <alltraps>

00105d98 <vector252>:
  105d98:	6a 00                	push   $0x0
  105d9a:	68 fc 00 00 00       	push   $0xfc
  105d9f:	e9 74 f2 ff ff       	jmp    105018 <alltraps>

00105da4 <vector253>:
  105da4:	6a 00                	push   $0x0
  105da6:	68 fd 00 00 00       	push   $0xfd
  105dab:	e9 68 f2 ff ff       	jmp    105018 <alltraps>

00105db0 <vector254>:
  105db0:	6a 00                	push   $0x0
  105db2:	68 fe 00 00 00       	push   $0xfe
  105db7:	e9 5c f2 ff ff       	jmp    105018 <alltraps>

00105dbc <vector255>:
  105dbc:	6a 00                	push   $0x0
  105dbe:	68 ff 00 00 00       	push   $0xff
  105dc3:	e9 50 f2 ff ff       	jmp    105018 <alltraps>
