40d003:	52                   	push   %edx
40d004:	e8 ff fd ff ff       	call   0x40ce08
40d009:	97                   	xchg   %eax,%edi
40d00a:	89 e8                	mov    %ebp,%eax
40d00c:	e8 b7 c4 ff ff       	call   0x4094c8
40d011:	0f b6 c8             	movzbl %al,%ecx
40d014:	83 e9 02             	sub    $0x2,%ecx
40d017:	b2 08                	mov    $0x8,%dl
40d019:	75 52                	jne    0x40d06d
40d01b:	83 3c 24 00          	cmpl   $0x0,(%esp)
40d01f:	75 19                	jne    0x40d03a
40d021:	31 d2                	xor    %edx,%edx
40d023:	52                   	push   %edx
40d024:	89 e8                	mov    %ebp,%eax
40d026:	e8 29 ff ff ff       	call   0x40cf54
40d02b:	39 d8                	cmp    %ebx,%eax
40d02d:	5a                   	pop    %edx
40d02e:	74 06                	je     0x40d036
40d030:	42                   	inc    %edx
40d031:	83 fa 10             	cmp    $0x10,%edx
40d034:	72 ed                	jb     0x40d023
40d036:	87 da                	xchg   %ebx,%edx
40d038:	b2 08                	mov    $0x8,%dl
40d03a:	8b 4d 1c             	mov    0x1c(%ebp),%ecx
40d03d:	41                   	inc    %ecx
40d03e:	d1 e9                	shr    $1,%ecx
40d040:	8a 26                	mov    (%esi),%ah
40d042:	c0 ec 04             	shr    $0x4,%ah
40d045:	38 dc                	cmp    %bl,%ah
40d047:	0f 94 c4             	sete   %ah
40d04a:	d0 e0                	shl    $1,%al
40d04c:	08 e0                	or     %ah,%al
40d04e:	8a 26                	mov    (%esi),%ah
40d050:	80 e4 0f             	and    $0xf,%ah
40d053:	38 dc                	cmp    %bl,%ah
40d055:	0f 94 c4             	sete   %ah
40d058:	d0 e0                	shl    $1,%al
40d05a:	08 e0                	or     %ah,%al
40d05c:	fe ca                	dec    %dl
40d05e:	fe ca                	dec    %dl
40d060:	75 03                	jne    0x40d065
40d062:	aa                   	stos   %al,%es:(%edi)
40d063:	b2 08                	mov    $0x8,%dl
40d065:	46                   	inc    %esi
40d066:	e2 d8                	loop   0x40d040
40d068:	e9 d7 00 00 00       	jmp    0x40d144
40d06d:	e2 39                	loop   0x40d0a8
40d06f:	83 3c 24 00          	cmpl   $0x0,(%esp)
40d073:	75 17                	jne    0x40d08c
40d075:	31 d2                	xor    %edx,%edx
40d077:	52                   	push   %edx
40d078:	89 e8                	mov    %ebp,%eax
40d07a:	e8 d5 fe ff ff       	call   0x40cf54
40d07f:	39 d8                	cmp    %ebx,%eax
40d081:	5a                   	pop    %edx
40d082:	74 04                	je     0x40d088
40d084:	fe c2                	inc    %dl
40d086:	75 ef                	jne    0x40d077
40d088:	87 da                	xchg   %ebx,%edx
40d08a:	b2 08                	mov    $0x8,%dl
40d08c:	8b 4d 1c             	mov    0x1c(%ebp),%ecx
40d08f:	41                   	inc    %ecx
40d090:	3a 1e                	cmp    (%esi),%bl
40d092:	0f 94 c4             	sete   %ah
40d095:	d0 e0                	shl    $1,%al
40d097:	08 e0                	or     %ah,%al
40d099:	fe ca                	dec    %dl
40d09b:	75 03                	jne    0x40d0a0
40d09d:	aa                   	stos   %al,%es:(%edi)
40d09e:	b2 08                	mov    $0x8,%dl
40d0a0:	46                   	inc    %esi
40d0a1:	e2 ed                	loop   0x40d090
40d0a3:	e9 9c 00 00 00       	jmp    0x40d144
40d0a8:	e2 2a                	loop   0x40d0d4
40d0aa:	83 3c 24 00          	cmpl   $0x0,(%esp)
40d0ae:	75 09                	jne    0x40d0b9
40d0b0:	93                   	xchg   %eax,%ebx
40d0b1:	52                   	push   %edx
40d0b2:	e8 1d 83 ff ff       	call   0x4053d4
40d0b7:	5a                   	pop    %edx
40d0b8:	93                   	xchg   %eax,%ebx
40d0b9:	8b 4d 1c             	mov    0x1c(%ebp),%ecx
40d0bc:	66 39 1e             	cmp    %bx,(%esi)
40d0bf:	0f 94 c4             	sete   %ah
40d0c2:	d0 e0                	shl    $1,%al
40d0c4:	08 e0                	or     %ah,%al
40d0c6:	fe ca                	dec    %dl
40d0c8:	75 03                	jne    0x40d0cd
40d0ca:	aa                   	stos   %al,%es:(%edi)
40d0cb:	b2 08                	mov    $0x8,%dl
40d0cd:	83 c6 02             	add    $0x2,%esi
40d0d0:	e2 ea                	loop   0x40d0bc
40d0d2:	eb 70                	jmp    0x40d144
40d0d4:	e2 2a                	loop   0x40d100
40d0d6:	83 3c 24 00          	cmpl   $0x0,(%esp)
40d0da:	75 09                	jne    0x40d0e5
40d0dc:	93                   	xchg   %eax,%ebx
40d0dd:	52                   	push   %edx
40d0de:	e8 a1 d3 ff ff       	call   0x40a484
40d0e3:	5a                   	pop    %edx
40d0e4:	93                   	xchg   %eax,%ebx
40d0e5:	8b 4d 1c             	mov    0x1c(%ebp),%ecx
40d0e8:	66 39 1e             	cmp    %bx,(%esi)
40d0eb:	0f 94 c4             	sete   %ah
40d0ee:	d0 e0                	shl    $1,%al
40d0f0:	08 e0                	or     %ah,%al
40d0f2:	fe ca                	dec    %dl
40d0f4:	75 03                	jne    0x40d0f9
40d0f6:	aa                   	stos   %al,%es:(%edi)
40d0f7:	b2 08                	mov    $0x8,%dl
40d0f9:	83 c6 02             	add    $0x2,%esi
40d0fc:	e2 ea                	loop   0x40d0e8
40d0fe:	eb 44                	jmp    0x40d144
40d100:	e2 24                	loop   0x40d126
40d102:	8b 4d 1c             	mov    0x1c(%ebp),%ecx
40d105:	55                   	push   %ebp
40d106:	8b 2e                	mov    (%esi),%ebp
40d108:	81 e5 ff ff ff 00    	and    $0xffffff,%ebp
40d10e:	39 dd                	cmp    %ebx,%ebp
40d110:	0f 94 c4             	sete   %ah
40d113:	d0 e0                	shl    $1,%al
40d115:	08 e0                	or     %ah,%al
40d117:	fe ca                	dec    %dl
40d119:	75 03                	jne    0x40d11e
40d11b:	aa                   	stos   %al,%es:(%edi)
40d11c:	b2 08                	mov    $0x8,%dl
40d11e:	83 c6 03             	add    $0x3,%esi
40d121:	e2 e3                	loop   0x40d106
40d123:	5d                   	pop    %ebp
40d124:	eb 1e                	jmp    0x40d144
40d126:	8b 4d 1c             	mov    0x1c(%ebp),%ecx
40d129:	81 26 ff ff ff 00    	andl   $0xffffff,(%esi)
40d12f:	3b 1e                	cmp    (%esi),%ebx
40d131:	0f 94 c4             	sete   %ah
40d134:	d0 e0                	shl    $1,%al
40d136:	08 e0                	or     %ah,%al
40d138:	fe ca                	dec    %dl
40d13a:	75 03                	jne    0x40d13f
40d13c:	aa                   	stos   %al,%es:(%edi)
40d13d:	b2 08                	mov    $0x8,%dl
40d13f:	83 c6 04             	add    $0x4,%esi
40d142:	e2 e5                	loop   0x40d129
40d144:	84 d2                	test   %dl,%dl
40d146:	74 0c                	je     0x40d154
40d148:	80 fa 08             	cmp    $0x8,%dl
40d14b:	74 07                	je     0x40d154
40d14d:	d0 e0                	shl    $1,%al
40d14f:	fe ca                	dec    %dl
40d151:	75 fa                	jne    0x40d14d
40d153:	aa                   	stos   %al,%es:(%edi)
40d154:	5a                   	pop    %edx
40d155:	42                   	inc    %edx
40d156:	e9 91 fe ff ff       	jmp    0x40cfec
40d15b:	5a                   	pop    %edx
40d15c:	52                   	push   %edx
40d15d:	95                   	xchg   %eax,%ebp
40d15e:	e8 11 fd ff ff       	call   0x40ce74
40d163:	58                   	pop    %eax
40d164:	e8 a7 d0 ff ff       	call   0x40a210
40d169:	5f                   	pop    %edi
40d16a:	5d                   	pop    %ebp
40d16b:	5e                   	pop    %esi
40d16c:	5b                   	pop    %ebx
40d16d:	c3                   	ret
40d16e:	8b c0                	mov    %eax,%eax
40d170:	53                   	push   %ebx
40d171:	89 c3                	mov    %eax,%ebx
40d173:	51                   	push   %ecx
40d174:	52                   	push   %edx
40d175:	e8 e6 f9 ff ff       	call   0x40cb60
40d17a:	9c                   	pushf
40d17b:	83 c8 ff             	or     $0xffffffff,%eax
40d17e:	9d                   	popf
40d17f:	74 1a                	je     0x40d19b
40d181:	e8 32 7f ff ff       	call   0x4050b8
40d186:	ff 74 24 0c          	push   0xc(%esp)
40d18a:	ff 74 24 0c          	push   0xc(%esp)
40d18e:	50                   	push   %eax
40d18f:	e8 8c 77 ff ff       	call   0x404920
40d194:	93                   	xchg   %eax,%ebx
40d195:	e8 46 7f ff ff       	call   0x4050e0
40d19a:	93                   	xchg   %eax,%ebx
40d19b:	5a                   	pop    %edx
40d19c:	5a                   	pop    %edx
40d19d:	5b                   	pop    %ebx
40d19e:	c3                   	ret
40d19f:	90                   	nop
40d1a0:	55                   	push   %ebp
40d1a1:	8b ec                	mov    %esp,%ebp
40d1a3:	53                   	push   %ebx
40d1a4:	89 c3                	mov    %eax,%ebx
40d1a6:	51                   	push   %ecx
40d1a7:	52                   	push   %edx
40d1a8:	e8 b3 f9 ff ff       	call   0x40cb60
40d1ad:	74 24                	je     0x40d1d3
40d1af:	e8 04 7f ff ff       	call   0x4050b8
40d1b4:	8b 45 08             	mov    0x8(%ebp),%eax
40d1b7:	e8 a8 d2 ff ff       	call   0x40a464
40d1bc:	50                   	push   %eax
40d1bd:	ff 74 24 10          	push   0x10(%esp)
40d1c1:	ff 74 24 10          	push   0x10(%esp)
40d1c5:	ff 74 24 10          	push   0x10(%esp)
40d1c9:	e8 b2 77 ff ff       	call   0x404980
40d1ce:	e8 0d 7f ff ff       	call   0x4050e0
40d1d3:	5a                   	pop    %edx
40d1d4:	59                   	pop    %ecx
40d1d5:	5b                   	pop    %ebx
40d1d6:	5d                   	pop    %ebp
40d1d7:	c2 04 00             	ret    $0x4
40d1da:	8b c0                	mov    %eax,%eax
40d1dc:	55                   	push   %ebp
40d1dd:	8b ec                	mov    %esp,%ebp
40d1df:	52                   	push   %edx
40d1e0:	ff 70 5e             	push   0x5e(%eax)
40d1e3:	51                   	push   %ecx
40d1e4:	ff 70 62             	push   0x62(%eax)
40d1e7:	8b 45 08             	mov    0x8(%ebp),%eax
40d1ea:	e8 75 d2 ff ff       	call   0x40a464
40d1ef:	89 c2                	mov    %eax,%edx
40d1f1:	c1 e8 10             	shr    $0x10,%eax
40d1f4:	00 d0                	add    %dl,%al
40d1f6:	10 f0                	adc    %dh,%al
40d1f8:	3d aa 00 00 00       	cmp    $0xaa,%eax
40d1fd:	0f 9d c1             	setge  %cl
40d200:	83 e1 01             	and    $0x1,%ecx
40d203:	c1 e1 07             	shl    $0x7,%ecx
40d206:	58                   	pop    %eax
40d207:	5a                   	pop    %edx
40d208:	f7 ea                	imul   %edx
40d20a:	5a                   	pop    %edx
40d20b:	01 d0                	add    %edx,%eax
40d20d:	5a                   	pop    %edx
40d20e:	51                   	push   %ecx
40d20f:	89 d1                	mov    %edx,%ecx
40d211:	c1 ea 03             	shr    $0x3,%edx
40d214:	01 d0                	add    %edx,%eax
40d216:	83 e1 07             	and    $0x7,%ecx
40d219:	66 ba 7f ff          	mov    $0xff7f,%dx
40d21d:	d3 ea                	shr    %cl,%edx
40d21f:	20 10                	and    %dl,(%eax)
40d221:	5a                   	pop    %edx
40d222:	d3 ea                	shr    %cl,%edx
40d224:	08 10                	or     %dl,(%eax)
40d226:	5d                   	pop    %ebp
40d227:	c2 04 00             	ret    $0x4
40d22a:	8b c0                	mov    %eax,%eax
40d22c:	55                   	push   %ebp
40d22d:	8b ec                	mov    %esp,%ebp
40d22f:	95                   	xchg   %eax,%ebp
40d230:	52                   	push   %edx
40d231:	51                   	push   %ecx
40d232:	8b 4d 6a             	mov    0x6a(%ebp),%ecx
40d235:	41                   	inc    %ecx
40d236:	92                   	xchg   %eax,%edx
40d237:	99                   	cltd
40d238:	f7 f1                	div    %ecx
40d23a:	91                   	xchg   %eax,%ecx
40d23b:	58                   	pop    %eax
40d23c:	8b 55 62             	mov    0x62(%ebp),%edx
40d23f:	f7 ea                	imul   %edx
40d241:	01 c1                	add    %eax,%ecx
40d243:	03 4d 5e             	add    0x5e(%ebp),%ecx
40d246:	51                   	push   %ecx
40d247:	8b 54 24 10          	mov    0x10(%esp),%edx
40d24b:	89 e8                	mov    %ebp,%eax
40d24d:	e8 b2 fc ff ff       	call   0x40cf04
40d252:	59                   	pop    %ecx
40d253:	5a                   	pop    %edx
40d254:	50                   	push   %eax
40d255:	8b 45 6a             	mov    0x6a(%ebp),%eax
40d258:	21 c2                	and    %eax,%edx
40d25a:	29 d0                	sub    %edx,%eax
40d25c:	8b 55 3d             	mov    0x3d(%ebp),%edx
40d25f:	0f b7 52 0e          	movzwl 0xe(%edx),%edx
40d263:	f7 e2                	mul    %edx
40d265:	91                   	xchg   %eax,%ecx
40d266:	8b 55 66             	mov    0x66(%ebp),%edx
40d269:	d3 e2                	shl    %cl,%edx
40d26b:	f7 d2                	not    %edx
40d26d:	20 10                	and    %dl,(%eax)
40d26f:	5a                   	pop    %edx
40d270:	d3 e2                	shl    %cl,%edx
40d272:	08 10                	or     %dl,(%eax)
40d274:	5d                   	pop    %ebp
40d275:	c2 04 00             	ret    $0x4
40d278:	55                   	push   %ebp
40d279:	8b ec                	mov    %esp,%ebp
40d27b:	01 d2                	add    %edx,%edx
40d27d:	03 50 5e             	add    0x5e(%eax),%edx
40d280:	52                   	push   %edx
40d281:	ff 70 66             	push   0x66(%eax)
40d284:	8b 40 62             	mov    0x62(%eax),%eax
40d287:	f7 e9                	imul   %ecx
40d289:	50                   	push   %eax
40d28a:	8b 45 08             	mov    0x8(%ebp),%eax
40d28d:	e8 d2 d1 ff ff       	call   0x40a464
40d292:	5d                   	pop    %ebp
40d293:	5a                   	pop    %edx
40d294:	31 c9                	xor    %ecx,%ecx
40d296:	80 ea 10             	sub    $0x10,%dl
40d299:	74 13                	je     0x40d2ae
40d29b:	88 c5                	mov    %al,%ch
40d29d:	d0 ed                	shr    $1,%ch
40d29f:	c1 e8 06             	shr    $0x6,%eax
40d2a2:	89 c2                	mov    %eax,%edx
40d2a4:	66 81 e2 e0 03       	and    $0x3e0,%dx
40d2a9:	c1 e8 0d             	shr    $0xd,%eax
40d2ac:	eb 11                	jmp    0x40d2bf
40d2ae:	24 f8                	and    $0xf8,%al
40d2b0:	88 c5                	mov    %al,%ch
40d2b2:	c1 e8 05             	shr    $0x5,%eax
40d2b5:	89 c2                	mov    %eax,%edx
40d2b7:	66 81 e2 e0 07       	and    $0x7e0,%dx
40d2bc:	c1 e8 0e             	shr    $0xe,%eax
40d2bf:	88 ec                	mov    %ch,%ah
40d2c1:	66 25 1f fc          	and    $0xfc1f,%ax
40d2c5:	66 09 d0             	or     %dx,%ax
40d2c8:	5a                   	pop    %edx
40d2c9:	66 89 04 2a          	mov    %ax,(%edx,%ebp,1)
40d2cd:	5d                   	pop    %ebp
40d2ce:	c2 04 00             	ret    $0x4
40d2d1:	8d 40 00             	lea    0x0(%eax),%eax
40d2d4:	55                   	push   %ebp
40d2d5:	8b ec                	mov    %esp,%ebp
40d2d7:	ff 70 62             	push   0x62(%eax)
40d2da:	ff 70 5e             	push   0x5e(%eax)
40d2dd:	8b 40 6e             	mov    0x6e(%eax),%eax
40d2e0:	f7 e2                	mul    %edx
40d2e2:	5a                   	pop    %edx
40d2e3:	01 c2                	add    %eax,%edx
40d2e5:	58                   	pop    %eax
40d2e6:	52                   	push   %edx
40d2e7:	f7 e9                	imul   %ecx
40d2e9:	5a                   	pop    %edx
40d2ea:	01 c2                	add    %eax,%edx
40d2ec:	52                   	push   %edx
40d2ed:	8b 45 08             	mov    0x8(%ebp),%eax
40d2f0:	e8 7f d1 ff ff       	call   0x40a474
40d2f5:	5a                   	pop    %edx
40d2f6:	81 22 00 00 00 ff    	andl   $0xff000000,(%edx)
40d2fc:	09 02                	or     %eax,(%edx)
40d2fe:	5d                   	pop    %ebp
40d2ff:	c2 04 00             	ret    $0x4
40d302:	8b c0                	mov    %eax,%eax
40d304:	55                   	push   %ebp
40d305:	8b ec                	mov    %esp,%ebp
40d307:	66 83 78 5c 00       	cmpw   $0x0,0x5c(%eax)
40d30c:	75 7d                	jne    0x40d38b
40d30e:	60                   	pusha
40d30f:	89 c3                	mov    %eax,%ebx