40d771:	89 4e 20             	mov    %ecx,0x20(%esi)
40d774:	8d 4e 40             	lea    0x40(%esi),%ecx
40d777:	e8 04 f0 ff ff       	call   0x40c780
40d77c:	8b c7                	mov    %edi,%eax
40d77e:	0b c3                	or     %ebx,%eax
40d780:	75 04                	jne    0x40d786
40d782:	83 66 20 df          	andl   $0xffffffdf,0x20(%esi)
40d786:	83 7d fc 08          	cmpl   $0x8,-0x4(%ebp)
40d78a:	8b ce                	mov    %esi,%ecx
40d78c:	ff 75 0c             	push   0xc(%ebp)
40d78f:	c6 46 3c 01          	movb   $0x1,0x3c(%esi)
40d793:	ff 75 08             	push   0x8(%ebp)
40d796:	75 09                	jne    0x40d7a1
40d798:	53                   	push   %ebx
40d799:	57                   	push   %edi
40d79a:	e8 52 f1 ff ff       	call   0x40c8f1
40d79f:	eb 06                	jmp    0x40d7a7
40d7a1:	57                   	push   %edi
40d7a2:	e8 c3 f0 ff ff       	call   0x40c86a
40d7a7:	8b 46 20             	mov    0x20(%esi),%eax
40d7aa:	c1 e8 07             	shr    $0x7,%eax
40d7ad:	a8 01                	test   $0x1,%al
40d7af:	74 1e                	je     0x40d7cf
40d7b1:	83 7e 38 00          	cmpl   $0x0,0x38(%esi)
40d7b5:	6a 30                	push   $0x30
40d7b7:	5a                   	pop    %edx
40d7b8:	74 08                	je     0x40d7c2
40d7ba:	8b 46 34             	mov    0x34(%esi),%eax
40d7bd:	66 39 10             	cmp    %dx,(%eax)
40d7c0:	74 0d                	je     0x40d7cf
40d7c2:	83 46 34 fe          	addl   $0xfffffffe,0x34(%esi)
40d7c6:	8b 4e 34             	mov    0x34(%esi),%ecx
40d7c9:	66 89 11             	mov    %dx,(%ecx)
40d7cc:	ff 46 38             	incl   0x38(%esi)
40d7cf:	b0 01                	mov    $0x1,%al
40d7d1:	5f                   	pop    %edi
40d7d2:	5e                   	pop    %esi
40d7d3:	5b                   	pop    %ebx
40d7d4:	c9                   	leave
40d7d5:	c2 08 00             	ret    $0x8
40d7d8:	8b ff                	mov    %edi,%edi
40d7da:	56                   	push   %esi
40d7db:	8b f1                	mov    %ecx,%esi
40d7dd:	57                   	push   %edi
40d7de:	83 46 14 04          	addl   $0x4,0x14(%esi)
40d7e2:	8b 46 14             	mov    0x14(%esi),%eax
40d7e5:	8b 78 fc             	mov    -0x4(%eax),%edi
40d7e8:	e8 56 59 00 00       	call   0x413143
40d7ed:	85 c0                	test   %eax,%eax
40d7ef:	75 14                	jne    0x40d805
40d7f1:	e8 dd 14 00 00       	call   0x40ecd3
40d7f6:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40d7fc:	e8 15 14 00 00       	call   0x40ec16
40d801:	32 c0                	xor    %al,%al
40d803:	eb 44                	jmp    0x40d849
40d805:	ff 76 2c             	push   0x2c(%esi)
40d808:	e8 c3 fb ff ff       	call   0x40d3d0
40d80d:	59                   	pop    %ecx
40d80e:	83 e8 01             	sub    $0x1,%eax
40d811:	74 2b                	je     0x40d83e
40d813:	83 e8 01             	sub    $0x1,%eax
40d816:	74 1d                	je     0x40d835
40d818:	48                   	dec    %eax
40d819:	83 e8 01             	sub    $0x1,%eax
40d81c:	74 10                	je     0x40d82e
40d81e:	83 e8 04             	sub    $0x4,%eax
40d821:	75 ce                	jne    0x40d7f1
40d823:	8b 46 18             	mov    0x18(%esi),%eax
40d826:	99                   	cltd
40d827:	89 07                	mov    %eax,(%edi)
40d829:	89 57 04             	mov    %edx,0x4(%edi)
40d82c:	eb 15                	jmp    0x40d843
40d82e:	8b 46 18             	mov    0x18(%esi),%eax
40d831:	89 07                	mov    %eax,(%edi)
40d833:	eb 0e                	jmp    0x40d843
40d835:	66 8b 46 18          	mov    0x18(%esi),%ax
40d839:	66 89 07             	mov    %ax,(%edi)
40d83c:	eb 05                	jmp    0x40d843
40d83e:	8a 46 18             	mov    0x18(%esi),%al
40d841:	88 07                	mov    %al,(%edi)
40d843:	c6 46 30 01          	movb   $0x1,0x30(%esi)
40d847:	b0 01                	mov    $0x1,%al
40d849:	5f                   	pop    %edi
40d84a:	5e                   	pop    %esi
40d84b:	c3                   	ret
40d84c:	8b 51 20             	mov    0x20(%ecx),%edx
40d84f:	8b c2                	mov    %edx,%eax
40d851:	c1 e8 05             	shr    $0x5,%eax
40d854:	a8 01                	test   $0x1,%al
40d856:	74 09                	je     0x40d861
40d858:	81 ca 80 00 00 00    	or     $0x80,%edx
40d85e:	89 51 20             	mov    %edx,0x20(%ecx)
40d861:	6a 00                	push   $0x0
40d863:	6a 08                	push   $0x8
40d865:	e8 19 fe ff ff       	call   0x40d683
40d86a:	c3                   	ret
40d86b:	6a 01                	push   $0x1
40d86d:	6a 10                	push   $0x10
40d86f:	c7 41 28 08 00 00 00 	movl   $0x8,0x28(%ecx)
40d876:	c7 41 2c 0a 00 00 00 	movl   $0xa,0x2c(%ecx)
40d87d:	e8 01 fe ff ff       	call   0x40d683
40d882:	c3                   	ret
40d883:	8b ff                	mov    %edi,%edi
40d885:	53                   	push   %ebx
40d886:	56                   	push   %esi
40d887:	8b f1                	mov    %ecx,%esi
40d889:	57                   	push   %edi
40d88a:	83 46 14 04          	addl   $0x4,0x14(%esi)
40d88e:	8b 46 14             	mov    0x14(%esi),%eax
40d891:	8b 5e 28             	mov    0x28(%esi),%ebx
40d894:	8b 78 fc             	mov    -0x4(%eax),%edi
40d897:	89 7e 34             	mov    %edi,0x34(%esi)
40d89a:	83 fb ff             	cmp    $0xffffffff,%ebx
40d89d:	75 05                	jne    0x40d8a4
40d89f:	bb ff ff ff 7f       	mov    $0x7fffffff,%ebx
40d8a4:	ff 76 2c             	push   0x2c(%esi)
40d8a7:	0f b7 46 32          	movzwl 0x32(%esi),%eax
40d8ab:	50                   	push   %eax
40d8ac:	ff 76 04             	push   0x4(%esi)
40d8af:	ff 36                	push   (%esi)
40d8b1:	e8 48 ef ff ff       	call   0x40c7fe
40d8b6:	83 c4 10             	add    $0x10,%esp
40d8b9:	84 c0                	test   %al,%al
40d8bb:	74 1b                	je     0x40d8d8
40d8bd:	85 ff                	test   %edi,%edi
40d8bf:	75 08                	jne    0x40d8c9
40d8c1:	bf 30 d9 41 00       	mov    $0x41d930,%edi
40d8c6:	89 7e 34             	mov    %edi,0x34(%esi)
40d8c9:	53                   	push   %ebx
40d8ca:	57                   	push   %edi
40d8cb:	c6 46 3c 01          	movb   $0x1,0x3c(%esi)
40d8cf:	e8 85 32 00 00       	call   0x410b59
40d8d4:	59                   	pop    %ecx
40d8d5:	59                   	pop    %ecx
40d8d6:	eb 15                	jmp    0x40d8ed
40d8d8:	85 ff                	test   %edi,%edi
40d8da:	75 07                	jne    0x40d8e3
40d8dc:	c7 46 34 40 d9 41 00 	movl   $0x41d940,0x34(%esi)
40d8e3:	6a 00                	push   $0x0
40d8e5:	53                   	push   %ebx
40d8e6:	8b ce                	mov    %esi,%ecx
40d8e8:	e8 09 00 00 00       	call   0x40d8f6
40d8ed:	5f                   	pop    %edi
40d8ee:	89 46 38             	mov    %eax,0x38(%esi)
40d8f1:	b0 01                	mov    $0x1,%al
40d8f3:	5e                   	pop    %esi
40d8f4:	5b                   	pop    %ebx
40d8f5:	c3                   	ret
40d8f6:	8b ff                	mov    %edi,%edi
40d8f8:	55                   	push   %ebp
40d8f9:	8b ec                	mov    %esp,%ebp
40d8fb:	53                   	push   %ebx
40d8fc:	56                   	push   %esi
40d8fd:	8b d9                	mov    %ecx,%ebx
40d8ff:	57                   	push   %edi
40d900:	33 ff                	xor    %edi,%edi
40d902:	8b 73 34             	mov    0x34(%ebx),%esi
40d905:	39 7d 08             	cmp    %edi,0x8(%ebp)
40d908:	7e 2a                	jle    0x40d934
40d90a:	8a 06                	mov    (%esi),%al
40d90c:	84 c0                	test   %al,%al
40d90e:	74 24                	je     0x40d934
40d910:	0f b6 c0             	movzbl %al,%eax
40d913:	68 00 80 00 00       	push   $0x8000
40d918:	50                   	push   %eax
40d919:	8b 43 08             	mov    0x8(%ebx),%eax
40d91c:	8b 00                	mov    (%eax),%eax
40d91e:	ff 30                	push   (%eax)
40d920:	e8 08 e3 ff ff       	call   0x40bc2d
40d925:	83 c4 0c             	add    $0xc,%esp
40d928:	85 c0                	test   %eax,%eax
40d92a:	74 01                	je     0x40d92d
40d92c:	46                   	inc    %esi
40d92d:	46                   	inc    %esi
40d92e:	47                   	inc    %edi
40d92f:	3b 7d 08             	cmp    0x8(%ebp),%edi
40d932:	7c d6                	jl     0x40d90a
40d934:	8b c7                	mov    %edi,%eax
40d936:	5f                   	pop    %edi
40d937:	5e                   	pop    %esi
40d938:	5b                   	pop    %ebx
40d939:	5d                   	pop    %ebp
40d93a:	c2 08 00             	ret    $0x8
40d93d:	83 39 00             	cmpl   $0x0,(%ecx)
40d940:	75 13                	jne    0x40d955
40d942:	e8 8c 13 00 00       	call   0x40ecd3
40d947:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40d94d:	e8 c4 12 00 00       	call   0x40ec16
40d952:	32 c0                	xor    %al,%al
40d954:	c3                   	ret
40d955:	b0 01                	mov    $0x1,%al
40d957:	c3                   	ret
40d958:	83 79 1c 00          	cmpl   $0x0,0x1c(%ecx)
40d95c:	74 19                	je     0x40d977
40d95e:	83 79 1c 07          	cmpl   $0x7,0x1c(%ecx)
40d962:	74 13                	je     0x40d977
40d964:	e8 6a 13 00 00       	call   0x40ecd3
40d969:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40d96f:	e8 a2 12 00 00       	call   0x40ec16
40d974:	32 c0                	xor    %al,%al
40d976:	c3                   	ret
40d977:	b0 01                	mov    $0x1,%al
40d979:	c3                   	ret
40d97a:	8b ff                	mov    %edi,%edi
40d97c:	55                   	push   %ebp
40d97d:	8b ec                	mov    %esp,%ebp
40d97f:	8b d1                	mov    %ecx,%edx
40d981:	8b 0a                	mov    (%edx),%ecx
40d983:	8b 41 08             	mov    0x8(%ecx),%eax
40d986:	3b 41 04             	cmp    0x4(%ecx),%eax
40d989:	8b 45 0c             	mov    0xc(%ebp),%eax
40d98c:	75 14                	jne    0x40d9a2
40d98e:	80 79 0c 00          	cmpb   $0x0,0xc(%ecx)
40d992:	74 04                	je     0x40d998
40d994:	ff 00                	incl   (%eax)
40d996:	eb 03                	jmp    0x40d99b
40d998:	83 08 ff             	orl    $0xffffffff,(%eax)
40d99b:	8b 02                	mov    (%edx),%eax
40d99d:	8a 40 0c             	mov    0xc(%eax),%al
40d9a0:	eb 19                	jmp    0x40d9bb
40d9a2:	ff 00                	incl   (%eax)
40d9a4:	8b 02                	mov    (%edx),%eax
40d9a6:	ff 40 08             	incl   0x8(%eax)
40d9a9:	8b 02                	mov    (%edx),%eax
40d9ab:	8b 08                	mov    (%eax),%ecx
40d9ad:	66 8b 45 08          	mov    0x8(%ebp),%ax
40d9b1:	66 89 01             	mov    %ax,(%ecx)
40d9b4:	8b 02                	mov    (%edx),%eax
40d9b6:	83 00 02             	addl   $0x2,(%eax)
40d9b9:	b0 01                	mov    $0x1,%al
40d9bb:	5d                   	pop    %ebp
40d9bc:	c2 08 00             	ret    $0x8
40d9bf:	8b ff                	mov    %edi,%edi
40d9c1:	55                   	push   %ebp
40d9c2:	8b ec                	mov    %esp,%ebp
40d9c4:	83 ec 0c             	sub    $0xc,%esp
40d9c7:	53                   	push   %ebx
40d9c8:	56                   	push   %esi
40d9c9:	8b f1                	mov    %ecx,%esi
40d9cb:	57                   	push   %edi
40d9cc:	80 7e 3c 00          	cmpb   $0x0,0x3c(%esi)
40d9d0:	75 58                	jne    0x40da2a
40d9d2:	33 ff                	xor    %edi,%edi
40d9d4:	39 7e 38             	cmp    %edi,0x38(%esi)
40d9d7:	7e 51                	jle    0x40da2a
40d9d9:	8b 4e 34             	mov    0x34(%esi),%ecx
40d9dc:	8d 5e 18             	lea    0x18(%esi),%ebx
40d9df:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40d9e2:	33 c0                	xor    %eax,%eax
40d9e4:	66 89 45 fc          	mov    %ax,-0x4(%ebp)
40d9e8:	8b 46 08             	mov    0x8(%esi),%eax
40d9eb:	50                   	push   %eax
40d9ec:	8b 00                	mov    (%eax),%eax
40d9ee:	ff 70 04             	push   0x4(%eax)
40d9f1:	8d 45 fc             	lea    -0x4(%ebp),%eax
40d9f4:	51                   	push   %ecx
40d9f5:	50                   	push   %eax
40d9f6:	e8 5c 4a 00 00       	call   0x412457
40d9fb:	83 c4 10             	add    $0x10,%esp
40d9fe:	89 45 f4             	mov    %eax,-0xc(%ebp)
40da01:	85 c0                	test   %eax,%eax
40da03:	7e 20                	jle    0x40da25
40da05:	53                   	push   %ebx
40da06:	ff 75 fc             	push   -0x4(%ebp)
40da09:	8d 8e 48 04 00 00    	lea    0x448(%esi),%ecx
40da0f:	e8 66 ff ff ff       	call   0x40d97a
40da14:	8b 4d f8             	mov    -0x8(%ebp),%ecx
40da17:	03 4d f4             	add    -0xc(%ebp),%ecx
40da1a:	47                   	inc    %edi
40da1b:	89 4d f8             	mov    %ecx,-0x8(%ebp)
40da1e:	3b 7e 38             	cmp    0x38(%esi),%edi
40da21:	75 bf                	jne    0x40d9e2
40da23:	eb 1e                	jmp    0x40da43
40da25:	83 0b ff             	orl    $0xffffffff,(%ebx)
40da28:	eb 19                	jmp    0x40da43
40da2a:	8d 46 0c             	lea    0xc(%esi),%eax
40da2d:	50                   	push   %eax
40da2e:	8d 46 18             	lea    0x18(%esi),%eax
40da31:	50                   	push   %eax
40da32:	ff 76 38             	push   0x38(%esi)
40da35:	8d 8e 48 04 00 00    	lea    0x448(%esi),%ecx
40da3b:	ff 76 34             	push   0x34(%esi)
40da3e:	e8 09 00 00 00       	call   0x40da4c
40da43:	5f                   	pop    %edi
40da44:	5e                   	pop    %esi
40da45:	b0 01                	mov    $0x1,%al
40da47:	5b                   	pop    %ebx
40da48:	c9                   	leave
40da49:	c2 04 00             	ret    $0x4
40da4c:	8b ff                	mov    %edi,%edi
40da4e:	55                   	push   %ebp
40da4f:	8b ec                	mov    %esp,%ebp
40da51:	51                   	push   %ecx
40da52:	53                   	push   %ebx
40da53:	8b 5d 0c             	mov    0xc(%ebp),%ebx
40da56:	8b c1                	mov    %ecx,%eax
40da58:	89 45 fc             	mov    %eax,-0x4(%ebp)
40da5b:	85 db                	test   %ebx,%ebx
40da5d:	74 59                	je     0x40dab8
40da5f:	8b 00                	mov    (%eax),%eax
40da61:	57                   	push   %edi
40da62:	8b 78 04             	mov    0x4(%eax),%edi
40da65:	39 78 08             	cmp    %edi,0x8(%eax)
40da68:	75 0b                	jne    0x40da75
40da6a:	80 78 0c 00          	cmpb   $0x0,0xc(%eax)
40da6e:	8b 45 10             	mov    0x10(%ebp),%eax
40da71:	74 3d                	je     0x40dab0
40da73:	eb 33                	jmp    0x40daa8
40da75:	2b 78 08             	sub    0x8(%eax),%edi
40da78:	3b fb                	cmp    %ebx,%edi
40da7a:	72 02                	jb     0x40da7e
40da7c:	8b fb                	mov    %ebx,%edi
40da7e:	56                   	push   %esi
40da7f:	8d 34 3f             	lea    (%edi,%edi,1),%esi
40da82:	56                   	push   %esi
40da83:	ff 75 08             	push   0x8(%ebp)
40da86:	ff 30                	push   (%eax)
40da88:	e8 43 c1 ff ff       	call   0x409bd0
40da8d:	8b 4d fc             	mov    -0x4(%ebp),%ecx
40da90:	83 c4 0c             	add    $0xc,%esp
40da93:	8b 01                	mov    (%ecx),%eax
40da95:	01 30                	add    %esi,(%eax)
40da97:	8b 01                	mov    (%ecx),%eax
40da99:	5e                   	pop    %esi
40da9a:	01 78 08             	add    %edi,0x8(%eax)
40da9d:	8b 01                	mov    (%ecx),%eax
40da9f:	80 78 0c 00          	cmpb   $0x0,0xc(%eax)
40daa3:	8b 45 10             	mov    0x10(%ebp),%eax
40daa6:	74 04                	je     0x40daac
40daa8:	01 18                	add    %ebx,(%eax)
40daaa:	eb 0b                	jmp    0x40dab7
40daac:	3b fb                	cmp    %ebx,%edi
40daae:	74 05                	je     0x40dab5
40dab0:	83 08 ff             	orl    $0xffffffff,(%eax)
40dab3:	eb 02                	jmp    0x40dab7
40dab5:	01 38                	add    %edi,(%eax)
40dab7:	5f                   	pop    %edi
40dab8:	5b                   	pop    %ebx
40dab9:	c9                   	leave
40daba:	c2 10 00             	ret    $0x10
40dabd:	8b ff                	mov    %edi,%edi
40dabf:	55                   	push   %ebp
40dac0:	8b ec                	mov    %esp,%ebp
40dac2:	ff 75 20             	push   0x20(%ebp)
40dac5:	ff 75 1c             	push   0x1c(%ebp)
40dac8:	ff 75 18             	push   0x18(%ebp)
40dacb:	ff 75 14             	push   0x14(%ebp)
40dace:	ff 75 10             	push   0x10(%ebp)
40dad1:	ff 75 0c             	push   0xc(%ebp)
40dad4:	ff 75 08             	push   0x8(%ebp)