40762c:	74 0b                	je     0x407639
40762e:	6a fc                	push   $0xfffffffc
407630:	59                   	pop    %ecx
407631:	83 c0 0c             	add    $0xc,%eax
407634:	f0 21 08             	lock and %ecx,(%eax)
407637:	eb 21                	jmp    0x40765a
407639:	8b 40 0c             	mov    0xc(%eax),%eax
40763c:	83 e0 41             	and    $0x41,%eax
40763f:	3c 41                	cmp    $0x41,%al
407641:	75 17                	jne    0x40765a
407643:	8b 45 08             	mov    0x8(%ebp),%eax
407646:	8b 40 0c             	mov    0xc(%eax),%eax
407649:	c1 e8 08             	shr    $0x8,%eax
40764c:	a8 01                	test   $0x1,%al
40764e:	75 0a                	jne    0x40765a
407650:	8b 45 08             	mov    0x8(%ebp),%eax
407653:	c7 40 18 00 02 00 00 	movl   $0x200,0x18(%eax)
40765a:	8b 45 08             	mov    0x8(%ebp),%eax
40765d:	8b 40 10             	mov    0x10(%eax),%eax
407660:	56                   	push   %esi
407661:	57                   	push   %edi
407662:	53                   	push   %ebx
407663:	50                   	push   %eax
407664:	e8 a8 6c 00 00       	call   0x40e311
407669:	23 c2                	and    %edx,%eax
40766b:	83 c4 10             	add    $0x10,%esp
40766e:	83 f8 ff             	cmp    $0xffffffff,%eax
407671:	75 04                	jne    0x407677
407673:	0b c0                	or     %eax,%eax
407675:	eb 02                	jmp    0x407679
407677:	33 c0                	xor    %eax,%eax
407679:	5f                   	pop    %edi
40767a:	5e                   	pop    %esi
40767b:	5b                   	pop    %ebx
40767c:	5d                   	pop    %ebp
40767d:	c3                   	ret
40767e:	8b ff                	mov    %edi,%edi
407680:	55                   	push   %ebp
407681:	8b ec                	mov    %esp,%ebp
407683:	ff 75 10             	push   0x10(%ebp)
407686:	8b 45 0c             	mov    0xc(%ebp),%eax
407689:	99                   	cltd
40768a:	52                   	push   %edx
40768b:	50                   	push   %eax
40768c:	ff 75 08             	push   0x8(%ebp)
40768f:	e8 b1 fd ff ff       	call   0x407445
407694:	83 c4 10             	add    $0x10,%esp
407697:	5d                   	pop    %ebp
407698:	c3                   	ret
407699:	8b ff                	mov    %edi,%edi
40769b:	55                   	push   %ebp
40769c:	8b ec                	mov    %esp,%ebp
40769e:	53                   	push   %ebx
40769f:	56                   	push   %esi
4076a0:	57                   	push   %edi
4076a1:	8b 7d 08             	mov    0x8(%ebp),%edi
4076a4:	85 ff                	test   %edi,%edi
4076a6:	74 13                	je     0x4076bb
4076a8:	8b 4d 0c             	mov    0xc(%ebp),%ecx
4076ab:	85 c9                	test   %ecx,%ecx
4076ad:	74 0c                	je     0x4076bb
4076af:	8b 5d 10             	mov    0x10(%ebp),%ebx
4076b2:	85 db                	test   %ebx,%ebx
4076b4:	75 1b                	jne    0x4076d1
4076b6:	33 c0                	xor    %eax,%eax
4076b8:	66 89 07             	mov    %ax,(%edi)
4076bb:	e8 47 06 00 00       	call   0x407d07
4076c0:	6a 16                	push   $0x16
4076c2:	5e                   	pop    %esi
4076c3:	89 30                	mov    %esi,(%eax)
4076c5:	e8 64 05 00 00       	call   0x407c2e
4076ca:	5f                   	pop    %edi
4076cb:	8b c6                	mov    %esi,%eax
4076cd:	5e                   	pop    %esi
4076ce:	5b                   	pop    %ebx
4076cf:	5d                   	pop    %ebp
4076d0:	c3                   	ret
4076d1:	8b d7                	mov    %edi,%edx
4076d3:	33 f6                	xor    %esi,%esi
4076d5:	66 39 32             	cmp    %si,(%edx)
4076d8:	74 08                	je     0x4076e2
4076da:	83 c2 02             	add    $0x2,%edx
4076dd:	83 e9 01             	sub    $0x1,%ecx
4076e0:	75 f3                	jne    0x4076d5
4076e2:	85 c9                	test   %ecx,%ecx
4076e4:	74 d0                	je     0x4076b6
4076e6:	2b da                	sub    %edx,%ebx
4076e8:	0f b7 04 13          	movzwl (%ebx,%edx,1),%eax
4076ec:	66 89 02             	mov    %ax,(%edx)
4076ef:	8d 52 02             	lea    0x2(%edx),%edx
4076f2:	66 85 c0             	test   %ax,%ax
4076f5:	74 05                	je     0x4076fc
4076f7:	83 e9 01             	sub    $0x1,%ecx
4076fa:	75 ec                	jne    0x4076e8
4076fc:	85 c9                	test   %ecx,%ecx
4076fe:	75 ca                	jne    0x4076ca
407700:	33 c0                	xor    %eax,%eax
407702:	66 89 07             	mov    %ax,(%edi)
407705:	e8 fd 05 00 00       	call   0x407d07
40770a:	6a 22                	push   $0x22
40770c:	eb b4                	jmp    0x4076c2
40770e:	6a 0c                	push   $0xc
407710:	68 b8 1b 42 00       	push   $0x421bb8
407715:	e8 36 c4 ff ff       	call   0x403b50
40771a:	83 65 e4 00          	andl   $0x0,-0x1c(%ebp)
40771e:	8b 45 08             	mov    0x8(%ebp),%eax
407721:	ff 30                	push   (%eax)
407723:	e8 02 40 00 00       	call   0x40b72a
407728:	59                   	pop    %ecx
407729:	83 65 fc 00          	andl   $0x0,-0x4(%ebp)
40772d:	8b 4d 0c             	mov    0xc(%ebp),%ecx
407730:	e8 52 00 00 00       	call   0x407787
407735:	8b f0                	mov    %eax,%esi
407737:	89 75 e4             	mov    %esi,-0x1c(%ebp)
40773a:	c7 45 fc fe ff ff ff 	movl   $0xfffffffe,-0x4(%ebp)
407741:	e8 0d 00 00 00       	call   0x407753
407746:	8b c6                	mov    %esi,%eax
407748:	e8 49 c4 ff ff       	call   0x403b96
40774d:	c2 0c 00             	ret    $0xc
407750:	8b 75 e4             	mov    -0x1c(%ebp),%esi
407753:	8b 45 10             	mov    0x10(%ebp),%eax
407756:	ff 30                	push   (%eax)
407758:	e8 e1 3f 00 00       	call   0x40b73e
40775d:	59                   	pop    %ecx
40775e:	c3                   	ret
40775f:	8b ff                	mov    %edi,%edi
407761:	55                   	push   %ebp
407762:	8b ec                	mov    %esp,%ebp
407764:	83 ec 0c             	sub    $0xc,%esp
407767:	8b 45 08             	mov    0x8(%ebp),%eax
40776a:	8d 4d ff             	lea    -0x1(%ebp),%ecx
40776d:	89 45 f8             	mov    %eax,-0x8(%ebp)
407770:	89 45 f4             	mov    %eax,-0xc(%ebp)
407773:	8d 45 f8             	lea    -0x8(%ebp),%eax
407776:	50                   	push   %eax
407777:	ff 75 0c             	push   0xc(%ebp)
40777a:	8d 45 f4             	lea    -0xc(%ebp),%eax
40777d:	50                   	push   %eax
40777e:	e8 8b ff ff ff       	call   0x40770e
407783:	8b e5                	mov    %ebp,%esp
407785:	5d                   	pop    %ebp
407786:	c3                   	ret
407787:	8b ff                	mov    %edi,%edi
407789:	55                   	push   %ebp
40778a:	8b ec                	mov    %esp,%ebp
40778c:	51                   	push   %ecx
40778d:	51                   	push   %ecx
40778e:	56                   	push   %esi
40778f:	8b f1                	mov    %ecx,%esi
407791:	57                   	push   %edi
407792:	8b 06                	mov    (%esi),%eax
407794:	8b 38                	mov    (%eax),%edi
407796:	57                   	push   %edi
407797:	e8 cb 3f 00 00       	call   0x40b767
40779c:	88 45 fc             	mov    %al,-0x4(%ebp)
40779f:	8b 06                	mov    (%esi),%eax
4077a1:	ff 30                	push   (%eax)
4077a3:	8b 46 0c             	mov    0xc(%esi),%eax
4077a6:	ff 30                	push   (%eax)
4077a8:	8b 46 08             	mov    0x8(%esi),%eax
4077ab:	ff 30                	push   (%eax)
4077ad:	8b 46 04             	mov    0x4(%esi),%eax
4077b0:	ff 30                	push   (%eax)
4077b2:	e8 16 00 00 00       	call   0x4077cd
4077b7:	57                   	push   %edi
4077b8:	ff 75 fc             	push   -0x4(%ebp)
4077bb:	8b f0                	mov    %eax,%esi
4077bd:	e8 5a 40 00 00       	call   0x40b81c
4077c2:	83 c4 1c             	add    $0x1c,%esp
4077c5:	8b c6                	mov    %esi,%eax
4077c7:	5f                   	pop    %edi
4077c8:	5e                   	pop    %esi
4077c9:	8b e5                	mov    %ebp,%esp
4077cb:	5d                   	pop    %ebp
4077cc:	c3                   	ret
4077cd:	8b ff                	mov    %edi,%edi
4077cf:	55                   	push   %ebp
4077d0:	8b ec                	mov    %esp,%ebp
4077d2:	83 ec 0c             	sub    $0xc,%esp
4077d5:	53                   	push   %ebx
4077d6:	56                   	push   %esi
4077d7:	8b 75 0c             	mov    0xc(%ebp),%esi
4077da:	57                   	push   %edi
4077db:	85 f6                	test   %esi,%esi
4077dd:	74 1e                	je     0x4077fd
4077df:	8b 7d 10             	mov    0x10(%ebp),%edi
4077e2:	85 ff                	test   %edi,%edi
4077e4:	74 17                	je     0x4077fd
4077e6:	8b 5d 14             	mov    0x14(%ebp),%ebx
4077e9:	85 db                	test   %ebx,%ebx
4077eb:	75 19                	jne    0x407806
4077ed:	e8 15 05 00 00       	call   0x407d07
4077f2:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
4077f8:	e8 31 04 00 00       	call   0x407c2e
4077fd:	33 c0                	xor    %eax,%eax
4077ff:	5f                   	pop    %edi
407800:	5e                   	pop    %esi
407801:	5b                   	pop    %ebx
407802:	8b e5                	mov    %ebp,%esp
407804:	5d                   	pop    %ebp
407805:	c3                   	ret
407806:	8b 4d 08             	mov    0x8(%ebp),%ecx
407809:	85 c9                	test   %ecx,%ecx
40780b:	74 e0                	je     0x4077ed
40780d:	83 c8 ff             	or     $0xffffffff,%eax
407810:	33 d2                	xor    %edx,%edx
407812:	f7 f6                	div    %esi
407814:	3b f8                	cmp    %eax,%edi
407816:	77 d5                	ja     0x4077ed
407818:	8d 43 0c             	lea    0xc(%ebx),%eax
40781b:	89 45 f4             	mov    %eax,-0xc(%ebp)
40781e:	8b 00                	mov    (%eax),%eax
407820:	a9 c0 04 00 00       	test   $0x4c0,%eax
407825:	74 05                	je     0x40782c
407827:	8b 53 18             	mov    0x18(%ebx),%edx
40782a:	eb 05                	jmp    0x407831
40782c:	ba 00 10 00 00       	mov    $0x1000,%edx
407831:	0f af f7             	imul   %edi,%esi
407834:	89 55 fc             	mov    %edx,-0x4(%ebp)
407837:	8b fe                	mov    %esi,%edi
407839:	85 f6                	test   %esi,%esi
40783b:	0f 84 e6 00 00 00    	je     0x407927
407841:	8b 43 0c             	mov    0xc(%ebx),%eax
407844:	a8 c0                	test   $0xc0,%al
407846:	74 39                	je     0x407881
407848:	8b 43 08             	mov    0x8(%ebx),%eax
40784b:	89 45 f8             	mov    %eax,-0x8(%ebp)
40784e:	85 c0                	test   %eax,%eax
407850:	74 2f                	je     0x407881
407852:	0f 88 d7 00 00 00    	js     0x40792f
407858:	3b f8                	cmp    %eax,%edi
40785a:	73 05                	jae    0x407861
40785c:	8b c7                	mov    %edi,%eax
40785e:	89 7d f8             	mov    %edi,-0x8(%ebp)
407861:	50                   	push   %eax
407862:	51                   	push   %ecx
407863:	ff 33                	push   (%ebx)
407865:	e8 76 0c 01 00       	call   0x4184e0
40786a:	8b 45 f8             	mov    -0x8(%ebp),%eax
40786d:	83 c4 0c             	add    $0xc,%esp
407870:	29 43 08             	sub    %eax,0x8(%ebx)
407873:	2b f8                	sub    %eax,%edi
407875:	8b 4d 08             	mov    0x8(%ebp),%ecx
407878:	01 03                	add    %eax,(%ebx)
40787a:	03 c8                	add    %eax,%ecx
40787c:	89 4d 08             	mov    %ecx,0x8(%ebp)
40787f:	eb 70                	jmp    0x4078f1
407881:	3b fa                	cmp    %edx,%edi
407883:	72 71                	jb     0x4078f6
407885:	8b 43 0c             	mov    0xc(%ebx),%eax
407888:	a8 c0                	test   $0xc0,%al
40788a:	74 15                	je     0x4078a1
40788c:	53                   	push   %ebx
40788d:	e8 94 62 00 00       	call   0x40db26
407892:	59                   	pop    %ecx
407893:	85 c0                	test   %eax,%eax
407895:	0f 85 9d 00 00 00    	jne    0x407938
40789b:	8b 4d 08             	mov    0x8(%ebp),%ecx
40789e:	8b 55 fc             	mov    -0x4(%ebp),%edx
4078a1:	8b c7                	mov    %edi,%eax
4078a3:	85 d2                	test   %edx,%edx
4078a5:	74 0e                	je     0x4078b5
4078a7:	33 d2                	xor    %edx,%edx
4078a9:	f7 75 fc             	divl   -0x4(%ebp)
4078ac:	8b c7                	mov    %edi,%eax
4078ae:	2b c2                	sub    %edx,%eax
4078b0:	89 45 f8             	mov    %eax,-0x8(%ebp)
4078b3:	eb 03                	jmp    0x4078b8
4078b5:	89 7d f8             	mov    %edi,-0x8(%ebp)
4078b8:	83 f8 ff             	cmp    $0xffffffff,%eax
4078bb:	72 06                	jb     0x4078c3
4078bd:	83 c8 ff             	or     $0xffffffff,%eax
4078c0:	89 45 f8             	mov    %eax,-0x8(%ebp)
4078c3:	50                   	push   %eax
4078c4:	51                   	push   %ecx
4078c5:	53                   	push   %ebx
4078c6:	e8 15 3d 00 00       	call   0x40b5e0
4078cb:	59                   	pop    %ecx
4078cc:	50                   	push   %eax
4078cd:	e8 ea 6f 00 00       	call   0x40e8bc
4078d2:	83 c4 0c             	add    $0xc,%esp
4078d5:	83 f8 ff             	cmp    $0xffffffff,%eax
4078d8:	74 55                	je     0x40792f
4078da:	8b 4d f8             	mov    -0x8(%ebp),%ecx
4078dd:	8b d1                	mov    %ecx,%edx
4078df:	3b c1                	cmp    %ecx,%eax
4078e1:	77 02                	ja     0x4078e5
4078e3:	8b d0                	mov    %eax,%edx
4078e5:	01 55 08             	add    %edx,0x8(%ebp)
4078e8:	2b fa                	sub    %edx,%edi
4078ea:	3b c1                	cmp    %ecx,%eax
4078ec:	72 41                	jb     0x40792f
4078ee:	8b 4d 08             	mov    0x8(%ebp),%ecx
4078f1:	8b 55 fc             	mov    -0x4(%ebp),%edx
4078f4:	eb 29                	jmp    0x40791f
4078f6:	0f be 01             	movsbl (%ecx),%eax
4078f9:	53                   	push   %ebx
4078fa:	50                   	push   %eax
4078fb:	e8 90 74 00 00       	call   0x40ed90
407900:	59                   	pop    %ecx
407901:	59                   	pop    %ecx
407902:	83 f8 ff             	cmp    $0xffffffff,%eax
407905:	74 31                	je     0x407938
407907:	8b 4d 08             	mov    0x8(%ebp),%ecx
40790a:	8b 53 18             	mov    0x18(%ebx),%edx
40790d:	41                   	inc    %ecx
40790e:	4f                   	dec    %edi
40790f:	89 4d 08             	mov    %ecx,0x8(%ebp)
407912:	89 55 fc             	mov    %edx,-0x4(%ebp)
407915:	85 d2                	test   %edx,%edx
407917:	7f 06                	jg     0x40791f
407919:	33 d2                	xor    %edx,%edx
40791b:	42                   	inc    %edx
40791c:	89 55 fc             	mov    %edx,-0x4(%ebp)
40791f:	85 ff                	test   %edi,%edi
407921:	0f 85 1a ff ff ff    	jne    0x407841
407927:	8b 45 10             	mov    0x10(%ebp),%eax
40792a:	e9 d0 fe ff ff       	jmp    0x4077ff
40792f:	8b 45 f4             	mov    -0xc(%ebp),%eax
407932:	6a 10                	push   $0x10
407934:	59                   	pop    %ecx
407935:	f0 09 08             	lock or %ecx,(%eax)
407938:	2b f7                	sub    %edi,%esi
40793a:	33 d2                	xor    %edx,%edx
40793c:	8b c6                	mov    %esi,%eax
40793e:	f7 75 0c             	divl   0xc(%ebp)
407941:	e9 b9 fe ff ff       	jmp    0x4077ff
407946:	8b ff                	mov    %edi,%edi
407948:	55                   	push   %ebp
407949:	8b ec                	mov    %esp,%ebp
40794b:	83 ec 10             	sub    $0x10,%esp
40794e:	83 7d 0c 00          	cmpl   $0x0,0xc(%ebp)
407952:	74 1c                	je     0x407970
407954:	83 7d 10 00          	cmpl   $0x0,0x10(%ebp)
407958:	74 16                	je     0x407970
40795a:	83 7d 14 00          	cmpl   $0x0,0x14(%ebp)
40795e:	75 16                	jne    0x407976
407960:	e8 a2 03 00 00       	call   0x407d07
407965:	c7 00 16 00 00 00    	movl   $0x16,(%eax)
40796b:	e8 be 02 00 00       	call   0x407c2e
407970:	33 c0                	xor    %eax,%eax
407972:	8b e5                	mov    %ebp,%esp
407974:	5d                   	pop    %ebp
407975:	c3                   	ret
407976:	8d 45 14             	lea    0x14(%ebp),%eax
407979:	89 45 f0             	mov    %eax,-0x10(%ebp)
40797c:	8d 45 08             	lea    0x8(%ebp),%eax
40797f:	89 45 f4             	mov    %eax,-0xc(%ebp)
407982:	8d 45 0c             	lea    0xc(%ebp),%eax
407985:	89 45 f8             	mov    %eax,-0x8(%ebp)