40e294:	89 06                	mov    %eax,(%esi)
40e296:	83 e0 03             	and    $0x3,%eax
40e299:	3c 03                	cmp    $0x3,%al
40e29b:	0f 84 c6 00 00 00    	je     0x40e367
40e2a1:	53                   	push   %ebx
40e2a2:	e8 f5 be ff ff       	call   0x40a19c
40e2a7:	89 45 f4             	mov    %eax,-0xc(%ebp)
40e2aa:	8d 45 f8             	lea    -0x8(%ebp),%eax
40e2ad:	50                   	push   %eax
40e2ae:	8d 45 e4             	lea    -0x1c(%ebp),%eax
40e2b1:	50                   	push   %eax
40e2b2:	e8 23 0b 00 00       	call   0x40edda
40e2b7:	8b 06                	mov    (%esi),%eax
40e2b9:	8b 55 e4             	mov    -0x1c(%ebp),%edx
40e2bc:	83 7d f8 00          	cmpl   $0x0,-0x8(%ebp)
40e2c0:	8b d8                	mov    %eax,%ebx
40e2c2:	89 5d fc             	mov    %ebx,-0x4(%ebp)
40e2c5:	8b c8                	mov    %eax,%ecx
40e2c7:	89 06                	mov    %eax,(%esi)
40e2c9:	74 13                	je     0x40e2de
40e2cb:	a8 01                	test   $0x1,%al
40e2cd:	75 0f                	jne    0x40e2de
40e2cf:	33 ca                	xor    %edx,%ecx
40e2d1:	81 e1 18 01 00 00    	and    $0x118,%ecx
40e2d7:	33 c8                	xor    %eax,%ecx
40e2d9:	83 c9 01             	or     $0x1,%ecx
40e2dc:	89 0e                	mov    %ecx,(%esi)
40e2de:	83 e3 02             	and    $0x2,%ebx
40e2e1:	75 10                	jne    0x40e2f3
40e2e3:	8b c1                	mov    %ecx,%eax
40e2e5:	33 c2                	xor    %edx,%eax
40e2e7:	25 80 00 00 00       	and    $0x80,%eax
40e2ec:	33 c8                	xor    %eax,%ecx
40e2ee:	83 c9 02             	or     $0x2,%ecx
40e2f1:	89 0e                	mov    %ecx,(%esi)
40e2f3:	8b 45 fc             	mov    -0x4(%ebp),%eax
40e2f6:	f0 0f b1 0f          	lock cmpxchg %ecx,(%edi)
40e2fa:	3b 45 fc             	cmp    -0x4(%ebp),%eax
40e2fd:	75 bd                	jne    0x40e2bc
40e2ff:	85 db                	test   %ebx,%ebx
40e301:	75 52                	jne    0x40e355
40e303:	38 1d 84 48 42 00    	cmp    %bl,0x424884
40e309:	74 4a                	je     0x40e355
40e30b:	bb 88 48 42 00       	mov    $0x424888,%ebx
40e310:	53                   	push   %ebx
40e311:	ff 15 60 61 42 00    	call   *0x426160
40e317:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40e31a:	a1 94 48 42 00       	mov    0x424894,%eax
40e31f:	85 c9                	test   %ecx,%ecx
40e321:	74 22                	je     0x40e345
40e323:	3b c8                	cmp    %eax,%ecx
40e325:	75 1e                	jne    0x40e345
40e327:	6a 08                	push   $0x8
40e329:	8d 45 ec             	lea    -0x14(%ebp),%eax
40e32c:	c7 45 ec 01 00 00 00 	movl   $0x1,-0x14(%ebp)
40e333:	50                   	push   %eax
40e334:	b9 b0 48 42 00       	mov    $0x4248b0,%ecx
40e339:	89 7d f0             	mov    %edi,-0x10(%ebp)
40e33c:	e8 38 a0 ff ff       	call   0x408379
40e341:	84 c0                	test   %al,%al
40e343:	75 06                	jne    0x40e34b
40e345:	6a fd                	push   $0xfffffffd
40e347:	58                   	pop    %eax
40e348:	f0 21 07             	lock and %eax,(%edi)
40e34b:	53                   	push   %ebx
40e34c:	ff 15 6c 61 42 00    	call   *0x42616c
40e352:	8b 55 e4             	mov    -0x1c(%ebp),%edx
40e355:	f6 06 01             	testb  $0x1,(%esi)
40e358:	5b                   	pop    %ebx
40e359:	75 0c                	jne    0x40e367
40e35b:	8b 0e                	mov    (%esi),%ecx
40e35d:	33 ca                	xor    %edx,%ecx
40e35f:	81 e1 18 01 00 00    	and    $0x118,%ecx
40e365:	31 0e                	xor    %ecx,(%esi)
40e367:	5f                   	pop    %edi
40e368:	8b c6                	mov    %esi,%eax
40e36a:	5e                   	pop    %esi
40e36b:	c9                   	leave
40e36c:	c2 04 00             	ret    $0x4
40e36f:	8b ff                	mov    %edi,%edi
40e371:	55                   	push   %ebp
40e372:	8b ec                	mov    %esp,%ebp
40e374:	83 ec 10             	sub    $0x10,%esp
40e377:	56                   	push   %esi
40e378:	8b f1                	mov    %ecx,%esi
40e37a:	8b 16                	mov    (%esi),%edx
40e37c:	f6 c2 02             	test   $0x2,%dl
40e37f:	75 0b                	jne    0x40e38c
40e381:	8d 45 f0             	lea    -0x10(%ebp),%eax
40e384:	50                   	push   %eax
40e385:	e8 f9 fe ff ff       	call   0x40e283
40e38a:	8b 10                	mov    (%eax),%edx
40e38c:	33 c0                	xor    %eax,%eax
40e38e:	c6 45 fc 03          	movb   $0x3,-0x4(%ebp)
40e392:	51                   	push   %ecx
40e393:	89 45 f8             	mov    %eax,-0x8(%ebp)
40e396:	0f b6 45 08          	movzbl 0x8(%ebp),%eax
40e39a:	51                   	push   %ecx
40e39b:	50                   	push   %eax
40e39c:	8d 45 f8             	lea    -0x8(%ebp),%eax
40e39f:	50                   	push   %eax
40e3a0:	8b c2                	mov    %edx,%eax
40e3a2:	8d 4e 08             	lea    0x8(%esi),%ecx
40e3a5:	c1 e8 08             	shr    $0x8,%eax
40e3a8:	c1 ea 07             	shr    $0x7,%edx
40e3ab:	83 e0 01             	and    $0x1,%eax
40e3ae:	83 e2 01             	and    $0x1,%edx
40e3b1:	50                   	push   %eax
40e3b2:	52                   	push   %edx
40e3b3:	ba ff 56 28 01       	mov    $0x12856ff,%edx
40e3b8:	e8 49 16 00 00       	call   0x40fa06
40e3bd:	5e                   	pop    %esi
40e3be:	c9                   	leave
40e3bf:	c2 0c 00             	ret    $0xc
40e3c2:	8b ff                	mov    %edi,%edi
40e3c4:	55                   	push   %ebp
40e3c5:	8b ec                	mov    %esp,%ebp
40e3c7:	83 ec 1c             	sub    $0x1c,%esp
40e3ca:	56                   	push   %esi
40e3cb:	8b 75 08             	mov    0x8(%ebp),%esi
40e3ce:	57                   	push   %edi
40e3cf:	8b f9                	mov    %ecx,%edi
40e3d1:	8b 07                	mov    (%edi),%eax
40e3d3:	89 06                	mov    %eax,(%esi)
40e3d5:	83 e0 03             	and    $0x3,%eax
40e3d8:	3c 03                	cmp    $0x3,%al
40e3da:	0f 84 c6 00 00 00    	je     0x40e4a6
40e3e0:	53                   	push   %ebx
40e3e1:	e8 b6 bd ff ff       	call   0x40a19c
40e3e6:	89 45 f4             	mov    %eax,-0xc(%ebp)
40e3e9:	8d 45 f8             	lea    -0x8(%ebp),%eax
40e3ec:	50                   	push   %eax
40e3ed:	8d 45 e4             	lea    -0x1c(%ebp),%eax
40e3f0:	50                   	push   %eax
40e3f1:	e8 4f 0a 00 00       	call   0x40ee45
40e3f6:	8b 06                	mov    (%esi),%eax
40e3f8:	8b 55 e4             	mov    -0x1c(%ebp),%edx
40e3fb:	83 7d f8 00          	cmpl   $0x0,-0x8(%ebp)
40e3ff:	8b d8                	mov    %eax,%ebx
40e401:	89 5d fc             	mov    %ebx,-0x4(%ebp)
40e404:	8b c8                	mov    %eax,%ecx
40e406:	89 06                	mov    %eax,(%esi)
40e408:	74 13                	je     0x40e41d
40e40a:	a8 01                	test   $0x1,%al
40e40c:	75 0f                	jne    0x40e41d
40e40e:	33 ca                	xor    %edx,%ecx
40e410:	81 e1 18 01 00 00    	and    $0x118,%ecx
40e416:	33 c8                	xor    %eax,%ecx
40e418:	83 c9 01             	or     $0x1,%ecx
40e41b:	89 0e                	mov    %ecx,(%esi)
40e41d:	83 e3 02             	and    $0x2,%ebx
40e420:	75 10                	jne    0x40e432
40e422:	8b c1                	mov    %ecx,%eax
40e424:	33 c2                	xor    %edx,%eax
40e426:	25 80 00 00 00       	and    $0x80,%eax
40e42b:	33 c8                	xor    %eax,%ecx
40e42d:	83 c9 02             	or     $0x2,%ecx
40e430:	89 0e                	mov    %ecx,(%esi)
40e432:	8b 45 fc             	mov    -0x4(%ebp),%eax
40e435:	f0 0f b1 0f          	lock cmpxchg %ecx,(%edi)
40e439:	3b 45 fc             	cmp    -0x4(%ebp),%eax
40e43c:	75 bd                	jne    0x40e3fb
40e43e:	85 db                	test   %ebx,%ebx
40e440:	75 52                	jne    0x40e494
40e442:	38 1d 84 48 42 00    	cmp    %bl,0x424884
40e448:	74 4a                	je     0x40e494
40e44a:	bb 88 48 42 00       	mov    $0x424888,%ebx
40e44f:	53                   	push   %ebx
40e450:	ff 15 60 61 42 00    	call   *0x426160
40e456:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40e459:	a1 94 48 42 00       	mov    0x424894,%eax
40e45e:	85 c9                	test   %ecx,%ecx
40e460:	74 22                	je     0x40e484
40e462:	3b c8                	cmp    %eax,%ecx
40e464:	75 1e                	jne    0x40e484
40e466:	6a 08                	push   $0x8
40e468:	8d 45 ec             	lea    -0x14(%ebp),%eax
40e46b:	c7 45 ec 01 00 00 00 	movl   $0x1,-0x14(%ebp)
40e472:	50                   	push   %eax
40e473:	b9 b0 48 42 00       	mov    $0x4248b0,%ecx
40e478:	89 7d f0             	mov    %edi,-0x10(%ebp)
40e47b:	e8 f9 9e ff ff       	call   0x408379
40e480:	84 c0                	test   %al,%al
40e482:	75 06                	jne    0x40e48a
40e484:	6a fd                	push   $0xfffffffd
40e486:	58                   	pop    %eax
40e487:	f0 21 07             	lock and %eax,(%edi)
40e48a:	53                   	push   %ebx
40e48b:	ff 15 6c 61 42 00    	call   *0x42616c
40e491:	8b 55 e4             	mov    -0x1c(%ebp),%edx
40e494:	f6 06 01             	testb  $0x1,(%esi)
40e497:	5b                   	pop    %ebx
40e498:	75 0c                	jne    0x40e4a6
40e49a:	8b 0e                	mov    (%esi),%ecx
40e49c:	33 ca                	xor    %edx,%ecx
40e49e:	81 e1 18 01 00 00    	and    $0x118,%ecx
40e4a4:	31 0e                	xor    %ecx,(%esi)
40e4a6:	5f                   	pop    %edi
40e4a7:	8b c6                	mov    %esi,%eax
40e4a9:	5e                   	pop    %esi
40e4aa:	c9                   	leave
40e4ab:	c2 04 00             	ret    $0x4
40e4ae:	8b ff                	mov    %edi,%edi
40e4b0:	55                   	push   %ebp
40e4b1:	8b ec                	mov    %esp,%ebp
40e4b3:	83 ec 10             	sub    $0x10,%esp
40e4b6:	56                   	push   %esi
40e4b7:	8b f1                	mov    %ecx,%esi
40e4b9:	8b 16                	mov    (%esi),%edx
40e4bb:	f6 c2 02             	test   $0x2,%dl
40e4be:	75 0b                	jne    0x40e4cb
40e4c0:	8d 45 f0             	lea    -0x10(%ebp),%eax
40e4c3:	50                   	push   %eax
40e4c4:	e8 f9 fe ff ff       	call   0x40e3c2
40e4c9:	8b 10                	mov    (%eax),%edx
40e4cb:	33 c0                	xor    %eax,%eax
40e4cd:	c6 45 fc 03          	movb   $0x3,-0x4(%ebp)
40e4d1:	51                   	push   %ecx
40e4d2:	89 45 f8             	mov    %eax,-0x8(%ebp)
40e4d5:	0f b6 45 08          	movzbl 0x8(%ebp),%eax
40e4d9:	51                   	push   %ecx
40e4da:	50                   	push   %eax
40e4db:	8d 45 f8             	lea    -0x8(%ebp),%eax
40e4de:	50                   	push   %eax
40e4df:	8b c2                	mov    %edx,%eax
40e4e1:	8d 4e 08             	lea    0x8(%esi),%ecx
40e4e4:	c1 e8 08             	shr    $0x8,%eax
40e4e7:	c1 ea 07             	shr    $0x7,%edx
40e4ea:	83 e0 01             	and    $0x1,%eax
40e4ed:	83 e2 01             	and    $0x1,%edx
40e4f0:	50                   	push   %eax
40e4f1:	52                   	push   %edx
40e4f2:	ba 05 61 0f 01       	mov    $0x10f6105,%edx
40e4f7:	e8 0a 15 00 00       	call   0x40fa06
40e4fc:	5e                   	pop    %esi
40e4fd:	c9                   	leave
40e4fe:	c2 0c 00             	ret    $0xc
40e501:	8b ff                	mov    %edi,%edi
40e503:	55                   	push   %ebp
40e504:	8b ec                	mov    %esp,%ebp
40e506:	83 ec 1c             	sub    $0x1c,%esp
40e509:	56                   	push   %esi
40e50a:	8b 75 08             	mov    0x8(%ebp),%esi
40e50d:	57                   	push   %edi
40e50e:	8b f9                	mov    %ecx,%edi
40e510:	8b 07                	mov    (%edi),%eax
40e512:	89 06                	mov    %eax,(%esi)
40e514:	83 e0 03             	and    $0x3,%eax
40e517:	3c 03                	cmp    $0x3,%al
40e519:	0f 84 c6 00 00 00    	je     0x40e5e5
40e51f:	53                   	push   %ebx
40e520:	e8 77 bc ff ff       	call   0x40a19c
40e525:	89 45 f4             	mov    %eax,-0xc(%ebp)
40e528:	8d 45 f8             	lea    -0x8(%ebp),%eax
40e52b:	50                   	push   %eax
40e52c:	8d 45 e4             	lea    -0x1c(%ebp),%eax
40e52f:	50                   	push   %eax
40e530:	e8 7b 09 00 00       	call   0x40eeb0
40e535:	8b 06                	mov    (%esi),%eax
40e537:	8b 55 e4             	mov    -0x1c(%ebp),%edx
40e53a:	83 7d f8 00          	cmpl   $0x0,-0x8(%ebp)
40e53e:	8b d8                	mov    %eax,%ebx
40e540:	89 5d fc             	mov    %ebx,-0x4(%ebp)
40e543:	8b c8                	mov    %eax,%ecx
40e545:	89 06                	mov    %eax,(%esi)
40e547:	74 13                	je     0x40e55c
40e549:	a8 01                	test   $0x1,%al
40e54b:	75 0f                	jne    0x40e55c
40e54d:	33 ca                	xor    %edx,%ecx
40e54f:	81 e1 18 01 00 00    	and    $0x118,%ecx
40e555:	33 c8                	xor    %eax,%ecx
40e557:	83 c9 01             	or     $0x1,%ecx
40e55a:	89 0e                	mov    %ecx,(%esi)
40e55c:	83 e3 02             	and    $0x2,%ebx
40e55f:	75 10                	jne    0x40e571
40e561:	8b c1                	mov    %ecx,%eax
40e563:	33 c2                	xor    %edx,%eax
40e565:	25 80 00 00 00       	and    $0x80,%eax
40e56a:	33 c8                	xor    %eax,%ecx
40e56c:	83 c9 02             	or     $0x2,%ecx
40e56f:	89 0e                	mov    %ecx,(%esi)
40e571:	8b 45 fc             	mov    -0x4(%ebp),%eax
40e574:	f0 0f b1 0f          	lock cmpxchg %ecx,(%edi)
40e578:	3b 45 fc             	cmp    -0x4(%ebp),%eax
40e57b:	75 bd                	jne    0x40e53a
40e57d:	85 db                	test   %ebx,%ebx
40e57f:	75 52                	jne    0x40e5d3
40e581:	38 1d 84 48 42 00    	cmp    %bl,0x424884
40e587:	74 4a                	je     0x40e5d3
40e589:	bb 88 48 42 00       	mov    $0x424888,%ebx
40e58e:	53                   	push   %ebx
40e58f:	ff 15 60 61 42 00    	call   *0x426160
40e595:	8b 4d f4             	mov    -0xc(%ebp),%ecx
40e598:	a1 94 48 42 00       	mov    0x424894,%eax
40e59d:	85 c9                	test   %ecx,%ecx
40e59f:	74 22                	je     0x40e5c3
40e5a1:	3b c8                	cmp    %eax,%ecx
40e5a3:	75 1e                	jne    0x40e5c3
40e5a5:	6a 08                	push   $0x8
40e5a7:	8d 45 ec             	lea    -0x14(%ebp),%eax
40e5aa:	c7 45 ec 01 00 00 00 	movl   $0x1,-0x14(%ebp)
40e5b1:	50                   	push   %eax
40e5b2:	b9 b0 48 42 00       	mov    $0x4248b0,%ecx
40e5b7:	89 7d f0             	mov    %edi,-0x10(%ebp)
40e5ba:	e8 ba 9d ff ff       	call   0x408379
40e5bf:	84 c0                	test   %al,%al
40e5c1:	75 06                	jne    0x40e5c9
40e5c3:	6a fd                	push   $0xfffffffd
40e5c5:	58                   	pop    %eax
40e5c6:	f0 21 07             	lock and %eax,(%edi)
40e5c9:	53                   	push   %ebx
40e5ca:	ff 15 6c 61 42 00    	call   *0x42616c
40e5d0:	8b 55 e4             	mov    -0x1c(%ebp),%edx
40e5d3:	f6 06 01             	testb  $0x1,(%esi)
40e5d6:	5b                   	pop    %ebx
40e5d7:	75 0c                	jne    0x40e5e5
40e5d9:	8b 0e                	mov    (%esi),%ecx
40e5db:	33 ca                	xor    %edx,%ecx
40e5dd:	81 e1 18 01 00 00    	and    $0x118,%ecx
40e5e3:	31 0e                	xor    %ecx,(%esi)
40e5e5:	5f                   	pop    %edi
40e5e6:	8b c6                	mov    %esi,%eax
40e5e8:	5e                   	pop    %esi
40e5e9:	c9                   	leave
40e5ea:	c2 04 00             	ret    $0x4
40e5ed:	8b ff                	mov    %edi,%edi
40e5ef:	55                   	push   %ebp
40e5f0:	8b ec                	mov    %esp,%ebp
40e5f2:	83 ec 10             	sub    $0x10,%esp
40e5f5:	56                   	push   %esi
40e5f6:	8b f1                	mov    %ecx,%esi
40e5f8:	8b 16                	mov    (%esi),%edx
40e5fa:	f6 c2 02             	test   $0x2,%dl
40e5fd:	75 0b                	jne    0x40e60a
40e5ff:	8d 45 f0             	lea    -0x10(%ebp),%eax
40e602:	50                   	push   %eax
40e603:	e8 f9 fe ff ff       	call   0x40e501
40e608:	8b 10                	mov    (%eax),%edx
40e60a:	33 c0                	xor    %eax,%eax
40e60c:	c6 45 fc 03          	movb   $0x3,-0x4(%ebp)
40e610:	51                   	push   %ecx
40e611:	89 45 f8             	mov    %eax,-0x8(%ebp)
40e614:	0f b6 45 08          	movzbl 0x8(%ebp),%eax
40e618:	51                   	push   %ecx
40e619:	50                   	push   %eax
40e61a:	8d 45 f8             	lea    -0x8(%ebp),%eax
40e61d:	50                   	push   %eax
40e61e:	8b c2                	mov    %edx,%eax
40e620:	8d 4e 08             	lea    0x8(%esi),%ecx
40e623:	c1 e8 08             	shr    $0x8,%eax