40bf69:	a3 58 3b 41 00       	mov    %eax,0x413b58
40bf6e:	ff d7                	call   *%edi
40bf70:	50                   	push   %eax
40bf71:	ff d6                	call   *%esi
40bf73:	a3 60 3b 41 00       	mov    %eax,0x413b60
40bf78:	85 c0                	test   %eax,%eax
40bf7a:	74 10                	je     0x40bf8c
40bf7c:	68 50 09 41 00       	push   $0x410950
40bf81:	53                   	push   %ebx
40bf82:	ff d7                	call   *%edi
40bf84:	50                   	push   %eax
40bf85:	ff d6                	call   *%esi
40bf87:	a3 5c 3b 41 00       	mov    %eax,0x413b5c
40bf8c:	a1 5c 3b 41 00       	mov    0x413b5c,%eax
40bf91:	8b 4d e8             	mov    -0x18(%ebp),%ecx
40bf94:	8b 35 90 f0 40 00    	mov    0x40f090,%esi
40bf9a:	3b c1                	cmp    %ecx,%eax
40bf9c:	74 47                	je     0x40bfe5
40bf9e:	39 0d 60 3b 41 00    	cmp    %ecx,0x413b60
40bfa4:	74 3f                	je     0x40bfe5
40bfa6:	50                   	push   %eax
40bfa7:	ff d6                	call   *%esi
40bfa9:	ff 35 60 3b 41 00    	push   0x413b60
40bfaf:	8b f8                	mov    %eax,%edi
40bfb1:	ff d6                	call   *%esi
40bfb3:	8b d8                	mov    %eax,%ebx
40bfb5:	85 ff                	test   %edi,%edi
40bfb7:	74 2c                	je     0x40bfe5
40bfb9:	85 db                	test   %ebx,%ebx
40bfbb:	74 28                	je     0x40bfe5
40bfbd:	ff d7                	call   *%edi
40bfbf:	85 c0                	test   %eax,%eax
40bfc1:	74 19                	je     0x40bfdc
40bfc3:	8d 4d dc             	lea    -0x24(%ebp),%ecx
40bfc6:	51                   	push   %ecx
40bfc7:	6a 0c                	push   $0xc
40bfc9:	8d 4d f0             	lea    -0x10(%ebp),%ecx
40bfcc:	51                   	push   %ecx
40bfcd:	6a 01                	push   $0x1
40bfcf:	50                   	push   %eax
40bfd0:	ff d3                	call   *%ebx
40bfd2:	85 c0                	test   %eax,%eax
40bfd4:	74 06                	je     0x40bfdc
40bfd6:	f6 45 f8 01          	testb  $0x1,-0x8(%ebp)
40bfda:	75 09                	jne    0x40bfe5
40bfdc:	81 4d 10 00 00 20 00 	orl    $0x200000,0x10(%ebp)
40bfe3:	eb 33                	jmp    0x40c018
40bfe5:	a1 54 3b 41 00       	mov    0x413b54,%eax
40bfea:	3b 45 e8             	cmp    -0x18(%ebp),%eax
40bfed:	74 29                	je     0x40c018
40bfef:	50                   	push   %eax
40bff0:	ff d6                	call   *%esi
40bff2:	85 c0                	test   %eax,%eax
40bff4:	74 22                	je     0x40c018
40bff6:	ff d0                	call   *%eax
40bff8:	89 45 ec             	mov    %eax,-0x14(%ebp)
40bffb:	85 c0                	test   %eax,%eax
40bffd:	74 19                	je     0x40c018
40bfff:	a1 58 3b 41 00       	mov    0x413b58,%eax
40c004:	3b 45 e8             	cmp    -0x18(%ebp),%eax
40c007:	74 0f                	je     0x40c018
40c009:	50                   	push   %eax
40c00a:	ff d6                	call   *%esi
40c00c:	85 c0                	test   %eax,%eax
40c00e:	74 08                	je     0x40c018
40c010:	ff 75 ec             	push   -0x14(%ebp)
40c013:	ff d0                	call   *%eax
40c015:	89 45 ec             	mov    %eax,-0x14(%ebp)
40c018:	ff 35 50 3b 41 00    	push   0x413b50
40c01e:	ff d6                	call   *%esi
40c020:	85 c0                	test   %eax,%eax
40c022:	74 10                	je     0x40c034
40c024:	ff 75 10             	push   0x10(%ebp)
40c027:	ff 75 e4             	push   -0x1c(%ebp)
40c02a:	ff 75 e0             	push   -0x20(%ebp)
40c02d:	ff 75 ec             	push   -0x14(%ebp)
40c030:	ff d0                	call   *%eax
40c032:	eb 02                	jmp    0x40c036
40c034:	33 c0                	xor    %eax,%eax
40c036:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40c039:	5f                   	pop    %edi
40c03a:	5e                   	pop    %esi
40c03b:	33 cd                	xor    %ebp,%ecx
40c03d:	5b                   	pop    %ebx
40c03e:	e8 61 5d ff ff       	call   0x401da4
40c043:	c9                   	leave
40c044:	c3                   	ret
40c045:	8b ff                	mov    %edi,%edi
40c047:	55                   	push   %ebp
40c048:	8b ec                	mov    %esp,%ebp
40c04a:	56                   	push   %esi
40c04b:	8b 75 08             	mov    0x8(%ebp),%esi
40c04e:	57                   	push   %edi
40c04f:	85 f6                	test   %esi,%esi
40c051:	74 07                	je     0x40c05a
40c053:	8b 7d 0c             	mov    0xc(%ebp),%edi
40c056:	85 ff                	test   %edi,%edi
40c058:	75 15                	jne    0x40c06f
40c05a:	e8 c8 80 ff ff       	call   0x404127
40c05f:	6a 16                	push   $0x16
40c061:	5e                   	pop    %esi
40c062:	89 30                	mov    %esi,(%eax)
40c064:	e8 1e 6c ff ff       	call   0x402c87
40c069:	8b c6                	mov    %esi,%eax
40c06b:	5f                   	pop    %edi
40c06c:	5e                   	pop    %esi
40c06d:	5d                   	pop    %ebp
40c06e:	c3                   	ret
40c06f:	8b 4d 10             	mov    0x10(%ebp),%ecx
40c072:	85 c9                	test   %ecx,%ecx
40c074:	75 07                	jne    0x40c07d
40c076:	33 c0                	xor    %eax,%eax
40c078:	66 89 06             	mov    %ax,(%esi)
40c07b:	eb dd                	jmp    0x40c05a
40c07d:	8b d6                	mov    %esi,%edx
40c07f:	66 83 3a 00          	cmpw   $0x0,(%edx)
40c083:	74 06                	je     0x40c08b
40c085:	83 c2 02             	add    $0x2,%edx
40c088:	4f                   	dec    %edi
40c089:	75 f4                	jne    0x40c07f
40c08b:	85 ff                	test   %edi,%edi
40c08d:	74 e7                	je     0x40c076
40c08f:	2b d1                	sub    %ecx,%edx
40c091:	0f b7 01             	movzwl (%ecx),%eax
40c094:	66 89 04 0a          	mov    %ax,(%edx,%ecx,1)
40c098:	83 c1 02             	add    $0x2,%ecx
40c09b:	66 85 c0             	test   %ax,%ax
40c09e:	74 03                	je     0x40c0a3
40c0a0:	4f                   	dec    %edi
40c0a1:	75 ee                	jne    0x40c091
40c0a3:	33 c0                	xor    %eax,%eax
40c0a5:	85 ff                	test   %edi,%edi
40c0a7:	75 c2                	jne    0x40c06b
40c0a9:	66 89 06             	mov    %ax,(%esi)
40c0ac:	e8 76 80 ff ff       	call   0x404127
40c0b1:	6a 22                	push   $0x22
40c0b3:	59                   	pop    %ecx
40c0b4:	89 08                	mov    %ecx,(%eax)
40c0b6:	8b f1                	mov    %ecx,%esi
40c0b8:	eb aa                	jmp    0x40c064
40c0ba:	8b ff                	mov    %edi,%edi
40c0bc:	55                   	push   %ebp
40c0bd:	8b ec                	mov    %esp,%ebp
40c0bf:	8b 55 08             	mov    0x8(%ebp),%edx
40c0c2:	53                   	push   %ebx
40c0c3:	8b 5d 14             	mov    0x14(%ebp),%ebx
40c0c6:	56                   	push   %esi
40c0c7:	57                   	push   %edi
40c0c8:	85 db                	test   %ebx,%ebx
40c0ca:	75 10                	jne    0x40c0dc
40c0cc:	85 d2                	test   %edx,%edx
40c0ce:	75 10                	jne    0x40c0e0
40c0d0:	39 55 0c             	cmp    %edx,0xc(%ebp)
40c0d3:	75 12                	jne    0x40c0e7
40c0d5:	33 c0                	xor    %eax,%eax
40c0d7:	5f                   	pop    %edi
40c0d8:	5e                   	pop    %esi
40c0d9:	5b                   	pop    %ebx
40c0da:	5d                   	pop    %ebp
40c0db:	c3                   	ret
40c0dc:	85 d2                	test   %edx,%edx
40c0de:	74 07                	je     0x40c0e7
40c0e0:	8b 7d 0c             	mov    0xc(%ebp),%edi
40c0e3:	85 ff                	test   %edi,%edi
40c0e5:	75 13                	jne    0x40c0fa
40c0e7:	e8 3b 80 ff ff       	call   0x404127
40c0ec:	6a 16                	push   $0x16
40c0ee:	5e                   	pop    %esi
40c0ef:	89 30                	mov    %esi,(%eax)
40c0f1:	e8 91 6b ff ff       	call   0x402c87
40c0f6:	8b c6                	mov    %esi,%eax
40c0f8:	eb dd                	jmp    0x40c0d7
40c0fa:	85 db                	test   %ebx,%ebx
40c0fc:	75 07                	jne    0x40c105
40c0fe:	33 c0                	xor    %eax,%eax
40c100:	66 89 02             	mov    %ax,(%edx)
40c103:	eb d0                	jmp    0x40c0d5
40c105:	8b 4d 10             	mov    0x10(%ebp),%ecx
40c108:	85 c9                	test   %ecx,%ecx
40c10a:	75 07                	jne    0x40c113
40c10c:	33 c0                	xor    %eax,%eax
40c10e:	66 89 02             	mov    %ax,(%edx)
40c111:	eb d4                	jmp    0x40c0e7
40c113:	8b c2                	mov    %edx,%eax
40c115:	83 fb ff             	cmp    $0xffffffff,%ebx
40c118:	75 18                	jne    0x40c132
40c11a:	8b f2                	mov    %edx,%esi
40c11c:	2b f1                	sub    %ecx,%esi
40c11e:	0f b7 01             	movzwl (%ecx),%eax
40c121:	66 89 04 0e          	mov    %ax,(%esi,%ecx,1)
40c125:	83 c1 02             	add    $0x2,%ecx
40c128:	66 85 c0             	test   %ax,%ax
40c12b:	74 27                	je     0x40c154
40c12d:	4f                   	dec    %edi
40c12e:	75 ee                	jne    0x40c11e
40c130:	eb 22                	jmp    0x40c154
40c132:	8b f1                	mov    %ecx,%esi
40c134:	2b f2                	sub    %edx,%esi
40c136:	0f b7 0c 06          	movzwl (%esi,%eax,1),%ecx
40c13a:	66 89 08             	mov    %cx,(%eax)
40c13d:	83 c0 02             	add    $0x2,%eax
40c140:	66 85 c9             	test   %cx,%cx
40c143:	74 06                	je     0x40c14b
40c145:	4f                   	dec    %edi
40c146:	74 03                	je     0x40c14b
40c148:	4b                   	dec    %ebx
40c149:	75 eb                	jne    0x40c136
40c14b:	85 db                	test   %ebx,%ebx
40c14d:	75 05                	jne    0x40c154
40c14f:	33 c9                	xor    %ecx,%ecx
40c151:	66 89 08             	mov    %cx,(%eax)
40c154:	85 ff                	test   %edi,%edi
40c156:	0f 85 79 ff ff ff    	jne    0x40c0d5
40c15c:	33 c0                	xor    %eax,%eax
40c15e:	83 fb ff             	cmp    $0xffffffff,%ebx
40c161:	75 10                	jne    0x40c173
40c163:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40c166:	6a 50                	push   $0x50
40c168:	66 89 44 4a fe       	mov    %ax,-0x2(%edx,%ecx,2)
40c16d:	58                   	pop    %eax
40c16e:	e9 64 ff ff ff       	jmp    0x40c0d7
40c173:	66 89 02             	mov    %ax,(%edx)
40c176:	e8 ac 7f ff ff       	call   0x404127
40c17b:	6a 22                	push   $0x22
40c17d:	59                   	pop    %ecx
40c17e:	89 08                	mov    %ecx,(%eax)
40c180:	8b f1                	mov    %ecx,%esi
40c182:	e9 6a ff ff ff       	jmp    0x40c0f1
40c187:	8b ff                	mov    %edi,%edi
40c189:	55                   	push   %ebp
40c18a:	8b ec                	mov    %esp,%ebp
40c18c:	8b 4d 08             	mov    0x8(%ebp),%ecx
40c18f:	85 c9                	test   %ecx,%ecx
40c191:	78 1e                	js     0x40c1b1
40c193:	83 f9 02             	cmp    $0x2,%ecx
40c196:	7e 0c                	jle    0x40c1a4
40c198:	83 f9 03             	cmp    $0x3,%ecx
40c19b:	75 14                	jne    0x40c1b1
40c19d:	a1 f0 2e 41 00       	mov    0x412ef0,%eax
40c1a2:	5d                   	pop    %ebp
40c1a3:	c3                   	ret
40c1a4:	a1 f0 2e 41 00       	mov    0x412ef0,%eax
40c1a9:	89 0d f0 2e 41 00    	mov    %ecx,0x412ef0
40c1af:	5d                   	pop    %ebp
40c1b0:	c3                   	ret
40c1b1:	e8 71 7f ff ff       	call   0x404127
40c1b6:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40c1bc:	e8 c6 6a ff ff       	call   0x402c87
40c1c1:	83 c8 ff             	or     $0xffffffff,%eax
40c1c4:	5d                   	pop    %ebp
40c1c5:	c3                   	ret
40c1c6:	8b ff                	mov    %edi,%edi
40c1c8:	55                   	push   %ebp
40c1c9:	8b ec                	mov    %esp,%ebp
40c1cb:	83 7d 08 00          	cmpl   $0x0,0x8(%ebp)
40c1cf:	75 0b                	jne    0x40c1dc
40c1d1:	ff 75 0c             	push   0xc(%ebp)
40c1d4:	e8 16 60 ff ff       	call   0x4021ef
40c1d9:	59                   	pop    %ecx
40c1da:	5d                   	pop    %ebp
40c1db:	c3                   	ret
40c1dc:	56                   	push   %esi
40c1dd:	8b 75 0c             	mov    0xc(%ebp),%esi
40c1e0:	85 f6                	test   %esi,%esi
40c1e2:	75 0d                	jne    0x40c1f1
40c1e4:	ff 75 08             	push   0x8(%ebp)
40c1e7:	e8 7f 5d ff ff       	call   0x401f6b
40c1ec:	59                   	pop    %ecx
40c1ed:	33 c0                	xor    %eax,%eax
40c1ef:	eb 4d                	jmp    0x40c23e
40c1f1:	57                   	push   %edi
40c1f2:	eb 30                	jmp    0x40c224
40c1f4:	85 f6                	test   %esi,%esi
40c1f6:	75 01                	jne    0x40c1f9
40c1f8:	46                   	inc    %esi
40c1f9:	56                   	push   %esi
40c1fa:	ff 75 08             	push   0x8(%ebp)
40c1fd:	6a 00                	push   $0x0
40c1ff:	ff 35 24 32 41 00    	push   0x413224
40c205:	ff 15 2c f1 40 00    	call   *0x40f12c
40c20b:	8b f8                	mov    %eax,%edi
40c20d:	85 ff                	test   %edi,%edi
40c20f:	75 5e                	jne    0x40c26f
40c211:	39 05 bc 38 41 00    	cmp    %eax,0x4138bc
40c217:	74 40                	je     0x40c259
40c219:	56                   	push   %esi
40c21a:	e8 33 a4 ff ff       	call   0x406652
40c21f:	59                   	pop    %ecx
40c220:	85 c0                	test   %eax,%eax
40c222:	74 1d                	je     0x40c241
40c224:	83 fe e0             	cmp    $0xffffffe0,%esi
40c227:	76 cb                	jbe    0x40c1f4
40c229:	56                   	push   %esi
40c22a:	e8 23 a4 ff ff       	call   0x406652
40c22f:	59                   	pop    %ecx
40c230:	e8 f2 7e ff ff       	call   0x404127
40c235:	c7 00 0c 00 00 00    	movl   $0xc,(%eax)
40c23b:	33 c0                	xor    %eax,%eax
40c23d:	5f                   	pop    %edi
40c23e:	5e                   	pop    %esi
40c23f:	5d                   	pop    %ebp
40c240:	c3                   	ret
40c241:	e8 e1 7e ff ff       	call   0x404127
40c246:	8b f0                	mov    %eax,%esi
40c248:	ff 15 44 f0 40 00    	call   *0x40f044
40c24e:	50                   	push   %eax
40c24f:	e8 91 7e ff ff       	call   0x4040e5
40c254:	59                   	pop    %ecx
40c255:	89 06                	mov    %eax,(%esi)
40c257:	eb e2                	jmp    0x40c23b
40c259:	e8 c9 7e ff ff       	call   0x404127
40c25e:	8b f0                	mov    %eax,%esi
40c260:	ff 15 44 f0 40 00    	call   *0x40f044
40c266:	50                   	push   %eax
40c267:	e8 79 7e ff ff       	call   0x4040e5
40c26c:	59                   	pop    %ecx
40c26d:	89 06                	mov    %eax,(%esi)
40c26f:	8b c7                	mov    %edi,%eax
40c271:	eb ca                	jmp    0x40c23d
40c273:	8b ff                	mov    %edi,%edi
40c275:	55                   	push   %ebp
40c276:	8b ec                	mov    %esp,%ebp
40c278:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40c27b:	53                   	push   %ebx
40c27c:	33 db                	xor    %ebx,%ebx
40c27e:	3b cb                	cmp    %ebx,%ecx
40c280:	76 1b                	jbe    0x40c29d
40c282:	6a e0                	push   $0xffffffe0
40c284:	33 d2                	xor    %edx,%edx
40c286:	58                   	pop    %eax
40c287:	f7 f1                	div    %ecx
40c289:	3b 45 10             	cmp    0x10(%ebp),%eax
40c28c:	73 0f                	jae    0x40c29d
40c28e:	e8 94 7e ff ff       	call   0x404127
40c293:	c7 00 0c 00 00 00    	movl   $0xc,(%eax)
40c299:	33 c0                	xor    %eax,%eax
40c29b:	eb 41                	jmp    0x40c2de
40c29d:	0f af 4d 10          	imul   0x10(%ebp),%ecx
40c2a1:	56                   	push   %esi
40c2a2:	57                   	push   %edi
40c2a3:	8b f1                	mov    %ecx,%esi
40c2a5:	39 5d 08             	cmp    %ebx,0x8(%ebp)
40c2a8:	74 0b                	je     0x40c2b5
40c2aa:	ff 75 08             	push   0x8(%ebp)
40c2ad:	e8 c1 22 00 00       	call   0x40e573
40c2b2:	59                   	pop    %ecx
40c2b3:	8b d8                	mov    %eax,%ebx
40c2b5:	56                   	push   %esi
40c2b6:	ff 75 08             	push   0x8(%ebp)
40c2b9:	e8 08 ff ff ff       	call   0x40c1c6