40e40d:	0f 84 6d 01 00 00    	je     0x40e580
40e413:	f6 45 10 10          	testb  $0x10,0x10(%ebp)
40e417:	0f 84 63 01 00 00    	je     0x40e580
40e41d:	8b 45 0c             	mov    0xc(%ebp),%eax
40e420:	57                   	push   %edi
40e421:	8b fb                	mov    %ebx,%edi
40e423:	c1 ef 04             	shr    $0x4,%edi
40e426:	dd 00                	fldl   (%eax)
40e428:	23 f9                	and    %ecx,%edi
40e42a:	d9 ee                	fldz
40e42c:	dd e9                	fucomp %st(1)
40e42e:	89 7d f8             	mov    %edi,-0x8(%ebp)
40e431:	df e0                	fnstsw %ax
40e433:	f6 c4 44             	test   $0x44,%ah
40e436:	0f 8b 36 01 00 00    	jnp    0x40e572
40e43c:	8d 45 ec             	lea    -0x14(%ebp),%eax
40e43f:	50                   	push   %eax
40e440:	51                   	push   %ecx
40e441:	51                   	push   %ecx
40e442:	dd 1c 24             	fstpl  (%esp)
40e445:	e8 3c 05 00 00       	call   0x40e986
40e44a:	8b 55 ec             	mov    -0x14(%ebp),%edx
40e44d:	83 c4 0c             	add    $0xc,%esp
40e450:	81 c2 00 fa ff ff    	add    $0xfffffa00,%edx
40e456:	dd 55 e0             	fstl   -0x20(%ebp)
40e459:	d9 ee                	fldz
40e45b:	81 fa ce fb ff ff    	cmp    $0xfffffbce,%edx
40e461:	7d 0a                	jge    0x40e46d
40e463:	33 c0                	xor    %eax,%eax
40e465:	de c9                	fmulp  %st,%st(1)
40e467:	40                   	inc    %eax
40e468:	e9 fa 00 00 00       	jmp    0x40e567
40e46d:	de d9                	fcompp
40e46f:	df e0                	fnstsw %ax
40e471:	f6 c4 41             	test   $0x41,%ah
40e474:	75 0d                	jne    0x40e483
40e476:	c7 45 f4 01 00 00 00 	movl   $0x1,-0xc(%ebp)
40e47d:	c6 45 ff 01          	movb   $0x1,-0x1(%ebp)
40e481:	eb 09                	jmp    0x40e48c
40e483:	83 65 f4 00          	andl   $0x0,-0xc(%ebp)
40e487:	32 c0                	xor    %al,%al
40e489:	88 45 ff             	mov    %al,-0x1(%ebp)
40e48c:	8b 45 e6             	mov    -0x1a(%ebp),%eax
40e48f:	b9 03 fc ff ff       	mov    $0xfffffc03,%ecx
40e494:	83 e0 0f             	and    $0xf,%eax
40e497:	83 c8 10             	or     $0x10,%eax
40e49a:	66 89 45 e6          	mov    %ax,-0x1a(%ebp)
40e49e:	32 e4                	xor    %ah,%ah
40e4a0:	32 c0                	xor    %al,%al
40e4a2:	88 65 fd             	mov    %ah,-0x3(%ebp)
40e4a5:	88 45 fe             	mov    %al,-0x2(%ebp)
40e4a8:	3b d1                	cmp    %ecx,%edx
40e4aa:	7d 49                	jge    0x40e4f5
40e4ac:	89 7d f8             	mov    %edi,-0x8(%ebp)
40e4af:	2b ca                	sub    %edx,%ecx
40e4b1:	8b 7d e0             	mov    -0x20(%ebp),%edi
40e4b4:	8b 5d f8             	mov    -0x8(%ebp),%ebx
40e4b7:	8b d7                	mov    %edi,%edx
40e4b9:	83 e2 01             	and    $0x1,%edx
40e4bc:	74 05                	je     0x40e4c3
40e4be:	85 db                	test   %ebx,%ebx
40e4c0:	75 01                	jne    0x40e4c3
40e4c2:	43                   	inc    %ebx
40e4c3:	84 c0                	test   %al,%al
40e4c5:	74 02                	je     0x40e4c9
40e4c7:	b4 01                	mov    $0x1,%ah
40e4c9:	d1 ef                	shr    $1,%edi
40e4cb:	8a c2                	mov    %dl,%al
40e4cd:	f6 45 e4 01          	testb  $0x1,-0x1c(%ebp)
40e4d1:	89 7d e0             	mov    %edi,-0x20(%ebp)
40e4d4:	74 09                	je     0x40e4df
40e4d6:	81 cf 00 00 00 80    	or     $0x80000000,%edi
40e4dc:	89 7d e0             	mov    %edi,-0x20(%ebp)
40e4df:	d1 6d e4             	shrl   $1,-0x1c(%ebp)
40e4e2:	83 e9 01             	sub    $0x1,%ecx
40e4e5:	75 d0                	jne    0x40e4b7
40e4e7:	89 5d f8             	mov    %ebx,-0x8(%ebp)
40e4ea:	8b 5d 08             	mov    0x8(%ebp),%ebx
40e4ed:	88 65 fd             	mov    %ah,-0x3(%ebp)
40e4f0:	88 45 fe             	mov    %al,-0x2(%ebp)
40e4f3:	eb 03                	jmp    0x40e4f8
40e4f5:	8b 7d e0             	mov    -0x20(%ebp),%edi
40e4f8:	83 7d f4 00          	cmpl   $0x0,-0xc(%ebp)
40e4fc:	dd 45 e0             	fldl   -0x20(%ebp)
40e4ff:	74 0d                	je     0x40e50e
40e501:	d9 e0                	fchs
40e503:	dd 55 f0             	fstl   -0x10(%ebp)
40e506:	dd 55 e0             	fstl   -0x20(%ebp)
40e509:	8b 7d e0             	mov    -0x20(%ebp),%edi
40e50c:	eb 03                	jmp    0x40e511
40e50e:	dd 55 f0             	fstl   -0x10(%ebp)
40e511:	84 c0                	test   %al,%al
40e513:	75 04                	jne    0x40e519
40e515:	84 e4                	test   %ah,%ah
40e517:	74 4b                	je     0x40e564
40e519:	dd d8                	fstp   %st(0)
40e51b:	e8 95 e1 ff ff       	call   0x40c6b5
40e520:	85 c0                	test   %eax,%eax
40e522:	74 1c                	je     0x40e540
40e524:	3d 00 01 00 00       	cmp    $0x100,%eax
40e529:	74 0e                	je     0x40e539
40e52b:	3d 00 02 00 00       	cmp    $0x200,%eax
40e530:	75 2f                	jne    0x40e561
40e532:	8a 45 ff             	mov    -0x1(%ebp),%al
40e535:	34 01                	xor    $0x1,%al
40e537:	eb 03                	jmp    0x40e53c
40e539:	8a 45 ff             	mov    -0x1(%ebp),%al
40e53c:	84 c0                	test   %al,%al
40e53e:	eb 10                	jmp    0x40e550
40e540:	80 7d fe 00          	cmpb   $0x0,-0x2(%ebp)
40e544:	74 1b                	je     0x40e561
40e546:	80 7d fd 00          	cmpb   $0x0,-0x3(%ebp)
40e54a:	75 06                	jne    0x40e552
40e54c:	f6 45 e0 01          	testb  $0x1,-0x20(%ebp)
40e550:	74 0f                	je     0x40e561
40e552:	83 c7 01             	add    $0x1,%edi
40e555:	89 7d e0             	mov    %edi,-0x20(%ebp)
40e558:	83 55 e4 00          	adcl   $0x0,-0x1c(%ebp)
40e55c:	dd 45 e0             	fldl   -0x20(%ebp)
40e55f:	eb 03                	jmp    0x40e564
40e561:	dd 45 f0             	fldl   -0x10(%ebp)
40e564:	8b 45 f8             	mov    -0x8(%ebp),%eax
40e567:	8b 4d 0c             	mov    0xc(%ebp),%ecx
40e56a:	dd 19                	fstpl  (%ecx)
40e56c:	85 c0                	test   %eax,%eax
40e56e:	74 0c                	je     0x40e57c
40e570:	eb 02                	jmp    0x40e574
40e572:	dd d8                	fstp   %st(0)
40e574:	6a 10                	push   $0x10
40e576:	e8 d1 e0 ff ff       	call   0x40c64c
40e57b:	59                   	pop    %ecx
40e57c:	83 e6 fd             	and    $0xfffffffd,%esi
40e57f:	5f                   	pop    %edi
40e580:	f6 c3 10             	test   $0x10,%bl
40e583:	74 11                	je     0x40e596
40e585:	f6 45 10 20          	testb  $0x20,0x10(%ebp)
40e589:	74 0b                	je     0x40e596
40e58b:	6a 20                	push   $0x20
40e58d:	e8 ba e0 ff ff       	call   0x40c64c
40e592:	59                   	pop    %ecx
40e593:	83 e6 ef             	and    $0xffffffef,%esi
40e596:	33 c0                	xor    %eax,%eax
40e598:	85 f6                	test   %esi,%esi
40e59a:	5e                   	pop    %esi
40e59b:	0f 94 c0             	sete   %al
40e59e:	5b                   	pop    %ebx
40e59f:	c9                   	leave
40e5a0:	c3                   	ret
40e5a1:	8b ff                	mov    %edi,%edi
40e5a3:	55                   	push   %ebp
40e5a4:	8b ec                	mov    %esp,%ebp
40e5a6:	6a 00                	push   $0x0
40e5a8:	ff 75 1c             	push   0x1c(%ebp)
40e5ab:	ff 75 18             	push   0x18(%ebp)
40e5ae:	ff 75 14             	push   0x14(%ebp)
40e5b1:	ff 75 10             	push   0x10(%ebp)
40e5b4:	ff 75 0c             	push   0xc(%ebp)
40e5b7:	ff 75 08             	push   0x8(%ebp)
40e5ba:	e8 05 00 00 00       	call   0x40e5c4
40e5bf:	83 c4 1c             	add    $0x1c,%esp
40e5c2:	5d                   	pop    %ebp
40e5c3:	c3                   	ret
40e5c4:	8b ff                	mov    %edi,%edi
40e5c6:	55                   	push   %ebp
40e5c7:	8b ec                	mov    %esp,%ebp
40e5c9:	8b 45 08             	mov    0x8(%ebp),%eax
40e5cc:	33 c9                	xor    %ecx,%ecx
40e5ce:	53                   	push   %ebx
40e5cf:	33 db                	xor    %ebx,%ebx
40e5d1:	43                   	inc    %ebx
40e5d2:	89 48 04             	mov    %ecx,0x4(%eax)
40e5d5:	8b 45 08             	mov    0x8(%ebp),%eax
40e5d8:	57                   	push   %edi
40e5d9:	bf 0d 00 00 c0       	mov    $0xc000000d,%edi
40e5de:	89 48 08             	mov    %ecx,0x8(%eax)
40e5e1:	8b 45 08             	mov    0x8(%ebp),%eax
40e5e4:	89 48 0c             	mov    %ecx,0xc(%eax)
40e5e7:	8b 4d 10             	mov    0x10(%ebp),%ecx
40e5ea:	f6 c1 10             	test   $0x10,%cl
40e5ed:	74 0b                	je     0x40e5fa
40e5ef:	8b 45 08             	mov    0x8(%ebp),%eax
40e5f2:	bf 8f 00 00 c0       	mov    $0xc000008f,%edi
40e5f7:	09 58 04             	or     %ebx,0x4(%eax)
40e5fa:	f6 c1 02             	test   $0x2,%cl
40e5fd:	74 0c                	je     0x40e60b
40e5ff:	8b 45 08             	mov    0x8(%ebp),%eax
40e602:	bf 93 00 00 c0       	mov    $0xc0000093,%edi
40e607:	83 48 04 02          	orl    $0x2,0x4(%eax)
40e60b:	f6 c1 01             	test   $0x1,%cl
40e60e:	74 0c                	je     0x40e61c
40e610:	8b 45 08             	mov    0x8(%ebp),%eax
40e613:	bf 91 00 00 c0       	mov    $0xc0000091,%edi
40e618:	83 48 04 04          	orl    $0x4,0x4(%eax)
40e61c:	f6 c1 04             	test   $0x4,%cl
40e61f:	74 0c                	je     0x40e62d
40e621:	8b 45 08             	mov    0x8(%ebp),%eax
40e624:	bf 8e 00 00 c0       	mov    $0xc000008e,%edi
40e629:	83 48 04 08          	orl    $0x8,0x4(%eax)
40e62d:	f6 c1 08             	test   $0x8,%cl
40e630:	74 0c                	je     0x40e63e
40e632:	8b 45 08             	mov    0x8(%ebp),%eax
40e635:	bf 90 00 00 c0       	mov    $0xc0000090,%edi
40e63a:	83 48 04 10          	orl    $0x10,0x4(%eax)
40e63e:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e641:	56                   	push   %esi
40e642:	8b 75 0c             	mov    0xc(%ebp),%esi
40e645:	8b 06                	mov    (%esi),%eax
40e647:	c1 e0 04             	shl    $0x4,%eax
40e64a:	f7 d0                	not    %eax
40e64c:	33 41 08             	xor    0x8(%ecx),%eax
40e64f:	83 e0 10             	and    $0x10,%eax
40e652:	31 41 08             	xor    %eax,0x8(%ecx)
40e655:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e658:	8b 06                	mov    (%esi),%eax
40e65a:	03 c0                	add    %eax,%eax
40e65c:	f7 d0                	not    %eax
40e65e:	33 41 08             	xor    0x8(%ecx),%eax
40e661:	83 e0 08             	and    $0x8,%eax
40e664:	31 41 08             	xor    %eax,0x8(%ecx)
40e667:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e66a:	8b 06                	mov    (%esi),%eax
40e66c:	d1 e8                	shr    $1,%eax
40e66e:	f7 d0                	not    %eax
40e670:	33 41 08             	xor    0x8(%ecx),%eax
40e673:	83 e0 04             	and    $0x4,%eax
40e676:	31 41 08             	xor    %eax,0x8(%ecx)
40e679:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e67c:	8b 06                	mov    (%esi),%eax
40e67e:	c1 e8 03             	shr    $0x3,%eax
40e681:	f7 d0                	not    %eax
40e683:	33 41 08             	xor    0x8(%ecx),%eax
40e686:	83 e0 02             	and    $0x2,%eax
40e689:	31 41 08             	xor    %eax,0x8(%ecx)
40e68c:	8b 06                	mov    (%esi),%eax
40e68e:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e691:	c1 e8 05             	shr    $0x5,%eax
40e694:	f7 d0                	not    %eax
40e696:	33 41 08             	xor    0x8(%ecx),%eax
40e699:	23 c3                	and    %ebx,%eax
40e69b:	31 41 08             	xor    %eax,0x8(%ecx)
40e69e:	e8 02 e0 ff ff       	call   0x40c6a5
40e6a3:	8b d0                	mov    %eax,%edx
40e6a5:	f6 c2 01             	test   $0x1,%dl
40e6a8:	74 07                	je     0x40e6b1
40e6aa:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e6ad:	83 49 0c 10          	orl    $0x10,0xc(%ecx)
40e6b1:	f6 c2 04             	test   $0x4,%dl
40e6b4:	74 07                	je     0x40e6bd
40e6b6:	8b 45 08             	mov    0x8(%ebp),%eax
40e6b9:	83 48 0c 08          	orl    $0x8,0xc(%eax)
40e6bd:	f6 c2 08             	test   $0x8,%dl
40e6c0:	74 07                	je     0x40e6c9
40e6c2:	8b 45 08             	mov    0x8(%ebp),%eax
40e6c5:	83 48 0c 04          	orl    $0x4,0xc(%eax)
40e6c9:	f6 c2 10             	test   $0x10,%dl
40e6cc:	74 07                	je     0x40e6d5
40e6ce:	8b 45 08             	mov    0x8(%ebp),%eax
40e6d1:	83 48 0c 02          	orl    $0x2,0xc(%eax)
40e6d5:	f6 c2 20             	test   $0x20,%dl
40e6d8:	74 06                	je     0x40e6e0
40e6da:	8b 45 08             	mov    0x8(%ebp),%eax
40e6dd:	09 58 0c             	or     %ebx,0xc(%eax)
40e6e0:	8b 06                	mov    (%esi),%eax
40e6e2:	b9 00 0c 00 00       	mov    $0xc00,%ecx
40e6e7:	23 c1                	and    %ecx,%eax
40e6e9:	74 35                	je     0x40e720
40e6eb:	3d 00 04 00 00       	cmp    $0x400,%eax
40e6f0:	74 22                	je     0x40e714
40e6f2:	3d 00 08 00 00       	cmp    $0x800,%eax
40e6f7:	74 0c                	je     0x40e705
40e6f9:	3b c1                	cmp    %ecx,%eax
40e6fb:	75 29                	jne    0x40e726
40e6fd:	8b 45 08             	mov    0x8(%ebp),%eax
40e700:	83 08 03             	orl    $0x3,(%eax)
40e703:	eb 21                	jmp    0x40e726
40e705:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e708:	8b 01                	mov    (%ecx),%eax
40e70a:	83 e0 fe             	and    $0xfffffffe,%eax
40e70d:	83 c8 02             	or     $0x2,%eax
40e710:	89 01                	mov    %eax,(%ecx)
40e712:	eb 12                	jmp    0x40e726
40e714:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e717:	8b 01                	mov    (%ecx),%eax
40e719:	83 e0 fd             	and    $0xfffffffd,%eax
40e71c:	0b c3                	or     %ebx,%eax
40e71e:	eb f0                	jmp    0x40e710
40e720:	8b 45 08             	mov    0x8(%ebp),%eax
40e723:	83 20 fc             	andl   $0xfffffffc,(%eax)
40e726:	8b 06                	mov    (%esi),%eax
40e728:	b9 00 03 00 00       	mov    $0x300,%ecx
40e72d:	23 c1                	and    %ecx,%eax
40e72f:	74 20                	je     0x40e751
40e731:	3d 00 02 00 00       	cmp    $0x200,%eax
40e736:	74 0c                	je     0x40e744
40e738:	3b c1                	cmp    %ecx,%eax
40e73a:	75 22                	jne    0x40e75e
40e73c:	8b 45 08             	mov    0x8(%ebp),%eax
40e73f:	83 20 e3             	andl   $0xffffffe3,(%eax)
40e742:	eb 1a                	jmp    0x40e75e
40e744:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e747:	8b 01                	mov    (%ecx),%eax
40e749:	83 e0 e7             	and    $0xffffffe7,%eax
40e74c:	83 c8 04             	or     $0x4,%eax
40e74f:	eb 0b                	jmp    0x40e75c
40e751:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e754:	8b 01                	mov    (%ecx),%eax
40e756:	83 e0 eb             	and    $0xffffffeb,%eax
40e759:	83 c8 08             	or     $0x8,%eax
40e75c:	89 01                	mov    %eax,(%ecx)
40e75e:	8b 45 08             	mov    0x8(%ebp),%eax
40e761:	8b 4d 14             	mov    0x14(%ebp),%ecx
40e764:	c1 e1 05             	shl    $0x5,%ecx
40e767:	33 08                	xor    (%eax),%ecx
40e769:	81 e1 e0 ff 01 00    	and    $0x1ffe0,%ecx
40e76f:	31 08                	xor    %ecx,(%eax)
40e771:	8b 45 08             	mov    0x8(%ebp),%eax
40e774:	09 58 20             	or     %ebx,0x20(%eax)
40e777:	83 7d 20 00          	cmpl   $0x0,0x20(%ebp)
40e77b:	74 2c                	je     0x40e7a9
40e77d:	8b 45 08             	mov    0x8(%ebp),%eax
40e780:	83 60 20 e1          	andl   $0xffffffe1,0x20(%eax)
40e784:	8b 45 18             	mov    0x18(%ebp),%eax
40e787:	d9 00                	flds   (%eax)
40e789:	8b 45 08             	mov    0x8(%ebp),%eax
40e78c:	d9 58 10             	fstps  0x10(%eax)
40e78f:	8b 45 08             	mov    0x8(%ebp),%eax
40e792:	09 58 60             	or     %ebx,0x60(%eax)
40e795:	8b 45 08             	mov    0x8(%ebp),%eax
40e798:	8b 5d 1c             	mov    0x1c(%ebp),%ebx
40e79b:	83 60 60 e1          	andl   $0xffffffe1,0x60(%eax)
40e79f:	8b 45 08             	mov    0x8(%ebp),%eax
40e7a2:	d9 03                	flds   (%ebx)
40e7a4:	d9 58 50             	fstps  0x50(%eax)
40e7a7:	eb 3a                	jmp    0x40e7e3
40e7a9:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e7ac:	8b 41 20             	mov    0x20(%ecx),%eax
40e7af:	83 e0 e3             	and    $0xffffffe3,%eax
40e7b2:	83 c8 02             	or     $0x2,%eax
40e7b5:	89 41 20             	mov    %eax,0x20(%ecx)
40e7b8:	8b 45 18             	mov    0x18(%ebp),%eax
40e7bb:	dd 00                	fldl   (%eax)
40e7bd:	8b 45 08             	mov    0x8(%ebp),%eax
40e7c0:	dd 58 10             	fstpl  0x10(%eax)
40e7c3:	8b 45 08             	mov    0x8(%ebp),%eax
40e7c6:	09 58 60             	or     %ebx,0x60(%eax)
40e7c9:	8b 4d 08             	mov    0x8(%ebp),%ecx
40e7cc:	8b 5d 1c             	mov    0x1c(%ebp),%ebx
40e7cf:	8b 41 60             	mov    0x60(%ecx),%eax
40e7d2:	83 e0 e3             	and    $0xffffffe3,%eax
40e7d5:	83 c8 02             	or     $0x2,%eax